Medley Interlisp: Interactive Lisp Environment via Clojure
Table of Contents
0.1. Architecture
0.1.2. What is Medley?
The primary source (interlisp.org/documentation/Medley-Primer.pdf, "Medley for the Novice," Release 2.0, Feb 1992) states plainly: "Medley actually consists of two complete Lisp implementations, Common Lisp and InterLisp... thanks to the package system, you can call back and forth between the two languages." Medley is not a single "Common Lisp with extensions" dialect named Interlisp-D -- it bundles two distinct, interoperating Lisp implementations.
Medley is a Lisp-based interactive programming environment and user interface development tool. It includes:
- Two complete Lisp implementations, Common Lisp and InterLisp, connected via a shared package system
- A library of functions and tools for building user interfaces
- Debugging and program analysis capabilities
- Support for multimedia elements like images, animation, sound
Some key capabilities Medley provides:
- Live coding - write and modify Lisp code interactively
- GUI interface construction
- Bitmap/image editing
- Program tracing and inspection
0.1.3. Interactive Coding Workflow
The =(redo)=, =(bt)=, =create-window=, =create-menu=, =show-menu=, and =spy/start=/=spy/report= forms below are tagged as Clojure source blocks but are not real Clojure -- running each one against a live babashka REPL (v1.12.206) produces "Could not resolve symbol" every time; none exist in Clojure core or any standard library. =redo= and the debugger's call-stack command are genuine Interlisp-D/Medley Programmer's Assistant and Break Package concepts, but presenting them as literal runnable Clojure is not accurate.
A basic REPL loop allows entering code interactively:
user> (print "Hello world!")
Hello world!
nil
user>
The programmer's assistant provides shortcuts, like re-running previous expressions:
user> (def x 10)
#'user/x
user> x
10
user> (redo) ;; Last expression is re-run
10
0.1.4. User Interface Construction
Windows can be created programmatically:
(def window (create-window :title "My Window"
:width 100 :height 200))
Menus allow building interactive interfaces:
(def menu (create-menu :title "File"
:items [["Open" #(do-open)]
["Save" #(do-save)]]))
(show-menu menu)
0.1.5. Debugging and Analysis
Errors trigger a debugging prompt:
(defn divide [x y]
(/ x y))
(divide 10 0) ;; Triggers error
In the debug REPL, the call stack can be inspected:
user> (bt) ; backtrace
(#'user/divide 10 0)
(#'user/eval204 10 0)
...
The spy library tracks time spent in functions:
(spy/start)
;; Run program
(spy/report) ;; Print profiling report
0.1.6. Extensibility
Libraries extend Medley's capabilities, like graphing, GUI layout, etc. User defined initialization scripts customize defaults.
0.1.7. References
Both softwarepreservation.org links below now 301-redirect to softwarepreservation.computerhistory.org, which 404s on these exact paths -- the site was reorganized and Interlisp-D material now lives under /LISP/interlisp_family.html with no equivalent direct file at the old path. The interlisp.org/documentation/Medley-Primer.pdf link is live and confirmed to be the same "Medley for the Novice," Release 2.0 (Feb 1992) primer.
- Medley User Documentation: https://www.softwarepreservation.org/projects/LISP/interlisp-d/medley/medley-user-documentation.pdf (dead link as of this check – domain moved to softwarepreservation.computerhistory.org, which 404s on this path; see the live Medley-Primer.pdf link below for the same primer content)
- Medley Source Code:
https://www.softwarepreservation.org/projects/LISP/interlisp-d/medley/medley-source-code.zip (dead link as of this check, same domain migration)
0.1.8. Questions
- How extensible is Medley - what languages or libraries can it be connected to?
- How does the performance compare to more modern Lisp implementations?
- What modern features are missing compared to languages like Clojure or Racket?
1. Related
- Common Lisp: A Practical Introduction – the standard that followed
- A Gentle Introduction, Four Lisps: One Book, Four Re-tellings – four living Lisps
- What Survived Clojure – what the modern one kept