Planet OsDrawer.net

March 21, 2010

Dark Wyrm

Fast Access to All of the Lessons

I've put up a page on my old website, redesigned and now renamed DarkWyrm's Library, which has one-click access to all of the programming lessons that I've written. If you've missed one, this would be the place to look, saving a lot of hunting on this blog or the one over at the Haiku website. This is also a good place to find all of the apps that I've written. I've also got links posted here for when this post is buried by others so that you don't even have to bookmark them. Gee, how kind of me. ;-)

March 21, 2010

March 20, 2010

Dark Wyrm

Lesson 11: More Data Structures and Types

This time around, we will be examining some important kinds of data structures and ways to create custom data types, a critical stepping stone in getting to understanding the Haiku API. This is the last C / C++ lesson -- the rest will be C++ only. A couple more lessons and we'll finally be ready to write GUI programs for Haiku! Enjoy! Learning to Program with Haiku, Lesson 11.

March 20, 2010

March 19, 2010

Stephan Aßmus

WebPositive matures

Well... that might be a bit bold for me to say. Obviously WebPositive still has a lot of things missing. On the other hand, this version adds some of the most crucial things, like persistent cookie support, bookmarks and a much improved browsing history implementation.

read more

March 19, 2010

March 12, 2010

Dark Wyrm

Lesson 10: More Pointers and the Command Line

Here it is: Learning to Program with Haiku, Lesson 10. Now we're starting to tie up loose ends before moving on to just C++. In this lesson, we learn more about pointers and kinda-sorta pointers called references, and we examine the basics of getting information from the command line. Also included are the answers to the review questions for Unit 2.

March 12, 2010

Dark Wyrm

Changing OSes: Harder Than You Think

I have had experience in a wide variety of operating systems over the years -- every version of Window$ except 2.0 and NT 3.5, DOS 3.0 - 6.0, Linux distributions, MacOS 7.5.3 - OS X, BeOS R5 through Haiku, and even a little QNX. It dawned on me yesterday that this actually colors my perspective significantly. As proponents of alternative operating systems, we need to be aware of how hard it is to change your primary OS.

Think for a moment about what using Windows is like: always being on alert for viruses, perpetual security updates, going to the Geek Squad or a friend / relative for fixes, Microsoft Office, buying a PC loaded with bloatware, Photoshop and other can't-live-without-it apps and so on. It's a way of life, and an inferior one at that, but that realization comes only if you are made aware of better options. Let me repeat part of that: it's a way of life, as in a culture. Not that I've done it myself, but I know enough to know that changing your primary OS is very much like moving to another country.

Consider the differences in what you know about the United States, England, and Australia. Last time I knew, there weren't too many koalas climbing trees in Willesden Green, for example. I'm not even going to comment on the "Chocolate Thunder from Down Under" server at Outback steakhouses here in the States -- I've never had it -- but I do know what it is that Australians call a thunderbox, and the only thing it has in common with chocolate is the color. Eeew. Riding a lift is something I might expect a construction worker to do, as in driving a forklift, but that's not what it means across the pond. They all speak the same language, but there is a lot of difference even though there is a lot of common ground beyond language.


Imagine for a moment moving from your home country to another one which speaks the same language that you do, but one you've never visited before. Which would be more difficult: packing everything and leaving on the next plane out of town or spending time there and planning your trip, possibly having a house in both places for a while? Without a doubt, the harder option would be the first one, but sometimes we, who have successfully done that in a computing context, mention it without hardly a second thought -- "Just use Linux (or a Mac, or whatever). It's easy!" That's like saying to my neighbor who has lived her entire life in the town I live in to move to Australia without any regard to all, if any, of the implications that this entails.


Changing your primary operating system is something that takes time, effort, and patience. The change requires willingness to put in effort to learn something new, even through the problems and inconveniences that will arise. Total beginners actually have an easier time than people who "don't know much about computers" but they still require a lot of help. Keep in mind that truly helping people requires an investment of your life into theirs.

March 12, 2010

March 5, 2010

Dark Wyrm

Whole Lotta Lessons Goin' On

There have been quite a few comments on people being excited about when these start addressing the Haiku API, so I'm going to speed things up a bit. I originally planned on calling this week a Buy One, Get One Free week, but that won't fit now. I had planned on publishing review questions after Lesson #5, but I must have forgotten to upload them, so I'm making them available along with Lessons 8 and 9 and the questions for review after Lesson 9 has been completed. Here they are in order. Enjoy!

March 5, 2010

March 2, 2010

Stephan Aßmus

WebPositive emerges

Wow, it's been 10 days already since I posted my first blog entry on my work on WebKit and the native web browser. Of course my continous updates to the package I posted in my first article will probably have spoiled most of the surprise, but HaikuLauncher has been reduced again into just a bare browser shell, while a new codebase, WebPositive, has been split off from it. Using WebPositive has become a whole lot more pleasing in the meantime. For those of you who have not followed the comments to the original blog, these are the things implemented since my first post on the project:

read more

March 2, 2010

February 26, 2010

Dark Wyrm

Lesson 7: Losing My Memory

It's hard for me to believe that I've been publishing these mostly-weekly lessons for almost a month and a half. It's been really fun. I hope that those of you reading them have been enjoying reading (and hopefully learning from) them as I have in writing them. This one covers two major topics: memory management and binary math, nothing terribly exciting, but really useful and necessary nonetheless. Learn to Program With Haiku, Lesson 7.

February 26, 2010

February 23, 2010

Stephan Aßmus

Diving into WebKit

It's time to write a bit about my progress on the WebKit browser and the WebKit port itself. It was pretty nice back in the days when Axel was paid to work for Haiku, Inc., that he published regular blog entries to keep everyone up to date on what he was doing. At the moment, I have mixed feelings. Not about writing blogs. Not about working on WebKit. But about using the new WebKit browser to write the blog entry, haha! I've seen it crash, although in the last days, it has become pretty stable. After we upgraded to a newer WebKit version as the basis for the port, the frequent random crashes have almost disappeared and I saw only one crash in three days. Compared to one every few minutes before.

read more

February 23, 2010

February 19, 2010

Dark Wyrm

Lesson 6: More Loops and Conditions

Here marks the beginning of the second unit in my series, "Learning to Program With Haiku." Lesson #6 expands on our knowledge of loops and decision-making constructs. Good luck! Learning to Program With Haiku, Lesson 6.

February 19, 2010

February 13, 2010

Dark Wyrm

Paladin Release Delays... a Good Thing??

Normally, you'd consider it a bad thing when a software release has to be pushed back. I was thinking of pushing out that release I mentioned earlier this past afternoon, but it's not going to happen.

I just kind of fell into a coding session this afternoon and this evening and it yielded some great results. I managed to get a well-known Linux tool, ccache, built for Haiku and Zeta and tweaked Paladin to take advantage of it. I did some testing on my P4 3.0 Ghz with hyperthreading (a dual processor machine to Haiku) with a copy of the sources to FtpPositive that I had lying around. The results completely blew my mind.

Build TypeBuild Time
single-threaded, uncached13 seconds
multithreaded, uncached12 seconds
single-threaded, cached~3.5 seconds
multithreaded, cached~2.25 seconds

That's an 80% improvement with build caching! For small projects with only a few files, it doesn't make nearly that big of a difference, though. The bigger the project, the bigger the boost, it would seem.

I also found a few bugs that I managed to squish that were related to a feature that I implemented during the snow days I had earlier this week and discovered another one which needs to be taken care of plus some more general testing before a release can be made. When it's all done, though, this will be a really nice improvement over the last development release and a huge leap over the stable branch.

February 13, 2010

February 12, 2010

Dark Wyrm

Programming Lesson 5: Arrays, Strings, and Pointers

It's that time of the week! This is the end of the first unit of lessons... about halfway to writing our first GUI program for Haiku. Some more advanced concepts, especially pointers, are found in this one. Enjoy! Learning to Program with Haiku, Lesson 5

February 12, 2010

February 5, 2010

Dark Wyrm

Lesson 4: If, For, And, Not, Or

Hey, that rhymes even! Lesson 4 is now out. Decision-making and repeating instructions are on the agenda for this one, expanding the repetoire of basic skills for writing code. Learning to Program With Haiku, Lesson 4.

February 5, 2010

February 1, 2010

Dark Wyrm

New Paladin Release Coming Soon

At least in the last week or so I found the coding motivation that I seemed to have misplaced. I did some hacking on Paladin and was amazed at how easily a couple of features came together. I *finally* managed to make drag-and-drop group reordering work correctly. This has been a feature that I've been personally missing since drag and drop was implemented in the project window. There's even a visual regular expression tester that's been added to the Tools menu.

The feature that's holding things up is the Code Library. The concept? Encourage (and in my case, simplify) code reuse by creating modules of code that, once imported into a project, remain synchronized with the master copy. It's a little like source control, but on a more basic level. It seems simple on the surface, but it's turning out to be more of a challenge than I thought. I personally plan to use it a *lot*, so I'm waiting to get it right before the next release.

February 1, 2010

January 29, 2010

Dark Wyrm

Third Lesson and More

Yep, it's that time of the week. Out for study is Learning to Program with Haiku, Lesson 3. Amazingly, I seem to at least temporarily come out of my total lack of coding motivation. I've been doing some Paladin-related hacking. It feels nice to have the desire again. Hopefully it will stay a while. :-)

January 29, 2010

January 27, 2010

Meanwhile -

Final bits

SoundPlay and Gradients icons have been finished:

They can be downloaded here.

This blog is going to be abandoned*, so it might as well have something with a lasting quality at the top of the page.
It’s a beautiful song in a great performance by (late) Taiwanese singer Teresa Teng.

*Due to me going back to a much more analogue life. I’ve finished contributing to Haiku where I could anyhow and wish the project and everyone involved good luck. (Will surely run Haiku R1 when it’s out!)


January 27, 2010

January 25, 2010

Meanwhile -

January 24, 2010

Meanwhile -

Alternative Gradients icon

At the moment, Haiku’s Gradients icon bravely ignores all the Haiku Icon Guidelines :D .
Still, I tried to make one that doesn’t do so.
Maybe it’s just as unsightly, but at least this one blends in much better with the rest. Still not sure about those shadows, though…

Update: An improved version is here


January 24, 2010

January 21, 2010

Dark Wyrm

Programming Lesson 2 Out

As promised, here is the second lesson in the series. The first lesson was all about taking the first baby steps, such as what a program is and what functions are for. Now we take a look at comments, a little bit about dealing with errors, and 10,000 foot view of how a compiler builds a program. Enjoy! Learning to Program With Haiku, Lesson 2.

January 21, 2010

January 18, 2010

Meanwhile -

Haiku’ed BB icons version 3.6 is out

Final batch of new and improved icons, downloadable from BeBits, Haikuware or from this blog (see link on the right).

I planned to make an icon for Jukebox, but abandoned that idea because the application’s name doesn’t represent its functionality very well anymore: originally Jukebox handled audio, but later on video was added.
The idea of designing an icon in the shape of a Jukebox therefore didn’t feel right, and I couldn’t make anything else out of it that visually worked and indicated the added video capability.

Some general notes:
Version 3.6 finally ends my Haiku interpretation of a BeOS icon collection made earlier, the so-called ‘Be-beautified Icons’.
It was both a challenge and fun, and I only hope that the icons will do what they’re supposed to do in a pleasurable manner that lasts.
(May they add to the already great Haiku computing experience)

Lots of credit should be given to (amongst others) Matthew McClintock and Stephan Aßmus for the material, inspiration and methods that made this icon collection at all possible.


January 18, 2010

January 16, 2010

Dark Wyrm

Branching Out

Sometimes I have plenty of useful stuff to say that really isn't appropriate for this particular blog, so I spawned a second blog, DarkWyrm Unabridged. There's even something to read over there now, too. If you ever wanted to know more about me personally, that would be the place to do it. It still needs some work on making look like a regular blog (as opposed to the cookie cutter variety), but it's a start.

January 16, 2010

January 15, 2010

Dark Wyrm

Calling All Haiku Developer Wannabes

Have you ever wanted to learn to program for Haiku (or something else) but never had the money or the chance? Has something else gotten in the way? Even though I still don't have any real motivation to work on Paladin or write other code, right now I have plenty of motivation for writing about code.

I'm going to be publishing online programming lessons whenever I have some time. Usually this will be about one per week, but may happen more or less often on occasion, depending on how my spare time runs. These lessons will be available in PDF form under a Creative Commons license that will give me some options should I ever want to publish them in dead tree format.

Considering that I write fairly well and I've been teaching for more than 10 years now, this is quite an opportunity for someone who wants to learn to code. To kick things off, here's the first one. Learning to Program With Haiku, Lesson 1.

January 15, 2010

January 12, 2010

Stephan Aßmus

Everyone loves benchmarks

In these exciting times, during which Ingo Weinhold is making great progress with some performance optimizations in the Haiku kernel, I felt this strong urge to conduct some benchmark results, even if that caused me great deal of pain in setting up all the test platforms! The results are quite interesting, even though I didn't manage to test all possible combinations of host platforms and file systems.

read more

January 12, 2010

January 3, 2010

Dark Wyrm

Do BeOS and Zeta Matter Any More?

I just got to thinking the other day (yeah, nasty habit, I know) and I've started to wonder if R5 and Zeta really make a difference any more. BeOS R5, patched or otherwise, is just shy of 10 years old. In the land of Redmond, that's the difference between Windows 98SE and 7. Ouch. Hardware that will run it is increasingly hard-to-find, as well -- unless you run it on a recycled machine, at which point you run into hardware reliability problems at some point.

Although it's only been 2 years since the final release of Zeta, it's also been declared illegal via piracy, so current users are on shaky legal ground at best when using it. It also has a number of compatibility problems with R5 and Haiku, as well. Hardware support has been kind of funny in my experience -- some machines will run it and others not at all. There isn't any binary compatibility with Haiku with anything compiled on Zeta, either, which adds hassle to developers.

Although Haiku has made great strides, it is still buggy, and unless it sees a serious influx of developers in the near future, it will be for quite some time. Should developers even bother with writing code with R5 and/or Zeta in mind? Vote on the poll at the right and let's see who runs what. Maybe that will give a better answer than my own musings. :)

January 3, 2010

December 21, 2009

Dark Wyrm

Taking Some Time Off

In case you hadn't noticed, there hasn't been any news out of the ol' DW skunkworks. I haven't really had the desire to do much of anything with BeOS or Haiku the last couple of months, but, frankly, I'm not sure why. Some of it just seems absolutely futile--a chasing after the wind, to quote the book of Ecclesiastes. The thought of writing code almost leaves a bad taste in my mouth... that so much time and thought is poured into something which works well for a time, but also requires maintenance to keep running properly: a total lack of desire or motivation.

I've been here before. The last time I felt this way, it was burnout. There is a distinct possibility that this is the case again, but it feels different this time even though I can't quite put my finger on it.To put it succinctly, I'm puzzled. This may be just a pause in the journey, but only time will tell.

Thought for the day: when you're at the bottom of a well, don't forget to look up. :-)

December 21, 2009