Only if you want to teach people to hate s-expressions and write stuff like:
)
)
)
Writing lisp code is different. Pick a good Common Lisp aware editor.IMHO: For pedagogical reasons Lisp editors should show parens with a color that makes them transparent and almost hides them into background. Parens are there for the editor to find patterns not people to see and match (except maybe one or two most inner levels). You use proper indentation to see the structure just like you do with Python.
This must be stressed. It is very important to use a lisp-aware editor. It doesn't have sense to do stuff that a lisp-editor can do automatically, such as auto-indent, and keeping parens balanced all the time.
Also, a good IDE (such as Portacle) gives very good on-the-fly documentation of function parameters/etc, which makes learning CL much faster.
- Quicklisp (lisp package manager)
- ASDF (builder)
They are very complicated to use and understand.
Then I abandoned Common Lisp...
Emacs isn't the only editor too: https://lispcookbook.github.io/cl-cookbook/editor-support.ht... Lem is also a ready-to-use editor (ncurses or Electron)(but Emacs+Slime is still the best experience (maybe vim?))
You can follow this guide to get started too: https://lispcookbook.github.io/cl-cookbook/getting-started.h...
And hopefully this Cookbook will help you along the way: https://lispcookbook.github.io/cl-cookbook/
Quicklisp takes a couple commands to install, then it's easy. To install a library: `(ql:quickload :my-lib)`. Thinks of it closer to apt than to pip/npm, so you don't upgrade one lib but a QL distribution.
You don't really have to deal with asdf. It is used to create a project declaration, which can be generated for you (see "getting started", cl-project). ASDF helps in creating executables, it's also explained in the cookbook.
(load "~/quicklisp/setup.lisp")
and then you'll have the quicklisp functions available. Running: (ql:add-to-init-file)
will add something like that to your REPL's init file, so you'll have quicklisp available from the get-go. After that, to load a package like "cl-opengl", whether it's installed or not, you just need to do: (ql:quickload "cl-opengl")
This is in the homepage, under a section titled "Loading After Installation"[1].Um... basically the only command you need to learn is ql:quickload followed by the name of the system you want to load.
Perhaps you had problems with the concepts of Lisp packages (namespaces)?
Rather unlikely. The namespaces are pretty easy to understand conceptually, and their interface is pretty minimal. Same goes for Quicklisp, very easy to start with, practically one function call needed in most cases.
Now there's ASDF. I know, it's a thing of beauty, but it's not simple to use or to understand.
Well, it's actually that way for good reasons: the problem it solves is complex and hard. The only comparable system I know of is Erlang releases mechanism, which is also a solid tool, but definitely not the simplest one in Erlang repertoire.
Anyway, if someone cites ASDF as a reason for struggling with Common Lisp, I find it very believable.
> Rather unlikely. The namespaces are pretty easy to understand conceptually, and their interface is pretty minimal.
Packages can definitely give beginners trouble. I don't think it's that uncommon for newcomers to Lisp to have REPL sessions like this:
CL-USER> (ql:quickload :iterate)
(:ITERATE)
CL-USER> (iter (for i below 10) (collect i))
;; Error: 3 undefined functions and two undefined variables
Then they find out they need to use the package first: CL-USER> (use-package :iterate)
;; Error: 3 NAME-CONFLICTs saying that the symbols ITER and friends
;; are already accessible
Then they throw their hands in the air about how frustrating Lisp tooling is. For a less obvious example, imagine they had just been using LOOP normally at some point in the past in that REPL session before trying to bring ITERATE in. Once you understand how symbols and packages work, it's easy to see why it works the way it does, but it's also easy to see how a beginner could get totally lost.
- SBCL (or whatever Common Lisp implementation you can get your hands on)
- a text editor
- (maybe rlwrap)