Older blog entries for kai (starting at number 8)

30 Sep 2002 (updated 30 Sep 2002 at 10:46 UTC) »

Life

Three weeks ago a robber attacked me with a hammer. He probably wanted to struck me down and get into my appartment. A couple of days ago I had a nightmare. I awoke by the sound of a hammer hitting my skull. I hadn't remembered that sound. The wounds are healing nicely, though. Of course the police didn't catch him.

I got trouble with my lungs so I'll be taking antibiotics for the next three months.

I've got some very close friends I can talk with about many things like politics, music, or life in general, but nobody in my surrounding is interested in my other interests: information visualization, human computer interaction, and pattern languages. Sometimes I wish my former arrogance back so life on Elba may become less hard.

I've been pretending to be sleeping for a long time. I don't even quite remember what it feels like to be awake. I think it was quite cool. Maybe I should have some lucid dreams again, singing and dancing until I'm back in this place and at this time.

Programming

Having to work alone hurts. I'm not very productive working alone, either. My projects are stalled. Last thing I coded was a cute hack modifying the KDE color scheme control panel which wouldn't get accepted anyway but I might put together a page of things that will never be including a screenshot eventually. Last time I wrote a significant amount of code was after a bottle of good red wine. The next morning was a desaster so I'm not going to do it again anytime soon.

The imperative "show me the code" is pointless, yet not new.

I read halfway through a book on Java and doing some examples was fun, nice libraries. Doing it in Windows was not so cool.

Certs

I think the new diary rating system is annoying, but I realize it's point is about research so usefulness is of little concern. Advogato has become a monological environment, very sad.

I do not like writing anymore.

tor: To me C always feels like a strange mix of high-level and low-level. I often catch myself rewriting things for no good reason such as:
n = 1 + strlen(s); s0 = malloc (n); memcpy(s0, s, n);
And then the head-spinning starts: Should it be inlined, should I use malloc at all, and so on. Doesn't happen to me when using a high-level language :-)
Can the code for your project(s) be downloaded (didn't find a link) ?

I'm pretty new to functional languages so it's just a mental exercise to me for now, expanding my understanding in general (learning, slowly, SML). I think that by using SML and Forth to implement some algorithms I'll become a better programmer in general (highly speculative so far).

As you are using ObjC for the toolkit, have you checked out TOM? TOM is a very balanced compiled, high-level, object-oriented language. The syntax is similar to Objective-C, it has closures and GC. TOM is inspired by Eiffel, Java, and some) I highly recommend taking a look if you havn't done so: TOM language homepage.

Fitz

I wonder if there is going to be support for flyweight nodes (instance vs. copying) like OpenGL display lists ? That would be cool! I'd also like to know what horizontal/vertical sub-pixel positioning resolution will be the default for interactive screen display ? Do you plan to support progressive refinement for slow systems ?

raph: Your last diary entry made me think: about asynchrony, about thinking in general, about speaking, about beeing drunk, and about other things.

Asynchrony

When I printed out the CORBA 1.0 specs (the whole pile, sigh) I was pretty excited at first. Then the roll-back: CORBA makes it significantly easier to use "synchronous" rather then "asynchronous" requests. How stupid! (But it took me some time to realize this) "It pretends that method calls are really local" hits the nail on the head.

Regarding X there are two sources of trouble:

  • Many people don't have a remotely connected X server to test high-latency situations. So they can't test it out or may not even be aware of the problem.
  • Xlib is to blaim, too. It's too opaque. Examples: XDrawRect + XFillRect calls although there is no reason to provide both, no mask for all events when calling XCheckEvents, ... But I don't know why few toolkits decided to support multiple Displays, hmm. (It's actually funny to have your app's windows pop up on different X terminals, mice-handling becomes more difficult, though.)

Whether an operation is asynchronous depends on the user's context a little. (A RT coder may draw the line at a much lower latency then I, as a GUI programmer, would.)
Other cases where fake synchrony (or even fake asynchrony) at work:

  • gethostbyname() (a really ugly one)
  • stat() (the ugly part beeing that it's not obvious)
  • all non-memory i/o read/write ops.
  • some aio implementations are not async? (or only ill-minded rumor ?)
(Then again, I run a PCI+IDE+VIA system, which I couldn't trust in full-duplex, so I alone am to blame)

Some quick thought's: If the underlying operation is asynchronous, the primary interface should expose this asynchrony. If a call may fail, it can provide an error code. Building optional synchronous calls on top allows people to use the library more readily. Providing good documentation educates people (empowerment!), only providing synchronous calls for asynchronous operations dumbs them down. (sorry for the rant)

Community

Maybe allow people to "hide" entries from the "recent log" compiled for them, where they still show up on the main page and for everybody else in the recent log, of course. I'm not sure whether the recent incidents make a stronger move necessary, but it's easy to say as I'm not involved (and I got a mouse with scroll wheel, hehe). There are surely things that could be improved about certification, but I doubt "cert inflation" is the problem. But I'll stop rambling for now :)

life: I got a cold :*(

Writing Code

Surprisingly I started hacking on MindsEye again. It's actually fun to work on. Fixed vertex normals for torus tesselation. Cone still bugs me. I also digged up some old window manager code I wrote some time ago. Maybe the world will see kaiwm eventually, shouldn't hold your breath, though :)

MUA

I've been using kmail (instead of vanilla web mail) for almost three weeks now and I really like it. Hasn't crashed on me so far. I'm still looking for a mail client that supports marking individual sections of messages and includes at least some basic "personal data mining" functionality like mailing list statistics, automatic keyword indexing, automatic message scoring, refining searches, treemap visualization, and so on. Any recommendations?

KaiView

I'm not likely to work much on KaiView in the near future. It just has too many loose ends: the drawing model is not well-supported, yet, the TOM community is very small (very unfortunate), the model-view seperation needs a lot of design work which rather bores me at this point, and there are many issues I haven't even touched yet. In the meantime I'm writing some C code - today I wrote some basic image manipulation code which is supposed to become my learning ground for assembler programming (maybe). I'm also very happy with the select loop I wrote lately. Together with an idea from the TOM library select loop it's going to be pretty good, I think.

Fashion and the 90s

In the late eighties/early ninetees (when Al Gore was just about to discover/invent the information super highway) we saw a short period with exceptionally many examples of good design (industrial design, magazine typography, fashion, user interfaces, ...), of taste, of style! Why is it that the era impressed me so much, while I think the time that followed was a big dissapointment? I can't quite grasp what it was that I feel was so superior. Is it a personal thing, closer related to my own life then to the world at large ? Or could it be the rate of change increasing, technical advancements, NeXT, Bill Clinton replacing Bush, the web starting to become commonplace ? It almost felt like a renaissance, as if design could reach a new plateau, combining the knowledge of classic artists and architects with contemporary advancements in materials and production technologies. And then it stopped. Before the hill top was reached, so we could see what's beyond, it just stopped. Style went away. SGI produced the O2 case (and other companies featured other egg-shaped unnecessities), magazines where drunk by possibilities, color, craze of geometric shapes! Fashion without style reigned...

What comes next ?

To me, it's not quite clear what we're up to. Retro, then OS X, a Chrysler that looks like my great grandpa could have owned one - is there any direction I don't see, yet? Sure, diversity is a good thing, but just as the 90s where driven by joking about the 80s, there is a lot of 90s-bashing going on, too. "Old fashioned", "out of style" they're saying ... so what's next ?

Doing nothing

It's been a long time since doing nothing has felt so good! Watching the birds against the summer sky, smelling the scents of barbecue, distant noises from the streets. It's so beautiful!

After a short period (about two hours) of beautiful weather (considering the time of the year) it started to rain again, gray sky. So I changed plans and did some more coding on the KaiView tookit and created a simple homepage at sourceforge :*) First freetype2 and libart tests run nicely. Prototyping in C++ gets harder with each line so I guess I should switch over to TOM soon.

Since I havn't done anything on MindsEye for a while I finally decided to apply for project hosting at sourceforge.net for my GUI toolkit in the works, KaiView. Not much code, yet but maybe I'll get some useful comments or I'll just find out such a project already exists :*)

Here is the project summary I submitted:

"KaiView is a GUI toolkit/framework for writing applications using the TOM programming language. Based on a vector-oriented drawing layer using libart and freetype2 it will provide all of the features you'd expect from a project in early design stage: widget layer with subject/view seperation, forms loaded from XML files, live-updates to the GUI, Unicode support, abstract interactor classes, antialiased everything, and a lot more! (It will just take some time to build)"

I hope It'll get approved, soon ...

Hmm, meant for the "Objective-C" thread, actually, but it seems I'm still not certified, oh well...

Have you checked out the TOM programming language ? It has a syntax almost identical to Objective-C with some nice features from other languages, such as Java, Eiffel, etc.

TOM is a very dynamic compiled OO language (though not quite as "extreme" as Smalltalk) and the runtime library offers garbage collection (Very nice if used to try it "by hand" using C++). Other features:

- multivariant return types.
- nice tuple systax (e.g. "(int, int, int)")
- CLOS-like blocks
- pre/post conditions
- default parameters
- TOM classes are extensible (key feature, read the FAQ!)

The Tesla compiler (written in TOM itself) produces C, which allows inline C (or even C++, hehe) for quick hack language bindings or code that needs extra speed. The complete TOM object system/run-time is accessible from C which would allow using the TOM object system in a C project such as Gtk+, I suppose. TOM methods may be implemented in C directly if necessary. Where these features are not used, the code is fully "cross-platform". Even a TOM virtual machine has been thought about.

TOM message passing overhead is close to Objective-C, a global optimizing compiler is in the planning IIRC.

Unfortunately the Gtk/GNOME bindings don't support the latest versions fully and a recent Debian package is also lacking :^( There is currently no native CORBA binding (so the C binding has to be used.)

From my point of view TOM is a suitable "successor" to ObjC, and would be a viable alternative to many other true OO languages. I'm using C++ most of the time and with a grown community TOM would certainly become my programming language of choice. Establishing a new language without support of a big company won't be easy, as has been pointed out. The basic features are pretty easy to learn, I'd say, ideal for switching from C to TOM :O)

TOM/Tesla is GPL and LGPL.

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!