From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Shrinking the C core Date: Mon, 28 Aug 2023 15:31:01 +0800 Message-ID: <873503y66i.fsf@yahoo.com> References: <87ledwx7sh.fsf@yahoo.com> <877cpfybhf.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="9297"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Arthur Miller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 28 09:31:56 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 1qaWj5-0002Ev-HD for ged-emacs-devel@m.gmane-mx.org; Mon, 28 Aug 2023 09:31:55 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qaWia-0004pq-Gv; Mon, 28 Aug 2023 03:31:24 -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 1qaWiU-0004pT-E4 for emacs-devel@gnu.org; Mon, 28 Aug 2023 03:31:18 -0400 Original-Received: from sonic303-20.consmr.mail.ne1.yahoo.com ([66.163.188.146]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qaWiR-0003OU-8e for emacs-devel@gnu.org; Mon, 28 Aug 2023 03:31:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1693207872; bh=YDK7QsrZRxvkt3ijnmYglzzvHw5PpNypTbTWNbhlb58=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=j6L+RgOy8uELvSl09tGzjm63iX8YQyaSdYhOdBgY/mdDtHTBxOBSxfLp97LaMjioK6+MHPLmYfjQamjofrNo/VhMjxllaBTkx5WuzIfFLit1zfi3srnYI1bmggEBg739ADLGjmSEBnSA9Dkz5QkL1lJ2t8Z64OdSzNhIftCmhGd/e261d070x3/rYXxBtbc5pJ4s6MCbMeHrrylXZiKbrEq44TPF8jgnqu07Esp80MKYZgEmFGeLZ7yfPspwRAzcC7Hw6j0pIXfK5iOQ0rKoY41o1fRw9+GmdLk6oOc99eLlkohXdwdL3O5h1f5wf5ixarNA82YNBMmqwysSIy+b8g== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1693207872; bh=venn5GhSF1JwfmclWg6hMlvOhmQEzOso14Pyvm/cqgR=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=SVJhDqeRSboGj9bNO3XKzkL5J8a+eSlaslvoog8b5oW31qY47CWVf5W6DJn1pfEtZZsTUOAQBH+Z2H/kaJWntAlAkm5T4pEwywpvR8xIL9lPv9ZWpAm0ARY+fbM06b/NU88f9YT/6q9pW70+XAa7wPMZNPFkilhqzD2ccVSBMy9P1VFwM2LIITBcETolVOn79eH3HPx2Q2tj8v7T+jbOlTbTIaQI7Yz2jo+ti8mM6Fv2j1ayyO1eCdQC0xsDs96lG8IesPZaj2hor27VWx25bSBRvrf2TJBXSXd0Db1BP0FaEyaUiCrYr4ClXB+oMu+Tljw2tv69g3RscLHslCXvEA== X-YMail-OSG: PXc7XU4VM1kqwmZ3Qye_G.MV4DM21vgEozvhFdWIijwKIqTvKc2JA__CXfiu9L9 Jyibn1jyPYX0yiu3E_wC9j_XmEuoL4bnqvBkmEPREHj6Xt1M8_Dss7u1MHrRRrUTfzwjPsiiNbx9 Sei4MwtWMteJMFAEDKShgzofDuTGpCiT5QCR5GBL0_EMW2FPAHWvDjwGM9x8Xmm4bwO_waOdzPMe CnD3aeNbkTDRPLc671dvo0hSeOKAju8D5KSSyvFc7t5EoyQropajAXcLXY.LWEfRMYsrurzdxv1R Fh4j6yB7U.ZYlkYO8UdY9NImaJiBvGGofw0UUFobDJUSuml2ckywLmtRkFeqLP9pXfUFnDQOAWzJ pI1uG.KIv2fJCU0iYlXUPHFjiqUHvR5sV5B1zV31s6V50hWK3hsQAm5S9URPwoOYZsbURQhXHSjN VeqE672diaVN_ZT2.uvlUjmAkL_mr_3_ax84WLeyKpMO1FCYttTG9ndLnN2p7l1q3vtNY0jpTDVu 0A0tBKIIuKnMK7ZyECbDMAAUqjjJsWiu47YCoN5VT83Hrc9DB7PKVBSWnDCk4vTh82eOllHgxjAE VIde.TObtovkSKSecWSaepMPxoWi3vSXfpu1qh5HbE9FKznusbdPR.jNg867qp15ddfX0iyCCj_D k4aY4T4MLv0s6VbOHNGN24ttcUb5uIKu62s6hSLWbWhvtWywew09O2N9SuXFMwE10HldYaurV87P YWGXN27HBV.yGmSdYSUDlC6v_B5dUtWsSQ7Q1lMSEnqOiuI1MgWEMG0MsB9KELh2QW_CzDFnZXD0 tj6ZwrYK3Oyp7uc3HXkJi0x9AkFtjC9b9PuXETs3Ce X-Sonic-MF: X-Sonic-ID: 107d9b80-8014-4f0b-8bd7-bc5f4c4e4e04 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.ne1.yahoo.com with HTTP; Mon, 28 Aug 2023 07:31:12 +0000 Original-Received: by hermes--production-sg3-69654d8bd-cdvp5 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID a89b212741b7e9825f8ad61182feecc0; Mon, 28 Aug 2023 07:31:07 +0000 (UTC) In-Reply-To: (Arthur Miller's message of "Mon, 28 Aug 2023 08:55:55 +0200") X-Mailer: WebService/1.1.21763 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.188.146; envelope-from=luangruo@yahoo.com; helo=sonic303-20.consmr.mail.ne1.yahoo.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_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:309408 Archived-At: Arthur Miller writes: > I think you have missunderstand what I mean; I can try make it clear > that I mean parts that considers Emacs core, shared state and so on. That's what I was referring to, yes. > You are missing the point: I wasn't talking about *who* changed the > Unix; the point here is that it got *changed*. My point is, Unix has demonstrated many times over that programs written in C can be interlocked, and doing so is more productive than a rewrite. > None. And nobody has suggested that such issues exists either, it is your > construction. On contrary, I am saying that Emacs should undergo such > transformation :). That contradicts your assertions below, where you propose returning to the drawing board to produce an Emacs written in Common Lisp. Curiously enough, I can't locate any precedent for large and complex Common Lisp programs being modified for multi-processor operation. > True. MS-DOS and Windows 95 would have to go away. Perhaps some other > popular OS from 1980s-1990s? They wouldn't have to go away if Emacs remains written in C. > 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.) > Nobody said it is "panaceas". But sbcl would provide a better lisp > machine, in terms of garbagecollector, threading etc; something you will > have to develop for Emacs eventually. You heard that one about a guy > with name Isaac Newton and standing on shoulders of others? :) SBCL only supports kernel-based threads on a handful of systems, and its garbage collection strategies vary between machine types. I'm sure we would be capable of supporting more while remaining portable, and Common Lisp leaves much to be desired as a pair of shoulders to stand on. > Just reimplementing the C core would not, because you wouldn't use > multiple threads. But if you would like to thread Emacs command loop or > internals itself, than you would have to reimplement it that way of > course. Think of Java Swing; at least 20 years ago when I war > programming Java, it was not thread safe, but worker threads were OK. You're okay with Emacs crashing if threads, wielded incorrectly, trample over internal state? If so, the global lock could be lifted from Emacs Lisp in under a week. 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 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. > I am sure present maintainers are well versed with CL, just not very > interested to rewrite Emacs in CL; and I wouldn't expected them to be > either :-). Two data points: I'm not an adept Common Lisp programmer, nor is Eli. I'm not even an Emacs Lisp programmer by vocation.