top | item 40436926

(no title)

b3lm0nt | 1 year ago

I wanted to love Common Lisp, but as a Vim user every day was a struggle. One typically uses plugins (Slimv, Vlime) that contort buffers in bizarre ways in order to simulate the SLIME EMacs REPL — if not, they will lose out on the interactive development experience that is so central to CL.

Being tied to either EMacs or an enterprise solution like LispWorks to get the full language experience was ultimately a non-starter. I’d love for someone to build an alternative CL development experience that could work in a wider range of text editors and IDEs.

There is a lot to learn from CL, but I think it can be hard to access for most developers.

discuss

order

nomilk|1 year ago

A flavour of emacs called 'doom emacs' is basically emacs for vim users (same keybindings and many similar features): https://github.com/doomemacs/doomemacs?tab=readme-ov-file#do...

Great set of instructions for how to set it up here: https://www.youtube.com/watch?v=xyXDE5gP2QI

(and if you're on macOS, this video is flawless for installation specifics: https://www.youtube.com/watch?v=A6SxH9lUWV0)

kaeland|1 year ago

As a vim user, I’ve been using doom emacs for the past 3.5 years and haven’t looked back yet. I really enjoy the Common Lisp experience while using doom as well.

medo-bear|1 year ago

Common Lisp in Doom uses Sly. If you want to stick to Slime and prefer vim ergonomics to those of Emacs there is also Spacemacs, which I just learned even has its own Wikipedia page: https://en.m.wikipedia.org/wiki/Spacemacs

vindarel|1 year ago

More editor plugins have been developed in the recent years: https://lispcookbook.github.io/cl-cookbook/editor-support.ht... Atom/Pulsar (very good support), VSCode (good, in development), Sublime, Jetbrains suite, Jupyter notebooks…

And that's not all. Lem, a general-purpose editor tailored for CL (see other comments below),

and even more recent, the CLOG builder (CL Omnificient GUI) which ships an editor in the browser: https://github.com/rabbibotton/clog-linux-ez/releases/ && https://github.com/rabbibotton/clog-win64-ez/releases

Rustaceans could help on this project: https://github.com/fonol/parrot/ (Rust, Tauri)

svetlyak40wt|1 year ago

Indeed! Some time ago, I've made this video review of 8 (EIGHT!) IDE to work with Common Lisp:

https://www.youtube.com/watch?v=eTgDaMREKT4&t=2s

Take a time and choose one. The world is not limited only by Vim and Emacs. However, I prefer emacs these days (happily switched from Vim a decade ago).

massysett|1 year ago

The author of “Let Over Lambda” dislikes Emacs and does not use it. What’s more, he didn’t use Slimv or anything like it or even Vim at all. He used a more basic vi, maybe nvi.

So perhaps the interactive experience is not essential. You can just edit and compile like you would in C. That’s not what I do—-I use Slime—but it is possible. Also, a lot of the interactivity is required by the standard to be built in to your Lisp’s REPL, so you can do quite a bit if your REPL isn’t primitive. SBCL doesn’t even have readline but you can use rlwrap.

https://letoverlambda.com/

amno|1 year ago

> The author of “Let Over Lambda” dislikes Emacs and does not use it.

I have no idea what Hoyte like to type in, but why does it matter what text editor he uses? Einstein didn't had any computer, not even a calculator. Do we have to use paper and pencil for all the calculations just because Einstein did? Our physics teacher in gymnasium, forced us for 4 years to do all calculations on tests by hand, at four decimal places, with that exact excuse: Einstein didn't have a mini calc. Non of us have become a Nobel prize taker in physics :).

> Also, a lot of the interactivity is required by the standard to be built in to your Lisp’s REPL, so you can do quite a bit if your REPL isn’t primitive.

Mnjah; not so much really. Using at least SBCL from plain command line really sucks. If you mistype something you have to retype everything, no history, etc.

> SBCL doesn’t even have readline

If you are on some *nix OS, you can get a long way by just using SBCL with built-in sb-aclrepl + linedit. Aclrepl gives you "command-like" stuff, similar to ":" in Vi (or M-x in Emacs), and linedit adds cursor motion, history and some basic completion. I would still not type entire programs in repl, but for running and testing the code it is a basic survival kit. For me personally it is enough.

There is also cl-repl package which gives you native bindings and some extras if you want to go all-in readline from within the lisp itself.

reikonomusha|1 year ago

"Lem is the editor/IDE well-tuned for Common Lisp. [...] If you come from Emacs or Vim, you will feel right at home."

https://lem-project.github.io/

medo-bear|1 year ago

I'm curious, how does Lem compare to Emacs as a common lisp ide?

jimbokun|1 year ago

Understandable, but it also seems like there is a disconnect between the philosophy of vi and the philosophy of Lisp. Vi is designed to be purely a text editor, and not an environment for building text based applications. Common Lisp being so inherently interactive, seems to require a dynamic, interactive text editing environment. Like Emacs.

kunley|1 year ago

Hmm, IIRC Paul Graham also used vi most of his coding years. So yes, great things can be accomplished with vi in the Lisp galaxy.

ngcc_hk|1 year ago

But that is old. Vim can easily interact with lisp real time. It would and probably never will be the same as emacs which is a lisp env. Still it is good enough.

orthecreedence|1 year ago

Back in my CL days I loved Slimv. It had its warts, but was miles beyond having a shell with a REPL open. I imagine it has only gotten better since (I haven't touched lisp in almost 10 years now). That said, I never gave Emacs a serious shake so I was probably missing out quite a lot on what a good interactive experience could be.

actuallyalys|1 year ago

If you use Neovim, you could try Conjure.

I really like it for other lisps, but I haven’t used it for Common Lisp. I wouldn’t say it “contorts buffers in a bizarre way,” although in my experience, different Vim users have their own take on that.

adz5a|1 year ago

I would be very interested to read about the limits of conjure. In my mind it is a fabulous tool, with vim-sexp it is very productive to write clojure code with and a pleasure to use.

Kehvarl|1 year ago

I had similar issues trying to get used to EMACS when I was playing the CL. Add to that the fact that I tend to use Windows at least half of the time, and I wanted an alternative.

I ended up setting up Atom with SLIMA and some other plugins to do CL development on Windows and Ubuntu. I even wrote up some very sparse instructions https://github.com/Kehvarl/roguelike-tutorial-cl/blob/main/d...

While Atom is gone, Pulsar now has a SLIMA plugin to allow Lisp interaction.

kentrado|1 year ago

I don't understand. Why not just use Emacs with evil-mode?

iLemming|1 year ago

> Why not just use Emacs

Emacs is an ethereal substance. You cannot "use" it. Just like with magic - there are no users of Emacs, you can be skilled practitioner or a beginner but you don't "use" magic - you apply it to create or to destroy. To slay dragons, to amaze and terrify uninitiated ones

https://twitter.com/iLemming/status/1093349152199630848

Seriously though, Emacs is hard. Especially these days, when the constant flow of distractions is intense. People these days do not have the patience for learning anything that takes them longer than an hour to grok. They'd rather duct tape things with "left-pad" solutions and call it "it just works"™, and if [insert fav editor here] doesn't support something, they lose any incentive to even try things.

reddit_clone|1 year ago

I don't know either. Some people just don't like to hear 'emacs' and react negatively.

I think someone should lock down emacs+slime, add some goodies, change keybindings and call it an IDE.

sitzkrieg|1 year ago

i agree and went through the same struggles before totally giving up, i discovered racket along way tho so it was a net win

medo-bear|1 year ago

You should give common lisp another chance and see what you have been missing in racket.

bigstrat2003|1 year ago

Yeah, I read this article with interest up until I got to the part where he admits you're gonna have to use either vim or emacs. I have no desire to subject myself to the pain of either of those editors, so I guess CL isn't for me.