Electron User


Lisp

Author: Roland Waddilove
Publisher: Acornsoft
Machine: Acorn Electron

 
Published in Electron User 2.05

The Language That Strikes Like Lightning

Lisp

Lisp, developed around 1960 by John McCarthy and others at the Massachusetts Institute of Technology in America, is one of the oldest computer languages still in use.

His main objective was to produce a powerful language for defining and transforming functions. Lisp was designed to manipulate abstract symbols called atoms and combinations of symbols called lists. It is a LISt Processing language.

Perhaps the most publicised used of Lisp has been in the field of artificial intelligence research. The expressive power of the language was recognised by workers who were wrestling with the difficult symbolic manipulation problems involved.

Lisp

Programs have been written that hold conversations, write stories for children and summarise text.

Most mainframe computers support Lisp and now a few micros as well. There is no generally accepted standard, so as a result there are many dialects around. However, adapting Lisp to run on another machine is usually straightforward, making the language fairly portable.

Acornsoft's variant is available on cassette or ROM cartridge. The cassette version is the one considered here. The ROM cartridge will have all the facilities offered by the cassette version, plus a few extra, and a lot more memory.

Lisp

The cassette and manual are sold separately, which seems a little strange. Unless you are already an expert Lisp programmer - and not many people are! - then neither is much use without the other. Price of the package is about 23.

Large scale implementations may contain hundreds or even thousands of built-in functions. Consequently a small micro such as the Electron cannot hope to provide all of them, so only the bare essentials are built into Acornsoft's Lisp.

However this should be sufficient. Fortunately, many of the standard utilities can be written in Lisp itself and appendix B in the manual lists a few of these.

Lisp

Since many of the functions not provided would only be used occasionally and may have specialised uses, these can be typed in as and when needed for each application.

Acornsoft Lisp has a few extra functions not normally found in other systems. These are to allow the use of the Electron's excellent graphics and sound capabilities.

One of the most powerful is the VDU command which provides an easy interface with the Electron's machine operating system.

Lisp

Lisp takes about four minutes to load. It has 5.5K of machine code interpreter and 3K of initialised Lisp workspace containing utilities and constants. These can be deleted, if not required, to gain extra memory.

When loading is complete the user is asked to select a mode - either 3, 4, 5 or 6. Once one has been selected, it is not possible to change to another using MODE n, so if you want to use graphics or the 80 column mode 3 you must start up in the correct mode.

There are two main questions to be asked of Lisp:

  1. What can you do with it?
  2. How easy is it to use?
Lisp

Chapter 23 in the manual answers the first question - 11 applications are listed demonstrating its use. The programs are not complete, but do provide the building blocks for constructing much larger Lisp applications, and the user is encouraged to develop them further.

The examples include: Sorting a list into alphabetical order, arbitrary precision arithmetic (how to cope with very large numbers), a Lisp pretty-printer (used to display large pieces of Lisp structure, spreading its output over many lines and using indentation to make it more legible), an animal guessing game (you think of an animal and the Electron has to try and guess it), a route-finding program (also on the cassette), graphic displays (how to create pictures), and mazes and dungeons (an adventure game).

The answer to the second question is entirely subjective and everyone will have their own opinion. I have to disagree with the manual which states: "It provides a complete introduction to Lisp and assumes no previous knowledge of the language", and that "Lisp is easy to learn..."

Lisp seems very strange and confusing at first, operating on lists and atoms, recursion being very common. Unlike Basic, you need to know and understand a large proportion of Lisp before you can even think of writing your first simple program, and this is the main stumbling block.

Lisp operates on the "lightning principle". The concepts strike you suddenly when you are almost ready to give up. Once you have been struck, everything falls into place. Strength, stamina and perseverance are required.

Acornsoft's Lisp is an excellent package for anyone interested in programming and computer languages. It will teach pattern-recognition, and recursion will become second nature.

A word of warning though, it is not for the absolute beginner. Be prepared for a struggle, and remember the "lightning principle".

One last note: If you are unsure whether to invest in Lisp, try to get hold of The Little LISPer by Daniel P. Friedman (I borrowed it from the local library).

This is not a manual on how to use Lisp on the BBC or Electron, but it explains the structure, principles and concepts involved in a very simple and amusing manner.

You do not need Lisp or even a computer to understand and appreciate it. Read it. I think you will find Lisp fascinating.

Roland Waddilove

Other Acorn Electron Game Reviews By Roland Waddilove


  • Robotron 2084 Front Cover
    Robotron 2084
  • Ricochet Front Cover
    Ricochet
  • Hopper Front Cover
    Hopper
  • One Last Game Front Cover
    One Last Game
  • Codename: Droid Front Cover
    Codename: Droid
  • Play It Again Sam 11 Front Cover
    Play It Again Sam 11
  • Electron ADFS E00 Front Cover
    Electron ADFS E00
  • Golf Front Cover
    Golf
  • Pinball Arcade Front Cover
    Pinball Arcade
  • The Hacker Front Cover
    The Hacker