Mark J. Wielaard Diary

Posts from September, 2004

New screenshots, demo code and gcc performance

September 24th, 2004 at 15:09
Permalink | Trackback | Links In |
No Comments

Grzegorz posted some free swing screenshots to show what is possible now with compilers and runtimes based on GNU Classpath 0.11 (which he is integrating into SableVM now). These are mostly random pieces of (”real world”) swing code that now also work with our implementation.

GNU Classpath 0.11 also comes with GNU Classpath Examples which tries to provide a real complete demo environment for Free Swing, and AWT. The nice thing about GNU Classpath Examples is that it shows real working code that you can use now with any GNU Classpath based environment. We need more such examples. Paul Fisher gave me the source code for a simple Animator applet that I will integrate soon. But simple examples of how to use Collections (java.util), Regular Expression (java.util.regex), IO Streams (java.io), Internationalisation (java.text), 2D graphics (java.awt.geom), database access (java.sql) etc. etc. would all be really appreciated. I hope that when GNU Classpath 1.0 is finally released it will come with lots of example code that shows how big, powerful and easy to use our library actually is.

Both Robert and Grzegorz have noticed that JamVM and SableVM, and I guess all interpreter like code, degrades a bit with newer GCC releases. Interested GCC developers might want to read the analyses of Robert for JamVM and the analyses of Grzegorz for SableVM.

GNU Classpath 0.11 developer snapshot

September 18th, 2004 at 20:09
Permalink | Trackback | Links In |
No Comments

We finally managed to release the GNU Classpath 0.11 developer snapshot. Highlights:

Inclusion of full javax.crypto, javax.security, javax.net and subpackages. Complete implementation of java.awt.geom. GTK+ 2.4 AWT peer implementation for AWT FileDialog, better java.awt.image LookupTable, Kernel and BufferedImage support. AWT 1.0 Event Model implemented. New Swing classes (Spring, SpringLayout, JMenu, JPopupMenu, JColorChooser, JComboBox, JTextField, internal JFrame support and start of JTable and JTree implementations). The Collection classes have seen extensive documentation updates. GNU Classpath Examples have been added - a GPLed demo framework for AWT and Swing.

And that is just the big things.
Progress has been amazing these last two months. 26 people contributed real code and were mentioned in the ChangeLog. Mauve now has 17102 tests of which we pass 16816. GNU Classpath 0.11 is 235,380 SLOC according to SLOCCount, which is (ignoring the external directory since GNU JAXP is now a separate package) almost 30.000 SLOC more than 0.10, or (using the Basic COCOMO model) a bit more than 8 person months of work. Not bad for two months real time. That is 180+ CVS commits in two months, which means on average 3 commits each and every day (including holidays and weekends).

Sadly I have still not recovered completely from a hard disk failure last month. So I only stress tested 0.11 on JamVM (it works out of the box with the 1.1.4 and the new JamVM 1.2.0 release). But it should also work out of the box with kissme (which really could see a new release since CVS is a lot better than the latest release) and jikesrvm. Steven reported success with JikesRVM and Eclipse 3.0 last Friday, which is good news since although it starts up now on GNU Classpath based runtimes it doesn’t actual run very well yet. Tom Tromey also reports about getting Eclipse working with the gcj BC ABI branch from time to time, but it is not clear whether this is 2.1 or 3.0.

(GNU Classpath Hacker Hint: If you already have jamvm installed, it ships with Debian these days, you can easily make it use a GNU Classpath CVS build by giving it -bootclasspath/p /usr/local/classpath/share/classpath/glibj.zip -Djava.library.path=/usr/local/classpath/lib/classpath.)

Work is already on the way to make the 0.12 snapshot release another big improvement.
Casey submitted his jar signature verification code, Jerry Quinn submitted patches to improve java.awt.image ColorModel and Raster, David has added even more Mauve test (just committed about 850 new tests and more are in the queue), rumor has it that Michael has part of the javax.imageio framework done which, Anthony created a free jnlp api and Peter, one of the JAmiga hackers, is working on a free KVM compatible classpath library and Tom seems to happily add more and more of the generics framework.

Go team! Go!

More java.awt.geom, more JFreeChart

September 4th, 2004 at 13:09
Permalink | Trackback | Links In |
No Comments

Cleaned up my ugly hacks, Graydon Hoare explained which asserts were real and which were bogus, Michael Koch created a real patch for TextArea and I added the latest java.awt.geom work from Sven de Marothy to the gcj gui branch. A nice screen shot of a Pie chart, Meter chart, Compass plot and a Wafermap chart show that much more of JFreeChart is now working. It is still very slow and not all charts show up correctly, but it is a very nice start.

To play with this you have to follow the instructions of Thomas Fitzsimmons on Creating a GCJ-based Java GUI development environment with JHBuild which will give you a gcj gui branch build with the latest cairo Graphics2D support. Then you can just download JFreeChart and run the demo with gij -Dgnu.java.awt.peer.gtk.Graphics=Graphics2D -classpath jfreechart-0.9.20-demo.jar:jfreechart-0.9.20.jar:lib/jcommon-0.9.5.jar org.jfree.chart.demo.JFreeChartDemo

Now back to my real work, preparing a new GNU Classpath snapshot, which will hopefully contain much of the above new stuff.

Documentation, tests and JFreeChart

September 2nd, 2004 at 11:09
Permalink | Trackback | Links In |
No Comments

GNU Classpath is going very strong. We got a couple of new hackers helping out and some of them concentrate on Documentation and Testing of the whole library. One of them is David Gilbert of JFreeChart fame. He has written hunderds of new Mauve tests. This has not only found a couple of bugs in our library implementation, but it also makes us sleep a little better. It is comforting to know that if we make mistakes in the future there will be ten thousand mauve tests waiting to point out any new regressions.

Since I know David would like to see JFreeChart part of a complete Free Software stack I made sure that we can at least run the JFreeChart demo program on the gcj-gui branch. The screenshot looks very nice. Unfortunately it isn’t production ready yet. I needed to make a couple of ugly hacks to work around some text (pango) issues when cairo is enabled. It needs the (currently not default) –enable-gtk-cairo configure flag to build the cairo Graphics2D implementation on GTK. And then you need to run the program with the right system property set to get your AWT Components a real Cairo based Graphics2D object with gij -Dgnu.java.awt.peer.gtk.Graphics=Graphics2D. As you can see on the screenshot there are still a couple of visual bugs in our library. And it is actually pretty slow. But seeing such a large and cool free software library starting to work together with GNU Classpath and gcj is really satisfying. I’ll try to clean up my hacks and get it all into CVS soon so we can play with this a bit more when the GNU Classpath 0.11 snapshot is made on Monday. But no promises since some of the workarounds I needed are pretty ugly and I can imagine Graydon objecting to his code being vandalized like I did. (There might have been a reason for those asserts triggering, and just removing them might not be the cleanest solution…)