Ghostscript
I have nice happy feelings about Ghostscript these days. One
of the things I realized lately is that a lot of our recent
improvements, while not rocket science, are things that will
make things much nicer for users. On this list I'd include
autoconf, IJS, the recent fix for the bug which caused
almost all Type1hints to be trashed in pdfwrite, replacing
the completely broken x11alpha device with a mode that does
real antialiasing (which has existed for a while in
Ghostscript, but was apparently almost never used),
accepting more broken PDF's, etc.
Of course, I love the rocket science, and am really looking
forward to doing some hardcore 2D graphics work over the
next few months, but this other stuff is important too.
Ghostscript has long had a reputation for being difficult
and unfriendly. I think that's about to change.
jbig2dec
I did some fun work on jbig2dec over the past few weeks, as
well. It now passes an important milestone: it decodes some
of the freely available test
files.
There's a wierd bug somewhere, though. The code exists to
decode symbol dictionaries, but on all the test files, it
seems to be able to decode a few hundred symbols, then goes
haywire. It's very, very difficult to track down: it is
impossible for a human to look at an arithmetic encoded
bitstream and make any sense of it. I sent an email to the
authors of the test files asking for help (traces from their
encoder or decoder would help enormously) but haven't heard
back from them yet.
Anyway, it's great that the project is live.
rebar
Another really fun project is rebar. Here, the goal is to
make the build process for software a thing of beauty. The
auto* toolhodgepodge gets the job done most of the time, for
most Unix users, but nobody could ever accuse the thing of
being beautiful.
So instead of thinking about features and also
backwards compatibility with existing things such as make,
I'm trying to distill the build process to its essence. One
very powerful inspiration is the Vesta project, which takes
the position that the build process is a functional program
- the arguments are the source files and configuration
parameters, and the result is the built package. This is a
very different way of thinking about the world than make,
which treats the build process very procedurally,
basically scribbling in the directory where the source,
object, and binary files are kept.
There are a ton of build system designs out there. One of
the most important axes is: which language are the build
scripts based on? In many, many cases, this language is one
that already exists: scons and distutils use python, the
original cons uses perl, ant uses xml+java, the original
make uses Unix shell, auto* layers m4 and some other stuff
on top of the shell, and so on. Some systems actually invent
their own little language, such as jam.
What language is best? Obviously, using a real language such
as python gives you a lot of power, but I also feel that it
tends to bind the specification of the build process too
tightly to the implementation. An important rebar goal is to
decouple these as much as possible.
So the rebar design seems to be converging on a really
simple functional programming language. Lists, maps ("hash
tables"), strings, and files are first class data types.
Your typical tasks of compiling and linking are built-in
functions that map files to files. The language is
dynamically typed. The fun part is that the
implementation is lazy and implicitly parallel. This
means that files don't get compiled unless they need to, and
that you can get the equivalent of -j without having to do
anything fancy in the build script.
The current prototype implementation is written in Python,
and is now capable of interpreting the core language and
compiling simple projects, with autogen'ed code and
autoconf-style tests, as well. I've implemented -j, but
there are two big pieces that haven't been done yet: first,
assigning reasonable names to the generated files, and
second, skipping the compilation if it's already been done
(in a previous invocation). But neither of these is
fundamentally difficult.
Python amazes me for its concision. The current prototype is
all of 900 lines of code, yet it contains a lexer, parser
(recursive descent), core language interpreter, and
parallelizing process spawner.
At some point, I'll want to include more people. The free
software mantra is, after all, "release early and often".
But at this point, I'm much more interested in attracting
people with similar goals regarding the beauty of the end
product, and the knowledge and experience to understand what
I'm trying to do. My choice of a lazy functional language as
the basis for rebar is extremely unlikely to be appreciated
by the pimply-faced Slashdot hordes, and I don't want to be
deluged with "how to I get program X to compile with library
Y on Z Hat Linux?" questions.
Friends and family
I spent a few hours on Monday with zooko, his
wife Amber, and their child Irby. It was great fun - we
talked about lots of interesting things. Heather and the
kids got a chance to meet them as well, which was great.
Alan continues to thrive on the Singapore Math workbooks.
Reading them over, I can see why; they're really well done.
I can recommend trying them to any parent of a gifted child.
Max's language development is proceeding at an incredible
pace. A few weeks ago, I noticed that he was conjugating
verbs: "jump, jumping, jumped". Over the past two weeks,
he's mastered possessive ("Maxie's, Daddy's"), compound
nouns ("barn owl", as opposed to simply "fire" for fire
engine last month), complete sentences with subject and
object ("put it here"). And he takes such delight in
mastering every new thing!
Max is also really into Blue's Clues. I noticed today that
one of the videotapes is starting to wear out. It's an
interesting show for a "grow-up" to watch, because most of
it is animation that's been composited with footage of just
Steve, alone, in front of a bluescreen. (who's creen? blue's
creen!) You imagine Steve staring and talking into space,
pretending that's there's actually a blue dog, a talking
salt and pepper shaker, and similar other stuff there. He
does a good job of it, though :)