Do I need to learn eMacs to get close to a “modern lisp” programming environment?
Do I need to learn eMacs to get close to a “modern lisp” programming environment?
The SBCL implementation is very good, consider getting a binary directly from their site if your distro's version is out of date http://www.sbcl.org/
I disagree with a sibling comment that this book expects you to be comfortable with Lisp; the first chapter is literally an introduction, and the next two chapters cover most of the basics a working programmer should expect to cover quickly with chapter 3 being a handy reference to look back on for a lot of things. If you're new to programming or find the intro too fast, sure, look at other resources, but it's not too bad to just dive in. The main supplement is to figure out, with your editor of choice, how to send blocks of Lisp code to the Lisp prompt so that you can type and edit with an editor and not have to do everything directly on the prompt line.
It's a distribution of emacs together with a Lisp compiler, emacs add-ons like SLIME, etc.
I started working through the book, but did not feel like using Common Lisp. Instead I used GNU Guile. I am not very far in the book yet, but so far I was able to translate between Common Lisp and Scheme easily.
So for me the way to set things up was to install GNU Guile. I did that via GNU Guix package manager. However, GNU Guix can also install SBCL, so that you could use Common Lisp as the book does. SBCL is also in many distros' repositories.
you might find some variances later on. also elisp doesn’t have as nice a debugging environment as SLIME so I’d honestly recommend just setting up common lisp
Are you referring to the IF expression or something different?
It's something like:
(defmacro elisp-if (expr then &rest elses)
`(cond (,expr ,then) (t ,@elses)))
Whereas the regular if is like: (defmacro cl-if (expr then &optional else)
`(cond (,expr ,then) (t ,else)))
In a book that uses Common Lisp, you shouldn't see an if-form that isn't Elisp-compatible.What I do not like about CL is probably one of the "wars" fought in computer programming: I do not like, that I have to use funcall, instead of simply wrapping with parens. I do not like, that variables and functions are in separate namespaces. However, if going through the book using Scheme gets too complicated, these are not things I cannot get over.
EDIT: I probably also do not like the less emphasis on pure functions in CL. I think while solving some exercises I already did some things, so that I could solve without mutating global state. But it's been a while since I last continued working through the book, so I am not so sure. I get that sometimes a simple side-effect can be practical, but this is my free time occupation and I get joy from doing things in clean ways. Nevertheless, Common Lisp is one of the languages, which I wish I could actually work in (like on the job, not in my free time), when I compare it to things like Python, JavaScript and so on. At least it is in the family of languages I enjoy using.
there’s portacle which combines emacs with a lisp environment
check out susam's guide
For Vim: https://susam.net/blog/lisp-in-vim.html
For Emacs: https://github.com/susam/emacs4cl