From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: Arthur Miller <arthur.miller@live.com>
Cc: emacs-tangents@gnu.org
Subject: Re: Shrinking the C core
Date: Thu, 14 Sep 2023 15:03:00 +0200 [thread overview]
Message-ID: <m2cyykx5yz.fsf@Pro.fritz.box> (raw)
In-Reply-To: <AM9PR09MB4977F45D1A1B9A1DF1A42C2996F7A@AM9PR09MB4977.eurprd09.prod.outlook.com> (Arthur Miller's message of "Thu, 14 Sep 2023 13:35:06 +0200")
Arthur Miller <arthur.miller@live.com> writes:
> Gerd Möllmann <gerd.moellmann@gmail.com> writes:
>> I'm pretty sure that CL packages could be added to Emacs as it is, if
>> some people would work on it.
>
> With "CL packages" you mean namespaces? There seem to be already a
> branch that implements them, but I don't know how well it works, I
> haven't tried it.
Yup, that's mine, as a pastime :-). I have no plans with that.
>> I'm also pretty sure that an incremental + generational GC could be
>> added, at least as an option, because I would have almost done it some
>> 20+ years ago. It was torpedoed by a patent issue concerning
>> mostly-copying GC. The patent has since expired. A lot of work, of
>> course. I think some people do or have done something in this area, but
>> I don't know details.
>
> I am not very familiar wth GC:s implementation more then just some
> bired-eye overview. SBCL recently started to move towards non-moving
> GC to help with the speed, notably when calling native code which does
> not like it's pointers moved underneath, but I am not expert on details
> there, these what I have got from the paper:
>
> https://applied-langua.ge/~hayley/swcl-gc.pdf
Interesting, thanks for the pointer!
>> I'm not at all sure that non-cooperative multi-threading could be added
>> to Emacs. But I'm also not sure how a CL core would help here.
>
> They are exposing posix threads and have done some work to make at least
> parts of the Lisp system work well with threads, and it seems it is
> working well for many applicaitons.
>
> http://www.lichteblau.com/sbcl/doc/manual/sbcl/Implementation-_0028Linux-x86_0029.html#Implementation-_0028Linux-x86_0029
Yes, I remember to some degree. I think Daniel Barlow started adding
thread support to SBCL at the time I constributed to CMUCL. ISTR some
communiaction with him about the implemenattion of dynamic bindings in
the presence of threads.
> I think there is also a missconception in Emacs community that Emacs
> loop itself has to be parallelized; I am not sure it is needed;
Don't know what the "loop" refers to.
I think the biggest problem with uncooperative multi-threading in Emacs
is that Emacs has so much global state. As a consequence, it's unsafe
to let two threads use anything in the C code in parallel. Maybe one
could think of using some Python-like GIL, but that's kind of pointless,
isn't it?
> I think
> for many people it would be enough to expose threading in form of "js
> workers" or something like that. It can be done with processes of
> course, but people seem to constantly scream about it in disucssions.
Parallel worker threads have the same problem as above. And cooperative
threads are there already, I think.
> CL has things like lparallel and green threads built on top of
> hardware threads, so even there is a bit of job already done. I am
> sure all that can be done in Emacs too, but I think, both communities
> would be more helped if we perhaps used sbcl and interested
> individuals helped make sbcl runtime better intead of reduplication
> the entire effort.
Is this realistic? I mean how many people would be interested to do that?
>> On the other hand, I'm pretty convinced that an Emacs core written in CL
>> would have to be close to 100% compatible with the existing C core to be
>> accepted by users. That includes a CL rewrite of the C Elisp, including
>> byte code interpreter.
>
> Yes, my conclusion too.
>
>> accepted by users. That includes a CL rewrite of the C Elisp, including
>> byte code interpreter.
>
> I am not sure how much of byte-interpretter is needed; I was thinking
> how byte interpretter and native compiler fitt there. Oviously since
> sbcl is a compiler, with don't need all that stuff, but I am not sure
> how much of byte code intepretter is needed. I am sure we need to
> understand all of the syntax, since byte code is a valid elisp,
> according to the manual; so the reader have to be able to read the
> syntax I guess, as printed representation, and has to print same stuff
> back to feed into elisp functions.
Not sure what you are saying. Something has to execute the bytecode,
or not?
>> That's a massive endeavor. My hair stands up when I remember the
>> compatibility problems I faced with the new redisplay ages ago.
>> Multiply that by some factor > 1. But maybe that's a burnt child
>> dreading the fire :-).
>
> Yes, I know. I am fully aware that it is an impossibility for someone
> alone, even for a very few. I don't think it is a burnt child, since
> yes, the character renderer of Emacs has to be implemented if Emacs
> applications will run unchanged.
(I think you misunderstoof the phrase. I'm the burnt child...).
> Hopefully it will be possible to implement Emacs stuff as a special kind
> of terminal/character renderer over some sort of tree/graph structure. I
> think CLOS and CL have much better tools to refactor that stuff than C,
> but what do I know, I haven't tried that and I am not sure if I will
> tbh. I am bolling with the ideas. I have seen what they do in other
> similar CL software (Hemlock, McClIM, Lem), perhaps there is something
> that can be reused there, but I don't know how much and what yet. And,
> yes text properties are a special chapter on its own :).
So, your plan would be to re-implement redisplay in CL. Good look with
that. And a ton of other stuff, like the stuff Eli mentioned. And the
result of the whole massive effort is then 100% compatible with current
Emacs.
That's what I call quatsch, sorry, but honestly.
Work on Lem if you like CL that much :-)
next prev parent reply other threads:[~2023-09-14 13:03 UTC|newest]
Thread overview: 277+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-13 5:06 Shrinking the C core Arthur Miller
2023-09-13 6:33 ` Gerd Möllmann
2023-09-14 11:35 ` Arthur Miller
2023-09-14 13:03 ` Gerd Möllmann [this message]
2023-09-14 13:20 ` Eli Zaretskii
2023-09-15 17:11 ` Emanuel Berg
2023-09-15 18:39 ` Eli Zaretskii
-- strict thread matches above, loose matches on Subject: below --
2023-09-12 3:51 Arthur Miller
2023-09-12 4:47 ` tomas
2023-09-12 11:29 ` Po Lu
2023-09-12 13:02 ` Alfred M. Szmidt
2023-09-12 3:46 Arthur Miller
2023-09-12 11:55 ` Eli Zaretskii
2023-09-12 18:22 ` chad
2023-09-12 18:47 ` Yuri Khan
2023-09-12 19:06 ` Eli Zaretskii
2023-09-12 19:07 ` joakim
2023-09-12 19:42 ` Eli Zaretskii
2023-09-12 21:56 ` joakim
2023-09-13 5:05 ` Emanuel Berg
2023-09-13 14:29 ` joakim
2023-09-15 5:46 ` Emanuel Berg
2023-09-13 15:33 ` Fraga, Eric
2023-09-15 5:51 ` Emanuel Berg
2023-09-15 11:38 ` Fraga, Eric
2023-08-27 15:14 Arthur Miller
2023-08-27 16:29 ` Eli Zaretskii
2023-08-28 5:32 ` Gerd Möllmann
2023-08-28 6:23 ` Arthur Miller
2023-08-28 6:21 ` Arthur Miller
2023-08-28 1:31 ` Richard Stallman
2023-08-28 5:50 ` Arthur Miller
2023-08-28 12:20 ` Po Lu
2023-08-28 14:39 ` Arthur Miller
2023-08-28 15:17 ` Po Lu
2023-08-29 2:41 ` Arthur Miller
2023-08-28 1:41 ` Po Lu
2023-08-28 2:53 ` chad
2023-08-28 3:43 ` Emanuel Berg
2023-08-28 4:53 ` Arthur Miller
2023-08-28 5:36 ` Po Lu
2023-08-28 6:55 ` Arthur Miller
2023-08-28 7:31 ` Po Lu
2023-08-28 8:06 ` Ihor Radchenko
2023-08-28 14:30 ` Arthur Miller
2023-08-28 15:09 ` Ihor Radchenko
2023-08-29 2:20 ` Arthur Miller
2023-08-28 15:14 ` Po Lu
2023-08-29 2:36 ` Arthur Miller
2023-08-29 4:07 ` Po Lu
2023-08-31 1:07 ` Emanuel Berg
2023-08-28 14:08 ` Arthur Miller
2023-08-28 15:08 ` Po Lu
2023-08-29 2:06 ` Arthur Miller
2023-08-29 4:15 ` Po Lu
2023-08-29 11:50 ` Eli Zaretskii
2023-08-29 3:57 ` Arthur Miller
2023-09-01 1:18 ` Richard Stallman
2023-08-31 2:07 ` Richard Stallman
2023-09-01 14:58 ` Arthur Miller
2023-09-01 16:36 ` tomas
2023-09-04 1:32 ` Richard Stallman
2023-09-04 1:44 ` Emanuel Berg
2023-09-04 5:49 ` Rudolf Schlatte
2023-09-04 14:08 ` Emanuel Berg
2023-09-07 1:21 ` Richard Stallman
2023-09-07 1:54 ` Emanuel Berg
2023-09-07 7:02 ` tomas
2023-09-07 7:36 ` Alfred M. Szmidt
2023-09-07 7:56 ` Emanuel Berg
2023-09-07 8:19 ` Ihor Radchenko
2023-09-07 8:39 ` Emanuel Berg
2023-09-07 9:28 ` Alfred M. Szmidt
2023-09-09 1:00 ` Emanuel Berg
2023-09-09 6:25 ` Po Lu
2023-09-09 7:24 ` Eli Zaretskii
2023-09-07 9:31 ` Eli Zaretskii
2023-09-07 9:39 ` Ihor Radchenko
2023-09-09 1:06 ` Emanuel Berg
2023-09-11 0:43 ` Richard Stallman
2023-09-11 12:24 ` Eli Zaretskii
2023-09-11 12:43 ` tomas
2023-09-13 5:59 ` Emanuel Berg
2023-09-12 4:44 ` Gerd Möllmann
2023-09-12 12:25 ` João Távora
2023-09-12 11:31 ` Lynn Winebarger
2023-09-13 6:12 ` Emanuel Berg
2023-09-05 4:23 ` Arthur Miller
2023-09-06 0:58 ` Richard Stallman
2023-09-06 1:12 ` Emanuel Berg
2023-09-06 5:04 ` Arthur Miller
2023-09-06 11:29 ` Alan Mackenzie
2023-09-06 23:03 ` Emanuel Berg
2023-09-07 7:00 ` tomas
2023-09-07 7:23 ` Emanuel Berg
2023-09-07 7:52 ` tomas
2023-09-07 5:30 ` Po Lu
2023-09-07 6:15 ` Emanuel Berg
2023-09-11 0:43 ` Richard Stallman
2023-09-11 12:05 ` Eli Zaretskii
2023-09-12 23:55 ` Richard Stallman
2023-09-13 6:34 ` Emanuel Berg
2023-09-07 8:51 ` Manuel Giraud via Emacs development discussions.
2023-09-07 9:20 ` Po Lu
2023-09-07 9:34 ` Eli Zaretskii
2023-09-08 2:00 ` Arthur Miller
2023-09-08 7:35 ` Gerd Möllmann
2023-09-09 10:05 ` João Távora
2023-09-08 17:58 ` Bob Rogers
2023-09-15 21:59 ` Emanuel Berg
2023-09-17 23:03 ` Richard Stallman
2023-09-09 0:39 ` Richard Stallman
2023-09-09 12:50 ` Arthur Miller
2023-09-12 0:27 ` Richard Stallman
2023-08-28 7:45 ` Andrea Monaco
2023-08-28 14:35 ` Arthur Miller
2023-08-13 11:20 Gerd Möllmann
2023-08-13 12:52 ` Ihor Radchenko
2023-08-13 8:06 Gerd Möllmann
2023-08-13 9:26 ` Emanuel Berg
2023-08-13 7:59 Gerd Möllmann
2023-08-13 8:44 ` Emanuel Berg
2023-08-09 9:46 Eric S. Raymond
2023-08-09 10:55 ` Andreas Schwab
2023-08-09 11:03 ` Eric S. Raymond
2023-08-09 11:29 ` Andreas Schwab
2023-08-09 12:34 ` Po Lu
2023-08-09 15:51 ` Eric S. Raymond
2023-08-09 23:56 ` Po Lu
2023-08-10 1:19 ` Eric S. Raymond
2023-08-10 1:47 ` Christopher Dimech
2023-08-10 1:58 ` Eric Frederickson
2023-08-10 2:07 ` Sam James
2023-08-10 2:44 ` Po Lu
2023-08-10 6:48 ` Eli Zaretskii
2023-08-10 21:21 ` Eric S. Raymond
2023-08-10 21:19 ` Eric S. Raymond
2023-08-10 21:56 ` Emanuel Berg
2023-08-11 5:46 ` Eli Zaretskii
2023-08-11 8:45 ` Emanuel Berg
2023-08-11 11:24 ` Eli Zaretskii
2023-08-11 12:12 ` Emanuel Berg
2023-08-11 13:16 ` Eli Zaretskii
2023-08-10 2:28 ` Po Lu
2023-08-10 4:15 ` Christopher Dimech
2023-08-10 7:44 ` Eli Zaretskii
2023-08-10 21:54 ` Emanuel Berg
2023-08-10 23:49 ` Eric S. Raymond
2023-08-11 0:03 ` Christopher Dimech
2023-08-11 8:24 ` Immanuel Litzroth
2023-08-11 7:03 ` Eli Zaretskii
2023-08-11 7:19 ` tomas
2023-08-11 10:57 ` Eli Zaretskii
2023-08-10 11:28 ` Dmitry Gutov
2023-08-10 21:26 ` Eric S. Raymond
2023-08-12 2:46 ` Richard Stallman
2023-08-12 3:22 ` Emanuel Berg
2023-08-12 8:33 ` Ihor Radchenko
2023-08-12 15:58 ` Emanuel Berg
2023-08-13 9:13 ` Ihor Radchenko
2023-08-13 9:55 ` Emanuel Berg
2023-08-13 10:23 ` Ihor Radchenko
2023-08-13 20:55 ` Emanuel Berg
2023-08-14 0:13 ` Emanuel Berg
2023-08-12 18:32 ` tomas
2023-08-12 22:08 ` Emanuel Berg
2023-08-12 23:09 ` Emanuel Berg
2023-08-13 5:50 ` tomas
2023-08-13 8:38 ` Emanuel Berg
2023-08-13 8:00 ` Andreas Schwab
2023-08-13 9:21 ` Emanuel Berg
2023-08-14 7:27 ` Alfred M. Szmidt
2023-08-14 7:36 ` Ihor Radchenko
2023-08-14 7:50 ` Alfred M. Szmidt
2023-08-15 22:57 ` Emanuel Berg
2023-08-16 10:27 ` Ihor Radchenko
2023-08-19 13:29 ` Emanuel Berg
2023-08-20 5:09 ` Ihor Radchenko
2023-08-20 6:51 ` Emanuel Berg
2023-08-20 7:14 ` Ihor Radchenko
2023-08-20 7:52 ` Emanuel Berg
2023-08-20 13:01 ` tomas
2023-08-20 13:12 ` Ihor Radchenko
2023-08-20 8:28 ` Alfred M. Szmidt
2023-08-20 9:29 ` Emanuel Berg
2023-08-20 15:22 ` Alfred M. Szmidt
2023-08-20 15:36 ` Ihor Radchenko
2023-08-20 15:45 ` Eli Zaretskii
2023-08-20 15:54 ` Ihor Radchenko
2023-08-20 16:29 ` Alfred M. Szmidt
2023-08-20 16:37 ` Ihor Radchenko
2023-08-20 17:19 ` Alfred M. Szmidt
2023-08-20 17:31 ` Ihor Radchenko
2023-08-20 18:54 ` Alfred M. Szmidt
2023-08-20 19:07 ` Eli Zaretskii
2023-08-27 3:53 ` Emanuel Berg
2023-08-20 19:15 ` Ihor Radchenko
2023-08-20 19:24 ` Ihor Radchenko
2023-08-21 2:33 ` Eli Zaretskii
2023-08-21 4:11 ` Ihor Radchenko
2023-08-21 4:15 ` Po Lu
2023-08-21 4:36 ` Ihor Radchenko
2023-08-21 4:43 ` Po Lu
2023-08-21 5:06 ` Ihor Radchenko
2023-08-21 5:34 ` Po Lu
2023-08-27 2:04 ` Emanuel Berg
2023-08-21 7:59 ` Gregory Heytings
2023-08-27 5:31 ` Emanuel Berg
2023-08-27 6:16 ` Emanuel Berg
2023-08-21 10:48 ` Eli Zaretskii
2023-08-21 11:56 ` Ihor Radchenko
2023-08-21 12:22 ` Eli Zaretskii
2023-08-28 4:41 ` Emanuel Berg
2023-08-28 11:27 ` Ihor Radchenko
2023-08-20 20:15 ` Alfred M. Szmidt
2023-08-20 20:39 ` Ihor Radchenko
2023-08-21 5:59 ` Alfred M. Szmidt
2023-08-21 6:23 ` Ihor Radchenko
2023-08-21 7:21 ` Alfred M. Szmidt
2023-08-21 7:26 ` Ihor Radchenko
2023-08-21 7:52 ` Alfred M. Szmidt
2023-08-21 10:46 ` Ihor Radchenko
2023-08-21 11:02 ` Alfred M. Szmidt
2023-08-27 4:01 ` Emanuel Berg
2023-08-27 8:53 ` Ihor Radchenko
2023-08-27 3:48 ` Emanuel Berg
2023-08-27 9:06 ` Ihor Radchenko
2023-08-27 3:25 ` Emanuel Berg
2023-08-27 8:55 ` Ihor Radchenko
2023-08-20 16:03 ` Alfred M. Szmidt
2023-08-20 16:34 ` Ihor Radchenko
2023-08-20 17:19 ` Alfred M. Szmidt
2023-08-20 17:25 ` Ihor Radchenko
2023-08-20 18:54 ` Alfred M. Szmidt
2023-08-20 19:02 ` Eli Zaretskii
2023-08-20 20:11 ` Alfred M. Szmidt
2023-08-23 21:09 ` Emanuel Berg
2023-08-26 2:01 ` Richard Stallman
2023-08-26 5:48 ` Eli Zaretskii
2023-08-26 18:15 ` Emanuel Berg
2023-08-26 18:27 ` Eli Zaretskii
2023-08-20 19:14 ` Eli Zaretskii
2023-08-20 19:44 ` Ihor Radchenko
2023-08-20 20:11 ` Alfred M. Szmidt
2023-08-21 2:35 ` Eli Zaretskii
2023-08-21 8:48 ` Ihor Radchenko
2023-08-21 11:10 ` Eli Zaretskii
2023-08-21 11:59 ` Ihor Radchenko
2023-08-21 12:23 ` Eli Zaretskii
2023-08-23 10:13 ` Ihor Radchenko
2023-08-20 20:32 ` Emanuel Berg
2023-08-21 6:19 ` Alfred M. Szmidt
2023-08-21 6:26 ` Ihor Radchenko
2023-08-21 7:21 ` Alfred M. Szmidt
2023-08-21 7:25 ` Ihor Radchenko
2023-08-21 7:52 ` Alfred M. Szmidt
2023-08-21 11:26 ` Ihor Radchenko
2023-08-22 23:55 ` Emanuel Berg
2023-08-23 7:04 ` Alfred M. Szmidt
2023-08-23 17:24 ` Emanuel Berg
2023-08-24 20:02 ` Emanuel Berg
2023-08-18 8:35 ` Aurélien Aptel
2023-08-19 13:32 ` Emanuel Berg
2023-08-31 1:41 ` Emanuel Berg
2023-08-14 2:36 ` Richard Stallman
2023-08-14 4:12 ` Emanuel Berg
2023-08-14 11:15 ` Ihor Radchenko
2023-08-12 3:28 ` Christopher Dimech
2023-08-12 3:48 ` Emanuel Berg
2023-08-12 3:50 ` Emanuel Berg
2023-08-12 6:00 ` Christopher Dimech
2023-08-12 6:02 ` Eli Zaretskii
2023-08-12 7:38 ` Christopher Dimech
2023-08-09 12:45 ` Eli Zaretskii
2023-08-09 16:11 ` Eric S. Raymond
2023-08-09 16:44 ` Eli Zaretskii
2023-08-09 17:57 ` Eric S. Raymond
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2cyykx5yz.fsf@Pro.fritz.box \
--to=gerd.moellmann@gmail.com \
--cc=arthur.miller@live.com \
--cc=emacs-tangents@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.