Frames and Forms

Today I implemented frames and form-submit support for GNU Classpath’s HTML renderer package. This completes (API-wise) this package against JDK5. Of course it’s sill full of bugs and doesn’t support every HTML/CSS feature out there, and not even what is supported by the reference implementation. Ah and coincidentally this also API-completes Swing up to JDK1.3 and almost (one method to go) from JDK1.4.
OTOH, the new frame support implements yet another feature that the reference impl can’t render correctly, which is frames in a grid layout. So we’re getting into a situation where we support CSS or HTML features that the reference doesn’t and vice versa. I am really looking forward to a possible merge in half a year. Let’s see what we can improve until then 😉

JGecko cooler than IE7!

Look and decide for yourself. The one important Intarweb page how it is rendered on IE7 (left) vs GNU Classpath (right):

Thanks Dalibor for finding that and Stuart for sending me this little screenshot.

I would like to add that I am not happy with the name rkennkezilla as suggested by Mario. The HTML widget stuff pulls together the work of many GNU Classpath developers, maybe more than any other package in GNU Classpath.

And yes, this post is completely serious, no kidding folks! 😉

Dear Mr Shuttleworth

When you are so worried about the Freedom of software and collaboration, why don’t you start with your own project and do not include proprietary drivers in Ubuntu? While it might be more short term fun for the blink addicted, it is a clear slap in the face for the Free Software community. This is no use for any FOSS project, not for the free driver developers, not for any other distro and (most importantly for you) not for Ubuntu.

  • Free driver developers don’t benefit from that move because they will not get that much bug reports from Ubuntu users.
  • Other distros / projects don’t benefit from that move because the development of the closed drivers is, well, closed.
  • Ubuntu itself risks to loose quite a bit of its momentum when FOSS developers and advocates get pissed off by that move. It’s like if you tricked them to use and advocate Ubuntu because you made a big show about beeing all Free and all that, and then you slap ’em in the face by including binary-only stuff on the install CD.

GNU Classpath is quite a good example that shows why it is important to stand for Freedom. Would Red Hat/Fedora have gone the Sun-Java route in the past and not invested in the GNU Classpath project, we most likely wouldn’t see Sun GPLing Java now.

When one of the most important distros includes binary drivers, then it is much less incentive for ATI and the likes to release their drivers/specs under free terms. OTOH, when such an important distro takes a stand for Freedom, this is much more likely to put pressure on the vendors.

So, please do support the free driver developers and don’t shoot them in the back.

Update: In order to pull a reference to my last post, and because it fits so nicely, let me rephrase Let’s Impeach the President:

Let’s impeach the president for hijacking our religion and using it to get elected. FLIP: Our work on Ubuntu is driven by a philosophy on software freedom that we hope will spread and bring the benefits of software technology to all parts of the globe. FLOP: All of the application software installed by default is Free Software. In addition, we install some hardware drivers that are available only in binary format

Update 2: Planet Ubuntu is now also featuring some articles from Ubuntu developers getting concerned. That makes me hope that Canonical thinks again.

Living With War Today

I already posted about this great album. However, today I was visiting Living With War Today again and found that there’s not only the complete album there, there’s also a complete video clip for each song and a making-of video for each song available right there. Plus tons of articles and other great music and videos. You can even post your own clip if you feel like it 😉
My clear favorites are still Restless Consumer (Don’t need no more lies!), Shock and Awe (these trumpets! I’m melting), and of course Let’s Impeach the President (a Moore-like anti Bush guitar hoedown). While I already knew all of these songs, these pictures are giving me the creeps again. Powerful stuff.

Unfortunately the content is not in free media formats, despite all being about Freedom. I already pinged the guys behind all this and they reacted quickly and quite positive, but unfortunately can’t seem to figure out how to convert all this stuff to Ogg. A real pity. That’s really a sad thing, that even when you’re willing to do it, it’s still not exactly trivial to do so. Dalibor and the Sun guys could tell a story here I guess..

Update I realized just now that Neil released another CD/DVD set of that album with the raw mixes (without that choir. wasn’t the best thing anyway) plus all the videos and additional stuff and of course the original album. And a new album with a 1970 live performance remastered and a new album is also in the works. Wow, that guy’s productive, given that he’s already >60 (and had some serious health issues last year). And it’s not that he ever had long resting pauses between anything he did (like other bands of that age). Maybe he thinks he has some more jobs to do as long as he is on earth 😉

When I was a virus writer

Just now I remembered (loudly on IRC) a fun little story from my time at school, when I was around 16. That was when I wrote my first virus. It should be said that this was the good old times with MS DOS. Personally I was still hacking around on a C64. But at school we got this new pool with PCs and such. So what I did was opening up a text editor, create a file with the content ‘I am a virus’ in it. Save. Rename to virus.exe, put it up in C:\ . Eventually, my teacher found that file. Guess what he did? He shut down the whole new pool for several days. And mind you, we didn’t have network etc. As if computer viruses could be transmitted just like real viruses through the air!

Encouraged by this success, I wrote another virus (my last one actually). This time it was a real program. Written in QBasic. Remember this? This MS invention that shipped with MS-DOS 4 or 5. This small program painted a nuclear explosion on the screen. Not what you would expect from nowadays 3D graphics of course, only some white circles in some cool fashion. I linked that into the autoexec.bat so that it fired up right after booting the computer. Fun for me 🙂 Unfortunately, my teacher already knew me by this time and did not shut down the pool again :-(. That was when I gave up my career as virus writer and became a honest hacker.

How To Make Love

I’m finally closing bug #23505 (the HTML RFE) now. The HTML implemenation in GNU Classpath is by far not complete (can it really? Even Firefox doesn’t pass the ACID2 test yet). But we have a fairly reasonable and complete HTML renderer now, which should be enough for most uses of HTML, which is some formatting on buttons, labels, etc, plus (hopefully) simple help pages and similar stuff. The biggest gaping hole is frame support, which isn’t exactly hard to implement, but which I simply haven’t done so far and which I don’t consider super important right now. Another thing is the lack support for actually submitting forms. I will address both issues (and other remaining stuff) at some point. But right now I’m focussing on completing my font work.

Update: Mario was so kind and hacked a logo for the upcoming jgecko browser (lets seed out some rumours 😉 ):

Browser logo

Closer to JGecko

Some more significant improvement in the HTML rendering engine of GNU Classpath:

Japi rendered via GNU ClasspathPlanet Classpath rendered via GNU Classpath

And in case some of you wonder why I’m doing this, now that the JDK will be open:

  • It isn’t open right now.
  • It’s a heck of fun to do this
  • Classpath might actually improve here over JDK (already doing so for some CSS stuff like borders and padding)
  • Did I already mention the fun thing? 😉

And as soon as it becomes open, I think I’d even offer my improvements to the OpenJDK project.

TrueType gridfitting in Classpath

During the last couple of days I finally got my hands a little dirty with hacking the first bits of the TrueType gridfitter for GNU Classpath. Gridfitting is a key technology in TrueType font rendering, as otherwise you might get very bad rasterization, with buckles and missing pixels etc.

My goal is to adapt the automatic gridfitter from FreeType in pure Java. This will bypass the TTF bytecodes that Apple holds patents on. This seems fairly straightforward as the FreeType code is nicely clean (well mostly), and even implements some kind of object orientation. My guess is that I
will have something working by the end of the year, maybe earlier.

I’m trying to design this carefully, so that we can probably plugin the real TTF gridfitter when the patent expires some day. For the start I will implement the gridfitting for Latin chars only, but leave room for extensions (this interface also adapted from FreeType) so that this can be implemented for CJK and other fonts too.
When this thing is finished, we will have a reasonable usable 100% Java font rendering stack in GNU Classpath, the core TTF engine by Sascha plus the rasterizer (AbstractGraphics2D) and the gridfitter by myself. This might not be of much use in a desktop Linux world, as we already can use the CairoGraphics2D and FreeTypeGlyphVector implementations directly. It will be useful however for embedded systems, all platforms where we don’t have FreeType/Cairo (.NET maybe?) and projects like JNode. And for people who happen to like pure Java, if only for the fun of it 😉 Stay tuned for updates.

PS: This work will even be accompanied by extensive documentation about the inner workings, as I have to do something like this as part of my study.

First Rays of a New Rising Sun

‘Right there over the hill you see the first rays of a New Rising Sun’ was what Jimi Hendrix said at the final Woodstock morning, after 3 days of rain and a couple of years of the hippie era, which at this time was riddled by drugs and apathy. He probably envisioned a new era starting up, which unfortunately didn’t really happen, except if you count John Lennon’s activism. And no I don’t see any (often cited) parallels between the hippie movement and the Free Software movement, despite both having ‘Freedom’ right on their forehead and often longish hair and beards 😉
So Sun is going to release Java under the GPL (+ex). That’s really awesome great news! That is really a surprising and bold move by Sun and I think this is the best thing that they could do to get their Java ship running well again. Not only is this a good thing for the Free Software community, which has long wined about the Java situation, I think this is also good for Sun. Now they can really embrace on Write Once Run Everywhere. Sun themselves so far were not 100% able to deliver their runtime for every kind of platform. Now the community can help out and get Java running on whatever platform you could think of. Just look at Kaffe (aka the NetBSD of the Java runtimes). Sun wouldn’t care about most of the supported platforms of Kaffe. And rightly so. Only now is the community that cares about these platforms able to lend a hand in porting Java over.

So what about the future of GNU Classpath? I can only speculate now, the chestnuts are too hot right now (and probably get even hotter), but let’s try anyway. And, this is from my developer POV only. The fact is that now there is really no hard need for the GNU Classpath project anymore. But I want to raise two aspects here: 1. Many projects are built around GNU Classpath right now. It won’t be exactly easy and trivial to port them over to Sun’s libraries. Surely, it can and will be done, but for the time beeing GNU Classpath is still needed. (And could IMO provide a migration path). 2. The development environment of GNU Classpath is much more flexible right now. This spirit of hack – test – commit is part of what makes GNU Classpath attractive for developers, including me. I don’t think that this will be possible with Sun’s code, and rightly so. So, what I really would like to see would be a development process on Sun’s (and our) side that would allow hackers to hack on whatever project they like, and let one project include code from the other. Now, that is not an easy task and might not be possible at all. But let’s dream for a moment (man, those endorphines seem to be high today 🙂 ). So, I think both codebases will peacefully coexist for a while, and most likely converge too quite a great degree. If at a later point they merge into one or if they will continue to coexist, time will tell.

For the Harmony people, I feel a little sorry right now. They won’t be able to easily include Sun’s code for some more time. But, the GPLv3 is there at the horizon, and hopefully this will be even more incentive to get the GPL vs APL issues worked out.

Last but not least, THANK YOU SUN! Now we’re sitting in the same boat. Lets go together and bring that ship to new glory!

Rock and Roll will never die

I am continuing my work on HTML in Classpath. Last days I implemented rendering of lists, borders and tables. Here’s some screenshots of what it can do right now:

The CSS borders implementation triggered a funny discussion on the MLs if we should stop hacking when we get better than the RI. In this case I implemented some more sophisticated border attributes of the CSS spec, which the RI doesn’t handle right now.