Emacs Custom Compilation

One of the convenient things I quite like about Sublime Text is the easy to setup build system1. It is pretty easy to add a custom build setup with Sublime Text, to compile a single C++17 source file, for example. Once configured it is very efficient and keyboard friendly to compile and run a C++ program with a single key press, F7 with default key bindings. This blog post is about how to configure Emacs in a similar vein....

April 20, 2020

Rust Cookbook

Rust is quite an exciting programming language from two points of views for me. On one hand there’s strong influence from functional programming lanugages, such as OCaml, in Rust to feel like an expression oriented language with pattern matching1, algebraic data types2 etc. Then there’s also the focus on zero cost abstractions3 in Rust which makes it possible to be competitive with C/C++ when it comes to performance4. Even though C++ is no longer a stagnant language, Rust is increasing a very good option already where former is dominating currently, at the very least for greenfield projects....

February 9, 2020

Semantic Patching with Coccinelle

Changing existing code in a software program is one of the most common things software programmers do in their day to day jobs. For a well maintained piece of code such as the Linux kernel the frequency of changes could be quite high, and pervasive changes touching a more than double digit source files are not that rare. Patch1 is a set of changes to a program. Patches, as shown in the following example, contains + indicating lines which are to be added and - indicating lines which are to be removed....

January 25, 2020

A Poem in Prolog

For Want of a Nail I thought it would be fun to translate a poem, For Want of a Nail which has an interesting history1 which I came across while reading about The Five Whys2 technique. The version of the poem reproduced in this post is attributed to Welsh poet George Herbert3. This is a poem which illustrates The Five Whys analysis to find the cause-and-effect relationship underlying a problem in an easy to remember form....

October 1, 2019