iSTDLISP = Portable Standard Lisp + iPhone

This is an iPhone port of our implentation of "Portable Utah Standard Lisp". Your iPhone needs to be jailbroken. It will run on a terminal on the iPhone. You can do this by a ssh connection to your iPhone or a terminal program on it.



The UTAH STANDARD LISP dialect is defined in Standard Lisp Report, SIGPLAN Notices , ACM, New York, 14 , No 10 (1979) pp48-68. (This is a ynamically bound Lisp dialect)

, ACM, New York, , No 10 (1979) pp48-68. (This is a ynamically bound Lisp dialect) Our implementation of the interpreter is purely coded in C (no single line of assembly) and is not stack but 'register based'.

Our implementation implements also a LISP->C compiler where the Lisp->LAP phase is based on the work of "A Portable LISP Compiler", Software - Practice and Experience , 11 , (1981), pp541-605 by Griss & Hearn. The LAP->C Phase is written by us.

(The compiler is not ported to iPhone, yet. But it is quite possible to compile a lisp code on any other platform, then move the C code to a jailbroken iPhone which is equipped with gcc compiler and compile it there. The "Portable Utah Standard Lisp" site of us is in hold of the documentation required for a compilation.

You can get the iPhone executable from here with GPL restrictions. It is a single stand alone executable. Put it anywhere you like on your iPhone by a sftp and run it from there. There is no push-the-icon activation of it. If you have confidence problems in navigating in the Unix environment of the iPhone probably it is better for you to call it off.



Below is a sequence of benchmarks which you can try to make shure your lisp is functioning error free.



TEST 1

Transfer the files factorial.lsp , t.lsp, rprint.lsp to the same directory where you put istdlisp . Run istdlisp in your terminal ( $ is the OS prompt)

(You can do this directly with the terminal utility on the iPhone, but it is certainly not so pleasent to type in through the virtual keyboard. As an alternative you may prefer to login to your iPhone with ssh (anyway, it's up to you :)) : $ ./istdlisp You shall get a startup header which looks the same as the first two lines of the picture on the left.

Then the interpreter will greet you with its evaluation prompt: eval: Now type in: (load "factorial.lsp") The interpreter will respond with a value that is the name of the function it just learned: factorial .

When it is your turn (you got the eval: prompt), enter something like

(factorial 33)



You shall get the value that you see in the screen on your left. Namely:

8683317618811886495518194401280000000 You can enjoy the division of two big numbers 100!/99! and obtain the 100 by:

(quotient (factorial 100) (factorial 99))

TEST 2

Now type in: (load "t.lsp") When the file is loaded, now type in:

(tak 18 12 6) this will make about 63609 recursive calls to the function tak . Considering also the other function calls the total number of function calls sums up to 111315. Enjoy the speed of this process !

TEST 3

Now type in: (load "rprint.lsp") When the file is loaded, now type in:

(show "factorial.lsp") rprint.lsp contains a lisp->alisp (algol-like syntax lisp) converter. The function call show reads a lisp code that is in the file given to it as argument, and translates it to alisp (yes, it is much more readable :) ). You shall get a print out of:

symbolic procedure factorial n; if n=0 then 1 else n*factorial sub1 n; !$eof!$;