Abhinav Sarkar's Avatar

Abhinav Sarkar

@abhin4v.bsky.social

Programming languages aficionado, occasional runner, quantified-self enthusiast, and fervent napper. Works as senior software engineer at Google. Also at @abnv.me. #programminglanguages #software #running #Haskell #NixOS #photography #quantifiedself

30 Followers  |  48 Following  |  11 Posts  |  Joined: 24.08.2023
Posts Following

Posts by Abhinav Sarkar (@abhin4v.bsky.social)

Preview
Ese Large language models are better thinkers than writers. Well okay, they don't think as humans do, but I've been letting it write the vast chunk of my computer programs over the last year or so, which ...

thoughts on ese.
atharvaraykar.com/ese/

08.02.2026 13:13 โ€” ๐Ÿ‘ 3    ๐Ÿ” 1    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

It looks great! Though I notice that the RSS feed is gone.

26.01.2026 13:17 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Original post on fantastic.earth

I wrote the fifth part of my #blog series โ€œImplementing Co, a small programming language with #coroutinesโ€. This time, we add support for sleep in #Co for time-based executions. https://abhinavsarkar.net/posts/implementing-co-5/

#Programming #PLT #ProgrammingLanguages #Compilers #Haskell [โ€ฆ]

16.01.2026 15:09 โ€” ๐Ÿ‘ 2    ๐Ÿ” 4    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 1
Original post on fantastic.earth

The next session of #Indieweb Club #Bangalore is scheduled on this Saturday 17th January at 2:30 PM IST. Join us this time for a tech and design focused session. We'll co-work on our personal websites, try new designs, squash bugs, or just do some long-neglected digital housekeeping.

If you [โ€ฆ]

15.01.2026 10:00 โ€” ๐Ÿ‘ 0    ๐Ÿ” 2    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
How I use Jujutsu About three months ago I started using Jujutsu (JJ), a new Version Control System, for my personal projects. It took me a while to get used to it after more than a decade of using Git, but now Iโ€™m quite comfortable with it. Working with Jujutsu requires a shift from the mental model of Git. However, it is not as daunting as it may seem on the first day.

I wrote a post about how I use #Jujutsu, the new #VCS: https://abhinavsarkar.net/posts/jj-usage/

#blogging #programming

10.01.2026 11:47 โ€” ๐Ÿ‘ 2    ๐Ÿ” 3    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0
Preview
Notes for the Week #1 (2026) This week note covers the week of 29th December 2025โ€“4th January 2026. Ramp walk This was a week of resting and having fun with family and friends. I was on vacation for most of the week. ## Life We had another well-fed day on the 31st, starting with home-made biryani for lunch, and ordered pizza for dinner. We didnโ€™t do much else, just chilled at home. On 1st January, all of us went to the Namma Bengaluru Aquarium in the Cubbon Park. It was a lot of fun for our 3yo ๐’œ. Afterward, we walked around in the park and ๐’œ gathered a lot of cool sticks. Whatโ€™s with kids liking sticks so much? On the Saturday, we went to The Bangalore Berry Company farm to pick strawberries. The four hour drive (both ways) was a pain, but picking was fun. We also got some fresh vegies. My wife made a strawberry jam today, that I eagerly consumed with pancakes that she also made for breakfast. Alas, the two weeks of fun and frolic are over. I actually stayed in bed most of the day today to recover from all the fun ูญูญhappy introvert noisesูญูญ. ## Health I caught a bad cold early this week, caused by simply forgetting to put on a nightcap. Pleasures of being bald, I guess. Thankfully, I recovered in few days. After being able to walk over 9000 steps consistently every day, Iโ€™ve made it my daily goal to walk 10000 steps. This is partially inspired by my friend Sagrika, who did walk 10000 steps everyday in 2025. I hope it helps with reducing the weight I gained this festive season. In other news, I have reading glasses now. Here I thought Iโ€™d go one forever with my eyesight sharp, but life had other plans. I just got them last week, and it is taking a while to get adjusted to having a thing in front of my face all the time. ## Personal Work I again spent a lot of time working on the website this week. I promise, Iโ€™m done for now. * I changed the dead link checker to run only once a day. This significantly reduced the build time for the rest of 23 builds every day. * I moved the post similarity computations to run as a separate executable, which is run before the site generator is run, and outputs a JSON file with final data. Removing the computation from the site generator reduced the memory usage by a lot, and now I donโ€™t get the alerts every hour. * I added a popular posts and notes section on the homepage. I hope this makes it easier for first-time visitors to find their way around the site. * I added a Microblog Tag Graph page to explore my growing Microblog. It uses a force-directed graph made using d3.js. Let me know what you think about it in comments. ## Recent Posts I wrote a short note collecting all the polls I ran on Mastodon in 2025. I feel like this may become a yearly tradition. ## Watching, Reading, Listening Iโ€™m yet to start on a new book this year. However, I watched a lot of TV shows and one movie this week. Wife and I finished rewatching Interior Chinatown. I loved the show again, and I fully recommend it. I continue watching The Ancient Magusโ€™ Bride, though with great sorrow, I decided to stop watching One Punch Man season 3. Iโ€™ve never seen such a great manga being turned into suchโ€”pardon my language Mr. Spellcheckerโ€”a shitshow. Iโ€™ve picked some new shows to watch this year, I hope they turn out good. On 31st December, wife and I watched Burn After Reading, a dark comedy spy thriller. Watching Clooney and Pitt really made me feel like going out for a run or a ride. ## Social Media My MastodonWrapped tells me that I spent a lot of time on Mastodon this year. I liked 1800 posts and reposted over 1600 of them! I also posted 870 posts of my own. I gained 140 followers too! ## Interesting Internet Links * 11:59 PM * How should we learn from bugs? * Use Monoids for Construction Thatโ€™s all for this week. You can subscribe to the feed of my week notes for updates. If you have any questions or comments, please leave a comment below. If you liked this post, please share it. Thanks for reading!

First #weeknote of the year: https://abhinavsarkar.net/notes/2026-weeknotes-01-04/ about new year celebrations, graphs, and terrible TV shows.

#weeknotes #blogging

04.01.2026 13:41 โ€” ๐Ÿ‘ 1    ๐Ÿ” 1    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Video thumbnail

I like whatever is wrong with my algorithm over there

07.12.2025 15:49 โ€” ๐Ÿ‘ 16304    ๐Ÿ” 5999    ๐Ÿ’ฌ 148    ๐Ÿ“Œ 294
Preview
Notes for the Week #49 This week note covers the week of 24th Novemberโ€“7th December . True Blue * This is my tenth consecutive week of writing week notes! Iโ€™m happy that Iโ€™m able to keep up this habit. * Winter is here and Iโ€™m loving it! Bengaluru generally does not get much cold in winters but this year seem like an exception. Iโ€™ve been wearing sweatshirts and jackets every day, sometimes even to sleep. Iโ€™m planning to do some winter wear shopping soon. We got our 3yo ๐’œ some cute sweaters. * As my health improves, Iโ€™m starting to adopt a move active lifestyle. For now, Iโ€™m walking 2โ€“3 kms every day, and I plan to start doing Yoga from January. * Last week I switched from dairy milk to Oat milk after discovering that Iโ€™m now allergic to dairy. Iโ€™m starting to like the taste after trying it for a week. * Last week I spent most of my free time solving the Advent of Code 2025 puzzles. This year I decided to solve them in Janet, a new-age Lisp that Iโ€™ve been wanting to learn. Janet is a Clojure like Lisp that can be interpreted, embedded and compiled, and comes with a large standard library with concurrency, HTTP and PEG parser support. I want to replace Python with Janet as my scripting language. Iโ€™m far from good at it, but it feels nice to learn something new. You can browse my solutions on Github. I also wrote a note about my solutions. * Yesterday we had an IndieWebClub Bangalore meeting where we discussed website and post footers, how to design them and what to put in them. We also talked about styles of personal blogging. Folks showcased their favourite websites, and gave suggestions and tips about different ways of writing blogposts. It was really informative for me, and Iโ€™m definitely going to take some ideas and implement them in this website. * Today we went to Babai Tiffins, a new-to-us restaurant in our neighbourhood. Iโ€™ve been hearing good things about it for a while now. The food was delicious, though not exceptional. Afterward, we got ๐’œ some icecream ๐Ÿ™‚, and I finished writing this note. * Some interesting links for this week: * Wenyan-lang * How to write things people actually want to read * Start to finish on self-publishing a technical book Thatโ€™s all for this week. You can subscribe to the feed of my week notes for updates. If you have any questions or comments, please leave a comment below. If you liked this post, please share it. Thanks for reading!

A new #weeknote! Winter shopping, oat milk and advent of code this time: https://abhinavsarkar.net/notes/2025-weeknotes-12-07/

#blogging

07.12.2025 10:06 โ€” ๐Ÿ‘ 0    ๐Ÿ” 2    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
Notes for the Week #47 This week note covers the week of 17thโ€“23rd October. Halfpipe * Starting with health, this week was again fraught with infections. They say toddlers are walking Petri dishes, and itโ€™s not far from truth. My wife and I had a minor viral infection this week but thankfully the toddler was fine. Still, I didnโ€™t feel at 100% and could not get a lot done. * I finished reading _This is How You Lose the Time War_! This is the first fiction book that Iโ€™ve read since 2021. Early parenthood is difficult, and sadly, reading fiction was the first thing I gave up. I tried, but it just didnโ€™t hold my (scattered) attention. Thankfully, itโ€™s coming back to me. The book itself was a fascinating read. Iโ€™m not much into romances but this one was very different. Iโ€™m yet to take the full feeling in, and I will certainly go back and reread parts of it. I wholly recommend it if you are into reading sci-fi and/or romance. * This week, I finally had time and motivation to work on a side project that Iโ€™ve been trying to do for months. I wanted a service that takes an RSS feed, and sends me 10 (or 3) items from it every day using a space repetition algorithm as another feed. That way, I can provide it a feed of my favourite articles that I want to keep coming back to, and get to read them again and again over years. After mulling over this for six months and doing two overly complex prototypes, I finally came up with something that works well enough and fits under 500 lines of code. Six months to think, one day to write! I had to let go of using a spaced repetition algorithm because that requires statefulness, and I wanted a stateless minimal solution. So instead the program selects entries randomly with exponential weights calculated from age of entries using the A-Res algorithm. This biases selection toward older entries, making them more likely to be repeated. The repeated entries have their timestamp updated, and become less likely to be repeated again in the near future. I call this program _feed-repeat_ and it is running on my VPS now, echoing my Linkblog and Blogroll feeds. * Some interesting links for this week: * Towards interplanetary QUIC traffic * Why Lexing and Parsing Should Be Separate * Why you speak more Latin than you think Thatโ€™s all for this week. You can subscribe to the feed of my week notes for updates. If you have any questions or comments, please leave a comment below. If you liked this post, please share it. Thanks for reading!

The new #weeknote is out with news about health, books read and projects done: https://abhinavsarkar.net/notes/2025-weeknotes-11-23/

#blogging

23.11.2025 08:42 โ€” ๐Ÿ‘ 0    ๐Ÿ” 1    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

still kind of wild that unwrap is a thing in rust.

like, rust people will be so smug about how their language doesn't have null pointers and then add a function that replicates nullpointerexceptions right in their standard library?

15.06.2025 10:35 โ€” ๐Ÿ‘ 42    ๐Ÿ” 1    ๐Ÿ’ฌ 14    ๐Ÿ“Œ 2

I can't get over the fact that #Rust invented `Option` to avoid NULL pointers, and then added `unwrap` to it, undoing the whole thing.

19.11.2025 05:00 โ€” ๐Ÿ‘ 1    ๐Ÿ” 3    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0
silhouette of a couple against the evening sky, standing in an open field watching the sunset.

silhouette of a couple against the evening sky, standing in an open field watching the sunset.

An earnest #sunset #photography

15.11.2025 05:08 โ€” ๐Ÿ‘ 7    ๐Ÿ” 2    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
photo of a mechanical keyboard with white, black, light and dark green keycaps.

photo of a mechanical keyboard with white, black, light and dark green keycaps.

Gave my aging #MechanicalKeyboard a makeover by changing keycaps. The mix of colors looks pretty cool.

15.11.2025 07:14 โ€” ๐Ÿ‘ 2    ๐Ÿ” 1    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
Change of Mind _I wrote this post for a prompt given during ourlocal Indieweb club meeting: โ€œWhat did you recently change your mind about?โ€_ Iโ€™ve always wanted to write a book, some book, since I can remember, for reasons Iโ€™ll not go into in this post. Initially, I had no clue what I wanted to write about. Over years (decades really), I slowly zeroed it down to writing a book about compilers in Haskell. I got interested in Functional Programming while I was a wee J2EE developer back in the aughts. The first language that caught my fascination was Clojure, the excellent Lisp on JVM. But soon enough, the dark side of static typing seduced me and I fell in love with Haskell. Over a decade or so, Iโ€™ve read and written enough Haskell code that I can call myself proficient in it. Haskell is now the first language that I reach out to, no matter the size of my project, which I believe is something very uncommon. Along with Haskell and functional programming, usually comes the allurement of compilers and creating your own programming languages. And sure enough the bug bit me hard when the world stopped in 2020. I spent countless hours learning all things compilers from scratch, and writing many of them in Haskell. An idea crossed my mind one day, why not write a book on compilers using Haskell? I spent some time digging up. Turns out, there is only one compiler book that uses Haskell as its implementation language. This is a very bizarre and curious fact, because one of the biggest strengths of Haskell is writing compilers, and there are tens if not hundred of them written already. But only one person wrote a book about the process! I decided to snatch this opportunity. Thereafter, I spent a lot of time thinking about the book, more than a year actually. I wrote the table of contents, I thought about how Iโ€™d structure the code examples, even about the publishing software. I also read multiple articles about the process of book-writing by people who have successfully published. After a lot of deliberation and talking to friends, Iโ€™ve changed my mind about writing _the_ book. The effort to result ratio just does not seem worth it. This is more true for the kind of writing I do / want to doโ€”an in-depth everything-explained all-code-provided book. I know that I would not be satisfied with anything less. I suspect that if I go down this path, it would take a good chunk of my forties, and Iโ€™ll not have enough to show for all the time I put in it. Of course, I could be wrong, but this is what I feel right now. So, Iโ€™m changing my mind and Iโ€™m giving up. So long, my childhood dream of becoming a famous published author. But itโ€™s not all sad and gloom. Iโ€™ll probably do something more useful and fun with my time. I really think that Iโ€™ll not regret this decision. But if I do, I suppose I can change my mind about it again! If you have any questions or comments, please leave a comment below. If you liked this post, please share it. Thanks for reading!

I wrote a new #note at my local #Indieweb club: https://abhinavsarkar.net/notes/2025-change-of-mind/

#blogging #personal

15.11.2025 13:23 โ€” ๐Ÿ‘ 1    ๐Ÿ” 2    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

I Want You to Understand Chicago
Politics Chicago
2025-11-08

I want you to understand what it is like to live in Chicago during this time.

Every day my phone buzzes. It is a neighborhood group: four people were kidnapped at the corner drugstore. A friend a mile away sends a Slack message: she was at the scene when masked men assaulted and abducted two people on the street. A plumber working on my pipes is distraught, and I find out that two of his employees were kidnapped that morning. A week later it happens again.

An email arrives. Agents with guns have chased a teacher into the school where she works. They did not have a warrant. They dragged her away, ignoring her and her colleaguesโ€™ pleas to show proof of her documentation. That evening I stand a few feet from the parents of Rayito de Sol and listen to them describe, with anguish, how good Ms. Diana was to their children. What it is like to have strangers with guns traumatize your kids. For a teacher to hide a three-year-old child for fear they might be killed. How their relatives will no longer leave the house. I hear the pain and fury in their voices, and I wonder who will be next.

Understand what it is to pray in Chicago. On September 19th, Reverend David Black, lead pastor at First Presbyterian Church of Chicago, was praying outside the ICE detention center in Broadview when a DHS agent shot him in the head with pepper balls. Pepper balls are never supposed to be fired at the head because they can seriously injure, or even kill. โ€œWe could hear them laughing as they were shooting us from the roof,โ€ Black recalled. He is not the only member of the clergy ICE has assaulted. Methodist pastor Hannah Kardon was violently arrested on October 17th, and Baptist pastor Michael Woolf was shot with pepper balls on November 1st.

Understand what it is to sleep in Chicago. On the night of September 30th, federal agents rappelled from a Black Hawk helicopter to execute a raid on an apartment building on the South Shoโ€ฆ

I Want You to Understand Chicago Politics Chicago 2025-11-08 I want you to understand what it is like to live in Chicago during this time. Every day my phone buzzes. It is a neighborhood group: four people were kidnapped at the corner drugstore. A friend a mile away sends a Slack message: she was at the scene when masked men assaulted and abducted two people on the street. A plumber working on my pipes is distraught, and I find out that two of his employees were kidnapped that morning. A week later it happens again. An email arrives. Agents with guns have chased a teacher into the school where she works. They did not have a warrant. They dragged her away, ignoring her and her colleaguesโ€™ pleas to show proof of her documentation. That evening I stand a few feet from the parents of Rayito de Sol and listen to them describe, with anguish, how good Ms. Diana was to their children. What it is like to have strangers with guns traumatize your kids. For a teacher to hide a three-year-old child for fear they might be killed. How their relatives will no longer leave the house. I hear the pain and fury in their voices, and I wonder who will be next. Understand what it is to pray in Chicago. On September 19th, Reverend David Black, lead pastor at First Presbyterian Church of Chicago, was praying outside the ICE detention center in Broadview when a DHS agent shot him in the head with pepper balls. Pepper balls are never supposed to be fired at the head because they can seriously injure, or even kill. โ€œWe could hear them laughing as they were shooting us from the roof,โ€ Black recalled. He is not the only member of the clergy ICE has assaulted. Methodist pastor Hannah Kardon was violently arrested on October 17th, and Baptist pastor Michael Woolf was shot with pepper balls on November 1st. Understand what it is to sleep in Chicago. On the night of September 30th, federal agents rappelled from a Black Hawk helicopter to execute a raid on an apartment building on the South Shoโ€ฆ

Kyle Kingsbury is not a journalist. He is not an op-ed writer.

He is a computer safety researcher.

And he has written one of the most compelling, comprehensive accounts of the ongoing hell in Chicago that you could possibly imagine.

In under 1600 words.

aphyr.com/posts/397-i-...

09.11.2025 20:49 โ€” ๐Ÿ‘ 10357    ๐Ÿ” 5683    ๐Ÿ’ฌ 119    ๐Ÿ“Œ 337
A Short Survey of Compiler Backends As an amateur compiler developer, one of the decisions I struggle with is deciding choosing the compiler backends. Unlike the 80โ€™s when people had to target various machine architectures directly, now there are many mature options available. This is a short and very incomplete survey of some of the popular and interesting options. ### Contents 1. Machine Code / Assembly 2. Intermediate Representations 3. Other High-level Languages 4. Virtual Machines / Bytecode 5. WebAssembly 6. Meta-tracing Frameworks 7. Unconventional Backends 8. Conclusion ## Machine Code / Assembly A compiler can always directly output machine code or assembly targeted for one or more architectures. A well-known example is the Tiny C Compiler. Itโ€™s known for its speed and small size, and it can compile and run C code on the fly. Another such example is Turbo Pascal. You could do this with your compiler too, but youโ€™ll have to figure out the intricacies of the _Instruction set_ of each architecture (ISA) you want to target, as well as, concepts like register allocation. ## Intermediate Representations Most modern compilers actually donโ€™t emit machine code or assembly directly. They lower the source code down to a language-agnostic _Intermediate representation_ (IR) first, and then generate machine code for major architectures (x86-64, ARM64, etc.) from it. The most prominent tool in this space is LLVM. Itโ€™s a large, open-source compiler-as-a-library. Compilers for many languages such as Rust, Swift, C/C++ (via Clang), and Julia use LLVM as an IR to emit machine code. An alternative is the GNU C compiler (GCC), via its GIMPLE IR, though no compilers seem to use it directly. GCC can be used as a library to compile code, much like LLVM, via libgccjit. It is used in Emacs to _Just-in-time_ (JIT) compile Elisp. Cranelift is another new option in this space, though it supports only few ISAs. For those who find LLVM or GCC too large or slow to compile, minimalist alternatives exist. QBE is a small backend focused on simplicity, targeting โ€œ70% of the performance in 10% of the codeโ€. Itโ€™s used by the language Hare that prioritizes fast compile times. Another option is libFIRM, which uses a graph-based SSA representation instead of a linear IR. ## Other High-level Languages Sometimes you are okay with letting other compilers/runtimes take care of the heavy lifting. You can transpile your code to a another established high-level language and leverage that languageโ€™s existing compiler/runtime and toolchain. A common target in such cases is C. Since C compilers exist for nearly all platforms, generating C code makes your language highly portable. This is the strategy used by Chicken Scheme and Vala. Or you could compile to C++ instead, like Jank, if thatโ€™s your thing. Another ubiquitous target is JavaScript (JS), which is one of the two options (other being WebAssembly) for running code natively in a web browser or one of the JS runtimes (Node, Deno, Bun). Multiple languages such as TypeScript, PureScript, Reason, ClojureScript, Dart and Elm transpile to JS. Nim interestingly, can transpile to C, C++ or JS. A more niche approach is to target a Lisp dialect. Compiling to Chez Scheme, for example, allows you to leverage its macro system, runtime, and compiler. The Idris 2 and Racket use Chez Scheme as their primary backends. ## Virtual Machines / Bytecode This is a common choice for application languages. You compile to a portable bytecode for a _Virtual machine_ (VM). VMs generally come with features like _Garbage collection_ , _JIT compilation_ , and security sandboxing. The Java Virtual Machine (JVM) is probably the most popular one. Itโ€™s the target for many languages including Java, Kotlin, Scala, Groovy, and Clojure. Its main competitor is the Common Language Runtime, originally developed by Microsoft, which is targeted by languages such as C#, F#, and Visual Basic.NET. Another notable VM is the BEAM, originally built for Erlang. The BEAM VM isnโ€™t built for raw computation speed but for high concurrency, fault tolerance, and reliability. Recently, new languages such as Elixir and Gleam have been created to target it. Finally, this category also includes MoarVMโ€”the spiritual successor to the Parrot VMโ€”built for the Raku (formerly Perl 6) language, and the LuaJIT VM for Lua, and other languages that transpile to Lua, such as MoonScript and Fennel. ## WebAssembly WebAssembly (Wasm) is a relatively new target. Itโ€™s a portable binary instruction format focused on security and efficiency. Wasm is supported by all major browsers, but not limited to them. The _WebAssembly System Interface_ (WASI) standard provides APIs for running Wasm in non-browser and non-JS environments. Wasm is now targeted by many languages such as Rust, C/C++, Go, Kotlin, Scala, Zig, and Haskell. ## Meta-tracing Frameworks _Meta-tracing Frameworks_ are a more complex category. These are not the backend you target in your compiler, instead, you use them to build a custom JIT compiler for your language by specifying an interpreter for it. The most well-known example is PyPy, an implementation of Python, created using the RPython framework. Another such framework is GraalVM/Truffle, a polyglot VM and meta-tracing framework from Oracle. Its main feature is zero-cost interoperability: code from GraalJS, TruffleRuby, and GraalPy can all run on the same VM, and can call each other directly. ## Unconventional Backends Move past the mainstream, and youโ€™ll discover a world of unconventional and esoteric compiler backends. Developers pick them for academic curiosity, artistic expression, or to test the boundaries of viable compilation targets. * Brainfuck: An esoteric language with only eight commands, Brainfuck is _Turing-complete_ and has been a target for compilers as a challenge. People have written compilers for C, Haskell and Lambda calculus. * Lambda calculus: Lambda calculus is a minimal programming languages that expresses computation solely as functions and their applications. It is often used as the target of educational compilers because of its simplicity, and its link to the fundamental nature of computation. Hell, a subset of Haskell, compiles to Simply typed lambda calculus. * SKI combinators: The SKI combinator calculus is even more minimal than lambda calculus. All programs in SKI calculus can be composed of only three combinators: S, K and I. MicroHs compiles a subset of Haskell to SKI calculus. * JSFuck: Did you know that you can write all possible JavaScript programs using only six characters `[]()!+`? Well, now you know. * Postscript: Postscript is also a Turing-complete programming language. Your next compiler could target it! * Regular Expressions? Lego? Cellular automata? ## Conclusion Iโ€™m going to write a compiler from C++ to JSFuck. If you have any questions or comments, please leave a comment below. If you liked this post, please share it. Thanks for reading!

I did a short survey of #compiler backends: https://abhinavsarkar.net/notes/2025-compiler-backend-survey/

#compilers #programming #pldev #langdev #blogging

05.11.2025 11:17 โ€” ๐Ÿ‘ 1    ๐Ÿ” 3    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Batman "This is the weapon of the enemy" meme format:

Batman breaking/shattering "GRADUAL TYPING" while saying "*THIS* IS THE WEAPON OF THE *ENEMY*.  WE DO NOT *NEED* IT.  WE WILL NOT *USE* IT."

Batman "This is the weapon of the enemy" meme format: Batman breaking/shattering "GRADUAL TYPING" while saying "*THIS* IS THE WEAPON OF THE *ENEMY*. WE DO NOT *NEED* IT. WE WILL NOT *USE* IT."

03.11.2025 17:58 โ€” ๐Ÿ‘ 41    ๐Ÿ” 2    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Notes for the Week #43 This week note covers the week of 20th-26th Oct. The Loovre * The week started with Diwali. We made a rangoli, lit lamps and decorated with lights. We had great food for breakfast and lunch. The sky was filled with fireworks. It was a lot of fun, especially for my little one. * I wrote a new blog post, concluding my โ€œA Fast Bytecode VM for Arithmeticโ€ series. Some friends have asked me how long it takes me to write these posts, so this time I paid attention. The idea came to me on 28th January 2025, and the series ended on 21st October 2025. So it took me about nine months from conception to end. I did about 70 revisions (commits) of the code, and about 50 revisions of the post text over the months. The end result was over 8300 words of text and 1700 lines of code. * I finally got the count of unread items in my feed reader below 1000. For a while, it peaked around 1800! * The traffic has been a dream this week. The stretch that took me three hours last week, took only 30 minutes this time. This amount of variation is crazy, to be honest. * Iโ€™ve been diving deeper into Jujutsu, and now Iโ€™m quite comfortable with it. I donโ€™t use most of its advanced features on my personal repos, but I still feel like it is much easier than Git. * I finished watching _City the Animation_ , and I absolutely loved it. Itโ€™s wonderful to see a wacky anime about nothing after a long period of remakes and rehashes. I greatly enjoyed the finale that unexpectedly turned into a musical. * Though my health has been improving consistently, this week I faced debilitating shoulder pain caused by my bad posture. I must constantly remind myself that Iโ€™m too old to work for hours in bad postures. Thankfully, the hot water bag and slow stretching helped, and now Iโ€™m feeling better again. * On to regular website updates: * Some friends gave me harsh feedback on the bad readability of the justified text of posts, so it is back to being left aligned. * I added popular posts and notes pages. * We visited some old friends this weekend and it was lovely to catch up after a long gap. We chatted for hours about all things in the world, including good breads, modern cars, investing for future, writing books, making personal software, and setting up routers. They gifted me some keycaps and now my old keyboard looks amazing again. Thatโ€™s all for this week. Write to me in the comments. If you have any questions or comments, please leave a comment below. If you liked this post, please share it. Thanks for reading!

I wrote a new #weeknote: https://abhinavsarkar.net/notes/2025-weeknotes-10-26/

#blogging #weeknotes

26.10.2025 15:59 โ€” ๐Ÿ‘ 1    ๐Ÿ” 2    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Original post on fantastic.earth

I've written a series of blog posts, in which I write a #bytecode #compiler and a #virtualMachine for arithmetic in #Haskell. We explore the following topics in the series:

- Parsing arithmetic expressions to ASTs.
- Compiling ASTs to bytecode.
- Interpreting ASTs.
- Efficiently executing [โ€ฆ]

21.10.2025 15:12 โ€” ๐Ÿ‘ 1    ๐Ÿ” 4    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
Exploring Arrows for sequencing effects Monads are <em>one</em> way to sequence effects, but they're not the only way!

Don't get too hung up on #Monads, there are other ways to sequence effects; including Arrows; and they provide even better static analysis!

Let me know what you think :)

#Haskell

chrispenner.ca/posts/arrow-...

21.10.2025 02:41 โ€” ๐Ÿ‘ 10    ๐Ÿ” 4    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Advice _I wrote this post for a prompt given during ourlocal Indieweb club meeting._ A brain-dump of advice I have for my present/future self: * Go for a walk at 8 PM. * Buy a bed. * Set more alarms. * Write down your daily plans on your palms. * Buy expensive shoes. * Put on shoes. * Get many online subscriptions. * Talk to your phone. * Fill your backpack with books. * Ask for advice and ideas. * Do what people tell you to do. * Go to paries uninvited. * Spend more money. * Learn Assembly. * Go for a walk at 6 AM. * Keep your water bottle in sight. * Make Lego towers. * Buy more domain names. * Jump on the bed (gently). * Donโ€™t get bitten by mosquitoes. * Eat greasy food. * Throw away your cloths. * Donโ€™t drive. * Use OverloadedRecordDot. * Stop talking. * Donโ€™t overdo any of the above. If you have any questions or comments, please leave a comment below. If you liked this post, please share it. Thanks for reading!

I wrote a new #note: https://abhinavsarkar.net/notes/2025-self-advice/

#blogging

18.10.2025 12:20 โ€” ๐Ÿ‘ 0    ๐Ÿ” 1    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
IndieWebClub Bangalore Website of the IndieWebClub Bangalore community

The website of #IndieWeb Club #Bangalore is finally up at https://blr.indiewebclub.org

19.10.2025 06:16 โ€” ๐Ÿ‘ 1    ๐Ÿ” 2    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Notes for the Week #42 This week note covers the week of 13th-19th Oct. A Desert Orchard * Bangaloreโ€”the city I live inโ€”is notorious for its bad traffic. I had a confirmation of it just this week, when I was stuck in a cab for **three entire hours**. The traffic jam made the news, like many such before it, but experiencing it first-hand was a crazy thing. As I sat there in the cab for three whole hours, hungry, thirsty, sleepy but unable to sleep, I became so distraught that it made me challenge my belief that Bangalore is a good city to live in. Something will have to change. * As they say, you are not stuck in traffic, you are traffic. So better learn how to drive in Bangalore by reading this great guide by my friend Kiran. Iโ€™ve been thinking of writing such a piece for years now, but Kiran did it better than I could ever do, so now I donโ€™t have to do it anymore. * I canโ€™t write about my work in details, but I can tell you that I hate shift-reduce conflicts now. * On health, Iโ€™m feeling better with every passing day. Strength, clarity and curiosity is returning to me in waves. * Ankur convinced me to try Jujutsu (JJ), the new VCS that everyone is talking about these days. I configured it on my websiteโ€™s repo, and it somehow deleted all the untracked files! After struggling for a bit, I fixed the repo by running multiple arcane Git commands (`reset/restore`, `for-each-ref`, `update-ref`). My strong suggestion is to deal with all the untracked files before you try JJ, by committing them to branches, or stashes, or adding them to `.gitignore`. JJ has no staging area unlike Git, and commits everything automatically. It also makes it easy to rewrite history, leading to lost commits. Together, they are a great recipe for losing untracked files. Iโ€™m starting to get a hang of JJ now after using it for few days. Iโ€™ve been working with Mercurial for the last six years at Google, so picking up JJ was quite easy for me, as JJ borrows a lot of concepts from Mercurial. The hardest part was abandoning the Git mindset of branches and rebases. * One Punch Man Season 3 is out! Iโ€™ve been waiting for it for six years! I canโ€™t believe it took such a long break, but then the last six years have been pretty terrible for the world so I can understand. * I attended another fun IndieWebClub Bangalore meeting on Saturday. This was a technical session and we had a lively discussion about: * The right domain name for the IndieWebClub Bangalore website. * Adding share buttons to websites. * Pros and cons of adding Open Graph tags to websites. * Rendering charts on server-side for blog posts. * Justifying text on internet. * Automation. We finally **launched** the IndieWebClub Bangalore website at blr.indiewebclub.org! I also wrote a note for the writing exercise. * Moving on to personal projects, I did some more polishing of this website this week: * I added Atom feeds for the Readings and Activities pages. * I added my latest photo to the homepage. * I fixed some styling to switch from using tables to CSS. * Perceptive readers may have noticed that the text in the posts and notes is aligned justified now. Let me know how you feel about it. * Some interesting things I read on the internet this week: * Modeling State Machines with Dependent Types in Haskell * How Rhyme Works (and Why) * All I want for Christmas is a negative leap second Thatโ€™s all for this week. Catch up with me in comments. If you have any questions or comments, please leave a comment below. If you liked this post, please share it. Thanks for reading!

I wrote a new #weeknote: https://abhinavsarkar.net/notes/2025-weeknotes-10-19/

#blogging

19.10.2025 07:13 โ€” ๐Ÿ‘ 0    ๐Ÿ” 2    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
A screenshot of Miniflux feed reader showing articles sorted by similarity.

A screenshot of Miniflux feed reader showing articles sorted by similarity.

Wrote some JavaScript code to customize #Miniflux #feedReader to automatically sort articles by similarity. Now I can read similar articles one after another easily.

28.09.2025 13:05 โ€” ๐Ÿ‘ 0    ๐Ÿ” 3    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Sorting by Similarity in Miniflux As mentioned by in a previous note, I have customized Miniflux, my preferred feed reader, to add custom sorting for the articles. Recently, I added another sorting option: sorting by similarity. I kept finding myself wanting to read articles grouped by their topics, instead of hopping from topic to topic while going through my feed. So I build it: Screenshot of the Miniflux reader showing articles sorted by similarity Screenshot of the Miniflux reader showing articles sorted by similarity Screenshot of the Miniflux reader showing articles sorted by similarity

I wrote a #note about adding similarity based sorting in #Miniflux #feedReader: https://abhinavsarkar.net/notes/2025-miniflux-similar-sorting/

#blog #programming

30.09.2025 15:40 โ€” ๐Ÿ‘ 0    ๐Ÿ” 6    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
Monads are too powerful: The Expressiveness Spectrum Monads are a useful tool, but what costs do we pay for their expressive power?

New blog post!

#Haskell is built on a foundation of Monads, but are they really the optimal way to sequence effects or should we keep looking for something better?

What's the big deal with Applicatives and Selective Applicatives?

Read on!

chrispenner.ca/posts/expres...

27.09.2025 04:02 โ€” ๐Ÿ‘ 29    ๐Ÿ” 7    ๐Ÿ’ฌ 5    ๐Ÿ“Œ 0
Steering Committee Retrospective Steering Committee Retrospective I am voluntarily ending my Steering Committee term early (I am only serving...

I wrote up a retrospective explaining why I ended my Nix Steering Committee term one year early

www.haskellforall.com/2025/09/stee...

17.09.2025 20:14 โ€” ๐Ÿ‘ 40    ๐Ÿ” 9    ๐Ÿ’ฌ 4    ๐Ÿ“Œ 0
PLP 3.6-3.7: Referencing Environments, Closures, and Macros
YouTube video by Jonathan Aldrich PLP 3.6-3.7: Referencing Environments, Closures, and Macros

How do first-class functions look up the value of a variable from an outer scope? Learn about referencing environments, closures, and macros in my latest Programming Language Pragmatics video!

PLP 3.6-3.7: Referencing Environments, Closures, and Macros - youtu.be/JBs4dY9nwOY

12.09.2025 13:16 โ€” ๐Ÿ‘ 63    ๐Ÿ” 13    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0

If you write a raytracer in Haskell, the camera must always point in the positive Y direction.

This is because Haskell doesn't allow downcasting.

12.09.2025 19:23 โ€” ๐Ÿ‘ 10    ๐Ÿ” 1    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
My Quarterly System Health Check-in

It is essential to periodically take a few steps back from the day to day and reflect on where we are against our strategic goals. If youโ€™re an engineering leader, a head of engineering, a director, or a VP, you likely have a recurring meeting to this effect.

In this post, I propose a structure for this operational exercise (complementing a business review) that lasts 2-4 hours, every month or quarter. I see quality as solving for the Pareto front with the tangible dimensions of reliability, performance, cost, delivery and security, and the more intangible dimensions of simplicity and social structures. For each dimension, go through the list of questions below and try to answer them together.

My Quarterly System Health Check-in It is essential to periodically take a few steps back from the day to day and reflect on where we are against our strategic goals. If youโ€™re an engineering leader, a head of engineering, a director, or a VP, you likely have a recurring meeting to this effect. In this post, I propose a structure for this operational exercise (complementing a business review) that lasts 2-4 hours, every month or quarter. I see quality as solving for the Pareto front with the tangible dimensions of reliability, performance, cost, delivery and security, and the more intangible dimensions of simplicity and social structures. For each dimension, go through the list of questions below and try to answer them together.

I've been poking Srihari, our most experienced engineer @nilenso.com to share his hard-earned knowledge for the benefit of others.

Even if you're not an engineering leader like me, this checklist gives a lot of insight into what makes a great engineering org.

blog.nilenso.com/blog/2025/09...

12.09.2025 06:32 โ€” ๐Ÿ‘ 2    ๐Ÿ” 2    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0