Saturday, July 4, 2015

Revisiting the Haiku Operating System

In 1996 Apple was looking for the successor to Mac OS. Project Copland was deemed a failure, and Apple decided to search for a third-party operating system on which to base a modern operating system. If you have any interest in operating systems or computing history, there's plenty of information to be found surrounding the (broken) promises of Copland and Gershwin.

Choices were narrowed down to two operating systems; Be, Inc's BeOS, spearheaded by an ex-Apple executive name Jean-Louis Gassée, and NeXT with their NeXTSTEP operating system, pushed by another ex-Apple employee named Steve Jobs.

I'm pretty sure you can figure out which operating system won the contest.

Be, Inc never recovered from the loss, and after a swift decline it was swallowed by Palm and eventually digested into nothing. I had played with BeOS R5 and was very impressed; Be had created a fast, single-user, lightning fast, multithreaded, speedy multimedia operating system. They initially created a BeBox machine specifically geared to run their operating system; notable to the case design were large "blinkenlight" stripes that indicated CPU usage. And did I mention it was fast?

BeOS was really a geeky tinkerer's dream; the BeBox even had a "geek port" for hardware hackers to play with programming various electronics with minimal danger to the system (it had 3 fuses backing it on the motherboard.) Be, Inc kept shifting targets...porting BeOS from the BeBox to the Mac PowerPC, then to the Intel platform...it retained a small but dedicated group of hackers determined to keep the OS alive.

When Be finally gave its final death rattle, a group of fans reimplemented BeOS in what is now known as Haiku. The project started in 2001, and in 2008 it became "self hosting." I grew nostalgic for the project and curious at what the current state was, so I ventured to the website and downloaded the R1/Alpha 4.1 version released on November 14, 2012.

I tinkered with some VirtualBox settings (to virtualize the installation...I didn't have a hardware box to spare), configured it with 512MB RAM and a 5GB hard drive (believe it or not, both are more than the minimum requirements...) and a bridged network adapter. Another neat hack I found online; Haiku isn't really "VirtualBox-aware", so there's no seamless mouse integration (you click on the desktop and it captures the pointer until you hit the key combination to release it), but it does understand the USB tablet as a pointer. Tell VirtualBox to use that as the pointer and you get the seamless mouse integration functionality.

The bootup time was fast, despite emulating a "live CD" boot. The installer formatted the drive and ran without hiccups. It removed the virtual CD, rebooted, and voila'...Haiku!

Pretty!
It only took a few moments to verify that the network connection was working (and was indeed bridged, so it looked like another machine on the network rather than a NAT device behind my computer which in turn was NAT'ed again to the Internet; sometimes things don't like double-NAT weirdness.) I decided to try a simple accessibility check by giving the default user a password then enabling SSHD on Haiku. I was able to SSH to a terminal from my Mac without any problem.

The alpha came with a nice selection of some basic applications.

Activity Monitor + the app menu
If you're a C++ fan, you'll love Haiku. It's not only written in C++, but it includes the "BeBook", essentially an API reference to give programmers a reference for writing more Haiku applications. The command line tells me that gcc version 2.95.3-haiku-121101 is included...

♪ Do you wanna build a program? ♪
Obviously there's a web browser called WebPositive included, as you can see that it is being used to view the BeBook. It's not the most functional or up to date browser, but for the most part it's usable.

Haiku also includes a user guide so you can learn how to navigate workspaces (virtual desktops! With their own backgrounds and resolutions!) and find files. Just poking around the interface yielded some nice surprises in terms of what I could do with the operating system.

Ooh! A Quitter with graphs!
There are lots of little toys to explore, from SSH to web browser to a spinning teapot demonstration and an IRC client. There's even a web server! And it appears that it is possible to build Haiku from Haiku; the website has instructions on how to compile it from a self-hosted view or cross-compiled from several other platforms. It's really kind of amazing...if you enjoy C++ programming, maybe you should check out Haiku.

One of the main things to keep in mind about BeOS/Haiku is that it is truly meant to run as a user's operating system, not a multi-user operating system. Windows has the concept of user login. Linux, and the BSD roots in Darwin (OS X), also ingrained the idea of multi-user thinking in computing. Commonplace ideas like a home directory aren't really used in Haiku because it doesn't expect more than one person to use the device. Anything that was done on OS X or Windows to separate user configurations or add separation for security isn't necessarily implemented on Haiku, leading to some confusion when poking around (like, why is my home directory /boot/home? There's no user folder...)

That said, it sounded like there were plans for some limited forms of multi-user support being planned for a future release.

After poking for a bit and being wowed by the speed at which it runs (given that it was running in a virtual machine with minimal processors allocated...Haiku is heavily multithreaded, so it likes more processors to run on) I started looking for an updater. Apparently the alpha release didn't have an update system; given the number of other applications on the system I was a little surprised that hadn't been added along the way.

In addition to the alpha there are "nightly builds"; according to the online documentation, there's a package management system called pkgman that will update your system and let you install applications from a repository. The alpha release works fairly well, let's try the nightly build! Latest features!

That...was a mistake.

Like the alpha release, it installed without much of a hiccup. But the network refused to come up. It just stayed stuck on "configuring." After cycling through all the available network cards VirtualBox can emulate, I changed the network mode from Bridged to NAT, and it started working. It made me sad to lose bridging support.

I wanted to use a SSH session so I could refer to some documentation on my Mac and paste commands from reference sites into Haiku. I added the password to the default user and tried to launch SSHD...and it failed. I couldn't find a reason for it, nor could I find a fix online in their forums.

I wanted to join the forum so I could post a question about it; naturally this means a confirmation email. A confirmation email that never came. I sent a message through the "contact us" form, and still didn't hear anything back. (Of course I checked the spam folders and junk folders. I never found an email from them.)

Basically the nightly builds, running on Virtualbox, were broken. And I couldn't get help from the community site because it seems they are broken too. I even had some odd errors pop up as it booted and when I tried changing settings about an operating system component failing. Seemed rather random, but at the time I was frustrated with the components that were broken. And yes, I'm aware that the nightly builds explicitly warn of regressions and broken parts; I simply hadn't expected what for me would be multiple showstopper regressions. The first things I had tried doing...network access, and enabling SSHD...both failed spectacularly, as did the act of trying to join the forums to ask about possible fixes. It left me questioning if this was really a nightly build or if the project had zombied along the way and no one updated the website to say the project had essentially shut down.

I reverted back to the alpha R4 release to play around with it some more. It's a beautiful operating system...if I won the lottery I'd love to fund more work on it. The R4 alpha is usable enough for basic work, and if you're a C++ developer it's probably worth playing around in. Or if you're a student learning C++ it might be worth using since GCC is installed.

Seeing as I've been playing with Go recently, I thought it would be fun if there were a Go port for Haiku available; of course, that was a very long shot and my expectations were low. The only reason I thought about it was because Go has a number of platforms on which it currently works, including Plan 9.

It turns out, according to the forums, there was work done by someone trying to port an older version of Go to Haiku. It doesn't look like the person completely succeeded, though. That was a shame, since Go with its goroutines seems to heavily support the kind of multithreading that BeOS, and Haiku, were made for.

If you're a fan of operating systems and like playing with a piece of history, I highly recommend giving Haiku (the R1Alpha4 release) a try. It's usable. Its fast. And it's got a lot of nice touches, especially when you consider the history of the operating system.

Side note - I see in the Haiku blogs that a report was recently published, so I'm guessing the project is still alive and updating. Perhaps I am simply running into a number of regressions with their nightly-builds that happen to really converge against the VirtualBox platform? I know that if I really wanted to pursue the issue there appears to be an IRC channel available for questions, or maybe if I dig around I could find another email address to try getting the forum thing sorted out, but then it's a question of how much effort I want to put into pursuing this...

7 comments:

  1. Hi
    You should test the latest vmware image, better support :)

    ReplyDelete
  2. Oh and Irc are a better way to ask things but the A4 are reply old.

    ReplyDelete
  3. Sorry about the networking issues, they're fixed now. Nightlies are called "unstable" for a reason. :p And there is a Go 1.3 package available for the nightlies as well.

    ReplyDelete
    Replies
    1. Thanks for the heads up! I finally had a chance to check it out again and it is working! I'm playing with the Go environment over a SSH connection to the VM now!

      Delete
  4. Hi Bart, nice write up. Too bad it doesn't end so well. Basically what happened is that you grabbed a bad nightly. And the impression that sticks from your article is that the project may have slowly died. If I were you, I would rewrite the last bit and focus on the new features that are in the nightlies, like package management. For a project that ultimately you seem to have a lot of excitment about, it would seem more helpful to the cause. :-)

    ReplyDelete
  5. Hello Bart,

    i am one of the webmasters of the Haiku, BeOS and Zeta knowledge base BeSly (http://www.besly.de) and i want to ask you to add your article about haiku into our database (included the update artice)?

    ReplyDelete
    Replies
    1. Are there instructions for adding them, or are you asking to repost the text there?

      Delete