code
012slime mold sim+
2026.05 • POST

i built a physarum slime mold simulation rendered entirely in ascii characters, and added it to the site as a background decoration on the contact page.

the simulation models physarum polycephalum - the single-celled organism famous for solving mazes. agents follow a simple rule: sense pheromone trails ahead, turn toward the strongest signal, deposit more trail. from those few rules, a branching vascular network emerges.

the tricky part was making it feel fast without blocking the page. a static poster is pre-rendered at build time (deterministic seed, 500 sim steps), served as a .txt file, and painted instantly at LCP. the live engine only loads when the element enters the viewport, fast-forwards to match the poster frame, then resumes seamlessly, so the animation looks continuous even though the heavy work was done ahead of time.

the character ramp ( \`^@/ ..„v0`) gives it that alternating diagonal texture. gamma remapping boosts faint trails so the low-density edges don't just disappear into whitespace.

011adding a view counter+
2026.03 • POST

i added a little view counter to the bottom of my website — it shows the total number of page visits since i set it up.

the tricky part is that this site is hosted on github pages, which is purely static. there's no server to store state, so i needed an external service. i went with firebase realtime database (free spark plan) — each page navigation fires an atomic runTransaction to increment a counter, and onValue keeps the displayed number in sync in real-time.

the security rules are set to only allow incrementing by exactly 1 per write, so the count can't be reset or inflated arbitrarily. the number you see in the footer is the real thing.

009building a game for fun+
2026.02 • POST

my friends and i have been regularly playing a fun multiplayer game called 'Psych' - it's a game where you make up fake answers to real trivia questions and try to guess the correct one among the fakes. it's a blast, and we've been playing it a lot. so we decided to build our own version with country specific trivia questions, and it's been a really fun project to work on together. check it out here: Hukka Bukka (click here) - it's still a work in progress, but we're excited about how it's coming along!

using firebase's realtime database for game state management, and next.js for the frontend.

001i built a website+
2024.11 • POST

welcome to my new personal website! it's been a fun project to work on. this is my first time using angular, and i'm really enjoying it so far. i too k some inspiration from swiss web design, which is known for its grid systems, typography, and minimal aesthetic. i hope you like it!

AI Concepts
003transformers without normalization?+
2025.02 • POST

transformers have long relied on normalization layers like LayerNorm to stabilize training and improve performance. however, a groundbreaking study challenges this paradigm by demonstrating that transformers can achieve equal or better results without any normalization layers. the key lies in a surprisingly simple operation called dynamic tanh (DyT), which re-imagines how neural networks process information.

read more on notion

AI Architecture
004hmmm... cag or rag?+
2025.03 • POST

large language models (LLMs) are powerful but have inherent limitations like hallucination and lacking up-to-date knowledge. to mitigate these issues, two popular approaches have emerged: Cache-Augmented Generation (CAG) and Retrieval-Augmented Generation (RAG). while both enhance LLM performance, they serve different use cases and have distinct advantages and trade-offs.

read more on notion

Design
005fonts+
2025.04 • BRIEF

typography has always intrigued me. from the subtle curves of a well-designed serif font to the efficiency of monospaced typefaces, i've found myself captivated by the world of fonts and their unique personalities. my interest in design and typography led me to take a coursera course on the subject, where i delved deeper into the technicalities of type design, kerning, ligatures, and the nuanced aesthetics that make a typeface stand out.

Updates
006meditating+
2025.09 • BRIEF

a few friends took me for meditation sessions recently, and it was a really interesting experience. i've always been skeptical about meditation and its benefits, but i was surprised by how calming and refreshing it felt.

ansh's misc files

ps: found Sam Peitz's work and had to make my own

my resume

too bright? click ↝