Skip to main content

Visualize C++ Data Structures using Graphviz and the DOT language

· 9 min read

Data structures help structure and organize data effectively, and provide several abstracted operations on the data. They are elegant and convenient, and computer scientists love to use them. Implementing these data structures in the computer require the programmer to flatten the structure into a one-dimensional model using pointers or references because the memory is actually arranged as a one-dimensional run of data elements.

It is often necessary to inspect the data structure in debugging and program verification phases. But some data structures happen to be particularly graphical, in that they have multiple associations and elaborate hierarchies or layers. Think of a Rope or a Graph. Due to many associations between nodes, it's not possible to properly display the graph on the terminal.

How to Daydream

· 5 min read

In the classroom, the teacher drones on and on in his maroon colored t-shirt that doesn’t suit him. His empty vibrations ripple through out the room, bouncing off the glass windows shut tight against the summer breeze, mixing with the clickety-clack of the ceiling fan to create a subtle dissonance, and stretching indefinitely and interminably in time and in space.

On the Nepali Language and Unicode

· 12 min read

The Nepali language gets very little representation on the internet. Take, for example, the Nepali Wikipedia which has about 33 thousand articles. The Esperanto Wikipedia boasts 8 times that number (at around two hundred thousand articles), which is kind of sad, because Esperanto is an artificial language created by one person in the 19th century. It is spoken by a meager 2 million people worldwide. Compare this to the Nepali language, which has more than 25 million speakers.

Sandboxing Unsafe Executables in Linux for an Online Compiler with Minijail

· 9 min read

I wrote a toy compiler few months back. I wanted people to see it, so I put the code up on Github. But as it turns out, not everyone is willing or capable of going through the convoluted process of cloning the repository, compiling the program, installing a Nepali language keyboard and learning an obscure half-baked programming language just because some idiot put it on Github.

So, I started to write a web app to make the program easily accessible. The web app lets user write code in their browser, then compiles and executes the program on the server, and allows the user to send input from the browser to the server as it executes.

Animating WALL-E on a LED dot-matrix display with AVR

· 10 min read

I was asked to animate a dot-matrix display for the robotics club recently. They wanted something that said "Robotics Club" to hang over their door. We had some old P10(1r) DMDs which I had worked on in the past to make a little scoreboard for a robot football match. And, even though I am not very good at it, I really love animating things. So I decided to give it a shot. I ended up writing an animation software for the DMD in JavaScript which is unfortunately only as functional as a flipbook. But I had fun animating little person carrying a balloon, ugly gear trains and a little pixel Wall-E blinking.

Animating a Skeleton in Pixel Art

· One min read

I animated this a while back. I remember it took me days. First I had to learn how to actually draw the human skeleton (The Atlas of Human Anatomy for the Artist by Stephen Peck is an amazing resource). Then I had to distill the ideas into the bare minimum required to get the picture across. Finally I drew and animated the whole thing in piskel. The animation process was quite tedious, at least in part because this was my first try.

Maybe those really were the good old days

· One min read

This line popped in my head yesterday with no context whatsoever. Then I spent the next many hours trying to remember where I'd read it. The answer came just as suddenly. This line is from the book "Hear the Wind Sing" by Haruki Murakami.