• Malicious Computer Architecture (was: Re: Prioritize Performance over Correctness)

    From Johann 'Myrkraverk' Oskarsson@johann@myrkraverk.invalid to comp.lang.c,comp.lang.lisp,comp.theory on Mon Aug 3 19:23:44 2026
    From Newsgroup: comp.lang.lisp

    On 03/08/2026 6:28 PM, David Brown wrote:
    On 03/08/2026 11:41, Richard Harnden wrote:
    On 03/08/2026 09:16, David Brown wrote:

    On most targets, function pointers are the same size as void*
    pointers. But there are exceptions, with some small microcontrollers
    and DSPs having different kinds of pointers with different sizes,
    depending on the memory space involved.-a I have yet to see a
    situation where there was any reason for storing a function address
    in a "void*" rather than a more appropriate typedef, such as :

    -a-a-a-a-atypedef void (*FVoid)(void);

    dlsym requires that pointer-to-function is compatible with a void*


    As I say, I have yet to see a situation where using void* for function pointers was more appropriate than using a function pointer type.-a If
    the OS system calls or standard OS libraries makes it a requirement that function pointers are converted to or from void* for some calls, then of course you need to follow those requirements - it's the people who
    designed the interfaces that made questionable design choices.


    Nope, you're wrong. You're dead wrong. The world isn't built on C,
    even though here in comp.lang.c we like to pretend it is.

    Several language environments allow function generation on the fly,
    these functions need to be garbage collected. Common Lisp is an
    example, therefore comp.lang.lisp is added to this discussion.

    I've also added comp.theory so Mild Shock can comment.

    You will have to go out of your way to make a computer architecture incompatible with garbage collected and heap allocated binary code,
    something I've been told SBCL does internally [1] to create an archi-
    tecture that has different

    * sizeof ( void * ), and
    * sizeof ( void (*)( void ) ),

    and when you do that, I'll just claim you're making a /malicious
    computer architecture/ and refuse to use it.


    [1] I've not looked at the code, but told the garbage collector can
    and will at least move the code around, if not collect it.
    --
    Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
    I'm not from the Internet, I just work there. | via Easynews.com
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From scott@scott@slp53.sl.home (Scott Lurndal) to comp.lang.c,comp.lang.lisp,comp.theory on Mon Aug 3 14:29:08 2026
    From Newsgroup: comp.lang.lisp

    Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> writes:
    On 03/08/2026 6:28 PM, A respected comp.lang.c poster wrote:

    Nope, you're wrong. You're dead wrong. The world isn't built on C,
    even though here in comp.lang.c we like to pretend it is.

    Hey dipshit, you're responding to a post in comp.lang.c and
    cross-posting your reply to other unrelated groups. Please don't
    do that.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Mild Shock@janburse@fastmail.fm to comp.lang.c,comp.lang.lisp,comp.theory on Mon Aug 3 18:10:47 2026
    From Newsgroup: comp.lang.lisp

    Hi,

    I've also added comp.theory so Mild Shock can comment.

    that has different
    * sizeof ( void * ), and
    * sizeof ( void (*)( void ) ),

    Could indicate a data RAM and code ROM model.
    Which has then the advantage of:

    Modern operating systems like Windows 11
    enforce strict Data Execution Prevention (DEP)
    (or NX/XD bit security features) to prevent
    malicious programs from injecting and executing
    code inside data-only memory regions. https://root-nation.com/en/soft-en/lifehacks/en-dep-windows-all-about/

    I adopted data RAM and code ROM model for
    pi-WAM from Hack, which has the same separation:

    Slide 58, Hack Computer https://drive.google.com/file/d/1Z_fxYmmRNXTkAzmZ6YMoX9NXZIRVCKiw/view

    But my motivation was not Johnny Depp prevention.
    Rather the caching of GPUs. Because WGSL
    allows storage annotations read_write and

    read. I use read_write for the data RAM
    of my Hack VM variant, and read for the
    code ROM of my Hack VM variant. You can

    see that here, its open source:

    @group(0) @binding(0) var<storage, read> code: array<i32>;
    @group(0) @binding(1) var<storage, read_write> state: array<i32>;

    11.4 Giga Lips with a Budget Laptop https://github.com/Jean-Luc-Picard-2021/gigabudget

    Hope this Helps!

    Bye

    Johann 'Myrkraverk' Oskarsson schrieb:
    On 03/08/2026 6:28 PM, David Brown wrote:
    On 03/08/2026 11:41, Richard Harnden wrote:
    On 03/08/2026 09:16, David Brown wrote:

    On most targets, function pointers are the same size as void*
    pointers. But there are exceptions, with some small microcontrollers
    and DSPs having different kinds of pointers with different sizes,
    depending on the memory space involved.-a I have yet to see a
    situation where there was any reason for storing a function address
    in a "void*" rather than a more appropriate typedef, such as :

    -a-a-a-a-atypedef void (*FVoid)(void);

    dlsym requires that pointer-to-function is compatible with a void*


    As I say, I have yet to see a situation where using void* for function
    pointers was more appropriate than using a function pointer type.-a If
    the OS system calls or standard OS libraries makes it a requirement
    that function pointers are converted to or from void* for some calls,
    then of course you need to follow those requirements - it's the people
    who designed the interfaces that made questionable design choices.


    Nope, you're wrong.-a You're dead wrong.-a The world isn't built on C,
    even though here in comp.lang.c we like to pretend it is.

    Several language environments allow function generation on the fly,
    these functions need to be garbage collected.-a Common Lisp is an
    example, therefore comp.lang.lisp is added to this discussion.

    I've also added comp.theory so Mild Shock can comment.

    You will have to go out of your way to make a computer architecture incompatible with garbage collected and heap allocated binary code,
    something I've been told SBCL does internally [1] to create an archi-
    tecture that has different

    *-a sizeof ( void * ), and
    *-a sizeof ( void (*)( void ) ),

    and when you do that, I'll just claim you're making a /malicious
    computer architecture/ and refuse to use it.


    [1] I've not looked at the code, but told the garbage collector can
    and will at least move the code around, if not collect it.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Mild Shock@janburse@fastmail.fm to comp.lang.c,comp.lang.lisp,comp.theory on Mon Aug 3 18:15:55 2026
    From Newsgroup: comp.lang.lisp

    Hi,

    Well there are two viewpoint, the "client"
    of the GPU, which is the CPU, and the "server"
    of the GPU, which is the command processor

    queue of the GPU device. So basically as
    a CPU client I can write the memory area,
    that is later mapped to my GPU code storage.

    And this way have a compiler, even written
    in Prolog, that compiles pi-WAM to my Hack VM,
    that can then be then deployed to GPU.

    You could also try the same with a Tiny
    LISP VM. And a grown up LISP to act as
    the compiler. Would be a similar exercise.

    Have Fun!

    Bye

    Mild Shock schrieb:
    Hi,

    I've also added comp.theory so Mild Shock can comment.

    that has different
    *-a sizeof ( void * ), and
    *-a sizeof ( void (*)( void ) ),

    Could indicate a data RAM and code ROM model.
    Which has then the advantage of:

    Modern operating systems like Windows 11
    enforce strict Data Execution Prevention (DEP)
    (or NX/XD bit security features) to prevent
    malicious programs from injecting and executing
    code inside data-only memory regions. https://root-nation.com/en/soft-en/lifehacks/en-dep-windows-all-about/

    I adopted data RAM and code ROM model for
    pi-WAM from Hack, which has the same separation:

    Slide 58, Hack Computer https://drive.google.com/file/d/1Z_fxYmmRNXTkAzmZ6YMoX9NXZIRVCKiw/view

    But my motivation was not Johnny Depp prevention.
    Rather the caching of GPUs. Because WGSL
    allows storage annotations read_write and

    read. I use read_write for the data RAM
    of my Hack VM variant, and read for the
    code ROM of my Hack VM variant. You can

    see that here, its open source:

    @group(0) @binding(0) var<storage, read> code: array<i32>;
    @group(0) @binding(1) var<storage, read_write> state: array<i32>;

    11.4 Giga Lips with a Budget Laptop https://github.com/Jean-Luc-Picard-2021/gigabudget

    Hope this Helps!

    Bye

    Johann 'Myrkraverk' Oskarsson schrieb:
    On 03/08/2026 6:28 PM, David Brown wrote:
    On 03/08/2026 11:41, Richard Harnden wrote:
    On 03/08/2026 09:16, David Brown wrote:

    On most targets, function pointers are the same size as void*
    pointers. But there are exceptions, with some small
    microcontrollers and DSPs having different kinds of pointers with
    different sizes, depending on the memory space involved.-a I have
    yet to see a situation where there was any reason for storing a
    function address in a "void*" rather than a more appropriate
    typedef, such as :

    -a-a-a-a-atypedef void (*FVoid)(void);

    dlsym requires that pointer-to-function is compatible with a void*


    As I say, I have yet to see a situation where using void* for
    function pointers was more appropriate than using a function pointer
    type.-a If the OS system calls or standard OS libraries makes it a
    requirement that function pointers are converted to or from void* for
    some calls, then of course you need to follow those requirements -
    it's the people who designed the interfaces that made questionable
    design choices.


    Nope, you're wrong.-a You're dead wrong.-a The world isn't built on C,
    even though here in comp.lang.c we like to pretend it is.

    Several language environments allow function generation on the fly,
    these functions need to be garbage collected.-a Common Lisp is an
    example, therefore comp.lang.lisp is added to this discussion.

    I've also added comp.theory so Mild Shock can comment.

    You will have to go out of your way to make a computer architecture
    incompatible with garbage collected and heap allocated binary code,
    something I've been told SBCL does internally [1] to create an archi-
    tecture that has different

    *-a sizeof ( void * ), and
    *-a sizeof ( void (*)( void ) ),

    and when you do that, I'll just claim you're making a /malicious
    computer architecture/ and refuse to use it.


    [1] I've not looked at the code, but told the garbage collector can
    and will at least move the code around, if not collect it.


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Aidan Kehoe@kehoea@parhasard.net to comp.lang.c,comp.lang.lisp,comp.theory on Mon Aug 3 19:51:02 2026
    From Newsgroup: comp.lang.lisp


    Ar an tri|| l|i de m|! L||nasa, scr|!obh Johann Oskarsson:

    On 03/08/2026 6:28 PM, David Brown wrote:
    On 03/08/2026 11:41, Richard Harnden wrote:
    On 03/08/2026 09:16, David Brown wrote:

    On most targets, function pointers are the same size as void* pointers. >>> But there are exceptions, with some small microcontrollers and DSPs
    having different kinds of pointers with different sizes, depending on >>> the memory space involved.-a I have yet to see a situation where there >>> was any reason for storing a function address in a "void*" rather than a >>> more appropriate typedef, such as :

    -a-a-a-a-atypedef void (*FVoid)(void);

    dlsym requires that pointer-to-function is compatible with a void*

    As I say, I have yet to see a situation where using void* for function pointers was more appropriate than using a function pointer type.-a If the OS system calls or standard OS libraries makes it a requirement that function pointers are converted to or from void* for some calls, then of course you need to follow those requirements - it's the people who designed the interfaces that made questionable design choices.

    Nope, you're wrong. You're dead wrong. The world isn't built on C,
    even though here in comp.lang.c we like to pretend it is.

    The habit when I read comp.lang.c it was to assert that standard C was all that was worth discussing (yes, yes, itrCOs phrased as standard C is on topic, everything else isnrCOt; but there wasnrCOt the activity in the architecture-specific groups for them to be helpful when I was reading it). This is even more ridiculous; almost all the C infrastructure out there relies on what is undefined behaviour by the letter of the standard. But itrCOs still C,
    and itrCOs worth understanding and worth writing.

    Oh well, thank you the autoconf maintainers, thank you the cmake maintainers, shame about the difficulty with cross-compiling.

    Several language environments allow function generation on the fly,
    these functions need to be garbage collected. Common Lisp is an
    example, therefore comp.lang.lisp is added to this discussion.

    I've also added comp.theory so Mild Shock can comment.

    You will have to go out of your way to make a computer architecture incompatible with garbage collected and heap allocated binary code, something I've been told SBCL does internally [1] to create an archi- tecture that has different

    I havenrCOt gone into the weeds of the GNU Emacs native-compiled function implementation, but it has to be doing something similar. The functions are not in the data segment, theyrCOre not in BSS, theyrCOre not on the stack; that leaves
    the heap.

    * sizeof ( void * ), and
    * sizeof ( void (*)( void ) ),

    and when you do that, I'll just claim you're making a /malicious
    computer architecture/ and refuse to use it.

    Note that GCC on AMD64 produces function pointers that are one-byte aligned, which to me is a similar philosophy. There cannot be any performance advantage to that.

    [1] I've not looked at the code, but told the garbage collector can
    and will at least move the code around, if not collect it.
    --
    rCyAs I sat looking up at the Guinness ad, I could never figure out /
    How your man stayed up on the surfboard after fourteen pints of stoutrCO
    (C. Moore)
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Mild Shock@janburse@fastmail.fm to comp.lang.c,comp.lang.lisp,comp.theory on Tue Aug 4 14:58:32 2026
    From Newsgroup: comp.lang.lisp

    Hi,

    How it started:

    The Applied Pi Calculus: Mobile Values,
    New Names, and Secure Communication
    Mart|!n Abadi et al. - Google Brain
    https://arxiv.org/abs/1609.03003

    How its going:

    Dynamic Control Flow in
    Large-Scale Machine Learning
    Mart|!n Abadi et al. - Google Brain https://research.google/pubs/dynamic-control-flow-in-large-scale-machine-learning/

    Have Fun!

    Bye

    Johann 'Myrkraverk' Oskarsson schrieb:
    On 03/08/2026 6:28 PM, David Brown wrote:
    On 03/08/2026 11:41, Richard Harnden wrote:
    On 03/08/2026 09:16, David Brown wrote:

    On most targets, function pointers are the same size as void*
    pointers. But there are exceptions, with some small microcontrollers
    and DSPs having different kinds of pointers with different sizes,
    depending on the memory space involved.-a I have yet to see a
    situation where there was any reason for storing a function address
    in a "void*" rather than a more appropriate typedef, such as :

    -a-a-a-a-atypedef void (*FVoid)(void);

    dlsym requires that pointer-to-function is compatible with a void*


    As I say, I have yet to see a situation where using void* for function
    pointers was more appropriate than using a function pointer type.-a If
    the OS system calls or standard OS libraries makes it a requirement
    that function pointers are converted to or from void* for some calls,
    then of course you need to follow those requirements - it's the people
    who designed the interfaces that made questionable design choices.


    Nope, you're wrong.-a You're dead wrong.-a The world isn't built on C,
    even though here in comp.lang.c we like to pretend it is.

    Several language environments allow function generation on the fly,
    these functions need to be garbage collected.-a Common Lisp is an
    example, therefore comp.lang.lisp is added to this discussion.

    I've also added comp.theory so Mild Shock can comment.

    You will have to go out of your way to make a computer architecture incompatible with garbage collected and heap allocated binary code,
    something I've been told SBCL does internally [1] to create an archi-
    tecture that has different

    *-a sizeof ( void * ), and
    *-a sizeof ( void (*)( void ) ),

    and when you do that, I'll just claim you're making a /malicious
    computer architecture/ and refuse to use it.


    [1] I've not looked at the code, but told the garbage collector can
    and will at least move the code around, if not collect it.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Mild Shock@janburse@fastmail.fm to comp.lang.c,comp.lang.lisp,comp.theory on Tue Aug 4 15:10:56 2026
    From Newsgroup: comp.lang.lisp

    Hi,

    While Paul Taraus Interactors were somewhere
    between stackfull and stackless coroutines,
    they were still a castle built on sand.

    What was the comms? An interactor was a child
    of a parent, and had only two comms, input "next"
    and output "the". And there was not much

    asynchronizity. But look at the new
    library(misc/intercom) that provides ADA
    Rendez Vous in Dogelog Player for Java:

    :- ensure_loaded(library(misc/intercom)).

    producer(C) :-
    between(1,10,X),
    Y is X*X,
    send(C,[Y]),
    fail.
    producer(_).

    consumer(C) :-
    between(1,10,_),
    recv(C,[Y]),
    write(Y), nl,
    fail.
    consumer(_).

    As the show case shows, it even works with
    cooperating coroutines. I have looked at it
    for 5 hours straight, its beautiful:

    ?- cpu_chan_new(C), create_task(producer(C)),
    create_task(consumer(C)), sleep(1000).
    1
    4
    9
    16
    25
    36
    49
    64
    81
    100
    C = 0rReference.

    Bye

    Mild Shock schrieb:
    Hi,

    How it started:

    The Applied Pi Calculus: Mobile Values,
    New Names, and Secure Communication
    Mart|!n Abadi et al. - Google Brain
    https://arxiv.org/abs/1609.03003

    How its going:

    Dynamic Control Flow in
    Large-Scale Machine Learning
    Mart|!n Abadi et al. - Google Brain https://research.google/pubs/dynamic-control-flow-in-large-scale-machine-learning/


    Have Fun!

    Bye

    Johann 'Myrkraverk' Oskarsson schrieb:
    On 03/08/2026 6:28 PM, David Brown wrote:
    On 03/08/2026 11:41, Richard Harnden wrote:
    On 03/08/2026 09:16, David Brown wrote:

    On most targets, function pointers are the same size as void*
    pointers. But there are exceptions, with some small
    microcontrollers and DSPs having different kinds of pointers with
    different sizes, depending on the memory space involved.-a I have
    yet to see a situation where there was any reason for storing a
    function address in a "void*" rather than a more appropriate
    typedef, such as :

    -a-a-a-a-atypedef void (*FVoid)(void);

    dlsym requires that pointer-to-function is compatible with a void*


    As I say, I have yet to see a situation where using void* for
    function pointers was more appropriate than using a function pointer
    type.-a If the OS system calls or standard OS libraries makes it a
    requirement that function pointers are converted to or from void* for
    some calls, then of course you need to follow those requirements -
    it's the people who designed the interfaces that made questionable
    design choices.


    Nope, you're wrong.-a You're dead wrong.-a The world isn't built on C,
    even though here in comp.lang.c we like to pretend it is.

    Several language environments allow function generation on the fly,
    these functions need to be garbage collected.-a Common Lisp is an
    example, therefore comp.lang.lisp is added to this discussion.

    I've also added comp.theory so Mild Shock can comment.

    You will have to go out of your way to make a computer architecture
    incompatible with garbage collected and heap allocated binary code,
    something I've been told SBCL does internally [1] to create an archi-
    tecture that has different

    *-a sizeof ( void * ), and
    *-a sizeof ( void (*)( void ) ),

    and when you do that, I'll just claim you're making a /malicious
    computer architecture/ and refuse to use it.


    [1] I've not looked at the code, but told the garbage collector can
    and will at least move the code around, if not collect it.


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Johann 'Myrkraverk' Oskarsson@johann@myrkraverk.invalid to comp.lang.c,comp.lang.lisp,comp.theory,comp.emacs.xemacs on Wed Aug 5 00:22:29 2026
    From Newsgroup: comp.lang.lisp

    On 04/08/2026 2:51 AM, Aidan Kehoe wrote:

    Hello Aidan,

    We haven't spoken for a long time, and I guess we're moving in different
    social circles now.

    You will find it amusing that my patch to the FreeBSD kernel, the one
    that kind of tunes the TCP/IP stack, is presumably used by Whatsapp as
    well.

    At least, that's the rumor I heard; I wouldn't know the truth as I don't
    work for Whatsapp. I thought only 5ch and Netflix had sites large
    enough to make use of it. Well, sites both large enough, and hosted on FreeBSD.

    I promised myself to look into it later, and if I'm right -- at least,
    that my patch is still there and all -- I'll let you know.

    It's always fun to know that whenever someone streams from Netflix, the
    TCP/IP patch I applied is being used; though I cannot say that it
    streams through my code; it wasn't that kind of patch.

    And I didn't, and don't work for Netflix either.

    I hope you're also leaving trails of patches in various operating
    systems that everyone on the planet, more or less, makes use of.


    Ar an tri|| l|i de m|! L||nasa, scr|!obh Johann Oskarsson:

    > On 03/08/2026 6:28 PM, David Brown wrote:
    > > On 03/08/2026 11:41, Richard Harnden wrote:
    > >> On 03/08/2026 09:16, David Brown wrote:
    > >
    > >>> On most targets, function pointers are the same size as void* pointers.
    > >>> But there are exceptions, with some small microcontrollers and DSPs
    > >>> having different kinds of pointers with different sizes, depending on
    > >>> the memory space involved.-a I have yet to see a situation where there
    > >>> was any reason for storing a function address in a "void*" rather than a
    > >>> more appropriate typedef, such as :
    > >>>
    > >>> -a-a-a-a-atypedef void (*FVoid)(void);
    > >>
    > >> dlsym requires that pointer-to-function is compatible with a void*
    > >
    > > As I say, I have yet to see a situation where using void* for function
    > > pointers was more appropriate than using a function pointer type.-a If the
    > > OS system calls or standard OS libraries makes it a requirement that
    > > function pointers are converted to or from void* for some calls, then of
    > > course you need to follow those requirements - it's the people who
    > > designed the interfaces that made questionable design choices.
    >
    > Nope, you're wrong. You're dead wrong. The world isn't built on C,
    > even though here in comp.lang.c we like to pretend it is.

    The habit when I read comp.lang.c it was to assert that standard C was all that
    was worth discussing (yes, yes, itrCOs phrased as standard C is on topic, everything else isnrCOt; but there wasnrCOt the activity in the architecture-specific groups for them to be helpful when I was reading it). This is even more ridiculous; almost all the C infrastructure out there relies
    on what is undefined behaviour by the letter of the standard. But itrCOs still C,
    and itrCOs worth understanding and worth writing.


    Yes, I remember that. I believe I came across a FAQ, probably comp.os. msdos.programmer, that said because comp.lang.c was full of standard
    thumping trolls, a lot of regular programming, even Win32 got discussed
    there. Yes, I'll quote.

    > Why does the newsgroup seem to be so C-oriented sometimes?
    > There are two reasons. First, comp.lang.c and
    > comp.lang.pascal have evolved in different
    > directions. Comp.lang.pascal has split into discussions
    > about individual Pascal compilers. comp.lang.pascal.borland
    > welcomes discussion specific to Turbo Pascal, and the other
    > new groups likewise. Turbo Pascal programmers tend to find
    > DOS questions welcomed in comp.lang.pascal.borland, so that
    > comp.os.msdos.programmer gets less of the "DOS in Turbo
    > Pascal" traffic. On the other hand, comp.lang.c has stayed
    > closer to talking only about the C language, and
    > vendor-specific or operating-system-specific questions are
    > not welcome. This tends to push questions about disks, DOS
    > file structure, video, the keyboard, TSRs, etc. to
    > comp.os.msdos.programmer even when those programs are
    > written in C.

    So my take on it, is that the standard thumping trolls in comp.lang.c
    were already a problem in the 90s. They just didn't know it, didn't
    care, and nobody challenged them about it. Until now.

    I am challenging their rule. And they can whine, and they can bluster,
    but nobody cares about their mistaken sense of prestige and power.

    They claim my cross posting is annoying. As far as I'm aware, I'm
    basically screaming into the void with my cross posts, because there
    isn't enough traffic in the other groups to warrant complaints about it.


    Oh well, thank you the autoconf maintainers, thank you the cmake maintainers, shame about the difficulty with cross-compiling.

    On that subject, I have to agree. I've largely given up on both for my
    own projects. The problems with these tools isn't when they work, it's
    when they don't. It can be a nightmare to get to the first build on a
    platform where the build system doesn't work.

    I currently believe both tools make porting to a /different enough
    platform/ basically impossible. And that's based on hard earned
    experience.


    > Several language environments allow function generation on the fly,
    > these functions need to be garbage collected. Common Lisp is an
    > example, therefore comp.lang.lisp is added to this discussion.
    >
    > I've also added comp.theory so Mild Shock can comment.
    >
    > You will have to go out of your way to make a computer architecture
    > incompatible with garbage collected and heap allocated binary code,
    > something I've been told SBCL does internally [1] to create an archi-
    > tecture that has different

    I havenrCOt gone into the weeds of the GNU Emacs native-compiled function implementation, but it has to be doing something similar. The functions are not
    in the data segment, theyrCOre not in BSS, theyrCOre not on the stack; that leaves
    the heap.


    And not to mention the operating system interfaces. I'll name mmap(),
    and Win32 has its equivalent, and while I'm not sure, OpenVMS might be different too.

    All of them return the equivalent of void *. So what are the program-
    mers of the JVM, CLR, and other virtual machines to do? They'll have
    to rely on this "undefined behaviour."


    > * sizeof ( void * ), and
    > * sizeof ( void (*)( void ) ),
    >
    > and when you do that, I'll just claim you're making a /malicious
    > computer architecture/ and refuse to use it.

    Note that GCC on AMD64 produces function pointers that are one-byte aligned, which to me is a similar philosophy. There cannot be any performance advantage
    to that.


    Can you please expand on that? I'm not sure what you mean, and I hope
    it doesn't create function pointers at strictly odd addresses, because
    that's what it sounds like to me.


    > [1] I've not looked at the code, but told the garbage collector can
    > and will at least move the code around, if not collect it.



    Best wishes, and happy XEmacs coding!
    --
    Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
    I'm not from the Internet, I just work there. | via Easynews.com https://bsky.app/profile/myrkraverk.bsky.social
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Richard Harnden@richard.nospam@gmail.invalid to comp.lang.c,comp.lang.lisp,comp.theory,comp.emacs.xemacs on Tue Aug 4 19:10:17 2026
    From Newsgroup: comp.lang.lisp

    On 04/08/2026 17:22, Johann 'Myrkraverk' Oskarsson wrote:
    And not to mention the operating system interfaces.-a I'll name mmap(),
    and Win32 has its equivalent, and while I'm not sure, OpenVMS might be different too.

    All of them return the equivalent of void *.-a So what are the program-
    mers of the JVM, CLR, and other virtual machines to do?-a They'll have
    to rely on this "undefined behaviour."

    I suspect its because I'm not a genius like you, but ...

    malloc(3) also returns a void* and that is perfectly well defined, is
    used everywhere and never caused anybody any problems.

    ... it seems to me you are, as usual, talking bollocks.



    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Niocl=C3=A1is=C3=ADn_C=C3=B3il=C3=ADn?= de =?UTF-8?Q?Ghlost=C3=A9ir?=@thanks-to@Taf.com to comp.lang.lisp,comp.theory on Tue Aug 4 18:13:17 2026
    From Newsgroup: comp.lang.lisp

    |-------------------------------------------------------------------------------|
    |"Ar an tri|| l|i de m|! L||nasa, scr|!obh Johann Oskarsson: |
    |[. . .] |
    |The habit when I read comp.lang.c it was to assert that standard C was all that|
    |was worth discussing (yes, yes, itrCOs phrased as standard C is on topic, |
    |everything else isnrCOt; but there wasnrCOt the activity in the |
    |architecture-specific groups for them to be helpful when I was reading it). |
    |This is even more ridiculous; almost all the C infrastructure out there relies |
    |on what is undefined behaviour by the letter of the standard." |
    |-------------------------------------------------------------------------------|
    arsa Aodh|in ua Ceoth|inaigh ar an 3|| l|i de mh|! L||nasa 2026.

    "I finally prepared another fossil for museum exhibition: from DECtapes
    written
    in 1972-73, there are exhumed C compilers (including source) to show
    what
    the very early stages of the language were like. This was a highly
    transitional stage; for example, the earlier one anticipates a "long"
    type, but doesn't have struct; the 6-months-later compiler implements
    struct, but reuses long's slot in the type table. http://www.cs.bell-labs.com/~dmr/primevalC.html

    Dennis"
    arsa fear ar an 29|| l|i de mh|! I||il 1999.

    "DECtapes are highly platform specific, and are not covered by ANSI C, which
    is the subject of this newsgroup (comp.lang.c). Try a DEC-related
    newsgroup.

    If you want us to comment on your source code, please post it in the body
    of your email.

    What was your C question?
    --
    Richard Heathfield

    The bug stops here."
    arsa neach.

    "Usenet is a strange place."
    arsa fear.

    Scr|!obh mise r-phost duit faoi dheirfi||r daoibh i rith na Bliana 2001
    agus scr|!obh tusa freagra dhom.

    |-------------------------------------------------------------------------------|
    |"But itrCOs still C, |
    |and itrCOs worth understanding and worth writing." |
    |-------------------------------------------------------------------------------|
    arsa Aodh P||l ua Ciothaigh.

    Is fi|| cacanna C.

    Is mise le meas,
    Niocl|is P||l Caile|in de Ghloucester
    (S. HTTP://Gloucester.Insomnia247.NL/ fuer Kontaktdaten!)
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Johann 'Myrkraverk' Oskarsson@johann@myrkraverk.invalid to comp.lang.lisp,comp.theory on Wed Aug 5 03:48:37 2026
    From Newsgroup: comp.lang.lisp

    On 05/08/2026 2:13 AM, Niocl|iis|!n C||il|!n de Ghlost|-ir wrote:
    |-------------------------------------------------------------------------------|
    |"Ar an tri|| l|i de m|! L||nasa, scr|!obh Johann Oskarsson: |
    |[. . .] |
    |The habit when I read comp.lang.c it was to assert that standard C was all that|
    |was worth discussing (yes, yes, itrCOs phrased as standard C is on topic, |
    |everything else isnrCOt; but there wasnrCOt the activity in the |
    |architecture-specific groups for them to be helpful when I was reading it). |
    |This is even more ridiculous; almost all the C infrastructure out there relies |
    |on what is undefined behaviour by the letter of the standard." |
    |-------------------------------------------------------------------------------|
    arsa Aodh|in ua Ceoth|inaigh ar an 3|| l|i de mh|! L||nasa 2026.

    "I finally prepared another fossil for museum exhibition: from DECtapes written
    in 1972-73, there are exhumed C compilers (including source) to show
    what
    the very early stages of the language were like. This was a highly transitional stage; for example, the earlier one anticipates a "long"
    type, but doesn't have struct; the 6-months-later compiler implements
    struct, but reuses long's slot in the type table. http://www.cs.bell-labs.com/~dmr/primevalC.html

    Dennis"
    arsa fear ar an 29|| l|i de mh|! I||il 1999.

    "DECtapes are highly platform specific, and are not covered by ANSI C, which is the subject of this newsgroup (comp.lang.c). Try a DEC-related
    newsgroup.

    If you want us to comment on your source code, please post it in the body
    of your email.

    What was your C question?


    So if I'm reading this right, you're posting exclusively to comp.lang.
    lisp, and comp.theory; and leaving out comp.lang.c as a sign of pro-
    test. I can respect that.

    Yes, this is exactly the kind of problematic behaviour I'm talking
    about. It's not just comp.lang.c. Here is a twelve minute documentary
    about how this problem has infected /Stack Overflow/ as well.

    https://www.youtube.com/watch?v=IbDAmvUwo5c


    Let's enjoy this moment without any standard thumping trolls!
    --
    Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
    I'm not from the Internet, I just work there. | via Easynews.com https://bsky.app/profile/myrkraverk.bsky.social
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Niocl=C3=A1is=C3=ADn_C=C3=B3il=C3=ADn?= de =?UTF-8?Q?Ghlost=C3=A9ir?=@thanks-to@Taf.com to comp.lang.lisp,comp.theory on Tue Aug 4 22:01:47 2026
    From Newsgroup: comp.lang.lisp

    Johann 'Myrkraverk' Oskarsson <johann@Myrkraverk.invalid> skrev: |-----------------------------------------------------------------------|
    |"So if I'm reading this right, you're posting exclusively to comp.lang.| |lisp, and comp.theory; and leaving out comp.lang.c as a sign of pro- | |test. [. . .]" | |-----------------------------------------------------------------------|

    Det st|nmmer inte! I use news servers which tend to restrict a post to
    2 newsgroups. Sorry! A few times I wrote explanations e.g. in January:
    "I am sorry that this crossposting is to only 2 groups. I am sending
    via a server which does not allow a crosspost to many groups. It or
    Tin also forbids many groups in a Followup-To: field."

    I stopped writing such explanations. Maybe I should not have stopped!
    (S. HTTP://Gloucester.Insomnia247.NL/ fuer Kontaktdaten!)
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Johann 'Myrkraverk' Oskarsson@johann@myrkraverk.invalid to comp.lang.lisp,comp.theory on Wed Aug 5 06:25:05 2026
    From Newsgroup: comp.lang.lisp

    On 05/08/2026 6:01 AM, Niocl|iis|!n C||il|!n de Ghlost|-ir wrote:
    Johann 'Myrkraverk' Oskarsson <johann@Myrkraverk.invalid> skrev: |-----------------------------------------------------------------------| |"So if I'm reading this right, you're posting exclusively to comp.lang.| |lisp, and comp.theory; and leaving out comp.lang.c as a sign of pro- | |test. [. . .]" | |-----------------------------------------------------------------------|

    Det st|nmmer inte! I use news servers which tend to restrict a post to
    2 newsgroups. Sorry! A few times I wrote explanations e.g. in January:
    "I am sorry that this crossposting is to only 2 groups. I am sending
    via a server which does not allow a crosspost to many groups. It or
    Tin also forbids many groups in a Followup-To: field."

    I stopped writing such explanations. Maybe I should not have stopped!
    (S. HTTP://Gloucester.Insomnia247.NL/ fuer Kontaktdaten!)

    It's fine. comp.lang.c didn't need to read my reply. And you keep on crossposting as you see fit; which means just two groups.

    I have no problem with it, I just misunderstood your intentions.


    Have a nice Lispy day!
    --
    Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
    I'm not from the Internet, I just work there. | via Easynews.com https://bsky.app/profile/myrkraverk.bsky.social
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Kaz Kylheku@046-301-5902@kylheku.com to comp.lang.c,comp.lang.lisp,comp.theory,comp.emacs.xemacs on Thu Aug 6 21:55:39 2026
    From Newsgroup: comp.lang.lisp

    On 2026-08-04, Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> wrote:
    Yes, I remember that. I believe I came across a FAQ, probably comp.os. msdos.programmer, that said because comp.lang.c was full of standard
    thumping trolls, a lot of regular programming, even Win32 got discussed there. Yes, I'll quote.

    I don't believe that only standard C should be discussed in comp.lang.c.
    There is room for dialects. E.g. GNU C is C.

    Once we are in the weeds of a platform specific kernel function that can
    do anything whatsoever, the discussion of what it does doesn't relate
    to C. You can call it out of assembly language or Fortran; it doesn't
    matter.

    Standard thumping and standard thumpers are useful, because it is
    usually good to be informed about whether something we are doing in
    the code is required to work, by the standard, or not. (If not, then
    by what: by what requirements, or else theory of operation, is it
    assured that the code works as believed.)

    Sometimes standard thumpers can point out a standard-conforming way
    of doing something that has no disadvantages, or at least few
    disadvantages, compared to the nonstandard way being presented.

    C is a very unsafe language; a program that compiles with silence at the highest diagnostic level of your compiler of choice could have serious
    flaws.

    The standard is the primary (though not the only) source that informs
    the scrutiny of C programs for undiagnosed/undiagnosable problems.

    So my take on it, is that the standard thumping trolls in comp.lang.c
    were already a problem in the 90s. They just didn't know it, didn't
    care, and nobody challenged them about it. Until now.

    On the contrary, standard-thumping in comp.lang.c has been regularly
    challenged for decades by numerous visitors; everyone who tried it so
    far bounced off, and came down with an unpleasant bump. :)
    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @Kazinator@mstdn.ca
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Aidan Kehoe@kehoea@parhasard.net to comp.lang.c,comp.lang.lisp,comp.theory on Thu Aug 6 23:01:19 2026
    From Newsgroup: comp.lang.lisp


    Ar an c||igi|| l|i de m|! L||nasa, scr|!obh Johann Oskarsson:

    On 04/08/2026 2:51 AM, Aidan Kehoe wrote:

    Hello Aidan,

    We haven't spoken for a long time, and I guess we're moving in different social circles now.

    I spent 2012-present debugging people, and until 2021ish without the time away from that to maintain a social circle or do any XEmacs work. My social circle just shrank!

    You will find it amusing that my patch to the FreeBSD kernel, the one
    that kind of tunes the TCP/IP stack, is presumably used by Whatsapp as
    well.

    At least, that's the rumor I heard; I wouldn't know the truth as I don't work for Whatsapp. I thought only 5ch and Netflix had sites large
    enough to make use of it. Well, sites both large enough, and hosted on FreeBSD.

    I promised myself to look into it later, and if I'm right -- at least,
    that my patch is still there and all -- I'll let you know.

    Good.

    It's always fun to know that whenever someone streams from Netflix, the TCP/IP patch I applied is being used; though I cannot say that it
    streams through my code; it wasn't that kind of patch.

    And I didn't, and don't work for Netflix either.

    I hope you're also leaving trails of patches in various operating
    systems that everyone on the planet, more or less, makes use of.

    ThererCOs enough to do with XEmacs plus running a business plus a three year old
    daughter plus a fianc|-e, that I donrCOt anticipate any OS patches from me this decade. Still, I save lives, and more importantly, prevent large strokes.

    Ar an tri|| l|i de m|! L||nasa, scr|!obh Johann Oskarsson:

    > On 03/08/2026 6:28 PM, David Brown wrote:
    > > On 03/08/2026 11:41, Richard Harnden wrote:
    > >> On 03/08/2026 09:16, David Brown wrote:
    > >
    > >>> On most targets, function pointers are the same size as void*
    > >>> pointers. But there are exceptions, with some small
    > >>> microcontrollers and DSPs having different kinds of pointers with
    > >>> different sizes, depending on the memory space involved.-a I have
    > >>> yet to see a situation where there was any reason for storing a
    > >>> function address in a "void*" rather than a more appropriate
    > >>> typedef, such as :
    > >>>
    > >>> -a-a-a-a-atypedef void (*FVoid)(void);
    > >>
    > >> dlsym requires that pointer-to-function is compatible with a void*
    > >
    > > As I say, I have yet to see a situation where using void* for
    > > function pointers was more appropriate than using a function pointer
    > > type.-a If the OS system calls or standard OS libraries makes it a
    > > requirement that function pointers are converted to or from void*
    > > for some calls, then of course you need to follow those requirements
    > > - it's the people who designed the interfaces that made questionable
    > > design choices.
    >
    > Nope, you're wrong. You're dead wrong. The world isn't built on C,
    > even though here in comp.lang.c we like to pretend it is.

    The habit when I read comp.lang.c it was to assert that standard C was
    all that was worth discussing (yes, yes, itrCOs phrased as standard C is on
    topic, everything else isnrCOt; but there wasnrCOt the activity in the architecture-specific groups for them to be helpful when I was reading it). This is even more ridiculous; almost all the C infrastructure out there relies on what is undefined behaviour by the letter of the
    standard. But itrCOs still C, and itrCOs worth understanding and worth writing.

    Yes, I remember that. I believe I came across a FAQ, probably comp.os. msdos.programmer, that said because comp.lang.c was full of standard thumping trolls, a lot of regular programming, even Win32 got discussed there. Yes, I'll quote.

    > Why does the newsgroup seem to be so C-oriented sometimes?
    > There are two reasons. First, comp.lang.c and
    > comp.lang.pascal have evolved in different
    > directions. Comp.lang.pascal has split into discussions
    > about individual Pascal compilers. comp.lang.pascal.borland
    > welcomes discussion specific to Turbo Pascal, and the other
    > new groups likewise. Turbo Pascal programmers tend to find
    > DOS questions welcomed in comp.lang.pascal.borland, so that
    > comp.os.msdos.programmer gets less of the "DOS in Turbo
    > Pascal" traffic. On the other hand, comp.lang.c has stayed
    > closer to talking only about the C language, and
    > vendor-specific or operating-system-specific questions are
    > not welcome. This tends to push questions about disks, DOS
    > file structure, video, the keyboard, TSRs, etc. to
    > comp.os.msdos.programmer even when those programs are
    > written in C.

    So my take on it, is that the standard thumping trolls in comp.lang.c were already a problem in the 90s. They just didn't know it, didn't care, and nobody challenged them about it. Until now.

    Most of my comp.lang.c was the turn of the millennium. I donrCOt have the desire or spare time at the moment to read more newsgroups, and IrCOm happy with
    my command of C.

    I am challenging their rule. And they can whine, and they can bluster,
    but nobody cares about their mistaken sense of prestige and power.

    They claim my cross posting is annoying. As far as I'm aware, I'm
    basically screaming into the void with my cross posts, because there
    isn't enough traffic in the other groups to warrant complaints about it.

    Fight on! Alternatively put the time into XEmacs (or packages) work, which is, a better use of your time. (From my perspective, and probably in the grand scheme of things; neither of is likely to make any difference to comp.lang.c.)

    Oh well, thank you the autoconf maintainers, thank you the cmake maintainers, shame about the difficulty with cross-compiling.

    On that subject, I have to agree. I've largely given up on both for my own projects. The problems with these tools isn't when they work, it's when they don't. It can be a nightmare to get to the first build on a platform where the build system doesn't work.

    Well, itrCOs just one more platform to learn. I would love to move XEmacs to cmake, given it would unify the POSIX and Windows build systems, but it would be a huge investment of time to port it over, because I know autoconf but I donrCOt know cmake.

    I currently believe both tools make porting to a /different enough platform/ basically impossible. And that's based on hard earned experience.

    My understanding is that cmake just requires a C compiler, no shell, no other dependencies, so it should manage a different enough platform that has a C compiler without problems. This is its attraction over autoconf, which
    requires /bin/sh at least, and pragmatically more of POSIX.

    > Several language environments allow function generation on the fly,
    > these functions need to be garbage collected. Common Lisp is an
    > example, therefore comp.lang.lisp is added to this discussion.
    >
    > I've also added comp.theory so Mild Shock can comment.
    >
    > You will have to go out of your way to make a computer architecture
    > incompatible with garbage collected and heap allocated binary code,
    > something I've been told SBCL does internally [1] to create an archi-
    > tecture that has different

    I havenrCOt gone into the weeds of the GNU Emacs native-compiled function implementation, but it has to be doing something similar. The functions are not in the data segment, theyrCOre not in BSS, theyrCOre not on the stack; that leaves the heap.

    And not to mention the operating system interfaces. I'll name mmap(),
    and Win32 has its equivalent, and while I'm not sure, OpenVMS might be different too.

    All of them return the equivalent of void *. So what are the programmers of the JVM, CLR, and other virtual machines to do? They'll have to rely on
    this "undefined behaviour."

    Well, they have to port to the various platforms, thatrCOs all. And hope the platform defines the behaviour.

    > * sizeof ( void * ), and
    > * sizeof ( void (*)( void ) ),
    >
    > and when you do that, I'll just claim you're making a /malicious
    > computer architecture/ and refuse to use it.

    Note that GCC on AMD64 produces function pointers that are one-byte aligned, which to me is a similar philosophy. There cannot be any performance advantage to that.

    Can you please expand on that? I'm not sure what you mean, and I hope
    it doesn't create function pointers at strictly odd addresses, because that's what it sounds like to me.

    https://lidell.nu/xemacs-buildbot/#/builders/14/builds/690 throws an assertion failure because I was storing a function pointer into a Lisp fixnum, which has 63 bits of precision. The least significant bit of the function pointer was set.
    --
    rCyAs I sat looking up at the Guinness ad, I could never figure out /
    How your man stayed up on the surfboard after fourteen pints of stoutrCO
    (C. Moore)
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Johann 'Myrkraverk' Oskarsson@johann@myrkraverk.invalid to comp.lang.c,comp.lang.lisp,comp.theory,comp.emacs.xemacs on Fri Aug 7 06:31:31 2026
    From Newsgroup: comp.lang.lisp

    On 07/08/2026 5:55 AM, Kaz Kylheku wrote:
    On 2026-08-04, Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> wrote:

    Dear Kaz,

    I'll let you have the final word on what you said in you previous post,
    and not comment further on the things I snipped from this one.

    So my take on it, is that the standard thumping trolls in comp.lang.c
    were already a problem in the 90s. They just didn't know it, didn't
    care, and nobody challenged them about it. Until now.

    On the contrary, standard-thumping in comp.lang.c has been regularly challenged for decades by numerous visitors; everyone who tried it so
    far bounced off, and came down with an unpleasant bump. :)


    Thank you for the warning. I'll endeavour not to run out of stamina,
    and plan to spend my attribute points in stamina on my next level up.

    These standard thumping trolls do need to be challanged, and right-
    fully so. There are ways to do it, and there are ways that -- result
    in failure. I hope my method will be a success, and we'll know in a
    few years how well I did.

    Thanks to disbelief in me, I have added surrealism to my attack vector,
    and that irritates the standard thumping trolls even further. And it
    makes me happier.


    Good luck, and happy C compiling!
    --
    Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
    I'm not from the Internet, I just work there. | via Easynews.com https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Johann 'Myrkraverk' Oskarsson@johann@myrkraverk.invalid to comp.lang.lisp on Fri Aug 7 06:45:22 2026
    From Newsgroup: comp.lang.lisp

    On 07/08/2026 6:01 AM, Aidan Kehoe wrote:

    Ar an c||igi|| l|i de m|! L||nasa, scr|!obh Johann Oskarsson:

    > On 04/08/2026 2:51 AM, Aidan Kehoe wrote:
    >
    > Hello Aidan,
    >
    > We haven't spoken for a long time, and I guess we're moving in different
    > social circles now.

    I spent 2012-present debugging people, and until 2021ish without the time away
    from that to maintain a social circle or do any XEmacs work. My social circle just shrank!

    > You will find it amusing that my patch to the FreeBSD kernel, the one
    > that kind of tunes the TCP/IP stack, is presumably used by Whatsapp as
    > well.
    >
    > At least, that's the rumor I heard; I wouldn't know the truth as I don't
    > work for Whatsapp. I thought only 5ch and Netflix had sites large
    > enough to make use of it. Well, sites both large enough, and hosted on
    > FreeBSD.
    >
    > I promised myself to look into it later, and if I'm right -- at least,
    > that my patch is still there and all -- I'll let you know.

    Good.

    > It's always fun to know that whenever someone streams from Netflix, the
    > TCP/IP patch I applied is being used; though I cannot say that it
    > streams through my code; it wasn't that kind of patch.
    >
    > And I didn't, and don't work for Netflix either.
    >
    > I hope you're also leaving trails of patches in various operating
    > systems that everyone on the planet, more or less, makes use of.

    ThererCOs enough to do with XEmacs plus running a business plus a three year old
    daughter plus a fianc|-e, that I donrCOt anticipate any OS patches from me this
    decade. Still, I save lives, and more importantly, prevent large strokes.

    Welcome to the happy family life. I wish you all the success with it!


    > > Ar an tri|| l|i de m|! L||nasa, scr|!obh Johann Oskarsson:
    > >
    > > > On 03/08/2026 6:28 PM, David Brown wrote:
    > > > > On 03/08/2026 11:41, Richard Harnden wrote:
    > > > >> On 03/08/2026 09:16, David Brown wrote:
    > > > >
    > > > >>> On most targets, function pointers are the same size as void*
    > > > >>> pointers. But there are exceptions, with some small
    > > > >>> microcontrollers and DSPs having different kinds of pointers with
    > > > >>> different sizes, depending on the memory space involved.-a I have
    > > > >>> yet to see a situation where there was any reason for storing a
    > > > >>> function address in a "void*" rather than a more appropriate
    > > > >>> typedef, such as :
    > > > >>>
    > > > >>> -a-a-a-a-atypedef void (*FVoid)(void);
    > > > >>
    > > > >> dlsym requires that pointer-to-function is compatible with a void*
    > > > >
    > > > > As I say, I have yet to see a situation where using void* for
    > > > > function pointers was more appropriate than using a function pointer
    > > > > type.-a If the OS system calls or standard OS libraries makes it a
    > > > > requirement that function pointers are converted to or from void*
    > > > > for some calls, then of course you need to follow those requirements
    > > > > - it's the people who designed the interfaces that made questionable
    > > > > design choices.
    > > >
    > > > Nope, you're wrong. You're dead wrong. The world isn't built on C,
    > > > even though here in comp.lang.c we like to pretend it is.
    > >
    > > The habit when I read comp.lang.c it was to assert that standard C was
    > > all that was worth discussing (yes, yes, itrCOs phrased as standard C is on
    > > topic, everything else isnrCOt; but there wasnrCOt the activity in the
    > > architecture-specific groups for them to be helpful when I was reading
    > > it). This is even more ridiculous; almost all the C infrastructure out
    > > there relies on what is undefined behaviour by the letter of the
    > > standard. But itrCOs still C, and itrCOs worth understanding and worth
    > > writing.
    >
    > Yes, I remember that. I believe I came across a FAQ, probably comp.os.
    > msdos.programmer, that said because comp.lang.c was full of standard
    > thumping trolls, a lot of regular programming, even Win32 got discussed
    > there. Yes, I'll quote.
    >
    > > Why does the newsgroup seem to be so C-oriented sometimes?
    > > There are two reasons. First, comp.lang.c and
    > > comp.lang.pascal have evolved in different
    > > directions. Comp.lang.pascal has split into discussions
    > > about individual Pascal compilers. comp.lang.pascal.borland
    > > welcomes discussion specific to Turbo Pascal, and the other
    > > new groups likewise. Turbo Pascal programmers tend to find
    > > DOS questions welcomed in comp.lang.pascal.borland, so that
    > > comp.os.msdos.programmer gets less of the "DOS in Turbo
    > > Pascal" traffic. On the other hand, comp.lang.c has stayed
    > > closer to talking only about the C language, and
    > > vendor-specific or operating-system-specific questions are
    > > not welcome. This tends to push questions about disks, DOS
    > > file structure, video, the keyboard, TSRs, etc. to
    > > comp.os.msdos.programmer even when those programs are
    > > written in C.
    >
    > So my take on it, is that the standard thumping trolls in comp.lang.c were
    > already a problem in the 90s. They just didn't know it, didn't care, and
    > nobody challenged them about it. Until now.

    Most of my comp.lang.c was the turn of the millennium. I donrCOt have the desire or spare time at the moment to read more newsgroups, and IrCOm happy with
    my command of C.


    I've only increased my knowledge of C over the past few years. And
    since I also want to teach it -- and I've done a stint of both paid
    and unpaid tutorship of it -- I've amassed a decent library of beginners
    books, in addition to the more advanced topics.

    There are still nooks and crannies I've questioned recently, and I
    believe some of my experiments warrant yet another beginners book.

    We'll just have to see if I'll write one, as I'm also not in a hurry
    about that.


    > I am challenging their rule. And they can whine, and they can bluster,
    > but nobody cares about their mistaken sense of prestige and power.
    >
    > They claim my cross posting is annoying. As far as I'm aware, I'm
    > basically screaming into the void with my cross posts, because there
    > isn't enough traffic in the other groups to warrant complaints about it.

    Fight on! Alternatively put the time into XEmacs (or packages) work, which is,
    a better use of your time. (From my perspective, and probably in the grand scheme of things; neither of is likely to make any difference to comp.lang.c.)

    XEmacs wasn't on my horizon until I started to write this reply. I'm
    not sure how I can be immediately useful, but I'll do my best to at
    least help out with the little tasks. See you on the XEmacs devel
    list about more of that, and you'll know when I've started to read
    it again. I'll reply to something.


    > > Oh well, thank you the autoconf maintainers, thank you the cmake
    > > maintainers, shame about the difficulty with cross-compiling.
    >
    > On that subject, I have to agree. I've largely given up on both for my own
    > projects. The problems with these tools isn't when they work, it's when they
    > don't. It can be a nightmare to get to the first build on a platform where
    > the build system doesn't work.

    Well, itrCOs just one more platform to learn. I would love to move XEmacs to cmake, given it would unify the POSIX and Windows build systems, but it would be a huge investment of time to port it over, because I know autoconf but I donrCOt know cmake.


    Sometimes it's better to /boot strap/ the code, and just compile things
    by hand for the first time. I've done that for some projects, but
    others are harder to figure out. I'll just point to my recent effort to
    hand build the Korn shell in comp.unix.shell; which I'm sure you won't
    read, having a full life and all.


    > I currently believe both tools make porting to a /different enough platform/
    > basically impossible. And that's based on hard earned experience.

    My understanding is that cmake just requires a C compiler, no shell, no other dependencies, so it should manage a different enough platform that has a C compiler without problems. This is its attraction over autoconf, which requires /bin/sh at least, and pragmatically more of POSIX.

    Way back when, when cmake was new, they didn't support cross compiling.
    And that made me write it off. Since then, it's become more complex,
    and I'm not sure it's well suited to my own projects.

    At work, I just use what they use there.


    > > > Several language environments allow function generation on the fly,
    > > > these functions need to be garbage collected. Common Lisp is an
    > > > example, therefore comp.lang.lisp is added to this discussion.
    > > >
    > > > I've also added comp.theory so Mild Shock can comment.
    > > >
    > > > You will have to go out of your way to make a computer architecture
    > > > incompatible with garbage collected and heap allocated binary code,
    > > > something I've been told SBCL does internally [1] to create an archi-
    > > > tecture that has different
    > >
    > > I havenrCOt gone into the weeds of the GNU Emacs native-compiled function
    > > implementation, but it has to be doing something similar. The functions
    > > are not in the data segment, theyrCOre not in BSS, theyrCOre not on the
    > > stack; that leaves the heap.
    >
    > And not to mention the operating system interfaces. I'll name mmap(),
    > and Win32 has its equivalent, and while I'm not sure, OpenVMS might be
    > different too.
    >
    > All of them return the equivalent of void *. So what are the programmers of
    > the JVM, CLR, and other virtual machines to do? They'll have to rely on
    > this "undefined behaviour."

    Well, they have to port to the various platforms, thatrCOs all. And hope the platform defines the behaviour.
    > >
    > > > * sizeof ( void * ), and
    > > > * sizeof ( void (*)( void ) ),
    > > >
    > > > and when you do that, I'll just claim you're making a /malicious
    > > > computer architecture/ and refuse to use it.
    > >
    > > Note that GCC on AMD64 produces function pointers that are one-byte
    > > aligned, which to me is a similar philosophy. There cannot be any
    > > performance advantage to that.
    >
    > Can you please expand on that? I'm not sure what you mean, and I hope
    > it doesn't create function pointers at strictly odd addresses, because
    > that's what it sounds like to me.

    https://lidell.nu/xemacs-buildbot/#/builders/14/builds/690 throws an assertion
    failure because I was storing a function pointer into a Lisp fixnum, which has
    63 bits of precision. The least significant bit of the function pointer was set.


    I hope you figure it out. Right now, I have n+1 projects cooking, and
    I'm not in a hurry to help with XEmacs.


    Best of luck with your new life!
    --
    Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
    I'm not from the Internet, I just work there. | via Easynews.com https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Mild Shock@janburse@fastmail.fm to comp.lang.c,comp.lang.lisp,comp.theory on Fri Aug 7 14:37:45 2026
    From Newsgroup: comp.lang.lisp

    Hi,

    How it started, NVIDIA being cool:

    NCCL provides routines such as all-gather,
    all-reduce, broadcast, reduce, reduce-scatter,
    and point-to-point send and receive. These
    routines are optimized to achieve high
    bandwidth and low latency over PCIe,
    NVIDIA NVLinkrao, and other high-speed
    interconnects within a node and over
    NVIDIA networking across nodes.
    https://developer.nvidia.com/nccl

    How its going, vLLM trying to be cool:

    [RFC]: Native Weight Syncing APIs
    However, there are no standardized methods for
    performing online weight syncing. Open source projects
    like SkyRL, VeRL, and TRL need to include their
    own implementations of the weight syncing
    infrastructure, leading to added complexity
    for developers seeking to adopt vLLM as their
    inference server for post-training workloads. https://github.com/vllm-project/vllm/issues/31848

    How much Workers are enough? I guess it depends
    on I/O parallelism, CPU Memory parallelism, CPU
    Processing parallelism, and now also

    GPU Memory parallelism and GPU Processing
    parallelism, and last but least you might have
    a couple DMAs sitting here and there,

    or even invoking a sort of RDMA. Quite amazing!

    Bye

    Mild Shock schrieb:
    Hi,

    Well there are two viewpoint, the "client"
    of the GPU, which is the CPU, and the "server"
    of the GPU, which is the command processor

    queue of the GPU device. So basically as
    a CPU client I can write the memory area,
    that is later mapped to my GPU code storage.

    And this way have a compiler, even written
    in Prolog, that compiles pi-WAM to my Hack VM,
    that can then be then deployed to GPU.

    You could also try the same with a Tiny
    LISP VM. And a grown up LISP to act as
    the compiler. Would be a similar exercise.

    Have Fun!

    Bye

    Mild Shock schrieb:
    Hi,

    I've also added comp.theory so Mild Shock can comment.

    that has different
    *-a sizeof ( void * ), and
    *-a sizeof ( void (*)( void ) ),

    Could indicate a data RAM and code ROM model.
    Which has then the advantage of:

    Modern operating systems like Windows 11
    enforce strict Data Execution Prevention (DEP)
    (or NX/XD bit security features) to prevent
    malicious programs from injecting and executing
    code inside data-only memory regions.
    https://root-nation.com/en/soft-en/lifehacks/en-dep-windows-all-about/

    I adopted data RAM and code ROM model for
    pi-WAM from Hack, which has the same separation:

    Slide 58, Hack Computer
    https://drive.google.com/file/d/1Z_fxYmmRNXTkAzmZ6YMoX9NXZIRVCKiw/view

    But my motivation was not Johnny Depp prevention.
    Rather the caching of GPUs. Because WGSL
    allows storage annotations read_write and

    read. I use read_write for the data RAM
    of my Hack VM variant, and read for the
    code ROM of my Hack VM variant. You can

    see that here, its open source:

    @group(0) @binding(0) var<storage, read> code: array<i32>;
    @group(0) @binding(1) var<storage, read_write> state: array<i32>;

    11.4 Giga Lips with a Budget Laptop
    https://github.com/Jean-Luc-Picard-2021/gigabudget

    Hope this Helps!

    Bye

    Johann 'Myrkraverk' Oskarsson schrieb:
    On 03/08/2026 6:28 PM, David Brown wrote:
    On 03/08/2026 11:41, Richard Harnden wrote:
    On 03/08/2026 09:16, David Brown wrote:

    On most targets, function pointers are the same size as void*
    pointers. But there are exceptions, with some small
    microcontrollers and DSPs having different kinds of pointers with >>>>>> different sizes, depending on the memory space involved.-a I have >>>>>> yet to see a situation where there was any reason for storing a
    function address in a "void*" rather than a more appropriate
    typedef, such as :

    -a-a-a-a-atypedef void (*FVoid)(void);

    dlsym requires that pointer-to-function is compatible with a void*


    As I say, I have yet to see a situation where using void* for
    function pointers was more appropriate than using a function pointer
    type.-a If the OS system calls or standard OS libraries makes it a
    requirement that function pointers are converted to or from void*
    for some calls, then of course you need to follow those requirements
    - it's the people who designed the interfaces that made questionable
    design choices.


    Nope, you're wrong.-a You're dead wrong.-a The world isn't built on C,
    even though here in comp.lang.c we like to pretend it is.

    Several language environments allow function generation on the fly,
    these functions need to be garbage collected.-a Common Lisp is an
    example, therefore comp.lang.lisp is added to this discussion.

    I've also added comp.theory so Mild Shock can comment.

    You will have to go out of your way to make a computer architecture
    incompatible with garbage collected and heap allocated binary code,
    something I've been told SBCL does internally [1] to create an archi-
    tecture that has different

    *-a sizeof ( void * ), and
    *-a sizeof ( void (*)( void ) ),

    and when you do that, I'll just claim you're making a /malicious
    computer architecture/ and refuse to use it.


    [1] I've not looked at the code, but told the garbage collector can
    and will at least move the code around, if not collect it.



    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Mild Shock@janburse@fastmail.fm to comp.lang.c,comp.lang.lisp,comp.theory on Fri Aug 7 18:07:46 2026
    From Newsgroup: comp.lang.lisp

    Hi,

    Recently there was a paper somebody mentioning
    a flit doing a ACK or NACK, to express
    backpressure inside a Network on a Chip.

    But what is a flit? It seems multiple
    flits can be used to create the message
    passing in one directiob before the

    ACK or NACK in the other direction?

    "The growing need for performance from
    computing systems drove the industry into
    the multi-core and many-core arena. In this
    setup, the execution of a kernel (a program)
    is split across multiple processors and the
    computation happens in parallel

    Flits represent logical units of information,
    while phits represent the physical domain,
    that is, phits represent the number of bits
    that can be transferred in parallel in a
    single cycle. Consider the Cray T3D. It has
    an interconnection network which uses

    flit level message flow control wherein each
    flit is composed of eight 16-bit phits. That
    means its flit size is 128bits and phit size
    is 16bits. Also consider the IBM SP2 switch.
    It also uses the flit level message flow
    control, but its flit size is equal to its
    phit size, which is set to 8 bits." https://en.wikipedia.org/wiki/Flit_(computer_networking)#Example

    Well my idea how this is realized in silicon
    is rather foggy, I mean even the Hack project
    from Nand 2 Tetris, does not show some gate level
    schemes for flits and phits.

    Could be an interesting extension. But somehow
    the image of flits and phits inspired my channel
    objects here below. But I am afraid they are fire
    and forget, no ACK and NACK:

    -C-WAM Contest: 1 Million Packets with Prolog https://medium.com/2989/ec3e91551773

    Its amazing that a max_size(1) buffer
    can beat an unbounded buffer!

    LoL

    Bye

    Mild Shock schrieb:
    Hi,

    How it started, NVIDIA being cool:

    NCCL provides routines such as all-gather,
    all-reduce, broadcast, reduce, reduce-scatter,
    and point-to-point send and receive. These
    routines are optimized to achieve high
    bandwidth and low latency over PCIe,
    NVIDIA NVLinkrao, and other high-speed
    interconnects within a node and over
    NVIDIA networking across nodes.
    https://developer.nvidia.com/nccl

    How its going, vLLM trying to be cool:

    [RFC]: Native Weight Syncing APIs
    However, there are no standardized methods for
    performing online weight syncing. Open source projects
    like SkyRL, VeRL, and TRL need to include their
    own implementations of the weight syncing
    infrastructure, leading to added complexity
    for developers seeking to adopt vLLM as their
    inference server for post-training workloads. https://github.com/vllm-project/vllm/issues/31848

    How much Workers are enough? I guess it depends
    on I/O parallelism, CPU Memory parallelism, CPU
    Processing parallelism, and now also

    GPU Memory parallelism and GPU Processing
    parallelism, and last but least you might have
    a couple DMAs sitting here and there,

    or even invoking a sort of RDMA. Quite amazing!

    Bye

    Mild Shock schrieb:
    Hi,

    Well there are two viewpoint, the "client"
    of the GPU, which is the CPU, and the "server"
    of the GPU, which is the command processor

    queue of the GPU device. So basically as
    a CPU client I can write the memory area,
    that is later mapped to my GPU code storage.

    And this way have a compiler, even written
    in Prolog, that compiles pi-WAM to my Hack VM,
    that can then be then deployed to GPU.

    You could also try the same with a Tiny
    LISP VM. And a grown up LISP to act as
    the compiler. Would be a similar exercise.

    Have Fun!

    Bye

    Mild Shock schrieb:
    Hi,

    I've also added comp.theory so Mild Shock can comment.

    that has different
    *-a sizeof ( void * ), and
    *-a sizeof ( void (*)( void ) ),

    Could indicate a data RAM and code ROM model.
    Which has then the advantage of:

    Modern operating systems like Windows 11
    enforce strict Data Execution Prevention (DEP)
    (or NX/XD bit security features) to prevent
    malicious programs from injecting and executing
    code inside data-only memory regions.
    https://root-nation.com/en/soft-en/lifehacks/en-dep-windows-all-about/

    I adopted data RAM and code ROM model for
    pi-WAM from Hack, which has the same separation:

    Slide 58, Hack Computer
    https://drive.google.com/file/d/1Z_fxYmmRNXTkAzmZ6YMoX9NXZIRVCKiw/view

    But my motivation was not Johnny Depp prevention.
    Rather the caching of GPUs. Because WGSL
    allows storage annotations read_write and

    read. I use read_write for the data RAM
    of my Hack VM variant, and read for the
    code ROM of my Hack VM variant. You can

    see that here, its open source:

    @group(0) @binding(0) var<storage, read> code: array<i32>;
    @group(0) @binding(1) var<storage, read_write> state: array<i32>;

    11.4 Giga Lips with a Budget Laptop
    https://github.com/Jean-Luc-Picard-2021/gigabudget

    Hope this Helps!

    Bye

    Johann 'Myrkraverk' Oskarsson schrieb:
    On 03/08/2026 6:28 PM, David Brown wrote:
    On 03/08/2026 11:41, Richard Harnden wrote:
    On 03/08/2026 09:16, David Brown wrote:

    On most targets, function pointers are the same size as void*
    pointers. But there are exceptions, with some small
    microcontrollers and DSPs having different kinds of pointers with >>>>>>> different sizes, depending on the memory space involved.-a I have >>>>>>> yet to see a situation where there was any reason for storing a >>>>>>> function address in a "void*" rather than a more appropriate
    typedef, such as :

    -a-a-a-a-atypedef void (*FVoid)(void);

    dlsym requires that pointer-to-function is compatible with a void* >>>>>>

    As I say, I have yet to see a situation where using void* for
    function pointers was more appropriate than using a function
    pointer type.-a If the OS system calls or standard OS libraries
    makes it a requirement that function pointers are converted to or
    from void* for some calls, then of course you need to follow those
    requirements - it's the people who designed the interfaces that
    made questionable design choices.


    Nope, you're wrong.-a You're dead wrong.-a The world isn't built on C, >>>> even though here in comp.lang.c we like to pretend it is.

    Several language environments allow function generation on the fly,
    these functions need to be garbage collected.-a Common Lisp is an
    example, therefore comp.lang.lisp is added to this discussion.

    I've also added comp.theory so Mild Shock can comment.

    You will have to go out of your way to make a computer architecture
    incompatible with garbage collected and heap allocated binary code,
    something I've been told SBCL does internally [1] to create an archi-
    tecture that has different

    *-a sizeof ( void * ), and
    *-a sizeof ( void (*)( void ) ),

    and when you do that, I'll just claim you're making a /malicious
    computer architecture/ and refuse to use it.


    [1] I've not looked at the code, but told the garbage collector can
    and will at least move the code around, if not collect it.




    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Mild Shock@janburse@fastmail.fm to comp.lang.c,comp.lang.lisp,comp.theory on Sun Aug 9 21:22:01 2026
    From Newsgroup: comp.lang.lisp

    Hi,

    How it started:

    Filming a vitamin B12 photoreceptor in action https://www.psi.ch/de/news/science-features/filming-a-vitamin-b12-photoreceptor-in-action

    How its going:

    Elon Musk's potential FEL route could challenge EUV lithography https://www.kucoin.com/news/flash/elon-musk-s-potential-fel-route-could-challenge-euv-lithography

    Who will win the Nano Atom mover race,

    will the USA OutChip its competitor China
    and its supplier Asia in the next years?

    Bye

    Mild Shock schrieb:
    Hi,

    Recently there was a paper somebody mentioning
    a flit doing a ACK or NACK, to express
    backpressure inside a Network on a Chip.

    But what is a flit? It seems multiple
    flits can be used to create the message
    passing in one directiob before the

    ACK or NACK in the other direction?

    "The growing need for performance from
    computing systems drove the industry into
    the multi-core and many-core arena. In this
    setup, the execution of a kernel (a program)
    is split across multiple processors and the
    computation happens in parallel

    Flits represent logical units of information,
    while phits represent the physical domain,
    that is, phits represent the number of bits
    that can be transferred in parallel in a
    single cycle. Consider the Cray T3D. It has
    an interconnection network which uses

    flit level message flow control wherein each
    flit is composed of eight 16-bit phits. That
    means its flit size is 128bits and phit size
    is 16bits. Also consider the IBM SP2 switch.
    It also uses the flit level message flow
    control, but its flit size is equal to its
    phit size, which is set to 8 bits." https://en.wikipedia.org/wiki/Flit_(computer_networking)#Example

    Well my idea how this is realized in silicon
    is rather foggy, I mean even the Hack project
    from Nand 2 Tetris, does not show some gate level
    schemes for flits and phits.

    Could be an interesting extension. But somehow
    the image of flits and phits inspired my channel
    objects here below. But I am afraid they are fire
    and forget, no ACK and NACK:

    -C-WAM Contest: 1 Million Packets with Prolog https://medium.com/2989/ec3e91551773

    Its amazing that a max_size(1) buffer
    can beat an unbounded buffer!

    LoL

    Bye

    Mild Shock schrieb:
    Hi,

    How it started, NVIDIA being cool:

    NCCL provides routines such as all-gather,
    all-reduce, broadcast, reduce, reduce-scatter,
    and point-to-point send and receive. These
    routines are optimized to achieve high
    bandwidth and low latency over PCIe,
    NVIDIA NVLinkrao, and other high-speed
    interconnects within a node and over
    NVIDIA networking across nodes.
    https://developer.nvidia.com/nccl

    How its going, vLLM trying to be cool:

    [RFC]: Native Weight Syncing APIs
    However, there are no standardized methods for
    performing online weight syncing. Open source projects
    like SkyRL, VeRL, and TRL need to include their
    own implementations of the weight syncing
    infrastructure, leading to added complexity
    for developers seeking to adopt vLLM as their
    inference server for post-training workloads.
    https://github.com/vllm-project/vllm/issues/31848

    How much Workers are enough? I guess it depends
    on I/O parallelism, CPU Memory parallelism, CPU
    Processing parallelism, and now also

    GPU Memory parallelism and GPU Processing
    parallelism, and last but least you might have
    a couple DMAs sitting here and there,

    or even invoking a sort of RDMA. Quite amazing!

    Bye

    Mild Shock schrieb:
    Hi,

    Well there are two viewpoint, the "client"
    of the GPU, which is the CPU, and the "server"
    of the GPU, which is the command processor

    queue of the GPU device. So basically as
    a CPU client I can write the memory area,
    that is later mapped to my GPU code storage.

    And this way have a compiler, even written
    in Prolog, that compiles pi-WAM to my Hack VM,
    that can then be then deployed to GPU.

    You could also try the same with a Tiny
    LISP VM. And a grown up LISP to act as
    the compiler. Would be a similar exercise.

    Have Fun!

    Bye

    Mild Shock schrieb:
    Hi,

    I've also added comp.theory so Mild Shock can comment.

    that has different
    *-a sizeof ( void * ), and
    *-a sizeof ( void (*)( void ) ),

    Could indicate a data RAM and code ROM model.
    Which has then the advantage of:

    Modern operating systems like Windows 11
    enforce strict Data Execution Prevention (DEP)
    (or NX/XD bit security features) to prevent
    malicious programs from injecting and executing
    code inside data-only memory regions.
    https://root-nation.com/en/soft-en/lifehacks/en-dep-windows-all-about/ >>>>
    I adopted data RAM and code ROM model for
    pi-WAM from Hack, which has the same separation:

    Slide 58, Hack Computer
    https://drive.google.com/file/d/1Z_fxYmmRNXTkAzmZ6YMoX9NXZIRVCKiw/view >>>>
    But my motivation was not Johnny Depp prevention.
    Rather the caching of GPUs. Because WGSL
    allows storage annotations read_write and

    read. I use read_write for the data RAM
    of my Hack VM variant, and read for the
    code ROM of my Hack VM variant. You can

    see that here, its open source:

    @group(0) @binding(0) var<storage, read> code: array<i32>;
    @group(0) @binding(1) var<storage, read_write> state: array<i32>;

    11.4 Giga Lips with a Budget Laptop
    https://github.com/Jean-Luc-Picard-2021/gigabudget

    Hope this Helps!

    Bye

    Johann 'Myrkraverk' Oskarsson schrieb:
    On 03/08/2026 6:28 PM, David Brown wrote:
    On 03/08/2026 11:41, Richard Harnden wrote:
    On 03/08/2026 09:16, David Brown wrote:

    On most targets, function pointers are the same size as void* >>>>>>>> pointers. But there are exceptions, with some small
    microcontrollers and DSPs having different kinds of pointers
    with different sizes, depending on the memory space involved.-a I >>>>>>>> have yet to see a situation where there was any reason for
    storing a function address in a "void*" rather than a more
    appropriate typedef, such as :

    -a-a-a-a-atypedef void (*FVoid)(void);

    dlsym requires that pointer-to-function is compatible with a void* >>>>>>>

    As I say, I have yet to see a situation where using void* for
    function pointers was more appropriate than using a function
    pointer type.-a If the OS system calls or standard OS libraries
    makes it a requirement that function pointers are converted to or >>>>>> from void* for some calls, then of course you need to follow those >>>>>> requirements - it's the people who designed the interfaces that
    made questionable design choices.


    Nope, you're wrong.-a You're dead wrong.-a The world isn't built on C, >>>>> even though here in comp.lang.c we like to pretend it is.

    Several language environments allow function generation on the fly,
    these functions need to be garbage collected.-a Common Lisp is an
    example, therefore comp.lang.lisp is added to this discussion.

    I've also added comp.theory so Mild Shock can comment.

    You will have to go out of your way to make a computer architecture
    incompatible with garbage collected and heap allocated binary code,
    something I've been told SBCL does internally [1] to create an archi- >>>>> tecture that has different

    *-a sizeof ( void * ), and
    *-a sizeof ( void (*)( void ) ),

    and when you do that, I'll just claim you're making a /malicious
    computer architecture/ and refuse to use it.


    [1] I've not looked at the code, but told the garbage collector can
    and will at least move the code around, if not collect it.





    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Mild Shock@janburse@fastmail.fm to comp.lang.c,comp.lang.lisp,comp.theory on Tue Aug 11 16:27:35 2026
    From Newsgroup: comp.lang.lisp

    Hi,

    Now I implemented some multiple producer
    and multiple consumer channel objects for
    WebGPU. The only API to integrate it user

    facing into pi-WAM is this single predicate:

    /**
    * flit(C):
    * The predicate succeeds in C with a new channel. The channel
    * can be used from within GPU backed -C-WAM logical threads.
    */

    The Mac Neo is a Budget Monster. While the
    Ryzen AI Laptop cost around 1300.- CHF.
    The Mac Neo was around 600.- CHF with all

    extras. Here some performance results,
    checking out whether channel objects scale,
    when increasing their number to

    communicate the same 1 millon packets:

    Java performance:

    AI Laptop Single Double
    Ryzen 705.1 337.4
    Neo 669.4 239.9

    WebGPU performance:

    AI Laptop Single Double
    Ryzen 731.8 392.9
    Neo 932.8 483.5

    Cool! Java is also pretty cool, their
    semaphore library is top notch. I couldn't
    replicate the resulst with JavaScript yet,

    seems their Atomics.wait() resp. Atomics.waitAsync()
    is totally broken, using futex is mutex for
    fools somehow. I also found some gremlins

    attacking one of the GPUs. The Intel AI Laptop
    fails the above experiment. Maybe its a driver
    Vulkan versus OpenCL or something problem,

    or the Lunar lake architecture is nonsense.

    Bye

    Mild Shock schrieb:
    Hi,

    Recently there was a paper somebody mentioning
    a flit doing a ACK or NACK, to express
    backpressure inside a Network on a Chip.

    But what is a flit? It seems multiple
    flits can be used to create the message
    passing in one directiob before the

    ACK or NACK in the other direction?

    "The growing need for performance from
    computing systems drove the industry into
    the multi-core and many-core arena. In this
    setup, the execution of a kernel (a program)
    is split across multiple processors and the
    computation happens in parallel

    Flits represent logical units of information,
    while phits represent the physical domain,
    that is, phits represent the number of bits
    that can be transferred in parallel in a
    single cycle. Consider the Cray T3D. It has
    an interconnection network which uses

    flit level message flow control wherein each
    flit is composed of eight 16-bit phits. That
    means its flit size is 128bits and phit size
    is 16bits. Also consider the IBM SP2 switch.
    It also uses the flit level message flow
    control, but its flit size is equal to its
    phit size, which is set to 8 bits." https://en.wikipedia.org/wiki/Flit_(computer_networking)#Example

    Well my idea how this is realized in silicon
    is rather foggy, I mean even the Hack project
    from Nand 2 Tetris, does not show some gate level
    schemes for flits and phits.

    Could be an interesting extension. But somehow
    the image of flits and phits inspired my channel
    objects here below. But I am afraid they are fire
    and forget, no ACK and NACK:

    -C-WAM Contest: 1 Million Packets with Prolog https://medium.com/2989/ec3e91551773

    Its amazing that a max_size(1) buffer
    can beat an unbounded buffer!

    LoL

    Bye

    Mild Shock schrieb:
    Hi,

    How it started, NVIDIA being cool:

    NCCL provides routines such as all-gather,
    all-reduce, broadcast, reduce, reduce-scatter,
    and point-to-point send and receive. These
    routines are optimized to achieve high
    bandwidth and low latency over PCIe,
    NVIDIA NVLinkrao, and other high-speed
    interconnects within a node and over
    NVIDIA networking across nodes.
    https://developer.nvidia.com/nccl

    How its going, vLLM trying to be cool:

    [RFC]: Native Weight Syncing APIs
    However, there are no standardized methods for
    performing online weight syncing. Open source projects
    like SkyRL, VeRL, and TRL need to include their
    own implementations of the weight syncing
    infrastructure, leading to added complexity
    for developers seeking to adopt vLLM as their
    inference server for post-training workloads.
    https://github.com/vllm-project/vllm/issues/31848

    How much Workers are enough? I guess it depends
    on I/O parallelism, CPU Memory parallelism, CPU
    Processing parallelism, and now also

    GPU Memory parallelism and GPU Processing
    parallelism, and last but least you might have
    a couple DMAs sitting here and there,

    or even invoking a sort of RDMA. Quite amazing!

    Bye

    Mild Shock schrieb:
    Hi,

    Well there are two viewpoint, the "client"
    of the GPU, which is the CPU, and the "server"
    of the GPU, which is the command processor

    queue of the GPU device. So basically as
    a CPU client I can write the memory area,
    that is later mapped to my GPU code storage.

    And this way have a compiler, even written
    in Prolog, that compiles pi-WAM to my Hack VM,
    that can then be then deployed to GPU.

    You could also try the same with a Tiny
    LISP VM. And a grown up LISP to act as
    the compiler. Would be a similar exercise.

    Have Fun!

    Bye

    Mild Shock schrieb:
    Hi,

    I've also added comp.theory so Mild Shock can comment.

    that has different
    *-a sizeof ( void * ), and
    *-a sizeof ( void (*)( void ) ),

    Could indicate a data RAM and code ROM model.
    Which has then the advantage of:

    Modern operating systems like Windows 11
    enforce strict Data Execution Prevention (DEP)
    (or NX/XD bit security features) to prevent
    malicious programs from injecting and executing
    code inside data-only memory regions.
    https://root-nation.com/en/soft-en/lifehacks/en-dep-windows-all-about/ >>>>
    I adopted data RAM and code ROM model for
    pi-WAM from Hack, which has the same separation:

    Slide 58, Hack Computer
    https://drive.google.com/file/d/1Z_fxYmmRNXTkAzmZ6YMoX9NXZIRVCKiw/view >>>>
    But my motivation was not Johnny Depp prevention.
    Rather the caching of GPUs. Because WGSL
    allows storage annotations read_write and

    read. I use read_write for the data RAM
    of my Hack VM variant, and read for the
    code ROM of my Hack VM variant. You can

    see that here, its open source:

    @group(0) @binding(0) var<storage, read> code: array<i32>;
    @group(0) @binding(1) var<storage, read_write> state: array<i32>;

    11.4 Giga Lips with a Budget Laptop
    https://github.com/Jean-Luc-Picard-2021/gigabudget

    Hope this Helps!

    Bye

    Johann 'Myrkraverk' Oskarsson schrieb:
    On 03/08/2026 6:28 PM, David Brown wrote:
    On 03/08/2026 11:41, Richard Harnden wrote:
    On 03/08/2026 09:16, David Brown wrote:

    On most targets, function pointers are the same size as void* >>>>>>>> pointers. But there are exceptions, with some small
    microcontrollers and DSPs having different kinds of pointers
    with different sizes, depending on the memory space involved.-a I >>>>>>>> have yet to see a situation where there was any reason for
    storing a function address in a "void*" rather than a more
    appropriate typedef, such as :

    -a-a-a-a-atypedef void (*FVoid)(void);

    dlsym requires that pointer-to-function is compatible with a void* >>>>>>>

    As I say, I have yet to see a situation where using void* for
    function pointers was more appropriate than using a function
    pointer type.-a If the OS system calls or standard OS libraries
    makes it a requirement that function pointers are converted to or >>>>>> from void* for some calls, then of course you need to follow those >>>>>> requirements - it's the people who designed the interfaces that
    made questionable design choices.


    Nope, you're wrong.-a You're dead wrong.-a The world isn't built on C, >>>>> even though here in comp.lang.c we like to pretend it is.

    Several language environments allow function generation on the fly,
    these functions need to be garbage collected.-a Common Lisp is an
    example, therefore comp.lang.lisp is added to this discussion.

    I've also added comp.theory so Mild Shock can comment.

    You will have to go out of your way to make a computer architecture
    incompatible with garbage collected and heap allocated binary code,
    something I've been told SBCL does internally [1] to create an archi- >>>>> tecture that has different

    *-a sizeof ( void * ), and
    *-a sizeof ( void (*)( void ) ),

    and when you do that, I'll just claim you're making a /malicious
    computer architecture/ and refuse to use it.


    [1] I've not looked at the code, but told the garbage collector can
    and will at least move the code around, if not collect it.





    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Mild Shock@janburse@fastmail.fm to comp.lang.c,comp.lang.lisp,comp.theory on Tue Aug 11 16:51:52 2026
    From Newsgroup: comp.lang.lisp

    Hi,

    We didn't find yet a library for our Think that
    would support webgpu on the ARM architecture,
    so its back to the browser flag and testing there.

    The node.js package comes only with:

    dist
    +-- d3dcompiler_47.dll
    +-- darwin-universal.dawn.node
    +-- linux-arm64.dawn.node
    +-- linux-x64.dawn.node
    +-- win32-x64.dawn.node

    Its a similar situation like with SVN. In some
    communities its not common to provide a ARM build.
    They rather use x86 till the end of the universe.

    Although we think initiatives like the x86 Ecosystem
    Advisory Group could be a clever marketing trick to
    hide a funeral service. Adding "luminaries" such as

    Tim Sweeney and Linus Torvald to the panel, is even
    more so a joke, given that intel produces mutex bottlenecks
    instead of futex, where f stands for fast, in their GPU

    infrastructure. So who is the teacher and who are
    the students? But why even try to create a collation
    against ARM, it doesn't make any sense.

    Bye

    Mild Shock schrieb:
    Hi,

    Now I implemented some multiple producer
    and multiple consumer channel objects for
    WebGPU. The only API to integrate it user

    facing into pi-WAM is this single predicate:

    /**
    -a* flit(C):
    -a* The predicate succeeds in C with a new channel. The channel
    -a* can be used from within GPU backed -C-WAM logical threads.
    -a*/

    The Mac Neo is a Budget Monster. While the
    Ryzen AI Laptop cost around 1300.- CHF.
    The Mac Neo was around 600.- CHF with all

    extras. Here some performance results,
    checking out whether channel objects scale,
    when increasing their number to

    communicate the same 1 millon packets:

    Java performance:

    AI Laptop-a-a-a Single-a-a-a Double
    Ryzen-a-a-a 705.1-a-a-a 337.4
    Neo-a-a-a 669.4-a-a-a 239.9

    WebGPU performance:

    AI Laptop-a-a-a Single-a-a-a Double
    Ryzen-a-a-a 731.8-a-a-a 392.9
    Neo-a-a-a 932.8-a-a-a 483.5

    Cool! Java is also pretty cool, their
    semaphore library is top notch. I couldn't
    replicate the resulst with JavaScript yet,

    seems their Atomics.wait() resp. Atomics.waitAsync()
    is totally broken, using futex is mutex for
    fools somehow. I also found some gremlins

    attacking one of the GPUs. The Intel AI Laptop
    fails the above experiment. Maybe its a driver
    Vulkan versus OpenCL or something problem,

    or the Lunar lake architecture is nonsense.

    Bye

    Mild Shock schrieb:
    Hi,

    Recently there was a paper somebody mentioning
    a flit doing a ACK or NACK, to express
    backpressure inside a Network on a Chip.

    But what is a flit? It seems multiple
    flits can be used to create the message
    passing in one directiob before the

    ACK or NACK in the other direction?

    "The growing need for performance from
    computing systems drove the industry into
    the multi-core and many-core arena. In this
    setup, the execution of a kernel (a program)
    is split across multiple processors and the
    computation happens in parallel

    Flits represent logical units of information,
    while phits represent the physical domain,
    that is, phits represent the number of bits
    that can be transferred in parallel in a
    single cycle. Consider the Cray T3D. It has
    an interconnection network which uses

    flit level message flow control wherein each
    flit is composed of eight 16-bit phits. That
    means its flit size is 128bits and phit size
    is 16bits. Also consider the IBM SP2 switch.
    It also uses the flit level message flow
    control, but its flit size is equal to its
    phit size, which is set to 8 bits."
    https://en.wikipedia.org/wiki/Flit_(computer_networking)#Example

    Well my idea how this is realized in silicon
    is rather foggy, I mean even the Hack project
    from Nand 2 Tetris, does not show some gate level
    schemes for flits and phits.

    Could be an interesting extension. But somehow
    the image of flits and phits inspired my channel
    objects here below. But I am afraid they are fire
    and forget, no ACK and NACK:

    -C-WAM Contest: 1 Million Packets with Prolog
    https://medium.com/2989/ec3e91551773

    Its amazing that a max_size(1) buffer
    can beat an unbounded buffer!

    LoL

    Bye

    Mild Shock schrieb:
    Hi,

    How it started, NVIDIA being cool:

    NCCL provides routines such as all-gather,
    all-reduce, broadcast, reduce, reduce-scatter,
    and point-to-point send and receive. These
    routines are optimized to achieve high
    bandwidth and low latency over PCIe,
    NVIDIA NVLinkrao, and other high-speed
    interconnects within a node and over
    NVIDIA networking across nodes.
    https://developer.nvidia.com/nccl

    How its going, vLLM trying to be cool:

    [RFC]: Native Weight Syncing APIs
    However, there are no standardized methods for
    performing online weight syncing. Open source projects
    like SkyRL, VeRL, and TRL need to include their
    own implementations of the weight syncing
    infrastructure, leading to added complexity
    for developers seeking to adopt vLLM as their
    inference server for post-training workloads.
    https://github.com/vllm-project/vllm/issues/31848

    How much Workers are enough? I guess it depends
    on I/O parallelism, CPU Memory parallelism, CPU
    Processing parallelism, and now also

    GPU Memory parallelism and GPU Processing
    parallelism, and last but least you might have
    a couple DMAs sitting here and there,

    or even invoking a sort of RDMA. Quite amazing!

    Bye

    Mild Shock schrieb:
    Hi,

    Well there are two viewpoint, the "client"
    of the GPU, which is the CPU, and the "server"
    of the GPU, which is the command processor

    queue of the GPU device. So basically as
    a CPU client I can write the memory area,
    that is later mapped to my GPU code storage.

    And this way have a compiler, even written
    in Prolog, that compiles pi-WAM to my Hack VM,
    that can then be then deployed to GPU.

    You could also try the same with a Tiny
    LISP VM. And a grown up LISP to act as
    the compiler. Would be a similar exercise.

    Have Fun!

    Bye

    Mild Shock schrieb:
    Hi,

    I've also added comp.theory so Mild Shock can comment.

    that has different
    *-a sizeof ( void * ), and
    *-a sizeof ( void (*)( void ) ),

    Could indicate a data RAM and code ROM model.
    Which has then the advantage of:

    Modern operating systems like Windows 11
    enforce strict Data Execution Prevention (DEP)
    (or NX/XD bit security features) to prevent
    malicious programs from injecting and executing
    code inside data-only memory regions.
    https://root-nation.com/en/soft-en/lifehacks/en-dep-windows-all-about/ >>>>>
    I adopted data RAM and code ROM model for
    pi-WAM from Hack, which has the same separation:

    Slide 58, Hack Computer
    https://drive.google.com/file/d/1Z_fxYmmRNXTkAzmZ6YMoX9NXZIRVCKiw/view >>>>>
    But my motivation was not Johnny Depp prevention.
    Rather the caching of GPUs. Because WGSL
    allows storage annotations read_write and

    read. I use read_write for the data RAM
    of my Hack VM variant, and read for the
    code ROM of my Hack VM variant. You can

    see that here, its open source:

    @group(0) @binding(0) var<storage, read> code: array<i32>;
    @group(0) @binding(1) var<storage, read_write> state: array<i32>;

    11.4 Giga Lips with a Budget Laptop
    https://github.com/Jean-Luc-Picard-2021/gigabudget

    Hope this Helps!

    Bye

    Johann 'Myrkraverk' Oskarsson schrieb:
    On 03/08/2026 6:28 PM, David Brown wrote:
    On 03/08/2026 11:41, Richard Harnden wrote:
    On 03/08/2026 09:16, David Brown wrote:

    On most targets, function pointers are the same size as void* >>>>>>>>> pointers. But there are exceptions, with some small
    microcontrollers and DSPs having different kinds of pointers >>>>>>>>> with different sizes, depending on the memory space involved. >>>>>>>>> I have yet to see a situation where there was any reason for >>>>>>>>> storing a function address in a "void*" rather than a more
    appropriate typedef, such as :

    -a-a-a-a-atypedef void (*FVoid)(void);

    dlsym requires that pointer-to-function is compatible with a void* >>>>>>>>

    As I say, I have yet to see a situation where using void* for
    function pointers was more appropriate than using a function
    pointer type.-a If the OS system calls or standard OS libraries >>>>>>> makes it a requirement that function pointers are converted to or >>>>>>> from void* for some calls, then of course you need to follow
    those requirements - it's the people who designed the interfaces >>>>>>> that made questionable design choices.


    Nope, you're wrong.-a You're dead wrong.-a The world isn't built on C, >>>>>> even though here in comp.lang.c we like to pretend it is.

    Several language environments allow function generation on the fly, >>>>>> these functions need to be garbage collected.-a Common Lisp is an
    example, therefore comp.lang.lisp is added to this discussion.

    I've also added comp.theory so Mild Shock can comment.

    You will have to go out of your way to make a computer architecture >>>>>> incompatible with garbage collected and heap allocated binary code, >>>>>> something I've been told SBCL does internally [1] to create an archi- >>>>>> tecture that has different

    *-a sizeof ( void * ), and
    *-a sizeof ( void (*)( void ) ),

    and when you do that, I'll just claim you're making a /malicious
    computer architecture/ and refuse to use it.


    [1] I've not looked at the code, but told the garbage collector can >>>>>> and will at least move the code around, if not collect it.






    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Kragen Javier Sitaker@kragen@canonical.org to comp.lang.c,comp.lang.lisp,comp.theory on Thu Sep 3 14:26:39 2026
    From Newsgroup: comp.lang.lisp

    scott@slp53.sl.home (Scott Lurndal) writes:
    Hey dipshit, you're responding to a post in comp.lang.c and
    cross-posting your reply to other unrelated groups. Please don't
    do that.

    My, my.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Kragen Javier Sitaker@kragen@canonical.org to comp.lang.c,comp.lang.lisp,comp.emacs on Thu Sep 3 14:37:53 2026
    From Newsgroup: comp.lang.lisp

    Aidan Kehoe <kehoea@parhasard.net> writes:
    I havenrCOt gone into the weeds of the GNU Emacs native-compiled function implementation, but it has to be doing something similar. The functions are not
    in the data segment, theyrCOre not in BSS, theyrCOre not on the stack; that leaves
    the heap.

    On amd64, at least, instead of running them from a heap, it seems to be compiling elisp into .so files which it can then dlopen(), but it names
    them `*.eln` instead of `*.so`:

    : ~; shuf -n 8 /proc/$(pidof emacs)/maps
    7f44e7cb3000-7f44e7cb4000 r--p 00005000 fe:01 1216485 /usr/lib/x86_64-linux-gnu/libgpm.so.2
    7f44e8e34000-7f44e8e47000 r--p 00000000 fe:01 1212779 /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0.5000.12
    7f44c4151000-7f44c4154000 rw-p 00005000 fe:05 1323730 /home/user/.emacs.d/eln-cache/28.2-66fa0d00/nxml-parse-79a53381-b87f8800.eln
    7f44c74a5000-7f44c74bb000 rw-p 00006000 fe:05 1320433 /home/user/.emacs.d/eln-cache/28.2-66fa0d00/cc-vars-6cc3f0fc-a4ab31d9.eln
    7f44c544e000-7f44c5458000 rw-p 0000b000 fe:05 1323563 /home/user/.emacs.d/eln-cache/28.2-66fa0d00/with-editor-ad819b7b-2e1f7b93.eln
    7f44c5383000-7f44c5384000 r--p 0000d000 fe:05 1321666 /home/user/.emacs.d/eln-cache/28.2-66fa0d00/log-edit-bc58b2d4-860d5c35.eln
    7f44c52f5000-7f44c52f8000 r--p 00021000 fe:05 1323613 /home/user/.emacs.d/eln-cache/28.2-66fa0d00/magit-log-ffefa368-c52fff03.eln
    7f44c50a5000-7f44c50a8000 r-xp 00001000 fe:05 1321734 /home/user/.emacs.d/eln-cache/28.2-66fa0d00/xdg-9947111f-70cd76a9.eln
    : ~; file /home/user/.emacs.d/eln-cache/28.2-66fa0d00/nxml-parse-79a53381-b87f8800.eln /home/user/.emacs.d/eln-cache/28.2-66fa0d00/cc-vars-6cc3f0fc-a4ab31d9.eln /home/user/.emacs.d/eln-cache/28.2-66fa0d00/with-editor-ad819b7b-2e1f7b93.eln
    /home/user/.emacs.d/eln-cache/28.2-66fa0d00/nxml-parse-79a53381-b87f8800.eln: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=ae37239bb67ec11b5d1eaf514df0660634fbd946, not stripped
    /home/user/.emacs.d/eln-cache/28.2-66fa0d00/cc-vars-6cc3f0fc-a4ab31d9.eln: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=043e590c8a3917994270925abbfa6ec746488abb, not stripped
    /home/user/.emacs.d/eln-cache/28.2-66fa0d00/with-editor-ad819b7b-2e1f7b93.eln: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=2bfb93008822275a66cad1c463d286f366388725, not stripped
    : ~;

    When IrCOve disassembled these, they seem to indirect all their function
    calls through a jump table, so that you can rebind existing symbols to
    new functions and affect already-compiled code. I havenrCOt dug into it
    in much detail, though, so I might be mistaken.

    Kragen
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Madhu@enometh@meer.net to comp.lang.lisp on Fri Sep 4 08:36:01 2026
    From Newsgroup: comp.lang.lisp

    * Kragen Javier Sitaker <87v78mz15a.fsf_-_@debian> :
    Wrote on Thu, 03 Sep 2026 14:37:53 -0300:
    When IrCOve disassembled these, they seem to indirect all their function calls through a jump table, so that you can rebind existing symbols to
    new functions and affect already-compiled code.

    isn't this just the behaviour of general compilation - unless the symbol function is inlines at compile time or the macroexpanded at
    macroexpansion time.

    in much detail, though, so I might be mistaken.

    it's piggybacking on the gcc jit feature, (i never learnt it either)
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Kragen Javier Sitaker@kragen@canonical.org to comp.lang.lisp on Tue Sep 15 12:19:25 2026
    From Newsgroup: comp.lang.lisp

    Madhu <enometh@meer.net> writes:
    * Kragen Javier Sitaker <87v78mz15a.fsf_-_@debian> :
    Wrote on Thu, 03 Sep 2026 14:37:53 -0300:
    When IrCOve disassembled these, they seem to indirect all their function
    calls through a jump table, so that you can rebind existing symbols to
    new functions and affect already-compiled code.

    isn't this just the behaviour of general compilation - unless the symbol function is inlines at compile time or the macroexpanded at
    macroexpansion time. [...]

    Oh hi enometh! ItrCOs been a long time since UNM! I live in Argentina
    now, and thererCOs a brand of jam here called Emeth, which always reminds
    me of your username when I see it.

    ItrCOs the usual behavior for Lisp compilation, but Emacs Lisp is
    sometimes a little unusual for a Lisp, and lots of other languages donrCOt
    do it this way.

    Kragen
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Madhu@enometh@meer.net to comp.lang.lisp on Thu Sep 17 12:17:00 2026
    From Newsgroup: comp.lang.lisp

    * Kragen Javier Sitaker <87wlsmo83m.fsf@debian> :
    Wrote on Tue, 15 Sep 2026 12:19:25 -0300:
    Madhu <enometh@meer.net> writes:
    * Kragen Javier Sitaker <87v78mz15a.fsf_-_@debian> :
    Wrote on Thu, 03 Sep 2026 14:37:53 -0300:
    When IrCOve disassembled these, they seem to indirect all their function >>> calls through a jump table, so that you can rebind existing symbols to
    new functions and affect already-compiled code.

    isn't this just the behaviour of general compilation - unless the symbol
    function is inlines at compile time or the macroexpanded at
    macroexpansion time. [...]

    Oh hi enometh!
    ItrCOs been a long time since UNM! I live in Argentina
    now, and thererCOs a brand of jam here called Emeth, which always reminds
    me of your username when I see it.

    Helu! haven't been in touch with NM folk since but I get to sample your writings on canonical and in pdf form from time to time.

    `Emeth' is hebrew for `truth'. [that (and "helu" and "guby") which
    probably gets scraped from my emails gets classified incorrectly and has got(ten) me into some orthodox advertising lists]

    ItrCOs the usual behavior for Lisp compilation, but Emacs Lisp is
    sometimes a little unusual for a Lisp, and lots of other languages donrCOt
    do it this way.

    I always thought it was essential for the "dynamic" nature lisp: change
    the fdefinition and the next time the function symbol gets called from
    any code (compiled or otherwise) it runs the new definition.

    when emacs lisp had only dynamic binding you could exploit this further,
    but with lexical binding the variables names get compiled out. that
    takes out some of the fun -- "by design" of course.

    Guby
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.lang.lisp on Thu Sep 17 21:12:29 2026
    From Newsgroup: comp.lang.lisp

    On Thu, 17 Sep 2026 12:17:00 +0530, Madhu wrote:

    I always thought it was essential for the "dynamic" nature [of]
    lisp: change the fdefinition and the next time the function symbol
    gets called from any code (compiled or otherwise) it runs the new
    definition.

    If the value of a symbol binding can get changed, then of course any
    change to that value will be picked up by subsequent references to
    that same binding. That would be true of whatever language with
    whatever binding rules.

    when emacs lisp had only dynamic binding you could exploit this
    further, but with lexical binding the variables names get compiled
    out. that takes out some of the fun -- "by design" of course.

    Dynamic binding seems more trouble than itrCOs worth. I remember
    Stallman specifically justifying its use in Emacs to handle the case
    of buffer-specific variable bindings. But there are (IMO) better ways
    of achieving the same effect with lexical binding -- better because
    they work with lexical binding, of course.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Stefan Monnier@monnier@iro.umontreal.ca to comp.lang.lisp on Fri Sep 18 10:12:07 2026
    From Newsgroup: comp.lang.lisp

    Madhu [2026-09-17 12:17:00] wrote:
    when Emacs Lisp had only dynamic binding you could exploit this further,
    but with lexical binding the variables names get compiled out. that
    takes out some of the fun -- "by design" of course.

    Yeah, dynamic scoping is more friendly to funky hacks, so in a sense
    static scoping has a kind of "sad/boring/serious" side to it,
    discouraging you from "walking on the wild side".

    I've used dynamic scoping a few times in such "creative" ways
    (i.e. reading a binding from a caller even thought that binding was
    clearly intended to be a *local* variable), but I must say I don't miss
    those fun days, because I find closures to be a source of a lot more
    pleasure. EfOe


    === Stefan
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Stefan Monnier@monnier@iro.umontreal.ca to comp.lang.lisp on Fri Sep 18 09:59:37 2026
    From Newsgroup: comp.lang.lisp

    Lawrence DrCOOliveiro [2026-09-17 21:12:29] wrote:
    On Thu, 17 Sep 2026 12:17:00 +0530, Madhu wrote:
    I always thought it was essential for the "dynamic" nature [of]
    lisp: change the fdefinition and the next time the function symbol
    gets called from any code (compiled or otherwise) it runs the new
    definition.
    If the value of a symbol binding can get changed, then of course any
    change to that value will be picked up by subsequent references to
    that same binding. That would be true of whatever language with
    whatever binding rules.

    In ELisp, that's not true for functions defined with `defsubst`, nor is
    it true for some of the core functions like `car`: the compiler
    routinely inlines the function's definition and doesn't bother to make
    sure it's "de-inlined" (or updated) if/when that symbol gets `fset`ed.


    === Stefan
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.lang.lisp on Fri Sep 18 22:00:29 2026
    From Newsgroup: comp.lang.lisp

    On Fri, 18 Sep 2026 09:59:37 -0400, Stefan Monnier wrote:

    Lawrence DrCOOliveiro [2026-09-17 21:12:29] wrote:

    If the value of a symbol binding can get changed, then of course
    any change to that value will be picked up by subsequent references
    to that same binding. That would be true of whatever language with
    whatever binding rules.

    In ELisp, that's not true for functions defined with `defsubst`, nor
    is it true for some of the core functions like `car`: the compiler
    routinely inlines the function's definition and doesn't bother to
    make sure it's "de-inlined" (or updated) if/when that symbol gets
    `fset`ed.

    So which part of rCLsubsequent references to that same bindingrCY are you disagreeing with, exactly?
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.lang.lisp on Fri Sep 18 22:01:38 2026
    From Newsgroup: comp.lang.lisp

    On Fri, 18 Sep 2026 10:12:07 -0400, Stefan Monnier wrote:

    Yeah, dynamic scoping is more friendly to funky hacks, so in a sense
    static scoping has a kind of "sad/boring/serious" side to it,
    discouraging you from "walking on the wild side".

    I find quite the opposite. Lexical binding allows you to create such
    useful things as function factories and class factories.

    In a dynamic language with lexical binding, who needs generics?
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Aidan Kehoe@kehoea@parhasard.net to comp.lang.lisp on Sat Sep 19 14:47:35 2026
    From Newsgroup: comp.lang.lisp


    Ar an t-ocht|| l|i d|-ag de m|! M|-an F||mhair, scr|!obh Stefan Monnier:

    Madhu [2026-09-17 12:17:00] wrote:
    when Emacs Lisp had only dynamic binding you could exploit this further, but with lexical binding the variables names get compiled out. that
    takes out some of the fun -- "by design" of course.

    Yeah, dynamic scoping is more friendly to funky hacks, so in a sense
    static scoping has a kind of "sad/boring/serious" side to it,
    discouraging you from "walking on the wild side".

    I've used dynamic scoping a few times in such "creative" ways
    (i.e. reading a binding from a caller even thought that binding was
    clearly intended to be a *local* variable), but I must say I don't miss those fun days, because I find closures to be a source of a lot more pleasure. EfOe

    This is in no way a strong argument for default dynamic scope in any flavour of emacs, but one real advantage is you can put a hardware watchpoint (e.g. from gdb or lldb) on the value field of a symbol, making it easier to track down what Lisp code modified its value in an undesired way.

    This comes up most with defvar'd symbols but would be necessary for the calling package if you had decided in the above example to modify the binding in your caller, rather than just read it. One of the strengths of lexical scope is you canrCOt do that.
    --
    rCyAs I sat looking up at the Guinness ad, I could never figure out /
    How your man stayed up on the surfboard after fourteen pints of stoutrCO
    (C. Moore)
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.lang.lisp on Sat Sep 19 21:58:19 2026
    From Newsgroup: comp.lang.lisp

    On Sat, 19 Sep 2026 14:47:35 +0100, Aidan Kehoe wrote:

    This is in no way a strong argument for default dynamic scope in any
    flavour of emacs, but one real advantage is you can put a hardware
    watchpoint (e.g. from gdb or lldb) on the value field of a symbol,
    making it easier to track down what Lisp code modified its value in
    an undesired way.

    Debuggers are allowed to hook into low-level runtimes in ways not
    specified (or specifiable) in any language standard. They can walk
    stacks and heaps and access objects regardless of what language
    visiblity rules might say.

    So whether a language does dynamic or static scoping is a design
    decision that is all about the kinds of programs you write in it, not
    how you implement a debugger.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Aidan Kehoe@kehoea@parhasard.net to comp.lang.lisp on Sat Sep 19 23:24:34 2026
    From Newsgroup: comp.lang.lisp


    Ar an nao|| l|i d|-ag de m|! M|-an F||mhair, scr|!obh Lawrence DrCOOliveiro:

    On Sat, 19 Sep 2026 14:47:35 +0100, Aidan Kehoe wrote:

    This is in no way a strong argument for default dynamic scope in any flavour of emacs, but one real advantage is you can put a hardware watchpoint (e.g. from gdb or lldb) on the value field of a symbol, making it easier to track down what Lisp code modified its value in an undesired way.

    Debuggers are allowed to hook into low-level runtimes in ways not specified (or specifiable) in any language standard. They can walk stacks and heaps and access objects regardless of what language visiblity rules might say.

    I donrCOt disagree with that one bit. And in the world as it exists today, you can do this with a dynamic scoped Emacs Lisp and, to my knowledge, it is not possible with GNU EmacsrCO lexically scoped Emacs Lisp. A simple workaround is to
    disable lexical scoping for that file if you need to debug the situation I described.

    So whether a language does dynamic or static scoping is a design decision that is all about the kinds of programs you write in it, not how you implement a debugger.

    Lexical scoping gives fewer bugs and faster execution, dynamic scope by default was a bad decision.
    --
    rCyAs I sat looking up at the Guinness ad, I could never figure out /
    How your man stayed up on the surfboard after fourteen pints of stoutrCO
    (C. Moore)
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Paul Rubin@no.email@nospam.invalid to comp.lang.lisp on Sat Sep 19 17:23:00 2026
    From Newsgroup: comp.lang.lisp

    Aidan Kehoe <kehoea@parhasard.net> writes:
    Lexical scoping gives fewer bugs and faster execution, dynamic scope
    by default was a bad decision.

    Dynamic scope implemented with a shallow-binding cell is pretty fast so
    I don't think speed is a serious concern in a relatively inefficient interpreter like Emacs Lisp. RMS used to think Emacs benefited from
    dynamic scope since you could easily temporarily bind system variables,
    such as (let ((case-fold-search nil)) ... ) where the temporary binding
    would affect only the local scope. IDK if he would still say that. But
    it was a philosophy that he applied to both ITS (TECO) Emacs and GNU
    Emacs.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Stefan Monnier@monnier@iro.umontreal.ca to comp.lang.lisp on Sun Sep 20 03:05:18 2026
    From Newsgroup: comp.lang.lisp

    Paul Rubin [2026-09-19 17:23:00] wrote:
    Aidan Kehoe <kehoea@parhasard.net> writes:
    Lexical scoping gives fewer bugs and faster execution, dynamic scope
    by default was a bad decision.
    Dynamic scope implemented with a shallow-binding cell is pretty fast so
    I don't think speed is a serious concern in a relatively inefficient interpreter like Emacs Lisp.

    When running code without byte-compiling it, the statically scoped
    dialect of ELisp tends to be noticeably slower, indeed.


    === Stefan
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Aidan Kehoe@kehoea@parhasard.net to comp.lang.lisp on Sun Sep 20 22:20:38 2026
    From Newsgroup: comp.lang.lisp


    Ar an nao|| l|i d|-ag de m|! M|-an F||mhair, scr|!obh Paul Rubin:

    Aidan Kehoe <kehoea@parhasard.net> writes:
    Lexical scoping gives fewer bugs and faster execution, dynamic scope
    by default was a bad decision.

    Dynamic scope implemented with a shallow-binding cell is pretty fast so
    I don't think speed is a serious concern in a relatively inefficient interpreter like Emacs Lisp. RMS used to think Emacs benefited from
    dynamic scope since you could easily temporarily bind system variables,
    such as (let ((case-fold-search nil)) ... ) where the temporary binding would affect only the local scope.

    My understanding was that he felt it was faster, but I donrCOt care to argue.

    Common Lisp has dynamic binding for globals and lexical scope for locals.
    (let ((case-fold-search nil) ...) works fine with this design. Current GNU Emacs has made the same decision.

    IDK if he would still say that. But it was a philosophy that he applied to both ITS (TECO) Emacs and GNU Emacs.

    Philosophies can be wrong.
    --
    rCyAs I sat looking up at the Guinness ad, I could never figure out /
    How your man stayed up on the surfboard after fourteen pints of stoutrCO
    (C. Moore)
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Paul Rubin@no.email@nospam.invalid to comp.lang.lisp on Sun Sep 20 16:18:48 2026
    From Newsgroup: comp.lang.lisp

    Aidan Kehoe <kehoea@parhasard.net> writes:
    My understanding was that he felt it [dynamic scope] was faster, but I donrCOt care to argue.

    See here: https://www.gnu.org/software/emacs/emacs-paper.html#SEC18

    Even with byte compilation, I'd have to see benchmarks to believe that
    the speed difference between dynamic and lexical binding in Emacs is significant, especially with a small amount of coding attention, such as
    using LET outside rather than inside a tight loop if you can.

    Philosophies can be wrong.

    RMS is a pretty sharp Lisper and while anyone can be wrong about things,
    I tend to want a pretty good reason to think I'm not the one who's
    wrong. In the previous section of that paper (SEC17) though, he does
    say,

    It is not necessary for dynamic scope to be the only scope rule
    provided, just useful for it to be available.

    That roughly fits the situation in CL, Scheme, and modern-day Emacs
    Lisp.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.lang.lisp on Mon Sep 21 00:18:12 2026
    From Newsgroup: comp.lang.lisp

    On Sun, 20 Sep 2026 22:20:38 +0100, Aidan Kehoe wrote:

    Common Lisp has dynamic binding for globals and lexical scope for
    locals.

    How does rCLdynamic binding for globalsrCY work, exactly? A global can
    only be declared once, so how can the binding ever be overridden by
    another declaration?
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From antispam@antispam@fricas.org (Waldek Hebisch) to comp.lang.lisp on Mon Sep 21 19:06:11 2026
    From Newsgroup: comp.lang.lisp

    Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
    On Sun, 20 Sep 2026 22:20:38 +0100, Aidan Kehoe wrote:

    Common Lisp has dynamic binding for globals and lexical scope for
    locals.

    How does rCLdynamic binding for globalsrCY work, exactly? A global can
    only be declared once, so how can the binding ever be overridden by
    another declaration?

    In dynamic languages it is probably better to say that variables
    are created, because this is runtime action. Logically process
    of getting variable value can be considerd as two stage process.
    First is mapping from names to storage location, second step
    is accessing storage location. In Lisp variable name pretty
    early (in Lisp reader) are replaced by Lisp symbols. Lisp symbol
    has several slots. One is symbol name. But there are other slots,
    in particular symbol value slot. So first stage is realised
    by having symbol, second by accesing value slot. So in a
    sense there is exactly one storage location for each global
    variable. However, when you have function like:

    (defun foo (x)
    (let ((*dlvar* x))
    (declare (special *dlvar*))
    (bar)))

    then Lisp implementation ensures that value that '*dlvar*' had
    at entry is stored, and new value (given by 'x') is assigned so
    that 'bar' sees this new value. When 'bar' exits, either
    normally or due to an error previous value of '*dlvar*'
    is restored regardless of what 'bar' could have done to
    '*dlvar*'.

    In a sense it is nothig more than saving old value and restoring
    it. But doing this correctly without proper language support may
    be tricky or tedious. For example you may be forced to wrap
    "catch all" exception handler around call to 'bar'. In effect
    you get construct that could be synthetised from simpler
    primitives, but is is conveniet (and more efficient) to have it
    available as a specialised language construct

    I am not sure what you consder as binding, but in Lisp literature
    it us usual to say that 'let' constuct above (with variable
    declared special) introduces dynamic binding.
    --
    Waldek Hebisch
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.lang.lisp on Tue Sep 22 00:42:28 2026
    From Newsgroup: comp.lang.lisp

    On Mon, 21 Sep 2026 19:06:11 -0000 (UTC), Waldek Hebisch wrote:

    In a sense it is nothig more than saving old value and restoring it.
    But doing this correctly without proper language support may be
    tricky or tedious. For example you may be forced to wrap "catch all" exception handler around call to 'bar'.

    Or just use try/finally.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Stefan Monnier@monnier@iro.umontreal.ca to comp.lang.lisp on Mon Sep 21 12:56:33 2026
    From Newsgroup: comp.lang.lisp

    Even with byte compilation, I'd have to see benchmarks to believe that
    the speed difference between dynamic and lexical binding in Emacs is significant, especially with a small amount of coding attention, such as using LET outside rather than inside a tight loop if you can.

    IME, as currently implemented in Emacs, speed of byte-compiled ELisp
    code is indeed pretty much the same with lexical-scoping as with
    dynamic scoping.


    === Stefan
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Madhu@enometh@meer.net to comp.lang.lisp on Tue Sep 22 12:22:25 2026
    From Newsgroup: comp.lang.lisp


    * Stefan Monnier <jwv4ifipmsc.fsf-monnier+comp.lang.lisp@gnu.org> :
    Wrote on Mon, 21 Sep 2026 12:56:33 -0400:

    Even with byte compilation, I'd have to see benchmarks to believe that
    the speed difference between dynamic and lexical binding in Emacs is
    significant, especially with a small amount of coding attention, such as
    using LET outside rather than inside a tight loop if you can.

    IME, as currently implemented in Emacs, speed of byte-compiled ELisp
    code is indeed pretty much the same with lexical-scoping as with
    dynamic scoping.

    and without byte compilation?

    The 80s Elisp appeal for adoption was full control of the system, in the
    case of an error you could see where you stood, see what variable had
    which value, there were no secrets held by the author from the user by
    the system.

    With edebug, native-compilation, byte compilation and lexical binding
    Todayon Tishri 11, 5787 when trying to send mail via smtpmail.el or
    using mew with gnutls I get impenetrable backtraces and opaque closures
    so solving the same problems that I was dealing with these 30 years ago
    is even more challenging. and the techniques I could use then to solve
    the problem are now impossible to use.

    Of course these "compiler advances" are the gift of gold to the new
    developer ecosystem that emacs now supports.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Paul Rubin@no.email@nospam.invalid to comp.lang.lisp on Tue Sep 22 10:15:31 2026
    From Newsgroup: comp.lang.lisp

    Madhu <enometh@meer.net> writes:
    and without byte compilation?
    The 80s Elisp appeal for adoption was full control of the system, in the
    case of an error you could see where you stood, see what variable had
    which value, there were no secrets held by the author from the user by
    the system.

    Emacs Lisp (in the 1980s the contraction "Elisp" was frowned on) had
    bytecode compilation from the beginning. The recursive evaluator did
    make debugging easier, so you might decide to skip compiling the thing
    you wanted to debug. If you left EVERYTHING uncompiled, Emacs probably
    would have been unusable and maybe unrunnable on the hardware of those
    days.

    With edebug, native-compilation, byte compilation and lexical
    binding... I get impenetrable backtraces and opaque closures

    Maybe there could be some better debugging support for compiled code,
    like debugging symbols that let you immediately reach the source code
    and run it under interpretation. Earlier Lisps certainly relied on
    native compilation since pre-1980s hardware (think PDP-10) was even more limited than the Vaxes that GNU Emacs was developed on.

    I never used the Lisp machine debugging environment but I know was
    amazing even by today's standards. I don't know what debugging in the
    Maclisp era was like.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Kaz Kylheku@046-301-5902@kylheku.com to comp.lang.lisp on Tue Sep 22 17:51:05 2026
    From Newsgroup: comp.lang.lisp

    On 2026-09-19, Aidan Kehoe <kehoea@parhasard.net> wrote:

    Ar an t-ocht|| l|i d|-ag de m|! M|-an F||mhair, scr|!obh Stefan Monnier:

    Madhu [2026-09-17 12:17:00] wrote:
    when Emacs Lisp had only dynamic binding you could exploit this further, but with lexical binding the variables names get compiled out. that
    takes out some of the fun -- "by design" of course.

    Yeah, dynamic scoping is more friendly to funky hacks, so in a sense
    static scoping has a kind of "sad/boring/serious" side to it,
    discouraging you from "walking on the wild side".

    I've used dynamic scoping a few times in such "creative" ways
    (i.e. reading a binding from a caller even thought that binding was
    clearly intended to be a *local* variable), but I must say I don't miss those fun days, because I find closures to be a source of a lot more pleasure. EfOe

    This is in no way a strong argument for default dynamic scope in any flavour of
    emacs, but one real advantage is you can put a hardware watchpoint (e.g. from gdb or lldb) on the value field of a symbol, making it easier to track down what Lisp code modified its value in an undesired way.

    OK, but with lexical scoping you know that nothing outside of the
    lexical scope messed with the variable. And whatever it was, it was
    in the same dynamic activation of that lexical scope as which
    instantiated that binding. :)

    Only a shallow-binding implementation of dynamic scope is susceptible to
    a fixed address breakpoint. (Or a deep binding one too, if the variable
    is left global.) Under deep binding implementations of dynamic scope,
    there is actually a scope chain that is traversed to find dynamic
    variables; when one or more dynamic bindings are introduced, they push
    a new dynamic environment frame. The thread carries a pointer to the
    current dynamic environment top as part of its context.
    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @Kazinator@mstdn.ca
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Kaz Kylheku@046-301-5902@kylheku.com to comp.lang.lisp on Tue Sep 22 18:02:22 2026
    From Newsgroup: comp.lang.lisp

    On 2026-09-18, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
    Madhu [2026-09-17 12:17:00] wrote:
    when Emacs Lisp had only dynamic binding you could exploit this further,
    but with lexical binding the variables names get compiled out. that
    takes out some of the fun -- "by design" of course.

    Yeah, dynamic scoping is more friendly to funky hacks, so in a sense
    static scoping has a kind of "sad/boring/serious" side to it,
    discouraging you from "walking on the wild side".

    I've used dynamic scoping a few times in such "creative" ways
    (i.e. reading a binding from a caller even thought that binding was
    clearly intended to be a *local* variable), but I must say I don't miss
    those fun days, because I find closures to be a source of a lot more pleasure. EfOe

    Dynamic scoping is an important tool; I loathe the environment without
    support for them.

    The situation of lexical binding by default with dynamic binding
    being available is best.

    I also like Common Lisp's idea of attributing a symbol for dynamic
    binding. Combined with a naming convention like earmuffs, it works well.

    Dynamic variables are great for carrying application-defined
    implicit contexts, which would otherwise have to be carried
    as numerous arguments (which is impractical when the call stacks
    go through functions which are not supposed to know anything
    about these contexts, like callback jigs and whatnot).
    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @Kazinator@mstdn.ca
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Kaz Kylheku@046-301-5902@kylheku.com to comp.lang.lisp on Tue Sep 22 18:20:45 2026
    From Newsgroup: comp.lang.lisp

    On 2026-09-20, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
    Paul Rubin [2026-09-19 17:23:00] wrote:
    Aidan Kehoe <kehoea@parhasard.net> writes:
    Lexical scoping gives fewer bugs and faster execution, dynamic scope
    by default was a bad decision.
    Dynamic scope implemented with a shallow-binding cell is pretty fast so
    I don't think speed is a serious concern in a relatively inefficient
    interpreter like Emacs Lisp.

    When running code without byte-compiling it, the statically scoped
    dialect of ELisp tends to be noticeably slower, indeed.

    If deep binding is used for dynamic variables, it will be the same;
    the top environment has to be searched for a variable, then if not
    found there, the next one up and so on.

    When we are byte compiling, we can speed up repeated accesses to the
    same dynamic variable, by doing one lookup (on entry into a given scope)
    to find the cell where the current value of the dynamic is held, then
    caching that in a hidden lexical variable; uses of the variable are then translated to direct references to the cell through this hidden
    variable.

    I'm aware of this issue but haven't put effort into it myself.
    We can see it with an example, of a progn form that increments
    a special variable three times:

    (defvar *foo*)
    *foo*
    (disassemble (compile-toplevel '(progn (inc *foo*) (inc *foo*) (inc *foo*))))
    data:
    0: *foo*
    syms:
    0: succ
    code:
    0: 68400004 getv t4 d0
    1: 20010003 gcall t3 0 t4
    2: 00040000
    3: 80400003 setv t3 d0
    4: 68400004 getv t4 d0
    5: 20010003 gcall t3 0 t4
    6: 00040000
    7: 80400003 setv t3 d0
    8: 68400004 getv t4 d0
    9: 20010002 gcall t2 0 t4
    10: 00040000
    11: 80400002 setv t2 d0
    12: 10000002 end t2
    instruction count:
    10
    #<sys:vm-desc: a82b250>

    Notice that "getv t4 d0" appears three times. The t4 register is not
    modified by anything else. Because there are no intervening "bindv" instructions we we could optimize this in the bytecode back end
    entirely.

    d0 referes to the data vector for the compiled form (see "data:" above,
    data [0] is the symbol *foo*).

    "getv t4 d0" means to get the current dynamic value cell of *foo*,
    and capture it in register t4.

    In any basic block of code, if a register "Tx" is set by a "getv"
    instruction for a certain symbolic datum "Dy", if that register
    is not subsequently clobbered and is again the target of a "getv"
    from the same "Dy", that second instruction can be eliminated.

    Doing it at the basic block level would be imperfect since any top-of-loop would have to fetch the variable, but would improve things in situations like the above. Also, in more complex code, a different register may be
    chosen for the redundant getv. If we see "getv t4 d0" and later
    "getv t6 d0" such that we are sure t6 is obtaining the same value that
    t4 already has, the we can replace the latter instrution by "mov t6 t4".
    Then, another optimization round will likely get rid of t6; there
    is already a strategy for eliminating useless register duplications
    which will replace uses of t6 in subsequent code with t4 and drop the mov.

    (Of course, the real optimization we want is to collapse three
    incs into (inc ... 3)) but that is neither here nor there.
    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @Kazinator@mstdn.ca
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Kaz Kylheku@046-301-5902@kylheku.com to comp.lang.lisp on Tue Sep 22 18:22:06 2026
    From Newsgroup: comp.lang.lisp

    On 2026-09-20, Paul Rubin <no.email@nospam.invalid> wrote:
    Aidan Kehoe <kehoea@parhasard.net> writes:
    My understanding was that he felt it [dynamic scope] was faster, but I
    donrCOt care to argue.

    See here: https://www.gnu.org/software/emacs/emacs-paper.html#SEC18

    Even with byte compilation, I'd have to see benchmarks to believe that
    the speed difference between dynamic and lexical binding in Emacs is significant, especially with a small amount of coding attention, such as using LET outside rather than inside a tight loop if you can.

    Philosophies can be wrong.

    RMS is a pretty sharp Lisper and while anyone can be wrong about things,
    I tend to want a pretty good reason to think I'm not the one who's
    wrong. In the previous section of that paper (SEC17) though, he does
    say,

    It is not necessary for dynamic scope to be the only scope rule
    provided, just useful for it to be available.

    I would go as far as: annoying to painful for it not to be available.
    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @Kazinator@mstdn.ca
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Kaz Kylheku@046-301-5902@kylheku.com to comp.lang.lisp on Tue Sep 22 18:26:02 2026
    From Newsgroup: comp.lang.lisp

    On 2026-09-21, Waldek Hebisch <antispam@fricas.org> wrote:
    Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
    On Sun, 20 Sep 2026 22:20:38 +0100, Aidan Kehoe wrote:

    Common Lisp has dynamic binding for globals and lexical scope for
    locals.

    How does rCLdynamic binding for globalsrCY work, exactly? A global can
    only be declared once, so how can the binding ever be overridden by
    another declaration?

    In dynamic languages it is probably better to say that variables
    are created, because this is runtime action.

    Even if you don't declare a variable, in a purely dynamically
    scoped lisp (with shallow binding), the variable is actually created at
    read time when the form like (setq foo 42) is processed by the reader.
    The reader notices the foo token which is converted to a symbol by
    interning. The foo part of the internal form of the expression is then a
    direct pointer to the symbol.

    When the code is executing, nothing needs to be created at /that/ run
    time. The foo pointer is basically just dereferenced to get to the value
    cell of the symbol.

    (Of course, if we regard the reader as being "run time", then it's all
    run time; but there are different stages of run time. The run time of
    loading the file is different form the run time of executing something
    in in millions of times in a loop.)
    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @Kazinator@mstdn.ca
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Madhu@enometh@meer.net to comp.lang.lisp on Wed Sep 23 07:33:20 2026
    From Newsgroup: comp.lang.lisp

    * Paul Rubin <87se31gqbw.fsf@nightsong.com> :
    Wrote on Tue, 22 Sep 2026 10:15:31 -0700:

    I never used the Lisp machine debugging environment but I know was
    amazing even by today's standards. I don't know what debugging in the Maclisp era was like.

    you may have the chance to try it out now, if you can jump through the
    hoops and apply for a personal license (bottom of
    https://www.symbolics.biz/ , the invite only period seems to be over,
    and can handle 75 dpi bitmap fonts on xlib under modern displays with)



    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Aidan Kehoe@kehoea@parhasard.net to comp.lang.lisp on Wed Sep 23 07:22:38 2026
    From Newsgroup: comp.lang.lisp


    Ar an tr|!|| l|i is fiche de m|! M|-an F||mhair, scr|!obh Madhu:

    * Paul Rubin <87se31gqbw.fsf@nightsong.com> :
    Wrote on Tue, 22 Sep 2026 10:15:31 -0700:

    I never used the Lisp machine debugging environment but I know was
    amazing even by today's standards. I don't know what debugging in the Maclisp era was like.

    you may have the chance to try it out now, if you can jump through the hoops and apply for a personal license (bottom of https://www.symbolics.biz/ , the invite only period seems to be over, and can handle 75 dpi bitmap fonts on xlib under modern displays with)

    Thanks for that, Madhu, IrCOll apply for a personal licence.
    --
    rCyAs I sat looking up at the Guinness ad, I could never figure out /
    How your man stayed up on the surfboard after fourteen pints of stoutrCO
    (C. Moore)
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lars Brinkhoff@lars.spam@nocrew.org to comp.lang.lisp on Wed Sep 23 13:59:08 2026
    From Newsgroup: comp.lang.lisp

    Paul Rubin wrote:
    Emacs Lisp (in the 1980s the contraction "Elisp" was frowned on)

    Because of this and also the Lisp dialect in CCA Emacs.

    https://github.com/PDP-10/rutgers-elisp

    Of course, only Emacs Lisp survives in active use today so maybe it's
    time to accept "Elisp". Maybe.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Paul Rubin@no.email@nospam.invalid to comp.lang.lisp on Thu Sep 24 03:06:51 2026
    From Newsgroup: comp.lang.lisp

    Madhu <enometh@meer.net> writes:
    https://www.symbolics.biz/ , the invite only period seems to be over,

    Heh, I'm sure you have heard the RMS vs Symbolics saga. I think I'll
    pass that one up. I don't know the current state of the CADR simulation
    that people were working on a while back, but I hope I can give it a try someday.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Anton Antimo@anton@safunu.org to comp.lang.lisp on Thu Sep 24 10:25:18 2026
    From Newsgroup: comp.lang.lisp

    Madhu <enometh@meer.net> writes:

    * Paul Rubin <87se31gqbw.fsf@nightsong.com> :
    Wrote on Tue, 22 Sep 2026 10:15:31 -0700:

    I never used the Lisp machine debugging environment but I know was
    amazing even by today's standards. I don't know what debugging in the
    Maclisp era was like.

    you may have the chance to try it out now, if you can jump through the
    hoops and apply for a personal license (bottom of
    https://www.symbolics.biz/ , the invite only period seems to be over,
    and can handle 75 dpi bitmap fonts on xlib under modern displays with)

    This URL is currently unavailable:

    --8<-------------------------------------------------------->8---
    Service Unavailable

    This server is currently operating at capacity and cannot accept your
    request. Please try again later.
    CL-HTTP/169.0 (Symbolics Common Lisp) --8<-------------------------------------------------------->8---
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From tfb@tfb@work.it.out to comp.lang.lisp on Thu Sep 24 20:01:17 2026
    From Newsgroup: comp.lang.lisp

    Kaz Kylheku <046-301-5902@kylheku.com> wrote:

    I would go as far as: annoying to painful for it not to be available.


    I have, at least twice, had to implement dynamic variables in Python. (in memoryof Lisps I used before CL, I called these things variations on
    'fluids'). Surprisingly Python does have enough to do this portably in a thread-sane way. So I agree: languages without a facility for this are
    broken.
    --
    tfeb.org/computer/
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Kaz Kylheku@046-301-5902@kylheku.com to comp.lang.lisp on Thu Sep 24 20:55:42 2026
    From Newsgroup: comp.lang.lisp

    On 2026-09-24, tfb <tfb@work.it.out> wrote:
    Kaz Kylheku <046-301-5902@kylheku.com> wrote:

    I would go as far as: annoying to painful for it not to be available.


    I have, at least twice, had to implement dynamic variables in Python. (in memoryof Lisps I used before CL, I called these things variations on 'fluids'). Surprisingly Python does have enough to do this portably in a thread-sane way. So I agree: languages without a facility for this are broken.

    Some quarter century ago now, I had a dynamic_var<T> template in C++,
    with a dynamic_let<T> for the binding.

    dynamic_var<int> dv_foo = 42;

    ...

    {
    dynamic_let<int> foo(dv_foo, 73);
    ...

    // both foo and dv_foo are now 73

    }

    // foo is gone, dv_foo back to 42.

    or something like that.
    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @Kazinator@mstdn.ca
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From antispam@antispam@fricas.org (Waldek Hebisch) to comp.lang.lisp on Fri Sep 25 21:54:50 2026
    From Newsgroup: comp.lang.lisp

    Kaz Kylheku <046-301-5902@kylheku.com> wrote:
    On 2026-09-21, Waldek Hebisch <antispam@fricas.org> wrote:
    Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
    On Sun, 20 Sep 2026 22:20:38 +0100, Aidan Kehoe wrote:

    Common Lisp has dynamic binding for globals and lexical scope for
    locals.

    How does rCLdynamic binding for globalsrCY work, exactly? A global can
    only be declared once, so how can the binding ever be overridden by
    another declaration?

    In dynamic languages it is probably better to say that variables
    are created, because this is runtime action.

    Even if you don't declare a variable, in a purely dynamically
    scoped lisp (with shallow binding), the variable is actually created at
    read time when the form like (setq foo 42) is processed by the reader.
    The reader notices the foo token which is converted to a symbol by
    interning. The foo part of the internal form of the expression is then a direct pointer to the symbol.

    When the code is executing, nothing needs to be created at /that/ run
    time. The foo pointer is basically just dereferenced to get to the value
    cell of the symbol.

    (Of course, if we regard the reader as being "run time", then it's all
    run time; but there are different stages of run time. The run time of loading the file is different form the run time of executing something
    in in millions of times in a loop.)

    I meant that running system may create a variable and then use it.
    In Lisp it normally happens when one loads Lisp source code (in text
    form), but it may happen in other ways, for example program may
    INTERN a string and then SET resulting symbol. Also, one can
    UNINTERN the symbol and effectively variable is gone for users
    who want to access it by sting name. The point is that
    unlike classic (non-OO) static language where the program simply
    assumes that all declared variables actually exist, in dynamic
    language things happen at runtime and in particular part of a
    program may be executing before variables used in other part are
    created. Some effects of this are observable and language
    documentation gives some rules.

    IIUC some other languages go further in this direction than
    Lisp, unlike typical Common Lisp implementation where storage
    for variable is provided by value slot of corresponding symbol
    storage for variable may be allocated later.

    Objects with constructors mean that even in static language
    situation is not as simple as it was in the past.
    --
    Waldek Hebisch
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lars Brinkhoff@lars.spam@nocrew.org to comp.lang.lisp on Sat Sep 26 04:45:33 2026
    From Newsgroup: comp.lang.lisp

    Paul Rubin wrote:
    I don't know the current state of the CADR simulation that people were working on a while back

    Pretty good.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Madhu@enometh@meer.net to comp.lang.lisp on Sun Sep 27 16:24:38 2026
    From Newsgroup: comp.lang.lisp

    * Lars Brinkhoff <7wecegwrgy.fsf@junk.nocrew.org> :
    Wrote on Sat, 26 Sep 2026 04:45:33 +0000:
    Paul Rubin wrote:
    I don't know the current state of the CADR simulation that people were
    working on a while back
    Pretty good.

    I spotted this: https://tumbleweed.nu/lm-3/ from our ams (alfred m
    szmidt) and (if i remember right) "tapes from moon's basement", though I
    didn't have luck solving the fossil captchas on the mailing list.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Paul Rubin@no.email@nospam.invalid to comp.lang.lisp on Sun Sep 27 15:02:35 2026
    From Newsgroup: comp.lang.lisp

    Madhu <enometh@meer.net> writes:
    I spotted this: https://tumbleweed.nu/lm-3/ from our ams (alfred m
    szmidt) and (if i remember right) "tapes from moon's basement", though I didn't have luck solving the fossil captchas on the mailing list.

    Wow nice, it looks close to usable, though no idea what it takes to
    actually run it. I never used these machines to any extent in real
    life, so I'm not very familiar with their operation. It's ok, the
    distro wasn't intended for people like me anyway. But I might try to
    play with it anyway.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Madhu@enometh@meer.net to comp.lang.lisp on Mon Sep 28 10:53:14 2026
    From Newsgroup: comp.lang.lisp

    * Paul Rubin <87zex2fj44.fsf@nightsong.com> :
    Wrote on Sun, 27 Sep 2026 15:02:35 -0700:
    Madhu <enometh@meer.net> writes:
    I spotted this: https://tumbleweed.nu/lm-3/ from our ams (alfred m
    szmidt) and (if i remember right) "tapes from moon's basement", though I
    didn't have luck solving the fossil captchas on the mailing list.

    Wow nice, it looks close to usable, though no idea what it takes to
    actually run it. I never used these machines to any extent in real
    life, so I'm not very familiar with their operation. It's ok, the
    distro wasn't intended for people like me anyway. But I might try to
    play with it anyway.

    The symbolics.biz is bound to be more polished as it is, for some value
    of, "supported". The question that led to this discussion was about the debugger, and unfortunately i think there are goedel-theoretic limits on
    a system to debug itself (the UI is 1986 zlib, i'd be interested to
    hearing about your use of the debugger in LM-3)

    also there seems to be a font of recently generated information here https://github.com/htayj/lisp-machine-container-museum/
    --- Synchronet 3.22a-Linux NewsLink 1.2