Live data from Hacker News

Lisp from Nothing, Second Edition

t3x.org

71–80 of 109 posts

Re: Lisp from Nothing, Second Edition

#71

The entire website of the author is worth exploring: https://t3x.org/index.html I love it so much, and seeing your bibliography makes me feel like a kid in a candy store. The confluence of Asian philosophy and computing is delightful. To put you in the correct headspace this Saturday morning: https://t3x.org/whoami.html

"A kid in a candy store", I love it! :)

Enjoy your stay!

Re: Lisp from Nothing, Second Edition

#72

As somebody who read a couple of the author's books, and also somebody who spent almost a decade studying compilers, I am genuinely curious about the author himself. These works are something I both understand and would never achieve myself. These are cultural artifacts, like deeply personal poetry, made purely for the process of it. Not practically useful, not state of the art, not research level, but... a personal…

> These are cultural artifacts, like deeply personal poetry, made purely for the process of it. Not practically useful, not state of the art, not research level, but... a personal journey? I can't speak for the author but this is exactly how I look at the lisp I'm developing. It's a lifetime project. I had some kind of vision depicting how different things could be, and at some point I started trying to make it happe…

It's good to have a life-time project and watch it evolve over time. Nothing insane about that!

Re: Lisp from Nothing, Second Edition

#74
post #48

Under “The Intended Audience” (page 10 of the PDF sample on the site), it says that this is not an introduction to LISP and that it would be more enjoyable with some prerequisites. Where does one — who has no knowledge of these prerequisites or about LISP (except that the latter has been heard in programming circles as something esoteric, extremely powerful, etc.) — start, before reading this book?

One source of awe people have with the idea of Lisp is how much you can build off of so little. I like pg's Roots of Lisp paper on that https://justine.lol/sectorlisp/jmc.pdf The core thing was the meta-circular evaluator (eval) in the original Lisp paper. You can work through it or try re-implementing it in something else. I like this recent tiny version https://justine.lol/sectorlisp2/

Another source of awe is about Lisp being more of a programming system than a language, and Common Lisp was the standardization of a lot of efforts towards that by companies making large and industrial pieces of software like operating systems, word processors, and 3D graphics editors. At the language level, "compile", "compile-file", "disassemble", "trace", "break", "step" are all functions or macros available at runtime. When errors happen, if there's not an explicit handler for it (like an exception handler) then the default behavior isn't to crash but to trigger the built-in debugger. And the stack isn't unwound yet, you can inspect the local variables at every layer. (There's very good introspection in general for everything.) Various restarts will be offered at different parts of the stack -- for example, a value was unknown, so enter it now and continue. Or you can recompile your erroneous function and restart execution at one of the stack frames with the original arguments to try again. Or you can apt-get install some foreign dependency and try reloading it without having to redo any of the effort the program had already made along the way.

Again, all part of the language at runtime, not a suite of separate tools. Implementations may offer things beyond this too, like SBCL's code coverage or profiling features. All the features of the language are designed with this interactivity and redefinability in mind though -- if you redefine a class definition, existing objects will be updated, but you can control that more finely if you need to by first making a new update-instance-for-redefined-class method. (Methods aren't owned by classes, unlike other OOP languages, which I think eliminates a lot of the OOP design problems associated with those other languages.)

I like the book Successful Lisp as a tour of Common Lisp, it's got a suggested reading order in ch 2 for different skill levels: https://dept-info.labri.fr/~strandh/Teaching/MTP/Common/Davi... It's dated in parts as far as tooling goes but if you're mostly interested in reading about some bits rather than actively getting into programming with Lisp that's not so bad. If you do want to get into it, https://lispcookbook.github.io/cl-cookbook/ has some resources on getting started with a Lisp implementation and text editor (doesn't have to be emacs).

Re: Lisp from Nothing, Second Edition

#75

Earlier quoted context omitted.

I love that your lisp implementations are so portable. I believe one is available for Plan 9.

Thanks! And yes, Scheme 9 from Empty Space should compile on Plan 9! http://t3x.org/s9fes/

> Scheme 9 from Empty Space

As a fan of word plays, that got a genuine chortle out of me. Thank you.

Re: Lisp from Nothing, Second Edition

#76
post #48

Under “The Intended Audience” (page 10 of the PDF sample on the site), it says that this is not an introduction to LISP and that it would be more enjoyable with some prerequisites. Where does one — who has no knowledge of these prerequisites or about LISP (except that the latter has been heard in programming circles as something esoteric, extremely powerful, etc.) — start, before reading this book?

When I was a beginner, A Gentle Introduction to Symbolic Computation worked for me. As the title suggests, it gently introduces concepts in a very beginner friendly manner, so even macros are easy enough to grasp by the time you get there. The diagrams and examples are great.

https://www.cs.cmu.edu/~dst/LispBook/book.pdf

Re: Lisp from Nothing, Second Edition

#77
post #47
post #35

Earlier quoted context omitted.

Exactly. I also like Clojure’s use of square brackets for vectors and curly braces for maps. It eliminates all the “vector- ” and “map- ” function calls.

Those are big quality of life improvements. I wish the other lisps would follow suit. I suppose I could just implement them myself with some macros, but having it standard would be sweet.

The Revised Revised Revised Revised Revised Revised Report on the Algorithmic Programming Language Scheme (R6RS) specified that square brackets should be completely interchangeable with round brackets, which allows you to write let bindings or cond clauses like so:

  (let ([a (get-some-foo 1)]
        [b (get-some-foo 2)])
    (cond [(> a b) -1]
          [(
...but I hate that, I'd much prefer if square brackets were only used for vectors, which is why I have reader macros for square brackets -> vectors and curly brackets -> hash tables in my SBCL run commands.

Re: Lisp from Nothing, Second Edition

#78

Earlier quoted context omitted.

Long time lisper. It just doesn’t feel right unless your language can compile your language. It’s like wearing someone else’s underwear.

or interpret

Agreed, I hate interpreting other people's underwear.

Re: Lisp from Nothing, Second Edition

#79
post #37

I love Lisp (I'm an Emacs user and often write in Racket for personal projects) but the one thing I never understood about the Lisp community is the emphasis placed on metacircular evaluators. I sure find them beautiful and all, but why do they take center stage so often? Beside the aesthetics and instructional value, I don't get the appeal. Also I feel that a bunch of the heavy lifting behind metacircular evaluators…

The metacircular evaluator shows how code is data and data is code. And in a way it’s like Maxwell’s equations. A simple proof of computation that also somehow implements a very neat language.

But of course you must close the loop by representing Maxwell's equations electromagnetically.

I know this is a classic analogy, but now you've got me wondering, originally Maxwell wrote a messy pile of equations of scalrs, later someone (Gibbs?) gave them the familiar vector calculus form. Nowadays we have marvellously general and terse form, like (using the differential of the Hodge dual in naturalised units),

  d star(F) = J
My question is, when are we going to get some super-compact unified representation of `eval`?

Re: Lisp from Nothing, Second Edition

#80

Looks awesome. Just ordered a copy. I'm just now picking up Peter Seibel's Practical Common Lisp again and taking another stab at immersing myself in the world of Lisp. So this is perhaps fortuitous timing.

Often recommended is Paul Graham's "On Lisp", available for free on his website: https://www.paulgraham.com/onlisp.html
Post reply on HN