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

You can run Medley Interlisp on a wide variety of systems. This section lays out the basics to help you choose:

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

  1. Go to Interlisp Online

    Interlisp Online Login

  2. Login to Medley Interlisp Online:

    • You can login as a guest by clicking Guest Login button on the login screen. However, guest sessions are not saved. or
    • We suggest you create your own account by clicking New User Register here button 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.
  3. Select the Exec you want to run. For this exercise, select Interlisp

  4. Leave the Fill browser window option set.

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

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

  1. 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 site

    Note: 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.
  2. Enter the following in a terminal to install the download:

    ubuntu@oio:~$ sudo apt update
    ubuntu@oio:~$ sudo apt install -y <deb_filepath>
    
  3. Enter the following in a terminal to run 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 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.

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

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

    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.

  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.

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

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

  1. Install WSL: See here for instructions on installing WSL.

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

  3. 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 the medley command can be found here

    For 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 the wsl 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

  1. Install Docker Desktop: Install Docker Desktop for Windows as described here.

  2. 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, click More info followed by Run Anyway when the Windows Defender window pops up.

  3. 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 the medley command can be found here

    For 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 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 by medley 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 to medley.