Remix.run Logo
rmunn 2 hours ago

Everyone's recommending books; I'm going to do the opposite and recommend a specific dialect.

Install Clojure. Read https://clojure.org/guides/getting_started and choose an editor. If you don't have a favorite editor, I recommend NeoVim with the LazyVim package (clone https://github.com/LazyVim/starter and follow instructions), then run the :LazyExtras command and install the Clojure package. If you haven't used LazyVim before, https://lazyvim-ambitious-devs.phillips.codes/ is a good book; you can read it online for free, then if you find it useful, purchase a copy to reward the author for his hard work.

Once you've installed an editor, you'll want to install https://leiningen.org/ which is the de facto (if not de jure) package manager for Clojure. Makes compiling your Clojure code to an .exe (for distribution to other machines where Clojure isn't installed) about as simple as it can be.

Once you've got an editor and a package manager installed, you're ready to read https://clojure.org/guides/learn/clojure as well as the various books on Lisp others are recommending. Depending on which book it is, the functions may have different names (e.g., some languages use `first` and `rest` while others stick with the historical `car` and `cdr` names, but they're the same functions), but you should find that the concepts translate perfectly well from one dialect of Lisp to another and the only challenge is having to look up what name the function has in the dialect you're using.

rmunn 33 minutes ago | parent [-]

I should mention that you really do want good editor support with any dialect of Lisp, because having to balance parentheses by hand gets old fast. You want an editor where you can have keybindings for "pull this space-delimited item out of the current parentheses and stick it into the parent set of parentheses" and all the other operations that are extremely common in Lisp. Also, smart auto-indenting is absolutely essential in order to produce readable Lisp code. You need things lined up correctly if you want to be able to read the code without resorting to counting closing parens. This is why so many people use Emacs, because it was designed for Lisp from the ground up. But I never liked its Ctrl+Shift+Meta+key shortcut methods, hence why I'm recommending Vim.

Emacs does have one advantage over Vim when it comes to Lisp, though, which is that it almost certainly comes with Lisp-related keybindings already ready to go. And also that its config files are written in Lisp, so if you're using Emacs then you're already reading and writing Lisp code just to configure it. Two. Two advantages. Oh, and fanatical devotion to the Pope ^W^W Richard Stallman. Three advantages... I'll come in again.