Recent blog entries for drivers

User Interface stuff:

With all this talk about GUIs lately on Advogato, osOpinion (the stuff about Jef Raskin), and Slashdot (which linked to both the osopinion and advogato articles), I thought it would be good to put up a new diary entry -- it's been almost three months since my last one anyway. I recently picked up Jef Raskin's book, The Humane Interface. It's really cool stuff. I mean really amazing, to me. It was like discovering a new religion and realizing you agreed with everything they taught. :) Based on the posts at the three sites, it doesn't sound like anybody has read it. When I'm not reading it, I'm constantly thinking about the ideas put forth in it. It convinced me that the current Windows/Mac GUI system is severely lacking in usability. Personally, I think GNOME and KDE's efforts to duplicate those features (and doing a worse job in the process) is not done with human interaction principles in mind. (In the articles, Raskin was criticising Apple for sticking with the same old wimp paradigm with OS X, but I think the same should apply to GNOME and KDE). I should say that he doesn't just want to get rid of windows and icons but files, and the distinct sets of commands we call applications.

So anyway, I've been thinking about creating a humane interface as described in the book. No specifics yet but I have been thinking about whether or not I would make it something that integrates itself with unix, or whether it should essentially be its own operating system altogether (ditch posix altogether) -- even though I would probably use the Linux kernel and maybe even X11 to provide access to a raw hard drive partition and the frame buffer and input devices. Just get the bare minimum running in existing OSes, then start providing functionality within the environment itself. Kind of like how emacs uses Lisp. (I think. I don't use emacs.) Although I don't know to what extent regular programming would need to apply to this new environment. Since ease of firing off commands is part of the idea behind the interface, I'm sure some way to combine commands would be part of the interface.

I realize this is a pretty enormous task. Not only am I basically creating an operating system from scratch, but most of the things we now consider "applications" will have to be scrapped and reimplemented but in a completely different philosophy. When I think about ways to attempt to do the things in the system I am imagining we now do in applications, I get very excited about the possibilities.

... more later I'm sure.

Another month, another diary entry. Today, I started trying to figure out DocBook to no avail. I am planning to write a "book" about ClanLib. I downloaded jade (Windows binary, for now) and discovered I had to find and install three other things, each from separate sites and not necessarily ready to use: the docbook dtd, iso entities, and DSSSL stylesheets. Had to hack various files to get them to recognize each other and everything is still all screwed up. I must have done something wrong, but the error messages certainly don't help. I'm over my head. I'll probably figure it out soon enough. I'm going to try installing Debian at home (my Mandrake/GNOME setup is all screwed up at the moment) and I am assuming that if I tell Debian to install jade it would automatically set everything up correctly. We shall see!


This weekend, I fixed ClanLib's WAV file loader to handle extra chunks which currently cause it to report the file as invalid. I ran into the problem writing my ClanTTT game I mentioned earlier.

I helped my friend Nick write a new PCX loader for ClanLib. The current one only handles 8-bit files, but the one we wrote handles everything from 1-bit (mono) to full 24-bit files. It was fun doing that kind of graphics programming because most of the time that we were debugging it, the screen was a really mixed up version of the image, but when the correct image popped up, it looked beautiful and we yelled out in surprise that it finally worked.

It is my first code contribution to free software! (As soon as I send in the patches.)

Today I picked up eight Isaac Asimov books for about US$20 from a used book store. They are the nice Del Rey editions from the 1980's with the beautiful artwork by Michael Whelan (the "Robot" and "Foundation" series, anyway), not like the ones in print today. (I used to have a much nicer set but it got stolen in 1993.)

Check it out.

Well, I am now officially the Documenter for ClanLib.

I'm also working on writing a multiplayer ClanTTT (Tic-Tac-Toe), network multiplayer game. Of course it's only an example. I will use it as a basis for a ClanLib tutorial. (The current tutorials (not written by me) are way out of date.)

I got one of the two lead developers to join Advogato. If some people could certify him as a Journeyer, that would be cool. Then he could actually sign himself up on the project page. Funny how "observers" can't sign themselves up even to their own projects. He's mstarch.

I have been studying object oriented architecture and design, along with trying to figure out the architecture of ClanLib, in order to write documentation for it. For the longest time I was stuck because the inheritance tree didn't make sense. There is a CL_Target interface, which is something you can draw on. Then there is a CL_SurfaceProvider which instantiates images that can be blitted to the screen. Then there is a CL_Canvas, which acts as both a CL_SurfaceProvider and CL_Target. That is, you can draw on it, then use it to instantiate a CL_Surface. A CL_Surface is packed into a special format designed for fast blitting to the video card, not for drawing on. In fact, the data may be cached on the video card. For some reason (probably for the benefit of CL_Canvas) CL_SurfaceProvider (which is an interface class) inherits from CL_Target. Yet, not all surface providers are intended to be Targets. Most surface providers just load an image from a file, or the resource manager. So I asked why they made it the way they did, and suggested an improvement if there wasn't a reason. That is, make CL_Canvas use multiple inheritance of interfaces, both CL_Target and CL_SurfaceProvider. I haven't heard back from the mailing list yet. I'm new to this so maybe it's some kind of social mistake to suggest an improvement (stated as a question) without knowing the whole situation, and without providing a patch (and testing it out yourself to see if it is feasible). Who knows. We shall see. Actually I just wanted to ask if I was way off base before I tried changing the code.

9 Oct 2000 (updated 9 Oct 2000 at 20:56 UTC) »

I am currently in the preparation phase of jumping into free software development. As I said in my previous diary entries, I am focusing on a project that is under active development (clanlib) by other people. I started reading several books (Game Architecture and Design; The C++ Programming Language (Stroustrup); Design Patterns; Object-Oriented Analysis and Design with Applications (Booch) in that order) before settling on the last one, as I believe that will give me the necessary background to (maybe) do what I want to do.

I have been wondering, to what extent, in the free software realm, do people use C++ as opposed to C. How much do they use C++ as more than [just] an improved C, with focus on the object model? (abstraction, encapsulation, modularity, hierarchy, typing, concurrency, and persistence) To what extent do they use a process and/or notation to design/document their software. Any free software projects out there I can look at as a good example? Or have I been reading too many books and need to face the real world? :)

(if someone replies to this directly, could you drop me a note so I don't miss it scrolling off of advogato: drivers AT reflexnet DOT net (two "nets"))


nymia, Dodger: Like I said, Source-Navigator would be useful if it would graph all references between classes, not just inheritance, and not just some references but not others. I also thought that a graph of function calls in a C project would be something it would have but it doesn't appear to.

vi and ctags: I hadn't heard of ctags so I did a little searching around and found flIDE "frontend on top of Exhuberant Ctags and make. It works very well in combination with any editor that can take filename/linenumber arguments, such as nedit, emacs or vi" Very interesting.... I'm also going to check out Code Crusader when I get home. It appears to have some of what I am looking for, maybe.


Currently looking for the ultimate source code analysis tool. I discovered Red Hat's (formerly Cygnus's) Source Navigator which they recently released under the GPL. I was somewhat disappointed that it doesn't do everything I thought it would. (For example, you can show a graph of references, but some reason it doesn't consider having one class a member of another class to be a reference, but it does if you declare an object of that class in a member function.) But I don't know if there exists a free tool that does what I want.

ian: Never work for a husband/wife team. I have and I regretted it. So have my friends at different companies.

3 Aug 2000 (updated 16 Oct 2000 at 16:28 UTC) »


or, scratching the itch. I decided the best thing I can do to help ClanLib at this point was to volunteer to do documentation. Reference documentation for the API, classes, functions, etc. to tutorials, and F.A.Q.'s. One of the things I want to do is, in developing this documentation, read over all the source code so I really understand what it is doing. Then I will be in a position to do more extensive testing, debugging, or even working with the developers to add new features. As well as explaining the "why" behind the system to make it easier for both developers who use clanlib and developers who work on clanlib. At least that is what I imagine at this point. I just don't get the feeling that the current developers do everything with the most attention to detail, and this seems like a way to go over the architecture with a fine tooth comb and find the boring details that they may have missed in the code because it works "good enough" for themselves. Documentation is also one of the major weak points of clanlib now.

I have the day off of work today, because I switched to a 9x9 schedule (work 9 hours for nine days, then take every other Friday off). I think it's different than a weekend because then I usually want to just do too many things at once. Today I want to focus on source code.

I got tired of the noises coming from my computer. I've tried everything I could, buying replacements for my power supply and cooling fans but they still suck. Even supposedly quiet fans from The wall next to my computer desk has a panel for cable TV outlet, so I opened that up on both sides of the wall and passed the keyboard/mouse/speaker/monitor wires through the wall. Now I have peace and quiet, except birds chirping outside which are nice.

Finally, I upgraded the ram in my linux box last night from 32MB to 96MB. Now I can run Netscape under GNOME without it acting like... something really slow.


ESR says in "how to become a hacker" (I just finished reading his Cathedral and the Bazarre book) that you can't really learn to program from books, you have to read other peoples' code (and write your own of course). So I decided to start simple. How do the FSF and BSD projects compare in terms of they implement the very useful utility true(1)? BSD's version was something like:

int main(void) { exit(0); }

plus some optional strings for version control and copyright statements to show up if you run strings(1) against it.

The FSF version was about 10 times as complex. It implemented a --help function to print a help screen where --version was the only other option. It called several other functions related to locales, checking if POSIXLY_CORRECT was set in the environment, the return value was a #defined value instead of 0... tabs were two spaces... strings were passed to a function named "_" (underscore). Very idiomatic, I guess, is the word for it.

Oddly enough, running "true --help" on my Linux-Mandrake box does not produce any output, but I can see the help text running "strings /bin/true". Did Mandrake change their version of true(1), or is something more bizarre going on? (POSIXLY_CORRECT is not set in my environment so...) These are very important questions to discover! :)

1 older entry...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!