Hacker News new | past | comments | ask | show | jobs | submit login
Lisp 1.5 Primer (1967) [pdf] (softwarepreservation.org)
103 points by tjalfi on May 16, 2017 | hide | past | favorite | 27 comments



The language is very small, may be interesting to write an interpreter.


The LISP 1.5 manual would help in such a task: http://www.softwarepreservation.org/projects/LISP/book/LISP%...


It's fun to write an interpretor for a lisp in Common Lisp. The book Lisp in Small Pieces goes through this.


I actually thought about writing a tutorial on how to write a complete "classic" LISP implementation. I know there are already hundreds of toy LISP tutorials but having LISP 1.5 as a goal and implementing it in much the same way it was implemented originally isn't something I've seen yet.


Magnus Myreen leveraged that property when mathematically verifying one down to machine code. Used LISP 1.5. Built a bigger language (CakeML) on that.

http://www.cl.cam.ac.uk/~mom22/tphols09-lisp.pdf

Note: Even if not doing formal methods, one can benefit from such work by making their interpreter equivalent in features, running the same tests/apps through both, and checking for their equivalence.


Doing this (for Scheme, but same concept) was the start of my programming languages class.


Or even a very dumb compiler.


Smart thinking. See my other comment. ;)


Thanks, already printed it out.


Oh nice move. I'd do that but Id take out a rainforest with my collection. ;)


I love this, but at the risk of farting in church, when I see car and cdr (instead of the more sane first and rest), I feel as if millions of man hours suddenly cried out in terror, and were suddenly silenced.


The main alternatives, first and rest, don't work as well in my head.

I mean, car and cdr give you the structure:

    struct List {
        Atom car,
        struct List* cdr
    }
Which also explains why an empty list, '(), is nil.

rest sort of implies the next memory section of the list will always be a list. But that's just not the case with a cons cell.

It is a little odd compared to many modern languages, that a data structure is so exposed to the programmer - but it needs to be. Almost everything you do is impacted by that structure, (well, compiler optimisations aside).

It did catch me by surprise when I first came to the LISPy side of things, but once I understood the basic idea of the structure... There wasn't anything left to understand. It explains half the syntax by itself. Why functions are always the first item in a list, for example. car is a cheaper lookup than cdr.

If instead, we weren't dealing with linked lists, but everything was a vector, with a known size, I could see first and rest as making more sense.


Meh. The first time I ever see fiiirst or rfst or some nonsense, I'll cry out in terror.

Till then, I can live with car/cdr/cadr/cadar/etc. Somewhat opaque, but not nearly as bad as the folks complaining about it.


Never a noob, were you? Never considered that the source code primacy to convey the programmer's intent and that a modified lump of sand can do something with it is a nice side effect?


I was certainly a new programmer once. I don't remember this one catching me offguard anymore than most other things. Lambda, in particular, was much more to wrap my head around. Or defun. Even define is somewhat awkward.

So, sure, first is more descriptive than car. However, first also should have applied to an array. And it does, just not in the same way. Which is itself confusing.


More interesting what the implementation looked alike.



Impossible, this is theoretical at best.


We detached this subthread from https://news.ycombinator.com/item?id=14348231 and marked it off-topic. I assume it's in reference to McCarthy being surprised at Steve Russell's implementation of eval, but I'd be shocked if he actually said it was impossible.


He did not say these words, that was indeed what I was referring to.


This has to be the most possible thing I've ever seen labeled impossible. Lisp 1.5 has extensive documentation and we have program listings to test against. Nothing else is really needed.

Edit: This joke flew way over my head. [1]

[1] "Steve Russell said, look, why don't I program this eval..., and I said to him, ho, ho, you're confusing theory with practice, this eval is intended for reading, not for computing." -- McCarthy (http://www.paulgraham.com/icad.html)


My bad, and thanks


Rubbish.

Lisp 1.5 wasn't just a theory, and ran on the PDP-1, thanks to Peter Deutsch.

Here's a copy that can run on an IBM 7094 emulator. [0]

Several people have made interpreters over the years. [1][2][3]

[0] http://www.sonoma.edu/users/l/luvisi/

[1] http://mentallandscape.com/Lisp.htm

[2] https://www.oskarth.com/lisp-interpreter/

[3] https://www.cl.cam.ac.uk/~mom22/tphols09-lisp.pdf


Still not possible.


It isn't possible to write an interpreter for this language... When the canonical form was an interpreter written by a high school kid using the manual for the language ...

You're going to need to explain some more.


You are tense my dear. I know pretty well about this (as one can read on my profile).

ps: but I'm sorry it wasn't clear I was facetious in the first place.


I have written many a Lisp interpreter myself.

Lisp 1.5 uses F-EXPR, quoteval, and the basic forms from LISP. Nothing difficult there.

But again, something that has already been done cannot be labelled as impossible.

If you provide no further proof for your somewhat outrageous claim, then your statements are no more than a tale told by an idiot, full of sound and fury. Signifying nothing.

Edit: Sarcasm has problems translating across textual barriers. Try denoting future comments as such, or to avoid downvotes, avoid them altogether on HN.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: