-->

So many things

April 5th, 2008

are going on right now, I don’t even have the time to blog for a while. Mario’s now working for aicas, which is super cool. Our proposal for the OpenJDK Innovators Challenge has been accepted (yay), which means we will be working on OpenJDK’s AWT, Java2D and Swing stuff in order to make porting GUI backends easier. We also dive into JOGL development, now implementing a JOGL layer on top of Escher. There’s a load of other stuff to do as well, the Jamaica 3.2 release is coming close, the Mercurial transition inside aicas has to be done, the Jamaica/OpenJDK integration too, customer stuff, etc etc. I feel slightly over-worked :-/

To make matters worse, my car decided today to go bonkers. Well, we were thinking about buying a new one anyway, so maybe we have to short-circuit that process now. Also today, Madeleine and Alba have become ill. What a shitty day. Luckily, a postcard from a friend of mine in my mailbox saved my day.

-->

AWT on Swing

March 14th, 2008

Today I discovered to my surprise, that the X peers of OpenJDK also use Swing as painting backend for its widgets (as opposed to the Motif peers that use Motif or Lesstif or whatever). Unfortunately, this doesn’t seem to be done in a very reusable way (==hardcoded in the X peers), as I did with my own Swing peers in GNU Classpath. I mean, it is really nice to have this reusable, because then, implementing a new backend for AWT is basically only implementing the top level components and graphics stack. I wonder, if these could be merged somehow, i.e. the reusability of my Swing peers with the completeness of OpenJDKs X peers. Hmmm, this would have been another nice proposal for the OpenJDK Innovators Challenge….

-->

Have I been hacked?

March 13th, 2008

Today I was notified by Google that they took one of my blog pages off their index. The reason was that this entry contained some hidden content which referred to suspicious sites about ViAgrA, whatever that is ;-). I cleaned this up quickly, and checked the database for more such stuff, but it seems only one blog entry was affected.

But this leaves me slightly nervous. This was not the usual spam comment. It was a modified blog entry. I wonder how that could happen. I usually keep my system up-to-date with regard to security patches (it’s a Debian box), have rkhunter and other tools running in cron jobs, etc. How is it possible that somebody sneaks in content in a blog post (XSS attack?)? The only thing I can think of is that there has been a vulnerability in Wordpress, and it got passed in during the time window until I updated the box (every couple of days usually). I’m still worried. If anybody has some hints what might have happened, and how I can be sure there’s no other weird things going on my box, please comment.

OpenJDK patches

March 13th, 2008

It seems like my criticism @FOSDEM has been heard. Since the OpenJDK repositories have opened up, I see much more traffic on the mailing lists. This includes code reviews, commit messages and everything. Very nice.

Lately, I posted a polished version of an older patch, and just now it has been commited by Alan. That was quick. Seems like OpenJDK is on the right way :-)

Neoangin

March 11th, 2008

Last sunday I took Mario and went to a funny concert of Neoangin in Karlsruhe. Neoangin is an amazing artist. He is also known as Jim Avignon (Neoangin is his musical incarnation, and Jim Avignon is his artistical incarnation). He’s making mostly electronical music with a small keyboard and a mini-disc player, and sings to this. Of course he also creates the stage decoration himself. He sells his CDs for 5€/copy and on the cover it explicitly states that everybody’s free to copy the CD as he likes. So I uploaded one song that I particulary like, the Land Of Banality. Enjoy!

Neoangin Tour 2008

Debugging native code with Hotspot and GDB

February 29th, 2008

The last couple of hours I struggled to debug a segfault some JNI code of OpenJDK. I could not get GDB doing anything useful with Hotspot. Until I discovered the following very useful command line option:

java -XX:OnError="gdb - %p" MyApplication

This fires up gdb whenever an error occurs, and sets up all the libraries etc for debugging. Very nice. Ideally you do this using a debug build of OpenJDK, so get get as much useful information as possible.

Escher on OpenJDK graphics

February 25th, 2008

After a couple of hours hacking I’ve got a small Swing demo running pretty cool on my ‘next generation’ Escher peer implementation:

This uses the JDK Java2D rendering pipeline architecture. The cool thing is, that there are generic implementations for (almost?) everything Java2D. I started out with a bare minimum implementation which only could set and get single pixel. This was awefully slow. I optimized a couple things: accelerated (X Pixmap) volatile images instead of buffered images, blitting between those and the window surface, drawing lines, filling and drawing rectangles and a very simple font renderer. This is already enough to allow large pieces of Swing to render pretty fast. And it covers all of Java2D with no extra effort (but slowly).

Regarding the font rendering, I am not sure why it looks so crappy. I have the feeling that the glyphs are not hinted, but this is the FreeType font engine and it should do hinting (or not?). At the graphics level I only set the pixels that I am told to set. Besides that I have nothing to do with the glyphs at all. The EscherTextRenderer is a simple subclass of GlyphListPipe, which implements only drawGlyphList(). If anybody has a good guess how I can improve the glyph rendering, please comment.

Kudos to whoever designed the Java2D pipeline architecture (I think it was Jim Graham). It is really well thought out in most places. I think I will write up some documentation on how to get started, so that implementing new graphics backends becomes a little easier.

FOSDEM

February 25th, 2008

This year’s FOSDEM has been a great event, as every year. I’ll try to wrap up my personal highlights.

Friday

I arrived in the evening and immediately headed for the Brandweg hacking session and general gathering to the BXL. The waitresses wouldn’t let us go upstairs into our usual location, but when more and more people joined us, they had no choice but open up. I guess they were not really prepared for such an event. In the end they became really nervous that things get out of hand, so we collected money to pay the bill and leave. I went to the hotel then because I was very tired.

Saturday

The keynote talks have been kindof disappointing for me. I couldn’t really relate to the Hollywood and FreeBSD stuff. The patent talk was an interesting update though.

Regarding the various talks I will only mention my personal highlights. All talks have been very cool, but I can’t cover every bit here.

Mark and Mark wrapped up what happened during the last year to GNU Classpath and OpenJDK, and where things are going. GNU Classpath ain’t dead at all,though things slowed down, and OpenJDK is moving towards 100% free software steadily.

Christian Thalinger gave an interesting overview and comparison about the different VM interfaces of GNU Classpath, phoneme and OpenJDK. Especially since I’m porting OpenJDK to Jamaica now.

I was really excited about what Guillaume showed with MIDPath. He did some really amazing work on those little devices, showing off a number of great demos.

My own talk didn’t go that well. I was suffering from a major headache at this time because I didn’t drink anything for the whole day (that always kills me). I think I spoiled the party a little by bashing OpenJDK handling of the community, which probably came around too negative. (Yes, some developers do very good work with handling the community). And to make things worse, my nice demos of OpenJDK-Swing-on-Escher and OpenJDK-Swing-on-GTK crashed because I was trying to run them on a clean OpenJDK, but they require some patches in Swing and AWT. Too bad.

Andrew picked up my own mashup things and introduced Brandweg, a project similar to IcedTea, but in the other direction. (GNU Classpath, patched with OpenJDK stuff where appropriate).

The VM rumble was great, just as last year. Robert gave a good update on JamVM (which goes into a JIT-like direction now), Kaffe collapses to a big shell script that pulls in all the pieces, Hotspot is getting better all the time, and conquering new platforms with Gary’s zero assembler hacks.

In the evening (almost) everybody gathered at the FOSDEM dinner. The food was very good, very expensive and too little for my hunger. Afterwards, a couple of people moved over into a greek(?) bar, where a small but loud YMCA party was going on. Fun, but not good for chatting. I had some nice conversations anyway, geeks are so boring ;-).

Sunday

The first talk I attended on Sunday was Lillian’s and Thomas’ talk about IcedTea. They did some truly amazing stuff, turning OpenJDK into a free software JDK, and plugging the holes with GNU Classpath pieces for the API, NetX as a WebStart replacement and gcjwebplugin/IcedTeaPlugin as browser plugin. Very nice. Thomas also showed some of his work to implement LiveConnect in the IcedTeaPlugin.

The cool stuff section had some amazing projects showing off really cool stuff. Steph showed FBToolkit, a very cool project which aims to provide an alternative AWT toolkit/graphics implementation for framebuffers and other backends. Mario did a very nice presentation about his work on the GConf preferences, Classpath’s Desktop API implementation and about his GStreamer backend for javax.sound, showing off a nice rocking demonstration.  The JNode impressed me very much, despite the technical problems. A whole operating system mostly written in Java (plus some assembler for the very low level device stuff), this is really cool.

Unfortunately I missed the Jalimo talk and everything afterwards, because I had to leave to catch my train. In the train I turned all the fresh inspiration into code and completed a first prototype of the new Escher peers (aka Caciocavallo), which are based on OpenJDK’s architecture for Java2D (SunGraphics2D, SunGraphicsEnvironment, et al). I had a very very first prototype already running before FOSDEM, but this was awefully slow. Now I can already do some Swing stuff at reasonable speed. That’s really amazing (to me).

Escher 0.3 released

February 13th, 2008

Today I released the Escher library, version 0.3. This has long been overdue. Here’s a quick list of changes:

  • Performance has been greatly enhanced. This required an almost complete rewrite of the innards, but is really blazingly fast now ;-).
  • Image, pixmap, window property and fonts support have been significantly improved.
  • The render extension has been extended for glyph support.
  • API has been cleaned up, making many public methods private that shouldn’t be public, hiding fields behind accessors, removing cruft and making use of Java5 language features.

You can find all the code at the project download page. Have fun.

How to use a Linux box as CD player

February 6th, 2008

This might sound like a stupid title. But there are some real gotchas that many might know.

I used to listen CDs using the usual preinstalled setup, namely Rhythmbox and the usual Gnome tools. This has a couple of disadvantages:

  •  The output volume never seems to be correct. Either it is too low, making the music sound thin, or it is too high, driving the amp and/or soundcard into clipping and distortion.
  • The CD drive spins up like mad, using the maximum drive speed. This is annoying because of the noise, and not necessary at all, 1x speed is enough for CD audio playback.
  • There is a small pause between every song, this is disturbing in live recordings, or when songs of a CD are mastered together like on The Beatles’ Abbey Road album.
  • This might not be as important, but is a side effect of how all this is implemented. Instead of playing the digital data directly from the CD into the soundcard, it gets pulled over the bus via libcdparanoia and pumped into the PCM (!) input of the soundcard. This is certainly overkill, because all modern soundcards have a direct connection with the CD drive, and can play directly from CD.

The solution to the first problem is to use alsamixer, a command line tool to adjust the mixer settings. Here you can see for each channel the effective dB gain. Set this to 0.0 for all channels.

The solution to the other problems is to avoid Rhythmbox (or, for that matter, all of the other CD playing tools in Gnome, like gnome-cd, soundjuicer, and whatnot) and use another set of command line tools, cdplay, cdstop, etc. These are found in the Ubuntu/Debian package cdtool. These tools do not use gstreamer, but instead play directly from CD to soundcard.

If anybody knows of programs that accomplish this in a GUIish fashion and integrate nicely with Gnome, please comment. Yes, I know, Amarok is a little better here, but frankly, I don’t like the thing either.