From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.help Subject: Re: Why is Elisp slow? Date: Fri, 3 May 2019 15:32:29 +0200 Message-ID: <20190503133229.iyyjxzotdfgoslvj@Ergus> References: <87sgtwboot.fsf@telefonica.net> <83muk4obfd.fsf@gnu.org> <20190502214006.4fdsinp7u5xuqvdv@Ergus> <20190503004416.xfuzzucflp6bxpuz@Ergus> <20190503103644.63lccjehmzulaojn@Ergus> <456EE4D4-F542-4F6A-B146-E6B9D72AE93B@icloud.com> <20190503125132.xyats445fsthdw7l@Ergus> <96FA6D13-0AEF-4353-9736-8E56195AD0E2@icloud.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="12984"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: NeoMutt/20180716 Cc: help-gnu-emacs@gnu.org To: =?utf-8?B?7KGw7ISx67mI?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri May 03 23:18:10 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hMfZC-0012u5-QV for geh-help-gnu-emacs@m.gmane.org; Fri, 03 May 2019 23:18:07 +0200 Original-Received: from localhost ([127.0.0.1]:40802 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMYJB-00014R-0P for geh-help-gnu-emacs@m.gmane.org; Fri, 03 May 2019 09:33:01 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33744) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMYIr-00013h-Vx for help-gnu-emacs@gnu.org; Fri, 03 May 2019 09:32:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMYIq-0008NH-BW for help-gnu-emacs@gnu.org; Fri, 03 May 2019 09:32:41 -0400 Original-Received: from sonic302-20.consmr.mail.ir2.yahoo.com ([87.248.110.83]:40355) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hMYIq-0008Ip-0Y for help-gnu-emacs@gnu.org; Fri, 03 May 2019 09:32:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1556890357; bh=qniTolX13nR5FVFpWug9F+9RLbCxXR9nCgA693HFgaA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=jREShxwaELfix+F/oXULDl08/k8AnA8rGJqz9J6xFcnkBS4o5ANmi2bYuWDYsC32ifyv3chXYM9JsuRcAGtxtPYtlgicGCpcoX/TDSYXkCM6/XxKIjE4cxi1ULkZi8+vjO2Onx912W615l4Ix+5MhDAi5PUIP2GC/wfIgfJ9iTwl5aBYgoF8k1CKWCzL20LsKP+Vhh6OKthm7cVUbvMEx3np+vOQ3SGEV7oB8xIiIAo08uh6swzNfGfrAs3fyMvL7DFN/+FsE62U7DUFCooBZFj0TMTBXxFlGgSgV2n20y/ZMt9I9JPNp/253y6K2LHb8f2L70a2jEReDb1NEdGQAg== X-YMail-OSG: sT6YP5UVM1md0AVK6nQaRvc1A0p5BLlVUwWVK9DoEA6pQkI64siaVLr4fo3sbbh TJhns5K_dvB5Y3d4s_puTVkEcnGvx4_bo.Ny36_a_43BgdULm1KFHJkh9Tn.NxtAzRpV4nxhsIA1 40EVo6tq7kiyYL.u0sBlm_0xY0BPEaCpGjE_mbIeUKUojN7zWRGRO6IQoPLOdOb4q32f.xBYTRMq q7uQrfmKoK5aAHkFR8pfb4U_8.sPBKR0c.X5almjMTkL_5Gtyostjd_QDEcgYMVAvf8V3DSPDRFd iVRY.AW2kDG3fZtuRGWhjsQJyLQWrpV45xTzry7Wp.Gz6.zOTE4Zr.M57ARXy20sqo_dwyv0wCU9 r4ijz8pGlZmRVHT1HKlC7pGjhPU9tIyLtq_0Clo9jHgOxniBxbqy8egMRZIqpLx8iM0ivz5kz_xn _z5YhGyWhFcz5HcdsZhwi08TPydurxWKRO7cTAzkI5hNFAjHf2y9D_84skPhEY3YMN2BLUeIjb0T NwVS7v5mQ01nBY5wBKTmgh9NHELCbjFq3T_2vmYDe57oil6Mh4xGrMODMJ9B10stw_bdf7FUzQD0 dX9fsuppF2STeUGLZnbSdtOce4TKMxFj.rapJWcATZR1TesBoCSg5meYq51UAw0xxIyrkGOSu1.S IIxndwsbQznGhvTco2OrZAXxEA5ctpX_a1KJHuzuUxFleYEmx2jkeBOiSp39ULPxg5PZCEkIcVoy Eu2PbSql5V0JPMu3FhtbcFRWHdKX371aWQGcuTlmV8kwlHAVWnaIlBOBA4ol4.R4daP334Po9Vvv 9H81ruNTPuwinCbGYRO4cJo48WyJwcg0Nwj3MM4jBl Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.ir2.yahoo.com with HTTP; Fri, 3 May 2019 13:32:37 +0000 Original-Received: from 84.88.50.33 (EHLO Ergus) ([84.88.50.33]) by smtp408.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID b51f0e2912bc5645e19800041d9353c6; Fri, 03 May 2019 13:32:33 +0000 (UTC) Content-Disposition: inline In-Reply-To: <96FA6D13-0AEF-4353-9736-8E56195AD0E2@icloud.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 87.248.110.83 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:120160 Archived-At: On Fri, May 03, 2019 at 10:16:32PM +0900, ????????? wrote: >Looks like the point of getting Guile Emacs recurs to: > >* How much Guile Emacs is polished(seamless integration with Elisp, full compatibility, etc..) Maybe here is the actual problem.. I actually asked Eli. >* How much Guile supports other languages such as JS or Lua The C api is pretty nice and easy. I have some code done on it. JS is a different beast. But having C it is straightforward to interface python and Lua. Actually the Lua C API is much more complicated that than Guile's. >* How much Guile manages to be fast It is decently fine and slowly is getting better. > >Guile Emacs was developed for at least 15 years or more, right? > >How much can Guile Emacs do these in current situation????? >Is Guile Emacs usable day-to-day? > The problem is maintenance and manpower. The emacs developers are very busy with bugfixes and there is A LOT of code to maintain/update/fix. It needs just a voluntary to do the work. I am fine with the C integration but all Lisp is still a bit esoteric for me. > >> 2019. 5. 3. ?????? 9:51, Ergus ??????: >> >> On Fri, May 03, 2019 at 08:52:06PM +0900, ????????? wrote: >> >>> The difference between Guile and CL is that >>> * Guile is arguably not popular and not used by many programs. I've never heard a program that is popular and uses Guile as an extension language. CL is, well, much more popular than Guile, and is used by industry-strength programs. >> >>> * Guile (which is a scheme) has a radically different syntax with >>> elisp (which means that to implement elisp in Guile, one has to hack >>> the byte code interpreter AFAIK). Elisp can be implemented inside CL >>> with full compatibility, which mitigates lots of problems between >>> interfacing between CL code and elisp code. >> >> But Guile is in fact developed in the gnu project, so there are the >> Guile developers (very few but they are) that could potentially >> provide and fix any issue. But also the strong part of Guile is not the >> language itself but the potential of the infrastructure. >> >>> * I'm pretty sure CL will be much, much faster than Guile. >> >> Probably, that depends of the compiler not only the language. >> >>> CL was optimized for about 30 years or so, and SBCL compiles CL all the way to native code, which is comparable to C. I'm not sure if Guile can do that. >> >> Guile has been also optimized (in spite of there is a lot of work to do, >> that's true) and yes, it can generate native code, but also >> bytecode. But it also offers a lot of functionalities to extend and work >> as a glue language which is actually most important in our days. >> >> At the end (in my opinion) if emacs wants to survive other 40 years it >> will need to start looking for integration with python, lua, C++, rust, >> Ruby and similar languages with a more "promising" future than common >> lisp. Because we really need to attract new developers with new ideas, >> visions and experiences... and 99% of programmers don't use any lisp >> like language. >> >> To make big changes we need more developers, that will not come if we >> don't have more users first. And those new users/developers can enforce >> the new changes looking at the future and not to backward compatibility. >> >> >>>> https://www.gnu.org/gnu/rms-lisp.en.html >>> >>> I read the link; it's a pity to not consider CL because it isn't "lispy" enough. >>> >>>> >>>>> IMHO building emacs on CL would be a wonderful idea... and would fix many problems that current Emacs have. >>>>> >>>> And create others, it is always a trade off. >>> >>> What problems would CL based Emacs can make? Can you show some examples? I am genuinely interested. >>> >> >> Dynamic scoping rules vs exical scoping rules in common lisp is just the >> first one I can remember, but maybe someone else will reply you with more details. >> >>>> >>>> Any way >>>> >>>> I have to say that comparing to other interpreters around the Elisp is >>>> not the slowest one I have tried by far. Of course it could be way >>>> faster, but some optimization like user code and provide new containers >>>> and datatypes in the library level based in C (and recomend them) code >>>> could potentially make more difference in real user extensions. >>> >>> Well, CL is as fast as C. >> >> But again, common lisp is just a language. Performance is more associated >> with the compiler you use. Cython makes python very fast too for >> example AND IT IS PYTHON!!!. The latest version of the GNU common lisp >> compiler (GCL) was in 2014... so its developement goes slower than >> Guile. >> >> If we had a native compiler for Elisp it could be as fast as common lisp >> (ideally). But in any case it needs to be something that goes embedded >> within emacs (otherwise emacs won't be emacs anymore). >> >> Think also in the licenses issues and legal consequences of such strong >> dependency for a key part of the editor. >> >> On the other hand it is true that in that case that will be a part of >> the code that we won't need to maintain if we rely on other packages. >> >> Let me say something. I am not opposed at all to switch to common lisp, >> (or scheme or python, actually I think that at some point it will be >> needed to change the core language for something more flexible) >> what I mean is that this specific problem is not a language issue, but the >> compiler. And I don't think that we can just copy the SBCL code into >> emacs for many reasons. > >