Arrow of Code

Scribblings from a physics nerd...

Drawing an ASCII sketch

Every once in a while, I get a (seemingly) nice and interesting idea (thanks to a wonderful female creature, who’s always been my muse), and whenever I get one, I go straight to researching more about it, allocating most of my free time, so that I finish it up ASAP and show it to her. Last time, it was a CSS spewing thingy. This time, it was about generating an ASCII sketch of a picture.

I’m sure you’d have seen all those “Image to ASCII converter”, “ASCII art generator”, and all sorts of boring variants of this online. But, I’ll tell you where they all fail and how I managed to bring up a decent sketch in ASCII. It took me about 3 hours to come up with a basic sketch, and then a few more for making it more generic and launching it in Heroku.

Exploring the human genome (Part 1)

You may already know that my work in bioinformatics is mostly, well, research. All these months, I’ve been writing little tools in Rust (things that help speed up some boring analysis). These days, I’m involved in something new, something very interesting! Before we get into all that, I’ll try to give a general overview of the flow of data (without going way too much into biology), what kinds of data we deal with, how we analyze it, where I come in, etc., starting from this post.

Three months...

It’s been 3 months since I’ve blogged. A lot can happen in 3 months. Someone who was once close to you could leave you, your dad could lose his job (trembling your financial support), you could get to the point when you’ll no longer want your bachelor’s degree, etc.

In the midst of this, wonderful things can happen too - you could get invited to the awesome Mozilla “All Hands!”, where you get to see all kinds of interesting people from allover the world (including the ones you’ve been chatting in IRC), you get to hang out with them, you get to live with them for a week, FUN!!! 1

And, once you get back, you get the promise of a superior distraction - a nice little project that could keep you distracted for months!

You see? Balance!

Anyway, I’ve planned to write a bunch of posts about my work in bioinformatics, especially the project I’m involved in right now. I’ll make sure that they’ll be interesting by having a mixture of bio-stuff and coding. See you until then…


  1. Well, you could also get allergic to sea food (lobster, in my case) and get “hives”, but meh

An easy bug in Stylo...

While my new job demands writing backend tools in Rust, I get a lot of free time every once in a while, when I fiddle around Servo’s code. Lately, I got interested in Stylo.

Stylo is interesting enough for it to need a whole writeup about itself, but this post is just about an easy stylo bug, which then turned slightly ugly. Well, it’s no big deal, since developers usually deal with this kind of thing every day, but since it’s an easy bug, I thought it might give some ideas to the newcomers (to stylo) about where to look when hacking on stylo, and to keep pushing and not give up if an easy issue becomes less easy…

New job! New field of science!

It’s been about a year since I’ve blogged. A lot of stuff has happened in the mean time. I became a reviewer for the Servo browser engine - especially the python code (which felt good), attended a flight training program at IIT, Kanpur (which was pretty fun), had a war with some of the professors (which has postponed my bachelors degree, meh), and now I’m working for a bioinformatics company, writing production code in Rust (which is cool!).

100 shades of green: The journey of a coder...

I’ve been coding for about a year now. I’ve danced with Python (a lot!) and nowadays, I’m playing with Rust, although I’ve also done some basic C & Javascript. Anyways, I get a lot of questions from my fellow undergrads about how I got into coding in the first place, and yesterday, Manish gave me the idea to blog about it.

Also, since my commit streak has reached 100 days (with 1k commits), I think now’s a great time to share my story with y'all…

commit streak

On a side note, this post is intended for those who’re about to get involved in the art of coding, though I assure the rest of you that it will be interesting for others as well.1

A Pythonist getting Rusty these days... (Part 2)

Last time, I talked about my experience with Rust as a newbie. Today, I’ll try to explain the hard time I had with the FFI. Well, I shouldn’t have gone into it, but I needed that for communication with Python1.

FFI was hard, because I can’t quite guess what happens along the way. Errors don’t mean much, which means that I can get the results only during runtime (and then figure out whether it’s the cake I want or not). Then, there’s this interesting problem of memory safety. Rust is specifically designed to be memory safe, but most of the other languages (especially “C”) aren’t. Python, being a descendant of C, can only speak “C” at its low level. So, Rust has to speak C if it wants to communicate with Python.

A Pythonist getting Rusty these days... (Part 1)

Though I’ve been playing with Python and JS for a while, getting into systems programming is something I’ve always wanted to do. The increased talks about Rust in the IRC (over the last few months), followed by the release of Rust 1.0 gave me a kickstart, which dragged me into it about two weeks back.

I got to see the beauty of Rust (thanks to the wonderful book) - its syntax, static type system, vast compile-time checking, etc., especially how it tackles the problem of memory safety by introducing a new concept called ownership, and it does all those without the use of a garbage collector. I liked it immediately!

Today, I’ll try to explain some things I liked about the language. The upcoming posts are reserved for some serious topics like FFI and concurrency, and how I got around some of the worst situations I experienced (as a newbie who just got into the systems programming world).

My New Blog!

I’ve been a wordpress blogger for over two years now. My previous blog Arrow of time was actually meant for writing about Physics (among other random stuff). It was a success, and I had a great time blogging. But nowadays, I’m more interested in code (than in Physics) and so, I think it’s time to move on.