15 ms·
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 orde
by b3lm0nt 2y 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.
- massysett 2y agoThe 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/ https://letoverlambda.com/
- amno 2y 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.
- upsetMatchUser 2y ago> Einstein didn't had any computer, not even a calculator. Maybe Einstein used LaTeX ( ͡° ͜ʖ ͡°)
- vindarel 2y agoMore editor plugins have been developed in the recent years: https://lispcookbook.github.io/cl-cookbook/editor-support.html 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-linux-ez/releases/ && https://github.com/rabbibotton/clog-win64-ez/releases https://github.com/rabbibotton/clog-win64-ez/releases Rustaceans could help on this project: https://github.com/fonol/parrot/ https://github.com/fonol/parrot/ (Rust, Tauri)
- svetlyak40wt 2y agoIndeed! 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 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).
- djha-skin 2y agoI just do it in vim and tmux (it used to be screen): https://blog.djhaskin.com/blog/developing-common-lisp-using-gnu-screen-rlwrap-and-vim/ https://blog.djhaskin.com/blog/developing-common-lisp-using-... This works real well. I honestly don't see the point of slime, it feels like it was written so that people didn't have to use the terminal, but the terminal works just fine for me. I even wrote a :make plugin for it, which works well enough: https://git.sr.ht/~skin/roswell-sbcl.vim https://git.sr.ht/~skin/roswell-sbcl.vim
- kentrado 2y agoI don't understand. Why not just use Emacs with evil-mode?
- reddit_clone 2y agoI 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.
- kagevf 2y agoSomeone did: https://portacle.github.io/ https://portacle.github.io/ Also, lem (already mentioned elsewhere in this thread)
- iLemming 2y 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 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.
- kentrado 2y agoOk, I get that from someone coming from vscode but Vim certainly takes more than one hour to grok. My point is Emacs+evil-mode is close to indistinguishable from Vim. I know this because I come from Vim. I think @reddit_clone hit the nail on the head. It is just an irrational adverse reaction to hearing the word Emacs.
- 2y ago
- Kehvarl 2y agoI 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/docs/part-0.md https://github.com/Kehvarl/roguelike-tutorial-cl/blob/main/d... While Atom is gone, Pulsar now has a SLIMA plugin to allow Lisp interaction.
- bigstrat2003 2y agoYeah, 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.
- actuallyalys 2y agoIf 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 2y agoI 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.
- nomilk 2y agoA 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#doom-emacs 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 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 https://www.youtube.com/watch?v=A6SxH9lUWV0)
- kaeland 2y agoAs 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.
- kaeland 2y agoI should also note that I’m looking forward to CLOG being ready as an in-browser IDE for Common Lisp soon. It’s a really neat open source tool for developers if you haven’t heard of it yet: https://github.com/rabbibotton/clog https://github.com/rabbibotton/clog
- dbotton 2y agoI use it everyday for all my Lisp dev :) So is ready.
- Zambyte 2y agoI appreciate the message you're conveying (I also switched from using vim for years to emacs for years, probably for good) but man, we have to stop attaching tools to our identities. You're not only more than a vim user, you don't even use vim!
- kqr 2y agoI would argue Evil mode (which Doom Emacs includes) is an implementation on Vim. Only instead of being an implementation in C, it's an implementation in Elisp. I equate Vim not with the weird configuration language or source code of the original Vim project, but with the interaction language it uses – and Evil uses the same one. Evil is more than "a vim compatibility layer" -- it is a reimplementation of Vim closer in spirit to nvim than anything else.
- jimbokun 2y agoUnderstandable, 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 2y agoHmm, 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 2y agoBut 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.
- p_l 2y agoGNU Emacs nor XEmacs also can not behave like ZMACS on lisp machines - there's just as much disconnect as between (n)ViM and lisp image. It's always a remote, RPC-like relation. In fact, I'd say that a certain ancient Erlang mode for Emacs resulted in closer relationship between Emacs and Erlang, as it made Emacs into a process in OTP cluster.
- mbrock 2y agoThere's also an interesting SWI-Prolog mode that embeds the language runtime with dynamic linking and integrates quite deeply.
- orthecreedence 2y agoBack 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.
- reikonomusha 2y 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/ https://lem-project.github.io/
- medo-bear 2y agoI'm curious, how does Lem compare to Emacs as a common lisp ide?
- vindarel 2y agoIt compares pretty well: it has all the essential features, and some more. It only lacks a couple keybindings in my eyes (shortcut to call the function at point in the REPL, shortcut to "change-package" from a lisp file). It has: - the interactive debugger - the Lisp REPL - so we can have a full-featured Lisp REPL on the terminal with: alias ilem='lem --eval "(lem-lisp-mode:start-lisp-repl t)"' - the same compilation, evaluation, code navigation keybindings and error reporting some more: - when we evaluate an expression, it will show a loading spinner during that time and then the result in an overlay. - a "watch" command that shows results in the overlay too https://lem-project.github.io/usage/common_lisp/#watch https://lem-project.github.io/usage/common_lisp/#watch Overall, Lem has: - a built-in LSP client that is known to work with other languages (and syntax highlighting for many languages) - some tools, still more rudimentary than Emacs: directory mode, find file in project, project tree side view, Git tool (shows status, does interactive rebase)… - it is in the process of having co-editing in Lem itself. The developer(s) are beta-testing a collaborative web-based version of Lem: https://github.com/sponsors/cxxxr https://github.com/sponsors/cxxxr Lem has ncurses and SDL2 interfaces. https://lem-project.github.io/usage/usage/ https://lem-project.github.io/usage/usage/
- alt0_ 2y agoIt's pretty raw and buggy still, but if you're already a cl hacker, you'll certainly enjoy it. It is missing most useful Emacs features but also seems to have some of it's own, particularly for CL.
- sitzkrieg 2y agoi 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 2y agoYou should give common lisp another chance and see what you have been missing in racket.
- sitzkrieg 2y agoi dont want to learn emacs
- iLemming 2y agoEmacs is essentially a Lisp-machine. Yes, I understand that this deviates from the traditional notion of a "Lisp-machine" since it's not hardware-based; nonetheless, it still fits the bill. If you're eager to learn Lisp (not just Common Lisp, but any dialect), why not take advantage of a Lisp machine for that purpose? When you say, "I don't want to learn Emacs," you're basically saying, "I don't want to learn Lisp." You need to know Lisp to grok Emacs, you need to write it, you need to embrace it; otherwise, you're not using Emacs, you're just a passenger.
- medo-bear 2y agoyou don't have to if you don't want to. even without emacs common lisp is a better experience than racket
- sitzkrieg 2y agoi wrote several projects in CL and overall disagree. and thats ok! i prefer rackets batteries-included and library system, nice local docs, ide from this century (albeit basic editing capabilities) compilation options etc for my personal projects i certainly understand the appeal of cl and even use lispworks in embedded work. but some tools have better ergo for me depending on time/effort/whatever