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.
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.
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.
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.
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.
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)
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 ...
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.