Some years ago I kept dreaming about a simplistic terminal diary manager. Each diary entry would be a markdown file called YYYYMMMDDD.md , they would be viewed in the terminal using a Markdown renderer, and they would be edited using $EDITOR . A keybinding would allow for creating a new entry for today, and so forth. The UI would look something like this:…
Shell history and browser history, I could do without one but not the other! I have no shame in admitting I’m very reliant on my shell history for getting things done on the command line. Ctrl+R , augmented via fzf , has become one of many secondary brains of mine. But there’s one curious thing about it! Shell history has no practical way of filtering results besides string matching. That’s where…
I’ve been meaning to move away from Github Pages to some other hosting provider. Well, now that’s done, the pages are hosted on sourcehut pages , where the code for the site has already been hosted and deployed from since early 2021. At long last, I’ve become a paid customer of sourcehut . I’ve been meaning to do this for quite some time, but I’ve too lazy to set it up. Given that it’s just a…
Holy crap, it’s been five years ! Time passes so quickly. What can happen in five years? Well, during these five years I met my wife, we moved not three but four times, we bought our own apartment, our daughter was born… many things indeed! Here’s to hoping the next five years will be as fun and exciting. On this site I’ve posted twenty something blog entries plus a smattering of other writings.…
For the past month or so I’ve been contributing to GNU Recutils , a set of tools for editing human-readable plain text databases. It’s a cool project in its own right, I’ve been using recutils myself for tracking workouts and storing cooking recipes. The cool part of it is its attempt to be both human-readable and machine-readable, which makes it very easy to use programmatically and then with a…
The other day I was playing around with the Meson build system for building GNU Guile projects. It was actually a lot of fun, Meson build files are in my opinion much easier to manage than Autoconf , although Autoconf the de facto build system for Guile. It was all fun and nice until I ran into a problem with running unit tests using meson test . Meson expects unit tests to return exit code 1 to…
Git was initially designed around emails. Modern Git forges have co-opted the term pull request to mean using web-based applications for collaborating using Git. This has become the de facto method of collaboration in the Git world. Before that happened, people actually used plain emails when working with decentralized version control system. There was no notion of requiring a web application for…
Some readers might have noticed a new section appearing on the front page . It’s just a simple heading with a list of sections outside the blog . This is because I’ve for a long time felt that the blog format doesn’t feel right for informative or lengthy writing. That is, I’d much rather prefer my blog to be just a simple journal I don’t have to think too hard about, since I find it reduces my…
The microblog is no more. I got this idea due to a sudden realization: there is no minimum length to a blog post. Any microblog post was just a short blog post. Perhaps the idea with it was to participate in the IndieWeb zeitgeist, but in the end I realized I’m not interested in posting that much short-form content. Twitter is just noise, why would any federated version of it be less noise? So,…
Out of all Lisps the ones I’ve come to appreciate the most are Scheme and Common Lisp . These two languages are fundamentally very different: Scheme is a minimalist language built on the foundations of lambda calculus , while Common Lisp is a multi-paradigm synthesis of many Lisps before it. Common Lisp is a large standard with many implementations, Scheme is a collection of an evolving but…
Sometimes people ask me (well, one person did) how I actually author content on this site and also how I maintain and host it. Essentially, it’s a run-of-the-mill Jekyll site hosted on pages.sr.ht . The following explains how all of this came together. Origins About five years ago I realized I wanted to have a website again. Yes, again , this wasn’t the first time I had had a website. I think I…
While I initially began using mu4e, I was initially pleased by it, but then I found out about Rmail . Rmail is kind of like the standard Emacs email reader. Gnus is pretty comprehensive in terms of features but I was kind of put off by its complexity. So, eventually, my setup became the following: offlineimap to synchronize an IMAP mailbox on my machine Rmail configured using a maildir where…
One of the most interesting aspects of programming is the ability to inspect and modify programs while they are running. We all know debuggers, but there are lots of programs which let you interact with them directly while they are running. Some programs let you run scripts via embedded interpreters, which let you extend the program, but in some instances the programs themselves are the…
I find it curious I can get paid for programming and still practise programming in my spare time and it feels like fun. It doesn’t stress or tire me at all. Superficially, the line between what is work and what is fun is not that obvious. I’m at a computer, bashing its keys, programming it to do what I want. Of course, at work I program the computer to do different things, but you’d have to know…
Earlier this year, in May or so, I started having fun with hobby electronics, and ended up playing around with Rust in embedded devices, microcontrollers and the like. Actually it’s the other way around, I first wanted to write some Rust, and found out that Rust has a thriving embedded ecosystem, and proceeded to buy some microcontroller dev boards (and upgrading my “lab” equipment from 2003), and…
A feature that often frustrates me in object-oriented code is the prevalence of useless interfaces. Interface isn’t meant literally here: this applies to traits of Rust/Scala and protocols of Clojure as well. The advice of planning for the interface is just and solid, but people tend to follow this tip to the extreme. It is not uncommon to see people design a module or class by defining its…
Scala gets lots of flak for implicits. Some of the feedback is justified: implicits in Scala can be quite intimidating or confusing for beginners. That does not justify their dismissal, as implicits, in all of their flavours, when used correctly, can be actually quite simple and powerful. I recently had to do a refactoring for large program. The codebase was old, and wasn’t designed to cope with…
Apache Camel is a routing and mediation engine. If that doesn’t say anything to you, let’s try this: Camel lets you connect endpoints together. These endpoints can vary. They can simple local components, like files, or external services like ActiveMQ or web services. It has a common language format for the data, so that your data can be protocol agnostic, and an intuitive DSL for specifying the…
In my previous post, I discussed how web development had become weird . In this post, I will discuss what exactly is it that makes it so weird. I will also present an alternative to JavaScript-based SPAs that look and behave like them, yet at the base are built using standard full-stack frameworks. They can leverage modern JavaScript libraries like React and compilers like Babel while…
Call me old-fashioned, call me a curmudgeon, but I think web development has become stupid and superficial. The unending quest towards single-page apps (SPAs) has made web development extremely painful and the current trend is diverging towards seven different directions at once. On one end, we have rich SPAs that can be built as native applications, on the other we have something completely…
In Scala, Akka actors, as in the traditional Actor model , may modify private state. The accepted convention is to have a mutable object (e.g. a Map ), a var , and mutate it like so: class Library extends Actor { var books = scala . collection . mutable . Map . empty [ String , String ] def receive : Receive = { case AddBook ( isbn , title ) => books += ( isbn -> title ) } } object Library { case…
Focus is a design element in programming languages that I think deserves more attention than it gets. A focused language puts emphasis on a set of coherent idioms. Multi-paradigm languages like C++ or C# are unfocused because they lack a certain principle. Take C, for instance. You can do OOP in C, but it’s awkward. You need structures full of function pointers and the language wasn’t designed for…
What is the point of abstractions? We want to hide things. We want to generalize things. We want to extend things. Why are mathematical abstractions so intractable? Why is the Wikipedia page on functors incomprehensible to someone not used to mathematical formalisms? Why does it sound so vague? When approaching abstractions, for educational purposes, it is sometimes easier to think of analogies or…
I am faced with an interesting thought experiment, which asks: If I can see two of my friends, and I know they should be communicating to each other, what is the simplest way of making sure they are doing so? Your first instinct is to look at them and listen . What if the communication method is subtler than that? What if you are, metaphorically speaking, deaf , and cannot eavesdrop on their…
The expression problem is a famous problem in programming languages. “The Expression Problem is a new name for an old problem. The goal is to define a datatype by cases, where one can add new cases to the datatype and new functions over the datatype, without recompiling existing code, and while retaining static type safety (e.g., no casts).” Using interfaces (like in Java) as the datatype example,…
Now that the design of the site is finished, I can finally focus on the essentials. I’ve decided that this year I will be writing a bit more, here, and elsewhere. To that end, when it comes to this site, I’ve had to perform a simple but challenging task: lowering my standards. Last year, I did not publish anything because I had absurd standards for content. In my mind, every blog post had to be a…
Software development tools are in a state of flux. There are two competing directions towards which static analysis tools—like linters and type checkers—are heading. The traditional direction is to operate in a batch model. Fire up, perform analysis, report results, and die. This is a proven method. Batch-oriented software has been around for ages, and it works really well if the data you’re…