Older blog entries for lmjohns3 (starting at number 15)

Trip to the US

Last week I got to go to the States for an interview with Teach for America. Though the interview was only one day, the whole trip seems to have flashed by in a whirlwind blur of the insides of various airplanes, airports, cars, offices, houses of family and friends, and coffee and book shops. All with the requisite insane security precautions, of course. It was a little strange being back in a place where I could, without effort, understand everything that people around me talked about. And also strange spending a whole week without constant internet access.

The Iraq War was on everyone's mind, in all the places in all the countries that I visited. Among the people that I talked with, there seems to be no support for Bush and general apprehension about aggression in Iraq. I wonder where the supposed supporters of this war are keeping themselves. Maybe I'm electrically repelled from them.

My friend Jon observed that the Iraq situation shows that there can be times when everybody is just wrong : anti-war protesters, pro-war protesters, brutal Iraqi dictators, belligerent and ignorant American presidents, media purveyors, etc. ... nobody seems to have the right answer, whatever that might mean.

German

murrayc : I've found that my German, as bad as it is, generally follows your described pattern of random declensions. It's amazing to me that little children will learn this stuff—and even more complicated stuff—just by sitting around listening to it. Though I suppose if I were allowed to sit around and listen to somewhat-linguistically-helpful people talk to me for two years, with no other expectations of work or productivity, my German might improve too. :)

Coding

So I'm back at work, preparing for a first open source release of the project I've been working on. If you're interested in a code generator for CORBA components and test components, check out the ccmtools project. We'll have a release out this week, as soon as Confix supports multiple configuration files.

Might also get a chance the next couple of weeks to help out with GStreamer a bit. The editor needs some bug fixes, and the docs still need much love. So much typing to do ...

Reading

I picked up Trainspotting in London's Stansted airport. It's an excellent book, very well crafted out of a series of short stories. Next on the reading list are The Poisonwood Bible ; Guns, Germs, and Steel ; and Porno (the sequel to Trainspotting). Reading is so pleasant.

GMUADEC 2003

I'm leaving for Oslo in a couple of hours to finally meet up with some of the GNOME multimedia developers. I'm really stoked about this. Hopefully we'll have a productive few days together, I'd like to get a lot of coding and documentation done. And also see some of the norwegian countryside. Maybe get to see a moose as well, aïe, so much to do !

Work and open source

It's been quite a roller coaster trying to convince our boss to let us open source this project at work. Or maybe a transistor, more like : on, off, yes, no, ... supposedly we get a final answer soon, hopefully the response will be yes. It would be nice to know that the coding I've done in the last 6 months will see the light of day somewhere outside this group of 200 employees.

Realtime CORBA and JACK

I'm getting more intrigued by this "quality of service" concept for distributed applications. Although I'm not terribly familiar with it, JACK seems to have taken a great step forward in the linux world of realtime audio processing. (And hopefully after this weekend we'll have functional JACK elements for quality audio processing with GStreamer.)

But I'm also wondering now if a realtime CORBA element would make sense in GStreamer ; with such powerful interprocess communication it would be relatively easy to write things like a cluster-based audio editing application, or a videoconferencing application. Maybe all these things exist already and I should just stop now. Just thoughts at the moment.

Java venting

I need to vent about Java. Please ignore or read with amusement.

I've been working for the past few days on an IDL parser in Java. The parser includes an arithmetic evaluator for constant value declarations in IDL, like this :

const unsigned long field_value = 88;
const float pi_field_value = field_value * 3.14;
const string name = "foo";

Since constants can be string types or numeric types, the parser has to pass around the constant values as strings, convert the strings to numeric types when it expects to have to evaluate some arithmetic operation (of course throwing an exception when the string doesn't represent a number), then convert the result back to a string. In a language like C or C++ this would be a pain. But, let the angels rejoice, it's also a pain in Java !

Consider this short example program to convert two strings to longs, add them, and convert the result to a string :

public class Dumb {
public static void main(String args[])
{
long a = Long.parseLong(args[0], 10);
long b = Long.parseLong(args[1], 10);
String result = a + b;
System.out.println(a+" + "+b+" = "+result);
}
}

Originally, I wanted to just make two Long objects and add them together. But in Java you can't add two Long objects together* (specifically, the java compiler informs me, "operator + cannot be applied to java.lang.Long,java.lang.Long"). Grr.

Just for comparison I wrote a functionally equivalent Python script :

from sys import argv
a = long(argv[1])
b = long(argv[2])
result = `a + b`
print "%d + %d = %s" % (a, b, result)

The ratio of bytes of source code in the two examples is 112/213 ~ 0.523. So it looks like there are about two characters in my Java code for every useful character in the equivalent Python code. Is the compile-time security of strong typing worth having to input twice the code ? I'm not convinced. Particularly because Java containers like Hashtable can only store Objects (which is an extra pain when you want to store a number in a hash table, see *), Java's type safety is often reduced to the whim of the programmer. I am aware that Java will be coming out with C++-like templates sometime soon, but it just seems like so much extra grunt work.

13 Feb 2003 (updated 13 Feb 2003 at 23:18 UTC) »
Interaction

raph (and others interested in trust and trust metrics) : I don't know if you've already seen this, but I recently found out about an interesting global trust survey published by the World Economic Forum ; the page is called "Results of the Survey on Trust."

jfleck : Thanks for the interesting link. I personally found this excerpt from the memo just a wee bit disturbing :

CNN-TV audio feed will undoublty be our first on air coverage.... They were first by a mile in 1991 during the Persian Gulf War and again on September 11th. Despite all the news sources out there they are the best in spot situations and could be first again.

jamesh : Thanks for the info about GTK. I figured that GTK would flip the orientation of widgets like labels and such, but didn't realize that it would also change the display order of the elements in other widgets. Nice.

Reading a page on widget alignment from the Aqua interface guidelines helped me realize something that's been bothering me about the GNOME interface guidelines.

The GNOME guidelines give a suggested technical dialog box layout consisting of a series of nested boxes. The top-level box is a GtkVBox, with alternating rows for labels and control groups. The first row of the vbox should be the section header label. The next row should be a GtkHBox with a label as the left side element and a GtkVBox as the right side element. The label on the left should contain four spaces. Each row of the box on the right should contain controls logically associated with the given section header.

How can this possibly be localization-friendly for cultures that don't use left-to-right writing systems ? With a single vbox containing controls, it would be easier to localize (but probably harder to parse visually). But with the suggested layout, an hbox that contains a (generally anonymous) blank label on the left side will always indent the control groups away from the left edge. Indenting from the right, which one might want in Arabic locales, would require rearranging some of the GUI at the application code level. This doesn't seem like something that pango has any control over. I don't get it.

That said, I think the GNOME guidelines look really good, for my locale. :)

Flu and coding

Got the flu/grippe last week. It sure was strange to get up and go outside after four days of sleep, reading, and a little typing. But thanks to the time off from work I got started on Berty Russell's Marriage and Morals, and I got some good work done on a couple of personal Python projects. Yay Python ! Also, epydoc is really quality.

Boost.Python

At work I'm trying to use the Boost.Python library to wrap CORBA components (written in C++). Seems like a neat library so far. The Boost.Python tutorial is quite helpful as a beginning reference, I think. Might try to help with some of the reference docs if I get a chance.

Peace protests and economics

I got to thinking the other day that folks out protesting about a war for oil in Iraq would be more effective if they stopped buying gas. Is that true, even ? I wonder how many people have actually done this. I'm a car owner myself (though I'm currently not in the country to use it), but I don't think I could personally go as far as selling my car. But using my bike or feet (or taking the bus, or whatever) in lieu of burning more gas just seems like a good idea in general : more social interaction, less pollution, more exercise, etc.

I think there's a lot in the States that can improve (or even just become more of a visible issue) if more people put their money into it : public transportation, public education, more publicly funded arts and sciences, etc. Is economic freedom the only true freedom in the US ?

bgeiger : Hey, that's a pretty high probability observation there ! I've been mighty curious and clueless about the chalst list myself. It's also reassuring that the low diary ratings from a low-rated individual seem to have had little overall effect : evidence for a functional Advogado ?
bjf: Just use your rating power. I think the advogato network is functioning fairly well (although it does seem a bit skewed toward over-certification).

Vocabulary

robocoder: I appreciate and share your disappointment with writing that's difficult to understand. Notice how many of the words you mentioned came into English from Latin (usually through French) ? It's interesting to see if non-Latin counterparts exist for some of these words (thanks for your links to the dictionary, btw !). Consider : repertory ~ storehouse, burgeon ~ grow, ameliorate ~ better, lacunae ~ gaps, armamentarium ~ tools, obeisance ~ bow, pejorative ~ belittling, boustrophedonic ~ do what now ? :-) It is interesting and useful to expand one's vocabulary, but writers who refuse to step out of a more elitist vocabulary level really annoy me.

Coding

Been working a lot on this CORBA component generator tool, completely rewrote the Python parts in Java (yuk, but it makes for a much cleaner build process). Finished the local C++ component generator, useful for generating components that run in the same process and can communicate directly. Working now on implementing a generator for remote C++ components, components that run in separate processes and have to use CORBA for communication. Hopefully we'll convince the management soon to let us open source the whole project ; I think it's too useful not to.

Contributed a few things to Confix as needed for the generated component code.

Also got back to working on GStreamer a little, and even managed to fix a couple of bugs, which was nice, in preparation for the 0.6.0 release. It's quite educational and fun to get to work on a large(r than one developer) project. Hope to get Jack and Alsa support working much better in the next couple weeks.

Coffee and other stuff

I get the jitters when I drink coffee, but I can't help it. Coffee is good. Went boarding this weekend at Klippitztörl, the weather was beautiful. Got a cold (before I went skiing) but forgot to bring kleenex to work. Doh !

dyork : I'm down with the busy. But as long as it's good busy, it seems to be ok ... still, it's frustrating sometimes to know that you could be working on fun free software projects when you've got to be doing other stuff (like commuting. blech.).

And what's up with the linux-audio-dev mailing list sending out messages like they're on crack ? I subscribed on Sunday night and had 60 new messages when I got to work the next morning ! Good grief.

Thinkpad battery

My Thinkpad battery started to die last week. I'm pretty sure it's related to the cold weather sweeping in. (I suppose some tradeoff has to be made for all the beautiful snow.) At any rate, the symptoms are the same as before : The battery discharges normally until it's about 1/3 full and then suddenly drops to empty. This sudden drop cuts the battery life to about an hour (the original life was about 2.25 hours, back in April or May). Fortunately, Raph's Thinkpad 600 battery problem page has a hint from Javier Valero about covering the pins that communicate the battery level (but only while discharging !). So far, it seems to be working well. Thanks, Raph and Javier.

Work and code generation

We finished up a very preliminary version of our component code generator, which is pretty exciting. This tool can generate CORBA component logic by reading an IDL file (specification version 3.0) ; the only code a person needs to write is in the interface function implementations (the "business logic"). When we compiled and ran the first test component, we all wandered out en masse from the R&D floor and scoured the building for beer ... but (strangely) finding none a coworker had to drive to town to get some. :-)

Since the generator is written in Java and Python (Jython)—and because Jython can't follow symbolic links when importing packages—the path config stuff was a headache, to say the least. So I've spent the last week or so translating the Python into Java, which is kind of amusing. I guess I just think anything involving Java is amusing. Any language that has a split() but no join(), or that routes you through three classes to get a useful file.readLines() method is pretty silly, if you ask me.

Props to braden : checking out OpenVRML helped a lot in smoothing out the automake build process with Java.

Open source development at companies

So now we've got this useful tool, and some documentation and examples for it as well. Wouldn't it be nice to share it with the rest of the computer science community ? Well, I think so, but I work at a company ... that makes money by writing and selling proprietary software ...

But fortunately my coworkers are big Open Source fans (shameless plug : check out confix, just released by a coworker), and our department manager is as well. So maybe we'll be able to convince the boss boss that we should release the project.

What happens if we can only release part of the project, say the API library that the generators use ? Would that be worse than releasing the whole tools package, or ... ? I tend to think that any movement towards Open Source that a company makes would be positive. But there might be drawbacks, I don't know. Is it acceptable to release code as Open Source even if the motivation behind such a release is to leech free testing and bug reports from the user community ? I've thought about this ever since starting this project, but I haven't had any truly productive thoughts yet. Suggestions welcome. :-)

It's been a little while since I posted. I'll try to make this worthwhile.

Java and automake

I think I may have found a shape that is both circle and square at the same time, at least in the sense of trying to fit a square peg into a round hole. For the past couple of weeks I've been trying to integrate my project at work (a CORBA 3.0 code generator) with GNU automake. Normally (read : if this project were written in C or C++, or even if I could use GCJ), this would be no problem, and I could even get libtool to help in writing shared libraries. The thing that makes this task interesting is that the project is written in Java, Python, and Jython.

Automake's support for Java is fairly on the sketchy side at the moment, but it does try, and it seems to me (a complete beginner on this particular task) that automake could (almost) fully support Java eventually. Similarly for Python. (Thank goodness that s/python/jython/g works for Jython in the M4 aclocal script, so Jython can get wrapped up in with Python in all these comments.)

So far, there are two difficulties in my wanderings :

  • Automake does not support Java the way I want it to, meaning that it does not directly support building and installing jar files instead of class files. (This is compounded with the difficulty that Sun's JDK javac byte compiler is a pain and won't (a) create a build directory automatically for you when you give it the -d option or (b) tell you what version it is. Sorry, just had to complain there.)
  • Python has its own build and install program, distutils, that works beautifully, but only for Python (and the Python parts of a Jython program). Integrating distutils with automake somehow would be a blessing from heaven unknown since the likes of purchasable packages containing parallel pieces of bread, identically sized, that came from a single loaf.

So, the result for the time being is what any beginner in these domains would do : a hack. (At least I keep telling myself that any beginner would do this.) In the various *-local targets of the root Makefile.am and in directories where there are Java source files, there are some simple-but-theoretically-unnecessary shell scripts, just for loops and ifs that copy various files to various places. Nasty, effective (on my machine), could be avoided, but currently necessary.

Automake itself

All of this learning about automake has been enormously instructive, though, and I am sure I have gained more from this little tangent than hacking up some customized makefiles would have gotten me. In the process, I got to read the automake manual, the autoconf manual, an interesting Advogato article from a ways back, several mailing list threads on various Java and automake problems, and automake info for other projects. It does indeed seem like these auto* tools, while functional, helpful, and particularly a boon to the user and platform independent builds, are still not all they could be.

I am a Python fan by heart (but really have no problem with other languages, just haven't learned them as well ... yet), so I tend to lean in the direction of a Python/XML solution for building packages. I think Perl was an excellent choice for automake, though, so perhaps there just needs to be more hacking on automake. I'm not trying to complain about automake here ; on the contrary I think these tools are nice enough to warrant further work.

Social life

Huh ? I still haven't found out how people manage to program, contribute to Open Source, and have a social life of any kind in any sort of simultaneous manner. If anyone has tips, please lay them on me. :) It's frustrating to want to contribute something to the greater good of the software world, and to also want to spend the evening at a bar, and to also have to go to work. Seems like Kant and Bentham would have much to contribute on this issue. These automake issues have brought this question once more to my mind, since I feel it would be a significant contribution to try to add Java (and Python !) support to automake, but I already have so much going on. Maybe I can con my employers into letting me work on automake for work ...

6 older entries...

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!