Friday, December 28, 2007

Debian java packaging and jclassinfo

I've become more and more interested in packaging Java programs recently, and I find that it is not easy for several reasons:

  • There are at least half a dozen java implementation, some free, others non-free, with slightly different standard libraries. I find it all very confusing and error-prone.
  • A fair amount of Java packages depend Sun's Swing graphical user interface, and some others depend on Sun's XML parsing (at least as I understand it); they must therefore go to contrib
  • Java programs need script wrappers, often rather ugly, even more hackish and definitely not reusable/reused
  • There is currently no way to find dependencies of a Java package

I've nearly finished to package jclassinfo, a very useful tool that could bring an answer to some of the problems above, by extracting dependency information from class files. With its help, it could be possible to write something like dh_shlibdeps for Java classes. This would bring a real solution to the dependency problem, and possibly help as well for the main/contrib fight. More information later.

Sunday, December 23, 2007

On vacation !

Well, I'm finally taking a rest at my parent's house for a few days, before coming back to science, Tioga bugs, ctioga feature requests and various Debian Developer's duties.

I wish a merry Christmas and a happy New Year to anyone reading this that actually does celebrate them (at this time in the year) !

Wednesday, December 12, 2007

SciYAG has been released !

Finally, I've released SciYAG ! I actually released it quite a few days ago. And it has seen quite some modifications after that (among which a critical bug fix...). Among the new features, let's name a few little ones:

  • icons for experiments, directories and groups, adapted from gnome and KDE iconset, all in SVG as I discovered that Qt4 natively deals with SVG icons (great !)
  • You can now edit Experiment Groups in the Type view as well
  • Some usability fixes, such as shortcuts for commonly repeated things
  • It starts to actually look good !

I'm starting to use it heavily for my own work, so it will have to improve fast !

Don't use --rename with dpkg-divert

I was hit by a funny bug I had hard times trying to reproduce on libqt4-ruby. I'll try to make a quick summary of the problem:

  • In etch, libqt4-ruby1.8 was conflicting with libqt0-ruby1.8, as they were both providing nearly the same files.
  • Soon after etch's release, cohabitation of both libraries was made possible, thanks to upstream work. However, libqt4-ruby continued to provide rbqtapi, that was also in libqt0-ruby1.8. As the one from libqt4-ruby1.8 was actually providing more functionalities than the other one, I decided to use diversions to take over rbqtapi.
  • Everything was working fine, until a piuparts check showed that on installing etch version, upgrading to lenny and purging, there was things left... More specifically rbqtapi...

It appeared that the lenny package was diverting its own files from the etch version ! All it took was to remove the --rename option to dpkg-divert. As a conclusion: be wary of --rename ! You most probably don't need it !

Friday, December 7, 2007

SciYAG has a search engine now !

I wanted to release SciYAG not so long ago, but it came to me that it was still missing something to be of real interest: a search engine. It lets you find experiments according to data. Code used is real Ruby code, so you get a pretty good deal of power, and it stays reasonably intuitive.

It starts to feel like SciYAG is really getting ready and interesting ! Now, I'll try it rather heavily, and we'll see if it can stand a heavy use with reasonable performance. I hope so, as I did take care about this (although some improvements can still be expected somehow). Oh, by the way, the gnuplot backend is also available for SciYAG now !

Thursday, December 6, 2007

gnuplot-compatibility backend

I used to work a lot with gnuplot. For what matter, I still do. I find it very convenient to write simple models (the one you can solve analytically), especially with the help of gnuplot-mode, a mode for editing gnuplot files and interacting directly with gnuplot, rather more smoothly than the standard gnuplot interface. But, you might have guessed, I don't like how gnuplot's output looks. After all, that's why I did write ctioga!

So what ? I won't use ctioga for playing with my models, as it has not been designed with interactivity in mind, and will most probably never be (that would somehow defeat it's purpose). But I don't want to do the same work twice, especially if the second time is way more tedious than the first...

So I wrote a new backend, gnuplot, whose job is to feed a file to gnuplot and tweak it so that ctioga gets the data of all the plots. Imagine you have a file biniou.gnu in the spirit of

a(x) = x**2 + 2*x + 1
plot a(x), x**2 - x

Then, you can plot both a(x) and x**2 - x with the following command-line:

ctioga --gnuplot biniou.gnu@1##2

Note that it only takes data ! Style is completely dismissed.

Wednesday, December 5, 2007

SciYAG is nearly ready !

I haven't been writing for a long time about SciYAG, but it does not mean that I didn't work on it. For what matters, I've been progressing quite a fair bit, to the point that I consider it releasable. Here comes the current features:

  • fast display of experiments, including quick selection of several experiments and zooming
  • editing of experiment types
  • saving the database in the form of a YAML file
  • editing type-related experiment "meta-data"
  • using experiment groups for meta-data shared across a whole group of experiments (say, same buffer, so same pH values)
  • different views of the experiments (type-based, file-based and group-based)

Although this really doesn't make all the features that are planned (see here for a reminder), it makes something I'd qualify as usable.

Actually, the only thing that refrains me from releasing is that I really should come up with a rudimentary documentation before I do so, and I simply don't have the energy/time/will for that now... Some time later (soon, hopefully) ? I really prefer adding some more features !

Sunday, December 2, 2007

ImageMagick and photos for ID cards

I had to make some ID card pictures for my daughter, and the public machine that I usually use for that was down this morning. So, I decided that I would simply take a picture of her, arrange that into a 13x10cm picture, and have it developed (along with other pictures). My first intention was to use the gimp for that, but, I never learned how to use it, and I wouldn't have a simple way to do that again should I need to.

So I went for the command-line approach, with the tool montage from ImageMagick. The pictures should measure 35x45mm in the end. I used the following command-line options:

  • -tile 3x2 6 small picture fit on the target paper
  • -geometry 700x900 the size of an individual image (not the one of the whole montage); it is a multiple of 35x45 and gives a neat resolution in the end
  • -border 8%x5% -bordercolor white to add a neat white border around the pictures. The numbers are computed so that the overall picture respects (around) the 13x10 aspect ratio

In short, that gives this:

montage -tile 3x2 -geometry 700x900 -border 8%x5% \
  -bordercolor white Morgane.jpg +clone +clone \
  +clone +clone +clone target.jpg

The +clone just tell montage to reuse the last picture used.