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 Date: Sat, 16 Sep 2023 15:18:25 -0400 Message-ID: References: <83h6nwlmt4.fsf@gnu.org> <456d12ac-ecf4-3de4-56bb-a2440580777f@gutov.dev> <83a5tokmsv.fsf@gnu.org> <83sf7fki5g.fsf@gnu.org> <43d642a8-d1b4-05ed-41e0-6e52d22df2d4@gutov.dev> <83edizjn0v.fsf@gnu.org> <0518f65b-1dd1-6923-8497-da4d3aeac631@gutov.dev> <1cff05f8-df80-b776-5175-dd27a6e59799@gutov.dev> <87wmwqiax9.fsf@whxvd.name> <87a5tmz319.fsf@yahoo.com> <87a5tmp5cv.fsf@thaodan.de> <8b144985-85f2-79e7-d932-2070336b13aa@gutov.dev> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000a14f5e06057ec6e8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2449"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Dmitry Gutov , =?UTF-8?B?QmrDtnJuIEJpZGFy?= , Po Lu , Sebastian Miele , Eli Zaretskii , yuri.v.khan@gmail.com, Richard Stallman , emacs-devel To: =?UTF-8?Q?Gerd_M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 16 21:19:40 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 1qhapP-0000Ow-I1 for ged-emacs-devel@m.gmane-mx.org; Sat, 16 Sep 2023 21:19:39 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qhaoU-0003gv-Dv; Sat, 16 Sep 2023 15:18:42 -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 1qhaoT-0003gf-CG for emacs-devel@gnu.org; Sat, 16 Sep 2023 15:18:41 -0400 Original-Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qhaoR-0007qu-Iz; Sat, 16 Sep 2023 15:18:41 -0400 Original-Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-26fc9e49859so2501818a91.0; Sat, 16 Sep 2023 12:18:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694891917; x=1695496717; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=6rCANz07Y29i42qfKLc++ZPIJuFujcSKhSgMYOIxChQ=; b=nCzWXd7i6TCN7ExltdGAL3Cq2dutRwqZuaDk5+PWcsj+swabuulsQ6hs+Ofkwc4e91 Lx5DMQVKXuwT043BpayuCucp4OLmSJqYaZaBb3MJDj7jKXp35pGj4pU3sMUDwYhn0bxg 9YHKSX+kJAqSxHW/7o8I5tmtMH1hR4uthdcJdN1xwBCKsh8Qu2n3YZY02rrzUqhTKvJd SAi44IeKx0Vl1BXs/C+vuMA3expeF2e83gKAPdI4uL5CCkRILXkuKvJ8Q/yLQl9KVDb4 jcEcgqhoaSNGiOlj9mnVi8hE5J7YfO7gkRXx5ERsvT7xhFeJLQDe254No9c3DvEtmf6V 3KRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694891917; x=1695496717; h=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=6rCANz07Y29i42qfKLc++ZPIJuFujcSKhSgMYOIxChQ=; b=H3aPv6SEL7aBOqsxWunV/1aq+G7UUVw2ERBC8cDdDavV26Sd5eaMY292WmgoxAGq+H mVosZFQvDPlyFYzIMPYeMzXaHW5CAnzV6oaPtgwiOk6v4WGMAkvBofggh9/L16shUJAD fT+MOJRWaATiEEs+o+l+s+Dhn//P60LDH0t13hAyA+dpYDNOWoX2tZ9OJV6qAiTyEIcs pwSg4ZOazZi8InU7J4oM9uBbpk3fXCi4etixaHePrjF1ssip7vDo7doq55Nxy23nRCCG 8FTB35qhYtMBqFUWUls3WKtb2HL5cKAzIwBw8ecB/DRIDpRtWB4Yqshn3MkApTjaCng0 4Ldg== X-Gm-Message-State: AOJu0YwNLYTjR4N6sbyzR2uUleyGxnBlTB6k1/lpkvD3SILLtlKwOIJa 3KixjjYIGI0Q6Vkb1XBWNbitXVEpvAcF1nmTVbw= X-Google-Smtp-Source: AGHT+IGjoLXhawULo0pWz9GIomToAm/ojD7WI5IgluObvOE1/gELyqn7IS8lKWhZBnIZ2i510Zq5Z6jJ632KadTzO3E= X-Received: by 2002:a17:90a:db09:b0:26f:4685:5b69 with SMTP id g9-20020a17090adb0900b0026f46855b69mr4153521pjv.7.1694891916740; Sat, 16 Sep 2023 12:18:36 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::1029; envelope-from=owinebar@gmail.com; helo=mail-pj1-x1029.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, HTML_MESSAGE=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:310639 Archived-At: --000000000000a14f5e06057ec6e8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Sep 16, 2023, 2:33 PM Gerd M=C3=B6llmann wrote: > Dmitry Gutov writes: > > > On 16/09/2023 20:07, Gerd M=C3=B6llmann wrote: > >> Dmitry Gutov writes: > >> > >>> On 16/09/2023 17:20, Bj=C3=B6rn Bidar wrote: > >>>> These more extensive modes require more advanced features similar as > >>>> when turning Emacs into a "word processor". > >>>> In my opinion Emacs being single threaded is the biggest hurdle in > that, > >>>> gui lockup is the biggest no no in regular gui apps. > >>> JavaScript is single-threaded. > >>> > >>> They have a certain solution for parallelism in specific workloads, > >>> though (called Web Workers). > >> In Emacs, GC can run Lisp I'm told (finalizers), regexp matching can > >> definitely run Lisp (bug#58042), and the devil knows what else =F0=9F= =99=81. I > >> personally have no idea how it would be possible to untangle this for = a > >> multi-threaded Lisp. > > > > Each Web Worker (in JS) uses a separate address space, without sharing > > references, exchanging information through "messages" (which are > > copied, not shared). > > Yes, that's what I gathered from reading about web workers on the web. > Do you know what, if anything, makes JS single-threaded? > > > So this would be like parallel Lisp interpreters with separate > > obarrays, memory spaces, etc. > > Which means someone has to "modularize" the current C code, so that, for > example, more than one GC module, Interpreter module, etc. could exist. > > Not easy, but in my eyes, it would definitely be an improvement. Is > there someone already working in this direction? > > (Not that anyone gets thei mpression I'd work on this... Just saying > :-). > I've mentioned before that multithreading should be split into (same process) multi-lisp-cpu multiprocessing and same lisp CPU multithreading. It's on my agenda, but there's a lot of lower hanging fruit/prerequisites to do first. Lynn --000000000000a14f5e06057ec6e8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Sep 16, 2023, 2:33 PM Gerd M=C3=B6llmann <gerd.moellmann@gmail.com> wrote= :
Dmitry Gutov <dmitry@gutov.dev> writes:

> On 16/09/2023 20:07, Gerd M=C3=B6llmann wrote:
>> Dmitry Gutov<
dmitry@gutov.dev>=C2=A0 writes:
>>
>>> On 16/09/2023 17:20, Bj=C3=B6rn Bidar wrote:
>>>> These more extensive modes require more advanced features = similar as
>>>> when turning Emacs into a "word processor".
>>>> In my opinion Emacs being single threaded is the biggest h= urdle in that,
>>>> gui lockup is the biggest no no in regular gui apps.
>>> JavaScript is single-threaded.
>>>
>>> They have a certain solution for parallelism in specific workl= oads,
>>> though (called Web Workers).
>> In Emacs, GC can run Lisp I'm told (finalizers), regexp matchi= ng can
>> definitely run Lisp (bug#58042), and the devil knows what else =F0= =9F=99=81.=C2=A0 I
>> personally have no idea how it would be possible to untangle this = for a
>> multi-threaded Lisp.
>
> Each Web Worker (in JS) uses a separate address space, without sharing=
> references, exchanging information through "messages" (which= are
> copied, not shared).

Yes, that's what I gathered from reading about web workers on the web.<= br> Do you know what, if anything, makes JS single-threaded?

> So this would be like parallel Lisp interpreters with separate
> obarrays, memory spaces, etc.

Which means someone has to "modularize" the current C code, so th= at, for
example, more than one GC module, Interpreter module, etc. could exist.

Not easy, but in my eyes, it would definitely be an improvement.=C2=A0 Is there someone already working in this direction?

(Not that anyone gets thei mpression I'd work on this...=C2=A0 Just say= ing
:-).

I've mentioned before that multithreading should be split into (sam= e process) multi-lisp-cpu multiprocessing and same lisp CPU multithreading.= =C2=A0 It's on my agenda, but there's a lot of lower hanging fruit/= prerequisites to do first.

Lynn

--000000000000a14f5e06057ec6e8--