ILC 2009 – I’m going?!

February 27th, 2009

Quite unexpectedly – to myself, at least – I’ve registered for ILC 2009. The title/theme/tagline is “The Next 50 Years”. Judging by the invited talks, the next 50 years seems to be reinventing CL in Scheme. (Although a 50 year estimate for R8RS doesn’t seem unreasonable.)

Not really sure what to do about the tutorials; I’ll probably end up listening to Pascal all day.

The Great Macro Debate “Are Macros a Menace?” seems a rather desperate attempt to gee up a controversy where there really oughtn’t to be one. On the other hand, if Guy Steele argues for the affirmative in terza rima it could be fun…

Predicted dark-horse highlight: Didier Verna’s CLOS efficiency paper. Predicted dead-horse lowlight: ALU Annual Meeting.

What else should I be doing in Cambridge/Boston while I’m there? 

Stackoverflow answer of the day

September 29th, 2008

A stackoverflow question entitled “Python Vs. Ruby for Metaprogramming” begins “I’m currently primarily a D programmer and am looking to add another language to my toolbox, preferably one that supports the metaprogramming hacks that just can’t be done in a statically compiled language like D. I’ve read up on Lisp a little and I would love to find a language that allows some of the cool stuff that Lisp does, but without the strange syntax, etc. of Lisp.” and goes on for another 20 lines listing various desiderata.

The currently top-ranked answer, in its entirety: “Grow some and learn Lisp.”

ECLM MMVIII

April 22nd, 2008

Amsterdam turned on its best summer weather for the European Common Lisp Meeting 2008. But enough scene setting. To give a quick rundown of the talks:

InspireData: How We Did It In Lisp Jeremy Jones

A very whizzy, very polished shrinkwrapped Windows and OSX application written in Common Lisp that actually sells well (> 80k seats sold). 12MB of lisp code in 284 source files. Key learnings: specification is hard so incremental refinement is necessary, and “Lisp supports this better than anything I know”. Key quote: “The world needs to use more lisp.”

FEMLISP Nicolas Neuss

A system for solving partial differential equations using finite element methods. 30K lines of lisp code. Key quality: the stability of the base language – “I learned Common Lisp and I’m still up-to-date!” FEMLISP currently has one user, and there seems to be some reluctance to increase that number…

Using Common Lisp For Large Internet Systems Stefan Richter

freiheit.com is a 60 person company that builds large internet systems in 98% Java with the rest being C and C++. (See also  h.w.a.) While it is easy to make mistakes, it is well known how to build large internet systems (1 million users and above). The various bits and pieces are usually in Java, but almost everything could be done in CL today, and certainly tomorrow with a bit of effort. The talk seemed to diverge at this point. On the one hand we should be encouraging people to use lisp in web programming (use weblocks and blog about it; “write a book”). On the other hand we should be introducing call-cc into CL, because (despite seeming to contradict many of the best practices for building scalable internet systems) they are really cool for web apps…

PWGL Killian Sprotte

Killian had a great two-hour presentation on the impressive PWGL/Patchworks with OpenGL musical composition and analysis tool (or “Programming with Boxes”). Unfortunately he only had 45 minutes to present it. Certainly the talk with the highest “wow” factor, this is one to download and try out, not to read (or write) about.

ECL = (not only) Embeddable Comman Lisp Juan José Garcia Ripoll

A presentation of the past, present and future of ECL. A pretty convincing demonstration that ECL is not stripped down, but is a fully fledged Common Lisp (to mix my metaphors).

Selvaag House Designer Kristoffer Kvello

Using Knowledge Based Engineering and CL to automatically design buildings. Six full-time lisp programmers. Impressive application. I’ve always thought lisp uniquely suited to automated compliance applications – turns out I was right. Key observation: “Lisp: all good, no problems.”

HPC Platform Marc Battanyi

Subtitled “CL + FPGA = The Ultimate Processing Platform (or the Worst Case of NIH Syndrome)”, this presentation was another that suffered from being too long for its timeslot. All is forgiven, however, because Marc’s humour is bone dry.

? Ken Tilton

Ummm. This was Cells redux redux. I think. As a proponent (exponent?) of Screenshot Driven Development I can’t disagree with Kenny’s decision to concentrate on (as he put it) “stupid pet tricks”, but with no discernable structure, narrative or point, I really didn’t feel I learned anything…

All in all, the talks were great, the crowd interesting, the venue unique, and, while I won’t be at ELS in Bordeaux, I’m definitely intending to be at ILC ’09 at MIT (driven by Dan Weinreb – who was in Amsterdam – and Guy Steele – who wasn’t). I might even actually have done some lisping by then…

Arc, Brucio and The Register

February 26th, 2008

Christophe Rhodes had tipped me to this, which some have not seen. The interesting part is in the fifth paragraph: “Unsurprisingly, the reaction has been mixed with some applauding how Arc strips the Lisp language down to its bare essentials.” Note who the applause comes from.

Test trial ZSLUG meeting 0.1 alpha

February 26th, 2008

Last night was the first ZSLUG (Zürich Scheme/Lisp Users Group) meeting at the Lion Bar. This turned out to be both a fantastic success – in that about 15 people turned up – and something of a failure – in that there were so many people it became impractical for Juho to complete his presentation on SBCL code coverage. The search for an alternative venue/plex is on…

Down my end of the table(s) talk was about R6RS and the social psychology of standardisation; ARC and the rôle of Paul Graham in the (Common) Lisp community; theoretical physics and the bandwidth requirements of CERN; performance characteristics of Bigloo, SBCL and Chez Scheme; why developing in Schemes other than Scheme48 is painful and the wonders of Slime; and the mystery of where all the lispers maintaining the Swiss International Airlines Limited application have gone.

I made a particularly unconvincing argument for the wonders of CLIM and Climacs. Must do better!

I was the first to leave, so things might well have broken up acrimoniously by the end of the evening, but judging on what I saw and heard I would have to say that ZSLUG has a great future ahead of it.

Controlling Word the Lispy Way

January 29th, 2008

In my last post I asked whether anyone knew how to replace automatically numbered paragraphs in MS Word with their textual (non-auto) equivalents.

No one replied.

So I had to do it myself. Startlingly simple for my humble needs, the solution consists of a key-code invoking a macro which shells out to cscript running a Jscript program. The slightly interesting point is that this last is generated by Parenscript, and looks like so:


(defvar wd-app (*get-object "" "Word.Application"))
(defvar a-doc wd-app.*active-document)

(defun de-number ()
  (let ((cnt a-doc.*lists.*count))
    (dotimes (i cnt)
      (let ((lst (slot-value (a-doc.*lists 1)
                             '*range.*list-format)))
        (lst.*convert-numbers-to-text 3)))))

This is obviously far from being great style, but it gets the job done and has me wondering about all the other things I could be doing with parentheses…

In praise of VBacs

January 9th, 2008

For my sins I spend most of the (work) day in Microsoft Word. In order to make this experience bearable I turn off as many of the automatic mangling features as I can and install VBacs, which provides a basic set of Emacs keybindings for Word. This means I can C-x C-f, C-x C-s, C-s, C-r, M-%, M-w, C-y etc. to my heart’s content. VBacs doesn’t turn Word into Emacs, but it does help me concentrate on changing the text rather than where simple keybindings might be.

VBacs – give it a go if you’re sentenced to Word.

PS. Does anyone have a programmatic way to replace the furshlugginer automatic numbering in a Word document with its textual equivalents? (That is, replace the automatically inserted numbering “1.13” with the text “1.13”.)

NREVERSE vs. pointer manipulation revisted

October 10th, 2007

In “To NReverse When Consing a List or By Pointer Manipulation, To Avoid It; That Is the Question” (in Some Useful Lisp Algorithms: Part 2, MERL TR93-17, August, 1993), Richard C. Waters discusses whether it’s better, when consing up “a list of elements where the order of the elements in the list is the same as the order that they are created in time”, to push and nreverse or “maintain a pointer to the end of the list and use rplacd to put each element directly into its proper place in the list.” Waters’ conclusion is that nreverse is (was) often faster, but that in any case the speed difference is not enough to avoid the simpler nreverse approach.

To examine the differences Waters used two simple functions, maplist-nreverse:

(defun maplist-nreverse (f list)
  (do ((sub list (cdr sub))
       (r nil (cons (funcall f sub) r)))
      ((null sub) (nreverse r))))

and maplist-rplacd:

(defun maplist-rplacd (f list)
  (let ((r (cons nil nil)))
    (do ((sub list (cdr sub))
	 (end r (let ((x (cons (funcall f sub) nil)))
		  (rplacd end x)
		  x)))
	((null sub) (cdr r)))))

Timing the functions using #'identity as the map function he got the following results (Lucid Common Lisp on an HP-730):

input list length
1 10 102 103 104 105
nreverse 8.3 3.1 2.6 2.6 2.9 6.2
rplacd 8.5 3.3 2.8 2.8 3.1 6.4

(where the numbers represent computation time in microseconds per cons created).

For no real reason I replicated this on an Intel Core2 T7200 2.0GHz running Win32 and sbcl 1.0.6:

input list length
1 10 102 103 104
nreverse 0.1562 0.0469 0.0297 0.0250 0.0252
rplacd 0.1563 0.0469 0.0234 0.0227 0.0228

(where the numbers represent computation time in microseconds per element of the input list).

Although the trend seems to be for the rplacd version to be slightly faster, the differences seem minor, and we might as well adopt Waters’ recommendations:

In closing I would like to note that the very best thing to do is to avoid writing code that conses lists altogether. Whenever possible, you should use standard parts of Common Lisp that do the consing for you. In particular, you should use functions like replace, map, reduce, remove, union, etc. whenever they are appropriate. Beyond this, you should take advantage of looping macro packages such as loop and Series.

With knobs on

September 28th, 2007

Reading Sutherland’s incredible 1963 Sketchpad thesis I was struck by the following passage:

We will issue specific commands with a set of push buttons, turn functions on and off with switches, indicate position information and point to existing drawing parts with the light pen, rotate and magnify picture parts by turning knobs, and observe the drawing on the display system.

Where are my knobs and buttons? Why is the great advance of recent decades in widely available physical human-computer interaction the click-wheel mouse?

Sutherland opens his thesis by observing:

Heretofore, most interaction between men and computers has been slowed down by the need to reduce all communication to written statements that can be typed; in the past, we have been writing letters to rather than conferring with our computers.

Isn’t it time the epistolary model of interaction evolved?1,2


1. Yes, I know this seems at odds with my admiration for CLIM.

2. Yes, I am being deliberately provocative – this is the web – but I can imagine zipping through a document accepting and rejecting edits with my PS2 control being a lot more productive (and fun) than the mouse+keyboard experience.

#lisp FEP – I want to learn lisp but I don’t want to use emacs

August 25th, 2007

A1

Your favourite lisp(s) + emacs + Slime (+ paredit) constitute a fabulous development environment that is widely used, and therefore widely supported, on #lisp. Eschewing this environment for something else will make it far harder for people to understand your problems and (if you ask nicely, and intelligently) help you with them.

(I also find it telling that when the smart folks who started developing lisp had the time and energy to build editors they built emacsen.)

However, if you really can’t stand emacs (perhaps because of a childhood incident with Richard Stallman, a wasp’s nest and a jar of manuka honey), you could use plain Vi (and give up the wonders of Swank) or Cusp, if you’re an Eclipse fan.

But don’t come running to us when something goes wrong.

A2

“I want to learn Russian but I can’t be bothered with all the funny characters.”

* “FEP” = Frequently Expressed Predjudice