This always seems to get me and I have to figure it out every time. Sometimes I have files with blank lines and I want to get rid of them. Here is how you do it in vim (one of the many ways, actually). First you want to get rid of whitespaces: :%s/^\s\+$// Note: I…
Category: Nerdy Stuff
Regula: An annotation-based form-validator written in Javascript
Regula is an annotation-based form-validation framework written in Javascript. There already exist a few frameworks that address form-validation in Javascript, but I have found them to be somewhat lacking. I have thought about writing one of my own for some time, but I honestly had no idea what form it would or should take. I…
GitHub broke my scp
I set up git on my FreeBSD box so that I can commit my code to GitHub. Today I tried to scp some stuff over and I was met with this rather unhelpful message: vivin@serenity ~/Projects/code $ scp -r [email protected]:~/code/agnostic . Password: ps: Process environment requires procfs(5) Initializing new SSH agent… vivin@serenity ~/Projects/code $ I…
CherryBlossom
I’ve created a project page for the CherryBlossom programming language. You can check it out here. The interpreter is written in perl.
Introducing CherryBlossom
Over the past month, I’ve been working on a new project. It’s called CherryBlossom, and it’s a way to write programs using haikus. Strictly speaking, CherryBlossom is a brainfuck analog. I actually spent more time writing the obligatory “Hello World” program in CherryBlossom than I did writing the interpreter for the language. The idea behind…
Maven project for Generic (n-ary) Tree in Java
Guus was kind enough to make a maven project for the Generic Tree. He also fixed an error in my equals method for the GenericTreeNode (I intended to do Object.equals(Object obj) but was doing GenericTreeNode.equals(GenericTreeNode obj). Since it’s a maven project, you can easily create a jar out of it and add it as a…
Generic (n-ary) Tree in Java
This project is available on github. Please download from there to make sure you have the latest version. Last week I was solving a problem at work that required the use of a Generic (n-ary) Tree. An n-ary tree is a tree where node can have between 0 and n children. There is a special…
A brainfuck interpreter in bAdkOde
A few days before I left India, I started writing a brainfuck interpreter in bAdkOde. I finished implemented all the instructions, excepting for looping. I actually finished the code (and fixed all bugs) while I was in the air, flying from Dubai to Los Angeles. Emirates Airlines has power-plugs for your laptop on the seat….