Posts in programming


TIL: File Uploads Using the Req Elixir Library
• 1 min read

The Req Elixir library doesn't support file uploads(as of version 0.4.5). Instead, you need to use multipart to construct the HTTP request before you send it.
Continue Reading »

TIL: Creating `sentence-transformers` Embeddings From Bumblebee
• 1 min read

One amazing thing about the Elixir machine learning ecosystem is that you can run state-of-the-art ML models right from Elixir. You can go pick your favorite Hugging Face model and get it running without any ceremony.
Continue Reading »

WebAssembly branching instructions, by example
• 6 min read

I have been familiarizing myself with WebAssembly by writing small WAT files and looking at the WASM output for some simple C functions. [WebAssembly Studio] is a great tool for doing this kind of exploration.
Continue Reading »

On porting code
• 3 min read

Of late, my main side project has been rug, a stripped-down Git implementation which I'm building in Rust. I'm following along James Coglan's excellent book Building Git where he lays out how he went about building the same project, in Ruby.
Continue Reading »

Piping output to a pager
• 3 min read

When you run git diff on a project where you've made more than a screenful of changes, the output is automatically redirected to a pager and you can browse through your changes using the familiar less interface. This post shows a minimal example piping output to less.
Continue Reading »

Myers' Diff Algorithm in Clojure
• 13 min read

If you're a programmer, you're probably fairly comfortable with understanding and interpreting diff patches of the kind that git and other version control systems use. In this post we'll walk through a Clojure implementation of the Myers' diff algorithm, which is the algorithm used by Git.
Continue Reading »

Building a database-backed Clojurescript app
• 9 min read

In my previous post, I gave a pretty quick introduction to Clojurescript. If you haven't already, I recommend you read through that post. This post assumes that you have some Clojure knowledge and already have Leiningen running.
Continue Reading »

Getting started with Clojurescript
• 8 min read

There doesn't seem to be much written about running Clojurescript, especially considering how great a tool it really is. I know there is a book that's coming out soon, but I had some trouble getting started with Clojurescript so I decided to put together this post, that hopefully at least some of you will find useful. This post does as...
Continue Reading »

Fighting an N-headed monster with recursion
• 2 min read

A while back, I came upon this problem:
Continue Reading »