Archive for August, 2005

Refactoring C++

In preparation for a demo I’m giving soon, I’ve been playing more
with the new CDT release. I think the biggest change is
support for refactoring. In my little experiments I was able to
rename classes, macros, methods (though I haven’t tried virtual methods
yet), functions, and variables. Pretty cool!

The way this works under the hood is that they have a C and C++
parser written in java (which understands GNU extensions as well).
Renames are handled by using the parser’s AST to find the appropriate
locations to modify. This way they don’t end up renaming in places
that use the same name but which refer to different objects.

I suppose they wrote their own parser for the classic reasons:
the perennial favorite, license problems; and the fact that the GCC
parsers aren’t exactly reusable. In Java, pretty much everybody
writes their programs as reusable libraries. In C, pretty much
nobody does.

Random idea of the day

I recently read that the PIDA IDE has
integrated support for pastebin. This seems like a great idea to me
– I often think about ways to more fully integrate irc into my
development experience.

Bots are doing a lot of nice tasks these days — the CIA bot, bots
for talking to bugzilla, and bots for tracking tinderbox results.
This all seems to be done piecemeal, every project does it
differently.

It might be interesting to run an irc bot inside eclipse and have
it automatically integrate different things. The pastebin idea is one
– it could upload code on command and post the URL to the channel of
your choice. Another would be to recognize bugzilla references (or
perhaps URLs) and show them in the appropriate Eclipse view. Thinking
bigger, perhaps ways to share development tasks via irc (or some more
suitable, and more secure, IM); say shared debugging, where gdb is
running on one person’s machine but both developers have a UI showing
what is going on.

Eclipse Happenings

The CDT
3.0
has been released. This is good news, though I’ve had a bit
of trouble getting it to work well on FC4. I think there may be some
kind of gdb version clash, but I’m not sure yet. Unfortunately the
CDT still has a ways to go before it can catch up to C development
tools on other platforms — e.g., Apple has “fix and continue”, but
the underlying Linux C tools still don’t support this sort of thing.
(This is one of the reasons to write in java — the tools are
undeniably better. More on this topic some other day.)

The KDE-Eclipse project
looks pretty cool. It seems to provide the long-awaited autoconf
plugin.

Eclipse and Classpath

The last couple of days I’ve been trying to see how easy I can
make it to work on GNU
Classpath
from inside Eclipse. Since the big merge in
libgcj, working directly on Classpath has become the preferred mode of
development, at least for most ordinary library changes.

To this end, first I updated the Eclipse build infrastructure in
Classpath. This had rotted a little from disuse; I had to update the
java build paths a little. While I was there I also added a build
rule to ensure that some generated java files were created, and to
ensure that the native code was built (at the moment it is set up so
that the native code is only built when something in that directory is
modified — a nice feature I didn’t know Eclipse had).

Next I turned Mauve
into an Eclipse project. It depends on having a classpath project in
the same workspace and uses the just-built GNU Classpath as the
bootclasspath to build against.

So, at the moment, you can try this out very easily:

  • Fire up Eclipse 3.1
  • Check out GNU Classpath and wait for it to build
  • Check out Mauve and wait for it to build
  • Hack away

For best results, you will also want to install the ChangeLog plugin and the
Bugzilla plugin
.

I think there are two logical next steps. First, we convince
Robert to put JamVM into
cvs (right now you can only download the tar files) and set it up as
an Eclipse project. Second, we add a JamVM dependency to Mauve and
make some shared launch configurations to run the test suite.

With these two changes in place, working on Classpath will be
pretty easy. You will then be able to run the test suite and see any
failures at the touch of a button (or, likewise, run the visual tester
against the just-built Classpath). With a little scripting we can
have it show just regressions.

This would be a good stopping point. However, there are a couple
of Eclipse plugins that we could write — and that hopefully someone
will volunteer to write — that would make life even simpler.

We could have a plugin which understands Mauve. For instance it
could scan the sources to determine what tests are available, and
provide a tree view so that the developer could select what subset of
tests to run. Also, it could automatically track test results, show
regressions in a nice way, and perhaps provide a way to jump directly
from a regression to either the test case or the corresponding class
in Classpath.

Another idea is to have a plugin that understands japi files. It would
work a bit like the FindBugs plugin and would
immediately flag API bugs as errors while you type. I think this
could essentially eliminate a class of (occasional) bugs.

If you wanted to get super-crazy you could write a plugin to make
a patch, massage the ChangeLog entry into shape, and then compose and
send a note to classpath-patches. This basically the final frontier
in integrating Classpath’s (somewhat antiquated, I suppose) processes
into the IDE.

I know! Eclipse.org or the FSF should sponsor their own SoC. And
put me in charge!

Other Eclipse News

The Eclipse world is pretty huge, I don’t really follow it all. I
did think the new Eclipse/XUL project
sounded interesting though. I like to hear about ways that Eclipse
can integrate or even simply interoperate with different parts of the
open source platforms. (Note that the URL has “sex” in it, so odds
are that you can’t visit it from the machines in your public library :-)

Some good patent news

I read recently that Red
Hat will help fund programmers seeking to get patents
. This seems
like a great idea to me, I’m glad it is happening.

Music

Ever listen to 80s pop/funk where they run the singer’s voice
through some synthesizer thingie? Well, I have. And yesterday I
heard a song like that on the radio and started writing my own. I
only have the refrain so far:

Cylon on the dance floor,
Cylon on the dance floor,
By your command

My Own Talk

Naturally I didn’t take any notes during my own
talk, so I forgot to mention it when I wrote up the events of Thursday
at OSCON. Oops.

This was not the best talk I’ve given. In fact I would venture to
say it was pretty bad overall. To me it seemed a bit flat and boring
– next time I need a punchier topic and presentation. Most of the
questions were about Harmony, which is interesting but also a bit
depressing in a way. Elyn said that there were about 30 people in the
audience, which is less than I would have liked, although still
respectable.

Still, it wasn’t a waste of time. Just showing up meant that the
message got out a bit more.

Asa Dotzler

Friday’s first keynote was Asa Dotzler talking
about the Linux desktop. He made four points (that I noted):

  • We should preserve as many user settings as possible, for
    instance preserve bookmarks when a user switches from Windows to
    Linux. That sure would be nice; I’ve had some problems in this area
    just upgrading my Linux box.
  • He is a proponent of stability. My notes are not really
    comprehensible here, but I gather he wants API and UI compatibility
    across distros. That seems unlikely to me.
  • He likes simplicity. He railed against the Gnome “open terminal” menu
    item a little bit. I use that all the time, but I wouldn’t care much
    if it went away. But would deleting it violate the stability point?
    That is not entirely a dumb question, I’ve felt burnt a bit by other
    minor Gnome changes where a feature I liked was removed.
  • He argues against violating user expectations. For instance, he
    doesn’t like the position of the “ok” button in Gnome, and he hated spatial
    nautilus
    .

Taken together, these represent one fairly coherent point of view,
which is ascendant in the Gnome world. The simplicity point in
particular has a strong argument from engineering realities. However,
I find that in general I don’t sympathize much with this view overall.
Instead I would prefer that the Linux desktop take a more radical view
and stake out some truly new territory in the GUI arena.

For instance, for OSCON I made a presentation. To do this I
grabbed a bunch of other presentations and took little pieces of them
(mostly graphs as it turned out). Then later, Anthony used
part of my presentation
. We did all this by emailing and
downloading bits — but sharing in this way seems like such a basic
operation that we ought to be able to do it directly in the
applications (without setting up a cvs repository or anything like
that).

I suppose it is kind of dumb to complain about the desktop on the
basis of a single missing feature. I guess I should give this some
real thought and try to write up something sensible. But the bottom
line is, there are important ways of working that are essentially
unsupported by currently existing tools. I run into this every single
day.

During the Q & A session, Jeff Waugh stood up and
said that Ubuntu is bringing the Gnome ethic to Linux distros: “simple
software, just works”. I didn’t recognize him without his headphones.

Open Source Biology

First, I’d like to note that SlashDot got mentioned a lot at this
conference, mostly as a way of measuring the zeitgeist. (And on the
first day I had the pleasure of meeting SlashDot hacker named Jeremy
– hi Jeremy, if you’re reading this.) I don’t know why this shows up
at this point in my notes, but there it is.

Anyway, this talk was very cool and had some very interesting
slides. The speaker was starting an organization to sponsor open
source biology, see more at their
(unfinished) web site
.

Tony Gaughan, Computer Associates on Ingres

I didn’t make many notes. I think I found this talk boring, sorry
about that. He did have a story about how they made money from open
sourcing Ingres that I now wish I had listened to and made notes on.
But anyway I’m told that Ingres can’t do anything that Postgres can’t
do — meaning they did this too late.

Danny O’Brien: “On Evil”

The funniest talk by far. You had to be there.

Saul Griffith on Howtoons

A fun talk about Howtoons.
This is one of the talks (along with the biology talk) that I brought
up later with friends. Worth a look.

Groovy

This is the last thing I attended — I left a bit early as I was
feeling burnt out and over-socialized. After this Elyn and I went to
lunch with Jim Blandy, the Portland Japanese Gardens
(which I cannot recommend highly enough), and then the Oregon coast
for some needed R&R.

This talk was very neat; Groovy is cooler than I
remember; I was surprised to find out that it has currying, closures,
etc. Naturally, it is basically lisp, just like the other scripting
languages out there.

Inspired by the talk, I gave Groovy another quick try on gcj, but
no joy. I’ll be debugging that soon.

Rod
Cope
, who gave this talk, actually lives near Boulder, and I had
met him once at the Boulder Linux Users’ Group. He didn’t remember
this, kind of an irritating theme at this conference. I am now
resolved to either develop a flamboyant persona, or extra appendages,
preferable tentacular.

Bruno (re-)introduced me to Rod after his talk. Rod was surprised
to hear how much java code was shipping and working in FC4. He’s
exactly the kind of guy we want to win over…

O’Reilly Radar and Numbers

On Thursday I went to another talk by Tim O’Reilly (and Roger
Magoulas too) about data and visualization and stuff like that. A lot
of it was a recap of his keynote from the day before, but some stuff
was new and even surprising. For instance, there are 4 or 5 people
working on this kind of thing there, and they want to grow the group.

My notes say he mentioned that digital video is interesting –
a reminder to me (and Green) to hack on medi8 some more.

He is looking for new sources of data so that he can try to
correlate book sales to other external events. The idea, I think, is
to see what might be useful for predicting what is hot, or how big a
given area is, etc.

Interesting quote: “piracy
is progressive taxation”
.

A couple awkward personal moments at this talk: afterward I
suggested gmane as a potential data
source, the idea being that when a mailing list shows up in gmane it
suggests a certain level of interest, and also that you could monitor
traffic volume on the lists. Roger Magoulas (director of Market
Research at O’Reilly and an interesting and entertaining guy) said
that sounded nice but then wrote down something different — I guess
he mis-heard me. Sigh.

Then Bruno tried to introduce me to The Man, but O’Reilly had some
other meeting and was leaving, and anyway I failed to say anything
interesting. I think next time I’ll prepare a bunch of provocative
declarations for moments like this, e.g., “The biggest problem for
Free Java is deciding what to do when we obsolete Sun next year”.
L’espirit de l’escalier, as they say…

These weren’t actually the most awkward personal moments at the
conference — it was full of them, and I made a list in my notes. But
I don’t think I’ll be sharing that. Sorry voyeurs.

dtrace

Cantrill, a kernel hacker from Sun, gave a talk about dtrace.
This was the coolest demo I saw at the conference. It was very
impressive, I was blown away. The night before, Cantrill got together
with a PHP developer and added a dtrace hook to PHP. The result was
that you could run a php program, and with dtrace see php function
calls being made (i.e., it was hooked into the interpreter), then see
it call write, and from there watch the progress through
the kernel, and finally back out into userland and php.

We’ve got SystemTap coming,
hopefully it will do all this same stuff.

Roger Magoulas

I liked hearing Magoulas talk earlier, so I went to a talk he gave
about “building the open warehouse”. This talk was a blunt reminder
that the database world is quite different from the one I ordinarily
inhabit. I barely understood anything he said. I clearly need to do
some reading.

He did mention that exporting database stuff as Excel spreadsheets
is still necessary, and this got me thinking again about the more
general problems of liveness and sharing that current GUI applications
don’t see to address very well. More on that later, I think.

The Two Threats

I read Perens’
patent nonsense
with mild dismay today; mild because, luckily,
Perens seems to have lost much of his influence on the community. As
I’ve said before, patents are the major external threat to free
software, and must be taken very seriously. I’m glad to see what the
OSDL has done. The mistake Perens makes is to speak out against a
strategy on the basis that it is not perfect — it definitely is not,
but the open source approach is usually to try everything and see what
works. Also, we haven’t had much luck legislatively in the US
(remember the old League for Programming Freedom?), and perhaps a
can’t-beat-em-join-em approach a la the GPL is more workable. There
are still failure modes with this approach, so Linus’ can’t be the
only approach. But, there is nothing wrong with this idea.

The internal threat

The major internal threat is balkanization, driven primarily by
incompatible licenses. While this is usually quite difficult to
change, the future does look hopeful. The GPL v3 promises to help out
quite a bit (it is rather lame that many of the newer licenses are GPL
incompatible, and often I think this is driven by an irrational hatred
of the GPL). I saw David Turner at the FSF booth at OSCON, and there
was a little sign saying “Ask us about the GPL v3″ — a promising
indicator given the FSF’s ordinary tendency to the cathedral approach.

The CORBA tale

So, near the end of February, Audrius Meskauskas started working
on a CORBA implementation for GNU Classpath. At the time I was very
skeptical of this work; I thought we could convince the JacORB developers to relicense and
donate their code, and I said as much.

That turned out to be impossible, and in any case Audrius pushed
forward with his work. Now, it turns out, he has nearly finished the
thing. The latest Classpath japi scores
are fairly amazing — we went up 3% just in the week I was away at
OSCON. Also, he says that our CORBA passes more of the standard tests
than some commercial implementations, so we aren’t just talking about
a thin veneer of API completeness.

The moral of this applies directly to the patent situation.
Sometimes, even if you think an idea is a bad one, it would be smarter
to just shut up. Nobody has a perfectly functioning bad idea
detector, and if someone else’s work doesn’t affect you, then just get
out of the way and let them try it.

Thursday at OSCON

Thursday starts with a fairly interesting keynote about the
similarities between TCP/IP and containerized shipping. I didn’t
write down the speaker’s name or anything, but his basic message is
that these things aren’t so different: standard packets for shipping
variable content enables all kinds of efficiencies. This is cute but
I think only applies in a few situations.

Ruby on Rails

Next is a talk about Ruby on Rails. They’ve had 100,000 downloads
since their release, pretty cool. The Rails community either grew the
Ruby community 20x, or is 20x the size of the pure Ruby community (I’m
not sure which), i.e., Rails is their killer app. The basic idea
behind Rails seems to be that they have an object relational model
where the class and field names in Ruby code correspond directly to
the names in the database schema, therefore requiring less typing and
maintenance. This seems handy, though maybe limited in situations
where you can’t redesign your database to map to your UI model.

Kartik Subbarao, HP

Subbarao gives a very silly talk about “Venetian IT”, which is an
extended metaphor on a water/earth free/closed analogy. Goofy
metaphors are kind of a problem for the keynote track, and this one
even comes with a 4-quadrant chart showing the various combinations of
things… shades of Ken Wilbur. Subbarao is too enthusiastic without
a moderating seriousness.

Computational Origami

This is one of the three coolest talks at the show, based on my
metric of what I told non-attendees about afterward. I wasn’t all
that fond of most of his new
origami works
; I thought they seemed over-done and somehow missed
the art. I suppose I prefer a simpler aesthetic in folded paper.

Mitchell Baker

The last keynote on Thursday is an interview with Mitchell Baker
about the new Mozilla organization thing. I’m afraid I wasn’t too
interested, though now the thought occurs to me that perhaps this is
an interesting experiment in how to fund free software. I did notice,
from talking to folks, that there really hasn’t been much evolution by
way of new forms of free software business models. The open source
java startups all seem to be focused on support — the old Cygnus
approach. (Business model innovation isn’t really our strong point in
this space, our strong point is more about lowering
inter-organizational barriers.)

Another thing she said is that they will make money via search
relationships. I found that a bit surprising; although it doesn’t
rise to this level of seriousness, my first reaction was that this was
a breach of trust with the free community. I still don’t have a
strong opinion about the relationship of free services to free
software. Maybe it suffices for the community to have a strong value
against service providers acting like asses. Or, maybe we need free
and open organizations providing services as well.

OSCONWAY

I forgot to mention that on Wednesday I attended part of The
Conway Channel 2005, starring Damian Conway. I
wanted to attend this since I’ve heard that Conway is a great speaker,
and plus I was curious about the state of Perl. My impression has
been that Perl is dying and furthermore doing so in a spectacularly
goofy way, what with the Apocalypse and Exegesis
stuff, but I wanted to see it more closely.

Damian is a good talker and had the second best demos I saw at the
conference. I missed his talk Tuesday night, but I was at dinner with
Jim Blandy at The
Kennedy School
, so it is excusable.

The talk itself is hard-core perl stuff, mostly Damian whipping
through a series of problems and showing how to solve them. In all
the cases I saw (I didn’t stay for the whole talk), the solution was
to write a new Perl module that did the required wacky thing. In most
cases this seemed to be along the lines of “Look! Perl can somehow
simulate a trivial scheme macro!” This isn’t really a slam against
Perl per se, but rather our slow collective reinvention of lisp.

I left this talk early. It was SRO, a fact which I found bizarre
until Dalibor explained the OSCON/Perl connection, and I was tired.
Perl, at least according to the book stats, is in fact slowly dying,
though more slowly than I had imagined. Also it is apparently still a
requirement for a sysadmin job — though I doubt my Perl 4.x skills
would still qualify me.

Type systems

This has nothing to do with OSCON per se, but rather is something
I had thought of and forgotten about until I saw the Perl and Python
talks. I ran across this quote recently:

Darwin’s greatest achievement was that he showed that Aristotle’s idea
of teleology, the so-called fourth cause, does not exist.

And, I was thinking, how does this apply to programming languages?
Clearly strongly typed languages, in particular those with fixed
notions of class, are anti-Darwinian and thus wrong. Instead we
should be programming with biopopulation-like languages, say smalltalk
or python.

OSCON: Chris DiBona from Google

My impression of Chris is that he is like a spider and only giving
this talk with a couple of legs, while the others hack or send email
or something. This is a compliment in case you can’t tell, his
attention wasn’t noticeably elsewhere.

Why open source? According to Chris, “No one can tell us no”.
That’s as good an explanation as I’ve heard.

He talks about the reasons for the Summer of Code but my notes
fail to record anything really definite. I think I was a bit out of
it during this talk. He shows a lot of nice quotes from SoC students
and some obscure demos, like the USB code for some calculator.

Google seems like the current company for smart people. People
not at Google, you are hereby now dumb or misguided.

Geir on Harmony

This isn’t a technical talk and is more or less a repeat of his
JavaOne talk. I didn’t take many notes since I’m already involved in
Harmony. Geir gives a good talk. I learned things from it that I
need to mention in my future talks.

Geir does mention the whole desktop thing and the Gnome language
battles. I wonder how that played at JavaOne or whether Sun folks
even find it relevant. My impression is that they generally
don’t.

Ted Leung on Chandler

Ted is an interesting
speaker though a bit too
hot for the medium
: a darkened conference room with a video
projector. I had heard of Chandler
before, a long time ago, but lost track of it. It seems to be outside
the mainstream of open source development, at least as I perceive
it.

It isn’t clear why someone would use Chandler and not Evolution.
I used Evolution for email reading while I was at OSCON, and while I
wasn’t blown away by it (Thunderbird was just as good for me, but I
only use gnus in real life), it seemed completely reasonable.
Likewise for calendaring.

Actually, that is a bit unfair. Chandler uses wxWindows and
is more cross platform than Evolution (though not Mozilla stuff).
This is a proven good thing for free software.

Ted talks about writing your own Chandler “parcels” (plugins).
Chandler has an interesting internal architecture, from what I can
tell everything is stored in a database, and the GUI itself is
serialized into it.

The Chandler parcel descriptors are in XML, though they are moving
toward having them just be plain Python code. Their users hate the
XML and (like the Ruby on Rails talk discusses later) it is simpler
and more robust to just write idiosyncratic code in the primary
language. The XML bits look similar to what Eclipse does, and I gather
they face the same kinds of dependency handling problems as does the
java world as a whole. You’d think we would all collaborate on a
solution to this.

Guido on Python

I tried to go to a bunch of talks on topics that I normally don’t
follow. This wasn’t hard, as it turns out OSCON is a big Perl
gathering — a fact everybody except me seems to have known — and
there were also Ruby and Python and other contingents there.

Guido’s message is that Python continues to mutate. One concrete
mutation I took from this talk is a new with operator,
which is in essence the C++
RAII idiom
abstracted away from object construction. This is a
nice idea, and java could probably benefit from it, but … I can’t
help thinking that all of these scripting languages should be
obsoleted by lisp. (I know, I know, these decisions are as faddish as
any other fashion, a fact that continues to offend the remaining
mathematical parts of my aesthetic.) Anyway, Python’s
with construct is a trivial lisp macro. We’ll see this
same thing come up for Perl and Ruby, in future posts.

Another thing I learned is that Twisted has some nice work
deferral wrappers, which would have been useful when I was more
actively hacking on Build… except I looked and they seem to be
networking-related, and this is trivial with continuations and makes
all these circumlocutions seem absurd.