From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.devel Subject: Re: On elisp running native Date: Sat, 28 Dec 2019 08:17:59 +0000 Message-ID: References: <838smzq9iz.fsf@gnu.org> <8336d6rfgy.fsf@gnu.org> <83sgl6p1xa.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="200351"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 28 09:18:41 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1il7J2-000pxV-FG for ged-emacs-devel@m.gmane.org; Sat, 28 Dec 2019 09:18:40 +0100 Original-Received: from localhost ([::1]:41796 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1il7J0-0003DM-K2 for ged-emacs-devel@m.gmane.org; Sat, 28 Dec 2019 03:18:38 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46701) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1il7IU-0002gY-78 for emacs-devel@gnu.org; Sat, 28 Dec 2019 03:18:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1il7IS-0001oo-0s for emacs-devel@gnu.org; Sat, 28 Dec 2019 03:18:05 -0500 Original-Received: from mx.sdf.org ([205.166.94.20]:54496) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1il7IQ-0001h8-4e; Sat, 28 Dec 2019 03:18:02 -0500 Original-Received: from sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id xBS8I0W7009666 (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits) verified NO); Sat, 28 Dec 2019 08:18:00 GMT Original-Received: (from akrl@localhost) by sdf.org (8.15.2/8.12.8/Submit) id xBS8HxIq013226; Sat, 28 Dec 2019 08:17:59 GMT In-Reply-To: (Richard Stallman's message of "Fri, 27 Dec 2019 20:17:57 -0500") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 205.166.94.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:243722 Archived-At: Richard Stallman writes: > However, I have doubts that compiling Elisp into machine code is worth > the trouble. And I think it is likely to be fragile. The option > exists of writing C code by hand. Compiling the Elisp code would be > quicker and avoid errors, but will that savings be realized enough > times to justify the time used for developing and maintaining the > compiler? I tend to doubt it. > > How about compiling Elisp code into C? That should be a lot less work, > and it might be useful in other ways too. Hi, to better explain. Essentially using libgccjit means already describing C programs. In other words instead of writing strings into a file, functions to describe the program you want to compile have to be called. Libgccjit let you describe through these a program with a C-like semantic. Regardless the programming language is written in, libgccjit API is exactly what I would re-implement as interface to emit strings to form a proper C file as output. This task should be relative straight forward having all the system already working and the the libgccjit API to copy. But what we would loose is the already existing libgccjit infrastructure plus we would have to deal with files and compilation could not happen "in memory" having to go through the file-system. Andrea -- akrl@sdf.org