I also think it’d be a bad idea to make it too easy to write emacs extensions in anything but a Lisp, because that would fragment the ecosystem. If we’re going to replace elisp, it should be with a better Lisp, not with a lesser language (e.g. Lua, Python, Ruby … whatever).
The great thing about a JIT is that we get a speedup without changing the actual implementation language or fragmenting the ecosystem.
Take that, put a little work into it and one could presumably replace the C core of Emacs with Common Lisp.
> [...]
> So we started to make Scheme the standard extensibility language for GNU. Not Common Lisp, because it was too large.
I'd hardly say he hates it based solely on that essay.
I kept keyword arguments out of TXR Lisp. That is, out of the function call mechanism. It doesn't seem like a good idea to deal with a dictionary like mechanism in function calls.
I invented something called "parameter list macros". A parameter list macro can be written which adds keyword argument ability to a function (and such a macro is provided). You can do (lambda (:key a b c -- x y) ...) and now you have keyword parameters x and y. They support the (sym dfl-val present-p) syntax and all. The :key parameter macro implements them via a source transformation. :key is able to rewrite both the parameter list and the body of the function to make this work.
One reason Common Lisp programmers use keyword macros is that there is no way to invoke the default value of an optional parameter which precedes another optional parameter to which an argument is being specified. If a function has optional arguments X and Y, the caller cannot default X if it specifies Y.
I fixed that in TXR Lisp: the symbol : (colon) can be passed to an optional parameter to activate its default value. So if a binary function f has two optional parameters we can invoke (f : 3) to default the first optional, and specify the second one as 3. This special feature is only supported in function calls, not in macro/destructuring parameter lists.
That : symbol also serves as the &optional keyword, separating the required parameters from the optionals. It harmonizes with the consing dot that demarcates the &rest parameter: (lambda (x y : z w . r) ...): x y required, z w optional, r rest. The : symbol is nothing more than the symbol named "" (empty string) in the keyword package. It's provides a very useful third value to the nil and t duo. Common Lisps have this symbol! Unfortunately, they tend to print it funny back at you like :||, and neglect to get any mileage out of its notational convenience.
As for those member functions, I provide a memq, memql and memqual that use the three different equalities. The more general member function takes a key and test function, but not as keyword arguments but positional optional parameters. If you want the default test, but custom key: [member foo bar : mykey].
But in our actual world, it's also legal but publishers may play dirty and somehow claim rights because you published something based on their edition?
Just thinking out loud.
maybe not totally, but mostly. Beyond that he does not care about it and isn't interested in it.
I code in C regularly, yet I do not care and am not interested in C after C90. Only some library features of C99 and that's about it.
Stallman's concepts of what is Lisp, how to use Lisp, how to implement Lisp, were formed long before Common Lisp.
If you're in that position, it's easy to have allergic reactions to requirements you don't agree with.
Maclisp and its successor Lisp Machine Lisp, were probably his biggest influences. Emacs Lisp is based on Maclisp - without the features of Lisp Machine Lisp like keyword arguments, Flavors as the object-system, ...
Weren't people saying the same about python and Java long ago?
How do you arrive at that conclusion?
> Indeed, elisp’s weaknesses are IMHO mainly where it’s most akin to Scheme (e.g. its flat namespace)
Racket at least wasnt flat iirc, is guile scheme?
> The great thing about a JIT is that we get a speedup without changing the actual implementation language or fragmenting the ecosystem.
Agreed.
> Weren't people saying the same about python and Java long ago?
I spent roughly a decade as a professional Python developer, and in retrospect I’d probably agree that it’s not well-suited to large applications. Why, exactly, is for another discussion.
As for Java — it’s certainly not meant for building small ones!
> How do you arrive at that conclusion?
The same way that the Scheme committee did, when they came up with R6RS: by trying to use Scheme for large systems.
It lacks features which aid building large systems (e.g. namespaces); it lacks features which enable building industrial-strength systems (e.g. the Lisp condition system or CLOS); it has features which make code more complex and tend to hinder performance (e.g. call/cc); and it even has a broken feature (dynamic-wind).
Then there are things like: conflating functions, variables & all other names; breaking NIL into NIL, () & #f. Those are partly a matter of taste, but I think also an indication of Lisp’s pragmatic nature: in practice, doing things the Lisp way is better, even though in theory doing them the Scheme way is.
> Racket at least wasnt flat iirc, is guile scheme?
Racket isn’t Scheme anymore. That’s not a bad thing, and indeed Racket is pretty amazing. I wish that the same amount of effort had been expended making Lisp better, but everyone’s gotta scratch his own itch.
The only thing missing is really the condition system, but that could be bolted on (that is the correct term) using continuations (preferably delimited). There is even a suggestion for r7rs-large to include them. I hope it gets voted in.
The reason for guile Emacs is that guile is the official extension language of the GNU project. It is a very capable implementation, and the elisp implementation is a lot cleaner than the one in Emacs.
You would also gain a lot of features not available in elisp. proper threading (with both pthreads and fibers, delimited continuations, and much more).
Not only that, you would get a runtime for elisp that works outside Emacs. Imagine being able to write programs and just load guile-org-mode and be able to script the org process without invoking Emacs.
I’m sorry to be that guy, but did you ever try it out for yourself?
Just starting Emacs took as long as a full regular Emacs elc-build, if not longer.
So not exactly faster by a universal standard.
It doesn’t take much to terminally derail an effort driven by only a single contributor.
Guile itself is making huge progress. There's ongoing work for JIT compilation as well. Andy Wingo drives this work. And he brings a lot of experience from work on the V8 Javascript engine.
I see no technical reason why guile-elisp should be any slower than normal elisp. It's just that some of the optimizations have not yet been put into place. After a switchover all the improvements from Guile will come for free in the future.
See the branches named "master", "lightning" and "wip-elisp" here: http://git.savannah.gnu.org/cgit/guile.git