by fusiongyro · 8y ago · 0 comments
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.
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.
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.
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.
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
It doesn’t take much to terminally derail an effort driven by only a single contributor.