Second Climacs – Emacs Implementation in Common Lisp
github.com
github.com
https://github.com/lem-project/lem/ supports CL, Python, C, Rust, CSS, Go, HTML, Java, JS, Nim, OCaml… (see the modes/ directory), it has a directory mode (à la dired) and it seems to support LSP (I only tried it for CL so far). It is very much Emacs inspired, but is lacking documentation and self-documentation features :( There is Lem-OpenGL ! https://github.com/gregcman/lem-opengl
The most functional, feature-complete, proven editor is the LispWorks IDE: http://www.lispworks.com/ A review: https://lisp-journey.gitlab.io/blog/discovering-the-lispwork... It's proprietary. The free version has annoying limitations. It is written with the portable CAPI framework. It has an excellent graphical stepper.
And, you might not know, but popular editors are getting good to very good support for CL now, at last. SLIMA for Atom nearly reaches feature parity with Slime (it doesn't have a stepper). For VSCode, see Alive. There's a Jupyter kernel, an Eclipse plugin and more. https://lispcookbook.github.io/cl-cookbook/editor-support.ht...
libraries: https://github.com/CodyReichert/awesome-cl
In contrast, Gnu Emacs has bindings to native GUI libraries on Windows, Mac and Linux. By "native" I mean Xserver is not required on any of them (and GTK is required only on Linux).
Details: on Linux the feature/pgtk branch of Gnu Emacs (of which I am a happy user) talks directly with GTK and Wayland with no need for an Xserver though there is a risk that feature/pgtk will never be merged into Emacs's mainline because influential Emacs users like to run their Emacs process on powerful computers remote from the computer in front of them, and so far no one has gotten that "remote" feature to work in the feature/pgtk branch without using "the TTY interface", which lacks features of the other interfaces described above (the Windows interface, the Mac interface, etc).
Hopefully that is about to change. Daniel Kochmanski seems willing to push McCLIM forward with alternative rendering backends. Moreover, Luke Gorrie (of SLIME and Distel fame) is working on an Emacs McCLIM backend: https://mobile.twitter.com/lukego/status/1387747747864973312
The CLIM specification is overwhelming. The Lispworks and Franz user manuals for CLIM are too. There are just too many concepts being presented at the same time and with incredibly complex class hierarchies (e.g. a Stream is a Medium is a Pane is a ... I can't keep track.)
But behind all of that there are a few simple and mostly separate frameworks: describing colored geometric shapes and text; associating drawn shapes with application objects; defining commands to operate on application objects.
You can actually pick and choose from these APIs and map them onto whatever "backend" you like. The Emacs backend, for example, initially just translated the geometric drawing commands into SVG elements. That was really easy. Then we added unique IDs to those elements so that we can enable/disable them as input sources - also fairly easy.
The Emacs backend is becoming fairly extensive but it's still only 650 lines of code: https://github.com/nuddyco/McCLIM/blob/clime/Backends/Emacs/...
The reality is that nobody cared enough about those alternative backends to keep them alive (other than CLX, for a time beagle was usable - but only on OSX, unless someone did a lot of work to compile it for other unices using GNUstep/OPENSTEP)
And none of the old alternative backends, including Beagle, ever worked for me. I certainly tried. I think it's fair to say that all of them were in various states of disrepair and none ever reached the point of "fully working".
This works quite well now. If anyone wants to try it the installation instructions are at https://gist.github.com/lukego/0b74b94492066ae2b8c2a12b18e84....
Supporting multiple backends sounds like a good idea but if CLIM is one backend among “many” then it cannot be taken advantage of. But maybe CLOS will allow CLIM to still be exploited.
> Climacs depends on McCLIM for its graphic user interface. Second Climacs is independent of any particular library for making graphic user interfaces, allowing it to be configured with different such libraries. Though, at the moment, the only graphic user interface that exists uses McCLIM
You can build GNU Emacs for X with Lucid instead. Motif too, but that is getting removed soon.
Some cross-platform text editors like Textadept require GTK on Mac and Windows, but Gnu Emacs does not, is what I meant to say.
Robert often went out of his way to answer my dumb questions and really helped me better understand a number of things.
Thanks Robert!
OTOH, CCL doesn't have CAPI.
I think the problem was that there was still too much of a separation between the language itself and user written functions. Because so much of the language cares about object identity, one couldn’t write a portable hash table oneself. Making a data structure like a search tree becomes hard because there isn’t a good way to sort arbitrary objects of arbitrary type or embed a specific sorting function and type check. CLOS is both massive and poorly integrated. The language is full of features that are old (rplca), hard to compile (&rest, adjustable arrays with fill pointers whose data is from another array at an offset), inextensible (loop, +), half-baked (types), or difficult (pathnames). But it also misses many features (eg threads). Without a refreshed standard it is hard for the language to move forward while code remains portable.
In some ways I think of Julia and clojure as successors. Julia has types and multimethods working very well together but drops method combinations, pervasive mutability, lists, symbols, and syntax for good macros. Clojure keeps the macro-happy syntax and symbols, bins the mutability, and makes the data structures more compatible, functional and efficient.
Obviously this doesn’t have so much relevance to emacs past or present.
I also like CLOS (the Common Lisp object system) better than the object systems available in Racket, as well as Common Lisp's macro system. But that's just personal preference. The existence of Typed Racket is pushing me to explore Racket more.
It's required that a CL implementation supports compilation, but compiling to machine code isn't required. e.g., Clisp has a bytecode compiler.
- https://en.wikipedia.org/wiki/Common_Lisp#Compiler_and_inter...
Racket seems to miss at least two big points: the interactivity/the debugger and the condition system.
The ones that looked anything like CL were pretty heavy. I imagine the decision to write elisp at all in the first place was made by people pretty familiar with what existed at the time, and why it wasn't a good fit for them....
> The ones that looked anything like CL were pretty heavy
yeah, Coral Lisp needed 1 MB RAM on a 68k Mac. Morphed into a Common Lisp then.
mulisp in 85 supported 0.5MB RAM on a PC. It had some CL compatibility.
0. https://xi-editor.io/docs/rope_science_00.html
1. https://publications.lib.chalmers.se/records/fulltext/local_...
https://github.com/CodyReichert/awesome-cl
https://github.com/lem-project/lem/
https://lisp-journey.gitlab.io/blog/discovering-the-lispwork...
>At the moment, all you can do is type some text, and you can use C-x i to insert and existing file. Some basic Emacs commands also work, like C-f, C-b, C-p, C-n, M-<, M->, and C-x C-c. The visible window does not automatically follow the cursor yet.
Oh OK. I thought the name is a naughty pun. Now thanks to this totally innocent explanation, I know it is :)
That said using the word 'infect' seems to imply that copyleft licenses are a disease; this does not sound like a serious discourse argument.
https://en.wikipedia.org/wiki/Viral_license
Stallman doesn't like it, but RMS is renowned for the scope and breadth of things he doesn't like.
To say that something "viral" can "infect" something else is the natural extension of the metaphor. I can see not liking it, but it doesn't scan to me as unserious or in bad faith to say this.
Edit: this kind of language goes both ways between copyleft and permissive camps in FOSS circles. I see objections to permissive licenses phrased in terms such as "improvements to MIT code can become locked away inside proprietary software", which only works if you consider proprietary software to be a prison, when this is in fact an intended outcome of permissive licensing.
Is there a standard way to put it that doesn't have negative connotations?
Depending on how modularly Second Climacs combines McCLIM into itself, it is possibly LGPL licensed or, at minimum, released under the Github terms of service: view and fork. I am not in a position to assess the level of integration Strandh has opted for.
The Gnu Public licenses are designed to proscribe the minimal license features required for works combined with those released under GP licenses.
No, my assessment is not a serious argument, it's an incorrect puzzle solution, during lunch.
In any way, they should attach a license.