Author Topic: Lisp on the CPC  (Read 732 times)

0 Members and 1 Guest are viewing this topic.

Offline LambdaMikel

  • Supporter
  • 6128 Plus
  • *
  • Posts: 766
  • Country: us
    • Homepage
  • Liked: 357
Lisp on the CPC
« on: 17:14, 05 September 18 »
Is anybody using 

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!

Offline adolfo.pa

  • Supporter
  • CPC664
  • *
  • Posts: 68
  • Country: es
    • index.php?action=treasury
  • Liked: 44
Re: Lisp on the CPC
« Reply #1 on: 20: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

(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 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 ;-)
« Last Edit: 20:39, 05 September 18 by adolfo.pa »

Offline LambdaMikel

  • Supporter
  • 6128 Plus
  • *
  • Posts: 766
  • Country: us
    • Homepage
  • Liked: 357

Offline LambdaMikel

  • Supporter
  • 6128 Plus
  • *
  • Posts: 766
  • Country: us
    • Homepage
  • Liked: 357
Re: Lisp on the CPC
« Reply #3 on: 19: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.
« Last Edit: 19:25, 06 September 18 by LambdaMikel »

Offline LambdaMikel

  • Supporter
  • 6128 Plus
  • *
  • Posts: 766
  • Country: us
    • Homepage
  • Liked: 357
Re: Lisp on the CPC
« Reply #4 on: 19:26, 06 September 18 »
... and, btw, the SQUEEZE.DQC is not the Lisp doc, but the SQUEEZE documentation... how useful  ;)

Offline adolfo.pa

  • Supporter
  • CPC664
  • *
  • Posts: 68
  • Country: es
    • index.php?action=treasury
  • Liked: 44
Re: Lisp on the CPC
« Reply #5 on: 19:46, 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

Offline LambdaMikel

  • Supporter
  • 6128 Plus
  • *
  • Posts: 766
  • Country: us
    • Homepage
  • Liked: 357
Re: Lisp on the CPC
« Reply #6 on: 20:08, 06 September 18 »
Right, and it is probably not even HiSoft Lisp, but a crippled older version of MuLisp.

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.454
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 711
Re: Lisp on the CPC
« Reply #7 on: 01:11, 07 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 though, LBR files work like ZIP files and Compress files in that format.
* Using some of the hardly used Amstrad compilers :D
* I use Firmware in my Assembly code :P
* Have interpreted some BASIC 1.1 programs for BASIC 1.0. :)

Offline LambdaMikel

  • Supporter
  • 6128 Plus
  • *
  • Posts: 766
  • Country: us
    • Homepage
  • Liked: 357
Re: Lisp on the CPC
« Reply #8 on: 01:17, 07 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.
« Last Edit: 01:21, 07 September 18 by LambdaMikel »

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.454
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 711
Re: Lisp on the CPC
« Reply #9 on: 01:58, 07 September 18 »
To my knowledge, CP/M needs to use a dedicated program when handling Archived files or Compressed Files.
* Using some of the hardly used Amstrad compilers :D
* I use Firmware in my Assembly code :P
* Have interpreted some BASIC 1.1 programs for BASIC 1.0. :)

Offline LambdaMikel

  • Supporter
  • 6128 Plus
  • *
  • Posts: 766
  • Country: us
    • Homepage
  • Liked: 357
Re: Lisp on the CPC
« Reply #10 on: 02:03, 07 September 18 »
Exactly, I uncompressed them.

Offline LambdaMikel

  • Supporter
  • 6128 Plus
  • *
  • Posts: 766
  • Country: us
    • Homepage
  • Liked: 357
Re: Lisp on the CPC
« Reply #11 on: 09: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:
  • LinguaSoft / HiSoft Lisp
  • muLisp-80
  • Lisp-80
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.

Offline SyX

  • 6128 Plus
  • ******
  • Posts: 1.086
  • Country: br
  • Liked: 1008
Re: Lisp on the CPC
« Reply #12 on: 15:45, 20 September 18 »
If somebody is interested, i think that it could be possible (with a little effort) to compile the "Campus Lisp" that comes with z88dk, for getting a fourth Lisp:

clisp.png




Offline LambdaMikel

  • Supporter
  • 6128 Plus
  • *
  • Posts: 766
  • Country: us
    • Homepage
  • Liked: 357
Re: Lisp on the CPC
« Reply #13 on: 04:59, 21 September 18 »
Sounds like a good project!

Offline LambdaMikel

  • Supporter
  • 6128 Plus
  • *
  • Posts: 766
  • Country: us
    • Homepage
  • Liked: 357
Re: Lisp on the CPC
« Reply #14 on: 05:04, 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

"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. 
« Last Edit: 06:50, 21 September 18 by LambdaMikel »

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.454
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 711
Re: Lisp on the CPC
« Reply #15 on: 12:53, 07 October 18 »
I found a LISP Interpreter along with Pascal/Z source and document from the Walnut Creek CDROM within SIMTEL archive, it maybe worth trying to compile with Hisoft Pascal 80 if the COM file isn't quite there for the CPC.
* Using some of the hardly used Amstrad compilers :D
* I use Firmware in my Assembly code :P
* Have interpreted some BASIC 1.1 programs for BASIC 1.0. :)

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 590
  • Country: de
  • Reincarnation of TFM
  • Liked: 269
http://futureos.de --> Get the revolutionary FutureOS (Recent update: 2018.08.23)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Ver.: 2018.08.15)

Offline LambdaMikel

  • Supporter
  • 6128 Plus
  • *
  • Posts: 766
  • Country: us
    • Homepage
  • Liked: 357
Re: Lisp on the CPC
« Reply #17 on: 07:02, 08 October 18 »
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
Gibt's auch online.

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

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


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
« Last Edit: 08:41, 08 October 18 by LambdaMikel »

Offline LambdaMikel

  • Supporter
  • 6128 Plus
  • *
  • Posts: 766
  • Country: us
    • Homepage
  • Liked: 357
Re: Lisp on the CPC
« Reply #18 on: 07:05, 08 October 18 »
I found a LISP Interpreter along with Pascal/Z source and document from the Walnut Creek CDROM within SIMTEL archive, 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

Offline LambdaMikel

  • Supporter
  • 6128 Plus
  • *
  • Posts: 766
  • Country: us
    • Homepage
  • Liked: 357
Re: Lisp on the CPC
« Reply #19 on: 08: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
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
 
« Last Edit: 08:21, 08 October 18 by LambdaMikel »

Offline LambdaMikel

  • Supporter
  • 6128 Plus
  • *
  • Posts: 766
  • Country: us
    • Homepage
  • Liked: 357
Re: Lisp on the CPC
« Reply #20 on: 09:53, 09 October 18 »
I found a LISP Interpreter along with Pascal/Z source and document from the Walnut Creek CDROM within SIMTEL archive, 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".

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.454
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 711
Re: Lisp on the CPC
« Reply #21 on: 11: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.
* Using some of the hardly used Amstrad compilers :D
* I use Firmware in my Assembly code :P
* Have interpreted some BASIC 1.1 programs for BASIC 1.0. :)