[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is Elisp slow?

From: 조성빈
Subject: Re: Why is Elisp slow?
Date: Fri, 3 May 2019 10:06:56 +0900

I became curious after reading your email :-)

Since implementing a new language/byte interpreter (Guile, for example) is 
hard, and making it fast is harder, why doesn't Emacs leverage the Common Lisp 

For example, (since CL and elisp’s syntax is mostly similar) can’t we implement 
Emacs based on CL (looks like there were ongoing efforts before like Climacs, 
Hemlock, etc…) and expose elisp functions in a special package named ‘elisp’?̊̈ 
It would allow elisp compatibility (by running all elisp code in the special 
elisp package) while giving package writers access to CL libraries. Since 
legacy cruft can go inside the package ‘elisp’, CL emacs APIs can 
remove/redesign some old APIs and remove technical debt. This would also 
greatly accerlate Emacs speed as CL is super fast especially when using with 

Are there any reasons (that I do not know) why CL was not considered or was 
considered but rejected as an elisp alternative? 
Are there license problems to build on previous attempts?̊̈ 

IMHO building emacs on CL would be a wonderful idea... and would fix many 
problems that current Emacs have.

> 2019. 5. 3. 오전 9:44, Ergus <address@hidden> 작성:
> WARNING: This email has plenty of personal opinions.
>> On Fri, May 03, 2019 at 08:39:43AM +0900, ????????? wrote:
>>> Probably (I have a dream) if someone decides to develop a new emacs in
>>> 2019 most of the functions and API will be made in pure and clear C (or
>>> any other compiled language), with a full C api that gives the same
>>> access level than what elisp gives in Emacs today (with C lists, arrays
>>> and structs), so it will be not only faster but also simpler to extend
>>> it with other languages like Scheme, Python, Lua, C++, rust and so
>>> on. (There are modules projects going in that direction) And the editor
>>> don't even need to provide a compiler or interpreter for them. (there
>>> will be Guile/gcc/python and so on for that)
>> This, very much sounds like Guile Emacs. Anyone knows how Guile Emacs
>> is doing????? It???s very much looks like vaporware these days :-(
> Yes, that is the dream (at least the closest we have ever been)
>> Is upstream considering Guile Emacs as a valid solution?
> I made a similar question some time ago and the answer is that there is
> not action. :( In fact there is not too much action in
> Guile's development .
> Not many projects feel interested in Guile because the weak support it
> has so there are few users and few developers (But also because
> Lisp-like family languages (common Lisp, Scheme and the others) are a
> museum piece for young generations that are more used to Python, Ruby,
> javascript, and most of OOP (also because there are more jobs with
> that))
> Actually I think that these days will be easier to find new C/C++
> developers for emacs than Lisp developers. Lisp and Scheme are
> beautiful, but they require a different way of thinking and a lot of
> time (own experience, I am just starting with it.) One reason why I
> can't convince my friends to use Emacs is actually how Lisp scares them
> ((())()'()).
>> Is there any development ongoing? (Official or not?)
> I don't think so :( :( :(. It will require that some core emacs
> developers feel more interested in implementing this, because it is a
> lot of work... (specially to do it right and keeping the so sacred
> backward compatibility) These days only few people know the core parts
> of emacs for such a task.
> Having Guile as a dependency will grow emacs size significantly
> and using it as an external dependency (not usually the emacs way...)
> will require to port Guile to more systems (AFAIK). BUt such desition
> could benefit very much both projects.
> There are even some emacs ports to rust (remacs) but they still have the
> elisp as the core languaje. Because most of the code and functionalities
> are already in elisp so changing that will be like reimplementing all
> emacs from scratch.
> (Some time ago there was a lot of effort and time invested in porting C
> functions to Elisp in emacs)
> So with our actual emacs maybe the JIT or the Lisp->C source to source
> is actually the more reliable option in a possible (realistic) future.
> Personally I feel the Lisp->C compiler feels like the faster and more
> robust solution for me, but it will create a dependency with
> binutils... which is for multiple reasons undesired.
> The alternative JIT may be based in libJIT which is not very active
> either... and has serious issues/limitations that has not been solved in
> years.
> [1]
> [2]

reply via email to

[Prev in Thread] Current Thread [Next in Thread]