This is the multi-page printable view of this section. Click here to print.
Using Medley
- 1: Running Medley Interlisp
- 1.1: Using Interlisp Online
- 1.2: Running on Linux (incl. WSL)
- 1.3: Running on MacOS
- 1.4: Running on Windows 10/11
- 2: Building the Interlisp system
- 2.1: Building Medley Interlisp
- 2.2: Releases
- 3: Documentation
- 3.1: The Basics of Interlisp
- 3.2: What to Expect when Using Medley
- 3.2.1: Modern Medley Release Notes
- 3.2.2: Orientation to Medley
- 3.2.3: The {DSK} file system
- 3.2.4: Tips
1 - Running Medley Interlisp
You can run Medley Interlisp on a wide variety of systems. This section lays out the basics to help you choose:
- Interlisp Online
- for most systems; see caveats
- Download and install from a release
- Running on Mac (Is this active or still in progress? If it is not ready, I do not think we should not have it listed.)
- Running on Windows
- For Windows 10 or 11 with WSL1 or WSL2
- Running on Linux
For other OS or machine architectures, You can (re)build the virtual machine emulator (Maiko) from sources, and then run in a release or even build your own images (sysouts).
(Where does the link to the build topics fit into these pages?)
See README.md files in the GitHub repo.
1.1 - Using Interlisp Online
Running Interlisp online is good for experimenting and introducing yourself to the environment. However, anything you create in the online environment should be treated as transient. If you’re interested in developing and experimenting with Lisp programs, you will want to investigate other options. But, for a first foray, this is a good starting place.
Things to note when running online
- Browser compatibility
- Watch out for control-character conflicts (control-W always gets me)
- Security is not guaranteed
- You need a solid net connection to our AWS server (currently in Ohio)
- Back to time-sharing: Maximum load ~24 simultaneous sessions
Accessing Interlisp Online
-
Go to Interlisp Online
Interlisp Online Login
-
Login to Medley Interlisp Online:
- You can login as a guest by clicking
on the login screen. However, guest sessions are not saved. or
- We suggest you create your own account by clicking
on the login screen. Having an account enables you to save your sessions. To create an account, you just need an email address and password. Click Register here on the login screen to create your own account. or
- If you are already registered (created an account), log in and start a Medley Interlisp session. Sessions are preserved for users that login with their own account. However, user account sessions may be deleted after 30 days of inactivity.
- You can login as a guest by clicking
-
Select the Exec you want to run. For this exercise, select
Interlisp
-
Leave the
Fill browser window
option set. -
Select
Run Medley
. Your browser will open a window that represents the Interlisp Desktop and looks much like this:

Medley Interlisp
The Interlisp Desktop at startup contains 4 windows of interest:
- Prompt Window: The black window at the top of the screen. It is used to display system or application prompts
- Exec (INTERLISP) window: The main window where you run functions and develop programs.
- Medley logo window: A window containing the Interlisp Medley logo as a bit map.
- Status Bar window
Writing a sample Interlisp programs
In the Exec window, type the following:
(PLUS 1 1)
When you complete typing the ending )
the Interlisp interpreter will perform the calculation and return the result.
One thing you probably noticed, the command PLUS
is capitalized. It’s not that the developers of Interlisp were always shouting at each other. Rather, when Interlisp was developed computer programming was in its infancy and standards for naming commands were still evolving.
Managing memory images and sessions
(What is a memory image? How is it different from an image or memory?)
In Interlisp, there are two types of files relevant to managing memory images and updating them across sessions: lisp.virtualmem
and .sysout
.
The lisp.virtualmem
file is a capture of the “current” state of the system (i.e., it is a copy of the virtual memory at a point in time). lisp.virtualmem
is written whenever you execute (IL:LOGOUT)
and also whenever executing (IL:SAVEVM)
. You can restart Medley using a lisp.virtualmem
and it will pick up essentially where it left off before the LOGOUT
or SAVEVM
(with the exception that the user can set BEFORE
/AFTER
and LOGOUT
/SAVEVM
code that runs before you get control of the restarted lisp.virtualmem
).
A .sysout
is a virtual memory image produced by MAKESYS
(for writing an image for distribution) and SYSOUT
(for saving a named checkpoint, e.g. to revert to a previous state if needed), which differ in the way they process the startup options. You can (and most frequently do) start Medley from a sysout file. When Medley starts from a sysout, it automatically runs initialization scripts — a site initialization script followed by a per-user initialization script (if available). A sysout is what you might call “a clean image”.
As for Interlisp Online: except as noted below, every time you Run Medley
you are starting up from a sysout file (i.e., from a clean image). The exception is if you check the Resume previous session
box. In that case, you will be starting up from the lisp.virtualmem
stored for you online (if any) and that was created by the (IL:LOGOUT)
at the end of your previous session.
As a registered Interlisp Online user you get the choice of resuming your previous image or starting from a clean image — with the default being starting from a clean image.
For guest logins, there is no Resume previous session
because lisp.virtualmem
is never preserved for guests.
For registered users, any files that you create (e.g., with IL:MAKEFILE
) will also be preserved across sessions online. But these files will never be automatically loaded into the system when you re-start with a clean image — you need to LOAD
them explicitly (or add a LOAD
to your personal INIT
file stored online at {DSK}/home/medley/il/INIT
).
1.2 - Running on Linux (incl. WSL)
Medley can run on any Linux system that includes X Windows, including Windows System For Linux (WSL) on Windows 11 and Windows 10 Build 19044+.
We recommend the Linux system have a web browser installed. For WSL installations, the browser(s) on the Windows side will suffice. A browser is not strictly necessary to run Medley, but several features of the system (e.g., displaying some user documentation) will not work without an external browser installed.
Medley can be installed on your system in one of two configurations: standard and local.
- Standard installation will install Medley into system directories and install any prerequisite packages.
- Local installation will install Medley into any user directory but any prerequisite packages must be installed manually.
On WSL, Medley will run on either WSL1 or WSL2. WSL2 is preferred, but for older machines that do not support virtualization (see here) or Windows builds prior to Windows 10 Build 19041, WSL1 will work just fine although it will be limited to the VNC mode (see below). See here for more information on running Medley on WSL.
Standard Installation (Debian-based systems only)
Standard installations are currently supported only for Debian-based systems (i.e., systems that support dpkg), including Debian-based distros on WSL.
In a standard installation, Medley is installed in system directories (specifically, /usr/local/interlisp). Support-like man pages and (a link to) the medley executable are also installed in standard system locations (e.g., /usr/local/man and /usr/local/bin).
Standard installations are ideal for users who want to explore Medley (including its system code) or to develop applications built on top of Medley. Standard installations are not good for users who want to modify the Medley system code, since that code is installed in protected locations.
Standard installation uses apt
to install a .deb package downloaded from
the Medley downloads site.
The .deb package will install Medley as well as any other packages needed for Medley to run.
There are separate .deb packages for “standard” Linux and for WSL (as well as for the three machine architectures - X86_64, ARM64, ARMv7). The WSL packages differ only in that they include an additional functionality to have Medley display in a VNC Window instead of a standard X Window. This is useful on high resolution displays since the VNC window will scale according to the Windows Settings->Display->Scale setting, while the X Window on WSL will not so scale. The WSL packages also install the wslu package, which is used by Medley to connect to external browsers as described above. Aside from these two features, a non-WSL .deb package will install and run on WSL.
Accessing Medley
-
Use a browser to download from the .deb package for your platform (i.e., “standard” Linux or WSL) and your machine architecture (X86_64, ARM64, or ARMv7) to
<deb_filepath>
from the Medley downloads siteNote: On WSL,
<deb_filepath>
will depend on whether the browser was started in Windows or in WSL:- If downloading to the standard Downloads folder, using a WSL-based browser
<deb_filepath>
will be in~/Downloads
. - If using a Windows-based browser,
<deb_filepath>
will be in/mnt/c/Users/<username>/Downloads
.
- If downloading to the standard Downloads folder, using a WSL-based browser
-
Enter the following in a terminal to install the download:
ubuntu@oio:~$ sudo apt update ubuntu@oio:~$ sudo apt install -y <deb_filepath>
-
Enter the following in a terminal to run medley:
ubuntu@oio:~$ medley
There are many options to the
medley
command. For a brief overview, runmedley --help
. For a more complete description, runman medley
ormedley --man
or click here.For first-time users:
medley --apps
or for WSLmedley --apps --vnc
is a good starting point. This will give you a fully populated Medley system, including the applications built on Medley such as Notecards and Rooms.
Notes:
- By default,
medley
will create a directory in $HOME/il. This will be used by the Medley system as its LOGINDIR. Medley will start up with LOGINDIR as its current connected directory. It will load the personal init file (if any) from LOGINDIR/INIT or LOGINDIR/INIT.LCOM. Finally, Medley will use LOGINDIR/vmem/ to store its virtual memory file(s). The location of LOGINDIR can be changed using the--logindir
option tomedley
.
Local Installation
In a local installation, the Medley system is installed into any user directory from a .tar file. Multiple “Medleys” can be installed in different directories on one machine without interference (except see description of Medley LOGINDIR below). Local installation makes it easy (from a file management p.o.v.) to modify the Medley system code.
Local installation doesn’t involve a package manager, so you are responsible for installing any prerequisite packages onto your system before you install Medley.
Also note that with local installations, man medley
will not work. However, as indicated below,
./medley --man
will show the medley man page.
To install and run Medley locally:
-
Install prerequite packages
-
For non-WSL installations, use your distro’s package manager to install
xdg-utils
. -
For WSL all installations, use your distro’s package manager to install
wslu
.Note that some distros do not include
wslu
in their standard repos. See https://wslutiliti.es/wslu/install.html for installation instructions if this is the case.Also note that
wslu v4.0
does not work with Medley, so you will need to install either a version < v.40 or >= v4.1. -
For WSL installations where the VNC feature will be used, install the
tigervnc-standalone-server
andtigervnc-xorg-extension
packages.When using the VNC feature Medley will display in a VNC Window instead of a standard X Window. This is useful on high resolution displays since the VNC window will scale according to the Windows Settings->Display->Scale setting, while the X Window on WSL will not so scale.
Note that Medley will install and run even if none of these prerequite packages are installed. However, some features (e.g., viewing documentation in an external browser) will be inoperable.
-
-
Download
Using a browser download from the Medley downloads site the tar (.tgz) file for your platform (i.e., “standard” Linux or WSL) and your machine architecture (X86_64, ARM64, or ARMv7) to
<tar_filepath>
.Note that on WSL,
<tar_filepath>
will depend on whether the browser was started in Windows or in WSL. If downloading to the standard Downloads folder, using a WSL-based browser<tar_filepath>
will be in~/Downloads
. If using a Windows-based browser,<tar_filepath>
will be in/mnt/c/Users/<username>/Downloads
. -
Install Medley
In a terminal:
ubuntu@oio:~$ mkdir <interlisp_directory> ubuntu@oio:~$ tar -C <interlisp_directory> -xzf <tar_filepath>
-
Run Medley
In a terminal:
ubuntu@oio:~$ cd <interlisp_directory>/medley ubuntu@oio:~$ ./medley
There are many options to the
medley
command. For a brief overview, run./medley --help
. For a more complete description, run./medley --man
or click here.For first-time users:
./medley --apps
or for WSL (and you have installed the VNC prerequisites)./medley --apps --vnc
is a good starting point. This will give you a fully populated Medley system, including the applications built on Medley such as Notecards and Rooms.
Notes:
- By default,
medley
will create a directory in $HOME/il. This will be used by the Medley system as its LOGINDIR. Medley will start up LOGINDIR as its current connected directory. It will load any personal init file from LOGINDIR/INIT or LOGINDIR/INIT.LCOM. Finally, Medley will use LOGINDIR/vmem/ to store its virtual memory file(s). The location of LOGINDIR can be changed using the--logindir
option tomedley
. In particular, if you have multiple installations of Medley that you would like to keep completely separate, then you can use the--logindir -
option, which will set LOGINDIR to <medley_directory>/logindir.
1.3 - Running on MacOS
DRAFT – This page is currently being revised.
online
requires a recent version of Safari or Chrome or Firefox.
docker desktop
Running with Docker Desktop is an option, but installing locally is better.
Install from release
We don’t have it build automation yet, but usually a release will include a build for darwin.aarch64.
install medley from release, build maiko
Need XCode Need XQuartz installed before you build maiko (includes XClient libraries).
- Requirements
- Intel or M1/M2 Macintosh (or even older)
- XQuartz Macintosh X server for your OS/mac vintage)
XQuartz settings
emulate 3-button mouse
1.4 - Running on Windows 10/11
How is this different from the topic running on Docker Desktop?
Medley does not yet run as a native Windows application. Besides online, you can run Medley on Windows 10/11 using Windows System For Linux (WSL1 or WSL2).
This methods requires the installation (if not already installed) of one additional component to your Windows system - WSL.
On Windows, Medley requires a 64-bit machine.
Running on Windows with WSL
Medley will run on either WSL1 or WSL2. WSL2 is preferred, but for older machines that do not support virtualization (see here) or Windows builds prior to Windows 10 Build 19041, WSL1 will work just fine although it will be limited to the VNC mode (see below).
When running under WSL2, Medley can display in one of two ways: in an X-Window (using the X_Windows server built-in to WSL2) or in a VNC-viewer Window. Although the X-windows approach is simpler (i.e., behind the scenes) it does not scale well on high-DPI displays. In VNC mode, the Medley window will scale according to the Windows Display Scale settings. The X vs Vnc mode is set on using the --vnc
flag on the medley
command line. When running on WSL1, Vnc mode is always used.
To install an run Medley with WSL
-
Install WSL: See here for instructions on installing WSL.
-
Install medley within WSL: Once WSL is installed, open a terminal to WSL (e.g., by typing “wsl” in a command or powershell window) and follow the instructions for installing and running Medley on Linux that can be found here.
-
Run Medley: Once Medley has been installed on WSL, you can run medley from either a WSL terminal as described in the Running Medley on Linux instructions (here) or by typing
wsl medley <flags and options>
in a Command or Powershell window.Documentation for the
<flags and options>
to themedley
command can be found hereFor first-time users:
wsl medley --vnc --apps --interlisp --noscroll
or, equivalently,wsl medley -v -a -e -n
is a good starting point. This will give you a fully populated Medley system, including the applications built on Medley such as Notecards and Rooms.
Notes
- If Medley for Docker (see below) is also installed on the system, you can also start Medley by typing
medley --wsl <distro> <flags and options>
in a Command or Powershell window. This is equivalent to thewsl medley <flags and options>
command described above.
Running on Windows with Docker Desktop
When running with Docker, Medley runs in a Docker container using the Interlisp/medley image found on Docker Hub. A VNC Viewer window is used to display the Medley desktop. All of this is started up using the single medley
command.
To install an run Medley with Docker Desktop
-
Install Docker Desktop: Install Docker Desktop for Windows as described here.
-
Install Medley: To install Medley, download and run the the
medley-install_<version>.exe
that can be found here under the Windows 10/11 heading.This will install Medley on your system, by default in the
%USERPROFILE%/AppData/Local/Medley/Scripts
folder. This folder will be added to your %PATH%. An uninstall will also be added so that you can remove Medley via the standard Add/Remove Programs control panel.Note that to download
medley-install_<version>.exe
, you may have to bypass any security concerns your browser has about downloading an .exe file. In addition, you will have to bypass the Windows Defender protection against executing an unsigned .exe. To do so, clickMore info
followed byRun Anyway
when the Windows Defender window pops up. -
Run Medley: Once it is installed, you can run Medley by typing
medley <flags and options>
into either a Command or a Powershell window.Documentation for the
<flags and options>
to themedley
command can be found hereFor first-time users:
medley --apps --interlisp --noscroll
or, equivalently,medley -a -e -n
is a good starting point. This will give you a fully populated Medley system, including the applications built on Medley such as Notecards and Rooms.
Notes
-
Docker needs to be installed and running in order to run Medley. However, the Docker Dashboard window does not be open. You can check the state and start/stop Docker by right clicking on the Docker icon
in the System Tray.
-
The first time it runs,
medley
will automatically pull the latest Interlisp/medley docker image from Docker Hub. It will use this docker image for all subsequent runs unless the ‘–update’ flag is raised. When –update is raised,medley
will once again pull the latest Interlisp/medley docker image. -
When running with Docker, the Medley file system is for the most part “within” the Docker container. This means that it is deleted whenever Medley stops and is recreated whenever Medley restarts. The exception is the directory
/home/medley/il
(in the Medley file system) which is automatically mapped bymedley
to a directory in the host Windows file system, by default to%USERPROFILE%/AppData/Local/Medley/il
folder. You can change this mapping to a different windows folder using the--logindir
option tomedley
.
2 - Building the Interlisp system
Medley Interlisp is open-source and may be obtained from GitHub. It is portable to many different Linux and Apple MacOS systems, as well as Windows using WSL2.
The core is written in portable C. The system currently depends on an X11 system for its display.
Obtaining The System
The system comes in two parts. The first is a C-based virtual machine Maiko.
The remainder of the system is OS / architecture-independent and can be found in the Medley repository.
You can now download Medley Interlisp from a release without building anything; see the Medley README
See The Maiko README for build instructions for Maiko, for systems for which there is no pre-built release.
(See Medley repo README for instructions on getting Medley. Make sure you have an X-server running to manage the Medley Interlisp display, and the DISPLAY environment variable set to point to your X-server.
Running Medley can be done by typing:
$ cd medley
$ ./run-medley
Or, if you wish to start Medley up with a particular image file (SYSOUT):
$ cd medley
$ ./run-medley <SYSOUT-file-name>
The first time the system is run it loads the system image that comes
with the system. When you exit the system (or “do a SaveVM
” menu option)
the state of your machine is saved
in a file named ~/lisp.virtualmem
. Subsequent system startups
load the ~/lisp.virtualmem
image by default.
Exiting The System
The system may be exited from an Interlisp prompt by typing:
(LOGOUT)
Or from a Common Lisp prompt with:
(IL:LOGOUT)
When you logout of the system, Medley automatically creates a binary dump of your system located in your home directory named ``lisp.virtualmem’’. The next time you run the system, if you don’t specify a specific image to run, Medley restores that image so that you can continue right where you left off.
2.1 - Building Medley Interlisp
Medley Interlisp is open-source and may be obtained from GitHub. It is portable to many different Linux and Apple MacOS systems, as well as Windows using WSL2.
The core is written in portable C. The system currently depends on an X11 system for its display.
Obtaining The System
The system comes in two parts. The first is a C-based virtual machine maiko.
The remainder of the system is OS / architecture-independent and can be found in the medley repository.
You can now download Medley Interlisp from a release without building anything; see medley README
See The Maiko README for build instructions for Maiko, for systems for which there is no pre-built release.
2.2 - Releases
Medley repo releases contains the current Medley release. New releases are generated regularly as functionality is restored and extended.
An alternative is to point your browser to Online Interlisp and try our cloud hosted version of Medley Interlisp.
3 - 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
3.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:
- (1991) Sun User Guide
- (1992) Medley for the Novice
- (1993) Interlisp Reference Manual
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.
3.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
3.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
-
…
3.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 filesXXXX.DFASL
: Another compiled form of XXXX filesXXXX.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 ofSYSFILES
- 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
3.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.
3.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.