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: Thu, 2 May 2019 23:40:06 +0200 Message-ID: <20190502214006.4fdsinp7u5xuqvdv@Ergus> References: <8636tfocyl.fsf@zoho.com> <20190502075617.GA18331@tuxteam.de> <874l6d3ylg.fsf@mbork.pl> <20190502131827.GA28987@tuxteam.de> <83k1f8q39o.fsf@gnu.org> <87woj8bqho.fsf@telefonica.net> <83tvecocvv.fsf@gnu.org> <87sgtwboot.fsf@telefonica.net> <83muk4obfd.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="66083"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: NeoMutt/20180716 Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu May 02 23:40:38 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 1hMJRU-000Gz9-AR for geh-help-gnu-emacs@m.gmane.org; Thu, 02 May 2019 23:40:36 +0200 Original-Received: from localhost ([127.0.0.1]:58882 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMJRT-00075a-Bz for geh-help-gnu-emacs@m.gmane.org; Thu, 02 May 2019 17:40:35 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37310) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMJRA-00074T-VQ for help-gnu-emacs@gnu.org; Thu, 02 May 2019 17:40:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMJR9-0002ia-NG for help-gnu-emacs@gnu.org; Thu, 02 May 2019 17:40:16 -0400 Original-Received: from sonic314-20.consmr.mail.ir2.yahoo.com ([77.238.177.146]:37839) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hMJR9-0002h0-Hn for help-gnu-emacs@gnu.org; Thu, 02 May 2019 17:40:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1556833212; bh=1fK5rNGXrylzgv63fDoGkWoNwbJXMmrUMgZed5LpFf4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=dzdw5TuxlBA6rvcoHAbjKmYSKPGZKpPa+vRsovOuWNiM8mA/xiKnFrY1D7eXPi9utWe71+VvJ8+OJ0EYtl7DfCm0XuR/001kUwv97YUXY89RqP77Cm1kN0eREUtIa5xu5chZ89HuSyn0E+vQ8H8/HrjMnIX3Mf3EGTOZ6EDn8ZGQt7W9g2sJ2LzVwgj0M3fczuX/jnEaHmLhLeBN9ClfGZNXBiPoQRs6ASKe1+taai+zKEXctfwrq+QEs7wogEZbupmrUY2KCPZsDiPt/kw589jyHwGAfrT1doNoToT0zlEZdeEHKweKfekLk/7c8VJ4V5vWhJA9W3Hb1tN+1R1IHw== X-YMail-OSG: M1UzAUUVM1nVe80ZhwzPjaDzzkIhvq3MPh5bX4AOTNlcs3zyW62vp7i.xokmNi3 Gl9P_gGPKAAWJn0bFE6FpE.7sea5ha5aaDehtzEgDRf6XmlXQlTlthz8ZzCvO3MJRYV5Vz63SC4O hmSEYyNPNsspcK6Ils4Zrpl5IKMbIraCKOpVGXTjlUhvfy7ALAPoGy9kh_xjb4rZ4Fpt8rUxfebY Y8Dyrv5seh.rMi6CP3CQPNKr2.ydVnjE9eJL2zM6jxpLPEcfPYERQHnNLNOodl.irS3a2NgD9Dn4 FFqToxLt1I6wB4oCuYAeSEK7_1p8XKtkQbdC9gVa1CVYeUcNF8c6cNTz9BO8zi4mIkCEzD77IuPg N2Wu6zZkbhCx60Mov3tMInWgVIptgc1XYDetxe9eV.1Za_WsEChdlpyGaqMxQ5uUsrrIIB7HUf4m Tnu54WGv79B1YdDUA4DF3ZwA9RL6M2UBRzNVe1pM1coQfgHc_NA7UJuTv7cc7m6zW9J4JLjAVW1o 5AcqiX_B_pnptRyltzt7Lv9MXC1fcuGELAknfUYQ6A2qTlzTE3gW.em779MgukgTWCeJzWcpZdBF MaBVJhOdipSD1fTPKLDkBUkJWbW.PA31nkjzKwzuqaTj9uw3mkmb9I41TbHvq2E1fPeu.1AJi6AP bEf.sV2RRe15PUmZJ_sFtYQM4Bi6NeTbevwqcFlewOXgOWQ4pET0wV6u0KL7budAEDIdBX5afhlk T60XHc0lTkK6VWqB0atIVh0S.MayxHbdfLYyR._sud_39MieLKOgonvSDMD7RjmkF1gU0Z3hl2GF PMTBHmnUMNgwxjMMR7_i5QqVr9fSjm.F1yF6IjvAej Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.ir2.yahoo.com with HTTP; Thu, 2 May 2019 21:40:12 +0000 Original-Received: from 2.152.205.184.dyn.user.ono.com (EHLO Ergus) ([2.152.205.184]) by smtp415.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 4a62a6a0fcee22cf8dc2b6e42f126afe; Thu, 02 May 2019 21:40:10 +0000 (UTC) Content-Disposition: inline In-Reply-To: <83muk4obfd.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 77.238.177.146 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:120142 Archived-At: One reason why people implemented everything in elisp instead of contributing in C (or sending patches) is: 1) in many documents around it says that it is the recommended way to extend emacs so new users (like me) think that everything is possible that way. 2) Because emacs didn't have a C api for modules until very recently and even with that all the infrastructure is Lisp based. (and it still needs a LOT of documentation) 3) It was the only available API with documentation and that didn't require recompile all emacs and they could redistribute, share and maintain independently without doing all the complex process to contribute. 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) But the emacs modules need a lot of time before they can provide the same power and access than Elisp gives these days, but most of the infrastructure actually calls indirectly Elisp functions and create Lisp objects, so there will be not any performance advantage in that part of the code until it goes back to C or the Lisp->C or the JIT compilers will be finished. Vim, for example, added a C api for that reason, but we are talking about a very different beast here. They don't have their own interpreter to maintain, no duality with GUI and TUI to maintain, no Lisp objects, bytecode, debugger... so a very different beast. On Thu, May 02, 2019 at 11:20:54PM +0300, Eli Zaretskii wrote: >> From: ?scar Fuentes >> Date: Thu, 02 May 2019 22:12:50 +0200 >> >> > I have no problem with people who code something for their personal >> > use. That's none of my concern. >> >> The sceneario I described was about a package maintainer, such as Org. > >That was exactly my gripe. I'm saying that implementing something for >others should be considered more seriously than just "let's code it >because we can". > >> > As for convincing: that is not required. Just put the request in the >> > open, and be done. >> >> That's not a solution if you are package maintainer trying to solve a >> performance problem within a given time frame. > >Of course it is: with the Lisp implementation already in place, you >don't need to wait for anyone or anything. But requesting a feature >in addition to that does two things: (a) it alerts others, including >Emacs developers, to the need; and (b) it announces load and clear >that the package maintainer is not really happy with the current >solution. Without such a request, no one will even know that there's >a problem here waiting for a volunteer. >