Archives: March 30, 2023

A journey through the the jungle of programming languages and technologies

Today I’ll kick off the first micro post with something I have learned recently.

Sometimes the right tool for the job is the not the perfect, most flexible or even pleasurable to use. I have spent years searching for good programming languages which are powerful, expressive and a joy to develop in, while also being productive in a business context where shipping is key. To this end I have dabbled in more languages than I can list off. To give you an idea I’ve used C#, C, C++, Rust, Lua, various Lisps, various smalltalks, Python, Javascript and much much more. Looking at this list, it might look like I was looking to try as many languages as possible rather than searching for a good one. And you wouldn’t be wholely wrong. I try to commit to exposing myself to new ideas and ways of thinking, which means using as many different languages as tools as I can to learn from their different philosophies.

At the end of this exploration I have enriched myself with several new ideas. Some of the ideas include: first class functions, OOP in the smalltalk way, metaprogramming with macros in lisp, ducktyping, runtime polymorphism, DSLs. I also have 10-30 prototypes built in all of these systems. They’re mostly throw away code, but the experience in writing the code and learning how to solve the same problems in different ways has left me with a lot of solid fundamental programming knowledge.

For now, I’m going to take a break from exploring new languages, and spend some time building my ideas in Javascript. I’m definitely not the first person to pick Javascript for a project. However, putting on my thinking cap and looking at the timelines and business needs I can’t deny that you can accomplish a lot by leveraging the Javascript community.

To give you an idea of what I am working on, I want to build a powerful personal knowledge management tool that has a dead simple user interface and fun user experience. I think that learning is a lot of fun, and there is a lot we can do to enrich the experience through technology.

Starting a new thing: writing micro posts

Today I want to make a commitment to making one micro post every week for the next few months.

I have many ideas for blog posts, and many things to share. But I keep holding myself back by thinking that my posts might not be useful, or just a waste of effort. After seeing many others who are just writing and being authentic, I will now try to do the same. I will mark all of these posts with the tag “micro”.

How to build Emacs with JIT on Ubuntu 20.04

Editing the Emacs source code using emacs.

Emacs is a text editor that was initially released in 1976. It is widely used by many who enjoy a programmable, moldable computing environment. A recent addition to Emacs brings improved performance using just-in-time compilation. This feature is referred to as native-compilation, and leverages the GCC compiler. This post will provide instructions for building emacs 28.1 on Ubuntu 20.04. The instructions should be very similar for any Debian-based distribution. For those interested in learning more about emacs and the technical details of the improvements, please refer to the links at the bottom of the post.

Open a shell and follow along with the commands below.

Enable Source Repositories.

# Become root.
$ sudo su -
$ sed -i '/deb-src/s/^# //' /etc/apt/sources.list && apt update
# Exit root.
$ exit 

Install dependencies

$ sudo apt -y install software-properties-common ca-certificates
$ sudo apt build-dep -y emacs
$ sudo apt install -y gcc-10
$ sudo apt install -y libgccjit0 libgccjit-10-dev libjansson4 libjansson-dev gnutls-bin
$ sudo apt install -y autoconf git make
$ sudo apt install -y libgtk-3-dev libwebkit2gtk-4.0-dev

Clone the emacs source code

$ git clone
$ cd emacs
$ git checkout emacs-28.1

Build emacs

# Set your compiler.
$ export CC=/usr/bin/gcc-10
$ export CXX=/usr/bin/gcc-10
# Prepare the build
$ ./
$ ./configure --with-cairo --with-xwidgets --with-x-toolkit=gtk3 --with-native-compilation
# Build and install.
$ make -j$(proc)
$ sudo make install

Now you can start the application by running the command emacs in a terminal.

Further Reading

Introductory Post

Welcome to my Blog

It’s me!

My name is Rafi Khan, and I am a passionate human who is devoted to making the world a safer, better place for everyone. I could go on about the places I have lived, people I have met and projects I have been involved in. But rather than a biography, I’d like to give you a sense of some of the themes that are prevalent throughout my life and my work.

As a concerned human, I look around me and see that we live in a prosperous world, but not a prosperous society. I believe the reason for this disconnect between opportunity and reality is that we prefer to look out for our own needs instead of functioning as a team/community.

Earth is plagued by divisions, everywhere we look. They may be based on skin colour, language and geographical border. As a society, we place more weight on power and wealth, than we do on justice, fairness and critical thinking. I want to work together to better understand each other and the problems which continue to plague our societies. In this collaborative fashion, we can move forward to rebuild ourselves as responsible, conscientious habitants of Earth and the Solar System.

Continuing to write, after several failed attempts

For a long time, I have wanted to become an active blogger. I have created and developed many profile pages and blogs over the years, but have found it difficult to write consistently. I could point to the usual distractions in life, work, family, school and other hobbies. But really the reason I was distracted from writing, is that I found the technical challenges of setting up a blogging system to be much more personally gratifying. I felt more productive configuring and customizing the blog. This time, I opted to purchase a managed WordPress subscription1.

After spending a few days configuring a basic blog with sane defaults, I am ready to write!.

How to reach me?

The best way to reach me is to shoot me an email at [email protected] or fill out the contact form.

  1. I am using the $1/month Managed WordPress offering from IONOS: []