From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.devel Subject: Re: Shrinking the C core Date: Tue, 29 Aug 2023 04:41:02 +0200 Message-ID: References: <87pm37we7i.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26782"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Richard Stallman , emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Aug 29 13:07:20 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 1qawZ3-0006i3-Um for ged-emacs-devel@m.gmane-mx.org; Tue, 29 Aug 2023 13:07:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qawXR-0007yc-TN; Tue, 29 Aug 2023 07:05: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 1qaofF-0008Id-5i for emacs-devel@gnu.org; Mon, 28 Aug 2023 22:41:09 -0400 Original-Received: from mail-ve1eur01olkn2037.outbound.protection.outlook.com ([40.92.66.37] helo=EUR01-VE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qaofC-0005Tq-U5; Mon, 28 Aug 2023 22:41:08 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oGuhNEpY6jYtqBn7Zz9hRKiVs3jmOUzkvWwGmX+77IbFuehxYJvikqc2uO4bo+F1HdVxVZl38nXIsLhnKo5zouhJWnIjr55LUZf6TE4lGtQk2ot0W3NgTEZSSnB+FUGopLvFy8yn/hbqu4LVPTlA1mzqY/zr5T8HRcq/FCIpvh3g0SU6nU20JfUE6SgwcfRC0n3cIL1Ca4uVXZdWDxTI406elxX741uH1w15zMcpBWq4jv0xlvF5HUgA665qg8SiHqy9tScfKD7M2Oc54tWWq9QBIieCtgLeLhJYiT3dyDF1jlO/+liD7RomGZQsa1F/vUiBXRWYeknQF2e93HdtKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+reTyGmt9KeEC727fQLSCJHhPXMLAQZCbQzPZrNzFt0=; b=SYWvxZPBGVxuIECMcXB5UKfP31dXOcphF0Np8IDUHy8x90x3U/JscxBUni1Q/8COnZ7Ir9wiG6fsmqRxTaVwI7gpcx7rkbzfrLiZBKvvbknNnc6fGlnG5T5uB5yMdgUK5O0OPe1ITchqsgRZcPEZrkhhG+4UhyG2WWYSyz7wlvn9PRmw0D6PcU5agfcrzQgoGRana+fnZpw766jYBW8VJiGj1eNDOil7oZ74STZ/FFWeFJnp7GUicY5nf3X1eTU3O8ueZ0Jd6X+Gkpwqk9DdlUyyoRT1EENhD4U8jaINJZbLNbjjtFMKFFeAqFYACKBAcpabeod6abZYB1ZQeq93/g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+reTyGmt9KeEC727fQLSCJHhPXMLAQZCbQzPZrNzFt0=; b=gHVERhGcsPC3BuqJuUG+SIeVKMqjejQjfRaBO6M8HPfpjfW1Zy7lIRjjeFGoPv6wEzhi6Ni1RPa47sIjN/YcxAraDl6wEpa6EnUO5bQuvDxZ5Xug9g3l+kkWIb1QLyNIwmZ05wKEq339HzX5EBeNqo3HpgDcTnDERJUVWJLMG3IUvhggunKmeIOy9vGq2xTL6MIUDAotiJZIjnpLmSplzjekUEAlw6IsmAPkSa0wE0ttnnQRSWI+hP8/lUYh/Zmv1h96XzGBc+w192aO3kMCVMg5KlBg4fBtP9cTalWbHS3xoCiI/FmjPtGB2SRBGRhuV/6Up6QxKXjSEOTzqgB5FA== Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) by AS8PR09MB5385.eurprd09.prod.outlook.com (2603:10a6:20b:378::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.34; Tue, 29 Aug 2023 02:41:04 +0000 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::df56:b1b1:64b1:6122]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::df56:b1b1:64b1:6122%7]) with mapi id 15.20.6699.035; Tue, 29 Aug 2023 02:41:04 +0000 In-Reply-To: (Po Lu's message of "Mon, 28 Aug 2023 23:17:05 +0800") X-TMN: [9mKR1OGKhzi8ByIpj3VyqDlYhWLgU5he] X-ClientProxiedBy: OS6P279CA0106.NORP279.PROD.OUTLOOK.COM (2603:10a6:e10:3c::8) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <82pm361sg1.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR09MB4977:EE_|AS8PR09MB5385:EE_ X-MS-Office365-Filtering-Correlation-Id: 538cf486-0a07-40b9-037b-08dba8396362 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IlkFClHwc5KCtzSkKmgnjeQvZ4VDXcjTvGih+l6KH7svyNv+BGt96tbKK1zqkrm3MGu71rQVxkzJB2Rex9wnqhzCMcHfFodqiX3nHizP2ImeM0KHbHyEdkaPuOMMr0VqazDQgvG76eaKNyhfIf/JnIYpgzRbdzAYtqox6zBYEyvPjTVj+nj39WOKPfSvNZ4EyIrn4e3pe6GSNL66mVaGaf8d81lFDosmb80xFISbn6N1eiSQ6xVDsMthKeRk5Hk46v7tBlWMv1IunZASvXNO9gRHsx41b8Yo5taYKM2FZHzuT8NUMcbJ0qa3yiC2isTl+SuKTIAC2DFKa6jp0kZK49vUYOGWyVlA2iIUh5YtjjTuj8G47eSqhfz+9A3uWlRnsra08IED5+tJjGFhxz0Ra0rGR8149RhZKBNL9elccDYUy2zd11Fkd0GJKabKSVGvRCCix4pK7ylnmVrmVxLqw85P1i0bijsXfi50YoaKDGbgDW/G4uGwdFxx9tnIJIJWZaBbNM2lIQZsRgeZlViC3ADID57twXQ1uPaRHZ3Hucu5yTfaEjC/8AqKHJxpoiTo X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?SRk2Qg6GOaq8Bk4KIp+HcViAh+5H5tJ3gagrzXHlIjhe6gIj3vfJCg3HQz9n?= =?us-ascii?Q?y57OkKtD0qbst28OLsJOeXYl4xXHGH+2e2D7+5sY+aqcCOBLw5c2FhROlVKk?= =?us-ascii?Q?SKXsKzLJlXSBPni/xGHd2PXbSQTGiTblyWz/tviOdK2Vq+2VXJKhh2NGgh/c?= =?us-ascii?Q?Nr71r461PNmrGvS2tWoQDQvNSmxRUhfcnP51dKQdSZK4SiSw44RkYGHA+qog?= =?us-ascii?Q?OtutVRQG+errEk/Msqane5MP/WTy+piZZWJXx3rxR6wv00/p5RwEceRaZtMA?= =?us-ascii?Q?H1XKmjm6zNTyq7oNSmgV+3y5/H5sPNEWnGZwF846EO0Y0VgkrJAJecRP9Zh4?= =?us-ascii?Q?bMF24LdTfGWz06JBqL9/9Xp7RwvlQLDoI/lA/Sj+jHorVds8QkzloWzw3JzY?= =?us-ascii?Q?nnoEEOR4hRTUlSAk7Xo/WYcurUpXoCBYX6rZ023szgwnunXr9QB6RoZWcqLc?= =?us-ascii?Q?QS18QUPMOGGxQrFt8UmvDywJWZ2vVU4neId79AYk+zKbDTcbInCgrMBSDFak?= =?us-ascii?Q?i4BDKTM7plQbrRNvupGWy4xnwEIxJnqFgZZ24qdtAvFQLH3UO4eQwlPubyUD?= =?us-ascii?Q?WaeJE2sWIaTgFnizHVFFeFSDB9flT0qUqFwnn7NSP0EdU/IQQf+LN4ZUY+vs?= =?us-ascii?Q?pK X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-64da6.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 538cf486-0a07-40b9-037b-08dba8396362 X-MS-Exchange-CrossTenant-AuthSource: AM9PR09MB4977.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2023 02:41:04.1240 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR09MB5385 Received-SPF: pass client-ip=40.92.66.37; envelope-from=arthur.miller@live.com; helo=EUR01-VE1-obe.outbound.protection.outlook.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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 29 Aug 2023 07:05:28 -0400 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:309485 Archived-At: Po Lu writes: > Arthur Miller writes: > >> Perhaps you are attacking the task from the wrong angle? I think that >> sounds like a very tedius and error prone strategy. Why not refactor >> the interpreter so you can instantiate it with an empty state in a >> separate thread? I don't know; I am perhaps wrong, but isn't it more >> safe strategy to isolate the state in their own threads instead of >> trying to interloc bunch of stuff all over the place? > > How is that distinct from running Emacs within a subprocess? It is not, but it is not a question :). It is basically same as what async package does. I have actually said that in defense of Emacs many times in disucssions when people ask for "worker threads" on Reddit. However, it is a bit more efficient if you could start an interpretter in a thread than Emacs process; and it will lead to refactoring out Lisp interpretter from the Emacs application state which will hopefully lessen the shared state and make it easier to analyze the locking stuff you talk about.