I complain about things a lot, so let’s talk about something I actually like, for a change: the Haiku operating system.
Content warning: This article is very dense, and will shit on your favorite OS.
You may have noticed that, generally, when you use a computer, you use it interactively, with a bitmapped, colour display, a keyboard and a mouse in front of you. You’d think that’d mean the software in use would be elegantly designed for such a purpose.
Systems currently in use such as Linux and Windows are markedly not. On the Linux/BSD/Mach/HURD side, you have a system made of a stack of software - the kernel, the core utilities, X Windows or Wayland, GTK or QT, XFCE, MATE, GNOME, KDE, LXDE… Having a clean, consistent way of interacting with the whole system is somewhere between impractical and impossible. Everything sits under 8 layers of abstraction, unreliable tools, and GUIs trending towards using user-unfriendly mobile interface elements.
Don’t get me wrong, it’s a good system for a lot of things and is very flexible, but I’d prefer not to use that on my desktop or laptop if there was a better alternative that let me do everything I’m used to.
On the side of Windows, you have a similar setup - 30 years of user interface cruft, including at least 5 different UI toolkits, a kernel not unlike OpenVMS, increasing lean towards having a mobile interface on the desktop… The difference is that you can’t easily replace any of it. You can’t look at or change any of the source code, stuff breaks if you try to replace components… It’s a mess, and I have little reason to ever touch the thing, except for work.
And then there’s Haiku. Rather than being based on concepts and ideas from the 60s - in the case of Windows - or the 70s - in the case of unix-likes, Haiku is much more modern, being a free-as-in-freedom reimplementation and extension of BeOS, from the 90s. BeOS on its own was pretty cool, and Haiku does even better.
The original BeOS had a few different ideas compared to older systems, namely that you can expect one user to have multiple processors, rather than one processor to have multiple users, and that you’ll probably want to handle media. The focus was solidly on desktop computing. Unlike the unix-likes, who follow a design philosophy from the mainframes of old, or Windows NT, which, being basically a VMS clone, is also really meant for mainframes despite having font rendering patched into the (not-so-)microkernel, BeOS, and by extension Haiku, is actually designed to be used interactively by a single user on a machine with multiple processors/cores/threads.
While we’re at it, Haiku follows very traditional UI design principles, rather than the terrible stuff invading even Linux UIs.That means no terrible elements like hamburger menus, invisible scrollbars or ribbons in native applications, menu bars are used where applicable, and generally it’s expected you’re using a keyboard and mouse, not your mind.
In my case, my Haiku machine of choice is a HP Compaq Business dc7700, released around 10 years ago. It’s certainly not as stylish as a BeBox but specs wise, it’s passable:
In my book, this is a perfect Haiku machine. It has a reasonably fast, multi-core, 64-bit processor, a decent chunk of memory, and very mediocre graphics. The thing about Haiku at present: The basic graphics drivers are there, but hardware-accelerated OpenGL isn’t presently implemented, only 2D acceleration, and only on some GPUs. As such, a machine with a terrible integrated GPU will have the same level of performance if you stuck a beefy graphics card in. On the upside, that means you don’t have to worry about blowing heaps of money on a good graphics card for it. In this case, however it wasn’t all sunshine and flowers as far as the GPU goes.
Initially, I had trouble with getting Haiku to boot on this machine, so I went through the usual: set safe mode video, use 1024x768 resolution, etc. That worked fine. I set the resolution to my monitor’s native resolution of 1280x1024, in 32-bit colour. The machine failed to reboot properly.
After a few hours of fiddling, I’d blacklisted the Intel graphics drivers and established that 1024x768 in 32-bit colour mode worked fine, 1280x1024 in 16-bit colour mode worked fine, but trying to boot with 1280x1024x32 didn’t work. I did some maths (live, on IRC!) and came up with a theory: I was running out of video memory:
My theory is that this machine only has 4MB of video memory allocated on boot. As such, when the Haiku kernel attempts to set the screen mode to 1280x1024x32 on boot, it freaks out because there isn’t enough video memory, and the kernel isn’t up to allocating more video memory yet, so it hangs with a blank screen. Always good.
And the solution?
In the preferences dialog, set the screen resolution to 1280x1024x16. Then, add a script which uses the
screenmode command to set the colour depth to 32-bit to the /boot/home/config/settings/boot/ directory. As Haiku handles changing the resolution once booted, this side-steps the issue.
#!/bin/bash screenmode -q 1280 1024 32 60
So, Haiku’s an OS, let’s talk software. You can get almost everything you’d expect on a unix-like system, as Haiku is mostly POSIX compliant. That translates to: Your command line programs probably work, including gcc. Qt programs can be ported with relative ease, as Qt is available on Haiku. SDL is supported, and if you’re running 32-bit Haiku, you can also use BeOS applications. Some notable ported titles available on Haiku include:
Of course, there’s plenty of excellent native programs too:
The programs installed by default are shown below:
Oh, and did I mention it has a pretty good terminal emulator? Because it does.
Among the weird things Haiku carried over from BeOS being more Apple-oriented originally is using Alt instead of Control, so you can use Alt-C and Alt-V to copy and paste in your terminal.
Anyway, here’s some assorted screenshots of programs:
I briefly mentioned the GUI being very traditional earlier. While it is, indeed, rather traditional, it also has a lot of interesting features, starting with the window manager:
Windows can be stacked - that is, Windows can be combined together so the tabs along the top represent the same space on the screen, much line tabs in a web browser. They can also be tiled together, so the edges snap together and you can move them around as a group.
In addition, Haiku has very flexible workspaces - rather than the usual X11 workspaces, each workspace under Haiku can have a different colour depth, resolution and wallpaper.
Complementing the window manager and workspaces, there are desktop ‘replicants,’ which allow you to place parts of programs on your desktop, for example a workspace overview or system load graph.
And then there’s the Interface Kit. While superficially similar to Qt or Gtk with a theme, the Interface Kit has a number of advantages. For a start, the UI runs in its own number of threads, so even if the application behind the UI is frozen, busy or otherwise, the UI will remain responsive. It’s also nicely themable and has an excellent default look.
The Interface Kit holds all the classes you’ll need to develop a GUI. Building on the messaging facilities provided by the Application Kit, the Interface Kit can be used to create a responsive and attractive graphical user interface.
Oh, and while we’re at it, all the native programs I’ve seen didn’t use any horrible phone user interface elements like hamburger menus or hidden scroll bars. They also didn’t use 80% of the screen on whitespace unlike what you see in ‘modern’ web pages masquerading as native programs such as Discord or Github Desktop.
The last ‘release’ of Haiku was in 2012, in the form of Alpha 4. That build is lacking all the improvements since, however, Haiku Beta1 is getting very close. At the time of writing, there are only 18 blocking tickets for Beta1 - 95% are completed.
That’s exciting news. Beta1 is getting very close. The current nightlies are already quite stable - I’ve been using nightly builds for the better part of 3 months now, and with the exception of one network-related issue in one build, it’s been perfect.
I’m not done talking about Haiku yet. I didn’t even talk about BeFS and queries and stuff. It’s the OS we should all be running on our desktops and laptops. I’ll probably revisit it once Beta1 is released, which should be later this year.
Oh, and happy 20th Lainday.