From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: Emacs design and architecture Date: Sat, 16 Sep 2023 22:01:05 +0200 Message-ID: References: <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> <47dabd46-0831-526c-e7c1-754f028507f3@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1423"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: =?utf-8?Q?Bj=C3=B6rn?= Bidar , Po Lu , Sebastian Miele , Eli Zaretskii , yuri.v.khan@gmail.com, owinebar@gmail.com, rms@gnu.org, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 16 22:02:13 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 1qhbUZ-000090-WE for ged-emacs-devel@m.gmane-mx.org; Sat, 16 Sep 2023 22:02:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qhbTd-0005md-Nm; Sat, 16 Sep 2023 16:01:13 -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 1qhbTc-0005mK-9P for emacs-devel@gnu.org; Sat, 16 Sep 2023 16:01:12 -0400 Original-Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qhbTa-0006qh-FW; Sat, 16 Sep 2023 16:01:12 -0400 Original-Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-503065c4b25so767828e87.1; Sat, 16 Sep 2023 13:01:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694894468; x=1695499268; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=SZxGUs1DMgnl3c592kuPgKMuzM6TX0WBJNp9OdLIMnY=; b=RjMQjdRW1dqQbA1hJT5mmy28kGfmlcc/nzf8vEfirUiOlsGqJgoeq0APbTlcMS8D9F wAw8Jkww+ISL71qsKvrDlisfIzGezUE2riyZtUHlN+qZ4Z2S6iBorHocOa51tMDMtrzZ bmnWSlG4cPgGArN0oo+XNfXuSHpC2RcbNR2LTpW3/VfPAocvfaQsxh5bQO/nvtnhvvT+ /T+b6AH6RvRq3hftGY6rEbFRG8hFMbvbH3C8KEnjHdncbgTxpWlhA97Roczlfaxl+Tm/ z/DXRdU6Hkud9plAAky/Nof/ash6bJc0HdtBiW8l1nkqcVd7PcH3KYwIfppeDuXMcv4m iqSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694894468; x=1695499268; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=SZxGUs1DMgnl3c592kuPgKMuzM6TX0WBJNp9OdLIMnY=; b=Yda429yGh/4x0/B7kiMqf9YMLxocJ2O42phmdRdQwKLnZUYgcVCLaZ7LzFnof4bXTg YaBAyy3ZIcbjNftMpELY5BcrOpVuvA1BSj7fjZINpm18T80wVOat4W3DG5Djq7x/XekW MheRYymubuLc+Z6JUtqh85IUPevzSElbDwVjOqKTio7ljGaa2WTRKSP3MWN8FQydwpeL N1tWr4WRfeQfPjouwCnGGEtRGv+gFbH1xRUKCVabo1YoHPL/7a+jxgSXwAHvLaugsRiX 3HfRHyLdl4flxWvHldv1LkoaIYe5LAh6iQ35fAg2qRlohXJhZT/0aeZLKS32GhplJcQH RrAQ== X-Gm-Message-State: AOJu0YxNgop0d6RGs+j4UgmIRsZluSmi5jYr61T8ByZfFyZM8576aLH8 GzxwPnQyJuedTJJb8uSNVBO2iyULsJaihDGP X-Google-Smtp-Source: AGHT+IFv6Z8AENhHodW4T1hXtIH52ywdFM4dGmHjuG7gE3YBv2iZ9oEay3c5Ut//EktrpqbtGa9PBA== X-Received: by 2002:a05:6512:214a:b0:4fb:9469:d659 with SMTP id s10-20020a056512214a00b004fb9469d659mr3533884lfr.23.1694894467248; Sat, 16 Sep 2023 13:01:07 -0700 (PDT) Original-Received: from Pro.fritz.box (pd9e36a2c.dip0.t-ipconnect.de. [217.227.106.44]) by smtp.gmail.com with ESMTPSA id q18-20020aa7da92000000b0052cdc596652sm3805977eds.23.2023.09.16.13.01.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Sep 2023 13:01:06 -0700 (PDT) In-Reply-To: <47dabd46-0831-526c-e7c1-754f028507f3@gutov.dev> (Dmitry Gutov's message of "Sat, 16 Sep 2023 22:40:58 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::133; envelope-from=gerd.moellmann@gmail.com; helo=mail-lf1-x133.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:310641 Archived-At: Dmitry Gutov writes: > I'm not sure if I understand the question, but to my knowledge, it > uses the same kind of "interpreter lock" as is common in other > "interpreted" languages too (Ruby, Python, PHP, Lua). Yes, thanks, that was what I meant. > That's not the whole story, though, because it's a lock within the > "interpreter context", and every open tab has its own. Most tab do not > interact in any way, cannot access each other's data, so it's fine to > run their JS code in parallel. Likewise, JS on the web doesn't have > any access to the browser chrome, meaning they're fine to run in > parallel too. In fact, modern browsers run several processes: one for > the UI and several for the browser tabs (last info I saw on this, link > below, is that Chrome used a process-per-tab, and Firefox combined > several tabs in one process using parallel threads). > > https://medium.com/mozilla-tech/the-search-for-the-goldilocks-browser-and-why-firefox-may-be-just-right-for-you-1f520506aa35 > > This is already more parallelism than we have (each piece of our code > can access everything), but OTOH they have more spinning plates at the > same time. > >>> 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 >> :-). > > The best I can point to are comments on Reddit around when emacs-ng > launched: > https://www.reddit.com/r/emacs/comments/kmh9k1/comment/ghm68j2/ > > It included the ability to run code in Deno's Web Workers. Yes, that's of course also a "solution" - add a second language/VM/runtime or runtime to Lisp. It at least avoids untangling Emacs' C code :-). > It feels like something that would help with some existing problems > (e.g. parting JSON in a worker, extracting a subpath from it and > sending the result to the parent process), but I don't remember > reading any serious code done with it. Possibly just because all big > packages have to keep compatibility with the GNU version anyway, so > I'm hopeful about such prospects if we ever even get a prototype in > GNU Emacs. At the very least, it can be like a faster async.el, with > all of its existing use cases. Hm.