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:06:50 +0200 Message-ID: References: <87ledwx7sh.fsf@yahoo.com> <877cpfybhf.fsf@yahoo.com> <873503y66i.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="37688"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 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 04:21:34 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 1qaoMG-0009RY-Ej for ged-emacs-devel@m.gmane-mx.org; Tue, 29 Aug 2023 04:21:33 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qaoKy-0007aA-4k; Mon, 28 Aug 2023 22:20:12 -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 1qaoD4-0005tx-6r for emacs-devel@gnu.org; Mon, 28 Aug 2023 22:12:02 -0400 Original-Received: from mail-db8eur05olkn20822.outbound.protection.outlook.com ([2a01:111:f400:7e1a::822] helo=EUR05-DB8-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 1qaoD1-0008Sh-5V for emacs-devel@gnu.org; Mon, 28 Aug 2023 22:12:01 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ht+V1DFW641edmFCVo7Fr6voszWgR59d7c2N+FukvLnAPmsj9AHHX3L63HVdduPMHauiWMiHufq8Z7TXmFZHv1H0z9aqhpY1mnf37lCrKsQdoazxeCBNRZdfC+5Fy3CovIsjnm/ynCrJyiKC0CFWHgl4PTme7PsWIc9xqPKlZHygZFv802vKHjtvFiC0RTgINQ3/8aDKsbAWSnEgByqHfmJJU3ttbRPtnPag0FDNH4guOeZbB9XR5vgIhwloSJG+4g2QAGR1UI5ZoctCkKs0aQRLEbpfa4WMjtIgDk9tfh8oJ+1E3IW3MkiyBVJcFaYLT5FYJA3d6EzsTaEGrHjk7A== 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=Kp6Z3SrA9ctDot6PzmWMn2SCvxRXdZvK5Lhq5ye7BAw=; b=ALF2LycFXPL1VEb7XzzbDnUjGdAhUgrZ7+Tl20ZwttIm7XchjZWY2tQZUBznQZrjlJNMSkUsZ8H27GQMNeyP8Q9lFdQ/1/mMR1rwrzO6nxujK3M/sJI3AQT9dOxZgZ1rtNL/X4ypX7Oi30fiYwVZ0YTX75JlGEvJW00yxtCXw1b7kQzsu4HzZCQTVDt5ld4nQW/4+kMriaFKjYi6cuQIreG0TVd9dCOm3B/3dAGVe/O5fctJMZpotYQixGfPYAfmfEzDOOfzKkbyK3IfR6tJKTfYwX6GZkfpj+23EI7SkKN4bYr9dWuQgRxM5ct4Bl6ZxSajwP0K8Dlj9NVcjMr1xQ== 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=Kp6Z3SrA9ctDot6PzmWMn2SCvxRXdZvK5Lhq5ye7BAw=; b=Ph1vc/hVSDO6aJAOuPK5q9Ig/slmhjCpcn1eo8WjpjpSZNXhW40f4/VywCB5jebnEp4oKgOTzPcjlJ9+Qfs+o3BpZ75P2R/sBsZRCgiXWDu/1gkpB7P6MrQFdrjsDRCUNACHY0oMQqdTGX2XJ0XDX/nwH9j2tUqskddwVUYLUsC2lL5zG5bUGQQWdrQDH1YkziHJ+HXlEf8QranlaEydYc2P2hs5fPUOuL3pQgjEuCWFFLizVOYfScOXGUpX5nY8thihP1gfnJ/vVErY8WWFPtI1GN5qywNhCklS7pFP7MuR1Qt2fztSOCBUpahGV+Q7J9ofyoAxdnCiFfsSmvCAkw== Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) by DB9PR09MB5964.eurprd09.prod.outlook.com (2603:10a6:10:3c4::7) 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:06:52 +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:06:52 +0000 In-Reply-To: (Po Lu's message of "Mon, 28 Aug 2023 23:08:58 +0800") X-TMN: [pMXu4mEsUkSsXQ77tt4XzX5WVW6UqFvQ] X-ClientProxiedBy: BE1P281CA0437.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:81::15) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <82jzte4n5x.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR09MB4977:EE_|DB9PR09MB5964:EE_ X-MS-Office365-Filtering-Correlation-Id: 73d56b5c-6370-48c7-5b2f-08dba8349c22 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ldww6p6WFxXhSJN3oO0PlTJjIBKaca3QQLZiOg1X38W92OaS2ekh88qSVmrbHulSBylvDv9j3WCf7+fzvDotXANam92n37sLsIl8ZlNOLciqdIvAlGVdN8xv+puv/UeyGedO8WR2kH5oYTGBSzE4LEgW5t4VhFzrstah1fic9hIzye8AC4ECfLKiwGZdW4kSTDrG7Vy0KuZLIYz63r589cYhDxcYGXjJyWHu2lbcKaM497qljM8WZ3cJCnbDRVZ7kKXpo1z6G0YrgZfh/hYoXeJeA4vsGE3/Ow6CkgNiDkQsNpVVoOtvsGXrO9jFozqJS3ZKCFSR3rHS3Xw5ZVW3NMCzlJMzEYormCoSRsYRgARx8QOp94XEwEqmMFHwkNmbIe83Z4zdx7L9DvWAqs0hA6D2cG/negdM4NigYLEqDJuVQKhfqzS82BZE3pl7hWXealAocpGvMzti5XyE6zSo5qQdNn7cmVZga+VUkfkH0rzj858tAYfzLg3zQGs00eNnMcNjZ9JsC8pdlXiBncp2VfpslInxD+LOaD65EZf2Di8GF8wbQUeDmiQZgT2tcnsf X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?j/w2DpG4PGLyQ1wrIP+hmYXRrbY7MA6YWaKcB+dxGUwUT+jS1nCMpB3UwMy8?= =?us-ascii?Q?3VgeipgmdS2FN/JaYpueKo/j61rpAze6nVBO0okToyNFNyXKkIOW2/Xw5Ii0?= =?us-ascii?Q?UxkNK3TvlZrf1aGc7pPAtDgQKfHK6aNN/WwYFPZxp3B6BbxKjW4F2LfOwmZ3?= =?us-ascii?Q?QETGFcSI/JnVBRS99QWXJ71GMvpIcw+XduER8l+3WJk5/V2P3Vvy0tf6I1iM?= =?us-ascii?Q?4xpVz20ql0Arkd9kzF5QZXTBXdqXO5YSbAX6mAUY6BgQqLavG2Na0u23KqxU?= =?us-ascii?Q?O4lr9UuInG84eLa+GZL7sk2Npg7vFZfadbIomR7h5gEg1SKhfBe1M/4ydwKa?= =?us-ascii?Q?eGpl1Llne+zJvqs8AD+0sdQevtQg9CHowN7vcVCHJhAJJIrSlKFCzk5oa7yM?= =?us-ascii?Q?xqIafN46YwEfJuddiU37N6P4074f4qp2Q3yZw7b98pkiISA8D2IGNesu78j1?= =?us-ascii?Q?ZKWR4T/Yw5t0D2VO6+fnJcJiPMXwNQro1tHbbwa9Rt8m/cCaSAXi2iSc8beC?= =?us-ascii?Q?hQhwWEhRReGeKlLqCpD2dEGfGh2d+qN9MbIzp1byX0bwzQvgUOzmlfbDyTAC?= =?us-ascii?Q?WvJJYL2tNBw1BB81unhYJPG+u03E1aWi9PgEg3sRrx03R3DMrUCcwvNHspWY?= =?us-ascii?Q?fF X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-64da6.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 73d56b5c-6370-48c7-5b2f-08dba8349c22 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:06:52.0595 (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: DB9PR09MB5964 Received-SPF: pass client-ip=2a01:111:f400:7e1a::822; envelope-from=arthur.miller@live.com; helo=EUR05-DB8-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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 28 Aug 2023 22:20:11 -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:309472 Archived-At: Po Lu writes: > Arthur Miller writes: > >> Unix which? Unix is not a single program; it is a family of operating >> systems, and I am quite sure nobody runs the same kernel they did back >> in 1970. I don't know what you are talking about you have >> "demonestrated". You said yourself *was* and not *is* which suggest >> that those kernels are rewritten in order to support those C programs >> that can be interlocked. Again you are constructing yourself things >> here: I haven't said it is impossible to write mulththreaded C >> application that can use locking. > > Each extant Unix system today contains gobs of code derived from the > Unix kernel developed at BTL in the 1970s. None of their kernels were > ever rewritten -- rather, they were subject to iterative refinement that > eventually allowed them to operate on SMP systems. The word "rewritten" does not imply any time frame. >> There are many applicaitons that have been redesigned. Emacs has been >> redesigned since its first incarnations as TECO editor if I have >> understand the history. For the very last time: I haven't said Emacs >> *can not be redesigned*, on the contrary, I said Emacs *should be* >> redesigned. Emacs core so to say. You are fighting against things I >> haven't said; I don't know why, if it is lack of English skill, or >> something else, but we are talking constantly beside each other. > > Perhaps you define the word "rewrite" differently, but its customary > meaning implies a reimplementation from square zero. My point is that Perhaps you should concentrate on C coding not on your work to define English dictionary? > My point is that > doing so is a gratuitous and unnecessary gesture, and we would be better > served by more realistic assessments and consequently more reasonable > proposals. Yes, you have expressed a year or more ago as well I should be forbidden to talk about Emacs. :). Perhaps you shouldn't have answered; nobody has forced you. I discuss gladly any technical aspects; actually that was my hope; but I am certainly neither amused nor very interested to discuss neither my character as you implied in another answer in this thread, nor meaning of words in English language. I have expressed an idea in a thread I found interesting, if it bothers you for any reason, tough shit, don't answer. >> Are you saying that a non-multihtreaded program written in C can >> suddenly become multithreaded without being re-written to support >> threading? Nevermind, you are totally, on purpose or lack of >> understanding, missing the point: you have to rewrite stuff to make it >> multithreaded regardless of the language if you intention is to have >> Emacs core multithreaded. Supporting multithreading is not same as >> having entire Emacs internals be multithreaded. > > Since when does interlocking call for a rewrite? > >> No, it does not because you have missunderstood that I mean something >> else. > > Then clarify what it is, for the plans you present (rewriting Emacs in a > different language) sure resemble plans for a complete grounds-up > reimplementation. > >> I propose porting core API to Common Lisp because that would save you >> implementing all those things that you need to make Emacs >> multithreaded, better GC etc, because it is not a trivial task. > > At the cost of portability and control? No, thank you. > Let me ask a question in turn: how many of the popular and often-cited > Common Lisp implementations are as old as Emacs? What guarantee is > there of their continued existence 10 or 20 years into the future? > >> Of course you can re-write all that stuff in C too, nobody is denying >> that it is possible. I am saying there is no need to reduplicate the >> work, and there are other benefits of having Emacs in Common Lisp. > > The work to be duplicated is menial and more-or-less already complete. > The remaining bulk will need to be tackled irrespective of the language > used to implement Emacs. The conclusion as to whether we should > overcome that bulk as-is, of if we should compound it with the challenge > of rewriting Emacs in a new language, is left as an exercise to the > reader. > >> Look harder. > > Any examples? > >>>> Well yes, C is portable and fast, nobody denies that. So are some >>>> CL >>>> compilers. >>> >>> Which Common Lisp compiler is capable of linking with Java code >>> through >>> the JNI? (ABCL doesn't work, as the Android JVM can't interpret the >>> bytecode it generates.) >> >> I don't know what you are trying to say; that sound like very >> uninformed statement based on missunderstanding. Calling Java via >> native API and generating bytecode that runs Lisp on top of Java as >> ABCL does are two completely different and separate things. I am quite >> sure Emacs does not generate Java byte code. But I don't see how is it >> even relevant, I haven't suggested to run Emacs on JVM. Perhaps it is >> possible who know, but I have suggested to use sbcl which is a native >> compiler specialized for compiling Lisp (and runs on Android as well). > > It's not possible to load a Common Lisp image into the JVM, because the > Java linker is only capable of linking compiled C objects that export C > symbols. Therefore, SBCL cannot run within any GUI Android program, > given that they must be started from Java. > >> "only" ? :-) I can asure you that Lispers have access to both kernel >> and user space threads. Search on Bordeaux threads. > > That's only a wrapper library for the incoherent threading primitives > furnished by different Common Lisp implementations. > >>> garbage collection strategies vary between machine types. I'm sure >>> we >> >> Does it? > > Yes it does. > >> I am also sure everything is possible, it is software, as a wise old >> grey head once said. It is just how much effort and resource you are >> pouring into it. SBCL runs on basically all important platforms on >> which Emacs runs, minus as mentioned DOS and Windows95; I don't know >> if there is some other. But it is not the point. The point is: there >> is another community working on the same problems you have or wish to >> solve. And they have come far away than you. You could re-use their >> work, and if you miss somethign add those missing parts so everyone >> would benefit, or you can live in an isolated island and do everything >> yourself. > > C is hardly an "isolated island". Anyway, we need a portable, fast, > flexible and ubiquitous language, and Common Lisp doesn't fit the bill: > if a platform as anodyne as Android poses problems for it, what about > the next sandboxing contraption for Unix systems? Or any future system > whose appearance down the line we cannot anticipate now? What if our > requirements outgrow Common Lisp's capabilities? > >> I am telling you that sbcl/ccl has already solved those problems you >> have to solve in order to have multithreading without having to lift >> your lock. > > We have too. What we have not, they cannot offer either. > >>> Instead of denigrating the C language, Emacs's C core, and so many >>> other >>> components critical to Emacs that have been subject to unjustified >>> invective in recent times, why not direct your attention to a more >> >> I don't think I understand how I "denigrate the C language" and what >> "unjustify invective" in this case is, but I don't think it >> matters. Once you also said I should be forbidden to talk about Emacs. > > It does, because such motives drive people to engage in many hours of > time wasting wild goose chases, all to ascertain which language > Providence meant for Emacs to be written in. > >>> direct your attention to a more >>> productive task, such as identifying the complex interdependencies >>> between different pieces of Emacs's global state to establish a >>> detailed >>> plan for their interlocking? For this task, the most important tool >>> is >>> a control-flow visualizer such as cflow, and an ample supply of >>> paper. >> >> Can we save nature and our selves? > > Parse error, sorry. You mean sorry but no sorry? Look; you are always indulging into Twitch/Reddit style trolling which in my opinion has nothing to do with your English skills as Eli suggests and warns about. I am fully aware that your aggressive tone and way you speak to me are because of your assumptions that I am an idiot, and you were not the only one on this list. You are completely free to have any opinion about me, I can't care less. Consider if it is good for Emacs and GNU projects to alienate people who are willing to help, and if it is representative for the free world to tell who should be allow to speak and what about. >> Nor are you sole Emacs devs, aren't you? I don't think calling names >> is appropriate, so I want, but I can come up with at least four people >> who work on Emacs and who are experienced Lispers. How active they are >> in development recently I don't know, I don't follow the list every >> day as I am used to, but I certainly haven't targeted Eli nor you with >> that one. > > Names? Would they be willing to take responsibility for the areas which > we oversee, in the event a Common Lisp Emacs comes to pass?