CPCWiki forum

General Category => Programming => Topic started by: LambdaMikel on 15:14, 05 September 18

Title: Lisp on the CPC
Post by: LambdaMikel on 15:14, 05 September 18
Is anybody using 

https://cpcrulez.fr/applications_CPM-coding-hisoft-lisp.htm (https://cpcrulez.fr/applications_CPM-coding-hisoft-lisp.htm)

?

According to a MuLisp / Lisp-80 manual I found online, there is supposed to be "mustar" as an "IDE". But that's not on the disk. So far I had no success getting the IDE working with that DSK image above, only the basic REPL / listener.

I am wondering if this DSK is imcomplete, and if anybody has a more complete HiSoft Lisp, possible including the manual. Or, does anybody know how to bring up the MuStar equivalent for HiSoft Lisp? I tried things like "lisp a:baselisp.sys" etc, but it would have no effect. With only the REPL and no editor built-in, Lisp development is tedius, and even basic definitions ("DEFUN", ...) are not in place. And I didn't manage to load these things... it's strange, because "(load (quote baselisp) (quote a))" and similar works without any failure, but it does not provide any function definitions (i.e., "DEFUN" is still not known after that load). No success loading HANOI.LBQ or UTILITY.LQB either. Anybody know how to do that?

I managed though to merge that (incomplete dsk?) with a CP/M-based MuLisp though which includes a working MuStar.sys environment and which works fine on the CPC! This seems to be an older version of MuLisp 8080.

Maybe I'll do a couple of "Lisp on the CPC!" videos if there is any interest, but I would like to take a better / closer look at HiSoft MuLisp first also. Please let me know if you know how to get it working or have a more complete version (possibly including the manual).

Thanks!
Title: Re: Lisp on the CPC
Post by: adolfo.pa on 18:05, 05 September 18
There's a copy online of the LISP-80 manual which may be useful. It seems like muLISP-80 is some kind of derivative (maybe a dumbed down version so that it runs well on small CP/M machines):

https://heathkit.garlanger.com/software/library/TheSoftwareToolworks/software/manuals/209_Lisp-80.pdf (https://heathkit.garlanger.com/software/library/TheSoftwareToolworks/software/manuals/209_Lisp-80.pdf)

(edit: Sorry LM, I was wrong that has nothing to do with muLISP)

About the LQB and DQC files, they're probably "squeezed" files; it was customary for files compressed with SQ to have the 'q' letter embedded on the extension, so those are really LIB and DOC files. I haven't tried it, but http://www.svgalib.org/rus/lbrate.html (http://www.svgalib.org/rus/lbrate.html) looks like a good, modern impl of UQ; on the Walnut Creek CP/M collection (on archive.org), there's also source code for a very old C impl of unsqueeze.

Now, you have no excuse not to do those Lisp on CPC videos. I'll be waiting ;-)
Title: Re: Lisp on the CPC
Post by: LambdaMikel on 18:43, 05 September 18
https://web.archive.org/web/20140530042250/http://maben.homeip.net/static/s100/software/microsoft/LISP/MuLisp.pdf (https://web.archive.org/web/20140530042250/http://maben.homeip.net/static/s100/software/microsoft/LISP/MuLisp.pdf)

for the MuLisp manual.

Thanks Adolfo so far  :)
Title: Re: Lisp on the CPC
Post by: LambdaMikel on 17:08, 06 September 18

The tipp with squeeze was right. I managed to decompress the LQB files using some CP/M programm uqq120.com, and they turned into LIB files. Readable now. However, still no luck loading any of that stuff with that MuLisp. Something is wrong there. The other newer CP/M MuLisp DSK I created works fine though. So MuLisp and MuStar on the CPC are a feasible option. I will share the DSK that I made at some point.

I am also pretty confident by now that the above DSK from cpcrulez does *not* contain HiSoft Lisp, but a crippled older version of MuLisp.


HiSoft Lisp came with a development environment, HLE.COM. And it didn't identify as MuLisp. I managed to find the real HiSoft Lisp DSK, but HLE.COM does not react to my keys. I might have to fiddle with different CP/M versions to get it running. The DSK I found doesn't contain a bootable CP/M. That DSK contains a .com for the 6128 and PCW.


I also reached out to HiSoft whether they still have the documentation. The good thing is that the DSK I found seems to contain a .DOC file... stay tuned.
Title: Re: Lisp on the CPC
Post by: LambdaMikel on 17:26, 06 September 18
... and, btw, the SQUEEZE.DQC is not the Lisp doc, but the SQUEEZE documentation... how useful  ;)
Title: Re: Lisp on the CPC
Post by: adolfo.pa on 17:46, 06 September 18
Quote from: LambdaMikel on 17:26, 06 September 18
... and, btw, the SQUEEZE.DQC is not the Lisp doc, but the SQUEEZE documentation... how useful  ;)
To add to the infamy, the version I checked out included the squeeze documentation (properly squeezed, of course), but didn't include squeeze itself. Looks like some Hisoft guy didn't have enough coffee that morning :-D
Title: Re: Lisp on the CPC
Post by: LambdaMikel on 18:08, 06 September 18
Right, and it is probably not even HiSoft Lisp, but a crippled older version of MuLisp.
Title: Re: Lisp on the CPC
Post by: AMSDOS on 23:11, 06 September 18
Quote from: LambdaMikel on 17:08, 06 September 18
The tipp with squeeze was right. I managed to decompress the LQB files using some CP/M programm uqq120.com, and they turned into LIB files. Readable now. However, still no luck loading any of that stuff with that MuLisp. Something is wrong there. The other newer CP/M MuLisp DSK I created works fine though. So MuLisp and MuStar on the CPC are a feasible option. I will share the DSK that I made at some point.



I'm just wondering if that LIB file is meant to be a LBR file? According to the CP/M FAQ (http://www.gaby.de/faq.htm#21) though, LBR files work like ZIP files and Compress files in that format.
Title: Re: Lisp on the CPC
Post by: LambdaMikel on 23:17, 06 September 18
Unlikely. It is plain text ASCII Lisp source code (after uncompressing it into LIB)
And meant to be loaded into MuLisp. AFAIK MuLisp does not have support for reading compressed source files.


The person that created that DSK had no idea what he was doing and probably never used LISP.
Title: Re: Lisp on the CPC
Post by: AMSDOS on 23:58, 06 September 18
To my knowledge, CP/M needs to use a dedicated program when handling Archived files or Compressed Files.
Title: Re: Lisp on the CPC
Post by: LambdaMikel on 00:03, 07 September 18
Exactly, I uncompressed them.
Title: Re: Lisp on the CPC
Post by: LambdaMikel on 07:30, 07 September 18
I am attaching what the "Lisp for the CPC archaeology project" has dug up so far.

By now, we have three working Lisp versions:
I made 2 bootable CP/M plus based DKS's, attached.

HiSoft really needs a CPC 6128, the other Lisp's are fine with a 464 and DKtronics RAM expansion it seems.

Hopefully, the manual for HiSoft Lisp will also show up sooner or later.

I'd suggest to the CPC file hosting sites that have a "wrong" HiSoft Lisp DSK file to replace it with the one attached.
Title: Re: Lisp on the CPC
Post by: SyX on 13:45, 20 September 18
If somebody is interested, i think that it could be possible (with a little effort) to compile the "Campus Lisp (https://github.com/z88dk/z88dk/tree/master/examples/clisp)" that comes with z88dk, for getting a fourth Lisp:

(https://www.z88dk.org/wiki/lib/exe/fetch.php?cache=&w=624&h=476&media=libnew:examples:clisp.png)



Title: Re: Lisp on the CPC
Post by: LambdaMikel on 02:59, 21 September 18
Sounds like a good project!
Title: Re: Lisp on the CPC
Post by: LambdaMikel on 03:04, 21 September 18
Quote from: LambdaMikel on 02:59, 21 September 18
Sounds like a good project!
... the only thing though - this is not a Lisp.

See here:
https://github.com/z88dk/z88dk/blob/master/examples/clisp/clisp-spec.txt (https://github.com/z88dk/z88dk/blob/master/examples/clisp/clisp-spec.txt)

"Restriction: no lambda expression"  :picard: :picard2:    :doh:
What the heck? That's the soul of Lisp. No Lisp without Lambda!
That means that thing does not have functions / closures as first-order objects in the language.

That is not a Lisp, but a variant of BASIC with Lisp syntax  :laugh:

Well, I get that that lambda-less zombie has been written for the ZX81 which is mostly good as a door stopper. 
I don't think that that is worth the effort.

Even the name "clisp" is a bit missleading... clisp is a halway decent Common Lisp. 
Title: Re: Lisp on the CPC
Post by: AMSDOS on 10:53, 07 October 18
I found a LISP Interpreter along with Pascal/Z source and document from the Walnut Creek CDROM within SIMTEL archive (http://www.retroarchive.org/cpm/cdrom/SIMTEL/SIGM/VOLS200/VOL236/), it maybe worth trying to compile with Hisoft Pascal 80 if the COM file isn't quite there for the CPC.
Title: Re: Lisp on the CPC
Post by: GUNHED on 00:54, 08 October 18
http://www.informatik.uni-hamburg.de/TGI/lehre/vl/SS04/programmiersprachenkonzepte/Lisp.pdf
Title: Re: Lisp on the CPC
Post by: LambdaMikel on 05:02, 08 October 18
Quote from: GUNHED on 00:54, 08 October 18
http://www.informatik.uni-hamburg.de/TGI/lehre/vl/SS04/programmiersprachenkonzepte/Lisp.pdf (http://www.informatik.uni-hamburg.de/TGI/lehre/vl/SS04/programmiersprachenkonzepte/Lisp.pdf)
... na da hast Du ja was ausgegraben, Stefan  8) Da hab' ich ja damals studiert (Uni Hamburg).
Das gefällt Dir wohl, weil QLisp so viele FUTUREs hat?  :D


Wer's richtig klassisch mag, liest direkt bei McCarthy:

https://mitpress.mit.edu/books/lisp-15-programmers-manual (https://mitpress.mit.edu/books/lisp-15-programmers-manual)
Gibt's auch online.

Und etwas moderner - das war damals ein Eye Opener für mich: 

http://www.paulgraham.com/onlisp.html (http://www.paulgraham.com/onlisp.html)
Andere Lisp-Klassiker:

https://www.amazon.com/Paradigms-Artificial-Intelligence-Programming-Studies/dp/1558601910 (https://www.amazon.com/Paradigms-Artificial-Intelligence-Programming-Studies/dp/1558601910)

Das ist allerdings alles schon Common Lisp... viel zu mächtig für 8Bit Micros. 

Auch interessant:
https://openlibrary.org/books/OL17537488M/LISP_on_the_BBC_microcomputer (https://openlibrary.org/books/OL17537488M/LISP_on_the_BBC_microcomputer)
Title: Re: Lisp on the CPC
Post by: LambdaMikel on 05:05, 08 October 18
Quote from: AMSDOS on 10:53, 07 October 18
I found a LISP Interpreter along with Pascal/Z source and document from the Walnut Creek CDROM within SIMTEL archive (http://www.retroarchive.org/cpm/cdrom/SIMTEL/SIGM/VOLS200/VOL236/), it maybe worth trying to compile with Hisoft Pascal 80 if the COM file isn't quite there for the CPC.
Not bad! It has Lambdas, but no Macros.

http://www.retroarchive.org/cpm/cdrom/SIMTEL/SIGM/VOLS200/VOL236/LISP.DOC
Title: Re: Lisp on the CPC
Post by: LambdaMikel on 06:15, 08 October 18
... at the time the CPC was born, professional Lisp programming in (predecessors of) Common Lisp required special hardware - Lisp Machines.  Working with these machines looked like that:

https://www.youtube.com/watch?v=o4-YnLpLgtk (https://www.youtube.com/watch?v=o4-YnLpLgtk)
I consider Lisp Machines the most amazing special purpose computers ever built! Only a couple of years later, Lisp Machine were no longer required, as PCs got fast enough to do Lisp, and companies such as Symbolics went bancrupt in the "AI Winter" of mid 80s. 
Symbolics Lisp Machines: 

https://en.wikipedia.org/wiki/Symbolics
Title: Re: Lisp on the CPC
Post by: LambdaMikel on 07:53, 09 October 18
Quote from: AMSDOS on 10:53, 07 October 18
I found a LISP Interpreter along with Pascal/Z source and document from the Walnut Creek CDROM within SIMTEL archive (http://www.retroarchive.org/cpm/cdrom/SIMTEL/SIGM/VOLS200/VOL236/), it maybe worth trying to compile with Hisoft Pascal 80 if the COM file isn't quite there for the CPC.
Yes, the COM file doesn't seem to work... "read beyond EOF".
Title: Re: Lisp on the CPC
Post by: AMSDOS on 09:51, 11 October 18
It's probably not much point in trying to compile another when CP/M already has 3, thanks for trying anyway.
Powered by SMFPacks Menu Editor Mod