Monday, January 21, 2008

Languages :-)

I love languages. Right now I am quite interested in Perl 6 (I just read Simon Cozen's blog), for a couple of years I've been tracking Fortress , a Sun Microsystem's a research project. Now: Fortress needs a really good backend VM. They may have to develop it themselves, they may do that by hacking a Java VM, or they can adopt some other VM. I wonder: How hard would it be to a) strap Parrot (Perl 6's backend) to Fortress (probably not that hard, as these things go) and b) make Parrot run with really high runtime efficiency, the kind needed in the high performance applications Forress is intended to be used in?

I would really, really like to know the answer to b.

Monday, January 14, 2008

"Procrastination laddering" as a productivity tool

Yesterday I discovered that I had discovered a new productivity tool: Procrastination laddering.

First a bit of background. I am an INFP personality type, that means that I always juggle more balls than I can manage, at least it feels that way. I work as a research scientist, I'm a father of four so you can imagine that I'm quite busy. Even so (and in character :), I have set a (wild, hairy) target for myself: To (eventually) learn enough physics to have some form of comprehension of quantum field theory (and String theory ;). Now, in order to that I have to both brush up college math, and learn a lot of new math and physics. All this in addition to my regular duties at work in family.

So how do I do that, and get some progression? Well: I have a list of stuff I need to learn and relearn (basic calculus, linear algebra, differential equations, topology, physics this and physics that ....). The list is long and daunting, and the method I'm currently using is that I always have two topics that I'm focusing on. One quite hairy, one less hairy. The thing is that I'm also a terrible procrastinator, but in this case my propensity to procrastinate can be turned into a effective motivator: I procrastinate by substituting what I feel i should (the really hairy stuff) by something I feel that I want to do right now (the less hairy stuff). When I eventually catch up with the really hairy stuff through more or less steady progress on the less hairy stuff I just set a new really hairy learning target that I can continue my procrastination while still making progress.

It works for me and I call it "procrastination laddering" :-)

Thursday, September 20, 2007

Polish revisited

Now I've played with J2MEPolish for a while, and it it has been an interesting experience. There are some very good ideas there, like using stylesheets and providing a basic GUI that actually looks nice. It is also quite simple to glue third party code into Polish code (when you finally find out where to put the libraries, see previous post about NetBans and Polish).

There are some things that are not so nice. I tried to glue the iLabs XMPP interface to Polish to produce a Jabber/Google Talk chat client. Functionally this worked like a charm, but I discovered that it is impossible to create tabbed forms dynamically. I wanted to make a new tab for each chat session I opened, but nooo, that's not possible: You have to decide in advance how many tabs your application needs, allocate them up front, and keep them for as long as you run your application. To be blunt: This sucks.

Monday, September 17, 2007

William Gibson's "Spook Country"

The short version: "Spook Country" sucks in the same ways that all of his previous novels sucks, but the plot is less compelling than just about any of them since "Mona Lisa Overdrive" (the final book in the "Neuromancer" trilogy). There is too much form and not enogh content in them all, with one exception: "Pattern Recognition". PR was a brilliant book, in strange way reminding me of the movie "Lost in translation". In "Spook Country" some of the people and a little of the environment is recycled from PR, but it just doesn't work. Why does this matter? Well, even at his worst Gibson is able to make my mind go "whiirrr" and spawn new ideas so I'll probably read everything he publishes, even when it sucks :-)

Monday, September 3, 2007

Netbeans & Polish

This is the kind of thing that can take forever, and annoys me to no end: In Netbeans I set up a dependency from my project to another project. The editor recognizes the dependency, and correctly looks up the appropriate .jar file and lets me syntax check my files from the editor.
Nice. I then try to compile, and the paths are all F**** UP. They seem correct enough (and as I said, the NetBeans editor is capable of using them), but none of my libraries are actually located by the compiler.

On days like this the thought of spending the rest of my days as a monk somewhere in the Himalayas seems quite attractive.

Now, when solving this problem a natural place to start is to read the fine manual :-) On page
45 in the complete guide to j2mepolish it says:

J2ME Polish normally calls the Java
compiler normally with the appropriate
classpath as well as bootclasspath for
the current target device.


Well, don't believe it. It's just not true. You can add libraries and projects to the buildpath generated by NetBeans, it simply won't be used. What you have to do is to look at page 182, where the real story is told on "How to Integrate a Binary Third Party API":



When a third party API is only available in binary form, they can
be integrated with the “binaryLibraries” attribute of the element
in the “build.xml” file. This attribute can point to jar or zipfiles
or to a directory containing third party libraries (either jarfiles,
zipfiles or classfiles). Several libraries can be separated by
colons ':' or semicolons ';'. When the libraries are situated
in the “import” folder, only the name of the libraries need to
be given (instead of specifying the full path).

Turns out what you have to do is to stick the files in an "import" directory in the project's top level directory and then put a reference to that into the "build" construct in the antfile . I won't tell you how many hours it took to figure this one out, it's just too depressing.