8 ms·
Lem: A Common Lisp editor/IDE with high expansibility
- tmalsburg2 8y agoI don't understand the goals of this project. What are these "tidy settings" they are talking about? And is having to install plugins in Emacs really such an obstacle? It would be great if the authors could elaborate a bit more about their motivation and vision.
- lerax 8y agoMotivation: Emacs Lisp is not Common Lisp. It's cumbersome using Common Lisp for Emacs package development and cl.el is discouraged. Even not considering that simple fact, how we can use the massive Common Lisp ecosystem in a nice way? Sorry, I don't know how to do that in a simple way. Just no. Beyond that Lem it is quite fast and there is the OpenGL [1] front as unofficial contribution. It could be embedded as a Lisp IDE inside of a game called Lisp Hacking Experience that was never made. The amount of good reasons for doing that it can be enumerated by thinking about the common lisp ecosystem as I said earlier. BTW, emacs is great but it not have good defaults enough for modern Common Lisp development, Lem it's awesome as default for Common Lisp ;). Not having any beginner friendly editor for Common Lisp it was one of the reasons that I teaching Lisp was so difficult. Edit: Portacle is a good Emacs dist, but it is still emacs, so don't push the discussion with this in mind. It's pointless. And Portacle it's great in your own way (https://portacle.github.io/ https://portacle.github.io/) [1] https://github.com/pupcraft/lem-opengl https://github.com/pupcraft/lem-opengl
- insertcredit 8y agoThis post is full of misinformation. cl-lib.el is not discouraged, it's widely used by Emacs itself and pretty much every substantial Emacs Lisp library out there. What's discouraged is using an older version, cl.el, at runtime [1] because it replaces existing Emacs Lisp functions and pollutes the namespace. Even that's ok to use at compile time though. Lastly, cl-lib.el is not cumbersome to use. [1] https://www.gnu.org/software/emacs/manual/html_node/cl/Organization.html#Organization https://www.gnu.org/software/emacs/manual/html_node/cl/Organ...
- lispm 8y agoActually there wasn't much disinformation. cl-lib is cumbersome to use, especially since the CL operators now have a different prefix (since Emacs Lisp has no packages). This means I can not use any existing CL code in GNU Emacs - the operators are partially there, but all renamed. That's cumbersome.
- lerax 8y ago> This post is full of misinformation. Maybe a few, but not full neither even so many. Thanks for pointing about cl vs cl-lib.
- dang 8y agoPlease don't be discouraged by the occasional hostile reception. It's an invasive species here, which we do what we can to contain, but the bulk of the community is supportive and I hope that comes across in this thread! (And thanks for not taking the bait; your reply here was admirable.)
- lerax 8y agoYeah... Unfortunately or not, that type of person in the internet is so common that after years I learnt a little about it. Thanks for the support :) let's continue the good discussions on the thread o/
- c256 8y agoLet me give it a try, from an abstract/Emacs point of view: Emacs is good for Lisp development, but both “raw” Emacs itself and most of the packaged customization versions (Spacemacs, etc) are fairly ‘opinionated’ about Lisp, and that opinion usually falls close to: Lisp is great, but Common Lisp is a little/some/much too much, so our choices often lean away from CL’s. (Lisp-1 vs. Lisp-2, dynamic vs. lexical scope, etc.) This means that you’re customizing in a nearby language, but one that dislikes some of the things that you liked when you chose CL, so there’s some impedance mismatch going on. That said, you can get a great CL dev environment from Emacs, but you’ll want to install a bunch of add-ons first, probably including a non-Emacs lisp interpreter and a package to bridge Emacs and that other lisp. True fans of CL would really like a full-blown Emacs with real CL at its core, and periodically people try to make those (Hemlock, etc), but they usually don’t catch on.
- insertcredit 8y agoOne persistent problem I see in the Common Lisp (love the language!) space is the wide availability of crapware that not only doesn't bring something new to the table but is actively damaging to the community since it's diluting the set of good libraries and making it harder for new users to tell the wheat from the chaff. Lem is crapware. The problem it's supposed to solve, writing CL without configuring Emacs, is not a problem since there exists Portacle [1]. Lem is inferior to Emacs/SLIME/Sly in every way especially for writing Lisp. Lem has no future. But it exists and may act like a strange attractor to those who don't know better. A question I'd really like to find the answer to: Why is there so much crapware for CL?. Why doesn't the community come together behind the few, really good, libraries but instead almost everyone goes out and does his own thing, the end result being an ocean of crap. [1] https://portacle.github.io/ https://portacle.github.io/
- snazz 8y agoBy this logic, every new Linux distro, window manager, text editor, programming language, or anything else that competes with existing software is “crapware” that is “actively damaging” by “diluting the set of good [software]”. Competition is good! The community has never “come together” in any space (case in point: systemd), even outside of Common Lisp. Corporations and small teams sometimes create software that is more cohesive and might be what you’re looking for, but this has never happened for a “community” of any reasonable size.
- addicted 8y agoI agree with your point and disagree with the OP’s but I do believe that the proliferation of Linux DEs and recreation of basically the same software can often go beyond what is good. One of the biggest things holding Linux behind today is the lack of a common vision. I think it’s no coincidence that Linux on the desktop really took hold only after Canonical started promoting Ubuntu. With Cqnonical retreating into the server space and basically abandoning desktops, I fear we are about to enter another era of Linux desktop stagnation at a time when arguably we need it most (OSX and Windows are increasingly becoming tied down, and the fastest growing OS is ChromeOS which isn’t just tied down but is also potentially a privacy nightmare).
- rcarmo 8y agoNeat. I use vim, but it’s always nice to have options, especially ones that understand CL natively.
- lerax 8y agoDo you use CL with Vim? How you handle the repl integration, ASDF, quicklisp, indentation?
- analognoise 8y ago"I use vim" Bold move, putting heresy right up front.
- wolfi1 8y agoQuote Saint Ignucius from the Church of Emacs: " Although vivivi is the editor of the beast we consider vi as a penance not a sin"
- lerax 8y agoTotally, I don't think even that it's possible being productive with Common Lisp using vim. Just don't fit in my mind. I use vim to edit my /etc/fstab and works really wonderfully. But Common Lisp? D: maybe there is some magical stuff, unicorns plugins and so on...
- badsectoracula 8y agoWhy all Lisp editors/IDE's look like Emacs?
- kamaal 8y agoBecause Lisp programmers like to extend their tools using Lisp. Which happens to be the case because Lisp is the most powerful language to have ever existed. When you use Lisp to make an IDE to edit Lisp. Emacs like software is what you get.
- lispm 8y agoNote that Emacs and GNU Emacs are different things. Emacs is a family of editors, which share some basic design principles (buffers, keymaps, modes, extended commands, ...). Why do you think Lisp IDEs look like some Emacs? Because you happen to know them and haven't seen the other ones. Many Lisp IDE's have an Emacs editor, but are not based on Emacs. For example the MIT Lisp Machine has Zmacs, but that's mostly used for editing text (and some functionality around it). Zmacs is also used as a component in a few other programs, like the Mail client. Other than that most Lisp Machine programs are neither based on Zmacs nor have a Zmacs UI. Examples: file browser, font editor, terminal, Lisp repl - none of that feels/looks like Emacs. Interlisp-D / Medley from Xerox didn't look like Emacs at all. The Allegro CL IDE doesn't look like Emacs. LispWorks uses an Emacs written in Common Lisp, but for example does not share the buffer handling (in LispWorks buffers have their own windows all the time and they can't be changed). Additionally much of the LispWorks IDE is not based on an editor paradigm (inspectors, debugger, preference windows, ...). Since 15 years most (not all) open source CL developers used GNU Emacs + SLIME as the IDE. SLIME replaced older tools for GNU Emacs. There wasn't much competition for SLIME - it also was relatively easy for Lisp programmers to add IDE features to an editor extensible in some Lisp dialect - it's much more difficult and more difficult to make Eclipse or Intellij a decent Lisp IDE, and the results so far are clunky. SLIME OTOH is quite usable as a Lisp IDE. It would be about time to have a better Lisp IDE than GNU Emacs / SLIME - especially one which is more graphical. But then, we now have the javascript web and GUIs are again different.
- badsectoracula 8y ago
- mark_l_watson 8y agoI installed the stable (not Electron version) and kicked the tires. Looks like a fun project if you want turtles all the way down Common Lisp. I admit that even for Common Lisp, I usually just use VSCode to edit with a separate repl (I always define a function (ll) that reloads the code I am working on so this is not inconvenient). Off topic but I now also mostly use VSCode for Haskell, Python, and Julia. Still love Emacs, just don’t use it as my main driver anymore.
- fxfan 8y agoI'm surprised that emacs users and some vim users too are switching to VSCode. Assuming I am not RAM constrained (I have "only" 6 but my system never lags- I have 0 chromium engines on my system), what is your workflow and what does VSCode do better?
- foldr 8y agoSensible defaults are a big part of it for me. Using VSCode means that I spend very little time configuring the editor, or setting up extensions.
- fxfan 8y agoWhy would you spend time doing anything? You just do it once and commit it to github? That's how my vimrc lives.
- foldr 8y agoDoes doing it once not take time? I usually get bored halfway through and switch to an editor that works properly out of the box. In fact, of course, doing it once is a pipe dream. Everything with vim and emacs 90% works, and you can spend infinite amounts of time chasing the other 10%.
- F-0X 8y agoAs far as Common Lisp goes, you could just install the Portacle distribution of emacs. This is essentially a fully-geared up CL IDE, including all the favourite emacs extensions for development (flycheck, company, paredit, magit, etc) and even SBCL and git! It provides a single user.el file for user-specific configuration, but as it stands it is an excellent "emacs with great defaults".
- progman 8y agoNice work! Lem looks "Spartan" at first glimpse, the high expansibility however is a promising key for success. Anyone who truly loves Common Lisp has the opportunity to make Lem the best Lisp editor ever. I am a long-term Emacs user but I think we really need an optional editor which can be extended in Common Lisp rather than Emacs Lisp. What I really like about Lem is the KISS principle ("Keep it simple, stupid") since Lem is based on curses which is good for portability. I have no experience with Roswell. Is it possible to use QuickLisp packages? Or do you consider to switch from Roswell to quicklisp? That would make installation of Lem much easier!
- PuercoPop 8y agoRoswell and Quicklisp are two different things. Quicklisp takes care of downloading systems (what other languages tend to call packages) and makes them available to ASDF. Roswell and takes care of installing Common Lisp Implementations (think chruby + ruby-install). It also allows you to run lisp programs as scripts iirc. FTW you don't need to install Roswell to try Lem, you can use cl-launch instead
- ksaj 8y agoFWIW you already can run lisp code as a script, at least under Linux. I've been doing the following for quite some time without issue: --- xx #!/usr/bin/clisp (format t "yup") --- and then on the command line: > chmod a+x xx ; ./xx yup Caveat: You have to comment out the hashbang if you want to (LOAD 'xx) in the repl, or it will puke unceremoniously. It would be nice if repl devs allowed the LOAD function to simply treat it as a ; symbol since it wouldn't break anything and is more consistent with the cli behaviour. I've only done this with clisp, so maybe other Lisp variants like sbcl et al already do this. YMMV. EDIT: Realized the script came out all on one line. Fixed.
- reikonomusha 8y agoI use Common Lisp professionally for work, and I love using Emacs and SLIME for editing Lisp. But over the past decade or so, I’ve also learned to maneuver around Emacs, and give it the attention it needs to become somewhat proficient at it. In the case of others, I’ve observed much less patience. Patience maybe isn’t even the right word; perhaps it’s just an unwillingness to invest in something that doesn’t really communicate an obvious return. Many of my coworkers, especially those who want to edit a little bit of Lisp but don’t want to make it their life story, really wish there was a better editor. Many of them Python programmers, or even technical folks with a non-programming background, really aren’t sold on this whole Emacs thing to edit a weird language. Out of the box, you have to look up the plethora of cheat sheets and commands and figure out why GUI Emacs doesn’t see your PATH and why changing the font doesn’t stick and .... They do appreciate the likes of Atom, PyCharm, Jupyter notebooks, etc. with big beautiful GUIs with big beautiful menus and slick websites and “out of the box” support for what they need to do. Pop-up suggestions, dedicated terminal windows, etc. “Obviously” Emacs can do these things, if not better and with more breadth, but it’s all hidden behind The Model of Emacs Thinking (TM). I really look forward to efforts like Lem improving. I hope they try to do at least one thing really well—editing and interacting with Lisp—and not 100 things poorly (e.g., trying to replace Python editors out of the gate). A great Lisp editor will be such a boon for the language, maybe as important to its rebirth a decade ago as Quicklisp was to it. Lisp is such a wonderful tool, and I want folks to see the great industrial uses it has. Selfishly, I also want to see more contributions to my own Lisp projects on GitHub. To the extent Lem can facilitate that, I’m entirely on board. (If you’re looking for some cool things to hack on in Lisp, try quilc [0], qvm [1], or maybe even Lem itself!) [0] https://github.com/rigetti/quilc https://github.com/rigetti/quilc [1] https://github.com/rigetti/qvm https://github.com/rigetti/qvm
- robertcarter 8y agocare to share your emacs config/setup ?
- zimablue 8y agoI definitely fit into that second paragraph, and I appreciate you being careful to distinguish patience from being convinced of cost-benefit. I came to the conclusion after some pottering that it would be tough to make emacs nearly as good a python IDE as pycharm, not like a weekend's work it looked like a project in itself. It would again be a project in itself to make it as useful as jupyter for data-things. Someone has worked on embedding jupyter in emacs but it's a bit janky and you're then locked out from any extensions which will be written in javascript and expecting a DOM. An investment in emacs seems to require a 10+ year time horizon, which means betting that it's going to grow and not decline, the numbers seem against that. I think what I really want is atom/light-table to get a lot better but the second died at birth and vscode is going to kill the first whilst having an uglier inner model that is less friendly to extensibility. I really wish Mr Granger had stuck with Light Table instead of running down a blind alley of VC money. There's a great quote that the threat to emacs is the browser, since it's a completely scriptable environment, I guess jupyter/light-table/atom embody that. I still use spacemacs for running shells and editing files kind of ad-hoc.
- pjmlp 8y agoIf you want to create an nice FOSS IDE for Common Lisp, play around with Alegro and LispWorks, don't just try to redo Emacs + SLIME. And take advantage of Common Lisp, no Electron needed.
- emit_time 8y agoWe use Allegro Common Lisp which has an interface[1] to emacs, and it's quite nice to use, minus several annoying bugs. Notably, gives you access to a REPL. I just started working as a developer, and so far enjoying using it, despite not having experience with other languages in a professional capacity, or with large projects. The less my hands have to leave the keyboard the happier I am :). I do use evil-mode, but I should probably get more comfortable with emacs keybindings as time goes on, especially since emacs has some useful keybindings in the context of s-expressions from what I recall. [1]: https://franz.com/support/documentation/10.1/doc/eli.htm https://franz.com/support/documentation/10.1/doc/eli.htm
- Smithalicious 8y agoEh, call me cynical but I'm gonna join the rest and say that this looks like yet another attempt to reinvent Emacs that'll eventually just be left to die somewhere. If all this time reinventing Emacs poorly had been spent developing Emacs instead we could've had M-x flying-cars by now.