Saturday, December 29, 2012


Besides Linux, BeOS was another operating system I fell in love quickly. OpenBeOS was the first open source project I joined way back. Unfortunately, I wasn't able to really contribute and it is still  one of my hopes that I could.

OpenBeOS has come a long way and also it's called Haiku now.

I grabbed the anyboot installer from Haiku's site and immediately proceeded to install on a virtual machine. Oh, the glory days of distro hopping. I have not read the installation guide yet but setup is straightforward, one just have to initialize the hard drive manually.

The installer seemed to hang though on getting to the restart, but everything was running very nicely after a manual restart. It might have something to do with using plain qemu instead of kvm. Using kvm provided a very noticeable boost.

It is very impressive so far.

Finally, I was looking for the old newsletters but took some time to locate copies. They're a good read, the developers were also quite the visionaries on their own right.

OpenBeOS Newsletters:

Thursday, December 27, 2012


Been mostly busy on projects the last months that I haven't got to play and write anything. Also been through with the church wedding this month.

Merry Christmas.

Had been able to clean up some stuff, like closing off of the minix experiment. Will be sifting through my old wordpress blogs and articles still relevant could end up here.

Oh, and noticed there's something wrong with the twitter update gadget.

Linux-0 #3: Minix Dead End

Using the last version on the Minix 1.x series proved to be dead end. Getting the old gcc to work needed patching the system with a set compatible only to 1.5.

Will figure out another way.

Monday, September 10, 2012

Parents, Non-public Methods and Eyes

Only now have I developed a greater appreciation for parent classes and private/protected methods. Besides hiding implementation details and reusing logic, they turn out to be very more useful than just that.

Last week I was updating a module and I was really having a rough time following the logic. I was troubled and stopped for a moment wondering why I'm having difficulty understanding code I myself had written just days before. Then I had an epiphany.

I loathed breaking down functions (or procedures if you will) in the past. I wanted everything to be in one place as much as possible, believing that avoiding those extra calls will make some huge difference in execution performance.

I, too, have tried many styles and methodologies over the years of programming and took some ideas that generally worked out for me. However, there are three particularly interesting ideas I've read before but never gave much thought:

  1. In Perl, you have lots of shortcuts that allows you to write programs that don't take up more than a screenful of lines
  2. If you're moving your eyes too much when reading a line of code, you would do well to break that and rewrite than line
  3. A person's eyes look up when that person is engaged logically, and you can also tell whether he/she is mental constructing or recalling depending on which side the eyes lean

OK, the third one isn't really a programming thing but something I picked up in Nursing.

So there I was moving my eyes all over the screen left and right, scrolling back and forward, looking up then back to the screen. Aside from the activity being stressful to the eye muscles, it was also stressing my thought processes. No wonder I was having difficulty 'visualizing the process', or going with the flow as one would say.

I then proceeded to re-factoring the module with the following thoughts:

  1. If a line is lengthy or nearing the edge of the screen, break it up
  2. If a function doesn't fit on your screen, break it up. You can tolerate up to three levels of nesting, more than that you usually need to rethink your approach
  3. When you already have a handful of functions (and class variables) for support purposes, like say for formatting or conversion that aren't needed much to understand what your class strives to do, move them to a base class

When I was done, I had a module that I can read like plain English. I no longer have to scroll back and forth to figure what's being done. Couple with string search, I can quickly locate where a particular problem is. Picking out a bug is easier than before because I don't have too much to look at a time.

Logically, I no longer have to look up a lot.

Saturday, September 1, 2012

Trip and Perl

It had been pretty busy the last few weeks. Never had time for playing around the lab. However, I had fun particularly at our company's team building activity. It was held in Samar, and it is a beautiful place there.

Yup, that's the Coding Avenue team right there in Caluwayan.

It was a good experience, and once again been reminded of my biggest bane... communication. As a child, I was always keeping to myself when hacking a problem and easily irritated when interrupted. Hrrmm, a very unsociable kid back then I was.

Well, what made me knowledgeable also turns out to be a problem. I've been keeping tabs to overcome this problem.

Anyway, through the trip I managed to finish reading 'Learning Perl'. I'll be looking for exercises to pound my Perl senses back, might also look at joining a project too. Here's a nice collection of Perl videos for anyone reading this:

Tuesday, August 14, 2012

Linux-0 #2: Getting files inside Minix

According to the linux-0.01 release notes, gcc-1.40 was used and 1.37.1 is mentioned but with a slight note. Googling for 1.4.0 against minix 1.x didn't turn up anything but 1.37.1 did. Thought I'll try to get 1.37.1 running then compile 1.4.0 on that.

But first I needed to figure a way to get files inside the minix system.

The best method I found was to create a dos partition then use the dos* utilities to read files. I hooked the qemu hd image via loop device (losetup and kpartx), good thing I used the raw format. Creating and formatting the partition on linux was problematic, minix can't read files from it.

The problem stemmed from the mapped partition being unable to report proper geometry to mkdosfs and apparently cluster sizes. To get around the geometry issue, I booted a dos image along with my minix system and used the old fdisk/format to create the partition.

After a few tries, I got a good partition size of 24mb that minix can read. Cluster size on the partition is 2k, anything more than that minix won't be able to use. Referring to some docs, seems minix 1.x friendly partitions can go up to 127mb.

Mounting and writing on the dos partition while the system is running didn't pose any issues, though I make sure I sync first before running dosdir.

Readme for gcc-1.37.1 on minix 1.x

Sunday, August 12, 2012

Raspberry Pi #1: First Pi

I've got my raspberry pi about a month ago, but never got a chance to play with it until yesterday. I got a great deal for a spanking new hd monitor at Accent Micro. Also borrowed some lego blocks from my son to make a makeshift case for it.

Now what to do with it? I have a webcam sitting around, might try a diy cctv. Wife's been bent on a media server though.

Finally, I discovered a community magazine centered around the rpi at Will have tons of fun reading for sure.

Thursday, August 9, 2012

Linux-0 #1: Minix

I've always wanted to hack again on the Linux kernel, especially the earliest versions. Although I remember stumbling upon a commentary and another, a remake on version 0.01 some time ago, I've thought of trying to install a Minix system myself.
The release notes for the 0.01 archive mentions Minix 1.5.10 as the version Linus used when he first developed his kernel, but it seems 1.5 doesn't play nice with the emulators I've tried. Might as well settle for the last 1.x version, and after some scratching on the head I've got a complete Minix 1.7.5 system installed on a qemu pc.
The historic Linux kernels can be found here
The Minix 1.x installers can be found here
My Minix 1.7.5 system

Random #1: Reboot

The heavy rains of this week and the accompanying power and internet disruptions provided me time to clean my work room and my archives. It has been two years since I got a lucky break and became a telecommuter. However, that also had put a stopper on my hobby research and experiments. I felt it's high time for a reboot.