Project 7 of Nand2Tetris is about translating virtual machine 1 (VM) commands for the Hack computer platform to a series of Hack assembly language (asm) instructions. The main focus of this project is determining the sequence of assembly language instructions corresponding to each VM command, given that the programming model of the computer is...
fzf is a general-purpose fuzzy text matching tool at its core that takes in a list of newline-separated text and allows the user to search for something within those lines and select one or more of the lines by typing just a few character sequences into a search field. It is highly customizable and the maintainer seems to have a ... → Continue...
I wrote a two-pass assembler for the Hack assembly language! This is the sixth and final project of the first half (Hardware) of the Nand2Tetris course. In Project 6, the task is to write an assembler for the Hack assembly language. Unlike the previous projects which could only be written using the custom hardware description language (HDL) used...
Continuing from where I left off in my Nand2Tetris journey, I went ahead and completed Projects 4 (Machine Language) and Project 5 (Computer Architecture) and I now have "built" my very own Hack computer from scratch! Follow my progress on Github here: guru-das-s/nand2tetris. Project 4: Machine Language This project introduces the Hack...
I write a lot of notes in Markdown on a daily basis as a sort of personal wiki. Almost all of them contain code snippets - shell commands, mostly. Today I learnt that there is a much better way to directly execute a shell command listed on its own in a single line in vim. Two ways, in fact. The first ... → Continue reading
I created my own shell in Rust using the Codecrafters Build your own shell challenge. As part of my ongoing efforts to learn by doing, I came across the course on LinkedIn and resolved to try it out using Rust, another goal of mine. Here's my experience of completing the challenge, and also my thoughts on the Codecrafters platform as ... →...
Nand2Tetris is a very interesting "learning by doing" free and open-source course that enables one to learn how a computer is designed from the ground up, and also how it is programmed from the very lowest of levels. It is a fantastic course offered in two parts (first building the hardware for the computer, and then the software) and is ... →...
My tmux workflow thus far has been strictly windows- and panes-based, meaning I usually launch only one tmux session and then create named windows and panes (horizontal and vertical splits) as necessary to deal with the set of projects for the day. While this works well, things get quickly out of hand when there is some firefighting to be done...
I primarily work on the Linux kernel (which is written almost entirely in C) and I frequently find myself needing to know which function I'm currently in while browsing the codebase. There is, of course, the dictum that functions should be as small as possible and not more than a screen's length long; this is mostly just a guiding principle ... →...
Yes, you read that right - Ubuntu (which uses the X server) has a grand total of three clipboards: As the Inter-Client Communication Conventions Manual (ICCCM) explains: Selection Atoms There can be an arbitrary number of selections, each named by an atom. To conform with the inter-client conventions, however, clients need deal with only these...
This is the second in a series of blog posts related to some powerful features of git I've used over the years. Previously, I wrote about git rebase --onto which you can read here. git offers many powerful features, and one such feature I have used extensively in kernel development is git rebase --interactive. Here is what the man page ... →...
On one of my daily trawlings of Hacker News, I came across Julia Evans' blogpost on confusing git terminology that lists git rebase --onto as one such confusing command. I had never used this --onto flag before and her description didn't really help me visualize the problem or the solution. I shrugged and let it go, not thinking much of ... →...
I recently had to learn Go. I was on a tight timeline of just about 4 or 5 days. I am familiar with learning Rust, and Rust by Example, so I found Go by Example. I found the format wanting for the absolute beginner level I was at, so I found the absolutely beautiful A Tour of Go instead. It ... → Continue reading
I just installed Visual Studio Code (VS Code) on my Arch Linux machine, and one of the first things I did was to install the vim extension. I love vim and so I needed its keybindings in VS Code. But it was missing a couple of features I wanted, so I enabled them. The shortcut to summon the Settings page ... → Continue reading
Introducing add-maintainer.py I worked on adding a new script to improve the workflow of developers contributing patches to the Linux kernel. Here it is: [PATCH v2 0/1] Add add-maintainer.py script - Guru Das Srinagesh Its fate is yet to be decided - it's only at v2 now, and looks like there is already a mature tool named b4 that ... → Continue...