269 points · by rutenspitz · 12y ago · 156 comments
I am an old guy (professional Lisp developer since about 1981) and my age probably affects my opinion:
It would be a disaster to mess up the Emacs ecosystem. I don't think that Emacs/elisp runs slowly and since I have to use so many different programming languages anyway, needing to know a little elisp is no problem.
I don't care if elisp is not a modern language.
Way off topic, something that I have written before about: think forwards several hundred years. What will the software landscape look like? My bet is that there will be many ancient software systems that have been debugged to near absolute stability over the centuries. Sure new software will be written, but I bet there will be many very old and stable systems that will see little change.
Lots of people have written excellent code for GNU Emacs, but the implementation runtime hasn't improved that much.
Yes, it would be nice, but can you imagine the bugs that will happen while everyone works out the details of how to do it properly?
Calling Elisp functions and accessing Emacs data types (buffers, windows) from multiple threads is another issue; if you don't want to bother with it then don't; you still get all the other benefits of being on Guile. (Calling to any Guile module agnostically as if it were an Elisp library (including, say, Guile's OpenGL module), having an FFI, getting JIT or AOT native compilation in the future, etc.)
It's better to create slight incompatibilities gradually (so that packages can catch up in some humane timeframe). I could imagine the ELisp runtime being intertwined with the Emacs C code badly enough that making radical changes to it would seem "impossible", just like in the CPython codebase it is considered impossible to ditch GIL and modernise the code. But those kind of comments are often excuses because people are lazy and it's nicer to write new code.
Guile is already a general VM meant to support many different languages, not only Scheme. I think it's a very clean solution to use Guile's efficient VM, and I don't think minimalistic is a useful criterion.
Several years ago he asked me about the possibility of my releasing my out of print Common Lisp book (published by Springer-Verlag) under the GNU documentation license. I would have liked to do that but I couldn't find my manuscript word processing files.
That's not really true, is it though? Scheme '(), #f and so forth...
>Guile can run elisp already
Guile already interprets Elisp.
Elisp can run unmodified on Guile.
Guile, the virtual machine, contains a front-end for Emacs Lisp.
المكر ينفذ أصلا إيماكس اللثغة.
Guile jatorriz exekutatzen emacs Lisp.
It is true there are no compatibility issues because Guile is an implementation of Emacs Lisp.
Of course there'd be no point if emacs were fast enough, but there seems to be a significant number of people who feel it's not.
I love lisp but I don't see much interest in it and have had coworkers tell me it keeps them away from emacs. Which is a bit sad...
Considering how intricately it is integrated into a lot of people's lives this is silly.
It's fine sitting on a an academic pedestal but some of us have to live in the real world.
Also I'm not sure how the maintainer failed to address your suggestion as it seems the most logical... which makes me worry this is an academic exercise.
Besides the point... almost nothing will be achieved by making elsip faster. I sometimes write macros to work on GBs of files and yes, it isn't fast... but if i cared about speed i'd be shelling out to cli tools to do the work anyway.
Makes. No. Sense.
Fork it if you must and leave the rest of us alone.
It can boot Emacs on the JVM and take simple commands, but not much more. It's my intention to eventually revisit this project, but not sure when.
Cool -- my '90s hacks are in demand! I added threading support to Guile and wrote libffi back in the 90s.
Emacs is not a scriptable editor. You don't "script it" or "write plugins for it" in a classical sense of those terms. You reprogram, extend and augment a piece of running code on the fly. Seems similar, but feels different. Emacs is a live Lisp image with text-editing features bolted on top. It's basically backwards of how a typical editor/IDE is implemented.
Therefore, it matters what language is used as a base. People mentioned Lua or JavaScript, but they are nowhere near useful enough for the task.
Therefore, it feels to me - and I believe to many other Emacs users as well - it matters that there should be one base language. Emacs as an Elisp system with text editing capabilities feels like a whole. Everything fits together nicely and interacts with each other. It is elegant. Aside for inviting maintenance upkeep and general chaos, making Emacs "run" multiple languages at the core is sort of like shattering its soul into many pieces. I don't want to have an editor with multiple-personality disorder.
Imagine you're writing an executable in three different programming languages mixed together at the same time. That class is written in Common Lisp, but it's child classes are written in C++. And exception handling everywhere is written in Python.
The sheer mental effort to make all of these work in a conceptual harmony inside a single program would be enormous. And it would still feel weird.
That is what multiple-extension-language Emacs would feel.
The main difference is that the implementation language is a dynamic language, which is also mostly the implementation language.
That's similar to how some other IDEs work like Smalltalk or Clozure CL on the Mac. But those are not focused on implementing an extensible editor. Those are IDEs with editing features.
For example, I have completed the emacs tutorial, I've even read the infos info tutorial and several info pages regarding emacs and still don't know much about ELisp. I downloaded the official emacs manual, which is more than 1000 pdf pages and plan to read it in the next 10 years.
I love the editor, I want to continue to program in Emacs but Kate seems to be much simpler, elegant and quite functional.
It took me a few hours to learn enough Elisp to customize .emacs, add custom macros, and start using defadvice to wrap existing commands with extra behaviour, like preserving the selection for text replacement in a selected block. I even went as far as writing a macro that could use defadvice to generically preserve the selection for any other command on the second day of using emacs.
A bigger hurdle was learning the Lisp jargon, so that I could find the correct function to call when searching for it, whether in emacs itself, or online. But once I knew about the point, that the selection is called the region and is the text between mark and point, that files are called buffers, that open is called find, etc., it was pretty smooth sailing.
It's fairly trivial to find the source for an arbitrary elisp function - just C-h f <function-name>, and follow the source link. Plugins like helm (dynamically filtered list searches) make it very easy to find relevant functions too.
Elisp has a couple of features that make it work well as an application extension language: dynamic variable scope and function advice are two that are fairly unique to Lisp (technically, Javascript has dynamic scope via the eval function, but it's not usually a good idea to use it). These things make it easy to tweak behaviour from the outside.
However, contra other people's opinions, Elisp is not fast. It is slow, very very slow, compared to efficient languages. My startup time is just about tolerable on a modern machine, but not tolerable enough to stop me starting emacs --daemon every time I reboot. Scrolling through large files with line numbers enabled is slow, and the UI has a few milliseconds of lag for almost every non-trivial action. Dynamic searches need very noticeable debounce delays for list refreshes or otherwise things get unresponsive.
Sure it would bring new blood. It will also drive away old one; people, for whom Emacs is a Lisp runtime with a text editor bolted on top of it. Switching Emacs from Elisp to something else feels like selling its soul. Adding parallel support for JavaScript and bunch of other languages feels like turning it into a Frankenstein monster.
While I agree with most of your statement, having Emacs switch/transition/support another, more modern form of Lisp like CL surely wouldn't count as selling your soul.
On the contrary you would stay true to your ideals (a Lisp-runtime with an editor) except now the Lisp runtime just got a lot better.
I like Emacs as much as the next guy, and I have dabbled some in Elisp. I can make due. But I sure as hell wouldn't mind getting some of that neat stuff the CL-guys are getting.
I couldn't find any progress report after http://tromey.com/blog/?p=751 so I guess the project has been abandoned early.
(They seem very skilled, don't be fooled by the fact that it's GSoC; no idea what the skill level of people who take part in that usually tends to be.)
Look, neither Common Lisp nor any Scheme implementation are exactly topping the charts in popularity these days. This should be about the technical merits of the choice, because I'm pretty sure Emacs Lisp both has more code and more programmers (both represented in the forms of small scripts we've shoved into scratch and evaluated) than both.
GNU has had two common Lisp implementations under their umbrella at least since mid 90s (CLISP (of Viaweb fame) and GCL (of Maxima fame)), but due to RMS' hate of Symbolics and Common Lisp, all of the effort was invested into making Guile run properly (which took them 25 years and still nobody is using it) and the two Lisps were basically orphaned.
The latest effort of guile-ifying Emacs is more pushed by the Guile guys, in order to attach themselves to an already existing killer app (emacs) and to basically force more and more people to use Scheme, because nobody is doing it voluntarily.
The Emacs guys, as you see from the post, are not _really_ excited about the idea of switching to another _language_. They want FFI, multithreading, etc, but they do not necessarily want Scheme. Actually they dont want Scheme at all, adopting Scheme would be just a price to get FFI, etc.
Of course the proper way would be to go Common Lisp. Elisp is and has always been a subset of Common Lisp, and they've had a Common Lisp compatibility layer for decades, and a lot of packages use it. The problem is simply highly political. You'd have to confront RMS, and you'd have to finally get rid of Guile's "official GNU extension language" status.
Scheme of course provides `fluid-let` and Common Lisp also allows for dynamic binding
> all of the effort was invested into making Guile run properly (which took them 25 years and still nobody is using it)
I think the first release of Guile was in 1995... Did I misinterpret your point?
A price some of us don't feel like paying. It might be irrational, but when thinking about switching Emacs to Guile, I feel it's like proposing to sell its very soul. A Guile-powered Emacs would feel... weird (the it-walks-and-talks-but-when-you-look-into-the-eyes-there's-noone-home p-zombie kind of weird) (and don't get me started on ideas like "let's script Emacs in Javascript", like Emacs was a scriptable editor like the others...).
Strangely, I get less of this feeling with Common Lisp, maybe since Elisp is closer to CL than it is to Scheme.
AFAIK, Guile is not used much beyond a few random projects. Maybe I just don't know Guile, really. Maybe it has a decent implementation afterall.
However, I would have gone CL. There are several "emacs-like" editors implemented in CL:
I would argue that implementing ELisp support in Climacs is actually easier, so we can run all the elisp stuff we already have, and slowly move on.
Guile-Emacs runs Elisp, not Scheme, and Elisp will remain the main Emacs language for a long time. Using Scheme will become a possibility and you can bet on some people starting it immediately, but nobody is forced.
Guilifying Emacs is not "pushed by the Guile guys," it's always been RMS's desire.
The "Emacs guys" is a rather large group of people, which is essentially a superset of "Guile guys." Some of them would love Scheme, others wish it was CL instead, others want to take Elisp on its own path to evolution. Guile offers an evolved Elisp, and Scheme as an addition. And of course One Day someone might sit down and implement CL for Guile too, you never know.
GCC, GDB, GNU Make, and some other tools can be extended in Guile. The Nix-derived package manager Guix which forms the core of the upcoming official GNU distribution is also written in Guile. It's becoming quite "relevant" on its own terms. But sure, Emacs would be a huge boost. They're both GNU software so it's a logical come-together if you ask me.
We can dream.
It is far easier to get a minimum product out when the eventual goal is the stars.
An alliance with Racket would be an interesting option from the standpoint of language communities.
- The community's core is [ relatively ] vibrant.
- The community has more than a passing interest in
developing development tools.
- The community is exceptionally stable because
its members are often linked to academia.
- It copes with endless September really well.
- Its vision of open resources overlaps GNU
somewhat.
- Programming language problems are right up
the Racket community's alley.Two parties can disagree on 99% of their beliefs, yet still find ways to come together on the 1% that they happen to agree on. These parties can work together to each others' mutual benefit, and the world is better for it. But nooooooooo, not RMS. He has to demonize anyone who is not 100% in lockstep with him on everything, to everyone's detriment, and throw his "adversaries" into a trash bin labelled "Others".
It's a self-fulfilling prophecy. It's easy to drive people apart in the name of some ideal. It takes actual leadership to drive otherwise separate people together to actually accomplish something. I have wished for so many years that RMS would care enough to provide the latter instead of the usual former.
Right there is the crux of the matter. RMS is only focused on the ideal. To him, "accomplishing something" is only relevant when the accomplishment is free software that can't be locked away in proprietary codebases.
Viewed through that lens, his actions and beliefs have been remarkably consistent for the past 30 years.
He really grates on people who don't share his idealism, and he's looked up to by people who do. He can be quite polarizing, to say the least.
The thing is that RMS doesn't want to accomplish something in the generic sense, he wants to accomplish something in the specific sense (and that something is "reduce, and ideally eliminate, the production and distribution of non-free software").
People get frustrated that RMS's actions are incompatible with the specific things they want to acheive, which are often superficially similar goals to RMS's, but different -- very commonly, something like "promote the continued development and distribution of free software", either in general or some particular piece of free software.
This isn't really so much ideology getting in the way of shared goals -- its not that RMS lets his ideals for means get in the way of achieving shared goals -- its a fundamental conflict of goals preventing cooperation.
When I have seen RMS labelled people as the "Others", it been when someone has done actions that is direct detriment to free software. If your goal is to build something, and someone else comes with a hammer and start tearing it down, I will give you some permission to be annoyed.
Still, I'm not really sure that it's very ironic, since his main beef is companies taking open source code and delivering closed source proprietary binaries to their end users. The whole GNU philosophy is about being guaranteeing that end users (or agents acting on behalf of end users) can always have source code with their binaries. BSD doesn't give you that guarantee. GPL does.
A bsd project could simply add to the license that people should not use patents, legal threats, or hardware tricks in order to restrict people, and I would see that as equivalent as making the whole work under the GPL. The BSD license itself is not a problem, but people who would abuse the license in order to add restriction is.
Thus, BSD products can use GPL code, but they can't enable those who want to add restriction to the BSD product.
Very well.
The governments and states of the world has agreed that any written or creative works shall have owners, called “copyright holders”, who can decide who, if any, other persons shall have the right to make further copies and/or make modifications of those works. This legal arrangement is made with a few specific business models in mind, but those business models originate from the age of printing presses, and this legal arrangement is not conducive to free collaboration and improvements of the works in question, as is the expected norm in, for example, science. Some people who are, for this reason, opposed to this arrangement, noted that this arrangement is, incidentally but necessarily, giving the authors quite a lot of power, and so they constructed the GPL. The GPL is a specific use to which authors can, if they wish, put these powers they have been granted. The GPL is meant to enable the above-mentioned collaborations and improvements without having any other deleterious effects, like making the authors feel like they are being (or could be) exploited. It is quite ingenious, since if you deny the right of authors to apply the GPL, you deny the rights given them by the legal arrangement of copyright.
The specific way in which the GPL preserves your freedom depends on the work in question and your role in the situation. As a recipient of a work to which the author(s) have given you a license to use the freedoms granted by the GPL, you are permitted to do many things which would otherwise have been forbidden by copyright law. An an author, the GPL does not make you any more free (since copyright law already gives you absolute power), but the GPL is a tool which you can use to ensure that all users of your works are permitted to collaborate on and improve the work further, which might give you the incentive to produce and release more works.
Much of the problem is already working and actively being developed and hardened against a variety of applications. The runtime system and JIT in particular. Also some existing work in functional languages using LLVM, including lisp.
But RMS has already shot me down on the licensing issue. I'm suggesting dotGNU next. If you can't directly leverage a big project, why not feed off its good ideas in a clone? :-)
Besides Emacs being a very nice programming (and programmable editor), this is one the key features which keeps me from even considering other more "modern" options.
In my Emacs days, I've never really used the terminal version. Multiple frames, yay!
Also, if you have to access the remote machine through a low-bandwidth line, the terminal version at least feels more efficient than using TRAMP from my workstation. For most purposes, the GUI does not offer that much of an advantage.
> Why not start with Hemlock or CLIMacs atop a CLIM implementation,
Why?
Particularly nice would be thread support.
I'm pragmatically indifferent as to whether the backend is scheme or common lisp (I'd personally prefer Common Lisp, but whatevs).
Then I spent about 5-10 years using that platform as my IDE.
Guess what... Last year I migrated to IntelliJ IDEA and won't EVER migrate back. It's kind of sad... but IDEA is insanely awesome by comparison.
On a more serious note, could you elaborate a bit on how IDEA is "insanely awesome" compared to Emacs? What do you find more useful/enjoyable in the IntelliJ IDE?
is he the main emacs maintainer? in other words, how seriously should we consider this email?
;; valid elisp and cl, same result in each
(defun foo (bar) (+ 1 bar))
(defvar foo 4)
(foo foo) ;; makes perfect sense in CL and elisp,
;; but none in scheme
;; syntactically valid scheme, won't work on the last line
;; which translates to (4 4) and so makes no semantic
;; sense.
(define foo (bar) (+ 1 bar))
(define foo 4)
(foo foo) ;; will break in scheme because foo is now 4
;; and 4 can't be applied as a function
Barring issues with lexical versus dynamic scope and a few other things, a fair amount of elisp code and CL code will run in the other language (if you don't account for the differences it may still run, but the output will be different between the two languages). You can even (require 'cl) in elisp and have a decent amount of CL functionality added into your emacs instance.Simple things like function and variable definitions have to be changed to get even basic code (like the above) to half-way work in scheme from elisp.
RMS especially did not like the addition of an object system, lexical binding as the default and keyword arguments. Those three things are quite central in Common Lisp. Emacs Lisp has no object-system in its core, lexical binding has only recently added and it has no keyword arguments.
Scheme is quite different from both. But Guile is a very special Scheme dialect with lots of enhancements, which makes it as large as a Common Lisp implementation. I would expect that code sharing between Scheme implementations is more difficult than between Common Lisp implementations.
(require 'cl-lib)
(cl-defun foo (&key a b c) (list a b c))
(foo :c 3 :b 4 :a 1)Common Lisp tends to follow a procedural style (if/switch statements, for/while-loops, lots of side-effects, etc.). CL also has the Common Lisp Object System (CLOS) which is a very powerful OO implementation.
On the other hand, Scheme tends to follow a more functional style (recursion, map/reduce, continuations, minimising side-effects, etc.).
ELisp tends to be quite procedural, which is why it's closer to CL than Scheme. Also ELisp uses dynamic scope whilst Scheme uses lexical scope. Lexical scope has only been (officially) supported in ELisp since Emacs 24 (the latest major version).
Switching to Guile DOES NOT IMPLY switching to Scheme. There is 0 need for compatibility layer or what have you with Guile.
Guile is a language-agnostic virtual machine. It has an implementation for Scheme, but also one for Emacs Lisp. Guile already runs Emacs Lisp faster than Emacs: https://lists.gnu.org/archive/html/emacs-devel/2010-04/msg00...
The main issue the Emacs developers seem to have with Guile is that it will give developers choices as to whether to write Emacs extensions in Scheme, Elisp, or Javascript/Python/Whatever else Guile supports.
I don't understand why they care? Why would the Emacs developers feel the need to debug compatibility if someone else wrote a shitty extension? The onus would be on the extension developer to fix the extension.
So if we go for Guile-Emacs, we'll be stuck with Guile, i.e. we'd
have (old and new) packages that use Elisp, new packages that use
Scheme, maybe yet other new packages that use, say, Javascript (or some
other language support by Guile). That would make the work of Emacs
(and GNU ELPA) maintenance harder.But I do not see how you could bolt Lua on to GNU Emacs. You would have to start from scratch, and that would be a lot of work. And even then, there is the fact, that GNU Emacs is already well-established, has a very loyal user base and is - by and large - good enough, even great for most purposes, so even if you wrote LMacs or whatever one would call it, you would probably end up with, like, a dozen users or so. (IIRC the Zile project, a small emacs-like editor, has tried this, but I do not know how far they got with this.)
- It doesn't have macros.
- It doesn't have integers.
- It doesn't have arrays.
- It doesn't have lists.
- It doesn't have dynamic binding.
Also, its 1-based array-like hash tables are just ecchy.
I like Lua; it's cool for what it is (and in fact I'm currently writing some hobby code in it), but it's not Lisp (and in fact my current hobby code is Lisp in Lua…).
The word "useful" is too subjective to be useful here.
> - It doesn't have macros.
There's MetaLua for those who truly think they need macros. But in reality they're just a convenience.
> - It doesn't have integers.
Lua 5.3 is getting them.
> - It doesn't have arrays.
It has tables that function perfectly well as arrays.
> - It doesn't have lists.
Singly-linked-lists can easily be created using tables.
> - It doesn't have dynamic binding.
Thankfully!
> Also, its 1-based array-like hash tables are just ecchy.
This is purely an imaginary problem. Personally, I prefer 1-baed indices.
> I like Lua; it's cool for what it is (and in fact I'm currently writing some hobby code in it), but it's not Lisp (and in fact my current hobby code is Lisp in Lua…).
So, your favorite language is Lisp? Great. Except, favoritism and bias aren't really compatible with truly constructive criticism.
I think that's why there are so many attempts to built new extensible editors in other languages, like Eclipse, or that Ruby thing there once was (probably still is), or the Chromium/JS monster that was on HN recently.
I haven't yet found an editor I'm really happy with, so if I ever have time, I'll probably write my own as well. I'll lose the Emacs packages I don't use or even know about, but if you haven't bought into an existing ecosystem, that doesn't really matter. I'm unhappy enough with the existing systems that I don't mind throwing them away for something different.
But I guess that Emacs on Lua wouldn't be Emacs anymore. That's the main objection.
[1]: https://github.com/neovim/neovim/wiki/FAQ#lua-and-vimscript-...