Live data from Hacker News

Emacs Lisp book revived: Marcin Borkowski

mbork.pl

21–28 of 28 posts

Re: Emacs Lisp book revived: Marcin Borkowski

#21
post #8

Earlier quoted context omitted.

Do you know any other lisps? I got by with the Elisp manual, but I already knew Common Lisp. Maybe a strategy is to find a great book teaching, say, scheme, and learn elisp after?

I'm pretty excited by Clojure so thinking of delving more into that, and then hoping it maps back onto Elisp, despite it lacking stuff like tail recursion. Would that make sense, or should I stick closer to the tree? Maybe CL is the best route to Elisp... If so, any recommendations on how one might learn CL in 2021?

The best way to learn CL, IMO, is installing Portacle[1] and working through either Practical Common Lisp[2] or Common Lisp: a Gentle Introduction[3]. (I personally prefer PCL, but a lot of people like Gentle)

[1]: https://portacle.github.io/

[2]: http://www.gigamonkeys.com/book/

[3]: https://www.cs.cmu.edu/~dst/LispBook/index.html

Re: Emacs Lisp book revived: Marcin Borkowski

#22
post #18

Earlier quoted context omitted.

Have you tried a combination of the Emacs Lisp Reference and looking through code? There's one subtle but huge barrier to learning now: it used to be, you'd see Emacs add-ons posted as single text files, and it was all very accessible. And you'd copy that file into your home directory, and edit the Emacs Lisp of your `.emacs` file to connect it. You were already writing Emacs Lisp, and the files with more Emacs Lisp…

> take away this introduction of toes-dipped-in-the-water with quick transition to jumping in altogether, and then further hide the code from you. And if you ever do find the code, it's often directory trees with a dozen different "professional-looking" bureaucracy files in the top, and the source code buried somewhere else. Here's a bunch of tricks one should know if one wants to learn Elisp: 1. You can use describe…

This is good advice. I'm an elisp novice but I've found setting breakpoints using edebug (edebug-set-breakpoint) and then evaluating and traversing the code (edebug-eval-expression) to be very helpful in making the code more tangible (and obviously in debugging :)).

Re: Emacs Lisp book revived: Marcin Borkowski

#23
I found the best way to understand Emacs Lisp (and Lisp in general) was to read the source code. The core Lisp interpreter is in 4 or 5 files that aren't huge. That was some years back so there might be more code now, of course. With that in hand, the actual Lisp code and built-in docs are good too.

Re: Emacs Lisp book revived: Marcin Borkowski

#24
post #18
post #2

I've found the lack of resources to learning Elisp a challenge. I haven't finished it, but Robert J. Chassell's 'An introduction to programming in Emacs Lisp' seems to run through basic concepts but doesn't really get to the meat of actually putting everything together. (Could be wrong) And the Elisp manual reads like the output of an Elsip macro - so terse, so few examples, so much over my head. I've found Xah Lee's…

Have you tried a combination of the Emacs Lisp Reference and looking through code? There's one subtle but huge barrier to learning now: it used to be, you'd see Emacs add-ons posted as single text files, and it was all very accessible. And you'd copy that file into your home directory, and edit the Emacs Lisp of your `.emacs` file to connect it. You were already writing Emacs Lisp, and the files with more Emacs Lisp…

Sorry but emacs package managers don't get in your way anymore than the bundled libraries that come with emacs. They often have bugs/limitations you may have to hack around. But you can't modify them if they are globally installed with different permissions/read-only fs. In past i had to work around the tls client not having parameters for client certs by using advice hooks.

But you can easily jump around very deep into packages and compile them with few changes to suit your need. Your last resort is advice(https://www.gnu.org/software/emacs/manual/html_node/elisp/Ad...). Most of the time you don't need to and they have roughly the same benefits of your distro maintained packages vs you vendoring and compiling your own little world.

Re: Emacs Lisp book revived: Marcin Borkowski

#25
post #8

Earlier quoted context omitted.

Do you know any other lisps? I got by with the Elisp manual, but I already knew Common Lisp. Maybe a strategy is to find a great book teaching, say, scheme, and learn elisp after?

I'm pretty excited by Clojure so thinking of delving more into that, and then hoping it maps back onto Elisp, despite it lacking stuff like tail recursion. Would that make sense, or should I stick closer to the tree? Maybe CL is the best route to Elisp... If so, any recommendations on how one might learn CL in 2021?

clojure uses immutabilty heavily. It doesn't really match 1-to-1 CL/elisp code. I think PCL(http://gigamonkeys.com/book/) is still a great introduction to CL. The author is planning a 2nd edition last i heard.

Re: Emacs Lisp book revived: Marcin Borkowski

#26
post #8

Earlier quoted context omitted.

I'm pretty excited by Clojure so thinking of delving more into that, and then hoping it maps back onto Elisp, despite it lacking stuff like tail recursion. Would that make sense, or should I stick closer to the tree? Maybe CL is the best route to Elisp... If so, any recommendations on how one might learn CL in 2021?

The best way to learn CL, IMO, is installing Portacle[1] and working through either Practical Common Lisp[2] or Common Lisp: a Gentle Introduction[3]. (I personally prefer PCL, but a lot of people like Gentle) [1]: https://portacle.github.io/ [2]: http://www.gigamonkeys.com/book/ [3]: https://www.cs.cmu.edu/~dst/LispBook/index.html

Thanks, yes started reading through PCL last night, as it's online, and it's already cleared so much up for me. I'd never really thought about learning CL first until this thread, but now it feels like I've found the missing piece. And PCL is pitched exactly right, for me.

Re: Emacs Lisp book revived: Marcin Borkowski

#27

Earlier quoted context omitted.

> take away this introduction of toes-dipped-in-the-water with quick transition to jumping in altogether, and then further hide the code from you. And if you ever do find the code, it's often directory trees with a dozen different "professional-looking" bureaucracy files in the top, and the source code buried somewhere else. Here's a bunch of tricks one should know if one wants to learn Elisp: 1. You can use describe…

This is good advice. I'm an elisp novice but I've found setting breakpoints using edebug (edebug-set-breakpoint) and then evaluating and traversing the code (edebug-eval-expression) to be very helpful in making the code more tangible (and obviously in debugging :)).

Good call! Will play around with this.

Re: Emacs Lisp book revived: Marcin Borkowski

#28
post #17
post #2

I've found the lack of resources to learning Elisp a challenge. I haven't finished it, but Robert J. Chassell's 'An introduction to programming in Emacs Lisp' seems to run through basic concepts but doesn't really get to the meat of actually putting everything together. (Could be wrong) And the Elisp manual reads like the output of an Elsip macro - so terse, so few examples, so much over my head. I've found Xah Lee's…

Not sure if this is quite what you are looking for, but I found reading through GNU Emacs: Creeping Featurism Is a Strength (chapter 11 of Beautiful Architecture) at the suggestion of Eli Zaretskii to be extremely useful at painting the picture of the environment in which elisp code runs and the assumptions that it makes.

This is a cool idea too - will check it out. Many thanks!
Post reply on HN