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

Return to the regular view of this page.

Running Medley Interlisp

There are different ways of running Medley Interlisp on a wide variety of systems. This section lays out the basics to help you choose:

  • Interlisp Online
  • In a Docker container
  • Download and install from a release
  • (re)build the virtual machine emulator (Maiko) from sources, run in a release.
  • (Re) build your own Lisp image

A note about performance: Modern systems are thousands of times faster than the D-machines of 1980s. The system was designed for limited memory machines, so 32 MB is quite roomy. The Medley VM is now quite portable to many different OS and CPU configurations.

Interlisp Online

For a minimum amount of setup, the online version is a good starting place. Interlisp Online provides access to a version of Medley running in the cloud. All that is needed to get started is a (recent) browser and a mouse. You can log in as a guest or – if you want to save files or sessions – create an account.

Sessions and files are preserved between sessions, but will be removed after 30 days of inactivity. While you are connected to your session, you can access your files using sftp. Online should be good for experimenting and introducing yourself to the environment.

Pros: Sandbox environment – it’s all done with Docker and VMs so just modify anything you want. Cons: Requires a good Internet connection to run. No access to files in your file system (also a pro). Anything you create in the online environment should be treated as transient.

See Running Online for more.

  1. Running with Docker Desktop

This is a little like running online except you’re connecting to your own Medley service. If you are familiar with running Docker Desktop, this option may appeal. In addition to a running Docker Desktop, you will need either a VNC viewer (or a windows X server). The VNC Viewer allows you to interact with the Medley instance running in Docker (Interlisp Online uses a browser-based VNC viewer.)

Medley in Docker has a copy of the Medley system within the Docker container. Whenever you install a new version of the Medley Docker container you get a fresh system.

Pro: You can mount parts or all of your local file system, for easy file sharing, but at the same time you can restrict system access. Your files are on your own system, no live Internet capability needed. Con: We’re only building X86_64 docker containers regularly.

The instructions for this configuration are located at Running with Docker.

Running Installed

For users of Linux, BSD, MacOS and Windows (with WSL2), installing and running a local copy is a little more complicated but has the most flexibility. You need to know a bit more about how Medley Interlisp works. The system comes in two parts: a C program (code name maiko, binaries lde, ldex) that emulates the virtual Lisp machine, and the rest of the system written in Lisp.

Maiko currently requires having an X-server installed; which one to use depends on your platform.

We use GitHub Actions workflow automation to build Maiko for different platforms; if your platform isn’t in the mix you may need to download maiko sources and make and install those binaries.

Developing Medley Interlisp itself

The scripts “scripts/loadup*” in the github/interlisp/medley/ repository are used. See README.md files in the GitHub repo.

1 - Interlisp Online

Interlisp Online provides access to a version of Medley running in the cloud. You can login as a guest, but if you want to save state from one session to the next, you should create an acccount. All that is needed is an email address and password. Once an account has been created you can log in and start a Medley Interlisp session.

Sessions are preserved (we hope) but may be deleted after 30 days of inactivity. Running online should be good for experimenting and introducing yourself to the environment. Anything you create in the online environment should be treated as transient. If you’re interested in developing and experimenting with Lisp programs then you will want to investigate other options. But, for a first foray, this is a good starting place. The Interlisp/online repository may have more details.

Things to note when running online

  • Browser compatibility
  • Watch out for control-character conflicts (control-W always gets me)
  • Security not guaranteed
  • Need a solid net connection to our AWS server (currently in Ohio)
  • Back to time-sharing
  • Maximum load 256/16 24 simultaneous sessions

1.1 - Using Interlisp Online

A Brief Introduction

Running Interlisp Online

  • Go to Interlisp Online

    Interlisp Online Login

    You may either login as a Guest or create an account. If you plan to save and later retrieve files, register and create an account. Guest logins are not guaranteed to perserve sessions and stored files.

However, if you just want to get a taste of Interlisp without the extra effort of creating an account, the guest login will suit your needs.

  • 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 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

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).

Save your program as a file

Opening a saved program

What next?

2 - Running on Linux (incl. WSL)

Medley can run on any Linux system that includes X Windows, including Windows System For Linux (WSL2 only) on Windows 11 and Windows 10 Build 19044+.

It is also recommended that 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.

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) and 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.

To install a standard package and run Medley:

  1. Download

    Using a browser download from the Medley downloads site the .deb package for your platform (i.e., “standard” Linux or WSL) and your machine architecture (X86_64, ARM64, or ARMv7) to <deb_filepath>.

  2. Install

    In a terminal:

    ubuntu@oio:~$ sudo apt update
    ubuntu@oio:~$ sudo apt install -y <deb_filepath>
    
  3. Run

    In a terminal:

    ubuntu@oio:~$ medley
    

    There are many options to the medley command. For a brief overview, run medley --help. For a more complete description, run man medley or medley --man or click here.

    For first-time users: medley --apps or for WSL 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.

    Note: 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 to medley.

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 installing 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:

  1. 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 and tigervnc-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.

  2. 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>.

  3. Install Medley

    In a terminal:

    ubuntu@oio:~$ mkdir <interlisp_directory>
    ubuntu@oio:~$ tar -C <interlisp_directory> -xzf <tar_filepath>
    
  4. 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.

    Note: 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 to medley. In particular, if you have multiple installations of Medley that you would like to keep completely seperate, then you can use the --logindir - option, which will set LOGINDIR to <medley_directory>/logindir.

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

4 - Running on Windows

Running on Windows

  • Interlisp Online seems to works fine with recent Edge and Chrome; we’ve tested others but don’t regularly use them. WARNING: Window/Chrome and Edge use keystrokes (control-W for example) that conflict with Medley use.

  • Docker Desktop is a great possibility, too, if your system can run it.

  • Otherwise, to run installed, you either need

    • WSLg (available with Windows 11) OR
    • WsL2 A running X-server installed on your machine

WsL stands for “Windows Subsystem for Linux”. It’s like docker but a little more integrated (You can get at your linux files from windows and your windows files from linux).

Running on Windows with WSL2

For users of Windows 10 or 11 (pro), running in WSL2 is a good choice. This requires installing both Maiko, the underlying engine, and Medley. This option requires at least a little familiarity with Linux and running Linux within Microsoft’s WSL environment.

X Server selection

The X11 protocol was invented quite a while ago (inspired by Warren Teitelman and Bob Sproull’s Alto Display protocol as part of early Interlisp window system work.)

With X11, the notion of “client” and “server” are reversed. The software you run to manage the display and windows is the “server”, and the thing far away which is running with access to files and doing the work is the “client”.

When you run WSL it’s like you have two (or more) computers in one box, where one is running windows and the other(s) are running Linux. The linux side(s) have their own Internet Protocol address.

The thing that hooks them together is the “DISPLAY” variable in the linux side has the address of the “client”.

There have apparently been some (mainly unsuccessful) attempts to simplify this for windows 11 users.

If you’re running Windows 10, you will also need to install an X11 server within your Windows environment. There are different servers with varying capabilities and problems.

X Server and Windows and Monitor sleep

If your windows system or monitor don’t sleep by the schedule, there is a WSLg problem that they didn’t want your Windows machine to fall asleep when watching a Linux-side video. If this turns out to be a problem, set your IDLE.PROFILE to TIMEOUT (to run a “screen saver”) and then LOGOUT later.

Requirements

Installing Medley via an Install script

tbd

Manual Installation of Medley

The medley repo README has a guide for downloading or building your own maiko (for your OS / architecture) and for obtaining Medley

5 - Running with Docker

As an experiment, we’ve set up a way to use Medley Interlisp via a pre-built Docker configuration. As part of the experiment, we’ve set up a docker container that contains Xvnc (a kind of protocol gateway) so you would just need a VNC client.

If this is your first time working with Docker, you’ll want to install it before continuing.

You’ll also need a modern VNC client; TightVNC works well. Rumor has it that Macs and Linux use VNC normally for screen sharing.

docker run -p 5900:5900 -e DISPLAY=$DISPLAY --rm --name interlisp interlisp/medley

6 - 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.

6.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.

6.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.