Sorry for the downtime. My webserver had a failing hard-drive and I figured that while I was replacing the hard-drive, I would upgrade the entire machine as well. The box was a Pentium 4 1.4Ghz with 512MB of RAM that I hadn’t upgraded since I first built it in 2002. Now it’s been upgraded to a Pentium 4 2.4Ghz (hyper-threaded) with 1GB of RAM. Building from source will be a lot faster now! The whole upgrade process took a while because I was also in the process of upgrading another one of my machines and that took for EVER (some issues with shorting). Finally I had to install FreeBSD (version 8.0) on the new hard-drive as well as Apache, PHP, MySQL, WordPress etc. After I have everything set up, I’m going to make sure that I image the hard-drive so that I can restore it from backup easily.
I tried to install ShapeWriter from the Android Marketplace yesterday and couldn’t find it (I was trying to reinstall it after flashing my phone with Cyanogenmod 5.0.8). After searching the interwebs, I found out that it had been removed from the marketplace on June 20th indefinitely (supposedly for QA issues). Luckily I had backed up the app using MyBackup Pro and still had the APK, so I was able to reinstall it. I’m putting the APK up here for anyone who needs to reinstall ShapeWriter.
Download ShapeWriter APK
I saw this question on StackOverflow today. I thought it was hilarious!

Funny StackOverflow question
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 knew that I wanted to make one that was easy to use, flexible, and easily extensible (custom validation rules). I finally got an idea as to the form my framework should take, when I was looking at Hibernate bean-validation. I like the fact that you can set constraints by using annotations like @NotNull or @NotEmpty. That way, when you look at the bean, you are immediately aware of the constraints attached to it. I wanted to do something similar in HTML.
Read more…
Categories: Programming and Development, Projects, Web Tags: annotation, annotation-based form-validation, annotation-based validation, annotations, bean-validation, form-validation, framework, hibernate, javascript, javascript form-validation, library, regula
If you’ve been commenting on posts and now seeing anything, it’s because Akismet as been flagging all comments as spam. I don’t know why. I think it started after I upgraded WordPress. I’ve turned it off for now. Oh well.
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 vivin@www.vivin.net:~/code/agnostic .
Password:
ps: Process environment requires procfs(5)
Initializing new SSH agent...
vivin@serenity ~/Projects/code
$
I fixed the procfs problem by adding the following to my /etc/fstab:
proc /proc procfs rw 0 0
linproc /compat/linux/proc linprocfs rw 0 0
and then running:
vivin@enterprise ~
$ sudo mount /compat/linux/proc
vivin@enterprise ~
$ sudo mount /proc
So I try to scp again and I get:
vivin@serenity ~/Projects/code
$ scp -r vivin@www.vivin.net:~/code/agnostic .
Password:
Initializing new SSH agent...
vivin@serenity ~/Projects/code
$
WTF? Then I remembered making some changes to my .bashrc to be able to commit to github:
function start_agent {
echo "Initializing new SSH agent..."
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
echo succeeded
chmod 600 "${SSH_ENV}"
. "${SSH_ENV}" > /dev/null
/usr/bin/ssh-add;
}
# Source SSH settings, if applicable
if [ -f "${SSH_ENV}" ]; then
. "${SSH_ENV}" > /dev/null
#ps ${SSH_AGENT_PID} doesn't work under cywgin
ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || {
start_agent;
}
else
start_agent;
fi
I pulled all that out of my .bashrc and made a separate shell script for it. After I did that, scp started working again. I had no idea that calling scp would actually run .bashrc
I’ve created a project page for the CherryBlossom programming language. You can check it out here. The interpreter is written in perl.
Categories: Arts, Haiku, Perl, Poetry, Programming and Development Tags: brainf*ck, brainfuck, cherryblossom, code, development, esoteric languages, haiku, interpreters, java, parsers, perl, poems, poetry, programming, programming languages, project
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 CherryBlossom is simple. Brainfuck instructions are mapped to words that convey the essence of the Brainfuck instruction. Of course, this is a little subjective and also a little abstract.
Ultimately, it serves as a way to make program code not just functional, but beautiful and artistic. Thus, we introduce a new criteria to programming. Your code must not only be elegant algorithmically, but must also be poetic and artistic (also, since program code consists of haikus, you need to represent your code in sets of 3 lines with the first and last lines having 5 syllables, and the second line 7. That is, conforming to haiku rules). CherryBlossom serves to blend the programmer and the poet into one entity (hopefully with amazing results).
Here is an example of “Hello World!” in CherryBlossom. I have opted to use a spruced up div tag instead of enclosing my beautiful poem in soulless sourcecode tags.
Read more…
Categories: Arts, Haiku, Perl, Poetry, Programming and Development Tags: brainf*ck, brainfuck, cherryblossom, code, development, esoteric languages, haiku, interpreters, java, parsers, perl, poems, poetry, programming, programming languages, project
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 dependency to your project. You can download the project here. Thanks Guus!
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 case of n-ary trees where each node can have at most n nodes (k-ary tree). This implementation focuses on the most general case, where any node can have between 0 and n children. Java doesn’t have a Tree or Tree Node data structure. I couldn’t find any third-party implementations either (like in commons-lang). So I decided to write my own.
Read more…