This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Documentation

We have a variety of documentation available for anyone interested in using Interlisp.

For general information to get you started, go to The Basics of Interlisp.

For Medley orientation and tips, go to Using Medley.

The following links provide access to PDF files containing Interlisp documentation.

Unsorted documentation content

Most Interlisp/Medley documentation was written using the Medley Text Editor, one of the first WYSIWYG graphical user interface text editors, called TEdit. Written in and for Interlisp users, it features muliple fonts, embedded graphics including line drawings and raster images.

TEdit files are scattered through the the various Interlisp repositories. For the convenience of those who would rather read the files using more modern tools, see the files from different Medley Interlisp repositories, converted to PDF.

For the searcher’s conveneience, these have also been combined into searchable PDFs named All-*-PDFs.pdf.

Medley Interlisp References

Interlisp Books

1 - The Basics of Interlisp

A few basics – enough to get you started from the Medley User’s Guide of ~30 years ago.

Interlisp

Interlisp is a dialect of Lisp and as such, it is based on the familiar syntax of left-parenthesis, function name, arguments, and right-parenthesis. Besides many of the functions having different names and arguments compared to Common Lisp, Interlisp has many other, more fundamental, differences from Common Lisp. While this section will not go into any of the functional differences between Interlisp and Common Lisp, it will attempt to detail the more fundamental differences between the two. The reference manual may be used for a detailed description of the Interlisp functions.

Upper- and Lower Case

Interlisp uses mixed case. That is, upper-case letters and lower-case letters are treated as different. This means you can have a variable name my-var and a variable named MY-VAR that are unique and unrelated to each other. This is true for Common Lisp too, but the READ function in Common Lisp translates.

Most Interlisp primitives are upper case.

As a side note, the Medley system includes a package called DWIM (Do What I Mean). This system reads in what you type and attempts to automatically correct input errors. At times, in an effort to correct typing errors this system will auto-convert something you type in lowercase into uppercase. Thus it may appear that the case doesn’t matter - but it does.

Variables

Except for Special Variables, variables in Common Lisp are lexically scoped. This means that local variables are only visible within the scope they are defined. This means, among other things, that variables defined in one function are not visible to other functions.

In functions that are running interpretively (as opposed to having been compiled), variables in Interlisp are dynamically scoped. This means that variables are visible within the dynamic environment they are in. For example, let’s say we create two functions FUN1 and FUN2. If FUN1 introduced a local variable and then called FUN2, then FUN2 would have access to the variable since it is in the dynamic environment of being called by FUN1. In other words, the variable was in existence when FUN2 was called. However, the Interlisp compiler “hides” variables unless they are “declared special”, so that they are essentially lexically scoped, as in Common Lisp.

Common Lisp also supports dynamic variables as well. They are called the Special Variables.

LISP-2

Like Common Lisp but unlike Scheme, Interlisp is a LISP-2 language. This means, in part, that the namespace for variables is separate from the namespace for functions. For example, in Interlisp and Common Lisp, you can simultaneously have a variable named ABC and a function named ABC that are unrelated.

LAMBDA & NLAMBDA & CL:LAMBDA

Interlisp shares the notion of LAMBDA expressions with Common Lisp, as a way of defining functions. Interlisp LAMBDA specifies a list of parameters; Common Lisp parameter lists can be decorated with &OPTIONAL, &REST and &KEYWORD parameters. Interlisp also adds the notion of an NLAMBDA function that doesn’t evaluate its arguments – arguments to NLAMBDA function are passed directly into a function without being evaluated.

Interlisp supports spread and no-spread lambda arguments similar to Common Lisp. However, Interlisp treats all arguments as optional (if not provided they default to NIL) and ignores extra arguments (no warning or error is raised).

Macros

Interlisp supports macros but unlike Common Lisp, Interlisp symbols may simultaneously have a function definition and a macro definition. If a symbol has both a function definition and a macro definition, the function definition is used by the interpreter and the macro is used by the compiler. This allows for extra error checking during development and fast operation during production use.

Interlisp also has a backquote facility similar to Common Lisp’s ` and , read macros.

Unlike Common Lisp, Interlisp does not have a special function for defining macros. Macros are defined by placing their definition on the property list of the symbol.

Medley Common Lisp

The term “Common Lisp” covers a range of development stages, first defined by the book “Common Lisp, the Language” editions 1 (aka CLtL1) and 2 (aka CLtL2) and ultimately the ANSI Standard Common Lisp (aka ANSI). The Common Lisp currently supported by Medley is somewhere between CLtl1 and CLtl2. We are hoping to complete the move to CLtl2.

In Medley Common Lisp and Interlisp are fully integrated. From within Common Lisp, Interlisp functions may be accessed through the Common Lisp package nicknamed ``IL’'.

Continuing On

This introduction was designed to provide the most general of information – just enough to get you started. Medley comes with extensive documentation.

In searchable PDF and (imperfect) HTML:

Medley Interlisp also includes an online reference:

  • right-click on the desktop to get to the system menu
  • select DInfo

or, at any prompt, the man command will look up an (Interlisp) symbol.


Many thanks to Blake McBride and his Medley Intro from which this was initially taken.

2 - What to Expect when Using Medley

Refer to the following pages to learn about using Medley Interlisp:

  • Orientation: A description of what you will see when you open Medley, and how to use the files and directories available.
  • Medley Tips: A few useful tips and tricks for using Medley.
    Note: I did not include links to the other two topics under Medley (Release Notes and The DSK file), because I am not sure if they are really complete or useful.
  • Files from multiple Medley Interlisp repositories converted to PDF: Most Interlisp/Medley documentation was written using the Medley Text Editor, one of the first WYSIWYG graphical user interface text editors, called TEdit. Written in and for Interlisp users, it features muliple fonts, embedded graphics including line drawings and raster images. Since TEdit files are scattered through the various Interlisp repositories, we created this PDF for convenience. For your conveneience, these have also been combined into searchable PDFs named All-*-PDFs.pdf.
  • Medley for the Sun Workstation User’s Guide in PDF format
  • Medley Primer in PDF format

2.1 - Modern Medley Release Notes

This is a placeholder for gathering information about what’s changed between Medley 2.0 (the last “official” release) and current Medley. Can we get to the point where release notes are built from commit messages?

  • caps lock default

  • Explicit encoding :format, unicode support

  • default hex in printcode

  • Filebrowser

  • filing.enumeration.depth for DSK

2.2 - Orientation to Medley

Once the system has been started, you will see some windows with title bars. Navigation within the system is a little unusual. To control a window, right-click on the window’s title bar. To bring up a system menu, right-click anywhere outside a window.

Windows titled “Exec” work as read-eval-print loops with the addition of extensive “commands”. There are four different contexts, determined by the default “package” and “readtable”. The “package” of a window determines which (Common Lisp) package is the default while the “readtable” controls whether typing is treated as case sensitive or not.

The title bar will also tell you whether you are running LISP (for Common Lisp), XCL (for Xerox Common Lisp), INTERLISP (for current Interlisp), or OLD-INTERLISP-T (for an older version of Interlisp).

When the system first comes up you will notice a window labeled “Exec (XCL)”. This works as a Common Lisp read-eval-print loop.

(Hint: When the system has completed its initialization process, a fresh prompt will appear.)

Different Lisp Environments

The system comes with four versions of “Exec”:

  • Interlisp: Package: Interlisp, Readtable: a hybrid, case sensitive environment. Most Interlisp functions are all caps, so use of the SHIFT LOCK is recommended.
  • Old Interlisp: The same Interlisp package, but an older readtable (where “:” isn’t a package delimiter)
  • Common Lisp: Package: USER (need to check)
  • XCL: (eXtended Common Lisp) Common Lisp with a number of extensions.

Even though each of the possible Exec’s gives a default environment, all of the various Lisp functions and variables are interchangeably available from any of the Exec windows via package specifications. For example, an Interlisp function names ABC may be run from Common Lisp via (IL:ABC ...). Likewise, a Common Lisp function DEF may be executed from Interlisp via (CL:DEF ...).

Images And Files

The Medley system includes a virtual machine (VM) that runs the Lisp programs. Medley can run Lisp code interpreted or compiled into the byte-code for the Medley VM. This is a bit similar to the Java Virtual Machine or the .NET CLR or Smalltalk.

In traditional systems, a developer edits source code files and then compiles those files into something the machine can execute — be it a machine executable file or byte-code for a VM. Medley does not work that way. Medley is an image-based system similar to Smalltalk or Squeak.

When Medley is started up, you are in the development and runtime environment. All of your development is done here and all of your programs are run here. You are essentially editing runnable programs in memory. When you exit the system, Medley creates a backup of this memory onto what is called a SYSOUT (or lisp.virtualmem). When the system is started up again, this image is read into memory and the system picks up right where it left off. This is what is called an image-based development environment.

In Medley, programs are developed, edited, debugged, and run all from within Medley. The state of this development is saved in your image file. There is also a way to save your system to more traditional disk files. This is called the ``File Package’'.

Medley utilizes the following file types:

  • lisp.virtualmem: This is located in your home directory and is an image of the last time Medley was run. If you start Medley without specifying an image to run, this image is used.
  • XXXX.SYSOUT: This is an image that was explicitly saved by the developer. This may be loaded by specifying its name when starting Medley.
  • XXXX (no file name extension): Source files created with the ``File Package’'.
  • XXXX.LCOM: Compiled versions of the XXXX files
  • XXXX.DFASL: Another compiled form of XXXX files
  • XXXX.TEDIT: Text (like a word processor) in a Medley-specific format

Project Directory

Medley has something called its “connected directory”. This is just another way to say “working directory”. All file reads and writes occur (if no path is specified) in the connected directory. When Medley first starts up, its connected directory is your home directory. This can be changed by executing one of the following commands:

cd MyProject

or

(CNDIR "MyProject")

You will see the connected directory displayed at the top of the Medley window. Once the connected directory has been changed, all future image saves or file loads or saves will occur in this directory. Additionally, this directory will be saved in the image so when you re-load the image, you will already be in the desired directory.

One thing to note, however, is that the default image lisp.virtualmem will still be saved in your home directory. This assures that if you start Medley up without specifying an image, you will return to the last environment you were in.

Saving And Running Images

You can also manually save an image to a specific file at any point by typing the following from an Interlisp prompt:

(SYSOUT "my-file")

This will save your running image to a file named my-file.SYSOUT that can be loaded again by passing that file name to the run-medley command.

Creating And Editing Functions

Objects (function, variables, etc.) can be credited and edited as follows:

ED(myfunc)

First, if it is a new object, the system will ask what type of object it is. After that, the user will be presented with a GUI structure editor where the object may be defined or edited.

When the window is closed, via right-clicking on the title bar, the object will be saved.

Saving & Loading Source Code To/From Disk Files

When you edit or define a function, a variable, etc., Medley keeps track of the fact that they have been created or edited. These functions and variables are grouped and ultimately get associated with a file on your disk. In places, Interlisp refers to these disk files as “symbolic files”.

  • FILELST - list of user files the system is aware of
  • SYSFILES - list of system files loaded
  • (FILES?) - prompts user for which file to associate newly defined functions, variables, etc.
  • (MAKEFILE "myfile") - writes out all of the functions, variables, etc. that have been associated with file “myfile”
  • (LOAD "myfile") - loads a previously saved file
  • (LOAD "myfile.LCOM") - load a previously compiled file
  • (CLEANUP) - interactively save and compile all changed files

2.3 - The {DSK} file system

Interlisp-D was built in an environment where people didn’t keep files on their local disks. Files were kept on a File Server. Interlisp-D was built on Tenex, a PDP-10 operating system built for Lisp.

Maiko implements a case INsensitive, versioned file system on top of normal Unix/Posix file system using the code in DSK.c.

You may see references to file systems at PARC, at XAIS, at Envos and at Venue. There was a NFS implementation, XNS Filing system, and LEAF.

2.4 - Tips

Get an Interlisp Exec (REPL)

Click and hold the right mouse button on the background, hover over EXEC, move to the right, go to “Interlisp”, release the right mouse button.

Increase the font size

In an Interlisp Exec, type one of the following:

(FONTSET 'BIGGER)
(FONTSET 'HUGE)

New windows and future lines in the Exec will now be in a larger font.

Edit a function definition

To edit the definition of a function FOO, type into an Interlisp Exec:

(DF FOO)

This will let you draw out a new SEdit window, which you can use to edit the code.

Middle-click in the titlebar to get additional options.