Enter Sifaka


Lemur is a multitouch control application for iPhone and iPad, ported by Liine from the now-obsolete JazzMutant hardware device of the same name. The application comes with a rather quirky WYSIWYG editor, and while the editor’s irritating interface might not be enough to prompt efforts on a replacement, control interfaces tend to be heirarchical, highly structured and repetitive, so it makes sense to use some kind of dedicated high-level language to create them and lay them out. So: enter Sifaka.

Sifaka is a first stab at a generator for Lemur templates implemented in Clojure. The templates are actually XML, but the network protocol for loading them is weird and undocumented. (Thanks are due to Matthew Stanton, whose Python code pointed the way to a solution. I’m not sure it’s totally correct, but a bit of network packet sniffing from the official editor helped with getting Sifaka talking to the iPad.)

Apart from the template loader, Sifaka is currently little more than a thin layer of wrapping around Clojure’s prxml with some parameter defaulting. Some thought is needed in the design of a proper DSL for templates (including comprehensive, layered defaulting of parameters), and we also need a box model for laying out components without specifying absolute coordinates everywhere. But, as the Sierpiński screen shot above illustrates, we’re up and running.

Add Your Comments

Your email is never published nor shared.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <ol> <ul> <li> <strong>