Hacker News new | ask | show | jobs
by abhinav22 1774 days ago
Lisp is a wonderful language (Common Lisp in particular, but I am dabbling in Scheme now too), and absolutely fantastic for web development - seriously people should give it a chance in that space, I would totally develop any SPA in Lisp[1].

QuickLisp is simply a joy to use, and the language is very portable with a fantastic specification and many top notch compilers.

IMO, what holds it back is a lack of a top notch IDE. It took me a year of love & hate with Emacs, I can now make pretty good use of the amazing software that is Emacs (where everything can be changed), but honestly at times I want a simple point & click free IDE which is polished and does most things well and out of the box. Portacle is a step in the right direction, but the Emacs dependency IMO does make the language a bit more niche and lose out to other languages for beginners. If some big corporation can mix sublime with slime with paredit with some of the customize ability of Emacs, then Common Lisp could explode in popularity.

Don’t get me wrong - I LOVE Emacs and everything about Emacs & CL combined, but it took me a year to get to this point.

[1] For those interested, I wrote this article covering the basics: https://ashok-khanna.medium.com/lisp-the-web-4c00c88d11f9

4 comments

The emacs bias is even part of Lisp advocates mental models, so it's no surprise that a lot of would-be Lispers give up at the thought of having to use it. But there are alternatives, and it might be fruitful for advocates to routinely point them out. vim (my preference) has two slime plugins that work really well, Atom has https://atom.io/packages/slima and as you point out there's lots of Emacs-variants. There's also lem and Second-Climacs might one day be good. And of course there's the two proprietary IDEs with LispWorks and Allegro that both provide trial versions to see if you like them before shelling out money.

Apart from editors, more editor-independent tools would be nice. McCLIM's Clouseau is a pretty cool graphical inspector/variable watcher.

IMO what holds it back is lack of a big company using and promoting it along with tooling (which might be in the form of alternate IDEs or good plugins for popular editors like VS Code or IntelliJ). Clojure has shown what's possible without such, most use emacs but there are popular alternatives too, and for a time it was even as popular as Go, but Go has BigCo backing, and we can see how much further that brought it despite its many shortcomings.

Do any non-emacses have anything like paredit?
Slimv comes with a Paredit Mode: https://github.com/kovisoft/slimv Personally I leave it off, though, never been a fan of anything trying to 'help' me automatically while I'm typing apart from indentation. I do appreciate vim-sexp occasionally with these mappings: https://github.com/tpope/vim-sexp-mappings-for-regular-peopl...

https://susam.in/blog/lisp-in-vim-with-slimv-or-vlime/ is a good overview of the differences between slimv and vlime (the two vim plugins) and how to use them.

You write lisp without auto-inserting the closing paren when you open a paren? I honestly don't think that's a good idea. It's also something that's contributed to lack of lisp adoption -- people trying to write it without sensible editor support.
Yup, as I type ( and { and [ and " and manually close them in every other language and inevitably turn that stuff off if the IDE has it enabled. vim default has enough support -- when I type ) et al., it highlights the matching opening. Typing '%' in command mode jumps to the corresponding open/close bracket. Occasionally if I know I'm done with a function, and have a bunch of closing parens to insert, I'll use slimv's ctrl+x+0 to close them all for me. I'm a fan of rainbow parens which makes things nicer to look at too, but really, this Lisp meme becomes true after not very long: https://www.thejach.com/imgs/lisp_parens.png Or at least one tunes them out, just like one does with the syntactic noise in other languages. Editing them is natural.

Speaking of noise, here's some out of context JS code from the first random file I opened in a really old project:

              }
            });
          }
        ).on('error', function(e) { console.log('Error: ' + e); response.json({error: 'data_fetch_error'}, {}, 400); }).end();
      }).then(function(next, urlstr) { 
Yup, all of those () and {}s and commas and semicolons and single quotes were inputted manually. I say to my editors, "just let me type".

For Lisp, "sensible editor support" to me means something like slime support that enables REPL development. Lacking that in editors besides emacs (or not knowing about the support for alternate editors) has probably hurt adoption, sure, but I don't think the presence or absence of other editing tools that most every editor has (like keyword highlighting and other colors, auto-indentation, auto-completion, auto-bracket insert, intelli-sense stuff...) is a factor.

This is what is holding me back from the other IDEs for Emacs. Also slime is great
BTW, there's a small small-world coincidence, between a desire for an Emacs-based super IDE, and the original article...

The desire for an Emacs-based out-of-box power-user IDE was how we got Lucid Emacs, aka XEmacs (which was one of the two big forks of GNU Emacs with GUI innovations that GNU took a while to catch up with)...

...from JWZ, et al.'s work on the Lucid Energize IDE for C++...

...and JWZ worked for Norvig early on...

...and Norvig was at Harlequin...

...and Harlequin acquired at least some of Lucid's IP.

XEmacs was the only thing that made lack of IDE culture on UNIX tolerable to me back in the 1990's.
> IMO, what holds it back is a lack of a top notch IDE

I hear good things about Lispworks[1][2], but personally I'm put off by non-free development tools. Especially ones with a 3-4 digit price tag. However, their business model evidently works for them.

[1] http://www.lispworks.com/products/lispworks.html

[2] https://lisp-journey.gitlab.io/blog/discovering-the-lispwork...

As mentioned, SLIMA for Atom is pretty good, nearly as good as Slime. More options: https://lispcookbook.github.io/cl-cookbook/editor-support.ht... (VSCode, Jupyter notebooks, a simple Eclipse plugin, an overview of LispWorks etc)