3 ms·
No, it's not lambdas all the way down. Lisp machines are long gone. I really wish people would stop teaching the "metacircular" stuff so early. McCarthy even
by bsder 3y ago
No, it's not lambdas all the way down. Lisp machines are long gone.
I really wish people would stop teaching the "metacircular" stuff so early. McCarthy even missed metacircularity. It took a genuine genius on the level of Stephen Russell to "get it" and convert everything to a functional programming language.
Tell people to implement a Lisp down on the imperative language of the machine. Suddenly, you will get it. Mutability is a pain in the ass. Recursion has issues. Garbage collection isn't optional--it's required because all of your "lambda" shenanigans are beating the hell out of the allocator and cons-ing up trash like a victim of "Hoarders".
Once you see the guts, suddenly metacircularity makes sense. It also isn't particularly interesting anymore.
- hayley-patton 3y ago> Lisp machines are long gone. They also had assembly and microcode (and Maclisp got scoping wrong until CL, anyway). So those weren't much better if you want to measure "purity". > Tell people to implement a Lisp down on the imperative language of the machine. ... Somehow there is no end to the difficulty of mapping an imperative language to another, as evidenced by the size of LLVM. One picks one's poison, I guess.
- jfoutz 3y agoyou can hack up eval, map, and apply in c without too much headache. I'd recommend int char and some sort of string representation as primitive. I'd also recommend not garbage collecting, and just malloc everything. Like, a weekend of effort for a really really bad implementation. So much magic disappears. Well, I guess this sort of assumes you know what a pointer is. If not, it's going to be a tough slog regardless. as a second pass, check out the later parts of sicp and expose some array type, and implement the gc in scheme. also I'll never pass up an opportunity to reference 3imp. http://agl.cs.unm.edu/~williams/cs491/three-imp.pdf http://agl.cs.unm.edu/~williams/cs491/three-imp.pdf I know, I know, scheme is a vespa and CL is a Ferrari. For someone who learns more bottom up, the bare minimum of scheme, but all the way is amazing.
- deleted 3y ago[deleted]
- pro-kythera 3y ago> Tell people to implement a Lisp down on the imperative language of the machine. FWIW, my understanding is that the statement "God exists" in Aristotle is equivalent to the statement: "You cannot say it is Xs all the way down; there must be a base layer which is unchangeable (which we call God)." Could there be a hint here that programming-deity is either: a) imperitive at heart; or b) inordinately fond of garbage collection?
- seabass-labrax 3y agoDefinitely A: imperative at heart. Ultimately, the modern electronic digital computer executes instructions in sequence. Whilst there are other kinds of computers that can be inherently functional (like analogue or quantum computers), a conventional CPU is not.
- bsder 3y ago> Could there be a hint here that programming-deity is either: a) imperitive at heart; or b) inordinately fond of garbage collection? Or, perhaps, programming-devil is and we've all been tempted wrongly? :) One problem with programming history is that it is all about compiling. And that is definitely the work of programming-devil. People are trying to shake that off, but it's difficult. Programming languages advance one popular programming language at a time--and that progress is slow.