Guru Das Srinagesh

https://gurudas.dev/ (RSS)
visit blog
Nand2Tetris - Project 7 (VM Translator Part 1)
1 Jan 2025 | original ↗

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...

TIL: The fzf fuzzy finder is amazing
15 Dec 2024 | original ↗

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...

Nand2Tetris - Project 6 (Assembler)
14 Oct 2024 | original ↗

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...

Nand2Tetris - Projects 4 to 5
28 Aug 2024 | original ↗

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...

TIL: Execute current line in vim
30 Jul 2024 | original ↗

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

Build your own shell - Codecrafters style
29 Jul 2024 | original ↗

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 - Projects 1 to 3
13 Apr 2024 | original ↗

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 ... →...

TIL: Easily cycle through all open tmux sessions
30 Mar 2024 | original ↗

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...

TIL: Show current C function in vim status line sans plugins
13 Mar 2024 | original ↗

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 ... →...

TIL: How to unify all three of Ubuntu's clipboards
3 Mar 2024 | original ↗

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...

Fun with git rebase --interactive
3 Dec 2023 | original ↗

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 ... →...

How I used git rebase --onto
10 Nov 2023 | original ↗

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 ... →...

Learning Go
19 Sept 2023 | original ↗

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

Configuring the Visual Studio Code vim extension
2 Sept 2023 | original ↗

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

Script to add maintainers to a Linux kernel patch
16 Aug 2023 | original ↗

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...

↑ These items are from RSS. Visit the blog itself at https://gurudas.dev/ to find everything else and to appreciate author's digital home.