From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lynn Winebarger Newsgroups: gmane.emacs.devel Subject: Re: Emacs design and architecture (was: Shrinking the C core) Date: Wed, 13 Sep 2023 16:52:15 -0400 Message-ID: References: <87ledwx7sh.fsf@yahoo.com> <877cpfybhf.fsf@yahoo.com> <873503y66i.fsf@yahoo.com> <87fs3ur9u8.fsf@dataswamp.org> <875y4moiiq.fsf@dataswamp.org> <83r0n4rj78.fsf@gnu.org> <83cyynpmvd.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15212"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rms@gnu.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Sep 13 22:53:27 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qgWrX-0003fU-1W for ged-emacs-devel@m.gmane-mx.org; Wed, 13 Sep 2023 22:53:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgWqj-0002lU-FB; Wed, 13 Sep 2023 16:52:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qgWqi-0002lM-B5 for emacs-devel@gnu.org; Wed, 13 Sep 2023 16:52:36 -0400 Original-Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qgWqb-0001mi-6x; Wed, 13 Sep 2023 16:52:36 -0400 Original-Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-68fb71ded6dso185712b3a.0; Wed, 13 Sep 2023 13:52:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694638346; x=1695243146; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=GjJJCNpeRl9I7jNCXcUhDFzky3QscL+cVTXegEszFW4=; b=aKHrUOP28zJWK/QkZs4S2d2d0ZnIaGXwYXCFCGsrsANP9QBum8jfJKlF1QeiyKAYub EVKlTIt99wFX0qqoImOJ8r46ndltXbC5ByOH1oKocPXVNR3ICnqwufBynV0lUW3o932j kXFzPeZ12mc+HI2dpIbZ+K8bxJlAM1/9h5yNEXVC0BFgngYA+pHHr9ALO9W3L8jEmvWM iSnrpc6fg7qIBktfS9XX4dIT7lbxs/CEg/jh4XZOx486Cgk3fE/uJmnkU/8DtQtgkCJ+ uAc0L/qyNPn4l0Ug777WLnJlxDktALf5+ZljbJCX+skHWtRntKHdlpWt6tojRv5qlKvk pkvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694638346; x=1695243146; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GjJJCNpeRl9I7jNCXcUhDFzky3QscL+cVTXegEszFW4=; b=HT3PAf1pGkLZ5Qla8sgGtTxnosGI0JXjdploKlMV3PQFciTBnvxApuzTB6BFNuCoCV dWZ+CdHyovp46vrdn7NJMZMy7inzjJZvBqdzjRQyQ6VeC47t4U3b8UzMqM9ORaZA4fyO kUryosbKrBfpKFl/TI/ss3juYFLiyMdsBijw+XD5dBuCA0n9CrtEd2Ph0H6fIrOAxIJJ Ll0yWVXUuQYUztvPWjGbZtq6Y3rXbDn1ZrQ99D1Zujn8NoQBsNj3VBLzYipWD5F8e5My +eOrgQJwXBB7/k1x33UzFioF7ofXFPPhMJ2kaOifU4kZlktrD60gXzGR4O644qKRHyJz FLZg== X-Gm-Message-State: AOJu0YwuJPjTqXIjA64gMQpm45r2JZEV8w1lC8jnlPhyCN6Ew/LFjr1s yZ27NSe8Xi86h7GZhclsuhSEaKjJlRAObV1k/LXfXv18 X-Google-Smtp-Source: AGHT+IH4dPz7XSPoo0utrXzd5YJP7rBp4QNlQstbnpMLovdSSokouGK+3Ny3GzjaHw9tPLdg8XrjCZXGxajyaSpqACY= X-Received: by 2002:a05:6a20:3255:b0:14c:ad99:22a9 with SMTP id hm21-20020a056a20325500b0014cad9922a9mr3184834pzc.32.1694638346480; Wed, 13 Sep 2023 13:52:26 -0700 (PDT) In-Reply-To: <83cyynpmvd.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=owinebar@gmail.com; helo=mail-pf1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:310555 Archived-At: On Tue, Sep 12, 2023 at 9:01=E2=80=AFAM Eli Zaretskii wrote: > > From: Lynn Winebarger > > Date: Tue, 12 Sep 2023 07:31:35 -0400 > > Cc: Richard Stallman , incal@dataswamp.org, emacs-devel > > > > If Emacs will ever be "rewritten", it will not be Emacs, but a > > text-processing system with a very different architecture and design, > > which will take from the Emacs experience the lessons we learned and > > implement them differently, to produce a system whose starting point > > is closer to the needs of today's users and whose main technologies > > are more modern from the get-go. > > > > It sounds like you have some specific ideas. I wouldn't mind hearing t= hem at more length. > > They are all well known. And they aren't ideas, just main design > features of Emacs which we found restrictive in some aspects: I think I was more interested in why you said it would be a "text-processing system" rather than an editor or even IDE, what you perceive as the unmet needs of today's users, and what modern technologies you think are applicable to the problem. I'm not an expert in the display or text-encoding aspects of what Emacs does, so I really don't know what you have in mind. I do have some ideas in terms of extension language implementation. There are definitely some techniques used in implementing V8 that could be brought over. > . "buffer with gap" for storing buffer text > . "mark and sweep" GC > . basic single-threaded MVC architecture These three I have some ideas on, which I've outlined previously, using git and other distributed VC techniques as inspiration. However, those are longer term goals. For my first effort, I'm focusing on some low hanging fruit for creating tree-sitter parser tables and lexers in elisp and being able to create them dynamically, with some supporting technology that can also be applied to more generic dumping and garbage collection. > . display engine design around the rectangular canvas model and I don't know what the alternative is, exactly. VS Code and other IDEs I've used have more varied decorative elements and containers, but text is still pretty much presented in rectangular containers with sides parallel to the GUI window (frame in Emacs terms). > on-the-fly layout decisions > > > My understanding is the design is deliberately kept simple (or "simple"= ) to make it accessible to > > more programmers. > > Richard will tell, but I don't think this goal was ever of high > priority, back when Emacs was still being designed. > > > Instead of discussing porting emacs to CL, why don't people work on po= rting the compiler > > techniques used in CL to emacs? > > Well, native-compilation is one step in that direction. We've been > discussing something like that for many years, and we even tried a > couple of approaches (which didn't work). Native compilation is the > first successful experiment in that direction. Working on making the > native code more efficient is definitely encouraged. It's on my agenda. Not native code, per se, though. I think there are some changes to the VM design (that the native code has to be consistent with) that are required. The strict stack discipline is inherently inefficient, and since not every function parameter is dynamically scoped, there are plenty of opportunities to optimize away unnecessary function call overhead. That and more efficient GC design go hand in hand. Lynn