4 ms·
Gaaah, knock off the CAPSLOCK and the machismo, please. Also, you don't need to invent backcronyms for CAR/CDR, they're now called first/rest. Having said tha
by mahmud 16y ago
Gaaah, knock off the CAPSLOCK and the machismo, please.
Also, you don't need to invent backcronyms for CAR/CDR, they're now called first/rest.
Having said that, I really like the presentation of your blog, nice typography. And after skimming your book[1] in progress, and noting your obvious theoretical bent and taste for rigor, I can only anticipate to read more of your future posts (latch on to something "obscure" like ACL2 and make something fun with it.)
[1] http://symbo1ics.com/blog/?page_id=77 http://symbo1ics.com/blog/?page_id=77
[Edit:
The book has code samples in 4 different languages; LISP (the ancient cap-cased "one"), ML, C, and what looks like Pascal. If you want to learn about the axiomatic specification of computer programs, specially for "structured" programming, then look into the works of Gries and others, specially in the silver "Texts and Monographs In Computer Science" books (the entire series is a feast of delight that should be devoured, and washed down with heirloom, stolen wine):
The Science of Programming, Gries.
The Design of Well-Structured and Correct Programs, Alagic and Arbib.
The selection Programming Methodology edited by Gries has various approaches to the structured method, with contributions from Dijkstra, Hoare, Wirth, Reynolds and other rock-stars of axiomatic semantics and verification.]
- ihodes 16y agoExactly what I was thinking, though I do still enjoy seeing CAR and CDR. But I'm the kind of guy who likes steampunk, and it's in the same vein. I, too, am looking forward to more posts; it's worth checking out the posts that are up already. Definitely my kind of thing (see my http://copperthoughts.com/p/set-theory-and-lisp/ http://copperthoughts.com/p/set-theory-and-lisp/). This is where I'll refer people who know nothing about Lisp when they complain about it; not too self-righteous, pleasantly informative, and theoretically interesting.
- angrycoder 16y agoThe bigger problem is that CAR and CDR actually mean something without the silly anatomy analogies.
- deleted 16y ago[deleted]
- djacobs 16y agoMy problem is that the CDR backronym came with an explanation, making it sound legitimate when in fact he could've just written the quick standard explanation. Other than that, excellent article.
- leppie 16y agoThe first thing I noticed too, then I stopped reading :(
- limmeau 16y agoActually, I like "anterior" and "dorsal" better than assembly instructions from the 1950s.
- jrockway 16y agoSo when you call them first and rest, how do you destructure lists of lists? Actually, now that I think about it, "fire" is much cooler sounding than "cadr". But not as cool sounding as cadadr.
- pavelludiq 16y agoMaybe im to inexperienced with classic lisps, or maybe im just spoiled by clojure, but i have no idea what cadadr means, is it the rest of the first, of the rest of the first, or the other way around?
- bitsai 16y agoFor things like cadadr, I just chop off the "c" and "r", and use the middle part to figure out the sequence of car and cdr calls. (cADADr x) = (cAr (cDr (cAr (cDr x)))), which would be (first (rest (first (rest x)))) in Clojure.
- chousuke 16y agoI suppose CL/Scheme programmers just learn by heart what those combinations do (ie. what kind of structure they work with), because to me both cadadr and the (first (rest ...)) sequence are equally meaningless at first glance. It's not easy to see what the data structure looks like. In Clojure it's usually more idiomatic to use destructuring, which I think is much more understandable since the form follows the structure that is being accessed. Or you can use get-in, which takes a sequence of keys to dig into a deep associative data structure. It doesn't work with sequences, but building highly nested seqs is rather uncommon in Clojure.
- gtani 16y agoor the "->" ("threading") macro, a recursive solution, or a lib like http://groups.google.com/group/clojure/browse_frm/thread/11a7203021382ad8# http://groups.google.com/group/clojure/browse_frm/thread/11a...
- 16y ago