Archive for software

Prognostication

There is a current thread on Lambda the Ultimate at the moment on predictions for 2008. I will have to remember to look at it again later this year.

Most of the predictions concerning Scala are positive.

I would have to agree with Sean that there have been many years I've heard that concurrency will be the big thing, but I do not feel there has been too many big developments in the area recently. Robin Milner has recently released a draft book on his theory of bigraphs, his newer generic model for concurrency. There is actually an even newer draft of the book, but that is not presently linked from his website, so I am not sure whether I should publish the link.

Comments

Implementing my dissertation

Okay, I am finally getting around to writing something, as requested, about how I implemented my dissertation.

I used pdfLaTeX for several reasons:

  • I needed to integrate material from existing papers written in LaTeX.
  • Using standard LaTeX means that you need to fiddle dvips/dvipdf so that that they will find the appropriate fonts. Using pdfLaTeX requires some configuration too, but it all happens in a single step.
  • It has support for microtypography, which generally produces better looking text with fewer bad breaks.

I had thought about trying luatex to allow me to automate a few things better, but I decided against it because it might have slowed me down.

I then used the memoir class. I was able to use that with relatively little configuration. The only major change I made from the defaults involved the configuration for the chapter titles. I did however wind up needing to use a slightly modified version of the class file itself. This was necessary so that I could use raised dots (·) instead of periods as separators; there was simply no way to configure this for some parts of the document otherwise.

For the bibliography I used Chung-chieh Shan's McBride BibTeX style. I made a slight change to that so that the three emdashes for repeated authors did not have space in between them.

I use Didier Rémy's mathpartir package for typesetting inference rules.

I used my tool otftofd to generate all the LaTeX infrastructure for the OpenType fonts I used. I hacked up some custom OMakefiles for the TrueType fonts. The bits I used for Dejvu Sans Mono are now part of the package I have made available.

I wrote a small sed script for converting my examples written in InforML with some special markup in comments into a form that could be accepted by LaTeX.  This mostly involved escaping some characters and inserting uses of my macro for highlighting text.

That is everything I can think of from a high level.  If there is something specific I did in my dissertation that you would like to know about, let me know.

Comments

New version of the DejaVu Sans Mono package

I just finished fixing the bugs Brian noted in the previous version.  You can grab it using darcs get from http://free-the-mallocs.com/repos/dejavu-sans-mono.  This version also includes support for the oblique members of the family.  These are accessed using \textsl{...} rather than \textit{...}.  If you try it out, let me know if you have any problems.

Comments

Type Generator

Last weekend, I stopped into mudac, the museum for design here in Lausanne, for a few hours. The primary reason for the visit is that another postdoc here at EPFL, Ingmar, had told me that that as part of an exhibit on the 2007 recipients of Swiss Federal Design Grant there was a program on display that let you play with a the parameters of a typeface.

An installation on meta-type designMore of the installationA video component to the installation.My attempt to make some legible
A close up of one of the figuresAnother close upAnd another closeup

It was interesting, but I would have to say that I was impressed. The software Type Generator was designed by Remo Caminada and Ludovic Varone, and programming in Flash by Patrick Vuarnoz.

I think my impression may been coloured by the fact that the user interface was entirely in German, and therefore it was quite difficult to puzzle out what sliders did which things.  However, I felt that it was very difficult to create a reasonable typeface merely by tweaking the parameters.  I felt that there parameters could have been better constrained to prevent the user from adjusting them in ways that simply exceeded what was sensible.  It very easy to tweak some parameter and suddenly have spikes sprout from all the letters because you had caused some curve to extend in the wrong direction.  It could be argued that having such fine controls give the designer greater freedom, but it feels like the wrong level of abstraction.  I think Knuth's Computer Modern, for example, gives you much more sensible parameters to work with.  The version of Type Generator that was available as a demo was clearly not intended to be a completed production development tool, so perhaps some of these complaints would be resolved as it is polished.

Comments

Initial version of DejaVu Sans Mono package

I just finished pulling out the various bits of LaTeX and OMake I wrote for using the DejaVu Sans Mono font in my dissertation, as suggested by Brian.  You can grab it using darcs get from http://free-the-mallocs.com/repos/dejavu-sans-mono.

You will need to copy the TrueType files for DejaVu Sans Mono and DejaVu Sans into the directory before running omake. DejaVu Sans is required because I needed to steal a few glyphs from it that are not yet in DejaVu Sans Mono. The other notable omission is that I never needed the oblique version of the typeface, but I can add that with just a little more hacking.

Comments (3)

I come bearing links

While I have been in hiding, toiling on my dissertation, a rather large number of links have been accumulating in my to-do list. I'll hopefully write more on the status of my dissertation soon.

Software

A few weeks ago I became frustrated with the capabilities of FontBook on Mac OS X and Gnome Specimen and gucharmap under X11. I spent some time searching and came across Linotype's FontExplorer X. My best description of it would be iTunes for fonts. Not only does it let you manage, examine, and compare the fonts you do have, it lets your preview and purchase fonts from Linotype.

I also came across the UnicodeChecker application (again MacOS X only) which perhaps provides a more detailed examination and exploration of the properties of Unicode glyphs.

Reference

I'm not sure where I read about it, but I recently came across Symbols.com, "The Online Encyclopedia of Western Signs and Ideograms". I haven't needed to consult it yet, but it is fairly interesting just to see what it gives you when asking for a random sign.

I've known about this for a while, but didn't think to mention it until now: the entirety of the Fifteenth edition of the Chicago Manual of Style can be found online. Useful when you don't want to carry around the hardcopy, and searchable. Unfortunately, looking at it again now, the fact that it says in the corner »University of Pennsylvania« makes me believe that is this probably not a free service. And indeed, I just verified this with my desktop, which does not have a cached cookie from inside the Penn network.

Theory

From Lambda the Ultimate, I learned about a paper giving a functional description of the »galleys« layout algorithm used by the lout document processing system.

This also reminded me of the earlier post, also by Neel, on a functional description of TeX's formula layout algorithm.

I also went looking and Kingston has a nice paper on the design of lout, and website on the eventual successor to lout, Nonpareil. lout is an interesting system, though for some reason when I first encountered it many years ago I didn't seem to think it produced as nice of output as TeX. I haven't tried to reevaluate this at the moment, and see whether it has changed or I was simply wrong in the first place.

Also, something else on Lambda the Ultimate led to me to discover the Juno-2 structured drawing editor. I've only had a chance to read about it briefly, but it sounds quite a bit like what I have envisioned for the font editor I've been thinking about for a while, but haven't found the time to seriously start yet.

Finally, while writing this section, I came across another Lambda the Ultimate post on Skribe, a Scheme based document formatting system. It however it seems to be more of a macro layer on top on HTML and LaTeX, rather than a fully integrated system.

Comments (2)

OCamlTeX 0.7 Released

M. Colette Jean-Claude sent me his modified version of OCamlTeX that eliminates the dependency on Caml Shell. I've merged his changes into the darcs repository and deemed it version 0.7. The last change entry was from over a year ago. It feels like such a long time ago.

I have been meaning to write a little bit about my future plans for OCamlTeX for quite some time. Firstly, I am looking to do a complete rewrite eventually. One goal of this rewrite would be to take advantage of LuaTeX to hopefully reduce the communication overhead. My second goal will be to make it much easier to use other languages. Therefore, I expect I will rename it to something like MultiTeX that is a little more language agnostic.

My vision for this new design is first write a package in LuaTeX that will allow TeX to perform interprocess communication. Last time I investigated such things, I concluded that DBus seemed to be the favored interprocess messaging protocol. The actual MultiTeX package would be built on top of this package. Then all that is needed to add support for a new language is to write a daemon that accepts DBus messages from MultiTeX and sends back the result of the requests.

I developed this plan quite some time ago, but I have not begun the implementation partly because I have been so busy finishing InforML and my dissertation and partly because I have been waiting for LuaTeX to mature. Of course, if anyone is interested in helping with the
project, let me know.

Comments

Moving too slowly

I'm clearly not keeping up as well as I should be, as I've had three people forward me links about the excellent New York Times article The Road to Clarity and its accompanying slide-show (thanks Brian, Chris, and Frances). discusses the development of the Clearview typeface designed to replace what is known as "Highway Gothic" on US road signs.

I think it was on the ConTeXt mailing list that I saw that Zapf has published a new book: Alphabet Stories: A Chronicle of Technical Developments. 50 USD seems like a reasonable price, but it sounds like it may be a rather limited run.

Brian alerted me to a blog entry on »50 beautiful typefaces for professional design«. While there are plenty of nice typefaces in there, I think it goes a bit overboard on quantity versus quality. The entry mostly seems to be specimens obtained from various web sites; it would have been much better if they had spent some time explaining their choices. If nothing else this would have forced them to narrow their selections a bit.

Oxlahun pointed me to this post on The Language Log about exotic looking typefaces.

There has been past discussion about tools for comparing different typefaces. Last week while installing Ubuntu discovered there is a package for Wouter Bolsterlee's Gnome Specimen, a tool for previewing and comparing your installed fonts. I've only spent a few minutes playing with it, but it was pretty useful when I was doing some comparisons. However, it does lack support for some more esoteric things like small caps and old style figures. This most likely a limitations of the X11/Gnome font system, but it would be nice to see this fixed in the future.

Thinking of Gnome reminded about how Hanna told me about this LaTeX plugin for the Tomboy note-taking system.

I have a number of things that I've been meaning to write about, but I really should get back to writing and revising my dissertation.

Comments

Linkage dump

From Daring Fireball:

Typographica has some discussion on a new serifed typeface Gina.

I wish I had known about, OcaIDE, a very promising Eclipse plugin for OCaml before starting the ICFP Programming Contest. If nothing else, it would have saved a bunch of time looking up standard library functions on the web.

Comments (3)

Programming contest postmortem

For those who haven't investigated this year's ICFP Programming contest, I'll provide a brief overview. We were given the task of saving Endo, an alien that crash landed on Earth and needed his »DNA« to be rewritten into a form that would allow him to survive the conditions on our planet. Endo, being a member of the Fuun species has a decidedly non-terrestrial biological basis.

Endo's »DNA« consists of a sequence of the bases I, C, F, and P. It has the most usual property that it acts both as an information storage mechanism and as catalyst for reactions. So perhaps the existence of the Fuun support the RNA world hypothesis, as we could say that their »DNA« does the same job as both our DNA and RNA. The catalytic process produces new sequences of »DNA« that provide the instructions for building a Fuun. We were given the information needed to express a Fuun's phenotype as 600 by 600 pixel images. Furthermore, we were provided with Endo's current »DNA« sequence, his current phenotype,

Endo’s source DNA

and a target phenotype

Target DNA for Endo

as suggested by his trusty and intelligent spacecraft Arrow. Our task was to synthesize a sequence that could be used as a prefix Endo's current genome, that would as closely »morph« Endo towards expressing this phenotype as possible.


Overall, I would say that this year's contest proved to be much more challenging than in previous years. However, I say this based primarily on the fact that (a) my team of two could not build a usable tool chain to start experimenting with Endo's genome within 48 hours and (b) the close of the closed the best team with public statistics had developed a sequence that would give Endo an 8% likelihood of survival. However, the overwhelming majority of the participants were well behind this. Not only was there the challenge of building a workable tool chain, but understanding Endo's genome well enough to reverse engineer it. I gather there were hints that became available once you had working tools, but I cannot really comment on their nature.

My team would have greatly benefited from additional minds to throw at the problem, but even so we did a few things sub-optimally. We initially divided the work at too high of a granularity. Brian start writing a DNA execution engine, while I built a tool for rendering the expressed phenotype. However, we should have concentrated more on writing smaller reusable components for the common structures to avoid duplication and make optimization easier.

The biggest problems we had were in debugging our DNA execution engine (or even figuring out whether it was buggy) and executing it efficiently enough that we could perform experiments. Brian's initial attempt was far too slow, though I can't remember exactly what structure he had chosen to use for representing sequences, other than it was partly based upon list. I then tried an approach that used an OCaml Bigarray to hold the maximal twenty-five megabyte working space for sequences during the simulation. However, this still proved to be too slow.

The next day, Brian tried some other approaches while I coded a new execution in OCaml from scratch, to have independent implementations for comparison and so that I could test some additional approaches to representing DNA sequences.Eventually I came to the conclusion that we taking a significant performance hit because of all the large copies we were performing. Knowing what sort of people the organizers were, I decided that perhaps the way they would have thought about the problem was to create a data type with constructors for each of the operations that the data needed to support and then begin working out algebraic laws for it. My initial version looked like

type seq = StringSeq of string
         | ConcatSeq of seq * seq
         | ConsSeq of base * seq
         | SnocSeq of seq * base
         | SliceSeq of seq * int * int

this proved promising, but eventually concluded that in practice ConsSeq was never really used. So I then switched to

type seq = StringSeq of string
         | ConcatSeq of seq * seq
         | SnocSeq of seq * base
         | SliceSeq of seq * int * int

By using this data type and taking advantage of the various algebraic properties I was able to come up with a implementations of concatenation, »snoc«, indexing, slicing, and computing the length of sequences that were reasonably efficient and worked without performing any copying (though I did introduce some rewrites that would copy a coalesce small StringSeq chunks). Incidentally, this turns out partly to have simply been reinventing the »rope« data structure that many participants found acceptably efficient.

However, the data structure did not account for the quotation operation on sequences. Attempting to quote instances of the seq data type in practice would require flattening the structure first, which would cause my implementation to die thrashing. Furthermore, I was unable to come up with a satisfactory method of treating quotation symbolically, because it does not commute with slicing.

In retrospect, and with an additional thirty-six hours behind me, I think I could have probably moved to a representation like

type seq = StringSliceSeq of string * int * int
         | ConcatSeq of seq * seq
         | SnocSeq of seq * base
         | QuoteSeq of seq

where QuoteSeq is lazily eliminated, and that would have probably resolved the problem. However, even then we would have had considerable challenges of ahead of us.

Still, I thought it was a really clever and interesting problem, and it was a refreshingly concrete problem to focus on after spending so much time on InforML and my dissertation.

Comments (3)

« Previous Page« Previous entries « Previous Page · Next Page » Next entries »Next Page »