Archive for April, 2007

C and Lisp and Climacs and stuff

Thursday, April 26th, 2007

As a diversion from all the things I promised myself I’d be doing after ilc07, I’ve ended up playing with a C language syntax (mode) for Climacs.

When previewing on #lisp, the first question everyone had was “how accurately does this parse C?” Well, the answer is: at the moment, not at all. And I thought that, in the presence of C’s textual preprocessing facility*, that’s the way it would have to be. But looking briefly at emacs’ cc-mode, it looks like it ends up doing the closest thing to a full parse anyway, so I have some way to go…

More seriously, the C syntax uses the same LR parsing infrastructure that the existing Lisp syntax uses, so I’ve begun to abstract that out into its own LR-parsing mixin syntax. (I love mixins.) But it’s early days yet.

(This posted to shame me into actually delivering a patch to McClim reasonably soon rather than waiting for things to bit-rot. Which is the other thing — the wonder that is Drei means that this syntax is available to all text gadgets in McClim. Think of the possibilities…)

* “Many other changes occurred around 1972-3, but the most important was the introduction of the preprocessor. … Its original version was exceedingly simple, and provided only included files and simple string replacements: #include and #define of parameterless macros. Soon thereafter, it was extended … to incorporate macros with arguments and conditional compilation. The preprocessor was originally considered an optional adjunct to the language itself. … This attitude persisted, and explains both the incomplete integration of the syntax of the preprocessor with the rest of the language and the imprecision of its description in early reference manuals.” Ritchie, The Development of the C Language, 1993, in History of Programming Languages-II ed. Thomas J. Bergin, Jr. and Richard G. Gibson, Jr. ACM Press (New York) and Addison-Wesley (Reading, Mass), 1996

ilc07 report

Monday, April 9th, 2007

Well, ilc07 was pretty fabulous. The setting and the weather was unfeasibly beautiful. (I found/find it interesting that a not insignificant number of people were compelled to invoke Harry Potter in response.) The organisation was great, and the papers and presentations of a pretty consistently high standard. My notes follow. They will make most sense to those who were there, I guess.

Day 1

MPS: Disappointingly too much reminiscing about dead projects. I didn’t mind the business anecdotes (although the frogs were unnecessary). The MPS system itself seems very interesting, but I felt we got only the merest glimpse.

Debugging: OK. Interesting that there seems little difference between a commercial lisp and something like SBCL. ll (low-level language, as opposed to LAP) seems an ideal target to which to compile C…

Day 2

Lisp: Themes and History: A presentation in two parts. The first a fascinating piece of lisp archeology. (LISP looked real ugly pre-parens.) The second a quick overview of semantically-preserving rewrite rules to compile lisp to a machine independent LAP. But why?

Constraint Propagation: Probably very good, but I didn’t understand why I should care. As Christophe Rhodes has already mentioned, a number of the talks lacked the slide on the motivation for the research/approach/product/technique.

Binary DSL in Dylan: Engaging presenters. Two takeaways: there is life in Dylan yet, and procedural macros rule.

FREEDIUS: Looked cool, but what is it for? (I wonder if it can track a ball in real time?)

ESA: I enjoyed it (: Very useful for when you need that instant gui gratification.

Ltk: Like ECLM’06 but with Tetris!

Gene Expressions: Very dynamic, but didn’t understand a word. Cyrus gets the prize for blatantly ignoring the timekeeper.

Teaching CS: Great presentation. I’ll never read LiSP the same way again.

R6RS: Nicely presented, but it really did make Scheme seem the amateur little brother of Common Lisp. Square brackets? Case sensitivity?

Next 700 Libraries: I found this fascinating, but it seems some people have missed the point: it is a message of great optimism to demonstrate that automated assistance in the conversion of existing, substantial, documented and test-enhanced Java libraries is feasible.

Day 3

CL-HTTP: A report from a piece of the lisp world which seems to have been becalmed for the last 10 to 15 years… Very odd.

SC: S-expression-based C. Excellent slides. Who knew the future of C was sexps?

Crosscuts: A nice presentation, not least for introducing me to “the tyranny of the dominant decomposition”.

Inter-domain Network Management: Key point: rewriting everything in Lisp was the only way of reducing the errors introduced by the C and Perl modules.

CL-SNA: Next year’s ECLM in Istanbul should be a blast.

DAUTI in Scheme: Using such standard Scheme facilities as structs and macros, it took the author three evenings to get this going. Why so long?

Classification: Bayes meets Shannon. Probability meets belief. Umm, OK.

LispWorks Demo: And here’s one I made earlier. Frankly, it didn’t make me jump out of my seat (or some other appropriate Simon Cowellism…)

Dynamic Memory Management: A highly accomplished presentation from someone who really understands both the subject and the state of the art. Impressive.

ALU meeting: I will pass over this except to say (i) Europe and the ALU seem to be going their separate ways, and (ii) Rusty, I voted for you!

Day 4

HOP: Highly professional presentation backed up by 2-300k lines of scheme code. Something to explore one day.

Racer OWL: Description Logics are different from Object Orientation. Or Ontological Orientation. Or something.

List Comprehensions: LOOP!

CLforJava: Might have been better to take his own advice and not explain CLOS and MOP to the group. (Geoff — what’s wrong with “close”?)

Google SoC Lunch: Everyone hates Kenny…

DADTs: I missed the beginning of this, so it rather passed me by.

XMLisp: AgentCubes is very pretty. Which can’t be a bad thing…

Extensible Sequences: Five implementations and counting. Christophe dealt nicely with some heckling from the pensioners’ seats.

Liskell: Sexps are good for what ails you; Haskell means not having to write tests; and some very cute examples.

Scalable Lisp Applications: Some of this was interesting, but I came away with an impression much like Luke Gorrie’s, I’m afraid. (Now there’s a smart guy.)

Of course, the really cool stuff happened outside the conference room. But that’s another story.