to the weblog
back to the front page


a presentation program, written in Common Lisp
hacked in May, 2004

Acclaim is a presentation program written in Common Lisp. It does not use any widget toolkit but only CLX (Common Lisp's equivalent of C's XLIB) and a ppm/pnm to clx-bitmap converter, i.e. a modified version of image-reader.lisp of the Eclipse window manager that is available on this page.

The original version is written by Daniel Barlow (see viewer.lisp).
The changes by Max-Gerd Retzlaff are presented on this web page.

The newest version is 0.25; date: Jun, 19th 2004, 03:16:12 CEST. I sucessfully tested it with quite actual CVS versions of SBCL and OpenMCL.

The full history of changes of my branch is available at the end of this page. Yes, you have to scroll manually.

As there is currently no real documentation the quite verbose history of changes is a valuable source of information!

File format and screen shots

Section 1

The slide definition file has Lisp's S-Expressions as syntax while the keywords are taken from HTML. Therefore a front page might be defined as:

     (p "")
     (title (center "Warum Lisp toll ist"))
     (p (center " - oder - "))
     (p (center "schnelles und bequemes Entwickeln mit Lisp"))
     (p "")
     (p (center "Max-Gerd Retzlaff"))
     (p (center "("))
     (image "bknr-banner.pnm" :x-align "center"))

The defined slide will look like:

example frontpage
Click for a large version.

Section 2

An ordinary slide taken from a German speech on Lisp might be defined as:

    (title "S-Exp #2")
    (p (line "Bereits gesagt: Die berühmten Lisp-Listen sind eigentlich Bäume.
   Der eigentliche Datentyp ist " (tt "cons") " und die schöne Listennotation
   ist im Prinzip nur " (i "syntactic sugar:")))
    (p (line (tt "'(1 2 3)") " steht für " (tt "(cons 1 (cons 2 (cons 3 nil)))") " bzw:")
       (smallpre "
    |        |        |
    v        v        v
    1        2        3
       (line "Ein cons besteht also eigentlich nur aus zwei Feldern,
   die auf andere Listen oder Atome zeigen."))
   (p (line "(NIL steht übrigens lediglich für '(), also für die leere Liste.")))

This will look like:

example slide
Click for a large version.

(In the latter example you can see that Acclaim is able to wrap text as of version 0.23. This makes writing slides a lot easier.)

Section 3

The look of the slides (fonts, colors, and background colors and images) can be defined in an association list as the value of the :configuration attribute of the slideset tag. In the screen shots above the following configuration is used:

     ((title :fontname "-misc-nasalization-medium-r-normal-*-*-480-*-*-p-*-iso8859-1")
      (pre :fontname
   	"-misc-nu sans mono demo-medium-r-normal-*-*-200-*-*-p-*-iso8859-1"
   	:color "Beige")
      (tt :fontname
          "-misc-everson mono latin 6-medium-r-normal-*-*-240-*-*-p-*-iso8859-1")
   ;;   (i  :fontname "-misc-traditionsansxlight-medium-o-normal-*-*-240-*-*-p-*-iso8859-1")
      (slide :fontname
   	  :bg-image "Decker1024_1152x768_dark.pnm"
   	  :bg-color "black" ;; "midnightblue"
    (slide ..)
    (slide ..)
    ) ;; of the slideset

Section 4

If you want to have a look at the whole slide definition file of this tiny demonstration, select between a htmlized version or the plain Lisp version. (This file actually includes two more example slides so that you might get an idea, although not every feature of Acclaim migth be shown, of course.)


Preliminary remark: Of course, as this is a crude hack it is not included in the main branch of my Acclaim version.

In a nightly coding session on the GPN3 of the Computer Club Entropia e.V. / CCC-Karlsruhe I added an Jeopardy mode. I think such a mode is vitally important and every presentation program simply has to have one.

This is really a horrible hack but actually it integrates quite nicely into Acclaim. You can still use acclaim_jeopardy for presentations, and if you like you can add a (jeopardy! ...) blockinto the slide definition file just as you add a slide or a configure block, and play a session of Jeopardy during your speech. As all functionality of Acclaim is still available you can use layouted text or even images to create nice answer and question slides. Think of the unimaginable possibilities!

The main Jeopardy slide looks like:

main Jeopardy slide
Click for a large version.

The round of Jeopardy you can see in the above screen shot is definded as:

(configure :bg-image "Decker1024_1152x768_dark.pnm")

   :title "Colophon"
   :p200 ("The Camel book"
	  "Was ist " (tt "Programming perl") "?")
   :p400 ("The Bat book"
	  "Was ist das sendmail-Buch")
   :p600 ("This book has dust-puppy on it"
	  "Was ist 'evil geniuses in a nutshell'")
   :p800 ("This book is decorated with a llama"
	  "Was ist 'learning perl'")
   :p1000 ("This animal is featured on 'DNS and bind'"
	   "Was ist das Heuschrecke/grasshopper"))
;; more categories

Actually only the first category is shown. Think of more categories; it is quite boring to include the whole definition of the round. But if you indeed want to enjoy the whole definition (even another five rounds for free!), select between a htmlized version or the plain Lisp version.

History (of Max-Gerd's branch)

  0.10 - 0.11: page numeration
  0.11 - 0.12: li*, br, *draw-background-image* 
  0.12 - 0.13: inline image support (with all test code)
  0.13 - 0.14: inline image support (test code removed)
  0.14 - 0.15: cosmetic changes of the source coded
  0.15 - 0.16: renamed from exhibitionist to acclaim
  0.16 - 0.17: new function load-bg-image
  0.17 - 0.18: only minimal changes
  0.18 - 0.19: - make-element is generic function now.
               - Inline images are preloaded if *preload-images* is set.
               - The background image (or solid color) is to be defined
                 in a configure-block of the slide definition file.
               - If *slides-pathname* is set to a valid pathname the slides
                 (and its images) will be loaded as acclaim itself is loaded.
  0.19 - 0.20: - Now you can also specify fonts and their colors in the
                 configure-blog. Right now it is a crude hack and you
                 can only define the default font and the element "title".
                 In the next release I will problably remove the macro
                 make-render-element=around again, replacing it by the
                 metaclass-foo I had in a previous version of acclaim.
               - Note to toggling of *preload-images*:
                 Use (load-slides pathname :preload-images nil) to switch
                 it off and t for enabling, respectively.
  0.20 - 0.21: - New metaclass element-class; the elements have now
                 class slots for fontname, color, and shift-value
                 (as well as additional slots for their default values).
                 The macro make-render-element=around is replaced by
                 a more generic method that uses the new class slots.
                 These changes make the code far more complex but
                 on the other hand the configuration of fonts, colors,
                 etc. in the slide definition files works smoothly now.
               - All variables defining the look of acclaim's output
                 are now restored before a new slide definition is loaded.
               - Inline images can be positioned by :x-align and :y-align.
               - A new function (change-host hostname).
  0.21 - 0.22: - New variable *debug-do-not-load-bg-image*
               - Set *font* in #'load-slides if *display* is bound.
               - Set *last-foil* to 0 in #'restore-defaults.
               - button-press-event removed; #\Space is enough.
  0.22 - 0.23: - line wrapping support
                 (The code itself is very ugly and the algorithm is really
                 inefficient but it works (also in some more complicated
                 situations like some different font enviroments in one
                 line) and as there is normally only a handful of lines per
                 slide the inefficiency is really not a very big problem.)
               - Every text that is not in a pre enviroment (or a subclass
                 of it, i.e. smallpre) is now wrapped.
               - Apart from the *offset* the *line-begin* of a new line of
                 text is now to be remembered, in case that a line wrap
               - Inline images can be positioned by :x-align and :y-align.
  0.23 - 0.24: - (Not really new, exiting features; mainly refactoring.)
               - Pseudo package my-pcl for importing of mop functions
               - Global variables for the default color, fontname, bg-color,
                 and bg-clx-image removed and replaced by _class_ slots of
                 the element slide.
               - fontname, color, shift-value, and bg-color (the latter
                 only for a slide) are now instance specific;
                 Hence you can write ((tt :color "white") "foo") to get a
                 white tt, or ((slide :bg-color "blue" :color "green") ..)
                 to get a blue slide with a default textcolor of green.
               - New elements slideset, font and page-number.
               - The page-numbers are now added to the slides themselves
                 when the slides file is loaded (in load-slides) and not
                 when the slide is displayed (in render-slide).
               - The slides of a slideset are now grouped as the content
                 of a slideset element, as in:
                 (slideset (configure ..) (slide ..) (slide ..))
                 It would be possible to define several slidesets in one
                 file but right now only the first one is actually used.
               - New method element-property (and aliases element-fontname,
                 element-color, etc.). It tries to get the property's value
                 for the instance, if that's not set then for the class of
                 the instance, then for the superclasses up to the element
                 class itself.  So if the class pre has the color "white",
                 the subclass smallpre will also be white.
               - Due to the above changes the make-element configure method
                 got much simpler. The format of a configure block is also
                 easier: No keywords just a list of element setting blocks.
               - wm-properties also set to Acclaim and not to Exhibition now.
               - Hotkey #\s (for screenshot) added; the shots will be
                 placed in the directory of the slides definition file. The
                 pathname "/usr/bin/scrot" for the screen capture program
                 "scrot" is hardcoded. Go to
                 to get scrot (or do "apt-get install scrot" on Debian).
  0.24 - 0.25: - (Another mainly-refactoring-release, although there are some
                 perhaps interesting changes.)
               - No use of the meta object protocol (MOP) (no meta-class
                 element) anymore. It is replaced by a model based on
                 generic methods. (An idea of Manuel Odendahl. Thank you.)
                 This removes quite some complexity in my humble opinion.
               - Thus the program defaults are stored as generic methods for
                 each element now, whilst the slideset defaults are an
                 association list in the slot :configuration of the
                 particular slideset instance. (This also means that you can
                 have more than one slideset with different configurations
                 at a time. Perhaps useless, but who know..)
               - Because of the above mentioned there is no configure block
                 anymore, instead the settings are defined as a alist of the
                 slideset's :configuration slot as in:
                 ((slideset :configuration ((slide :bg-image "Yummy_Pi.pnm")))
                    (slide ..) (slide ..))
               - As there is no configure block anymore, there is no
                 make-element method for it, either. A slightly drawback of
                 this is that there are also no "Changing element ~a: .."-
                 messages during slide loading anymore.
               - And finally as the configuration is not stored in class
                 slots of the elements anymore there is no need for a
                 function restore-defaults. An advantage of the new model.
               - New exported function change-slideset to switch between the
                 loaded slidesets (that are stored in *slidesets* by the way).
               - The exported functions start and go-on are merged, and the
                 resulting single function is called run. Thus the
                 presentation will always start with the current slide
                 defined by *last-foil* which is normally (see below) reset
                 to zero in *load-slides*. If you want to start at a
                 different slide call something like (acclaim:run :foil 2).
               - New element no-wrap. It is useful to define blocks whose
                 text is not wrapped. The element pre is defined as a
                 subclass of it now.
               - Slides can have individual background images now. But while
                 the slideset's default background image is preloaded in an
                 X image pixmap on program start (in the run function), a
                 slide's individual background image is displayed using
                 xlib:put-image (just as an inline image) which is slower.
                 (I don't want to encourage the use of many different
                 background images but if you really need this then drop me
                 a line. A drawback would be that the creation of X image
                 pixmaps for these additional background images would slow
                 down the start of the presentation (the function run).)
               - The function render-slide is changed because of the
                 individual background images. The order of places that are
                 checked to get the actually used background is:
                 1) The slide's background image, 2) the slide's background
                 color, 3) the slideset's default background image,
                 4) the slideset's default background color, 5) the program's
                 default background color (i.e. "midnightblue" at present).
               - Global variable *show-bg-image* renamed to
                 *debug-show-bg-image*, *debug-do-not-load-bg-image* renamed
                 to *debug-do-not-load-bg-images*. New global variables
                 *debug-do-not-reset-*last-foil** and *slideset-number*.
               - The loading of background images is not influenced by the
                 variable *preload-images*. They are preloaded unless
                 *debug-do-not-load-bg-images* is true, and in that case
                 they are not displayed at all (a slightly drawback of the
                 new configuration model).

A personal note on presentation programs

Perhaps this will sound a little bit schizophrenic as I spent quite some time programming Acclaim but I actually hate presentation programs. Too often they are misused. Let me put it in a provocative from: A good slide set is completely useless to understand the speech's topic. Speech means "spoken words", and look at the average Powerpoint 'speech': The main points are put on the wall as big bullet boxes and the speaker just tries to mention each of them, barely using full sentences. This has nothing in common with rhetorics!

Of course you need sometimes to present some tabulars, graphics, or (short) code examples, especially in a technical speech. For this -- and only for this -- you should use the presentation program. The documentation should be a completely different thing using full formulated sentences. The idea that if you write down everything you want to mention so that the slides are usefull for people who cannot attend your speech is a bad one in my humble opinion, leading to bad slides that consume too much attention of the audience.

Last week (June, 9th 2004) Lawrence Lessig was at the University of Karslruhe in Germany, and he did a brilliant "performance" on "Free Culture", using his presentation program as an expressive medium. He used many slides per spoken sentence! Thus his slides were like markers for the important words (think of a cartoon figure whose thoughts are visible as written words over its head). The time was just enough to read the word at the same time as he spoke them. Perhaps this sounds a little bit scary at first but trust me it was really great. And it did made his speech more expressive and impressive. In my opinion that was a good use of a presentation program, and it was also very refreshing. (Not to mention that I also liked the content the of his speech.)

Okay, perhaps the above mentioned is a little bit too black and white. Especially if the speaker is not (yet) used to give speeches, more verbose slides are quite nice. And the same is true if I am a little bit tired or just not very interested in the topic: When you are not listening to every word of the speech it is nice that you have some moments left to read the slide in order to get at least to know some notes of what he just mentioned. On the other hand, as I already have mentioned, if the speaker has the urge to stick to every word he or she had written on the slides these slide themselves can actually cause the tediousness.

And now imagine the speaker might even feel the urge to present cool looking slides consisting of a dark background picture combined with low-res bright-yellow text! :}

Written on June, 16th 2004.


Max-Gerd Retzlaff <>, <>, or <>
GnuPG- / OpenPGP-Information:
   Type bits/keyID    Date       User ID
   pub  1024/81239F12 2002/03/12 Max-Gerd Retzlaff <>
             Key fingerprint =  49 CD 21 F2 41 AC 72 C5  D0 D1 27 DC C2 B2 48 AE  81 23 9F 12 
   uid                           Max-Gerd Retzlaff <>
   sub  4096g/63E36E39 2002-03-12
   local copy of the key

First version on June, 12th 2004. Last modified: Sat Jun 19 03:48:55 CEST 2004