From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Emacs design and architecture. How about copy-on-write? Date: Sat, 23 Sep 2023 17:25:21 +0300 Message-ID: <950389c5-814c-b78a-0f22-a08215df5058@gutov.dev> References: <87cyyhc7uu.fsf@dataswamp.org> <83ttrsg9nx.fsf@gnu.org> <83h6nrg4eg.fsf@gnu.org> <83v8c7elan.fsf@gnu.org> <877conk5ny.fsf@localhost> <83ttrreeu0.fsf@gnu.org> <87bkdzeas1.fsf@localhost> <83cyyfe5l8.fsf@gnu.org> <87led2o0nb.fsf@localhost> <83ttrqcpfb.fsf@gnu.org> <877comnv4a.fsf@localhost> <83fs3ackrq.fsf@gnu.org> <87ttrp89bx.fsf@localhost> <83led1aqnq.fsf@gnu.org> <87v8c3zun7.fsf@localhost> <83r0mr8w0j.fsf@gnu.org> <87bkduxz3l.fsf@localhost> <83cyya75eb.fsf@gnu.org> <877coh2lmd.fsf@localhost> <83r0mp3zh5.fsf@gnu.org> <55f29d31-947f-4cfc-a90e-36b0592ba12e@gutov.dev> <83lecx3uxt.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4813"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: Eli Zaretskii , yantar92@posteo.net, acm@muc.de, incal@dataswamp.org, emacs-devel@gnu.org To: Yuri Khan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 23 16:25:47 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 1qk3Zq-0000zn-DH for ged-emacs-devel@m.gmane-mx.org; Sat, 23 Sep 2023 16:25:47 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qk3Zb-0001GP-TN; Sat, 23 Sep 2023 10:25:31 -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 1qk3Za-0001GH-Un for emacs-devel@gnu.org; Sat, 23 Sep 2023 10:25:31 -0400 Original-Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qk3ZY-0004Bx-Sj; Sat, 23 Sep 2023 10:25:30 -0400 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 0C7E832009F0; Sat, 23 Sep 2023 10:25:25 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Sat, 23 Sep 2023 10:25:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1695479125; x=1695565525; bh=43oH83qcLQfSyDwOFYRzeNCM0yBVPMf0vIK 8E5mDuRU=; b=KjacWG/YbL3bGVCfitL7Z8J3J64VHb4cKbBTgGemzNFgPlycmEH M2c/+X3G9GYebmZH0An9Go/hlK+8U5UA8lIhmd8wWf1ZqnVY7rq02EXn4UdzsBEM Vg0WQDREqF5BofA6CjTbIw1Exv15rnbIG3yIl8DSQyixpsbY78Uj4w0Bv8ELiT2j SdescihLH0Tpx+Xt//xN8u6HgVOPLKYSALAQ5zgfxceHy66Q2fprSqqPGdl0f1rM s2qT6k7Fh1gH+0KuaZFeuhX+3WVNqzf3pD7Poe/GLTnIReGTONM3xi6ofSkUCcco XisWEzG43qipOYOW2TXThpOcEWsSDh0xxGA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1695479125; x=1695565525; bh=43oH83qcLQfSyDwOFYRzeNCM0yBVPMf0vIK 8E5mDuRU=; b=JFs5S/jMWhaWchWzgl60UQvGhCjhJGg6Au9WuFGYtZgE+r/HVXX 7qVQ2PQa8I91EaoQVPdAOJReQXL1uyY8NoRMD+3Mdxrl8vOm2uZizgjC1WEzm38D E0DZTv7KZ9Of86nVXbrIrxNKKlV91bfppGYiiffR1vHvIcZjhzSakXQrGl5CUZvZ DP0v5XQpCAAK4VCNuvoM1nz9mHbzaH6yF8KZpNo/b0YpXhF17VqXnqt0sWKQyCxe FJC3gpU+/aB6npptEBXoigrZhMWmY+j5EaitJudZeaPGYVFEyDd6aDSTcRDX8lxu 9Bsl6RlrI6N5fsXXWTIB6tBWsNCdjX8wBcg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudeltddgjeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhephfffheeljeffgeffueeghfekkedtfffgheejvdegjeettdduheeufffggfef jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 23 Sep 2023 10:25:23 -0400 (EDT) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=64.147.123.24; envelope-from=dmitry@gutov.dev; helo=wout1-smtp.messagingengine.com X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 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, NICE_REPLY_A=-1.473, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-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:311005 Archived-At: On 23/09/2023 17:23, Yuri Khan wrote: > On Sat, 23 Sept 2023 at 20:09, Dmitry Gutov wrote: > >> I agree: functions like yes-or-no-p will have to, internally in their >> implementation, acquire the "redisplay lock" or whatever it'll be >> called, and do other things to ensure that they work from non-default >> threads too. > That’s not the only possible implementation. A function that wants a > confirmation could package up the prompt with a continuation function, > and post that as a message to the main thread. The main thread would > pump its message queue, display the prompt, and schedule the > continuation (with the prompt result) to a worker thread. > > That would require the code using prompt functions to be transformed > to continuation-passing style though, either explicitly in code, or > automatically by the lisp reader. Yes, that's the other option which would make a lot of code require changes to be usable in threaded environment. As I understand, people would like to avoid that.