I have been wanting to program in lisp for a good while, but I do not enjoy using Emacs, and Slimv and Vlime haven’t functioned. So, would having Vim in one terminal editing a file and then a REPL in another work?
Slimv and Vlime haven’t functioned
What exactly do you mean by this? Either should just work! Did you face any specific difficulties with them?
Slimv requires Vim with python, which I don’t have, and Vlime requires me to run
sbcl --load /vlime/lisp/start-vlime.lisp
every time.
You won’t get “the Lisp experience”, which is the killer feature to many, but yes you can.
So then, what is the “Lisp experience”, and why does everyone want it?
The development of a program is very incremental, immediate, and interactive. The idea of the editor and the program begin to blend. The cycle type between observing program behavior and changing program source is trivialized and almost not even noticeable. In the end it allows you to converge on ideas very, very rapidly. Programming in other languages/environments feels like having asthma.
The problem is that describing this never really makes sense.
Is there a video we can see what this is like? I have looked it up and often the videos are like an hour long and there is more talking than showing.
Here’s a video of live coding a game in CIDER (which is like SLIME for Clojure - another Lisp).
+1 for long talking. My attempt at it: https://www.youtube.com/watch?v=jBBS4FeY7XM 5min, shows how we can restart a running program from any point in the stack trace, without restarting the program from zero.
Some more I recommend: https://www.cliki.net/Lisp Videos
It is difficult to find good demonstration videos. Here is another:
https://www.youtube.com/watch?v=jBBS4FeY7XMEmacs with Elisp btw. is working alike. So you could experience that “Lisp experience” yourself easily, just by modifying Emacs itself. You can change ca. 99% of it on the fly, redefine whole parts of its functionality without need to restart Emacs. Sometimes that’s not realized. Together with
edebug
, its good in-code documented functions and introspectibility it is a nice programming experience. Sometimes I miss that tight integration with Common Lisp.
You’ve seen a couple descriptions in the sibling comments to this one, and it probably sounds like what you feel about python/ruby/whatever. But you really should try lisp with editor integration. Or, try some smalltalk for a lot of the same feel. Smalltalk has better integrated tooling, though I’d argue lisp through swank feels nicer. The common spiel sounds so similar to regular repls, but feels profoundly better in practice. I always thought of languages using repls as toys prior to earning common lisp.
Ofc, do whatever you want.
If you enjoy using vim, maybe evil-mode would make the experience of using Emacs more enjoyable for you.
Try olical/conjure plugin for neovim. It’s definitely not as good for CL as slime/sly but it works much better than vlime/slimv (for me) https://github.com/Olical/conjure/wiki/Quick-start:-Common-Lisp-(Swank)
Try pulsar and slima
I recommend LispWorks! (“…but it isn’t free…”)
Yes, you can (load “file.lisp”) in the REPL and have a somewhat interactive session (or start everything from scratch everytime…). I just read an ecstatic comment about that yesterday: https://news.ycombinator.com/item?id=38374577
How about the Lem editor? That’s pretty lispy
You don’t.
You could use Dr Racket. Racket is a derivative of Scheme. Dr Racket supports several versions of Scheme.
Need, no. Want, yes.
In learning emacs, I found it easier to spend a few hours customizing emacs so that it does exactly what I wanted rather than learning how to do things the emacs way. (yay CUA mode!) If the thing holding you back is that the defaults are garbage, or you prefer Vim bindings, there’s some packages that handle that. Maybe there’s a glimmer of hope there.
That being said, if you’ve given those a try, or are just plain out done with emacs, you can use SBCL like an interpreter and have it produce the output you want. The experience you’ll get from that is similar to other languages that run on the “Write -> Compile -> Run -> Read output” cycle, like C++ or Rust.
REPL-style, interactive workflow is going to be more difficult. The UX in REPL mode with default SBCL is bad enough that if I had to use that, I’d probably copy-paste code in and out of the REPL window from another editor. Slimv and Vlime are probably better than that.