December 2007 Archives

Hard disks as distribution media

| No TrackBacks

Neat idea, given the lack of capacity beyond DVDs: The New Yorker magazine complete archive can be purchased not only as a set of 9 DVDs, but also on a single 1.8” 80GB hard disk from Hitachi (with 60GB currently in use). Optionally with personal engraving as well…

(Via Marc Andreesen.)

Kent M. Pitman: The Revised Maclisp Manual (The Pitmanual)

| No TrackBacks

Kent M. Pitman has restored and made available on the net The Revised Maclisp Manual (The Pitmanual), that gives great insights into MACLISP, which had a great influence, both directly, and indirectly via Zetalisp (the Lisp Machine Lisp), on the evolution of Common Lisp.

For those interested in such things, the Lisp Machine Manual (Chinual) is also a rich source of information on the MIT Lisp Machine Lisp, before it diverged into different dialects in the Symbolics and LMI commercial Lisp machines.

(Via Geoff Wozniak.)

Uses for advice: Instrumentation in event-driven simulations

| No TrackBacks

Reading Gary King’s query for users of advice (see also What is advice?), I’d like to add that advice and friends have uses beyond the usual debugging and patching uses that normally come to mind:

The ability to dynamically add or remove instrumentation code at runtime can be quite useful in cases such as event-driven simulations: When you are modeling complex systems, where long-running simulations can see billions of events and sub-events (i.e. sequences of distinct steps taking place during one event), it is often vitally important to efficiently log and analyze only those events or sub-events that really matter to the purpose of this particular simulation run: The simple approach of logging everything under the sun, and only later deciding what to analyse is often impractical due to speed and space constraints.

So the better approach is to only log that which is necessary, however the difficulty lies in determining which events matter and which don’t, especially since for different simulation runs, the things that matter might be completely different, depending on which analysis the user wants performed.

The approach we took in our logistics simulation framework was to use advice, or rather a home-built instrumentation framework built on frobbing CMU CL’s fdefn-function directly, similar to Gerd Möllmann’s fwrappers code now present in CMU CL: Using this facility report developers could define which methods they wanted instrumented, and, having full access to all information the methods had, use this to record all the information they needed for a particular report.

The instrumentation code was packaged together with the code that analyzed the recorded information and produced the final output, and the simulation user could then switch on or off individual reports at runtime for a simulation run, and only the overhead needed for those reports was inflicted on that particular run.

So a simple analysis which hooks two methods, melde-einlagerung and melde-auslagerung might look like this (sorry for the german names):

(define-analysis lager-umsatz-analysis
    ((laeger)
     (zugang-table :initform (make-hash-table :test #'eq))
     (abgang-table :initform (make-hash-table :test #'eq)))
  (:setup
   (setf laeger (find-subjekt-types 'Lagergruppe)))
  (:instrument
   (melde-einlagerung (element quelle gebinde)
     (when (typep element 'Lagergruppe)
       (incf (gethash element zugang-table 0) (gebinde-volumen gebinde)))
     (call-real-function element quelle gebinde))
   (melde-auslagerung (element quelle gebinde)
     (when (typep element 'Lagergruppe)
       (incf (gethash element abgang-table 0) (gebinde-volumen gebinde)))
     (call-real-function element quelle gebinde)))
  (:update
   (multiple-value-bind (sim-zeit-string real-zeit-string)
       (analysis-zeit-strings lager-umsatz-analysis
                              (- (aktive-zeit)
                                 (analysis-interval lager-umsatz-analysis)))
     (loop
        for lager in laeger
        for bestand = (lagerelement-belegt lager)
        for kapazitaet = (lagerelement-kapazitaet lager)
        for zugang = (gethash lager zugang-table 0)
        for abgang = (gethash lager abgang-table 0)
        do
          (format t "~A;~A;~A;~,2F;~,2F;~,2F;~,2F~%"
                  sim-zeit-string real-zeit-string (subjekt-name lager)
                  (safe-prozent zugang bestand)
                  (safe-prozent abgang bestand)
                  (safe-prozent zugang kapazitaet)
                  (safe-prozent abgang kapazitaet))
        finally
          (clrhash zugang-table)
          (clrhash abgang-table)))))

Of course with Lisp there are also other solutions to this problem, like runtime-compilation of conditionally-instrumented methods, however using advice was a simple and effective solution to this particular problem, which also works without access to the source of methods to be hooked.

Alan Becker: Animator vs. Animation

| No TrackBacks

Impressive animation Animator vs. Animation by Alan Becker. See also the sequel Animator vs. Animation II, then play the game!

Dan Weinreb: Common Lisp Implementations: A Survey

| No TrackBacks

Dan Weinreb has invested quite a lot of effort into producing an up-to-date survey of Common Lisp implementations which is in my humble opinion much more useful than many of the out-dated or all-inclusive surveys that float around the net.

(Via Dan Weinreb’s Weblog, which has lots of other interesting posts.)

David G. Lowe: Stanford White's New York

| No TrackBacks

Great book by David Garrard Lowe on American architect Stanford White and his influence on the architecture of New York at the turn of the 20th century. Due to its nice layout and great architectural photography, it also makes for a nice coffee table book.

About this Archive

This page is an archive of entries from December 2007 listed from newest to oldest.

November 2007 is the previous archive.

January 2008 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Pages

Recent Activity

2011-02-17

  • Pierre tweeted, "Service-oriented Architecture (n.): What you do if you have no idea what service is, nor the any notion what software architecture is about."

2010-12-03

  • Pierre tweeted, "Again on the runway waiting for snow-delayed take-off. Quite the lifestyle..."

2010-11-29

  • Pierre tweeted, "The Future(tm): Uploading software releases and submitting policy input to the EU from a plane waiting 1h at the airport for its de-icing ,)"

2010-10-28

  • Pierre tweeted, "Achieved unbelievable win against Siedle, Siemens by connecting front gate intercom to PBX. Sad about the complexity involved though..."

2010-09-20

  • Pierre tweeted, "RT @jwz: Visual Transistor-level Simulation of the 6502 - in Javascript. http://j.mp/bWHK5F"

2010-09-17

  • Pierre tweeted, "Thanks to @mikeysan I'm playing with say -v "Cellos" on my Mac instead of configuring FreeBSD servers... say -v "Cellos" 'Thanks, mikeysan!'"

2010-08-04

  • Pierre tweeted, "Resurrecting my old Apple //e (yet again) lead to switching power-supply debugging (shorted rectifier dual diode) and soldering fun."

2010-07-25

  • Pierre tweeted, "Star Trek/iPad nostalgia/futurology cross-over: Reading the ST:TNG Technical Manual on the iPad, downloaded directly from subspace..."

2010-06-23

2010-06-02

  • Pierre tweeted, "RT @HansHuebner: U.v.d.Leyen als Bundespräsidentin? Ist das Amt nicht schon beschädigt genug?"