Hacker News new | past | comments | ask | show | jobs | submit login
Sly: Sylvester the Cat's Common Lisp IDE (github.com/joaotavora)
86 points by molteanu on Sept 27, 2018 | hide | past | favorite | 22 comments



Just curious: other than established convention, is there anything that Sly/Slime provide that are still missing in Language Server Protocol(https://langserver.org/)? Would it benefit more to move to a lsp-based solution so we can make Common Lisp more modern-editor friendly?


I'm not very familiar with LSP, but I think it's a fundamentally different thing than Slime.

Slime is a full REPL, like Python's IDLE or Ruby's IRB, but 100x better.

LSP is just a generic way of doing autocomplete and source code referencing. Swank (the server side of Slime) does provide some functions that are used to do LSP-like things, but those are only a subset of the features.

It may be possible to rip out those parts and make them use LSP instead, but I doubt it's worth it because the LSP server would still have to run in the same Lisp image so that it could know about the dynamically defined symbols.


That's like asking what LSP is missing that visual studio provides.

Slime is a full-blown IDE that just happens to be implemented in elisp.

That being said, LSP doesn't do anything for providing indentation rules to editors; editors not named "emacs" are at best poor at indenting lisp code, and many modern editors do not provide pluggable indentation. Because of the fewer distinct visual blocks in lisp, properly indented code is important for readability.

I think the main reason an LSP hasn't been implemented for lisp is that nobody that has the skills to make one has any use for one.


I think the main reason an LSP hasn't been implemented for lisp is that nobody that has the skills to make one has any use for one.

Exactly this. LSP is inferior to Slime and Sly and therefore next to useless to Lispers.


I'm Sly's author. There is CL specific functionality, most notably an inspector, a debugger, and a REPL that are not very well covered by LSP right now. That said:

1. I've heard of an experimental microsof-sponsored DAP (Debugger Adpater Protocol) which is similar to LSP and uses some of its underlying transport mechanics.

2. I have another Emacs extension, Eglot (http://github.com/joaotavora/eglot) for LSP. It follows roughly the same implementation patterns as Sly, so if you like one you might like to try the other.


Was just thinking that if I could get a decent editor experience in VSCode, I'd love to play around with Common Lisp again.


>Was just thinking that if I could get a decent editor experience in VSCode, I'd love to play around with Common Lisp again.

VSCode, for its main intended language (Js), totally pales in comparison to using Emacs (+SLIME and other tools) for Common Lisp. It isn't even funny.


Honest question: what is preventing you from trying Common Lisp in Emacs?


I'd recommend anyone to do so.

I have been programming professionally for almost 15 years, and never used emacs nor lisp until a month ago. I have however used a lot of other languages, and have been using vim as my main editor for the last 10 years.

I tried emacs because of org-mode a month ago, and decided to use vim for writing code and emacs for managing my life, but after a few weeks, I ended up just using vim inside emacs (evil) and switching completely to emacs. Learning a bit of elisp to configure emacs, prompted me to give lisp a closer look, and now I'm full-steam-ahead learning Common Lisp and loving it!


I've been down the Emacs road a couple times. It's just not going to happen. It comes down to to time. I have a limited amount of it and investing in Emacs isn't worth it. Obviously Emacs will have users for years to come, but its future is bleak.


That's a strange thing to say. GNU Emacs has been around 33, years, is still very actively developed, is GPL so could be forked, and seems more popular than ever. You don't have to justify your decision to not use Emacs by saying Emacs has a bleak future. I think Emacs probably has the most secure future of any text editor or IDE.


No reason to get defensive and down vote for things you have no personal stake in.


Developers do have stakes in programming languages and programming tools. You, yourself, said that you don't want to invest in Emacs. Someone who has invested a ton in mastering Emacs at this point has a personal stake in it. He wants it to thrive and have high adoption.

That being said, I'm actually in the same camp with you, on both counts (this comment and your previous one).

My main problem with Emacs is that of mindshare. To clarify what that means, I'll use some examples.

Git has huge mindshare: if a new development tool appears, if it can integrate with Git, its makers will try to integrate it themselves. This generally provides the best and most maintained integration.

Emacs has low mindshare: if a new development tool appears, Emacs users have to integrate it themselves. Outside of the relatively small Lisp community, almost no upstream developer is bothering to offer Emacs integration.


I'm not sure I understand your example. Emacs integrates, it doesn't need to be integrated. It also has the best git interface I have ever seen (magit).

In a certain sense a subclass of Emacs users are the makers since it is a traditional Free Software model not backed by a major corporation. But that can be seen as an advantage since there is no single point of failure, and if GNU doesn't do a good job it can be forked, and has in the past (remember XEmacs?).

Practically speaking, the major disadvantage of Emacs is poor asynchronous/ multithreaded support. That's not an easy problem to solve but I do think it will get better eventually, and I don't find it a major impediment in day-to-day use.


Well, if you want a clear example of what I mean, Jetbrains makes a plugin for Kotlin for their IDE and another one for Eclipse. They don't make one for Emacs. The Emacs community has to make it (maybe they do, I don't know).

Look at any tool (except for GNU or Lisp stuff) and try to see how many of them have Emacs plugins made directly by the tool authors.

Eclipse, Visual Studio Code, Atom, etc., tend to have plugins made directly by the tool authors, in many cases.


How many IDEs do you use? I use 3 or 4 on a regular basis, and I don't find switching between them to be that big of a deal.


I've been a vi user for all of my Linux computing life. Watching the gifs in this repo put me in the shoes of coworkers watching me type in arcane symbols in vi to do 'magic'.

I feel like I should give emacs a download and try to wrap my brain around it, if for no other reason than to be more well-rounded.


Is this somehow tied to SBCL, or generally useful across all implementations (e.g. Lispworks) ?


It is a slimmed down, modernized fork of Slime. Slime works across all Common Lisp implementations. Sly takes advantage of improvements to Emacs Elisp implemented in Emacs 24.3 and higher. So it looks like it is not tied to any particular Common Lisp implementation, but you need to use a modern Emacs.


Modern is a relative term. 24.3 was released in 2013!


Ah good, will try it out then!


Same as Slime. Works across implementations.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: