MiniLisp C++: A Compile-Time Lisp Interpreter in C++20
TL;DR: I built a Lisp interpreter that evaluates expressions at compile-time using C++20 constexpr. The same code works at runtime too—no duplication needed. Along the way, I discovered that macOS adds ~28KB of constant overhead to all C++ binaries, and that Mach-O is surprisingly more efficient than Linux ELF for small programs. Try it right now — this runs the same interpreter compiled to WebAssembly (27KB): Lisp Expression: Eval Result: Loading WASM... Try: (* 6 7) · (car '(10 20 30)) · (cdr '(1 2 3)) Some weeks back I saw that Dan Lemire had a PR open on simdjson that added an expression to parse whole JSON. That intrigued me and took the challenge to see if I could write a LISP Interpreter. Here’s a minimal godbolt playground if you’re interested to play around. I don’t have this problem as much anymore but I used to need a little DSLs in programs all the time. Maybe long term Lua is right choice but I can see something like this to be useful in a very small form factor like some kind of verified binary that you want to minimize your dependencies and adding a whole new lib will add more complexity. ...
Neovim for Blog Writing: Plugins, Keymaps, and a Cheatsheet
My Neovim config has always been coding-focused—LSP, treesitter, language-specific keymaps for Zig, Rust, and Go. But I recently wanted to use the same setup for writing blog posts. Here’s what I added to make Neovim a solid prose environment. The full config is at github.com/prasincs/vim-config. Writing-Focused Plugins Zen Mode zen-mode.nvim removes distractions by centering your buffer and hiding UI elements. { "folke/zen-mode.nvim", opts = {}, keys = { { "<leader>z", "<cmd>ZenMode<cr>", desc = "Zen Mode" }, }, }, Press <Space>z to toggle. The buffer centers itself, line numbers fade, and you’re left with just your text. ...
Don't Unwrap in Production: A Formal Verification Guide
TL;DR: On November 18, 2025, Cloudflare had a ~3-hour global outage that traced back to a Rust panic triggered by a single .unwrap(). Tools like Verus can force you to prove that an unwrap() can’t panic before code ships. This post explains how Verus’s built-in specs for Option::unwrap() and Result::unwrap() work, with examples you can run today. The Bug On November 18, 2025, Cloudflare experienced a ~3-hour global outage. The immediate cause was a panic in Rust code that looked totally reasonable in a quick review: ...
Getting sorted list of images from Amazon ECR
I recently switched from using own hosted Docker Registry to the amazon hosted Elastic Container Registry and found that the UI, well, sucks. The results aren’t returned in any kind of sorted order and the UI doesn’t help you do that. In addition, it’s the same issue with the cli tool. I wish they included a timestamp field to know when the layer/image was created but in absence of that, the image tag are the best we have to go with. ...
Proxy Aware Http Client in Go
I keep running into situations where I find myself at a cafe or something where I’d rather not send all my traffic through work VPN. So alternatively, I use a SOCKS5 proxy for that. That works well for browsing, etc but what about applications I’m developing as well. Thankfully Go has a library that makes proxy aware http Clients really easy to write. It’s not executable, but I uploaded my example on Go Playground. https://play.golang.org/p/NWfG9b5GIN ...
Mesos Development Environment Installation and setup
Table of Contents 1. Mesos Development Environment Installation and setup 1.1. Questions 1.1.1. Why do you want to run Mesos? 1.1.2. What Frameworks are you going to run on Mesos? 1.2. Background Readings 1.3. Pre-requisites (Development Environment) 1.3.1. Zookeeper 1.3.2. Mesos Masters 1.3.3. Mesos Slaves 1.3.4. Testing this Cluster with Spark I realized recently that I have a somewhat non-standard setup for running/testing Mesos on my OSX system. Initially, I started this to see how well Mesos compiles on OSX, but given that this setup has worked fine for me, I’ve been running it. For a more accurate benchmark, I recommend running in VMs or some cloud provider. ...
Importing Open Data Files to JOSM
Following on my previous post on Getting Starting with Open StreetMap for Nepal, I wanted to look at the open datasets and GIS shapefiles that people have been sharing. Given the lack of additional data and poor satellite image resolution, being able to delineate Village Development Committee (VDC) would be great help, in my opinion. Here’s how to setup the JOSM tool to do so. We’ll get the data from HDX Data repository in the form of zip files to open in JOSM. ...
Getting Started with Open StreetMap for Nepal
As you must be well aware of the enormous toll the earthquake has taken for Nepal by now, there’s still work you can do to help the boots on the ground doing rescue work by helping map the affected regions. Basically, outside of major towns and cities, Nepal’s landscape is very hilly – there are few if any roads to most villages. It doesn’t help in rescue efforts now that all the villages are reduced to rubbles. If there are people stranded in these remote locations, knowing where the houses, residential areas are would expedite the process for rescue efforts. You would be looking at satellite images of the region and labeling whether a particular item is a path, road, house, or anything else. It requires paying attention to roads and having a general sense of what could be accessible. ...
Running a dev version of docker
I have recently been working on fixing some personal pain-points for Docker. It came about because of a course I am taking at UConn this fall on Troubleshooting Distributed Systems - Excellent course by the way. The current issue I’m looking at is the one about logging. Yep, I somehow managed to volunteered to do this in a month with a full-time job and 4 hours a week of driving back and forth from UConn. Anyway, I needed to run a dev version of Docker in my local machine alongside the stable version. I’m on a mac running boot2docker. There are other ways to do this but I find boot2docker sufficient for almost all the work I’d want to do in this case. ...
Simple Pandoc process
So, I recently signed up for a Distributed Systems course at UConn (http://www.engr.uconn.edu/~mok11002/public_html/cse5095_fall2014.htm). It involves a lot of reading and writing reviews. I have always written these class assignments in LaTeX except when I have been expressedly forbidden from using it. However, there’s a whole gamut of problems with writing in LaTeX directly. Partly, you may not always be in a place where your environment is sane. So, being able to store as plaintext/markdown would be awesome. Here’s what I do for the reviews: ...