• Python recompile

    From The Doctor@21:1/5 to All on Sun Mar 2 14:35:08 2025
    XPost: comp.lang.c++, comp.lang.python

    How do I compensate for

    ld: error: relocation R_X86_64_32 cannot be used against symbol '_PyRuntime'; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
    referenced by thread_pthread.h:138 (Python/thread_pthread.h:138)
    thread.o:(PyThread_init_thread) in archive /usr/local/lib/libpython3.13.a

    ld: error: relocation R_X86_64_32 cannot be used against symbol '_PyRuntime'; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
    referenced by thread_pthread.h:140 (Python/thread_pthread.h:140)
    thread.o:(PyThread_init_thread) in archive /usr/local/lib/libpython3.13.a

    ld: error: relocation R_X86_64_32S cannot be used against symbol '_PyRuntime'; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
    referenced by thread_pthread.h:141 (Python/thread_pthread.h:141)
    thread.o:(PyThread_init_thread) in archive /usr/local/lib/libpython3.13.a

    ld: error: relocation R_X86_64_32 cannot be used against symbol '_PyRuntime'; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
    referenced by thread_pthread.h:138 (Python/thread_pthread.h:138)
    thread.o:(do_start_joinable_thread) in archive /usr/local/lib/libpython3.13.a

    ld: error: relocation R_X86_64_32 cannot be used against symbol '_PyRuntime'; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
    referenced by thread_pthread.h:140 (Python/thread_pthread.h:140)
    thread.o:(do_start_joinable_thread) in archive /usr/local/lib/libpython3.13.a

    ld: error: relocation R_X86_64_32S cannot be used against symbol '_PyRuntime'; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
    referenced by thread_pthread.h:141 (Python/thread_pthread.h:141)
    thread.o:(do_start_joinable_thread) in archive /usr/local/lib/libpython3.13.a

    ld: error: relocation R_X86_64_32 cannot be used against local symbol; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(thread.o)
    referenced by thread_pthread.h:290 (Python/thread_pthread.h:290)
    thread.o:(do_start_joinable_thread) in archive /usr/local/lib/libpython3.13.a

    ld: error: relocation R_X86_64_32 cannot be used against symbol '_PyRuntime'; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
    referenced by thread_pthread.h:138 (Python/thread_pthread.h:138)
    thread.o:(PyThread_get_thread_ident_ex) in archive /usr/local/lib/libpython3.13.a

    ld: error: relocation R_X86_64_32 cannot be used against symbol '_PyRuntime'; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
    referenced by thread_pthread.h:140 (Python/thread_pthread.h:140)
    thread.o:(PyThread_get_thread_ident_ex) in archive /usr/local/lib/libpython3.13.a

    ld: error: relocation R_X86_64_32S cannot be used against symbol '_PyRuntime'; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
    referenced by thread_pthread.h:141 (Python/thread_pthread.h:141)
    thread.o:(PyThread_get_thread_ident_ex) in archive /usr/local/lib/libpython3.13.a

    ld: error: relocation R_X86_64_32 cannot be used against symbol '_PyRuntime'; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
    referenced by thread_pthread.h:138 (Python/thread_pthread.h:138)
    thread.o:(PyThread_get_thread_ident) in archive /usr/local/lib/libpython3.13.a

    ld: error: relocation R_X86_64_32 cannot be used against symbol '_PyRuntime'; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
    referenced by thread_pthread.h:140 (Python/thread_pthread.h:140)
    thread.o:(PyThread_get_thread_ident) in archive /usr/local/lib/libpython3.13.a

    ld: error: relocation R_X86_64_32S cannot be used against symbol '_PyRuntime'; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
    referenced by thread_pthread.h:141 (Python/thread_pthread.h:141)
    thread.o:(PyThread_get_thread_ident) in archive /usr/local/lib/libpython3.13.a

    ld: error: relocation R_X86_64_32 cannot be used against symbol '_PyRuntime'; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
    referenced by thread_pthread.h:138 (Python/thread_pthread.h:138)
    thread.o:(PyThread_get_thread_native_id) in archive /usr/local/lib/libpython3.13.a

    ld: error: relocation R_X86_64_32 cannot be used against symbol '_PyRuntime'; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
    referenced by thread_pthread.h:140 (Python/thread_pthread.h:140)
    thread.o:(PyThread_get_thread_native_id) in archive /usr/local/lib/libpython3.13.a

    ld: error: relocation R_X86_64_32S cannot be used against symbol '_PyRuntime'; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
    referenced by thread_pthread.h:141 (Python/thread_pthread.h:141)
    thread.o:(PyThread_get_thread_native_id) in archive /usr/local/lib/libpython3.13.a

    ld: error: relocation R_X86_64_32 cannot be used against symbol '_PyRuntime'; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
    referenced by thread_pthread.h:138 (Python/thread_pthread.h:138)
    thread.o:(PyThread_allocate_lock) in archive /usr/local/lib/libpython3.13.a

    ld: error: relocation R_X86_64_32 cannot be used against symbol '_PyRuntime'; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
    referenced by thread_pthread.h:140 (Python/thread_pthread.h:140)
    thread.o:(PyThread_allocate_lock) in archive /usr/local/lib/libpython3.13.a

    ld: error: relocation R_X86_64_32S cannot be used against symbol '_PyRuntime'; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
    referenced by thread_pthread.h:141 (Python/thread_pthread.h:141)
    thread.o:(PyThread_allocate_lock) in archive /usr/local/lib/libpython3.13.a

    ld: error: relocation R_X86_64_32 cannot be used against local symbol; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(thread.o)
    referenced by thread_pthread.h:441 (Python/thread_pthread.h:441)
    thread.o:(PyThread_allocate_lock) in archive /usr/local/lib/libpython3.13.a

    ld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
    clang++: error: linker command failed with exit code 1 (use -v to see invocation)
    ninja: build stopped: subcommand failed.
    Compilation failed unexpectedly.
    Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
    the maintainer.
    *** Error code 1

    --
    Member - Liberal International This is [email protected] Ici [email protected]
    Yahweh, King & country!Never Satan President Republic!Beware AntiChrist rising! Look at Psalms 14 and 53 on Atheism ;
    Ontario vote for the Liberals - The best Anti-Trump option!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lew Pitcher@21:1/5 to The Doctor on Sun Mar 2 15:54:19 2025
    XPost: comp.lang.c++, comp.lang.python

    First off, this isn't really on-topic for comp.lang.c, as it is a question regarding a linker, interacting
    with the results of various options given to a specific compiler.

    However...

    On Sun, 02 Mar 2025 14:35:08 +0000, The Doctor wrote:

    How do I compensate for

    ld: error: relocation R_X86_64_32 cannot be used against symbol '_PyRuntime'; recompile with -fPIC

    The error message tells you exactly how to fix the problem: recompile the module using the
    -fPIC
    option to the compiler. -fPIC tells your compiler to generate a specific type of position-independant
    code, which your linker (apparently) requires for a specific type of relocation.


    [snip]

    HTH
    --
    Lew Pitcher
    "In Skills We Trust"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lew Pitcher@21:1/5 to Muttley on Sun Mar 2 17:08:33 2025
    XPost: comp.lang.c++, comp.lang.python

    On Sun, 02 Mar 2025 16:58:20 +0000, Muttley wrote:

    On Sun, 2 Mar 2025 15:54:19 -0000 (UTC)
    Lew Pitcher <[email protected]> gabbled:
    First off, this isn't really on-topic for comp.lang.c, as it is a question >>regarding a linker, interacting
    with the results of various options given to a specific compiler.

    Is there a comp.lang.c.linker group?

    That wouldn't even make sense. What you want is a group like
    the comp.unix hierarchy (for ld, as a tool), or gnu.gcc.help
    (or even gnu.misc.discuss), or even comp.programming.

    Your issue isn't a C language or C usage issue, it's a
    "What options do I give this particular compiler in order
    to satisfy the requirements of this particular linker?" issue.

    No? Then its a perfectly valid post.

    Yes. Somewhere else.

    --30--

    --
    Lew Pitcher
    "In Skills We Trust"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Sun Mar 2 16:58:20 2025
    XPost: comp.lang.c++, comp.lang.python

    On Sun, 2 Mar 2025 15:54:19 -0000 (UTC)
    Lew Pitcher <[email protected]> gabbled:
    First off, this isn't really on-topic for comp.lang.c, as it is a question >regarding a linker, interacting
    with the results of various options given to a specific compiler.

    Is there a comp.lang.c.linker group? No? Then its a perfectly valid post.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James Kuyper@21:1/5 to Muttley on Sun Mar 2 12:30:53 2025
    XPost: comp.lang.c++, comp.lang.python

    On Sun, 02 Mar 2025 16:58:20 +0000, Muttley wrote:

    On Sun, 2 Mar 2025 15:54:19 -0000 (UTC)
    Lew Pitcher <[email protected]> gabbled:
    First off, this isn't really on-topic for comp.lang.c, as it is a question >>regarding a linker, interacting
    with the results of various options given to a specific compiler.

    Is there a comp.lang.c.linker group?

    comp.lang.c is about using the C programming language. Linkers are
    independent of the programming language, and can be used to link
    together programs written in many different languages. The subject line
    and the text of the error messages indicate that it's a Python program,
    so why would a group devoted to C be in any way appropriate?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Waldek Hebisch@21:1/5 to The Doctor on Sun Mar 2 17:54:35 2025
    XPost: comp.lang.c++, comp.lang.python

    In comp.lang.c The Doctor <[email protected]> wrote:
    How do I compensate for

    ld: error: relocation R_X86_64_32 cannot be used against symbol '_PyRuntime'; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
    referenced by thread_pthread.h:138 (Python/thread_pthread.h:138)
    thread.o:(PyThread_init_thread) in archive /usr/local/lib/libpython3.13.a


    This is real world question and as such is considered off-topic
    in comp.lang.c. However, you could try '-no-pie' to the compiler.

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to James Kuyper on Sun Mar 2 18:35:31 2025
    XPost: comp.lang.c++, comp.lang.python

    James Kuyper <[email protected]> writes:
    On Sun, 02 Mar 2025 16:58:20 +0000, Muttley wrote:

    On Sun, 2 Mar 2025 15:54:19 -0000 (UTC)
    Lew Pitcher <[email protected]> gabbled:
    First off, this isn't really on-topic for comp.lang.c, as it is a question >>>regarding a linker, interacting
    with the results of various options given to a specific compiler.

    Is there a comp.lang.c.linker group?

    comp.lang.c is about using the C programming language. Linkers are >independent of the programming language, and can be used to link
    together programs written in many different languages. The subject line
    and the text of the error messages indicate that it's a Python program,
    so why would a group devoted to C be in any way appropriate?

    Frankly, I'd rather read about issues in the linker here than the
    interminable useless arguments about the precision and accuracy of
    fmod, which belong elsewhere (such as email), or pointless musings
    about the halting problem.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Heathfield@21:1/5 to Waldek Hebisch on Sun Mar 2 19:15:48 2025
    XPost: comp.lang.c++, comp.lang.python

    On 02/03/2025 17:54, Waldek Hebisch wrote:
    In comp.lang.c The Doctor <[email protected]> wrote:
    How do I compensate for

    ld: error: relocation R_X86_64_32 cannot be used against symbol '_PyRuntime'; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
    referenced by thread_pthread.h:138 (Python/thread_pthread.h:138)
    thread.o:(PyThread_init_thread) in archive /usr/local/lib/libpython3.13.a


    This is real world question and as such is considered off-topic
    in comp.lang.c.

    I have written hundreds of thousands of lines of real-world code
    in standard C, all of which would be topical here. The real world
    is bigger than you think.

    --
    Richard Heathfield
    Email: rjh at cpax dot org dot uk
    "Usenet is a strange place" - dmr 29 July 1999
    Sig line 4 vacant - apply within

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James Kuyper@21:1/5 to Waldek Hebisch on Sun Mar 2 13:38:50 2025
    XPost: comp.lang.c++, comp.lang.python

    On 3/2/25 12:54, Waldek Hebisch wrote:
    In comp.lang.c The Doctor <[email protected]> wrote:
    How do I compensate for

    ld: error: relocation R_X86_64_32 cannot be used against symbol '_PyRuntime'; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
    referenced by thread_pthread.h:138 (Python/thread_pthread.h:138)
    thread.o:(PyThread_init_thread) in archive /usr/local/lib/libpython3.13.a


    This is real world question and as such is considered off-topic
    in comp.lang.c. However, you could try '-no-pie' to the compiler.

    Real world questions about the C programming language are entirely
    on-topic here. Note, however, that many questions posted here are not
    about C itself, but about the quirks of particular implementations of C.
    You can get better answers to such questions by asking in forums
    specific to the relevant implementation, and helpful people will remind
    your of that. It's a misunderstanding of those redirections to conclude
    that c.l.c is not for real world questions.

    However Python is NOT an implementation of C, not even by the loosest reasonable interpretation, so why should it be discussed here?.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From The Doctor@21:1/5 to [email protected] on Mon Mar 3 00:42:23 2025
    XPost: comp.lang.c++, comp.lang.python

    In article <vq2j3n$v2fk$[email protected]>,
    James Kuyper <[email protected]> wrote:
    On 3/2/25 12:54, Waldek Hebisch wrote:
    In comp.lang.c The Doctor <[email protected]> wrote:
    How do I compensate for

    ld: error: relocation R_X86_64_32 cannot be used against symbol >'_PyRuntime'; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
    referenced by thread_pthread.h:138 (Python/thread_pthread.h:138)
    thread.o:(PyThread_init_thread) in archive >/usr/local/lib/libpython3.13.a


    This is real world question and as such is considered off-topic
    in comp.lang.c. However, you could try '-no-pie' to the compiler.

    Real world questions about the C programming language are entirely
    on-topic here. Note, however, that many questions posted here are not
    about C itself, but about the quirks of particular implementations of C.
    You can get better answers to such questions by asking in forums
    specific to the relevant implementation, and helpful people will remind
    your of that. It's a misunderstanding of those redirections to conclude
    that c.l.c is not for real world questions.

    However Python is NOT an implementation of C, not even by the loosest >reasonable interpretation, so why should it be discussed here?.


    Note the C error!
    --
    Member - Liberal International This is [email protected] Ici [email protected]
    Yahweh, King & country!Never Satan President Republic!Beware AntiChrist rising! Look at Psalms 14 and 53 on Atheism ;
    Ontario vote for the Liberals - The best Anti-Trump option!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From The Doctor@21:1/5 to The Doctor on Mon Mar 3 00:46:01 2025
    XPost: comp.lang.c++, comp.lang.python

    In article <vq2ttf$199t$[email protected]>,
    The Doctor <[email protected]> wrote:
    In article <vq2j3n$v2fk$[email protected]>,
    James Kuyper <[email protected]> wrote:
    On 3/2/25 12:54, Waldek Hebisch wrote:
    In comp.lang.c The Doctor <[email protected]> wrote:
    How do I compensate for

    ld: error: relocation R_X86_64_32 cannot be used against symbol >>'_PyRuntime'; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
    referenced by thread_pthread.h:138 (Python/thread_pthread.h:138) >>>>>>> thread.o:(PyThread_init_thread) in archive >>/usr/local/lib/libpython3.13.a


    This is real world question and as such is considered off-topic
    in comp.lang.c. However, you could try '-no-pie' to the compiler.

    Real world questions about the C programming language are entirely
    on-topic here. Note, however, that many questions posted here are not
    about C itself, but about the quirks of particular implementations of C. >>You can get better answers to such questions by asking in forums
    specific to the relevant implementation, and helpful people will remind >>your of that. It's a misunderstanding of those redirections to conclude >>that c.l.c is not for real world questions.

    However Python is NOT an implementation of C, not even by the loosest >>reasonable interpretation, so why should it be discussed here?.


    Note the C error!

    I did add the -fPIC . will try the -no-pie .

    --
    Member - Liberal International This is [email protected] Ici [email protected]
    Yahweh, King & country!Never Satan President Republic!Beware AntiChrist rising!
    Look at Psalms 14 and 53 on Atheism ;
    Ontario vote for the Liberals - The best Anti-Trump option!


    --
    Member - Liberal International This is [email protected] Ici [email protected]
    Yahweh, King & country!Never Satan President Republic!Beware AntiChrist rising! Look at Psalms 14 and 53 on Atheism ;
    Ontario vote for the Liberals - The best Anti-Trump option!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James Kuyper@21:1/5 to The Doctor on Sun Mar 2 22:24:22 2025
    XPost: comp.lang.c++, comp.lang.python

    On 3/2/25 19:42, The Doctor wrote:
    In article <vq2j3n$v2fk$[email protected]>,
    James Kuyper <[email protected]> wrote:
    On 3/2/25 12:54, Waldek Hebisch wrote:
    In comp.lang.c The Doctor <[email protected]> wrote:
    How do I compensate for

    ld: error: relocation R_X86_64_32 cannot be used against symbol
    '_PyRuntime'; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
    referenced by thread_pthread.h:138 (Python/thread_pthread.h:138) >>>>>>> thread.o:(PyThread_init_thread) in archive
    /usr/local/lib/libpython3.13.a


    This is real world question and as such is considered off-topic
    in comp.lang.c. However, you could try '-no-pie' to the compiler.

    Real world questions about the C programming language are entirely
    on-topic here. Note, however, that many questions posted here are not
    about C itself, but about the quirks of particular implementations of C.
    You can get better answers to such questions by asking in forums
    specific to the relevant implementation, and helpful people will remind
    your of that. It's a misunderstanding of those redirections to conclude
    that c.l.c is not for real world questions.

    However Python is NOT an implementation of C, not even by the loosest
    reasonable interpretation, so why should it be discussed here?.


    Note the C error!

    The message indicates that PyRuntime is referenced inside Python/thread_pthread.h, which is likely to have been #included in some
    C code. However, the error message indicates that the problem is not
    about the C code, but about linkage. The C code is just one of the two
    things that need to be linked together. The solution is a linker option,
    not a change anything in the C code.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Mon Mar 3 08:13:04 2025
    XPost: comp.lang.c++, comp.lang.python

    On Sun, 2 Mar 2025 12:30:53 -0500
    James Kuyper <[email protected]> wibbled:
    On Sun, 02 Mar 2025 16:58:20 +0000, Muttley wrote:

    On Sun, 2 Mar 2025 15:54:19 -0000 (UTC)
    Lew Pitcher <[email protected]> gabbled:
    First off, this isn't really on-topic for comp.lang.c, as it is a question >>>regarding a linker, interacting
    with the results of various options given to a specific compiler.

    Is there a comp.lang.c.linker group?

    comp.lang.c is about using the C programming language. Linkers are >independent of the programming language, and can be used to link

    Without compilers and linkers a C program would just be a load of text.

    together programs written in many different languages. The subject line
    and the text of the error messages indicate that it's a Python program,
    so why would a group devoted to C be in any way appropriate?

    If you'd taken 2 seconds to look at it you'd realise the issue was building
    the Python source code which is written in C. That sounds like a C issue to me.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Mon Mar 3 08:14:55 2025
    XPost: comp.lang.c++, comp.lang.python

    On Sun, 2 Mar 2025 17:08:33 -0000 (UTC)
    Lew Pitcher <[email protected]> wibbled:
    On Sun, 02 Mar 2025 16:58:20 +0000, Muttley wrote:

    On Sun, 2 Mar 2025 15:54:19 -0000 (UTC)
    Lew Pitcher <[email protected]> gabbled:
    First off, this isn't really on-topic for comp.lang.c, as it is a question >>>regarding a linker, interacting
    with the results of various options given to a specific compiler.

    Is there a comp.lang.c.linker group?

    That wouldn't even make sense. What you want is a group like
    the comp.unix hierarchy (for ld, as a tool), or gnu.gcc.help
    (or even gnu.misc.discuss), or even comp.programming.

    I don't want any group, it wasn't my problem. And using your logic how is comp.programming and more related to linker issues than comp.lang.c?

    Your issue isn't a C language or C usage issue, it's a
    "What options do I give this particular compiler in order
    to satisfy the requirements of this particular linker?" issue.

    So compiling C has nothing to do with C? Riiiight.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Heathfield@21:1/5 to [email protected] on Mon Mar 3 08:31:16 2025
    XPost: comp.lang.c++, comp.lang.python

    On 03/03/2025 08:13, [email protected] wrote:
    On Sun, 2 Mar 2025 12:30:53 -0500
    James Kuyper <[email protected]> wibbled:
    On Sun, 02 Mar 2025 16:58:20 +0000, Muttley wrote:

    On Sun, 2 Mar 2025 15:54:19 -0000 (UTC)
    Lew Pitcher <[email protected]> gabbled:
    First off, this isn't really on-topic for comp.lang.c, as it is a question >>>> regarding a linker, interacting
    with the results of various options given to a specific compiler.

    Is there a comp.lang.c.linker group?

    comp.lang.c is about using the C programming language. Linkers are
    independent of the programming language, and can be used to link

    Without compilers and linkers a C program would just be a load of text.

    And without people to write it and buildings in which to work it
    wouldn't even be that, so by your argument everything from
    demographics to urban planning would be topical here.

    It's an old argument, but it has never been a good one.


    together programs written in many different languages. The subject line
    and the text of the error messages indicate that it's a Python program,
    so why would a group devoted to C be in any way appropriate?

    If you'd taken 2 seconds to look at it you'd realise the issue was building the Python source code which is written in C. That sounds like a C issue to me.

    Then you have very gullible ears. Building the Python source is
    an issue for a specific compiler group.

    --
    Richard Heathfield
    Email: rjh at cpax dot org dot uk
    "Usenet is a strange place" - dmr 29 July 1999
    Sig line 4 vacant - apply within

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Mon Mar 3 10:44:08 2025
    XPost: comp.lang.c++, comp.lang.python

    On Mon, 3 Mar 2025 08:31:16 +0000
    Richard Heathfield <[email protected]> wibbled:
    On 03/03/2025 08:13, [email protected] wrote:
    On Sun, 2 Mar 2025 12:30:53 -0500
    James Kuyper <[email protected]> wibbled:
    On Sun, 02 Mar 2025 16:58:20 +0000, Muttley wrote:
    comp.lang.c is about using the C programming language. Linkers are
    independent of the programming language, and can be used to link

    Without compilers and linkers a C program would just be a load of text.

    And without people to write it and buildings in which to work it
    wouldn't even be that, so by your argument everything from
    demographics to urban planning would be topical here.

    It's an old argument, but it has never been a good one.

    Really? So if a compiler gives an error thats not a C problem? Go ask a
    group for the specific compiler?

    What a load of narrow minded BS. Its not as if these groups get hundreds of messages a day and the amount needs to be cut down.

    If you'd taken 2 seconds to look at it you'd realise the issue was building >> the Python source code which is written in C. That sounds like a C issue to >me.

    Then you have very gullible ears. Building the Python source is

    No idea what gullible ears is supposed to mean.

    an issue for a specific compiler group.

    So which group would that be then?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Heathfield@21:1/5 to [email protected] on Mon Mar 3 12:47:21 2025
    XPost: comp.lang.c++, comp.lang.python

    On 03/03/2025 10:44, [email protected] wrote:
    On Mon, 3 Mar 2025 08:31:16 +0000
    Richard Heathfield <[email protected]> wibbled:
    On 03/03/2025 08:13, [email protected] wrote:
    On Sun, 2 Mar 2025 12:30:53 -0500
    James Kuyper <[email protected]> wibbled:
    On Sun, 02 Mar 2025 16:58:20 +0000, Muttley wrote:
    comp.lang.c is about using the C programming language. Linkers are
    independent of the programming language, and can be used to link

    Without compilers and linkers a C program would just be a load of text.

    And without people to write it and buildings in which to work it
    wouldn't even be that, so by your argument everything from
    demographics to urban planning would be topical here.

    It's an old argument, but it has never been a good one.

    Really?

    Really.

    So if a compiler gives an error thats not a C problem?

    The compiler isn't a C problem. The code that prompted the error
    can be.

    Go ask a
    group for the specific compiler?

    If the question is about the compiler, yes.

    If the question is about C code, they will properly redirect you
    here.


    What a load of narrow minded BS.

    Why don't you cut to the chase and say something bad about my
    mother? The fact that you don't understand topicality does not
    invalidate the concept of topicality.

    Its not as if these groups get hundreds of
    messages a day and the amount needs to be cut down.

    The groups where the question is topical do not get hundreds of
    messages a day either. Why steal their questions?


    If you'd taken 2 seconds to look at it you'd realise the issue was building >>> the Python source code which is written in C. That sounds like a C issue to >> me.

    Then you have very gullible ears. Building the Python source is

    No idea what gullible ears is supposed to mean.

    I'm sorry. I'll dial back the rhetoric for you.

    Building Python source not C question. Capisce?

    an issue for a specific compiler group.

    So which group would that be then?

    No idea. But we're crossposted to comp.lang.python, who may be
    willing to give you a hint.

    --
    Richard Heathfield
    Email: rjh at cpax dot org dot uk
    "Usenet is a strange place" - dmr 29 July 1999
    Sig line 4 vacant - apply within

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to [email protected] on Mon Mar 3 12:20:35 2025
    XPost: comp.lang.c++, comp.lang.python

    On 03/03/2025 10:44, [email protected] wrote:
    On Mon, 3 Mar 2025 08:31:16 +0000
    Richard Heathfield <[email protected]> wibbled:
    On 03/03/2025 08:13, [email protected] wrote:
    On Sun, 2 Mar 2025 12:30:53 -0500
    James Kuyper <[email protected]> wibbled:
    On Sun, 02 Mar 2025 16:58:20 +0000, Muttley wrote:
    comp.lang.c is about using the C programming language. Linkers are
    independent of the programming language, and can be used to link

    Without compilers and linkers a C program would just be a load of text.

    And without people to write it and buildings in which to work it
    wouldn't even be that, so by your argument everything from
    demographics to urban planning would be topical here.

    It's an old argument, but it has never been a good one.

    Really? So if a compiler gives an error thats not a C problem? Go ask a
    group for the specific compiler?

    The errors reported by the OP were like this:

    ld: error: relocation R_X86_64_32 cannot be used against symbol
    '_PyRuntime'; recompile with -fPIC

    'ld' is a program that can be used to link programs in any language.

    The problem appears to be do with generating position independent code
    since these days linkers like to generate programs that can loaded at an arbitrary address in high memory.

    I can't see anything to do with C here, other than the source in
    question may have been written in C.

    What a load of narrow minded BS. Its not as if these groups get hundreds of messages a day and the amount needs to be cut down.

    Personally I'm not bothered, and would have answered if I could; I think
    some already have.

    For a broader C forum, which is more tolerant than this one even though
    it is moderated, the OP could try the C_Programming subreddit of Reddit.

    The question also seems a good fit for Stack Exchange.

    There may even be specialist forums for building or developing CPython.

    (Over a decade ago, I myself had a problem in building CPython on
    Windows. I posted about in comp.lang.python, but they were *******
    useless. People there only knew how to write Python programs.)

    I expect however you'd be OK with this forum being full of everyday
    development issues associated with a million different applications, but
    which just happen to be written in C, or which are partly in C.



    If you'd taken 2 seconds to look at it you'd realise the issue was building >>> the Python source code which is written in C. That sounds like a C issue to >> me.

    Then you have very gullible ears. Building the Python source is

    No idea what gullible ears is supposed to mean.

    an issue for a specific compiler group.

    So which group would that be then?

    On usenet? That is pretty much dead.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Mon Mar 3 15:06:39 2025
    XPost: comp.lang.c++

    On Mon, 3 Mar 2025 12:47:21 +0000
    Richard Heathfield <[email protected]> wibbled:
    On 03/03/2025 10:44, [email protected] wrote:
    No idea what gullible ears is supposed to mean.

    I'm sorry. I'll dial back the rhetoric for you.

    Building Python source not C question. Capisce?

    The python source is written in C so yes, compiling it is a C question. If
    you want a group with only narrow specific issues about C discussed start your own moderated one. And expect to get zero users.

    So which group would that be then?

    No idea. But we're crossposted to comp.lang.python, who may be
    willing to give you a hint.

    Seems as well as not understanding a valid question you can't even follow a thread. I'm not the OP, I was merely supporting his posting here. HTH.

    Oh, and I removed the crosspost, building the C source would have no relevance to that group.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Mon Mar 3 15:03:20 2025
    XPost: comp.lang.c++, comp.lang.python

    On Mon, 3 Mar 2025 12:20:35 +0000
    bart <[email protected]> wibbled:
    On 03/03/2025 10:44, [email protected] wrote:
    On Mon, 3 Mar 2025 08:31:16 +0000
    Really? So if a compiler gives an error thats not a C problem? Go ask a
    group for the specific compiler?

    The errors reported by the OP were like this:

    ld: error: relocation R_X86_64_32 cannot be used against symbol
    '_PyRuntime'; recompile with -fPIC

    'ld' is a program that can be used to link programs in any language.

    The problem appears to be do with generating position independent code
    since these days linkers like to generate programs that can loaded at an >arbitrary address in high memory.

    I can't see anything to do with C here, other than the source in
    question may have been written in C.

    Yes, thats kind of the point. You wouldn't get these errors if it was written in Java or C#.

    I expect however you'd be OK with this forum being full of everyday >development issues associated with a million different applications, but >which just happen to be written in C, or which are partly in C.

    [snip]

    On usenet? That is pretty much dead.

    Not dead but certainly not buzzing yet I presume thats how you like it given you don't want any "everyday development issues" relating to C mentioned here.

    Or are you another one who thinks usenet should be for the exclusive discussion of high brow issues only of interest to you?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James Kuyper@21:1/5 to [email protected] on Mon Mar 3 10:22:10 2025
    XPost: comp.lang.c++, comp.lang.python

    On 03/03/2025 08:13, [email protected] wrote:
    On Sun, 2 Mar 2025 12:30:53 -0500
    James Kuyper <[email protected]> wibbled:
    On Sun, 02 Mar 2025 16:58:20 +0000, Muttley wrote:

    On Sun, 2 Mar 2025 15:54:19 -0000 (UTC)
    Lew Pitcher <[email protected]> gabbled:
    First off, this isn't really on-topic for comp.lang.c, as it is a question >>>> regarding a linker, interacting
    with the results of various options given to a specific compiler.

    Is there a comp.lang.c.linker group?

    comp.lang.c is about using the C programming language. Linkers are
    independent of the programming language, and can be used to link

    Without compilers and linkers a C program would just be a load of text.

    Without computers, keyboards and monitors most C programs wouldn't be
    much use, either. That doesn't make a malfunctioning computer monitor a
    C problem. And it doesn't make a linkage problems a C problem either.

    together programs written in many different languages. The subject line
    and the text of the error messages indicate that it's a Python program,
    so why would a group devoted to C be in any way appropriate?

    If you'd taken 2 seconds to look at it you'd realise the issue was building the Python source code which is written in C.

    The indentations of the first message cross-posted to comp.lang.c and comp.lang.c++ suggest that it was the latest in a series of earlier
    messages posted somewhere else (comp.lang.python?). Those earlier
    messages might have contained additional information. If that
    information was relevant, it should have been included when the message
    was first cross-posted to comp.lang.c or comp.lang.c++. You might be
    right about it being "Python source code ... written in C", but nothing
    in the messages that were posted here makes that obvious.

    That sounds like a C issue to me.

    If it were a C problem, then the C source code that produced the problem
    should have been shown. It's hard to debug code that you can't see.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From The Doctor@21:1/5 to [email protected] on Mon Mar 3 16:12:16 2025
    XPost: comp.lang.c++, comp.lang.python

    In article <vq3oag$18iv6$[email protected]>, <[email protected]> wrote: >On Sun, 2 Mar 2025 12:30:53 -0500
    James Kuyper <[email protected]> wibbled:
    On Sun, 02 Mar 2025 16:58:20 +0000, Muttley wrote:

    On Sun, 2 Mar 2025 15:54:19 -0000 (UTC)
    Lew Pitcher <[email protected]> gabbled:
    First off, this isn't really on-topic for comp.lang.c, as it is a question >>>>regarding a linker, interacting
    with the results of various options given to a specific compiler.

    Is there a comp.lang.c.linker group?

    comp.lang.c is about using the C programming language. Linkers are >>independent of the programming language, and can be used to link

    Without compilers and linkers a C program would just be a load of text.

    together programs written in many different languages. The subject line
    and the text of the error messages indicate that it's a Python program,
    so why would a group devoted to C be in any way appropriate?

    If you'd taken 2 seconds to look at it you'd realise the issue was building >the Python source code which is written in C. That sounds like a C issue to me.


    I am now trying without the static library.
    --
    Member - Liberal International This is [email protected] Ici [email protected]
    Yahweh, King & country!Never Satan President Republic!Beware AntiChrist rising! Look at Psalms 14 and 53 on Atheism ;
    Ontario vote for the Liberals - The best Anti-Trump option!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to [email protected] on Mon Mar 3 16:39:25 2025
    On 03/03/2025 15:03, [email protected] wrote:
    On Mon, 3 Mar 2025 12:20:35 +0000
    bart <[email protected]> wibbled:
    On 03/03/2025 10:44, [email protected] wrote:
    On Mon, 3 Mar 2025 08:31:16 +0000
    Really? So if a compiler gives an error thats not a C problem? Go ask a
    group for the specific compiler?

    The errors reported by the OP were like this:

    ld: error: relocation R_X86_64_32 cannot be used against symbol
    '_PyRuntime'; recompile with -fPIC

    'ld' is a program that can be used to link programs in any language.

    The problem appears to be do with generating position independent code
    since these days linkers like to generate programs that can loaded at an
    arbitrary address in high memory.

    I can't see anything to do with C here, other than the source in
    question may have been written in C.

    Yes, thats kind of the point. You wouldn't get these errors if it was written in Java or C#.

    Why not? There would be the same issues with position-independent code.
    Maybe they just come up elsewhere, or maybe the problem is taken care of
    inside the tool.

    Take this example:

    c:\mx>mm -obj hello
    Compiling hello.m to hello.obj

    c:\mx>ld hello.obj
    hello.obj:hello.obj:(.text+0x4e05): relocation truncated to fit: IMAGE_REL_AMD64_ADDR32 against `.data'

    It's a similar kind of linker issue. But the language here isn't C. I
    can make it C:

    c:\cx>bcc -c hello.c
    Compiling hello.c to hello.obj

    c:\cx>ld hello.obj
    hello.obj:hello.obj:(.text+0x7): relocation truncated to fit: IMAGE_REL_AMD64_ADDR32 against `.data'

    Exactly the same error, one for language C, and one for language 'M'.

    So you still think it's to do with the C language only?

    Here, I tweaked both compilers to disable the high-loading flag when
    generating object files, in order to force the error, because normally
    it knows to set it for those file types.

    So it's to do with the compiler backend, but such backends tend to be
    used for multiple languages: gcc can be used for multiple front-end
    languages, as can LLVM used by clang.

    And the solution will likely be to do with the build system: you don't
    build CPython by manually invoking gcc with your own options. It's a
    quite elaborate process.

    Presumably the official build system works, so the OP is doing something different.

    I very much doubt that whatever it is can be fixed by modifying the C
    sources.

    [snip]

    On usenet? That is pretty much dead.

    Not dead but certainly not buzzing yet

    It was buzzing in the 1990s but has been gradually dying. This group is
    an oasis; the rest of it is either a wasteland or a cesspit, or has been
    taken over by nutters.

    I presume thats how you like it given
    you don't want any "everyday development issues" relating to C mentioned here.

    Or are you another one who thinks usenet should be for the exclusive discussion
    of high brow issues only of interest to you?

    I'm pointing out why this is probably not on topic. Personally I don't care.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Mon Mar 3 16:26:54 2025
    XPost: comp.lang.c++, comp.lang.python

    On Mon, 3 Mar 2025 11:24:13 -0500
    geodandw <[email protected]> wibbled:
    On 3/3/25 10:22, James Kuyper wrote:
    If it were a C problem, then the C source code that produced the problem
    should have been shown. It's hard to debug code that you can't see.
    Why is this group so intolerant?

    For as long as usenet has been around there have been people trying to surreptitiously control groups and limit the valid topics to those which they think are appropriate, whether others share their opinions or not. Usually IME these people are on the spectrum.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James Kuyper@21:1/5 to geodandw on Mon Mar 3 11:39:58 2025
    XPost: comp.lang.c++, comp.lang.python

    On 3/3/25 11:24, geodandw wrote:
    On 3/3/25 10:22, James Kuyper wrote:
    On 03/03/2025 08:13, [email protected] wrote:
    ...
    That sounds like a C issue to me.

    If it were a C problem, then the C source code that produced the problem
    should have been shown. It's hard to debug code that you can't see.
    Why is this group so intolerant?

    Because what you call intolerance, we call topicality. When you post a
    message to a group where it is on-topic, the message gets seen and
    responded to by people who are more likely to understand and be
    interested in the contents of the message, and can give you better
    answers to any questions you have. When you post to the wrong group,
    they will be less interested in the message and less capable of giving
    good answers to it.
    However, if you're not interested in getting good answers to your
    questions, and it doesn't bother you that your messages are going to
    people not interested in the topic of your message, by all means post to
    any group you choose. This isn't a moderated group - no one can stop you
    from posting here.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Mon Mar 3 16:56:37 2025
    XPost: comp.lang.c++, comp.lang.python

    On Mon, 3 Mar 2025 11:39:58 -0500
    James Kuyper <[email protected]> wibbled:
    On 3/3/25 11:24, geodandw wrote:
    On 3/3/25 10:22, James Kuyper wrote:
    On 03/03/2025 08:13, [email protected] wrote:
    ....
    That sounds like a C issue to me.

    If it were a C problem, then the C source code that produced the problem >>> should have been shown. It's hard to debug code that you can't see.
    Why is this group so intolerant?

    Because what you call intolerance, we call topicality. When you post a >message to a group where it is on-topic, the message gets seen and

    Only an arrogant idiot would think that errors on linking object files generated by a C compiler are not relevant in a C language group.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Mon Mar 3 16:19:55 2025
    XPost: comp.lang.c++, comp.lang.python

    On Mon, 3 Mar 2025 10:22:10 -0500
    James Kuyper <[email protected]> wibbled:
    On 03/03/2025 08:13, [email protected] wrote:
    Without compilers and linkers a C program would just be a load of text.

    Without computers, keyboards and monitors most C programs wouldn't be
    much use, either. That doesn't make a malfunctioning computer monitor a
    C problem. And it doesn't make a linkage problems a C problem either.

    Your reducto ad absurdum analogy is just that - absurd.

    Failure to link object files created by a C compiler is very much a C problem eg in some cases though maybe not this it may be down to missing "extern" keywords in certain C source files. Either way it means the compiler has
    not created the correct object files from the source.

    Unless you're going to claim that C programming ends at the editor and compilation has nothing to do with it.

    If it were a C problem, then the C source code that produced the problem >should have been shown. It's hard to debug code that you can't see.

    In other news - the lack of electrons in the battery of a car thats failing to start are nothing to do with the car and hence not a maintenance issue.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Brown@21:1/5 to [email protected] on Mon Mar 3 18:22:52 2025
    XPost: comp.lang.c++, comp.lang.python

    On 03/03/2025 17:56, [email protected] wrote:
    On Mon, 3 Mar 2025 11:39:58 -0500
    James Kuyper <[email protected]> wibbled:
    On 3/3/25 11:24, geodandw wrote:
    On 3/3/25 10:22, James Kuyper wrote:
    On 03/03/2025 08:13, [email protected] wrote:
    ....
    That sounds like a C issue to me.

    If it were a C problem, then the C source code that produced the problem >>>> should have been shown. It's hard to debug code that you can't see.
    Why is this group so intolerant?

    Because what you call intolerance, we call topicality. When you post a
    message to a group where it is on-topic, the message gets seen and

    Only an arrogant idiot would think that errors on linking object files generated by a C compiler are not relevant in a C language group.



    If the problem could be solved by understanding C better, it would be
    relevant. But the problem has nothing to do with the C /code/ in
    question, nor the C language. It's a matter of the build process for
    the particular program - not a C issue. It is not even a linker issue,
    or a "make" issue. It is an issue with the program source and build
    process, which is very specific to the program in question.

    That means people who are experts on the C language, and experts at C
    coding, can't help the OP - no matter how much they would like to help.

    Thus it is off-topic.

    Of course it is possible that someone in this group is familiar with
    building Python, or with similar errors in building other programs - so
    it's maybe worth trying posting here. But if unless the OP gets lucky
    like that, the best people here can do is give suggestions for other
    sources of help - and then the thread can stop as it is not only
    off-topic, but very niche. The same goes for posting in
    comp.lang.python - amongst the Python users there who have no clue about
    the problem, there might happen to be people who have compiled Python themselves.

    Probably the best place for the OP to look would be in the C-Python
    developer documentation, or groups, forums or mailing lists connected to
    that.


    For the obligatory car metaphor, imagine a group dedicated to learning
    to drive and driving techniques. A post about a particular make of car
    would be off-topic, but perhaps okay on occasion. The OP's post here is
    asking for the best way to avoid roadworks on the Bath to Reading road.
    Maybe he'll get lucky and someone in the group knows that area, but for
    the most part, all the group can do is direct him to other sources of information - despite the fact that he is driving.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Heathfield@21:1/5 to [email protected] on Mon Mar 3 17:25:27 2025
    XPost: comp.lang.c++, comp.lang.python

    On 03/03/2025 16:56, [email protected] wrote:
    On Mon, 3 Mar 2025 11:39:58 -0500
    James Kuyper <[email protected]> wibbled:
    On 3/3/25 11:24, geodandw wrote:
    On 3/3/25 10:22, James Kuyper wrote:
    On 03/03/2025 08:13, [email protected] wrote:
    ....
    That sounds like a C issue to me.

    If it were a C problem, then the C source code that produced the problem >>>> should have been shown. It's hard to debug code that you can't see.
    Why is this group so intolerant?

    Because what you call intolerance, we call topicality. When you post a
    message to a group where it is on-topic, the message gets seen and

    Only an arrogant idiot would think that errors on linking object files generated by a C compiler are not relevant in a C language group.

    James Kuyper has been posting here for decades, and has helped
    many hundreds, or more likely thousands, of C programmers to
    better understand the C language. A genuine language expert, he
    deserves to be treated better than to be called an arrogant
    idiot, especially when the abuser has no discernible track record
    of having ever helped anyone with high quality C advice.

    That may be because "Muttley" doesn't seem even to know what the
    C language /is/.

    --
    Richard Heathfield
    Email: rjh at cpax dot org dot uk
    "Usenet is a strange place" - dmr 29 July 1999
    Sig line 4 vacant - apply within

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Waldek Hebisch@21:1/5 to James Kuyper on Mon Mar 3 17:20:33 2025
    XPost: comp.lang.c++, comp.lang.python

    In comp.lang.c James Kuyper <[email protected]> wrote:
    On 3/2/25 12:54, Waldek Hebisch wrote:
    In comp.lang.c The Doctor <[email protected]> wrote:
    How do I compensate for

    ld: error: relocation R_X86_64_32 cannot be used against symbol '_PyRuntime'; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
    referenced by thread_pthread.h:138 (Python/thread_pthread.h:138)
    thread.o:(PyThread_init_thread) in archive /usr/local/lib/libpython3.13.a


    This is real world question and as such is considered off-topic
    in comp.lang.c. However, you could try '-no-pie' to the compiler.

    Real world questions about the C programming language are entirely
    on-topic here. Note, however, that many questions posted here are not
    about C itself, but about the quirks of particular implementations of C.
    You can get better answers to such questions by asking in forums
    specific to the relevant implementation, and helpful people will remind
    your of that. It's a misunderstanding of those redirections to conclude
    that c.l.c is not for real world questions.

    However Python is NOT an implementation of C, not even by the loosest reasonable interpretation, so why should it be discussed here?.

    The question is about C implementation. Namely, the bible for
    this group, that is C standard requires C implementation to
    produce executables. And making executable from C sources
    it at core of the OP question. Fact that compiling this source
    is supposed to produce Python interpreter or maybe some
    supporting shared library is irrelevant here.

    One could call the problem "Linux problem". Namely, many
    (maybe all) Linux distribution modify(ed) gcc so that creating
    position independent executables is the default and to
    prevent this one need '-no-pie' at final stage. And to
    generate position independent executable all code has to
    be compiled as position independent code which needs '-fPIC'
    option. Similarly, if OP is trying to create shared
    library, then on Linux all code inluded in the shared
    librayr must be compiled as position independent code,
    that is using '-fPIC'.

    Dismissing this as linker problem misses important
    points:
    - linking is considerd part of C implementation
    - '-fPIC' is option for compiler proper
    - '-no-pie' is handled by the compiler driver

    And frankly, making executables or shared library from
    C code is real world thing that C programmer want to do
    and non-programmers would not do.

    OP uses some build system and fixing his problem presumably
    needs changes to build system. And reasonably build system
    may be cosidered of topic here. However, fact that compilation
    proper and final linking must use consitent options is
    real world C problem. I appreciate that many years ago
    comp.lang.c regulars decided that they do not want to answer
    such real world question. However, do you want to tell OP
    "pretend that your main program is in Fortran and ask your
    question in comp.lang.fortran"? FYI, similar questions were
    asked and answered in comp.lang.fortran without questioning
    topicality. So clearly, the only thing which makes such
    question of topic here is past deliberate decision to exclude
    them.

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Heathfield@21:1/5 to geodandw on Mon Mar 3 17:19:39 2025
    XPost: comp.lang.c++, comp.lang.python

    On 03/03/2025 16:24, geodandw wrote:
    On 3/3/25 10:22, James Kuyper wrote:
    On 03/03/2025 08:13, [email protected] wrote:
    On Sun, 2 Mar 2025 12:30:53 -0500
    James Kuyper <[email protected]> wibbled:
    On Sun, 02 Mar 2025 16:58:20 +0000, Muttley wrote:

    On Sun, 2 Mar 2025 15:54:19 -0000 (UTC)
    Lew Pitcher <[email protected]> gabbled:
    First off, this isn't really on-topic for comp.lang.c, as
    it is a question
    regarding a linker, interacting
    with the results of various options given to a specific
    compiler.

    Is there a comp.lang.c.linker group?

    comp.lang.c is about using the C programming language.
    Linkers are
    independent of the programming language, and can be used to link

    Without compilers and linkers a C program would just be a load
    of text.

    Without computers, keyboards and monitors most C programs
    wouldn't be
    much use, either. That doesn't make a malfunctioning computer
    monitor a
    C problem. And it doesn't make a linkage problems a C problem
    either.

    together programs written in many different languages. The
    subject line
    and the text of the error messages indicate that it's a
    Python program,
    so why would a group devoted to C be in any way appropriate?

    If you'd taken 2 seconds to look at it you'd realise the issue
    was building
    the Python source code which is written in C.

    The indentations of the first message cross-posted to
    comp.lang.c and
    comp.lang.c++ suggest that it was the latest in a series of
    earlier
    messages posted somewhere else (comp.lang.python?). Those earlier
    messages might have contained additional information. If that
    information was relevant, it should have been included when the
    message
    was first cross-posted to comp.lang.c or comp.lang.c++. You
    might be
    right about it being "Python source code ... written in C", but
    nothing
    in the messages that were posted here makes that obvious.

      That sounds like a C issue to me.

    If it were a C problem, then the C source code that produced
    the problem
    should have been shown. It's hard to debug code that you can't
    see.
    Why is this group so intolerant?

    Why are you so intolerant of other people's wish to keep this
    group topical?

    --
    Richard Heathfield
    Email: rjh at cpax dot org dot uk
    "Usenet is a strange place" - dmr 29 July 1999
    Sig line 4 vacant - apply within

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Heathfield@21:1/5 to Waldek Hebisch on Mon Mar 3 17:28:00 2025
    XPost: comp.lang.c++, comp.lang.python

    On 03/03/2025 17:20, Waldek Hebisch wrote:
    In comp.lang.c James Kuyper <[email protected]> wrote:

    <snip>

    However Python is NOT an implementation of C, not even by the loosest
    reasonable interpretation, so why should it be discussed here?.

    The question is about C implementation. Namely, the bible for
    this group, that is C standard requires C implementation to
    produce executables.

    So you agree that C /interpreters/ are off-topic here.

    It's a start.

    <snip>

    --
    Richard Heathfield
    Email: rjh at cpax dot org dot uk
    "Usenet is a strange place" - dmr 29 July 1999
    Sig line 4 vacant - apply within

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Brown@21:1/5 to geodandw on Mon Mar 3 18:28:20 2025
    XPost: comp.lang.c++, comp.lang.python

    On 03/03/2025 17:24, geodandw wrote:

    Why is this group so intolerant?

    These groups (comp.lang.c and comp.lang.c++ - it's a long time since I
    looked at comp.lang.python, but I expect things are similar there) are
    very tolerant of most posters, but there are few people who seem to
    delight in annoying people and spreading their own confusion.

    The posts here are mostly trying to give the OP what little help they
    can, and then direct him towards better sources of information - or they
    are trolls by an anonymous coward who regularly changes his nom de
    guerre because he is killfiled by so many people.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to Waldek Hebisch on Mon Mar 3 18:02:32 2025
    XPost: comp.lang.c++, comp.lang.python

    [email protected] (Waldek Hebisch) writes:
    In comp.lang.c James Kuyper <[email protected]> wrote:
    On 3/2/25 12:54, Waldek Hebisch wrote:
    In comp.lang.c The Doctor <[email protected]> wrote:
    How do I compensate for

    ld: error: relocation R_X86_64_32 cannot be used against symbol '_PyRuntime'; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
    referenced by thread_pthread.h:138 (Python/thread_pthread.h:138) >>>>>>> thread.o:(PyThread_init_thread) in archive /usr/local/lib/libpython3.13.a


    This is real world question and as such is considered off-topic
    in comp.lang.c. However, you could try '-no-pie' to the compiler.

    Real world questions about the C programming language are entirely
    on-topic here. Note, however, that many questions posted here are not
    about C itself, but about the quirks of particular implementations of C.
    You can get better answers to such questions by asking in forums
    specific to the relevant implementation, and helpful people will remind
    your of that. It's a misunderstanding of those redirections to conclude
    that c.l.c is not for real world questions.

    However Python is NOT an implementation of C, not even by the loosest
    reasonable interpretation, so why should it be discussed here?.

    The question is about C implementation.

    So why are you cross posting to comp.lang.c++ and comp.lang.python?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James Kuyper@21:1/5 to Waldek Hebisch on Mon Mar 3 12:57:04 2025
    XPost: comp.lang.c++, comp.lang.python

    On 3/3/25 12:20, Waldek Hebisch wrote:
    ...
    The question is about C implementation. Namely, the bible for
    this group, that is C standard requires C implementation to
    produce executables. And making executable from C sources
    it at core of the OP question. Fact that compiling this source
    is supposed to produce Python interpreter or maybe some
    supporting shared library is irrelevant here.

    One could call the problem "Linux problem". Namely, many
    (maybe all) Linux distribution modify(ed) gcc so that creating
    position independent executables is the default and to
    prevent this one need '-no-pie' at final stage. And to
    generate position independent executable all code has to
    be compiled as position independent code which needs '-fPIC'
    option. Similarly, if OP is trying to create shared
    library, then on Linux all code inluded in the shared
    librayr must be compiled as position independent code,
    that is using '-fPIC'.

    Dismissing this as linker problem misses important
    points:
    - linking is considerd part of C implementation
    - '-fPIC' is option for compiler proper
    - '-no-pie' is handled by the compiler driver

    Here is the entirety of what the C standard says about translation phase
    8, where programs are linked together:

    "All external object and function references are resolved. Library
    components are linked to satisfy external references to functions and
    objects not defined in the current translation. All such translator
    output is collected into a program image which contains information
    needed for execution in its execution environment." (5.1.2.2p8)

    Please tell me what that says that is relevant to the solution of this
    problem? The PIC in that option refers to "Position Independent Code", a
    topic about which the C standard says nothing. Whether or not that
    option is needed or even helpful is outside the scope of C.

    And frankly, making executables or shared library from
    C code is real world thing that C programmer want to do
    and non-programmers would not do.

    More directly to the point, programmers who aren't C programmers also
    want to do it, and how it is done has nothing to do with C, and a lot to
    do with the linker. The linker can be language-neutral, and in my
    experience usually is, at least on the Unix-like platforms that I have
    the most experience on (though I have heard of some language-specific
    linkers).


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tim Rentsch@21:1/5 to Scott Lurndal on Mon Mar 3 10:29:28 2025
    [email protected] (Scott Lurndal) writes:

    James Kuyper <[email protected]> writes:

    On Sun, 02 Mar 2025 16:58:20 +0000, Muttley wrote:

    On Sun, 2 Mar 2025 15:54:19 -0000 (UTC)
    Lew Pitcher <[email protected]> gabbled:

    First off, this isn't really on-topic for comp.lang.c, as it is a question >>>> regarding a linker, interacting
    with the results of various options given to a specific compiler.

    Is there a comp.lang.c.linker group?

    comp.lang.c is about using the C programming language. Linkers are
    independent of the programming language, and can be used to link
    together programs written in many different languages. The subject line
    and the text of the error messages indicate that it's a Python program,
    so why would a group devoted to C be in any way appropriate?

    Frankly, I'd rather read about issues in the linker here than the interminable useless arguments about the precision and accuracy of
    fmod, which belong elsewhere (such as email), or pointless musings
    about the halting problem.

    Personally I think questions and answers about the development
    toolchain used in connection with C are okay in comp.lang.c. I
    share Scott's reaction to comments regarding fmod(), but I don't
    think those postings should be excluded. Postings about the
    halting problem are of course way outside the envelope of what is
    appropriate in comp.lang.c.

    I count 25 messages in this thread. Of those 25, one is the
    original message asking the question; two are replies pointing
    out information that might be helpful to OP; two are responses
    to those replies, from OP; one is Scott's reaction, the posting
    I am responding to here. (Incidentally I have benefited, in some
    small measure, from the two first-level replies, and that benefit
    has nothing to do with Python.) If I haven't missed anything,
    that leaves 19 postings that are about nothing but topicality.

    By far a bigger problem with non-topical messages is when some
    people who are regular participants in comp.lang.c, etc, keep on
    talking about matters that are clearly outside the envelope of
    what the newsgroup is expected to address, producing threads that
    are dozens or sometimes hundreds of messages long. What is even
    more disappointing is that some of these same people sometimes
    ding a message for being "off topic", even though they themselves
    are far more guilty of the errant behavior.

    My suggestion is, if anyone thinks a posting is "off topic", just
    don't respond to it. And don't make exceptions or excuses for
    your own behavior.

    My apologies for posting still another message that almost
    exclusively about topicality.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Waldek Hebisch on Mon Mar 3 19:37:02 2025
    XPost: comp.lang.c++, comp.lang.python

    On 03/03/2025 17:20, Waldek Hebisch wrote:
    In comp.lang.c James Kuyper <[email protected]> wrote:
    On 3/2/25 12:54, Waldek Hebisch wrote:
    In comp.lang.c The Doctor <[email protected]> wrote:
    How do I compensate for

    ld: error: relocation R_X86_64_32 cannot be used against symbol '_PyRuntime'; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
    referenced by thread_pthread.h:138 (Python/thread_pthread.h:138) >>>>>>> thread.o:(PyThread_init_thread) in archive /usr/local/lib/libpython3.13.a


    This is real world question and as such is considered off-topic
    in comp.lang.c. However, you could try '-no-pie' to the compiler.

    Real world questions about the C programming language are entirely
    on-topic here. Note, however, that many questions posted here are not
    about C itself, but about the quirks of particular implementations of C.
    You can get better answers to such questions by asking in forums
    specific to the relevant implementation, and helpful people will remind
    your of that. It's a misunderstanding of those redirections to conclude
    that c.l.c is not for real world questions.

    However Python is NOT an implementation of C, not even by the loosest
    reasonable interpretation, so why should it be discussed here?.

    The question is about C implementation. Namely, the bible for
    this group, that is C standard requires C implementation to
    produce executables. And making executable from C sources
    it at core of the OP question. Fact that compiling this source
    is supposed to produce Python interpreter or maybe some
    supporting shared library is irrelevant here.

    One could call the problem "Linux problem". Namely, many
    (maybe all) Linux distribution modify(ed) gcc so that creating
    position independent executables is the default and to
    prevent this one need '-no-pie' at final stage. And to
    generate position independent executable all code has to
    be compiled as position independent code which needs '-fPIC'
    option. Similarly, if OP is trying to create shared
    library, then on Linux all code inluded in the shared
    librayr must be compiled as position independent code,
    that is using '-fPIC'.

    Dismissing this as linker problem misses important
    points:
    - linking is considerd part of C implementation

    C requires independent compilation. It doesn't say how that should be done.

    - '-fPIC' is option for compiler proper
    - '-no-pie' is handled by the compiler driver

    Those are compiler- and platform-specific options, nothing to do with
    the language.

    My two C compilers don't use a linker.


    And frankly, making executables or shared library from
    C code is real world thing that C programmer want to do
    and non-programmers would not do.

    There are a thousand C compilers; I can't imagine that their options and various capabilities are all on topic.

    gcc is sometimes given a free pass because it is so widely used, but the options used with it are more general (eg. -O3 or -s).

    OP uses some build system and fixing his problem presumably
    needs changes to build system. And reasonably build system
    may be cosidered of topic here.

    That's even more off-topic. Build systems use things like CMake and Make
    which have their own syntax, and which are designed to work with
    multiple languages.


    However, fact that compilation
    proper and final linking must use consitent options is
    real world C problem. I appreciate that many years ago
    comp.lang.c regulars decided that they do not want to answer
    such real world question. However, do you want to tell OP
    "pretend that your main program is in Fortran and ask your
    question in comp.lang.fortran"? FYI, similar questions were
    asked and answered in comp.lang.fortran without questioning
    topicality. So clearly, the only thing which makes such
    question of topic here is past deliberate decision to exclude
    them.


    Fortran itself is rather niche; C isn't.

    I suggested that Reddit or Stackoverflow could be used, as they're less
    fussed. There would also be a lot more people who could help.

    On Reddit, the main C forum has 186K members, and the Fortran one under
    8K. However, the Python subreddit has 1.3M members; that might be worth
    trying too.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Heathfield@21:1/5 to geodandw on Mon Mar 3 19:15:48 2025
    XPost: comp.lang.c++, comp.lang.python

    On 03/03/2025 18:33, geodandw wrote:
    On 3/3/25 12:19, Richard Heathfield wrote:
    On 03/03/2025 16:24, geodandw wrote:

    <snip>

    Why is this group so intolerant?

    Why are you so intolerant of other people's wish to keep this
    group topical?


    A. Because

    [...reason...]

    Clearly you have no objection to intolerance as long as it's you
    doing it.

    --
    Richard Heathfield
    Email: rjh at cpax dot org dot uk
    "Usenet is a strange place" - dmr 29 July 1999
    Sig line 4 vacant - apply within

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James Kuyper@21:1/5 to geodandw on Mon Mar 3 16:52:42 2025
    XPost: comp.lang.c++, comp.lang.python

    On 3/3/25 13:29, geodandw wrote:
    On 3/3/25 11:39, James Kuyper wrote:
    On 3/3/25 11:24, geodandw wrote:
    On 3/3/25 10:22, James Kuyper wrote:
    On 03/03/2025 08:13, [email protected] wrote:
    ...
    That sounds like a C issue to me.

    If it were a C problem, then the C source code that produced the problem >>>> should have been shown. It's hard to debug code that you can't see.
    Why is this group so intolerant?

    Because what you call intolerance, we call topicality. When you post a
    message to a group where it is on-topic, the message gets seen and
    responded to by people who are more likely to understand and be
    interested in the contents of the message, and can give you better
    answers to any questions you have. When you post to the wrong group,
    they will be less interested in the message and less capable of giving
    good answers to it.
    However, if you're not interested in getting good answers to your
    questions, and it doesn't bother you that your messages are going to
    people not interested in the topic of your message, by all means post to
    any group you choose. This isn't a moderated group - no one can stop you
    from posting here.
    Even if it is topicality, whey people rude and insulting to others in
    this group?

    I don't know. I've got most of the rudest people killfiled, so I'm not
    exposed to them very much except when someone responds to them. I've
    little insight into why they behave the way that they do.

    However, the context of your comment suggests that you may consider
    something that I said to be rude or insulting. Is that correct? If so,
    could you identify what that was? I can assure you that nothing I wrote
    in this thread was meant to be rude or insulting.

    I'm afraid that I can't make a more general statement to that effect - I
    believe that rudeness is sometimes an appropriate way to inform someone
    that they've stepped over the line into unacceptable behavior. "You cut
    into the line in front of me!" might be considered rude, but it is also
    an appropriate response, if true. Similarly, accusing someone of lying
    might be considered insulting, but if they were indeed lying, the insult
    is earned.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kenny McCormack@21:1/5 to [email protected] on Mon Mar 3 23:42:34 2025
    XPost: comp.lang.c++, comp.lang.python

    In article <vq4n05$1d5dv$[email protected]>, <[email protected]> wrote: >On Mon, 3 Mar 2025 11:39:58 -0500
    James Kuyper <[email protected]> wibbled:
    On 3/3/25 11:24, geodandw wrote:
    On 3/3/25 10:22, James Kuyper wrote:
    On 03/03/2025 08:13, [email protected] wrote:
    ....
    That sounds like a C issue to me.

    If it were a C problem, then the C source code that produced the problem >>>> should have been shown. It's hard to debug code that you can't see.
    Why is this group so intolerant?

    Because what you call intolerance, we call topicality. When you post a >>message to a group where it is on-topic, the message gets seen and

    Only an arrogant idiot would think that errors on linking object files >generated by a C compiler are not relevant in a C language group.



    Indeed. And as you see, there is no shortage of arrogant idiots in
    comp.lang.c

    'Tis always been thus, and always will be.

    BTW, I note that this thread is (still!) posted to 2 other groups, besides
    CLC, but the main topic of discussion in the thread (the usual topicality
    BS) is, of course, only relevant to CLC.

    Funny, that.


    --
    The book "1984" used to be a cautionary tale;
    Now it is a "how-to" manual.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to geodandw on Tue Mar 4 00:49:30 2025
    XPost: comp.lang.c++, comp.lang.python

    On 2025-03-03, geodandw <[email protected]> wrote:
    On 3/3/25 14:15, Richard Heathfield wrote:
    Clearly you have no objection to intolerance as long as it's you doing it. >>
    Disliking intolerance is not intolerance.

    Disruption of a forum topic is not a protected activity, and
    the perpetrators are not members of a protected class.

    Intolerance of off-topic disruptors isn't the same as intolerance
    of an ethnicity or race, etc.

    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @[email protected]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tim Rentsch@21:1/5 to Waldek Hebisch on Mon Mar 3 17:59:38 2025
    [email protected] (Waldek Hebisch) writes:

    In comp.lang.c James Kuyper <[email protected]> wrote:

    On 3/2/25 12:54, Waldek Hebisch wrote:

    In comp.lang.c The Doctor <[email protected]> wrote:

    How do I compensate for

    ld: error: relocation R_X86_64_32 cannot be used against symbol
    '_PyRuntime'; recompile with -fPIC

    defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
    referenced by thread_pthread.h:138 (Python/thread_pthread.h:138)
    thread.o:(PyThread_init_thread)
    in archive /usr/local/lib/libpython3.13.a


    This is real world question and as such is considered off-topic in
    comp.lang.c. However, you could try '-no-pie' to the compiler.

    Real world questions about the C programming language are
    entirely on-topic here. Note, however, that many questions
    posted here are not about C itself, but about the quirks of
    particular implementations of C. You can get better answers to
    such questions by asking in forums specific to the relevant
    implementation, and helpful people will remind your of that.
    It's a misunderstanding of those redirections to conclude that
    c.l.c is not for real world questions.

    However Python is NOT an implementation of C, not even by the loosest
    reasonable interpretation, so why should it be discussed here?.

    The question is about C implementation. Namely, the bible for
    this group, that is C standard requires C implementation to
    produce executables.

    Actually it doesn't. The C standard does require implementations
    to gather translator output into a program image that has the
    information needed to execute the program in its execution
    environment, but the standard doesn't say what that program image
    is. In fact the C standard says specifically that the mechanism
    by which C programs are invoked for use by a data-processing
    system is outside the scope of what the standard specifies.
    There is no reason the execution environment couldn't be some
    sort of interpreted environment, and no reason the invocation
    mechanism couldn't be some sort of interpreter acting on the
    program image.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Heathfield@21:1/5 to geodandw on Tue Mar 4 02:29:44 2025
    XPost: comp.lang.c++, comp.lang.python

    On 03/03/2025 23:51, geodandw wrote:
    On 3/3/25 14:15, Richard Heathfield wrote:
    On 03/03/2025 18:33, geodandw wrote:
    On 3/3/25 12:19, Richard Heathfield wrote:
    On 03/03/2025 16:24, geodandw wrote:

    <snip>

    Why is this group so intolerant?

    Why are you so intolerant of other people's wish to keep this
    group topical?


    A. Because

    [...reason...]

    Clearly you have no objection to intolerance as long as it's
    you doing it.

    Disliking intolerance is not intolerance.

    What you are failing to tolerate is the wish to have a topical
    group, and intolerance is exactly the right word for your failure
    to respect the longstanding topicality requirements of this group.

    If you had earned the right to your intolerance on the matter by
    establishing over many years a longstanding track record of
    helping people with good natured and topical C advice, maybe I'd
    be prepared to regard your opinion with more respect, but I find
    it hard to respect someone who has so little sense of the history
    and experience of this group.

    --
    Richard Heathfield
    Email: rjh at cpax dot org dot uk
    "Usenet is a strange place" - dmr 29 July 1999
    Sig line 4 vacant - apply within

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to The Doctor on Tue Mar 4 05:46:52 2025
    On Sun, 2 Mar 2025 14:35:08 -0000 (UTC), The Doctor wrote:

    How do I compensate for

    ld: error: relocation R_X86_64_32 cannot be used against symbol '_PyRuntime'; recompile with -fPIC
    defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
    referenced by thread_pthread.h:138 (Python/thread_pthread.h:138)
    thread.o:(PyThread_init_thread) in archive /usr/local/lib/libpython3.13.a

    [etc]

    So, at a wild guess, it looks like the symbol “_PyRuntime” is defined
    in one module (pylifecycle.o) which is compiled non-PIC, and is being referenced in another module (thread.o) which was compiled as PIC. Or
    maybe it’s the other way round.

    How you managed to end up with inconsistent flags for different parts
    of your build, I don’t know. But that’s what needs to be fixed.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Brown@21:1/5 to geodandw on Tue Mar 4 09:12:38 2025
    XPost: comp.lang.c++, comp.lang.python

    On 03/03/2025 19:33, geodandw wrote:
    On 3/3/25 12:19, Richard Heathfield wrote:
    On 03/03/2025 16:24, geodandw wrote:
    On 3/3/25 10:22, James Kuyper wrote:

      That sounds like a C issue to me.

    If it were a C problem, then the C source code that produced the
    problem
    should have been shown. It's hard to debug code that you can't see.
    Why is this group so intolerant?

    Why are you so intolerant of other people's wish to keep this group
    topical?


    A. Because the problem is apparently using the right options on the
    compiler, which seems like a C question to me.

    I don't know what your experience with C is - if you have posted
    anything in c.l.c. that indicates that, it must have been too long ago
    for me to remember. But a number of people with decades long experience
    of not only working with C, but helping people in c.l.c. with their C
    problems, have made it clear that this is /not/ a C question. They also
    did their best to help the OP - giving what help they could despite this
    being the wrong place and the question being off-topic, and they did
    their best to redirect the OP to places where he might get more useful help.

    B.Because some people in this group are arrogant. rude, and
    insulting..If the shoe fits, wear it.

    Originally, people /politely/ pointed out that the post was off-topic,
    and the OP was unlikely to get good help here. Indeed, I don't think
    anyone has been other than polite to the OP.

    But there have been two people in this thread who have perhaps been
    rude, arrogant and insulting - insisting that /they/ know better than
    the regulars about what is topical and not topical for the group. Those posters have not in any way been helpful, and are just a waste of
    bandwidth for everyone else.

    I don't know what you think you are trying to achieve here. Do you
    think that your complaints will somehow magically make the OP's problem
    about the C programming language, rather than the build process for a particular and specific complex piece of software? Do you think that by posting repeatedly, someone here will suddenly realise they know
    something that could help the OP? Do you think you will change the
    group topicality?

    All you have achieved is annoying some people, and ensuring that the
    thread can't develop topically.

    If you want to understand what is topical or not for this group,
    consider if a question could conceivably by used as an example or an
    exercise in a published book about learning or using the C programming language. Then it is probably on-topic. If you'd only find it in a
    book called "C programming for Windows", or "Systems programming in
    Unix", or "C development with gcc", then it is likely to be too
    specific. The OP's question is far too niche for any kind of book at
    all - he needs to look at build instructions for Python to understand
    what is going on.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Tue Mar 4 08:31:03 2025
    XPost: comp.lang.c++, comp.lang.python

    On Mon, 3 Mar 2025 18:22:52 +0100
    David Brown <[email protected]> wibbled:
    On 03/03/2025 17:56, [email protected] wrote:
    On Mon, 3 Mar 2025 11:39:58 -0500
    James Kuyper <[email protected]> wibbled:
    On 3/3/25 11:24, geodandw wrote:
    On 3/3/25 10:22, James Kuyper wrote:
    On 03/03/2025 08:13, [email protected] wrote:
    ....
    That sounds like a C issue to me.

    If it were a C problem, then the C source code that produced the problem >>>>> should have been shown. It's hard to debug code that you can't see.
    Why is this group so intolerant?

    Because what you call intolerance, we call topicality. When you post a
    message to a group where it is on-topic, the message gets seen and

    Only an arrogant idiot would think that errors on linking object files
    generated by a C compiler are not relevant in a C language group.



    If the problem could be solved by understanding C better, it would be >relevant. But the problem has nothing to do with the C /code/ in
    question, nor the C language. It's a matter of the build process for

    Compilation is a fundamental part of developing in C.

    For the obligatory car metaphor, imagine a group dedicated to learning
    to drive and driving techniques. A post about a particular make of car
    would be off-topic, but perhaps okay on occasion. The OP's post here is >asking for the best way to avoid roadworks on the Bath to Reading road.

    Lousy metaphor. Its more like writing C code is building the car and compilation is starting it up at the end.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Tue Mar 4 08:32:17 2025
    XPost: comp.lang.c++, comp.lang.python

    On Mon, 3 Mar 2025 17:25:27 +0000
    Richard Heathfield <[email protected]> wibbled:
    On 03/03/2025 16:56, [email protected] wrote:
    On Mon, 3 Mar 2025 11:39:58 -0500
    James Kuyper <[email protected]> wibbled:
    On 3/3/25 11:24, geodandw wrote:
    On 3/3/25 10:22, James Kuyper wrote:
    On 03/03/2025 08:13, [email protected] wrote:
    ....
    That sounds like a C issue to me.

    If it were a C problem, then the C source code that produced the problem >>>>> should have been shown. It's hard to debug code that you can't see.
    Why is this group so intolerant?

    Because what you call intolerance, we call topicality. When you post a
    message to a group where it is on-topic, the message gets seen and

    Only an arrogant idiot would think that errors on linking object files
    generated by a C compiler are not relevant in a C language group.

    James Kuyper has been posting here for decades, and has helped

    Oh well, in that case I bow down in front of his magnificence, he must not
    be contradicted!

    many hundreds, or more likely thousands, of C programmers to
    better understand the C language. A genuine language expert, he
    deserves to be treated better than to be called an arrogant
    idiot, especially when the abuser has no discernible track record
    of having ever helped anyone with high quality C advice.

    That may be because "Muttley" doesn't seem even to know what the
    C language /is/.

    Compilation is a fundamental part of the process of programming in C whether you and Kuyper like it or not.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Tue Mar 4 08:33:57 2025
    XPost: comp.lang.c++, comp.lang.python

    On Mon, 3 Mar 2025 18:28:20 +0100
    David Brown <[email protected]> wibbled:
    On 03/03/2025 17:24, geodandw wrote:

    Why is this group so intolerant?

    These groups (comp.lang.c and comp.lang.c++ - it's a long time since I
    looked at comp.lang.python, but I expect things are similar there) are
    very tolerant of most posters, but there are few people who seem to
    delight in annoying people and spreading their own confusion.

    The posts here are mostly trying to give the OP what little help they
    can, and then direct him towards better sources of information - or they
    are trolls by an anonymous coward who regularly changes his nom de
    guerre because he is killfiled by so many people.

    "Troll" here being the snowflake definition of the word - ie "someone I disagree with but am unable to counter his arguments to any great extent"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Heathfield@21:1/5 to [email protected] on Tue Mar 4 08:56:57 2025
    XPost: comp.lang.c++, comp.lang.python

    On 04/03/2025 08:32, [email protected] wrote:
    On Mon, 3 Mar 2025 17:25:27 +0000
    Richard Heathfield <[email protected]> wibbled:
    On 03/03/2025 16:56, [email protected] wrote:
    On Mon, 3 Mar 2025 11:39:58 -0500
    James Kuyper <[email protected]> wibbled:
    On 3/3/25 11:24, geodandw wrote:
    On 3/3/25 10:22, James Kuyper wrote:
    On 03/03/2025 08:13, [email protected] wrote:
    ....
    That sounds like a C issue to me.

    If it were a C problem, then the C source code that produced the problem >>>>>> should have been shown. It's hard to debug code that you can't see. >>>>> Why is this group so intolerant?

    Because what you call intolerance, we call topicality. When you post a >>>> message to a group where it is on-topic, the message gets seen and

    Only an arrogant idiot would think that errors on linking object files
    generated by a C compiler are not relevant in a C language group.

    James Kuyper has been posting here for decades, and has helped

    Oh well, in that case I bow down in front of his magnificence, he must not
    be contradicted!

    James would be the first to say that he should be contradicted
    when he is mistaken.

    Here, he is not mistaken. You are.

    many hundreds, or more likely thousands, of C programmers to
    better understand the C language. A genuine language expert, he
    deserves to be treated better than to be called an arrogant
    idiot, especially when the abuser has no discernible track record
    of having ever helped anyone with high quality C advice.

    That may be because "Muttley" doesn't seem even to know what the
    C language /is/.

    Compilation is a fundamental part of the process of programming in C whether you and Kuyper like it or not.

    Quoth K&R in "The C Programming Language":

    Just how to run this program depends on the system you are using.
    As a specific example, on the UNIX operating system you must
    create the program in a file whose name ends in ".c", such as
    hello.c, then compile it with the command cc hello.c... On other
    systems, the rules will be different; check with a local expert.


    And that's the point. The OP needs a local expert - i.e. someone
    who has specific experience of building Python with the OP's
    specific compiler.

    K&R go on (on p25): "If the source program appears in several
    files, you may have to say more to compile and load it than if it
    all appears in one, but that is an operating system matter, not a
    language attribute."

    --
    Richard Heathfield
    Email: rjh at cpax dot org dot uk
    "Usenet is a strange place" - dmr 29 July 1999
    Sig line 4 vacant - apply within

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Tue Mar 4 09:23:24 2025
    XPost: comp.lang.c++, comp.lang.python

    On Tue, 4 Mar 2025 08:56:57 +0000
    Richard Heathfield <[email protected]> wibbled:
    On 04/03/2025 08:32, [email protected] wrote:
    Oh well, in that case I bow down in front of his magnificence, he must not >> be contradicted!

    James would be the first to say that he should be contradicted
    when he is mistaken.

    Here, he is not mistaken. You are.

    No, I'm not, because plenty of compilation issues are caused by code issues.
    Or are you claiming those don't count as part of development?

    Compilation is a fundamental part of the process of programming in C whether >> you and Kuyper like it or not.

    Quoth K&R in "The C Programming Language":

    *yawn*

    Just how to run this program depends on the system you are using.
    As a specific example, on the UNIX operating system you must

    Blah blah.

    K&R would also claim that the function parameter type definitions have to follow the prototype. Luckily that hasn't been the case since 1989.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Loris Bennett@21:1/5 to [email protected] on Tue Mar 4 10:19:19 2025
    XPost: comp.lang.c++

    [email protected] writes:

    On Mon, 3 Mar 2025 18:28:20 +0100
    David Brown <[email protected]> wibbled:
    On 03/03/2025 17:24, geodandw wrote:

    Why is this group so intolerant?

    These groups (comp.lang.c and comp.lang.c++ - it's a long time since I >>looked at comp.lang.python, but I expect things are similar there) are
    very tolerant of most posters, but there are few people who seem to
    delight in annoying people and spreading their own confusion.

    The posts here are mostly trying to give the OP what little help they
    can, and then direct him towards better sources of information - or they >>are trolls by an anonymous coward who regularly changes his nom de
    guerre because he is killfiled by so many people.

    "Troll" here being the snowflake definition of the word - ie "someone I disagree with but am unable to counter his arguments to any great extent"

    The tolerance of people on comp.lang.python is possibly evidenced by the
    fact that no one has yet complained about this meta-discussion on the topicality of linker issues in C-related newsgroups is being crossposted
    to comp.lang.python.

    At the risk of sounding intolerant, I suggest that the discussion not be crossposted comp.lang.python.

    --
    This signature is currently under constuction.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Tue Mar 4 10:03:29 2025
    XPost: comp.lang.c++, comp.lang.python

    On Tue, 4 Mar 2025 09:57:16 +0000
    Richard Heathfield <[email protected]> wibbled:
    On 04/03/2025 09:23, [email protected] wrote:
    because plenty of compilation issues are caused by code issues.

    Undoubtedly true, and equally undoubtedly irrelevant in this
    case. Were it relevant, the OP would by now have shown us the
    problem code.

    So what you're saying is you can't troubleshoot linking problems. Do you
    get someone else to compile your code for you?

    Or are you claiming those don't count as part of development?

    Not at all. Your keyboard's shift key is part of development too,
    but that isn't enough to make it topical in comp.lang.c.

    Oh dear, if stuck go in circles, posted comparisons conveniently ignored.

    K&R would also claim that the function parameter type definitions have to
    follow the prototype. Luckily that hasn't been the case since 1989.

    Is it, then, your claim that K&R are mistaken or outdated and

    Is K&R outdated? Hmm, let me think about that for a nanosecond...

    that compilation no longer depends on the system you are using
    and has now become a language attribute? Can you hear the
    chuckles yet?

    A compiler is a compiler, a linker is a linker. Troubleshooting both is part
    of the development process of any competent C dev. But we know already you don't consider that to be the case because its beyond your abilities.

    If you think you can defend your claim by showing where the
    language standard supports your extraordinarily wobbly position,
    by all means have a crack at it. Show us why you're right.

    Wtf has the language standard got to do with anything? Moving goalposts, much?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Heathfield@21:1/5 to [email protected] on Tue Mar 4 09:57:16 2025
    XPost: comp.lang.c++, comp.lang.python

    On 04/03/2025 09:23, [email protected] wrote:
    On Tue, 4 Mar 2025 08:56:57 +0000
    Richard Heathfield <[email protected]> wibbled:
    On 04/03/2025 08:32, [email protected] wrote:
    Oh well, in that case I bow down in front of his magnificence, he must not >>> be contradicted!

    James would be the first to say that he should be contradicted
    when he is mistaken.

    Here, he is not mistaken. You are.

    No, I'm not,

    Yes, you are.

    because plenty of compilation issues are caused by code issues.

    Undoubtedly true, and equally undoubtedly irrelevant in this
    case. Were it relevant, the OP would by now have shown us the
    problem code.

    Or are you claiming those don't count as part of development?

    Not at all. Your keyboard's shift key is part of development too,
    but that isn't enough to make it topical in comp.lang.c.

    Show us the code.

    Compilation is a fundamental part of the process of programming in C whether
    you and Kuyper like it or not.

    Quoth K&R in "The C Programming Language":

    *yawn*

    Just how to run this program depends on the system you are using.
    As a specific example, on the UNIX operating system you must

    Blah blah.

    K&R would also claim that the function parameter type definitions have to follow the prototype. Luckily that hasn't been the case since 1989.

    Is it, then, your claim that K&R are mistaken or outdated and
    that compilation no longer depends on the system you are using
    and has now become a language attribute? Can you hear the
    chuckles yet?

    If you think you can defend your claim by showing where the
    language standard supports your extraordinarily wobbly position,
    by all means have a crack at it. Show us why you're right.

    --
    Richard Heathfield
    Email: rjh at cpax dot org dot uk
    "Usenet is a strange place" - dmr 29 July 1999
    Sig line 4 vacant - apply within

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Heathfield@21:1/5 to [email protected] on Tue Mar 4 10:25:01 2025
    XPost: comp.lang.c++, comp.lang.python

    On 04/03/2025 10:03, [email protected] wrote:
    On Tue, 4 Mar 2025 09:57:16 +0000
    Richard Heathfield <[email protected]> wibbled:
    On 04/03/2025 09:23, [email protected] wrote:
    because plenty of compilation issues are caused by code issues.

    Undoubtedly true, and equally undoubtedly irrelevant in this
    case. Were it relevant, the OP would by now have shown us the
    problem code.

    So what you're saying is you can't troubleshoot linking problems.

    No, that's not what I'm saying. Do learn to read. What I'm saying
    is that the OP would be better served by posting the problem
    statement in a group more closely related to the actual problem.

    We may, I trust, presume that the Python source he is building is
    production code that has successfully been built before by other
    people? If so, then it's not a language issue, and that is enough
    to put it beyond comp.lang.c's brief.

    Do you
    get someone else to compile your code for you?

    I tell the compiler to do it. Don't you?


    Or are you claiming those don't count as part of development?

    Not at all. Your keyboard's shift key is part of development too,
    but that isn't enough to make it topical in comp.lang.c.

    Oh dear, if stuck go in circles, posted comparisons conveniently ignored.

    Your inability to comprehend analogies does not stop them from
    being valid illustrations of the gaping holes in your "argument"
    (such as it is).


    K&R would also claim that the function parameter type definitions have to >>> follow the prototype. Luckily that hasn't been the case since 1989.

    Is it, then, your claim that K&R are mistaken or outdated and

    Is K&R outdated? Hmm, let me think about that for a nanosecond...

    So it *is* your claim that...

    that compilation no longer depends on the system you are using
    and has now become a language attribute? Can you hear the
    chuckles yet?

    Laughing my socks off. Time to plonk, perhaps?

    Wtf has the language standard got to do with anything?

    Yep; time to plonk.

    Bye-bye.

    --
    Richard Heathfield
    Email: rjh at cpax dot org dot uk
    "Usenet is a strange place" - dmr 29 July 1999
    Sig line 4 vacant - apply within

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Heathfield@21:1/5 to David Brown on Tue Mar 4 11:33:22 2025
    XPost: comp.lang.c++, comp.lang.python

    On 04/03/2025 08:12, David Brown wrote:

    <snip>

    Originally, people /politely/ pointed out that the post was
    off-topic, and the OP was unlikely to get good help here.
    Indeed, I don't think anyone has been other than polite to the OP.

    But there have been two people in this thread who have perhaps
    been rude, arrogant and insulting - insisting that /they/ know
    better than the regulars about what is topical and not topical
    for the group.  Those posters have not in any way been helpful,

    What did you expect from them? A demonstration of competence?

    --
    Richard Heathfield
    Email: rjh at cpax dot org dot uk
    "Usenet is a strange place" - dmr 29 July 1999
    Sig line 4 vacant - apply within

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Tue Mar 4 12:00:22 2025
    XPost: comp.lang.c++, comp.lang.python

    On Tue, 4 Mar 2025 11:33:22 +0000
    Richard Heathfield <[email protected]> wibbled:
    On 04/03/2025 08:12, David Brown wrote:

    <snip>

    Originally, people /politely/ pointed out that the post was
    off-topic, and the OP was unlikely to get good help here.
    Indeed, I don't think anyone has been other than polite to the OP.

    But there have been two people in this thread who have perhaps
    been rude, arrogant and insulting - insisting that /they/ know
    better than the regulars about what is topical and not topical
    for the group.  Those posters have not in any way been helpful,

    What did you expect from them? A demonstration of competence?

    Ah, the arrogance just keeps on giving. Define "regulars". I tend to lurk
    on a lot of groups and occasionally post and I've been a "regular" on usenet as a whole since 1992 so I'm pretty used to self important types like you and Brown.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to Laughing at your own on Tue Mar 4 11:19:35 2025
    XPost: comp.lang.c++, comp.lang.python

    On Tue, 4 Mar 2025 10:25:01 +0000
    Richard Heathfield <[email protected]> wibbled:
    On 04/03/2025 10:03, [email protected] wrote:
    On Tue, 4 Mar 2025 09:57:16 +0000
    Richard Heathfield <[email protected]> wibbled:
    On 04/03/2025 09:23, [email protected] wrote:
    because plenty of compilation issues are caused by code issues.

    Undoubtedly true, and equally undoubtedly irrelevant in this
    case. Were it relevant, the OP would by now have shown us the
    problem code.

    So what you're saying is you can't troubleshoot linking problems.

    No, that's not what I'm saying. Do learn to read. What I'm saying

    Sounds like it to me.

    is that the OP would be better served by posting the problem
    statement in a group more closely related to the actual problem.

    Well do feel free to suggest which group might be appropriate for C compilation issues.

    We may, I trust, presume that the Python source he is building is
    production code that has successfully been built before by other
    people? If so, then it's not a language issue, and that is enough
    to put it beyond comp.lang.c's brief.

    There's zero logical connection there. People experience similar issues all
    the time with C, should they all be denied help?

    get someone else to compile your code for you?

    I tell the compiler to do it. Don't you?

    You sure you don't get someone else to run the compiler for you?

    Oh dear, if stuck go in circles, posted comparisons conveniently ignored.

    Your inability to comprehend analogies does not stop them from
    being valid illustrations of the gaping holes in your "argument"
    (such as it is).

    Translation: I have no counter argument worth a damn.

    As expected.

    Is K&R outdated? Hmm, let me think about that for a nanosecond...

    So it *is* your claim that...

    Their language spec is certainly outdated. You think its current?

    that compilation no longer depends on the system you are using
    and has now become a language attribute? Can you hear the
    chuckles yet?

    Laughing my socks off. Time to plonk, perhaps?

    Laughing at your own replies now? Well at least we can agree they are laughable.

    Wtf has the language standard got to do with anything?

    Yep; time to plonk.

    Oh dear, really can't argue your way out of a wet paper bag can you so
    resort to the standard issue lost the argument last resort of drop-the-mic.

    Bye-bye.

    Good riddance.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to [email protected] on Tue Mar 4 12:27:17 2025
    On 04/03/2025 11:19, [email protected] wrote:
    On Tue, 4 Mar 2025 10:25:01 +0000
    Richard Heathfield <[email protected]> wibbled:
    On 04/03/2025 10:03, [email protected] wrote:
    On Tue, 4 Mar 2025 09:57:16 +0000
    Richard Heathfield <[email protected]> wibbled:
    On 04/03/2025 09:23, [email protected] wrote:
    because plenty of compilation issues are caused by code issues.

    Undoubtedly true, and equally undoubtedly irrelevant in this
    case. Were it relevant, the OP would by now have shown us the
    problem code.

    So what you're saying is you can't troubleshoot linking problems.

    No, that's not what I'm saying. Do learn to read. What I'm saying

    Sounds like it to me.

    is that the OP would be better served by posting the problem
    statement in a group more closely related to the actual problem.

    Well do feel free to suggest which group might be appropriate for C compilation
    issues.

    It wasn't a C compilation issue. That is, not a syntax error, not a type
    error, and no violation of the language rules.

    I've also pointed out several times (but have been conveniently ignored)
    that the same error could be invoked with other languages too.


    We may, I trust, presume that the Python source he is building is
    production code that has successfully been built before by other
    people? If so, then it's not a language issue, and that is enough
    to put it beyond comp.lang.c's brief.

    There's zero logical connection there. People experience similar issues all the time with C, should they all be denied help?

    I don't know of any specialist forums. I've suggested others with a
    broader remit and greater footfall where they might have more chance.

    I'm sure someone will have mentioned google, where you search for the
    error message, since somebody must have encountered it before.

    But this particular forum is mostly a bunch of old-timers kicking around
    the same subjects, and at length. The favourite ones are to do with the
    C standards minutiae.

    Another favourite is telling people things are off-topic. (But when it
    suits them, there are long sub-threads which are wildly off-topic, not
    even to do with computers, but which are deemed to be entertaining. I
    guess linker errors are just not interesting enough!)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael S@21:1/5 to David Brown on Tue Mar 4 15:31:01 2025
    XPost: comp.lang.c++, comp.lang.python

    On Tue, 4 Mar 2025 09:12:38 +0100
    David Brown <[email protected]> wrote:


    Originally, people /politely/ pointed out that the post was
    off-topic, and the OP was unlikely to get good help here. Indeed, I
    don't think anyone has been other than polite to the OP.

    But there have been two people in this thread who have perhaps been
    rude, arrogant and insulting - insisting that /they/ know better than
    the regulars about what is topical and not topical for the group.
    Those posters have not in any way been helpful, and are just a waste
    of bandwidth for everyone else.


    OP did to himself by cross-posting to comp.lang.c++.
    comp.lang.c++ group has some good virtues, but civilized tone of
    discussions is not among them.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Tue Mar 4 13:15:26 2025
    On Tue, 4 Mar 2025 12:27:17 +0000
    bart <[email protected]> wibbled:
    On 04/03/2025 11:19, [email protected] wrote:
    Well do feel free to suggest which group might be appropriate for C >compilation
    issues.

    It wasn't a C compilation issue. That is, not a syntax error, not a type >error, and no violation of the language rules.

    Linking is part of the compilation process.

    I've also pointed out several times (but have been conveniently ignored)
    that the same error could be invoked with other languages too.

    The source was in C and the errors were relating to linking C functions.

    Another favourite is telling people things are off-topic. (But when it
    suits them, there are long sub-threads which are wildly off-topic, not
    even to do with computers, but which are deemed to be entertaining. I
    guess linker errors are just not interesting enough!)

    Or some people just like throwing their weight around because its "their" group.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to [email protected] on Tue Mar 4 17:28:04 2025
    XPost: comp.lang.c++, comp.lang.python

    On 2025-03-04, [email protected] <[email protected]> wrote:
    Compilation is a fundamental part of developing in C.

    Someone trying to build a open source package like Python isn't
    ipso facto confirmed to be "developing in C".

    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @[email protected]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to Loris Bennett on Tue Mar 4 18:06:09 2025
    XPost: comp.lang.c++, comp.lang.python

    On 2025-03-04, Loris Bennett <[email protected]> wrote:
    At the risk of sounding intolerant, I suggest that the discussion not be crossposted comp.lang.python.

    You did not do it in the best way. The way this suggestion is performed
    is like this, using a built-in Usenet mechanism:

    1. Keep the Newsgroups: line as-is.
    1. a) Unless it contains a ridiculous number of newsgroups,
    in which case consider killfiling the thread rather
    than adding to it, or else trim out obviously
    ridiculous newsgroup choices to get it down to three or four.
    2. Add a header called "Followup-To:" to your posting which lists
    the newsgroups where you would like replies to article to be
    directed.
    3. Mention in the article of the body that you're doing this,
    for example:

    "I think this discussion doesn't belong in comp.lang.python, so
    I'm setting Followup-To accordingly to omit that group."

    Followup-To is exactly that: a suggestion. Users agents can (and do)
    prompt the user whether they want to honor Followup-To or ignore it.

    Followup-To is much better than just removing newsgroups from the
    Newsgroups line, because doing so fragments the thread without warning.

    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @[email protected]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to [email protected] on Tue Mar 4 17:42:27 2025
    XPost: comp.lang.c++, comp.lang.python

    On 2025-03-04, [email protected] <[email protected]> wrote:
    On Tue, 4 Mar 2025 09:57:16 +0000
    Richard Heathfield <[email protected]> wibbled:
    On 04/03/2025 09:23, [email protected] wrote:
    because plenty of compilation issues are caused by code issues.

    Undoubtedly true, and equally undoubtedly irrelevant in this
    case. Were it relevant, the OP would by now have shown us the
    problem code.

    So what you're saying is you can't troubleshoot linking problems. Do you
    get someone else to compile your code for you?

    Python is not "your code" for any value of "your" referring to any
    regular here in comp.lang.c.

    A compiler is a compiler, a linker is a linker. Troubleshooting both is part of the development process of any competent C dev. But we know already you don't consider that to be the case because its beyond your abilities.

    Troubleshooting an open source package build problem is often a complex
    problem that in most cases requires direct access to the environment
    where the problem is happening.

    It's actually a case of porting. When Python does not build in some OS
    distro with certain compilers, that's a kind of porting challenge.

    The program in question almost certainly doesn't have a C language
    problem. It has a build system portability problem. Even though
    some build system portability problems intersect with C topics, This
    isn't a build system portability problem newsgroup.

    "Port this big package for me to my environment because I don't know
    what I'm doing" is not a suitable discussion topic here for reasons like
    people not having that exact environment ot be able to reproduce the
    problem, and people not coming here to discuss that sort of thing.

    It's a lot better to take it to either a mailing list for the platform
    where you are trying to port the program, or else the mailing list for
    that program.

    The build issue could be something that recurs for other programs
    being ported to the same environment.

    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @[email protected]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to [email protected] on Tue Mar 4 17:56:23 2025
    On 2025-03-04, [email protected] <[email protected]> wrote:
    On Tue, 4 Mar 2025 12:27:17 +0000
    bart <[email protected]> wibbled:
    On 04/03/2025 11:19, [email protected] wrote:
    Well do feel free to suggest which group might be appropriate for C >>compilation
    issues.

    It wasn't a C compilation issue. That is, not a syntax error, not a type >>error, and no violation of the language rules.

    Linking is part of the compilation process.

    If linking doesn't work, how that can be a C problem is that the code
    has external references to symbols which are not defined.

    Why some symbols are not defined when you you're building someone's
    program with with a certain toolchain on a certain target environment is completely off topic here.

    Linking problems not related to ref/def are also off topic; they have to
    do with some limitations of the target environment, or some other
    problem like a mismatch between object file formats or other issue.

    Someone who knows how to fix that sort of thing is likely going to need
    to set up an identical environment and reproduce the issue.

    Otherwise it will involve an large number of rounds of "try this command
    and report the full output", and "show me the contents of this file",
    leading to a long thread full of artifacts from an extended remote debug session that isn't a legitimate newsgroup discussion topic.

    It should be conducted over e-mail.

    How about:

    "I'm looking to debug a Python package build problem in my environment
    with the help of someone willing to exchange numerous e-mails comprising
    a remote debug session, or possibly with remote access to my system.."

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Kaz Kylheku on Tue Mar 4 18:16:25 2025
    XPost: comp.lang.python

    On 04/03/2025 17:42, Kaz Kylheku wrote:
    On 2025-03-04, [email protected] <[email protected]> wrote:
    On Tue, 4 Mar 2025 09:57:16 +0000
    Richard Heathfield <[email protected]> wibbled:
    On 04/03/2025 09:23, [email protected] wrote:
    because plenty of compilation issues are caused by code issues.

    Undoubtedly true, and equally undoubtedly irrelevant in this
    case. Were it relevant, the OP would by now have shown us the
    problem code.

    So what you're saying is you can't troubleshoot linking problems. Do you
    get someone else to compile your code for you?

    Python is not "your code" for any value of "your" referring to any
    regular here in comp.lang.c.

    A compiler is a compiler, a linker is a linker. Troubleshooting both is part >> of the development process of any competent C dev. But we know already you >> don't consider that to be the case because its beyond your abilities.

    Troubleshooting an open source package build problem is often a complex problem that in most cases requires direct access to the environment
    where the problem is happening.


    The CPython source bundle doesn't come with any makefiles. The first
    step appears to be to run a 35,000-line 'configure' script. Part of its
    job appears to be generate the necessary makefiles. I see options like
    "-fPIC" inside it set according to platform type and other settings.


    Maybe the OP was trying to build it independently. I tried it once on
    Windows; I was told by the people at comp.lang.python that it was a
    piece of cake; it wasn't. (I notice this is cross-posted there; I will
    keep that in.)

    On Windows, CPython must be built via MSVC, not gcc.

    That involving installing VS20xx, a 6GB download, which itself first
    needed a 4GB .NET update. Then I needed GIT. Then SVN. Then MSBUILD
    tools. Then something else...

    Whatever I fixed, it always found something else to fail on. After
    several hours and a lot of downloads, I gave up.


    It's actually a case of porting. When Python does not build in some OS
    distro with certain compilers, that's a kind of porting challenge.

    Yet CPython exists on Windows; it must work for somebody!

    I'd been interested in fiddling with the source to make it faster, but
    the first thing I discovered was that on Linux, CPython makes use of
    gcc's extensions to use computed-gotos for its dispatch loop.

    MSVC doesn't have that feature, so on Windows, CPython is a little bit
    slower than on Linux as it has to use a regular 'switch', because the developers couldn't manage to build it with gcc on Windows.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James Kuyper@21:1/5 to Richard Heathfield on Tue Mar 4 19:12:38 2025
    XPost: comp.lang.c++, comp.lang.python

    On 3/4/25 03:56, Richard Heathfield wrote:
    On 04/03/2025 08:32, [email protected] wrote:
    On Mon, 3 Mar 2025 17:25:27 +0000
    Richard Heathfield <[email protected]> wibbled:
    ...
    James Kuyper has been posting here for decades, and has helped

    Oh well, in that case I bow down in front of his magnificence, he must not >> be contradicted!

    James would be the first to say that he should be contradicted
    when he is mistaken.

    I would have been, but I don't see Muttley's messages except when
    someone responds to them.

    ...
    And that's the point. The OP needs a local expert - i.e. someone
    who has specific experience of building Python with the OP's
    specific compiler.

    K&R go on (on p25): "If the source program appears in several
    files, you may have to say more to compile and load it than if it
    all appears in one, but that is an operating system matter, not a
    language attribute."

    Agreed - that's precisely the point.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to bart on Wed Mar 5 00:16:05 2025
    On Tue, 4 Mar 2025 18:16:25 +0000, bart wrote:

    The CPython source bundle doesn't come with any makefiles. The first
    step appears to be to run a 35,000-line 'configure' script. Part of its
    job appears to be generate the necessary makefiles.

    This is the usual GNU Autotools thing. The source from which the configure script is generated is configure.ac; you will see it makes heavy use of m4 macros.

    On Windows, CPython must be built via MSVC, not gcc.

    That involving installing VS20xx, a 6GB download, which itself first
    needed a 4GB .NET update. Then I needed GIT. Then SVN. Then MSBUILD
    tools. Then something else...

    Whatever I fixed, it always found something else to fail on. After
    several hours and a lot of downloads, I gave up.

    If only there were a Windows equivalent to “apt-get build-dep” ...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Lawrence D'Oliveiro on Wed Mar 5 01:20:07 2025
    On 05/03/2025 00:16, Lawrence D'Oliveiro wrote:
    On Tue, 4 Mar 2025 18:16:25 +0000, bart wrote:

    The CPython source bundle doesn't come with any makefiles. The first
    step appears to be to run a 35,000-line 'configure' script. Part of its
    job appears to be generate the necessary makefiles.

    This is the usual GNU Autotools thing. The source from which the configure script is generated is configure.ac; you will see it makes heavy use of m4 macros.

    On Windows, CPython must be built via MSVC, not gcc.

    That involving installing VS20xx, a 6GB download, which itself first
    needed a 4GB .NET update. Then I needed GIT. Then SVN. Then MSBUILD
    tools. Then something else...

    Whatever I fixed, it always found something else to fail on. After
    several hours and a lot of downloads, I gave up.

    If only there were a Windows equivalent to “apt-get build-dep” ...

    What does that do, just automatic all that crap that shouldn't be
    necessary in the first place? Including spending several minutes running through that configure script.

    I maintain my own scripting language. Building it from source - on
    Windows - takes 70ms:

    c:\qx>tim mm qq
    Compiling qq.m to qq.exe
    Time: 0.069

    The only tool needed is mm.exe: a 0.4MB compiler.

    (TBF, my attempt to build CPython was on a much older, slower machine.
    On that one, my product took nearer 0.2 seconds to build from scratch.)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to bart on Wed Mar 5 02:20:43 2025
  • From Lawrence D'Oliveiro@21:1/5 to Loris Bennett on Wed Mar 5 02:22:25 2025
    On Tue, 04 Mar 2025 10:19:19 +0100, Loris Bennett wrote:

    The tolerance of people on comp.lang.python ...

    I wouldn’t be so sure of that. They were copying messages from that group into their own mailing list, and then getting upset when some of those
    messages didn’t conform to their “code of conduct” on that list. And then trying to scold and punish people who never wanted to be on that list in
    the first place.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Loris Bennett@21:1/5 to Kaz Kylheku on Wed Mar 5 07:58:15 2025
    XPost: comp.lang.c++

    Kaz Kylheku <[email protected]> writes:

    On 2025-03-04, Loris Bennett <[email protected]> wrote:
    At the risk of sounding intolerant, I suggest that the discussion not be
    crossposted comp.lang.python.

    You did not do it in the best way. The way this suggestion is performed
    is like this, using a built-in Usenet mechanism:

    1. Keep the Newsgroups: line as-is.
    1. a) Unless it contains a ridiculous number of newsgroups,
    in which case consider killfiling the thread rather
    than adding to it, or else trim out obviously
    ridiculous newsgroup choices to get it down to three or four.
    2. Add a header called "Followup-To:" to your posting which lists
    the newsgroups where you would like replies to article to be
    directed.
    3. Mention in the article of the body that you're doing this,
    for example:

    "I think this discussion doesn't belong in comp.lang.python, so
    I'm setting Followup-To accordingly to omit that group."

    Thank you for the information - I had not been aware of this possibility.

    Followup-To is exactly that: a suggestion. Users agents can (and do)
    prompt the user whether they want to honor Followup-To or ignore it.

    Yes, my UA, Gnus, did indeed prompt me.

    Followup-To is much better than just removing newsgroups from the
    Newsgroups line, because doing so fragments the thread without
    warning.

    But will there be any difference for the newsgroup which has been
    removed? If the follow-up suggestion is adhered to, the thread will
    just end in the same way it would if the group had been removed from the
    list of newsgroups, won't it?

    --
    This signature is currently under constuction.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Heathfield@21:1/5 to Loris Bennett on Wed Mar 5 07:09:32 2025
    XPost: comp.lang.c++

    On 05/03/2025 06:58, Loris Bennett wrote:
    Kaz Kylheku <[email protected]> writes:

    On 2025-03-04, Loris Bennett <[email protected]> wrote:
    At the risk of sounding intolerant, I suggest that the discussion not be >>> crossposted comp.lang.python.

    You did not do it in the best way. The way this suggestion is performed
    is like this, using a built-in Usenet mechanism:

    1. Keep the Newsgroups: line as-is.
    1. a) Unless it contains a ridiculous number of newsgroups,
    in which case consider killfiling the thread rather
    than adding to it, or else trim out obviously
    ridiculous newsgroup choices to get it down to three or four.
    2. Add a header called "Followup-To:" to your posting which lists
    the newsgroups where you would like replies to article to be
    directed.
    3. Mention in the article of the body that you're doing this,
    for example:

    "I think this discussion doesn't belong in comp.lang.python, so
    I'm setting Followup-To accordingly to omit that group."

    Thank you for the information - I had not been aware of this possibility.

    Followup-To is exactly that: a suggestion. Users agents can (and do)
    prompt the user whether they want to honor Followup-To or ignore it.

    Yes, my UA, Gnus, did indeed prompt me.

    Followup-To is much better than just removing newsgroups from the
    Newsgroups line, because doing so fragments the thread without
    warning.

    But will there be any difference for the newsgroup which has been
    removed? If the follow-up suggestion is adhered to, the thread will
    just end in the same way it would if the group had been removed from the
    list of newsgroups, won't it?

    Not quite. The difference is that your "Followup-To" is posted in
    all the original groups, so people know (you remembered to say
    "F'ups set to comp.whatever.thingy" somewhere in your article,
    yes?) that if they want to read replies to your reply they can
    find them in the F'up-To group you specified.

    Without the F'up-to, your branch of the thread just... stops,
    without explanation.

    ==================================================
    ======> Follow-ups set to comp.programming <====== ==================================================
    by way of an example.

    If someone would kindly reply to me to complete the example, you
    will find that reply in comp.programming but not here in comp.lang.c.

    --
    Richard Heathfield
    Email: rjh at cpax dot org dot uk
    "Usenet is a strange place" - dmr 29 July 1999
    Sig line 4 vacant - apply within

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Wed Mar 5 09:10:21 2025
    XPost: comp.lang.python

    On Tue, 4 Mar 2025 18:16:25 +0000
    bart <[email protected]> wibbled:
    The CPython source bundle doesn't come with any makefiles. The first
    step appears to be to run a 35,000-line 'configure' script. Part of its

    Frankly any build system that has a 35K configure file needs revisiting.
    No package is so complex as to require that much setup. OS specific code
    should be dealt with some appropriate ifdefs in the source and libraries
    and linking should be a few 10s of lines.

    Back in the day packages used to hve different preprepared Makefiles for
    each system they could build on and IME that tended to work a lot better
    than configure scripts that tried to figure things out on the fly.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Lawrence D'Oliveiro on Wed Mar 5 11:46:08 2025
    On 05/03/2025 02:20, Lawrence D'Oliveiro wrote:
    On Wed, 5 Mar 2025 01:20:07 +0000, bart wrote:

    I maintain my own scripting language. Building it from source - on
    Windows - takes 70ms:

    How wonderful. Does it offer Python-style features?



    No, it offers my-style features, that is, things I find useful:

    * Named constants (known at compile-time so exprs with them can be reduced)
    * Compile-time enumerations, and parallel tables of enums and data
    * Jump-table-based 'switch' (this requires those named consts or enums)
    * Built-in Support for C-style data types, including C-style structs and homogeneous array types
    * Built-in FFI for C-style APIs
    * Character constants: 'A' and 'ABCDEFGH' (Python needs 'ord("A")')
    * Built-in record types with named, mutable members
    * Pascal-style bit-sets: ['A'..'Z', '0'..'9']
    * Bit (u1/u2/u4) arrays
    * 'goto'
    * Static local variables within functions
    * References and pointers
    * Pass-by-reference
    * ++ and -- (in Python, ++A is valid but it means +(+A))
    * Expression-based syntax (exprs/stmts are interchangeable)
    * Well-behaved function default parameters (Python's are iffy)
    * main() functions; if one exists, it is called automatically for top
    level module
    * Multi-level loop redo, continue and break
    * Dedicated endless loops and repeat-N-times loops
    * Built-in Print and Read /statements/
    * 'Swap' operator
    * Built-in maths functions and constants like 'pi'
    * Allows any text/binary file to be embedded as a string
    * Scope control allows selectively exported entities from a module
    * Expression-based macros
    * Fast 1.5Mlps bytecode compiler with a built-in feature to create
    single source file amalgamations of projects
    * Compact single-file implementation. (This means distributing an app
    involves two files: the interpreter, and the amalgamated source, and
    those could be combined. There is also zero start-up delay, compared to
    find in bundled Python apps)
    * Fast, brisk contributor that is generally faster than CPython
    * Shares the same syntax as its implementation language

    So lots of features I consider fundamental. Python has lots of advanced features but is lacking in the basics like this:

    print "Enter 2 values: "
    readln a, b
    fprintln "# + # is #", a, b, a+b

    Meanwhile, in Python you can create a class with x, y members, but you
    can do this:

    p.x = 100
    p.z = 200

    You've inadvertently created a new member 'z' (it will be an attribute) on-the-fly. Or this:

    math.pi = "pie"

    Or this:

    def F():
    ....
    F = 42

    It is ridiculously and dangerously dynamic.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Wed Mar 5 14:12:41 2025
    On Wed, 5 Mar 2025 11:46:08 +0000
    bart <[email protected]> wibbled:
    No, it offers my-style features, that is, things I find useful:

    Looks pretty good, but unfortunately the languages that become popular are rarely the best , they just happened to be around at the right time and got enough critical mass to take off. My personal opinion about Python becoming popular is it was a pushback against the utter mess that Perl had become and was fairly simple to pick up.

    p.x = 100
    p.z = 200

    You've inadvertently created a new member 'z' (it will be an attribute) >on-the-fly. Or this:

    Pythons compositional object paradigm alongside the class based OO. You can do it to a class or an individual object. Its a hacky mess.

    def F():
    ....
    F = 42

    It is ridiculously and dangerously dynamic.

    Python people would say thats a feature, not a bug.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to Loris Bennett on Wed Mar 5 18:54:16 2025
    XPost: comp.lang.c++

    On 2025-03-05, Loris Bennett <[email protected]> wrote:
    But will there be any difference for the newsgroup which has been
    removed? If the follow-up suggestion is adhered to, the thread will
    just end in the same way it would if the group had been removed from the
    list of newsgroups, won't it?

    Yes. The end result for the adhering follow-up is the same.

    It's just that it has a parent article warning that the newsgroup
    might be removed in follow-ups to that article.

    People reading that removed newsgroup are alerted by that parent
    article to the likelihood that it has followups which they do not see.

    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @[email protected]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Muttley on Wed Mar 5 22:08:35 2025
    On Wed, 5 Mar 2025 09:10:21 -0000 (UTC), Muttley wrote:

    Frankly any build system that has a 35K configure file needs revisiting.
    No package is so complex as to require that much setup.

    Feel free to “revisit” it, and let us know what can be dropped.

    The code doesn’t write itself, you know.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tim Rentsch@21:1/5 to bart on Wed Mar 5 15:36:37 2025
    bart <[email protected]> writes:

    On 05/03/2025 02:20, Lawrence D'Oliveiro wrote:

    On Wed, 5 Mar 2025 01:20:07 +0000, bart wrote:

    I maintain my own scripting language. Building it from source - on
    Windows - takes 70ms:

    How wonderful. Does it offer Python-style features?

    No, it offers my-style features, that is, things I find useful:

    [long list of features]

    My understanding is that it is missing the two most important
    features of a programming language:

    (1) a user manual that defines and documents the language

    (2) an available implementation so that other people can
    use it to write programs

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Lawrence D'Oliveiro on Thu Mar 6 00:01:45 2025
    On 05/03/2025 22:08, Lawrence D'Oliveiro wrote:
    On Wed, 5 Mar 2025 09:10:21 -0000 (UTC), Muttley wrote:

    Frankly any build system that has a 35K configure file needs revisiting.
    No package is so complex as to require that much setup.

    Feel free to “revisit” it, and let us know what can be dropped.

    Pretty much all of it? Most of it seems to be about determining system characteristics, something you don't need to repeat for every
    application you build on /the same machine/.

    Besides, what is the point of determining whether a C implementation
    supports 'stdio.h' for example? If it's not present, you're pretty much
    ****ed anyway, and you will quickly find that out without needing a
    35,000 line to script to tell you (about 600 pages if printed out).

    In any case, the configure script is not run for every incremental
    build, but there is nothing to stop the C implementation changing or
    being deleted in the meantime.

    It is utterly pointless.

    (I once had an open source project with a similarly large configure
    script. I managed to run it on Linux under VirtualBox; it took 5
    minutes, most of which was running that script.

    It wouldn't run on pure Windows, but I managed to figure out what C
    files were involved, and was able to get those compiled more or less
    with my C compiler.

    Building that program from scratch on Windows took one second, on the
    same machine. No thanks to that stupid script.)


    The code doesn’t write itself, you know.

    The configure file doesn't write the application code. It's designed to
    consume machine resources, plus ensure you can't directly build the app
    on Windows.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Muttley on Thu Mar 6 00:37:35 2025
    On Wed, 5 Mar 2025 14:12:41 -0000 (UTC), Muttley wrote:

    On Wed, 5 Mar 2025 11:46:08 +0000 bart <[email protected]> wibbled:

    def F():
    ....
    F = 42

    It is ridiculously and dangerously dynamic.

    Python people would say thats a feature, not a bug.

    Consider that, in Python, functions and classes are themselves first-class objects. Function and class definitions are not declarations, they are
    special forms of assignment statement; while the function code is
    generated at compile time, the actual creation of function and class
    objects happens at runtime. If the function/class definition is executed multiple times, it creates (and assigns to the function/class name) a new object each time.

    This, together with lexical binding, allows you to define functions which
    are function factories or class factories.

    JavaScript has “const” now, but Python doesn’t; perhaps it should be added?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to bart on Thu Mar 6 00:45:10 2025
    On Thu, 6 Mar 2025 00:01:45 +0000, bart wrote:

    On 05/03/2025 22:08, Lawrence D'Oliveiro wrote:

    On Wed, 5 Mar 2025 09:10:21 -0000 (UTC), Muttley wrote:

    Frankly any build system that has a 35K configure file needs
    revisiting. No package is so complex as to require that much setup.

    Feel free to “revisit” it, and let us know what can be dropped.

    Pretty much all of it? Most of it seems to be about determining system characteristics, something you don't need to repeat for every
    application you build on /the same machine/.

    Where is there a common set of checks for all the dependencies that every open-source app might need? There are thousands of such libraries out
    there, with new ones appearing all the time. Checking for them all would require an even bigger script than what we have now.

    Besides, what is the point of determining whether a C implementation
    supports 'stdio.h' for example?

    That check seems to be specific to the macOS/Darwin kernel. My guess is,
    some diehard Apple fans wanted it. Some braindead Apple setup? I don’t
    know, ask them.

    Actually, no, I think it is something to do with “universal architecture” support on macOS/Darwin. If that is not properly enabled, then the C
    compiler will not find the right header files for the architecture.

    You see now, the kinds of complications open-source software has to cope
    with? You have no idea, with your Windows-only apps being toys by
    comparison.

    In any case, the configure script is not run for every incremental
    build, but there is nothing to stop the C implementation changing or
    being deleted in the meantime.

    This is why we have package managers on Linux, to ensure things stay consistent.

    The code doesn’t write itself, you know.

    The configure file doesn't write the application code.

    It often does, actually.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Tim Rentsch on Thu Mar 6 00:37:17 2025
    On 05/03/2025 23:36, Tim Rentsch wrote:
    bart <[email protected]> writes:

    On 05/03/2025 02:20, Lawrence D'Oliveiro wrote:

    On Wed, 5 Mar 2025 01:20:07 +0000, bart wrote:

    I maintain my own scripting language. Building it from source - on
    Windows - takes 70ms:

    How wonderful. Does it offer Python-style features?

    No, it offers my-style features, that is, things I find useful:

    [long list of features]

    My understanding is that it is missing the two most important
    features of a programming language:

    (1) a user manual that defines and documents the language

    (2) an available implementation so that other people can
    use it to write programs


    The 1990s version, where it supported a substantial application, had a
    350-page manual. That one was used by other people to create add-on
    products.

    But it's now a personal tool and I only have reference material for my
    own use.

    It has been made available from time to time, here it is being made to
    run under Linux, but it starts off on Windows:

    c:\qx>mc -c -linux qc # Transpile to C suitable for Linux
    M6 Compiling qc.m to qc.c

    c:\qx>wsl # Enter Linux and build the C
    root@DESKTOP-11:/mnt/c/qx# gcc qc.c -oqc -lm -ldl -fno-builtin

    root@DESKTOP-11:/mnt/c/qx# cat demo.q # Example posted earlier

    print "Enter 2 values: "
    readln a, b
    fprintln "# + # is #", a, b, a+b

    root@DESKTOP-11:/mnt/c/qx# ./qc -nosys demo # Run it
    Enter 2 values: 340282366920938463463374607431768211456 44
    340282366920938463463374607431768211456 + 44 is 340282366920938463463374607431768211500
    root@DESKTOP-11:/mnt/c/qx#

    (The -nosys is needed since it normally initialises a library that
    partly uses WinAPI calls, that don't exist on Linux.)

    So the product exists, but I choose not to make it available; that would
    be a huge amount of work, and no one is really interested. Modern
    languages are going in a different direction.

    Still, it is quite a substantial language, and it really does build in a
    tiny fraction of a second:

    c:\qx>tim mm qq # bigger version with ASM-accelerator
    Compiling qq.m to qq.exe
    Time: 0.068

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to bart on Thu Mar 6 02:28:29 2025
    On Wed, 5 Mar 2025 11:46:08 +0000, bart wrote:

    * Compile-time enumerations, and parallel tables of enums and data

    Python doesn’t have enumerations as a language primitive; instead, they
    are implemented in a library module, written in pure Python -- it doesn’t
    do anything you can’t do in your own code. But it supports arbitrary attributes attached to enum instances, and subclassing of enums.

    * Jump-table-based 'switch' (this requires those named consts or enums)

    Does it do switched expressions? You can do those in Python.

    * Built-in Support for C-style data types, including C-style structs and homogeneous array types
    * Built-in FFI for C-style APIs

    Python provides this in the standard-library ctypes module. Remarkably
    useful for making a wrapper around a C library to make it look like the
    library was designed for use from Python. I have done a lot of wrappers
    like this.

    * Character constants: 'A' and 'ABCDEFGH' (Python needs 'ord("A")')

    Python also has “\u” and “\U” for Unicode.

    * Static local variables within functions

    Not really necessary, with classes.

    Do you have lexical binding?

    * Built-in maths functions and constants like 'pi'

    Complex arithmetic? <https://docs.python.org/3/library/cmath.html>

    Hyperbolic functions? Gamma/log-gamma? <https://docs.python.org/3/library/math.html>

    There’s a reason why we don’t want to build all these into the core language, since there are so many of them that are needed nowadays.

    * Expression-based macros

    Really only necessary if your language is not dynamic enough.

    I notice no mention of coroutines or iterators. Those are quite useful nowadays.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to bart on Thu Mar 6 03:16:37 2025
    XPost: comp.lang.python

    On Tue, 4 Mar 2025 18:16:25 +0000, bart wrote:

    The first step appears to be to run a 35,000-line 'configure' script.

    Just a further note, if you’re doing your head in trying to read that -- it’s automatically generated with the m4 macro processor from
    configure.ac, which is a much smaller file (less than ¼ the size), and is
    the one maintained by humans.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stuart Redmann@21:1/5 to geodandw on Thu Mar 6 07:35:38 2025
    XPost: comp.lang.c++, comp.lang.python

    geodandw <[email protected]> wrote:
    On 3/3/25 10:22, James Kuyper wrote:
    On 03/03/2025 08:13, [email protected] wrote:
    On Sun, 2 Mar 2025 12:30:53 -0500
    James Kuyper <[email protected]> wibbled:
    On Sun, 02 Mar 2025 16:58:20 +0000, Muttley wrote:

    On Sun, 2 Mar 2025 15:54:19 -0000 (UTC)
    Lew Pitcher <[email protected]> gabbled:
    First off, this isn't really on-topic for comp.lang.c, as it is a question
    regarding a linker, interacting
    with the results of various options given to a specific compiler.

    Is there a comp.lang.c.linker group?

    comp.lang.c is about using the C programming language. Linkers are
    independent of the programming language, and can be used to link

    Without compilers and linkers a C program would just be a load of text.

    Without computers, keyboards and monitors most C programs wouldn't be
    much use, either. That doesn't make a malfunctioning computer monitor a
    C problem. And it doesn't make a linkage problems a C problem either.

    together programs written in many different languages. The subject line >>>> and the text of the error messages indicate that it's a Python program, >>>> so why would a group devoted to C be in any way appropriate?

    If you'd taken 2 seconds to look at it you'd realise the issue was building >>> the Python source code which is written in C.

    The indentations of the first message cross-posted to comp.lang.c and
    comp.lang.c++ suggest that it was the latest in a series of earlier
    messages posted somewhere else (comp.lang.python?). Those earlier
    messages might have contained additional information. If that
    information was relevant, it should have been included when the message
    was first cross-posted to comp.lang.c or comp.lang.c++. You might be
    right about it being "Python source code ... written in C", but nothing
    in the messages that were posted here makes that obvious.

    That sounds like a C issue to me.

    If it were a C problem, then the C source code that produced the problem
    should have been shown. It's hard to debug code that you can't see.
    Why is this group so intolerant?


    Members of this group are quite likely old (only old people remember Usenet
    it seems), maybe even retired. Old people are often a bit set in their way (correcting your grammar all the time, trying to force their political
    views on you, etc. etc.)

    Also, programming tends to attract people that can handle highly formalized thinking, and thus also people who have OCD to a higher or lower degree.
    Think of them as if they were Sheldon. They probably don‘t see that their musings about topicality of your question won’t help you at all, they have simply hijacked your thread to discuss about whether linker problems are topical in this newsgroup (they could have done this in a separate thread).

    I have to admit that this thread turned out to be the most interesting
    since a long time, although not for OP. It’s like the ramblings of an old
    man that you asked about help with your spark plugs and he ends up talking about his experiences during WWII. Don‘t take offense, nod politely, and
    find someone who’s actually going to help you ;-)

    IIRC, there are two different ways of compiling code, position dependent or position independent (PIC). Apparently you cannot mix these two kinds of
    code into a single executable. So if you are using a library that has been compiled with PIC turned on, you’ll have to compile your code the same way. There should be a command line parameter/IDE setting to do so, depending on your toolchain.

    Kind regards
    Stuart

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Heathfield@21:1/5 to Stuart Redmann on Thu Mar 6 07:32:33 2025
    XPost: comp.lang.c++, comp.lang.python

    On 06/03/2025 06:35, Stuart Redmann wrote:
    geodandw <[email protected]> wrote:
    On 3/3/25 10:22, James Kuyper wrote:
    On 03/03/2025 08:13, [email protected] wrote:
    On Sun, 2 Mar 2025 12:30:53 -0500
    James Kuyper <[email protected]> wibbled:
    On Sun, 02 Mar 2025 16:58:20 +0000, Muttley wrote:

    On Sun, 2 Mar 2025 15:54:19 -0000 (UTC)
    Lew Pitcher <[email protected]> gabbled:
    First off, this isn't really on-topic for comp.lang.c, as it is a question
    regarding a linker, interacting
    with the results of various options given to a specific compiler. >>>>>>
    Is there a comp.lang.c.linker group?

    comp.lang.c is about using the C programming language. Linkers are
    independent of the programming language, and can be used to link

    Without compilers and linkers a C program would just be a load of text. >>>
    Without computers, keyboards and monitors most C programs wouldn't be
    much use, either. That doesn't make a malfunctioning computer monitor a
    C problem. And it doesn't make a linkage problems a C problem either.

    together programs written in many different languages. The subject line >>>>> and the text of the error messages indicate that it's a Python program, >>>>> so why would a group devoted to C be in any way appropriate?

    If you'd taken 2 seconds to look at it you'd realise the issue was building
    the Python source code which is written in C.

    The indentations of the first message cross-posted to comp.lang.c and
    comp.lang.c++ suggest that it was the latest in a series of earlier
    messages posted somewhere else (comp.lang.python?). Those earlier
    messages might have contained additional information. If that
    information was relevant, it should have been included when the message
    was first cross-posted to comp.lang.c or comp.lang.c++. You might be
    right about it being "Python source code ... written in C", but nothing
    in the messages that were posted here makes that obvious.

    That sounds like a C issue to me.

    If it were a C problem, then the C source code that produced the problem >>> should have been shown. It's hard to debug code that you can't see.
    Why is this group so intolerant?


    Members of this group are quite likely old (only old people remember Usenet it seems), maybe even retired. Old people are often a bit set in their way (correcting your grammar all the time, trying to force their political
    views on you, etc. etc.)

    Also, programming tends to attract people that can handle highly formalized thinking, and thus also people who have OCD to a higher or lower degree. Think of them as if they were Sheldon. They probably don‘t see that their musings about topicality of your question won’t help you at all, they have simply hijacked your thread to discuss about whether linker problems are topical in this newsgroup (they could have done this in a separate thread).

    I have to admit that this thread turned out to be the most interesting
    since a long time, although not for OP. It’s like the ramblings of an old man that you asked about help with your spark plugs and he ends up talking about his experiences during WWII. Don‘t take offense, nod politely, and find someone who’s actually going to help you ;-)

    Firstly, you're talking to the wrong guy. The OP - the person who
    actually needs the help - is long gone. Muttley is just the
    juvenile delinquent from round the corner who likes to drop
    litter in the old folks' yards.

    But you're right anyway. The OP does indeed need to "find someone
    who’s actually going to help you", which is why he needs to ask
    his question in the kind of group where building Python from
    source is the kind of question that attracts attention from
    experts in that area. So, instead of dead-heading the roses in
    the old folks' gardens, the very best help that Muttley could
    have offered the OP is to direct him to a group that's a better
    fit for the question. Or... hey... if he's so set on turning up
    his noise to annoy everyone *anyway*, why not just use the air
    time to answer the question himself?

    Oh, yeah, we know that one, don't we? He can't, because he
    clearly doesn't know the answer, 'cos what kind of jerk who could
    walk the OP through his problem would have wasted so much time
    pissing in flower-beds instead?

    IIRC, there are two different ways of compiling code, position dependent or position independent (PIC). Apparently you cannot mix these two kinds of
    code into a single executable. So if you are using a library that has been compiled with PIC turned on, you’ll have to compile your code the same way. There should be a command line parameter/IDE setting to do so, depending on your toolchain.

    And IYRI? Presumably in that circumstance you'd hope that a local
    expert would pick up on your error and offer a better steer to
    the OP. Preferably one who knows the ins and outs of the relevant
    toolchain, which is of course independent of the toolchain being
    used (linkers link object code, not source code, so they don't
    give a damn what source language was used).

    So whaddya know? Turns out the old farts were right after all.
    How about that?

    --
    Richard Heathfield
    Email: rjh at cpax dot org dot uk
    "Usenet is a strange place" - dmr 29 July 1999
    Sig line 4 vacant - apply within

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Thu Mar 6 08:42:03 2025
    On Thu, 6 Mar 2025 00:37:35 -0000 (UTC)
    Lawrence D'Oliveiro <[email protected]d> wibbled:
    On Wed, 5 Mar 2025 14:12:41 -0000 (UTC), Muttley wrote:

    On Wed, 5 Mar 2025 11:46:08 +0000 bart <[email protected]> wibbled:

    def F():
    ....
    F = 42

    It is ridiculously and dangerously dynamic.

    Python people would say thats a feature, not a bug.

    Consider that, in Python, functions and classes are themselves first-class >objects. Function and class definitions are not declarations, they are >special forms of assignment statement; while the function code is
    generated at compile time, the actual creation of function and class
    objects happens at runtime. If the function/class definition is executed

    Compilation and runtime are the same thing in Python arn't they? Can you precompile code? I'm not an expert on the language to any extent though I
    can write simple code in it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Thu Mar 6 08:39:56 2025
    XPost: comp.lang.c++, comp.lang.python

    On Thu, 6 Mar 2025 07:32:33 +0000
    Richard Heathfield <[email protected]> wibbled:
    On 06/03/2025 06:35, Stuart Redmann wrote:
    I have to admit that this thread turned out to be the most interesting
    since a long time, although not for OP. It’s like the ramblings of an old >> man that you asked about help with your spark plugs and he ends up talking >> about his experiences during WWII. Don‘t take offense, nod politely, and >> find someone who’s actually going to help you ;-)

    Firstly, you're talking to the wrong guy. The OP - the person who
    actually needs the help - is long gone. Muttley is just the
    juvenile delinquent from round the corner who likes to drop
    litter in the old folks' yards.

    First time I've been called a juvenile delinquent in probably 40 years
    but i'll take it as a complement.

    But congratulations on so nicely proving his point for him.

    Oh, wait, you won't read this because you supposedly killfiled me since like
    a lot of people of your type - if you can't win an argument just ignore the person who defeated you. Now I wonder which one of us has the more juvenile behaviour.

    the old folks' gardens, the very best help that Muttley could
    have offered the OP is to direct him to a group that's a better
    fit for the question. Or... hey... if he's so set on turning up
    his noise to annoy everyone *anyway*, why not just use the air
    time to answer the question himself?

    I didn't respond to the OPs question. Only the idiots like you telling him
    this wasn't a suitable group for it. Do try to keep up with the thread
    grandad.

    Congratulations on so comprehensively proving his point.

    Don't worry, I'll get off your lawn now! LOL :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Lawrence D'Oliveiro on Thu Mar 6 11:15:39 2025
    On 06/03/2025 02:28, Lawrence D'Oliveiro wrote:
    On Wed, 5 Mar 2025 11:46:08 +0000, bart wrote:

    * Compile-time enumerations, and parallel tables of enums and data

    Python doesn’t have enumerations as a language primitive; instead, they
    are implemented in a library module, written in pure Python -- it doesn’t do anything you can’t do in your own code. But it supports arbitrary attributes attached to enum instances, and subclassing of enums.

    * Jump-table-based 'switch' (this requires those named consts or enums)

    Does it do switched expressions? You can do those in Python.

    Do you mean 'match case'? This was recently added after some 30 years.
    But when I tested it, it wasn't significantly faster than an if-elseif
    chain.

    The point of a jump-table-based switch is to do all tests
    simultaneously, rather than sequentially, which is a big advantage for interpreted code.

    And for that to be possible when the switch values are names (such as enumeration codes) requires those values to be known to the bytecode
    compiler. (Switch values that are integer constants only are not practical.)

    In Python they are not known until runtime, but even then, they can
    change and so could be different each time the switch is encountered.

    In Python *every identifier is a variable*, one which can be assigned a
    new value at any time, even if some variable values are immutable. That
    means you can't modify the value that A currently holds, but you can
    replace the whole thing.

    With my language, it is known at compile-time whether any top-level
    identifier is a function, module, type, record, variable, named
    constant, imported function, macro or label.

    If I wanted to do the equivalent of this:

    def F(): return "hi"
    ....
    F = 42

    then I'd have to write it as:

    fun G = "hi"
    F := G
    ....
    F := 42

    Here, F is a variable name; G is a function name.

    * Character constants: 'A' and 'ABCDEFGH' (Python needs 'ord("A")')

    Python also has “\u” and “\U” for Unicode.

    I have this:

    println "\u20AC" # string (shows €)
    println '\u20AC' # integer
    println '\u20AC':"m" # shows € (interpret as multibyte char)

    With \v used for 6-digit hex codes. But the encoding with these is UTF8,
    so this is stored as a 3-byte sequence, or taking up 24 bits of an integer.

    * Built-in maths functions and constants like 'pi'

    Complex arithmetic? <https://docs.python.org/3/library/cmath.html>

    Hyperbolic functions? Gamma/log-gamma? <https://docs.python.org/3/library/math.html>

    There’s a reason why we don’t want to build all these into the core language, since there are so many of them that are needed nowadays.

    Are they? I find I only need the basics! I don't think the 'hyp' button
    on my Casio has ever been pressed (I've only just noticed it).

    Actually, my language started off as a DSL for my 3D graphics apps so it
    had a lot of special purpose types built-in. So if p and q were 3D
    points, m was a transformation matrix, and e/f were edges (lines, arcs, circles) then:

    (p + q)/2 # was the midpoint of pq
    m * p # transformed the point p
    intersect(e, f) # return points of interesections of e and f

    Yes, Python has acquired 1000s of libraries because of the number of
    people who used it or develop stuff for it. It's an industrial scale
    product.

    I'm not competing with that. Mine is a personal tool.

    * Expression-based macros

    Really only necessary if your language is not dynamic enough.

    I notice no mention of coroutines or iterators. Those are quite useful nowadays.

    I've played around with closures, generators and iterators. I decided
    they were too clunky in my implementation and a poor fit for my product
    and style of coding.

    But regarding closures, there is a famous test 'man or boy' which relies heavily on them (https://en.wikipedia.org/wiki/Man_or_boy_test).

    I tested the Python 3 code from Rosetta Code, set up to print the
    results for k=0 to 20 inclusive.

    Python 3.14 took 10 seconds. I emulated what was needed in my language,
    and it took 0.8 seconds. (PyPy crashed at k=16, but the timing up to
    k=15 suggested it was a little faster than CPython.)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Waldek Hebisch@21:1/5 to [email protected] on Thu Mar 6 19:21:45 2025
    XPost: comp.lang.python

    In comp.lang.c [email protected] wrote:
    On Tue, 4 Mar 2025 18:16:25 +0000
    bart <[email protected]> wibbled:
    The CPython source bundle doesn't come with any makefiles. The first
    step appears to be to run a 35,000-line 'configure' script. Part of its

    Frankly any build system that has a 35K configure file needs revisiting.
    No package is so complex as to require that much setup. OS specific code should be dealt with some appropriate ifdefs in the source and libraries
    and linking should be a few 10s of lines.

    Back in the day packages used to hve different preprepared Makefiles for
    each system they could build on and IME that tended to work a lot better
    than configure scripts that tried to figure things out on the fly.

    I remember times when source package came with README file saying
    edit this and that to configure for your system. Typically one
    had to edit Makefile and possibly something like config.h. For
    me it worked quite well. But those times are gone. Most people
    now do not know essential information about system they use, so
    are unable to provide sensible values. And modern programs are
    bigger and more complicated, so such hand editing is too much work
    for rare people capable of doing this.

    Per platform Makefile-s do not scale when one wants to support
    multiple system and multiple configurations (there is exponential
    growth of possible combinations). And even of single configuration
    for supposedly single system like Linux there are troubles.
    In one project there was someting like 20 Makefile.linux_x files
    where x represented one Linux flavour. Yet regularly somebody
    would come and say: "build fails on my Linux x.y.z". If enough
    information was provided new Makefile was added, or possibly
    some similar Makefile was modified to cover more cases.
    Those troubles mostly vanished when project switched to configure
    script. Now there is about 1500 lines of hand written code
    in configure machinery (biggest is 933 lines long configure.ac)
    and 8564 lines long generated configure script. Most build
    troubles is now gone or diagnosed early.

    Writing "diagnosed early" I mean that most user errors are
    detected quite early. For example, a lot of people try to
    compile program without having a C compiler. And when they
    have compiler they fail to install needed libraries (there
    is list which says what is needed but people fail to follow
    instructions).

    It is certainly silly when generated configure file is much
    bigger than actual program code. This happens frequently
    when lazy or brainwashed folks use automake (which apparently
    puts all checks that it knows into generated configure.ac).
    But Python have reasons to check for a lot of things, so
    the size is somewhat reasonable.

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to [email protected] on Thu Mar 6 20:28:41 2025
    On 2025-03-06, [email protected] <[email protected]> wrote:
    Compilation and runtime are the same thing in Python arn't they? Can you precompile code? I'm not an expert on the language to any extent though I
    can write simple code in it.

    Python is ahead-of-time compiled into byte code. Python interpretation
    runs the byte code.

    In some situations, Python compiles .py file into .pyc files
    which are stored in a __pycache__ directory, doing this
    as it executes the files.

    You can force ahead-of-time file compiling "python3 -m compileall yourprogram.py".

    When you have local imports: e.g. you have a foo.py which has
    "import bar", referring to bar.py, and you run "python3 foo.py",
    it will compile the bar inport and cache its byte code in a
    file in __pycache__.

    I suspect that in cases when a .pyc file is not being dropped,
    Python does incremental ahead-of-time compiling, meaning that it reads successive top-level statements of the .py file, compiles them to
    bytecode in memory, and immediately executes them, rather than compiling
    the whole file first. Quite possibly, it might do this even when it
    *is* generating a .pyc file, in those cases when it's doing so
    automatically (the foo and bar scenario described above).

    When imports are being compiled automatically to .pyc files,
    their statements are being executed; like if you have a top-level print('hello'), you will see the hello output, and you will see
    a .pyc file in __pycache__ for that file. Was that hello printed
    after the .pyc file was produced, or during? I suspect during.

    But anyway, Python obviously has compile time separate from run-time.
    Or, should we say, compile times separate from run-times.
    There is a time when source is being compiled to byte code, and
    that is not the same time as when that byte code is executed.

    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @[email protected]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Waldek Hebisch on Thu Mar 6 20:16:27 2025
    On 06/03/2025 19:21, Waldek Hebisch wrote:
    In comp.lang.c [email protected] wrote:
    On Tue, 4 Mar 2025 18:16:25 +0000
    bart <[email protected]> wibbled:
    The CPython source bundle doesn't come with any makefiles. The first
    step appears to be to run a 35,000-line 'configure' script. Part of its

    Frankly any build system that has a 35K configure file needs revisiting.
    No package is so complex as to require that much setup. OS specific code
    should be dealt with some appropriate ifdefs in the source and libraries
    and linking should be a few 10s of lines.

    Back in the day packages used to hve different preprepared Makefiles for
    each system they could build on and IME that tended to work a lot better
    than configure scripts that tried to figure things out on the fly.

    I remember times when source package came with README file saying
    edit this and that to configure for your system. Typically one
    had to edit Makefile and possibly something like config.h. For
    me it worked quite well. But those times are gone. Most people
    now do not know essential information about system they use, so
    are unable to provide sensible values. And modern programs are
    bigger and more complicated, so such hand editing is too much work
    for rare people capable of doing this.

    Per platform Makefile-s do not scale when one wants to support
    multiple system and multiple configurations (there is exponential
    growth of possible combinations). And even of single configuration
    for supposedly single system like Linux there are troubles.
    In one project there was someting like 20 Makefile.linux_x files
    where x represented one Linux flavour. Yet regularly somebody
    would come and say: "build fails on my Linux x.y.z". If enough
    information was provided new Makefile was added, or possibly
    some similar Makefile was modified to cover more cases.
    Those troubles mostly vanished when project switched to configure
    script. Now there is about 1500 lines of hand written code
    in configure machinery (biggest is 933 lines long configure.ac)
    and 8564 lines long generated configure script. Most build
    troubles is now gone or diagnosed early.

    Writing "diagnosed early" I mean that most user errors are
    detected quite early. For example, a lot of people try to
    compile program without having a C compiler. And when they
    have compiler they fail to install needed libraries (there
    is list which says what is needed but people fail to follow
    instructions).

    It is certainly silly when generated configure file is much
    bigger than actual program code. This happens frequently
    when lazy or brainwashed folks use automake (which apparently
    puts all checks that it knows into generated configure.ac).
    But Python have reasons to check for a lot of things, so
    the size is somewhat reasonable.

    So, why doesn't the configuration script itself have a configuration
    script? Will the language used in the script run on EVERY Linux and Unix system?

    If so, why doesn't the same apply to the main language of the
    application? (Why isn't the application written in that language!)

    I've also seen a project where the configuration program was a C file,
    one which didn't need any special options, whose output was used to
    build the main app.

    Again, why can't the main app be made to work like the small one?

    I've played with projects that had nearly 20 different makefiles, none
    of which was right for my own compiler. It is a ridiculous situation.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Muttley on Thu Mar 6 21:22:19 2025
    On Thu, 6 Mar 2025 08:42:03 -0000 (UTC), Muttley wrote:

    Compilation and runtime are the same thing in Python arn't they?

    No, the code is actually compiled to bytecode, like Java and Perl do, and
    UCSD Pascal did before all of them.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to bart on Thu Mar 6 21:30:21 2025
    On Thu, 6 Mar 2025 20:16:27 +0000, bart wrote:

    So, why doesn't the configuration script itself have a configuration
    script? Will the language used in the script run on EVERY Linux and Unix system?

    Yes. It takes a lot of work to ensure that, including avoiding quirks and
    bugs in particular Unix systems’ shell implementations. This is all taken into account in the definition of the m4 macros that are actually used to generate all that shell script.

    POSIX provides the official spec, but that isn’t entirely enough.

    Luckily, the demise of nearly all proprietary Unix systems has simplified
    the picture enormously.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Waldek Hebisch on Thu Mar 6 21:27:00 2025
    On Thu, 6 Mar 2025 19:21:45 -0000 (UTC), Waldek Hebisch wrote:

    I remember times when source package came with README file saying edit
    this and that to configure for your system. Typically one had to edit Makefile and possibly something like config.h. For me it worked quite
    well. But those times are gone. Most people now do not know essential information about system they use, so are unable to provide sensible
    values. And modern programs are bigger and more complicated, so such
    hand editing is too much work for rare people capable of doing this.

    I think GNU Autotools was the first serious attempt to try to address this problem. The “configure” script would perform all kinds of environmental checks to account for common quirks involving Unix include files and known
    bugs in system utilities.

    Things have eased a bit nowadays with the popularity of newer conventions
    like the pkg-config system, where each installed library provides a .pc
    file that can be queried by standard tools to obtain the right compiler
    and linker flags to build something against that library.

    Per platform Makefile-s do not scale when one wants to support multiple system and multiple configurations (there is exponential growth of
    possible combinations).

    That’s why you need a precursor stage, to generate the Makefiles.
    Autotools does this, as does CMake.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Harnden@21:1/5 to Chris M. Thomasson on Thu Mar 6 21:39:09 2025
    On 06/03/2025 20:40, Chris M. Thomasson wrote:

    I am 47, kind of old?


    Ah! That explains the unbounded youthful enthusiasm ;)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tim Rentsch@21:1/5 to bart on Thu Mar 6 13:45:31 2025
    bart <[email protected]> writes:

    On 05/03/2025 23:36, Tim Rentsch wrote:

    bart <[email protected]> writes:

    On 05/03/2025 02:20, Lawrence D'Oliveiro wrote:

    On Wed, 5 Mar 2025 01:20:07 +0000, bart wrote:

    I maintain my own scripting language. Building it from source - on
    Windows - takes 70ms:

    How wonderful. Does it offer Python-style features?

    No, it offers my-style features, that is, things I find useful:

    [long list of features]

    My understanding is that it is missing the two most important
    features of a programming language:

    (1) a user manual that defines and documents the language

    (2) an available implementation so that other people can
    use it to write programs

    The 1990s version, where it supported a substantial application, had a 350-page manual. That one was used by other people to create add-on products.

    But it's now a personal tool and I only have reference material for my
    own use.

    If you post some links where I can download a current user
    manual and a current compiler or interpreter, I will gladly
    withdraw my comment.

    Otherwise, I stand by my comment, and see no reason to
    consider your alleged environment as anything other than
    fiction-ware.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to bart on Thu Mar 6 22:17:20 2025
    On Thu, 6 Mar 2025 11:15:39 +0000, bart wrote:

    On 06/03/2025 02:28, Lawrence D'Oliveiro wrote:

    Does it do switched expressions? You can do those in Python.

    Do you mean 'match case'?

    That’s a generalization of the concept, but it’s a statement, not an expression.

    Python also has “\u” and “\U” for Unicode.

    I have this:

    println "\u20AC" # string (shows €)
    println '\u20AC' # integer println '\u20AC':"m" # shows €
    (interpret as multibyte char)

    With \v used for 6-digit hex codes. But the encoding with these is UTF8,
    so this is stored as a 3-byte sequence, or taking up 24 bits of an
    integer.

    I forgot about \N:

    >>> print("\N{LATIN SMALL LETTER T}\N{LATIN SMALL LETTER E}\N{LATIN SMALL LETTER S}\N{LATIN SMALL LETTER T}")
    test

    Actually, my language started off as a DSL for my 3D graphics apps so it
    had a lot of special purpose types built-in.

    The Python approach is to allow you to define such DSLs using
    libraries. Classes can define custom overloads for language operators
    and subscripting. So you can define your own “vector” and “matrix” types, and write arithmetic expressions with those types, using
    standard operators like “+”, “*” and “@” with type-specific meanings.

    On top of which, I came up with a way to add constructs that look like
    new user-defined operators (i.e. without the need to add extra
    parentheses around their operands).

    So if p and q were 3D points, m was a transformation matrix, and e/f
    were edges (lines, arcs, circles) then:

    (p + q)/2 # was the midpoint of pq
    m * p # transformed the point p
    intersect(e, f) # return points of interesections of e and f

    Yup, I have done the same sort of thing. Python introduced “@” as a
    new operator in 3.5, with the intention that it be used to represent
    dot products. They haven’t done a special one for cross products,
    though.

    Does your system have quaternions?

    I've played around with closures, generators and iterators. I decided
    they were too clunky in my implementation and a poor fit for my product
    and style of coding.

    Iterators/generators are a natural thing to use for database queries,
    for example. Coroutines greatly simplify event-driven programming. In
    my Python code for customers, I have found real-world uses for both.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Tim Rentsch on Thu Mar 6 23:55:06 2025
    On 06/03/2025 21:45, Tim Rentsch wrote:
    bart <[email protected]> writes:

    On 05/03/2025 23:36, Tim Rentsch wrote:

    bart <[email protected]> writes:

    On 05/03/2025 02:20, Lawrence D'Oliveiro wrote:

    On Wed, 5 Mar 2025 01:20:07 +0000, bart wrote:

    I maintain my own scripting language. Building it from source - on >>>>>> Windows - takes 70ms:

    How wonderful. Does it offer Python-style features?

    No, it offers my-style features, that is, things I find useful:

    [long list of features]

    My understanding is that it is missing the two most important
    features of a programming language:

    (1) a user manual that defines and documents the language

    (2) an available implementation so that other people can
    use it to write programs

    The 1990s version, where it supported a substantial application, had a
    350-page manual. That one was used by other people to create add-on
    products.

    But it's now a personal tool and I only have reference material for my
    own use.

    If you post some links where I can download a current user
    manual and a current compiler or interpreter, I will gladly
    withdraw my comment.

    Otherwise, I stand by my comment, and see no reason to
    consider your alleged environment as anything other than
    fiction-ware.

    Well, I don't have a current user manual. That's rather pointless for a
    now personal language.

    I could upload a Windows binary, or that qc.c file, but that would be
    futile. I don't need to prove to myself that my language exists! And I
    don't care if you think I've been programming in imaginary languages
    using imaginary implementations for the last 4 decades.

    Here however is a summary of these fictional tools:

    https://github.com/sal55/langs/blob/master/CompilerSuite.md

    You can see I put some effort into them making look real!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Waldek Hebisch@21:1/5 to bart on Fri Mar 7 01:07:53 2025
    bart <[email protected]> wrote:
    On 06/03/2025 19:21, Waldek Hebisch wrote:
    In comp.lang.c [email protected] wrote:
    On Tue, 4 Mar 2025 18:16:25 +0000
    bart <[email protected]> wibbled:
    The CPython source bundle doesn't come with any makefiles. The first
    step appears to be to run a 35,000-line 'configure' script. Part of its >>>
    Frankly any build system that has a 35K configure file needs revisiting. >>> No package is so complex as to require that much setup. OS specific code >>> should be dealt with some appropriate ifdefs in the source and libraries >>> and linking should be a few 10s of lines.

    Back in the day packages used to hve different preprepared Makefiles for >>> each system they could build on and IME that tended to work a lot better >>> than configure scripts that tried to figure things out on the fly.

    I remember times when source package came with README file saying
    edit this and that to configure for your system. Typically one
    had to edit Makefile and possibly something like config.h. For
    me it worked quite well. But those times are gone. Most people
    now do not know essential information about system they use, so
    are unable to provide sensible values. And modern programs are
    bigger and more complicated, so such hand editing is too much work
    for rare people capable of doing this.

    Per platform Makefile-s do not scale when one wants to support
    multiple system and multiple configurations (there is exponential
    growth of possible combinations). And even of single configuration
    for supposedly single system like Linux there are troubles.
    In one project there was someting like 20 Makefile.linux_x files
    where x represented one Linux flavour. Yet regularly somebody
    would come and say: "build fails on my Linux x.y.z". If enough
    information was provided new Makefile was added, or possibly
    some similar Makefile was modified to cover more cases.
    Those troubles mostly vanished when project switched to configure
    script. Now there is about 1500 lines of hand written code
    in configure machinery (biggest is 933 lines long configure.ac)
    and 8564 lines long generated configure script. Most build
    troubles is now gone or diagnosed early.

    Writing "diagnosed early" I mean that most user errors are
    detected quite early. For example, a lot of people try to
    compile program without having a C compiler. And when they
    have compiler they fail to install needed libraries (there
    is list which says what is needed but people fail to follow
    instructions).

    It is certainly silly when generated configure file is much
    bigger than actual program code. This happens frequently
    when lazy or brainwashed folks use automake (which apparently
    puts all checks that it knows into generated configure.ac).
    But Python have reasons to check for a lot of things, so
    the size is somewhat reasonable.

    So, why doesn't the configuration script itself have a configuration
    script? Will the language used in the script run on EVERY Linux and Unix system?

    Depends on meaning of EVERY, Linux and Unix. If you mean just
    Linux kernel, then it was possible to set up Linux kernel +
    system without normal shell. Since there is no shell, shell
    script will not run. IIUC first version of Unix from Bell Labs
    had significantly different shell, incompatible with modern ones.
    But if we take normal Linux distributions or for example
    Android or Unices that are not long obsolete then mostly yes.

    I wrote mostly because shell code generated by Autoconf macros
    is very portable. There is good chance that what automake
    produces is very portable too. However, when using hand
    written configure.ac there is hand written shell code inside.
    In the case I mention above it is probably about 400-500 lines
    of hand written shell code. Such hand written code is as portable
    as its author make it. Which sometimes means quite unportable.
    In this case all I can say that nobody reported any trouble
    with shell code.

    If so, why doesn't the same apply to the main language of the
    application? (Why isn't the application written in that language!)

    You like benchmarks, so try some benchmarks of speed of shell
    programs. Or believe me that for computational problems shell
    programs are dog slow (of order of 100 times slower than normal
    interpreted languages like Python).

    Portable shell programs may be rather verbose and ugly (I hope
    you agree that typical configure script are verbose and
    and ugly).

    Despite of the above, historically there were applications
    written as shell programs. In open source world they
    were not frequent but existed.

    I've also seen a project where the configuration program was a C file,
    one which didn't need any special options, whose output was used to
    build the main app.

    Yes, that is a possiblity. Some time ago I was thinking about
    similar thing. Basically, configure scripts are slow, ugly and
    long due to limitations of shell and need to work with "any"
    shell. Could we write resonably small "better shell" to
    execute simpler version of configure script? I am not sure
    if this would work well, basically pre-computations are easy
    to do in C code, but typical configure must do several tests
    and this means using various system interfaces. System
    interfaces vary from system to system and detecting
    available system interfaces is part of configure job.
    One could try to depend on Posix interfaces, they are
    available on many systems. But shell is part of Posix
    and may be availble on systems which do not provide
    Posix interface at C level. So it is not clear if C based
    configuration program would simplify things.

    Again, why can't the main app be made to work like the small one?

    Modern applications depend on libraries. Let me mention a dll
    for Windows that I created many years ago. My own code was
    about 2000 (wc) lines of code, part of it numeric code that
    provided main functionality (image transformation), rest was
    glue code to the libraries. Input data came from .tiff files
    and I used libtiff to read them. I needed some geometry code
    which I found on the net. I needed linear equation solver,
    that I got from Lapack. So there were 4 libraries (3 that
    I used directly and libjpeg used by libtiff), and most
    code in "my" dll actually came from the other libraries.

    In this dll was doing rather special thing used as a part
    of bigger process. In modern times application like gimp
    connects several things of similar complexity. There is
    a lot of image formats, so many libraries just to read and
    write graphic files. I did not look at gimp build process,
    but at configure stage is must verify if all needed libraries
    (probably tens if not more) are present. Libraries need to be
    in sufficiently new versions and export needed functionality
    (libraries frequently may be compiled skipping part of
    functionality). I am pretty sure that parts of gimp are
    optional, that is you may include or skip them. And some
    other projects may wish to use parts of gimp, so build
    probaly created quite a few of libraries (that is separate
    things that need to be linked).

    In modern times applications are supposed to be internationalized.
    That is various messages should appear in selected language.
    Normal practise in modern times is to have separate build
    step to expract english messages from source files and
    create connetion to translations. That alone means that
    build is more complex than simply compiling C files.

    Similarly, usefulness of applications depend on good
    documentation. When application evolves documentaion
    should be updated to show new results from examples.
    Good documentaion build will extract examples from
    documentation, run them trough program and then merge
    back results. So this is dependent on C compilation,
    but contains quite a different steps.

    I've played with projects that had nearly 20 different makefiles, none
    of which was right for my own compiler. It is a ridiculous situation.

    Yes, there is trouble with multiple Makefiles, change something
    and you need next one. configure scripts tend to be better
    here, as long as fundamental assumptions hold they can
    adapt. But if say you refuse to use shell, or compiler can
    not produce object files (but only executables), then there
    are troubles: simply such change is much bigger than expected.

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Waldek Hebisch@21:1/5 to Tim Rentsch on Fri Mar 7 01:51:23 2025
    Tim Rentsch <[email protected]> wrote:
    bart <[email protected]> writes:

    On 05/03/2025 23:36, Tim Rentsch wrote:

    bart <[email protected]> writes:

    On 05/03/2025 02:20, Lawrence D'Oliveiro wrote:

    On Wed, 5 Mar 2025 01:20:07 +0000, bart wrote:

    I maintain my own scripting language. Building it from source - on >>>>>> Windows - takes 70ms:

    How wonderful. Does it offer Python-style features?

    No, it offers my-style features, that is, things I find useful:

    [long list of features]

    My understanding is that it is missing the two most important
    features of a programming language:

    (1) a user manual that defines and documents the language

    (2) an available implementation so that other people can
    use it to write programs

    The 1990s version, where it supported a substantial application, had a
    350-page manual. That one was used by other people to create add-on
    products.

    But it's now a personal tool and I only have reference material for my
    own use.

    If you post some links where I can download a current user
    manual and a current compiler or interpreter, I will gladly
    withdraw my comment.

    Otherwise, I stand by my comment, and see no reason to
    consider your alleged environment as anything other than
    fiction-ware.

    Bart has a project on github. In the past he provides part
    of source code for his languages. More precisely, he provided
    generated C source code for C compiler, generated C source
    code for implementation of his "dynamic" Q language, and
    source for compiler of his M language (in Q). So, those
    things existed and run times were consitent with what he
    claimed. AFAICS parts of source we missing, and it seems
    that he later removed the sources from github.

    Also, at various times Bart provide links to download executables,
    they were of no interest to me as they would not run natively
    on Linux. Also, my personal policy is to run only programs that
    I compile myself from sources or that come as part of Linux
    distribution.

    For me most interesting aspect was that it was possible to
    compile as fast as Bart claimed. Given incomplete sources
    and language features for me the actual languages were less
    interesting. But his languages are clearly real and there
    was some documentation and sizable sample of source code.

    I fetched the files in 2017, so what he has now is probably
    somewhat different.

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Fri Mar 7 09:56:09 2025
    On Thu, 6 Mar 2025 21:22:19 -0000 (UTC)
    Lawrence D'Oliveiro <[email protected]d> wibbled:
    On Thu, 6 Mar 2025 08:42:03 -0000 (UTC), Muttley wrote:

    Compilation and runtime are the same thing in Python arn't they?

    No, the code is actually compiled to bytecode, like Java and Perl do, and >UCSD Pascal did before all of them.

    If that bytecode never sees a file (though apparently it can be written to
    a pyc file), how is it any different to a normal interpreter simply creating
    a parse tree or other internal representation of a program that it then runs instead of running the text direct?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Fri Mar 7 09:53:37 2025
    XPost: comp.lang.python

    On Thu, 6 Mar 2025 19:21:45 -0000 (UTC)
    [email protected] (Waldek Hebisch) wibbled:
    In comp.lang.c [email protected] wrote:
    On Tue, 4 Mar 2025 18:16:25 +0000
    bart <[email protected]> wibbled:
    The CPython source bundle doesn't come with any makefiles. The first
    step appears to be to run a 35,000-line 'configure' script. Part of its

    Frankly any build system that has a 35K configure file needs revisiting.
    No package is so complex as to require that much setup. OS specific code
    should be dealt with some appropriate ifdefs in the source and libraries
    and linking should be a few 10s of lines.

    Back in the day packages used to hve different preprepared Makefiles for
    each system they could build on and IME that tended to work a lot better
    than configure scripts that tried to figure things out on the fly.

    I remember times when source package came with README file saying
    edit this and that to configure for your system. Typically one
    had to edit Makefile and possibly something like config.h. For

    Header files should never have to be manually edited unless the person who wrote the code didn't know wtf they were doing. #ifdef exists for a reason
    and if thats not enough makefiles can always manually concat stuff into a header.

    me it worked quite well. But those times are gone. Most people
    now do not know essential information about system they use, so
    are unable to provide sensible values. And modern programs are

    Those sorts of people should just install prepackaged binaries, not be building from source.

    Per platform Makefile-s do not scale when one wants to support
    multiple system and multiple configurations (there is exponential
    growth of possible combinations). And even of single configuration

    See above about ifdef.

    detected quite early. For example, a lot of people try to
    compile program without having a C compiler. And when they

    See above about installing binaries.

    It is certainly silly when generated configure file is much
    bigger than actual program code. This happens frequently

    Indeed.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to [email protected] on Fri Mar 7 14:00:13 2025
    On 07/03/2025 09:53, [email protected] wrote:
    On Thu, 6 Mar 2025 19:21:45 -0000 (UTC)
    [email protected] (Waldek Hebisch) wibbled:
    In comp.lang.c [email protected] wrote:
    On Tue, 4 Mar 2025 18:16:25 +0000
    bart <[email protected]> wibbled:
    The CPython source bundle doesn't come with any makefiles. The first
    step appears to be to run a 35,000-line 'configure' script. Part of its >>>
    Frankly any build system that has a 35K configure file needs revisiting. >>> No package is so complex as to require that much setup. OS specific code >>> should be dealt with some appropriate ifdefs in the source and libraries >>> and linking should be a few 10s of lines.

    Back in the day packages used to hve different preprepared Makefiles for >>> each system they could build on and IME that tended to work a lot better >>> than configure scripts that tried to figure things out on the fly.

    I remember times when source package came with README file saying
    edit this and that to configure for your system. Typically one
    had to edit Makefile and possibly something like config.h. For

    Header files should never have to be manually edited unless the person who wrote the code didn't know wtf they were doing. #ifdef exists for a reason and if thats not enough makefiles can always manually concat stuff into a header.

    me it worked quite well. But those times are gone. Most people
    now do not know essential information about system they use, so
    are unable to provide sensible values. And modern programs are

    Those sorts of people should just install prepackaged binaries, not be building
    from source.

    My view is that building from source should be made as simple as
    possible. As easy as compiling hello.c.

    I think it was 2014 that I first posted here a link to a C file that did exactly that, just about. It was a single file implementation of a
    substantial interpreter project, nearly 20Kloc, but transpiled from its original non-C language.

    I don't have that anymore, the nearest is the 'qc.c' example used below,
    which is 40Kloc. This works with multiple compilers on Windows, here
    tested with three:

    c:\qx>bcc qc
    Compiling qc.c to qc.exe

    c:\qx>gcc qc.c

    c:\qx>tcc qc.c -luser32 c:\windows\system32\kernel32.dll -fdollars-in-identifiers

    gcc generates a.exe so needs an extra option for that, but then so does hello.c. tcc doesn't like '$' in names, so needs that special option
    (why doesn't it just allow them?!). I couldn't just use -lkernel32
    either as one imported symbol was missing.

    So, how about Linux? Here I don't believe in using conditional code, so
    there is a special source version for Linux, let's say it's qu.c:

    root@DESKTOP-11:/mnt/c/qx# gcc qu.c -lm -ldl -fno-builtin

    Here it's a little bit more work, and it produces a.out. But tcc is
    about the same:

    root@DESKTOP-11:/mnt/c/qx# tcc qu.c -lm -ldl -fdollars-in-identifiers

    So:

    * No configure scripts

    * No makefiles

    * No #ifdef blocks

    * No header files (in fact virtually no macros in the source file)

    * Virtually no compiler options, except what are mandatory. Users can
    add -O, -o and -s options if they want.

    * And the entire distribution for your platform is a single C file

    Note that if downloadeding pre-built binaries, you will usually have a
    separate binary file for each platform. The same here: a separate C file
    per platform.

    When I posted about this before, lots of people got the notion that my development process was also based single monolithic source file. That's completely wrong. (This project is about 30 modules and the C file is
    generated with a tool.)

    This is about the distribution of a working, finished product to
    somebody who wants to build from source code so they can use it.

    Too many projects just expect that user, to grapple with the same,
    sprawling directory structure that the developer works with. Which means elaborate makefiles full of dependency info.

    What I provided was one step back from a binary file.

    (Actually, with my bcc compiler, the product can be run from source:

    c:\qx>bcc -r qc hello
    Compiling qc.c to qc.(run)
    Hello, World! 7-Mar-2025 13:57:12

    So you could consider this an 'executable'. But it might blow some
    people's minds though.)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Fri Mar 7 14:09:40 2025
    On Fri, 7 Mar 2025 14:00:13 +0000
    bart <[email protected]> wibbled:
    On 07/03/2025 09:53, [email protected] wrote:
    Note that if downloadeding pre-built binaries, you will usually have a >separate binary file for each platform. The same here: a separate C file
    per platform.

    Not sure why you think that makes things simpler. Just means you could end
    up with 10x the number of files unless you have a different source package
    for each platform.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Brown@21:1/5 to Lawrence D'Oliveiro on Fri Mar 7 15:48:19 2025
    On 06/03/2025 23:17, Lawrence D'Oliveiro wrote:
    On Thu, 6 Mar 2025 11:15:39 +0000, bart wrote:

    On 06/03/2025 02:28, Lawrence D'Oliveiro wrote:

    Does it do switched expressions? You can do those in Python.

    Do you mean 'match case'?

    That’s a generalization of the concept, but it’s a statement, not an expression.

    Python also has “\u” and “\U” for Unicode.

    I have this:

    println "\u20AC" # string (shows €)
    println '\u20AC' # integer println '\u20AC':"m" # shows € >> (interpret as multibyte char)

    With \v used for 6-digit hex codes. But the encoding with these is UTF8,
    so this is stored as a 3-byte sequence, or taking up 24 bits of an
    integer.

    I forgot about \N:

    >>> print("\N{LATIN SMALL LETTER T}\N{LATIN SMALL LETTER E}\N{LATIN SMALL LETTER S}\N{LATIN SMALL LETTER T}")
    test

    C++ added that syntax in C++23, but it hasn't made it into C as yet.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to [email protected] on Fri Mar 7 18:02:23 2025
    On 07/03/2025 14:09, [email protected] wrote:
    On Fri, 7 Mar 2025 14:00:13 +0000
    bart <[email protected]> wibbled:
    On 07/03/2025 09:53, [email protected] wrote:
    Note that if downloadeding pre-built binaries, you will usually have a
    separate binary file for each platform. The same here: a separate C file
    per platform.

    Not sure why you think that makes things simpler. Just means you could end
    up with 10x the number of files unless you have a different source package for each platform.

    Sure, because downloading the source code for all conceivable platforms
    is so simple!

    I just (well, nearly 2 hours ago!) downloaded the sources for gcc. It
    was 0.75GB in all, 142,000 files, 5,500 folders. There are 84,000 .c
    files, and 4,600 .h files.

    It took something over 90 MINUTES to unzip, using a SSD.

    I haven't started to look at what's involved in building it for Windows Actually I haven't got a clue how to go about it. Neither do I know how
    long it might take.

    Is this what you mean by 'simpler'?

    It is hard enough downloading ready-made binaries, which I now do from
    here: winlibs.com. There is a selection of ZIP files which contain the
    various binaries, headers etc which are needed for the built compiler to
    do its job.

    So people expect a binary download of a product to be a single binary,
    for which there is commonly a selection, for example Windows/32-bit or Windows/64-bit; or maybe .MSI/.ZIP, or maybe for MacOS.

    For large products however it will be a ZIP file or installer, rather
    than the single EXE which /is/ the product in my case.

    What I provide is that same selection, but the file extension is .c. You
    need a C compiler to turn it into a .exe file.

    To contrast with building gcc, here is how you might build my (C
    compiler) product from source, if you were on Windows and were happy to
    use my binary. You need the two files ccp.ma and mm.exe here:

    c:\demo>dir
    11/02/2025 20:13 578,187 ccp.ma
    16/08/2024 19:28 70 hello.c
    05/03/2025 13:38 402,432 mm.exe

    'ccp.ma' is the amalgamated source and support files in the original
    language that I would provide. mm.exe is the compiler:

    c:\demo>mm ccp
    Compiling ccp.m to ccp.exe # (gets renamed to bcc.exe)

    Now it can be used as a C compiler, here using '-r' to run immediately:

    c:\demo>ccp -r hello
    Compiling hello.c to hello.(run)
    Hello, World!

    Alternately the compiler itself could be run from source without
    generating ccp.exe:

    c:\demo>tim mm -r ccp -r hello
    Compiling ccp.m to ccp.(run)
    Compiling hello.c to hello.(run)
    Hello, World!
    Time: 0.072

    Building the C compiler then running it to build and run hello.c took
    under 0.1 seconds. (The timing excludes command shell overheads that
    might be 0.02 seconds, since this is normally done within an IDE.)

    This is literally magnitudes smaller, faster, simpler and easier than
    working from gcc sources.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James Kuyper@21:1/5 to Stuart Redmann on Fri Mar 7 13:17:28 2025
    XPost: comp.lang.c++, comp.lang.python

    On 3/6/25 01:35, Stuart Redmann wrote:
    ...
    IIRC, there are two different ways of compiling code, position dependent or position independent (PIC). Apparently you cannot mix these two kinds of
    code into a single executable. So if you are using a library that has been compiled with PIC turned on, you’ll have to compile your code the same way.

    Trick question: what changes do you need to make to your C source code
    to determine whether position dependent or position independent code is generated?

    There should be a command line parameter/IDE setting to do so, depending on your toolchain

    So, there's no general answer, there's a different answer for different toolchains. And so the best place to get a toolchain-specific answer is
    in a forum devoted to the toolchain you use.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mark Bourne@21:1/5 to Kaz Kylheku on Fri Mar 7 20:34:18 2025
    Kaz Kylheku wrote:
    When imports are being compiled automatically to .pyc files,
    their statements are being executed; like if you have a top-level print('hello'), you will see the hello output, and you will see
    a .pyc file in __pycache__ for that file. Was that hello printed
    after the .pyc file was produced, or during? I suspect during.

    No, the top-level code in the module is executed when the import is
    executed, not when it is compiled. If the imported module hasn't
    already been compiled to bytecode, that needs to be done before the
    import can be completed.

    In your example, "hello" will be printed when the module is imported,
    without any functions etc. within the module being called, but it's done
    when the bytecode is executed, not when it's compiled compilation. If
    you ran the same program again (after the bytecode had been cached in a
    .pyc file) without modifying the source (so it doesn't need to be
    recompiled), you'd still get that output printed, even though the
    imported module isn't compiled again.

    --
    Mark.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Muttley on Fri Mar 7 21:17:52 2025
    On Fri, 7 Mar 2025 09:56:09 -0000 (UTC), Muttley wrote:

    On Thu, 6 Mar 2025 21:22:19 -0000 (UTC)
    Lawrence D'Oliveiro <[email protected]d> wibbled:

    On Thu, 6 Mar 2025 08:42:03 -0000 (UTC), Muttley wrote:

    Compilation and runtime are the same thing in Python arn't they?

    No, the code is actually compiled to bytecode, like Java and Perl do,
    and UCSD Pascal did before all of them.

    If that bytecode never sees a file (though apparently it can be written
    to a pyc file), how is it any different to a normal interpreter simply creating a parse tree ...

    The fact that it’s not a tree.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Waldek Hebisch on Fri Mar 7 21:26:46 2025
    XPost: comp.lang.python

    On Thu, 6 Mar 2025 19:21:45 -0000 (UTC), Waldek Hebisch wrote:

    Per platform Makefile-s do not scale when one wants to support multiple system and multiple configurations (there is exponential growth of
    possible combinations). And even of single configuration for supposedly single system like Linux there are troubles.
    In one project there was someting like 20 Makefile.linux_x files where x represented one Linux flavour. Yet regularly somebody would come and
    say: "build fails on my Linux x.y.z". If enough information was
    provided new Makefile was added, or possibly some similar Makefile was modified to cover more cases.

    Can you offer more details on the project in question? I ask because
    there are things that can be done in GNU Makefiles to deal more
    dynamically with environmental differences in some simpler cases,
    without resorting to a full-on meta-build system like Autotools or
    CMake, and perhaps the maintainers of this project aren’t aware of
    that.

    Here’s a simple example, building an extension module for Python:

    CFLAGS=-g $(shell python3-config --includes) -fPIC -Wall -Wno-switch -Wno-parentheses

    gxscript_lexer.so : gxscript_lexer.o
    $(CC) $^ $(shell python3-config --ldflags) -shared -o $@

    gxscript_lexer.o : gxscript_lexer.c

    clean :
    rm -f gxscript_lexer.so gxscript_lexer.o
    rm -rf __pycache__

    .PHONY : clean

    Note how it uses the “python3-config” command to figure out the right
    flags (including file/directory locations) for compilation and
    linking. So it doesn’t have to know that the libraries are in /usr/lib
    on one system, and /usr/local/lib on another.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to bart on Fri Mar 7 21:35:09 2025
    On Fri, 7 Mar 2025 14:00:13 +0000, bart wrote:

    My view is that building from source should be made as simple as
    possible. As easy as compiling hello.c.

    For nontrivial open-source projects, that cannot be done without some help
    from the operating system. We have already seen, from your struggles with
    the Python source, how proprietary OSes like Microsoft Windows seem to go
    out of their way to make things difficult for users to build things.

    The whole design of Unix from the beginning was not to impose artificial distinctions between “users” and “programmers”. Indeed, *nix systems allow
    for a whole spectrum of usage patterns with different levels of automation
    in them, from point-and-click GUIs, through scripting languages, to full-
    on compile-link build workflows.

    So, how about Linux? Here I don't believe in using conditional code, so
    there is a special source version for Linux, let's say it's qu.c:

    That’s bad. Now you have to maintain two parallel sets of source.

    * No configure scripts

    * No makefiles

    * No #ifdef blocks

    * No header files (in fact virtually no macros in the source file)

    * Virtually no compiler options, except what are mandatory. Users can
    add -O, -o and -s options if they want.

    * And the entire distribution for your platform is a single C file

    All at the expense of requiring more work from the human developers/ maintainers.

    Those of us who are accustomed to *nix systems consider the computer as a
    tool to lift the burden of the hard work from us, not to make more work
    for us.

    Seems like Microsoft Windows inculcates a different attitude ...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Lawrence D'Oliveiro on Fri Mar 7 21:33:40 2025
    XPost: comp.lang.python

    On 07/03/2025 21:26, Lawrence D'Oliveiro wrote:
    On Thu, 6 Mar 2025 19:21:45 -0000 (UTC), Waldek Hebisch wrote:

    Per platform Makefile-s do not scale when one wants to support multiple
    system and multiple configurations (there is exponential growth of
    possible combinations). And even of single configuration for supposedly
    single system like Linux there are troubles.
    In one project there was someting like 20 Makefile.linux_x files where x
    represented one Linux flavour. Yet regularly somebody would come and
    say: "build fails on my Linux x.y.z". If enough information was
    provided new Makefile was added, or possibly some similar Makefile was
    modified to cover more cases.

    Can you offer more details on the project in question? I ask because
    there are things that can be done in GNU Makefiles to deal more
    dynamically with environmental differences in some simpler cases,
    without resorting to a full-on meta-build system like Autotools or
    CMake, and perhaps the maintainers of this project aren’t aware of
    that.

    Here’s a simple example, building an extension module for Python:

    CFLAGS=-g $(shell python3-config --includes) -fPIC -Wall -Wno-switch -Wno-parentheses

    gxscript_lexer.so : gxscript_lexer.o
    $(CC) $^ $(shell python3-config --ldflags) -shared -o $@

    gxscript_lexer.o : gxscript_lexer.c

    clean :
    rm -f gxscript_lexer.so gxscript_lexer.o
    rm -rf __pycache__

    .PHONY : clean

    Note how it uses the “python3-config” command to figure out the right flags (including file/directory locations) for compilation and
    linking. So it doesn’t have to know that the libraries are in /usr/lib
    on one system, and /usr/local/lib on another.

    So how does 'python3-config' know where this stuff is?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Keith Thompson on Fri Mar 7 21:30:40 2025
    On 07/03/2025 20:15, Keith Thompson wrote:
    bart <[email protected]> writes:
    [...]
    I just (well, nearly 2 hours ago!) downloaded the sources for gcc. It
    was 0.75GB in all, 142,000 files, 5,500 folders. There are 84,000 .c
    files, and 4,600 .h files.

    It took something over 90 MINUTES to unzip, using a SSD.

    Whatever you downloaded, it wasn't (just) the sources for gcc.
    The latest release of gcc (14.2.0) has 58503 .c files and 4131
    .h files, and the gcc project does not make it available as a
    .zip file. When you say "the sources for gcc", I presume you're
    referring to some software package that includes gcc. Why didn't
    you mention that?

    It was from here:

    https://github.com/gcc-mirror/gcc

    The ZIP file is the one you get on the '<> Code' pulldown menu. You get
    that on every project, whether it targets Windows or not.

    I've no idea where the official gcc source code resides. Googling
    'github cpython' worked for that product; this was the first hit for
    'github gcc'.

    On my system, unpacking gcc-14.2.0.tar.gz and gcc-14.2.0.tar.xz took
    15 and 20 seconds, respectively. I created a zip file; unzipping
    it took 23 seconds.

    I would have expected a few minutes at most; I don't know what it spent
    an hour and a half doing.

    Whatever is wrong with your system, I suggest it's not topical here.

    I never said it was.

    The gcc maintainers are not particularly interested in supporting
    Windows

    And yet gcc exists on Windows.

    The big thing everybody lauds gcc for is the range of targets it
    supports. But not supporting that obscure target called Win64-x64 is fine!

    (and are under no obligation to do so), so it's not
    surprising that building it from source on Windows is awkward.
    Complaining about it here is not useful.

    I'm not complaining about it. I was responding to a suggestion that
    providing a choice of prebuilt binaries for a range of platforms, was
    more complicated than downloading source code.

    This was a huge counter-example. Your 58000-file example would do as well.


    I've never tried to build gcc on Windows without using some Unix-like emulation layer, so I can't help you with that (not that you asked).
    I don't know whether it's possible.

    I wouldn't attempt it. You must know by now that I strive to keep such
    things on small scale and to keep aspects like building from source as
    simple, fast and effortless as possible.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to bart on Fri Mar 7 22:47:20 2025
    bart <[email protected]> writes:
    On 07/03/2025 20:15, Keith Thompson wrote:
    bart <[email protected]> writes:
    [...]
    I just (well, nearly 2 hours ago!) downloaded the sources for gcc. It
    was 0.75GB in all, 142,000 files, 5,500 folders. There are 84,000 .c
    files, and 4,600 .h files.

    It took something over 90 MINUTES to unzip, using a SSD.

    Whatever you downloaded, it wasn't (just) the sources for gcc.
    The latest release of gcc (14.2.0) has 58503 .c files and 4131
    .h files, and the gcc project does not make it available as a
    .zip file. When you say "the sources for gcc", I presume you're
    referring to some software package that includes gcc. Why didn't
    you mention that?

    It was from here:

    https://github.com/gcc-mirror/gcc

    The ZIP file is the one you get on the '<> Code' pulldown menu. You get
    that on every project, whether it targets Windows or not.

    You're downloading the entire flippin' GIT repository. Every version of
    gcc. You surely don't want that.

    Try downloading from here:

    https://bigsearcher.com/mirrors/gcc/releases/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to bart on Fri Mar 7 22:17:13 2025
    On Fri, 7 Mar 2025 21:33:40 +0000, bart wrote:

    So how does 'python3-config' know where this stuff is?

    It’s part of the Python extension SDK.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Keith Thompson on Sat Mar 8 02:05:28 2025
    On 07/03/2025 23:46, Keith Thompson wrote:
    bart <[email protected]> writes:
    On 07/03/2025 20:15, Keith Thompson wrote:
    bart <[email protected]> writes:
    [...]
    I just (well, nearly 2 hours ago!) downloaded the sources for gcc. It
    was 0.75GB in all, 142,000 files, 5,500 folders. There are 84,000 .c
    files, and 4,600 .h files.

    It took something over 90 MINUTES to unzip, using a SSD.
    Whatever you downloaded, it wasn't (just) the sources for gcc.
    The latest release of gcc (14.2.0) has 58503 .c files and 4131
    .h files, and the gcc project does not make it available as a
    .zip file. When you say "the sources for gcc", I presume you're
    referring to some software package that includes gcc. Why didn't
    you mention that?

    It was from here:

    https://github.com/gcc-mirror/gcc

    The ZIP file is the one you get on the '<> Code' pulldown menu. You
    get that on every project, whether it targets Windows or not.

    I've no idea where the official gcc source code resides. Googling
    'github cpython' worked for that product; this was the first hit for
    'github gcc'.

    So you just assumed that's official.

    Someone else has already replied and told you where the official gcc
    source code resides.

    You assumed it's on GitHub. It isn't. Not everything is. The GNU
    project does its own hosting. Somebody apparently decided to set up a
    mirror on GitHub, but I wouldn't rely on it. And it might not be up to
    date with the official gcc git (not GitHub) repository (though it
    appears that it is).

    That zip file is the latest version on the "master" branch, *not* a
    release. It isn't necessarily stable. But if your goal in downloading
    and extracting it was to make a point yet again about how difficult it
    is for you, I suppose that doesn't matter.

    If you wanted the gcc sources for a given release, it would be better to download a .tar.gz or .tar.xz file from an official mirror, which you
    can find via gcc.gnu.org. GitHub's zip download feature just gives you
    a snapshot of the repo, *not* an official release. A build procedure
    that works with an official tarball might not work with a git snapshot,
    for reasons I won't go into here.

    [...]

    The gcc maintainers are not particularly interested in supporting
    Windows

    And yet gcc exists on Windows.

    Yes.

    The big thing everybody lauds gcc for is the range of targets it
    supports. But not supporting that obscure target called Win64-x64 is
    fine!

    It's fine with me. If it's not fine with you, complaining about it here
    is unproductive and off topic. (And a "target" is the system for which
    gcc generates code, not necessarily the system on which gcc runs.)


    OK, I got hold of a tar file (eventually; those links kept going around
    in circles).

    It took 2 minutes to uncompress, a big improvement on that ZIP.

    However there wasn't otherwise much difference:

    ZIP tar
    All files 142K 134K
    Folders 5K 5K
    .c files 84K 79K
    .h files 4K 4K

    You do know this was just an example of a ginormous application with an overwhelming number of source files? Any app could have done really.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Waldek Hebisch on Sat Mar 8 02:26:52 2025
    On 07/03/2025 01:07, Waldek Hebisch wrote:
    bart <[email protected]> wrote:
    On 06/03/2025 19:21, Waldek Hebisch wrote:
    In comp.lang.c [email protected] wrote:
    On Tue, 4 Mar 2025 18:16:25 +0000
    bart <[email protected]> wibbled:
    The CPython source bundle doesn't come with any makefiles. The first >>>>> step appears to be to run a 35,000-line 'configure' script. Part of its >>>>
    Frankly any build system that has a 35K configure file needs revisiting. >>>> No package is so complex as to require that much setup. OS specific code >>>> should be dealt with some appropriate ifdefs in the source and libraries >>>> and linking should be a few 10s of lines.

    Back in the day packages used to hve different preprepared Makefiles for >>>> each system they could build on and IME that tended to work a lot better >>>> than configure scripts that tried to figure things out on the fly.

    I remember times when source package came with README file saying
    edit this and that to configure for your system. Typically one
    had to edit Makefile and possibly something like config.h. For
    me it worked quite well. But those times are gone. Most people
    now do not know essential information about system they use, so
    are unable to provide sensible values. And modern programs are
    bigger and more complicated, so such hand editing is too much work
    for rare people capable of doing this.

    Per platform Makefile-s do not scale when one wants to support
    multiple system and multiple configurations (there is exponential
    growth of possible combinations). And even of single configuration
    for supposedly single system like Linux there are troubles.
    In one project there was someting like 20 Makefile.linux_x files
    where x represented one Linux flavour. Yet regularly somebody
    would come and say: "build fails on my Linux x.y.z". If enough
    information was provided new Makefile was added, or possibly
    some similar Makefile was modified to cover more cases.
    Those troubles mostly vanished when project switched to configure
    script. Now there is about 1500 lines of hand written code
    in configure machinery (biggest is 933 lines long configure.ac)
    and 8564 lines long generated configure script. Most build
    troubles is now gone or diagnosed early.

    Writing "diagnosed early" I mean that most user errors are
    detected quite early. For example, a lot of people try to
    compile program without having a C compiler. And when they
    have compiler they fail to install needed libraries (there
    is list which says what is needed but people fail to follow
    instructions).

    It is certainly silly when generated configure file is much
    bigger than actual program code. This happens frequently
    when lazy or brainwashed folks use automake (which apparently
    puts all checks that it knows into generated configure.ac).
    But Python have reasons to check for a lot of things, so
    the size is somewhat reasonable.

    So, why doesn't the configuration script itself have a configuration
    script? Will the language used in the script run on EVERY Linux and Unix
    system?

    Depends on meaning of EVERY, Linux and Unix. If you mean just
    Linux kernel, then it was possible to set up Linux kernel +
    system without normal shell. Since there is no shell, shell
    script will not run. IIUC first version of Unix from Bell Labs
    had significantly different shell, incompatible with modern ones.
    But if we take normal Linux distributions or for example
    Android or Unices that are not long obsolete then mostly yes.

    I wrote mostly because shell code generated by Autoconf macros
    is very portable. There is good chance that what automake
    produces is very portable too. However, when using hand
    written configure.ac there is hand written shell code inside.
    In the case I mention above it is probably about 400-500 lines
    of hand written shell code. Such hand written code is as portable
    as its author make it. Which sometimes means quite unportable.
    In this case all I can say that nobody reported any trouble
    with shell code.

    If so, why doesn't the same apply to the main language of the
    application? (Why isn't the application written in that language!)

    You like benchmarks, so try some benchmarks of speed of shell
    programs. Or believe me that for computational problems shell
    programs are dog slow (of order of 100 times slower than normal
    interpreted languages like Python).

    That wasn't a serious suggestion. But why not have a language that can
    run anywhere? A compiler is a program that reads in some files and
    writes one or more output files - you can't get anything more portable!



    Portable shell programs may be rather verbose and ugly (I hope
    you agree that typical configure script are verbose and
    and ugly).

    Despite of the above, historically there were applications
    written as shell programs. In open source world they
    were not frequent but existed.

    I've also seen a project where the configuration program was a C file,
    one which didn't need any special options, whose output was used to
    build the main app.

    Yes, that is a possiblity. Some time ago I was thinking about
    similar thing. Basically, configure scripts are slow, ugly and
    long due to limitations of shell and need to work with "any"
    shell. Could we write resonably small "better shell" to
    execute simpler version of configure script?

    You'd still have to sell me on the need for a configuration script at all.

    I accept that sometimes scripting is needed to orchestrate certain
    builds or to perform installation, but such programs would be 2-3
    magnitudes smaller than that 35Kloc monstrosity.



    I am not sure
    if this would work well, basically pre-computations are easy
    to do in C code, but typical configure must do several tests
    and this means using various system interfaces. System
    interfaces vary from system to system and detecting
    available system interfaces is part of configure job.
    One could try to depend on Posix interfaces, they are
    available on many systems. But shell is part of Posix
    and may be availble on systems which do not provide
    Posix interface at C level. So it is not clear if C based
    configuration program would simplify things.

    I mentioned my transpiler producing C code that is for either Windows or
    Linux. At one time I also supported a neutral OS, where exactly the same
    code compiled on either (or any) OS.

    While there were limitations (for example my interpreter needs dlsym()
    from Linux or GetProcAddress() from Windows, here there was a
    workaround), enough would work to run a project like a compiler.


    Again, why can't the main app be made to work like the small one?

    Modern applications depend on libraries. Let me mention a dll
    for Windows that I created many years ago. My own code was
    about 2000 (wc) lines of code, part of it numeric code that
    provided main functionality (image transformation), rest was
    glue code to the libraries. Input data came from .tiff files
    and I used libtiff to read them. I needed some geometry code
    which I found on the net. I needed linear equation solver,
    that I got from Lapack. So there were 4 libraries (3 that
    I used directly and libjpeg used by libtiff), and most
    code in "my" dll actually came from the other libraries.

    In this dll was doing rather special thing used as a part
    of bigger process. In modern times application like gimp
    connects several things of similar complexity. There is
    a lot of image formats, so many libraries just to read and
    write graphic files. I did not look at gimp build process,
    but at configure stage is must verify if all needed libraries
    (probably tens if not more) are present. Libraries need to be
    in sufficiently new versions and export needed functionality
    (libraries frequently may be compiled skipping part of
    functionality). I am pretty sure that parts of gimp are
    optional, that is you may include or skip them. And some
    other projects may wish to use parts of gimp, so build
    probaly created quite a few of libraries (that is separate
    things that need to be linked).

    Some DLLS will be part of the OS. Some are easy to obtain by the user.
    Some could be bundled.

    However my apps (those mentioned below) would not fail if one was
    missing; only if specific functions from a DLL were needed. (I think I
    only needed one, to do with JPEG handling).

    If I was still making apps, I would not have a dependency of an elusive library. One such is GMPxxx.DLL; that was so difficult to source, or
    even to build from source code (yes it has its own 30Kloc configure
    file!) that I found it easier to create my own library.

    Another hard one I've bypassed is LIBFFI, with my own solution.


    In modern times applications are supposed to be internationalized.
    That is various messages should appear in selected language.
    Normal practise in modern times is to have separate build
    step to expract english messages from source files and
    create connetion to translations. That alone means that
    build is more complex than simply compiling C files.

    Actually my 1990s apps were internationalised (working in English,
    French, German, Dutch). A dictionary of translations was provided by distributors. There was some scripting to help with that, but the script language was built-in to the app.

    It was all taken care of. No need for makefiles or any stuff like that. Supporting a different language didn't need a new build; just a data file.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to Keith Thompson on Sat Mar 8 05:07:27 2025
    On 2025-03-07, Keith Thompson <[email protected]> wrote:
    [email protected] (Scott Lurndal) writes:
    bart <[email protected]> writes:
    [...]
    It was from here:

    https://github.com/gcc-mirror/gcc

    The ZIP file is the one you get on the '<> Code' pulldown menu. You get >>>that on every project, whether it targets Windows or not.

    You're downloading the entire flippin' GIT repository. Every version of
    gcc. You surely don't want that.

    No, he downloaded a zip of the current version. He'd get the entire
    repo only if he did a "git clone".

    (Downloading a zip of the current version is a GitHub feature, not a git feature.)

    Sort of.

    Creating archive snapshots is a feature of git: "git archive".

    Github almost certainly uses this to spin up the downloadable
    archives on the fly, as do cgit and gitweb.

    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @[email protected]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to bart on Sat Mar 8 06:17:57 2025
    On Fri, 7 Mar 2025 21:30:40 +0000, bart wrote:

    The big thing everybody lauds gcc for is the range of targets it
    supports. But not supporting that obscure target called Win64-x64 is
    fine!

    What drives any open-source project is not the number of users, but the
    degree of active contribution to the project--whether it be code, documentation, packaging, being helpful in forums or whatever.

    Porting open-source software like GCC to Windows might greatly increase
    the number of users, but it will not make anywhere near as great a
    difference to the number of people able to contribute back to the project. That’s just the nature of the Windows ecosystem. So all in all, the
    project maintainers end up with a greater support burden, for less reward.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Sat Mar 8 10:12:25 2025
    On Fri, 7 Mar 2025 18:02:23 +0000
    bart <[email protected]> gabbled:
    On 07/03/2025 14:09, [email protected] wrote:
    On Fri, 7 Mar 2025 14:00:13 +0000
    bart <[email protected]> wibbled:
    On 07/03/2025 09:53, [email protected] wrote:
    Note that if downloadeding pre-built binaries, you will usually have a
    separate binary file for each platform. The same here: a separate C file >>> per platform.

    Not sure why you think that makes things simpler. Just means you could end >> up with 10x the number of files unless you have a different source package >> for each platform.

    Sure, because downloading the source code for all conceivable platforms
    is so simple!

    Huh?

    I haven't started to look at what's involved in building it for Windows >Actually I haven't got a clue how to go about it. Neither do I know how
    long it might take.

    Is this what you mean by 'simpler'?

    Err, no idea what you're talking about. Perhaps you didn't read what I
    wrote properly. The simple solution is to have a single package for all OSs which has a load of ifdefs in the code itself and the user doesn't have to
    do anything except pick the correct makefile or for windows project file.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Keith Thompson on Sat Mar 8 10:12:44 2025
    On 08/03/2025 07:19, Keith Thompson wrote:
    bart <[email protected]> writes:
    [...]
    You do know this was just an example of a ginormous application with
    an overwhelming number of source files? Any app could have done
    really.

    Yes, gcc has a lot of source files. I don't think anyone here would
    have disagreed with that. There was no need to go into details (with incomplete information) or tell us how slow something is on your
    system.



    Jesus, what is your problem?

    I downloaded a large app from Github, something I've done with many
    dozens of projects, and did so via a ZIP file.

    This particular one /did/ take about 90 minutes (it was still going
    around 90 minutes, but I noticed it had stopped after 105 minutes, as I
    as busy doing other stuff).

    And it /did/ have those numbers of files.

    I could have chosen a different app to demonstrate something that is
    easier to install as a binary than from source code, for example CPython
    3.13.

    That took a few seconds to download the 27MB EXE, which is an installer,
    and about a minute to run that and complete the installing. God knows
    how long it would have taken from source, with the dozen specialist
    tools that would also be needed. Probably forever, if it doesn't work.

    (Except I forgot to tell it the installation path, so it's now buried
    somewhere on my file system. Never mind, I already have 3.14 anyway.)

    Maybe the CPython product it's white-listed so there are fewere security
    checks to do on the files; I don't know.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to [email protected] on Sat Mar 8 14:09:17 2025
    On 08/03/2025 10:12, [email protected] wrote:
    On Fri, 7 Mar 2025 18:02:23 +0000
    bart <[email protected]> gabbled:
    On 07/03/2025 14:09, [email protected] wrote:
    On Fri, 7 Mar 2025 14:00:13 +0000
    bart <[email protected]> wibbled:
    On 07/03/2025 09:53, [email protected] wrote:
    Note that if downloadeding pre-built binaries, you will usually have a >>>> separate binary file for each platform. The same here: a separate C
    file
    per platform.

    Not sure why you think that makes things simpler. Just means you
    could end
    up with 10x the number of files unless you have a different source
    package
    for each platform.

    Sure, because downloading the source code for all conceivable
    platforms is so simple!

    Huh?

    I haven't started to look at what's involved in building it for
    Windows Actually I haven't got a clue how to go about it. Neither do I
    know how long it might take.

    Is this what you mean by 'simpler'?

    Err, no idea what you're talking about. Perhaps you didn't read what I
    wrote properly. The simple solution is to have a single package for all OSs


    This what I understood you meant: you want to download a bunch of source
    code, together with makefiles and configure scripts and all the usual
    stuff. It doesn't matter if platform configuration is done with #ifdefs
    or by choosing some combination of files.

    It's usually a horrible, sprawling less with a high chance of failure.
    It's bad mistake to just dump the developer's directory tree onto users,
    and lazy.

    Usually a precompiled binary download is a smaller, simpler selection of
    files (often just one), there is no building involved and no special
    tools needed (and no need to employ CYGWIN, MSYS2 or WSL if building on Windows, or having to install VS).

    My idea is similar to supplying binaries, but replacing each binary file
    with one C source file. This now needs a C compiler to turn into a
    binary, but nothing else. No configure, no makefiles, virtually no
    special options, no special compiler needed and no special version.


    which has a load of ifdefs in the code itself and the user doesn't
    have to
    do anything except pick the correct makefile or for windows project file.

    I suspect you either haven't done much building of open source software
    on Windows, or were remarkably lucky.

    Have a go at building GMP or LIBFFI for example. With either of those,
    just give me the relevant DLL file.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to bart on Sat Mar 8 14:48:02 2025
    bart <[email protected]> writes:
    On 08/03/2025 07:19, Keith Thompson wrote:
    bart <[email protected]> writes:
    [...]
    You do know this was just an example of a ginormous application with
    an overwhelming number of source files? Any app could have done
    really.

    Yes, gcc has a lot of source files. I don't think anyone here would
    have disagreed with that. There was no need to go into details (with
    incomplete information) or tell us how slow something is on your
    system.



    Jesus, what is your problem?

    Keith isn't the person who complains vociferiously about
    everything, all the time, in every single post. You are.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Sat Mar 8 15:51:05 2025
    On Sat, 8 Mar 2025 14:09:17 +0000
    bart <[email protected]> gabbled:
    My idea is similar to supplying binaries, but replacing each binary file
    with one C source file. This now needs a C compiler to turn into a
    binary, but nothing else. No configure, no makefiles, virtually no
    special options, no special compiler needed and no special version.

    So instead of just typing "make" the user has to know how to invoke the compiler, possibly with certain switches set. Not sure how thats any better.

    which has a load of ifdefs in the code itself and the user doesn't
    have to
    do anything except pick the correct makefile or for windows project file.

    I suspect you either haven't done much building of open source software
    on Windows, or were remarkably lucky.

    True. I've done a small amount of C/C++ dev on Windows but these days I wouldn't touch it with a 10 foot pole and rubber gloves.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to [email protected] on Sat Mar 8 16:46:14 2025
    On 08/03/2025 15:51, [email protected] wrote:
    On Sat, 8 Mar 2025 14:09:17 +0000
    bart <[email protected]> gabbled:
    My idea is similar to supplying binaries, but replacing each binary
    file with one C source file. This now needs a C compiler to turn into
    a binary, but nothing else. No configure, no makefiles, virtually no
    special options, no special compiler needed and no special version.

    So instead of just typing "make" the user has to know how to invoke the compiler, possibly with certain switches set. Not sure how thats any
    better.

    I've just typed 'make' in a Windows prompt. Nothing happens ('command
    not recognised'). That's a good start!

    If I look at my gcc binaries, there's a program called
    'mingw32-make.exe'. Maybe that's the one. However, build instructions
    call for 'make' so it will immediately fail.

    What Make does is take a mountain of complexity called a 'makefile',
    which is special kind of arcane language, and tries to run it. It might
    work, it might fail immediately, or it might grind away for several
    minutes and then it stops.

    Why I am aiming for is to be able to just type:

    gcc prog.c

    But apparently that won't do. Some smart-arses will point out that
    that's more typing than 'make'. Others, less smart, don't actually know
    how to directly invoke a compiler like this.

    Now, it's been a while since I've argued about makefiles and all their
    woes. But maybe things have changed. If I copy that file above to
    'make.exe', and navigate to a folder full of Lua source files, I see it
    also has this:

    c:\luac>dir make*
    02/02/2024 13:18 7,722 Makefile

    So according to you, this should be a piece of piss. OK, I'll try it:

    c:\luac>make
    makefile:103: target 'AIX' given more than once in the same rule
    makefile:117: target 'FreeBSD' given more than once in the same rule
    Guessing `uname`
    make[1]: Entering directory 'c:/luac'
    makefile:103: target 'AIX' given more than once in the same rule
    makefile:117: target 'FreeBSD' given more than once in the same rule
    make[1]: *** No rule to make target '`uname`'. Stop.
    make[1]: Leaving directory 'c:/luac'
    make: *** [makefile:101: guess] Error 2

    That went well! Maybe this is the wrong one, and I've been messing about
    with these files. So I download a fresh Lua versiom as a .tar.gz file
    and install it. Yes, there were in fact two makefiles, one in a higher directory level:

    c:\ll\lua-5.4.7>dir
    13/06/2024 22:16 <DIR> .
    08/03/2025 16:15 <DIR> ..
    13/06/2024 22:16 <DIR> doc
    08/05/2024 21:47 3,150 Makefile
    13/06/2024 22:16 151 README
    13/06/2024 22:15 <DIR> src

    I now follow the instructions from here:
    https://www.lua.org/download.html and do this:

    c:\ll\lua-5.4.7>make all test
    make[1]: Entering directory 'c:/ll/lua-5.4.7/src'
    makefile:101: target 'AIX' given more than once in the same rule
    makefile:115: target 'FreeBSD' given more than once in the same rule
    .....
    make[2]: Leaving directory 'c:/ll/lua-5.4.7/src'
    make[1]: *** [makefile:99: guess] Error 2
    make[1]: Leaving directory 'c:/ll/lua-5.4.7/src'
    make: *** [makefile:55: guess] Error 2

    Oh dear, that hasn't worked either. So now what? Maybe forget all that,
    and just for a prebuilt binary here: https://github.com/rjpcomputing/luaforwindows/releases. However, that's
    an old 5.1 version.

    Or I could just build Lua the easy way:

    c:\ll\lua-5.4.7\src>del luac.c
    c:\ll\lua-5.4.7\src>gcc *.c -o lua
    c:\ll\lua-5.4.7\src>lua
    Lua 5.4.7 Copyright (C) 1994-2024 Lua.org, PUC-Rio
    >

    This works! No crappy makefiles needed. Here I happened to know it
    involves compiling 33 of the 34 C files supplied (luac.c is for embedded
    I think).

    The makefiles are full of useless dependency info. Lua is a small
    program, and I just want to use it, not develop it. So it only needs to
    be built once, and the makefile then could then be ultra-simple; it
    might even work!

    In any case, tcc builds it in 1/4 of a second.

    which has a load of ifdefs in the code itself and the user doesn't
    have to
    do anything except pick the correct makefile or for windows project
    file.

    I suspect you either haven't done much building of open source
    software on Windows, or were remarkably lucky.

    True. I've done a small amount of C/C++ dev on Windows but these days I wouldn't touch it with a 10 foot pole and rubber gloves.

    The problem is not with Windows!

    The real problem is that you are so over-reliant on all the variety of
    tools within your Linux eco-system, that you are lost in an environment
    where that doesn't exist.

    I find it easy to develop on Windows because I have few dependencies,
    and I would find it easy to develop on Linux - if I had to. (However it
    has some annoying things would drive me up the wall.)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael S@21:1/5 to Keith Thompson on Sat Mar 8 19:29:40 2025
    On Fri, 07 Mar 2025 12:15:42 -0800
    Keith Thompson <[email protected]> wrote:

    GCC contains support for x86-64 using the mingw-w64 runtime
    library, available from https://www.mingw-w64.org/downloads/. This
    library should be used with the target triple x86_64-pc-mingw32.


    The gcc compiler that I use on Windows most of the time has different
    tripple: x86_64-w64-mingw32
    It is a native Window program for AMD64 (a.k.a. x86_64) architecture
    that generates likewise objects/exe.
    I am not sure about the meaning of the 3rd part of the triple.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Michael S on Sat Mar 8 18:15:43 2025
    On 08/03/2025 17:29, Michael S wrote:
    On Fri, 07 Mar 2025 12:15:42 -0800
    Keith Thompson <[email protected]> wrote:

    GCC contains support for x86-64 using the mingw-w64 runtime
    library, available from https://www.mingw-w64.org/downloads/. This
    library should be used with the target triple x86_64-pc-mingw32.


    The gcc compiler that I use on Windows most of the time has different tripple: x86_64-w64-mingw32
    It is a native Window program for AMD64 (a.k.a. x86_64) architecture
    that generates likewise objects/exe.
    I am not sure about the meaning of the 3rd part of the triple.


    I think nobody does. There's always been some sort of mystique
    surrounding 'gcc' on Windows.

    'MinGW' supposedly 'Minimalist Gnu on Windows'. In that case I wouldn't
    like to see the full-scale one..

    My gcc installation 14.1 takes up nearly 0.9GB; don't ask me how much of
    that, if any, is 'MinGW'. My view is all mentions of 'MinGW' could be
    removed at a stroke, and nothing would really change: you'd still have a compiler called 'gcc' that can compile C programs for an x64 Win64 ABI
    target.

    Newer gcc's I now obtain from winlibs.com (ones like TDM are stuck at
    10.2). On that site, it explains something about MingW, although I still
    don't really get it:

    https://winlibs.com/philosophy.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Chris M. Thomasson on Sat Mar 8 22:59:23 2025
    On Sat, 8 Mar 2025 13:14:00 -0800, Chris M. Thomasson wrote:

    Have you ever played around with vcpkg? Works pretty darn good with
    MSVC:

    Only mentions about 2500 library dependencies that they will manage for
    you.

    I suppose that’s all that’s available on Windows ...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Chris M. Thomasson on Sat Mar 8 23:03:22 2025
    On Sat, 8 Mar 2025 13:13:07 -0800, Chris M. Thomasson wrote:

    On 3/8/2025 10:15 AM, bart wrote:

    'MinGW' supposedly 'Minimalist Gnu on Windows'. In that case I wouldn't
    like to see the full-scale one..

    cygwin is okay, well it's been a while since I used it... :^)

    https://www.cygwin.com

    Cygwin is clever. They managed to get poll/select working on pipes, which
    is something Microsoft still cannot manage on native Windows.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to bart on Sat Mar 8 23:02:08 2025
    On Sat, 8 Mar 2025 16:46:14 +0000, bart wrote:

    What Make does is take a mountain of complexity called a 'makefile',
    which is special kind of arcane language, and tries to run it. It might
    work, it might fail immediately, or it might grind away for several
    minutes and then it stops.

    All too common with Windows, I’m afraid.

    I remember when the LibreOffice project was set up as a fork from the
    moribund OpenOffice, there was a blog post reporting on initial progress,
    from Michael Meeks I think it was, saying that the Windows build still
    suffered from mysterious intermittent failures, such that retrying the
    build would usually succeed.

    That kind of thing is unheard of on proper *nix systems.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael S@21:1/5 to Lawrence D'Oliveiro on Sun Mar 9 01:26:26 2025
    On Sat, 8 Mar 2025 23:03:22 -0000 (UTC)
    Lawrence D'Oliveiro <[email protected]d> wrote:

    On Sat, 8 Mar 2025 13:13:07 -0800, Chris M. Thomasson wrote:

    On 3/8/2025 10:15 AM, bart wrote:

    'MinGW' supposedly 'Minimalist Gnu on Windows'. In that case I
    wouldn't like to see the full-scale one..

    cygwin is okay, well it's been a while since I used it... :^)

    https://www.cygwin.com

    Cygwin is clever. They managed to get poll/select working on pipes,
    which is something Microsoft still cannot manage on native Windows.

    cygwin is very slow. And user interface is significantly inferior
    relatively to msys2/mingw64. Or at least it was in 2018 which happens
    to be the version of cygwin that I am using regularly as part of
    Altera/Intel Nios2 SDK.
    For me the speed and UI convinience are far more important than better emulation of obscure POSIX features which is probably important only
    for programs that I would not want to run regardless.
    Also installation of packages on cygwin appear to be far more tricky
    than on msys2, where package manager (pacman) mostly works.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Michael S on Sun Mar 9 02:30:37 2025
    On Sun, 9 Mar 2025 01:26:26 +0200, Michael S wrote:

    cygwin is very slow.

    I’m sure it is. ;)

    For me the speed and UI convinience are far more important than better emulation of obscure POSIX features which is probably important only for programs that I would not want to run regardless.

    Unfortunately select/poll are a key part of efficient event-driven
    programming. In the 1990s (the heyday of Windows NT) they tried to handle
    all of this with threads, only to discover that, unless you were doing something heavily CPU-bound, the programming complexity just wasn’t worth
    it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Sun Mar 9 08:47:28 2025
    On Sat, 8 Mar 2025 16:46:14 +0000
    bart <[email protected]> wibbled:
    On 08/03/2025 15:51, [email protected] wrote:
    On Sat, 8 Mar 2025 14:09:17 +0000
    bart <[email protected]> gabbled:
    My idea is similar to supplying binaries, but replacing each binary
    file with one C source file. This now needs a C compiler to turn into
    a binary, but nothing else. No configure, no makefiles, virtually no
    special options, no special compiler needed and no special version.

    So instead of just typing "make" the user has to know how to invoke the
    compiler, possibly with certain switches set. Not sure how thats any
    better.

    I've just typed 'make' in a Windows prompt. Nothing happens ('command
    not recognised'). That's a good start!

    I'm not particularly interested in windows development. Microsoft seems to
    have made it as complicated as possibly with its ridiculous overcomplicated project files. From a unix POV all I want to do if I'm building a package
    from source is to type "make" after selecting the correct makefile.

    So according to you, this should be a piece of piss. OK, I'll try it:

    I'm not really interested in your straw men.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael S@21:1/5 to [email protected] on Sun Mar 9 11:43:36 2025
    On Sun, 9 Mar 2025 08:47:28 -0000 (UTC)
    [email protected] wrote:

    On Sat, 8 Mar 2025 16:46:14 +0000
    bart <[email protected]> wibbled:
    On 08/03/2025 15:51, [email protected] wrote:
    On Sat, 8 Mar 2025 14:09:17 +0000
    bart <[email protected]> gabbled:
    My idea is similar to supplying binaries, but replacing each
    binary file with one C source file. This now needs a C compiler
    to turn into a binary, but nothing else. No configure, no
    makefiles, virtually no special options, no special compiler
    needed and no special version.

    So instead of just typing "make" the user has to know how to
    invoke the compiler, possibly with certain switches set. Not sure
    how thats any better.

    I've just typed 'make' in a Windows prompt. Nothing happens
    ('command not recognised'). That's a good start!

    I'm not particularly interested in windows development. Microsoft
    seems to have made it as complicated as possibly with its ridiculous overcomplicated project files. From a unix POV all I want to do if
    I'm building a package from source is to type "make" after selecting
    the correct makefile.

    So according to you, this should be a piece of piss. OK, I'll try
    it:

    I'm not really interested in your straw men.



    Pay attention that all this slow, complicated 'configure' business
    didn't originate on Windows. It was invented in order to cover variety
    of Unixen. Which (variety) no longer exists, but religious 'free
    software' people like to pretend that it is still relevant and continue
    to use configure. Instead of writing code that at source level is
    portable between 4 operation systems and 2 CPU architectures that still
    matter (or 6, if one wants portability to phones). Which (writing
    mostly portable, but not c.l.c-style obsessively portable code) is
    nowadays not even hard.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael S@21:1/5 to Lawrence D'Oliveiro on Sun Mar 9 11:28:07 2025
    On Sun, 9 Mar 2025 02:30:37 -0000 (UTC)
    Lawrence D'Oliveiro <[email protected]d> wrote:

    On Sun, 9 Mar 2025 01:26:26 +0200, Michael S wrote:

    cygwin is very slow.

    I’m sure it is. ;)

    For me the speed and UI convinience are far more important than
    better emulation of obscure POSIX features which is probably
    important only for programs that I would not want to run
    regardless.

    Unfortunately select/poll are a key part of efficient event-driven programming. In the 1990s (the heyday of Windows NT) they tried to
    handle all of this with threads, only to discover that, unless you
    were doing something heavily CPU-bound, the programming complexity
    just wasn’t worth it.

    select/poll is the one way to do event-driven programming.
    There are other ways. In particular, under Windows you can
    simultaneously wait for multiple objects with API that is called...
    Surprise! WaitForMultipleObjects.
    Yes, it does not work directly with anonymous files. But anonymous file
    can be treated as a special version of named pipe and then it does work.

    If it's not enough, I would guess that if one wants ultimate
    scalability, one can force named pipes into working with I/O completion
    ports, which is as scalable as one could wish.

    But all that irrelevant.
    What is relevant is that those things are used in sorts of POSIX
    programs that I don't want to run either under cygwin or under msys2.
    And for POSIX programs that I do want to run msys2 is simply better.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael S@21:1/5 to Michael S on Sun Mar 9 14:26:17 2025
    On Sun, 9 Mar 2025 11:28:07 +0200
    Michael S <[email protected]> wrote:

    Yes, it does not work directly with anonymous files. But anonymous
    file can be treated as a special version of named pipe and then it
    does work.


    Above I mistyped anonymous pipes as anonymous files. Sorry

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Michael S on Sun Mar 9 12:16:56 2025
    On 09/03/2025 09:43, Michael S wrote:
    On Sun, 9 Mar 2025 08:47:28 -0000 (UTC)
    [email protected] wrote:

    On Sat, 8 Mar 2025 16:46:14 +0000
    bart <[email protected]> wibbled:
    On 08/03/2025 15:51, [email protected] wrote:
    On Sat, 8 Mar 2025 14:09:17 +0000
    bart <[email protected]> gabbled:
    My idea is similar to supplying binaries, but replacing each
    binary file with one C source file. This now needs a C compiler
    to turn into a binary, but nothing else. No configure, no
    makefiles, virtually no special options, no special compiler
    needed and no special version.

    So instead of just typing "make" the user has to know how to
    invoke the compiler, possibly with certain switches set. Not sure
    how thats any better.

    I've just typed 'make' in a Windows prompt. Nothing happens
    ('command not recognised'). That's a good start!

    I'm not particularly interested in windows development. Microsoft
    seems to have made it as complicated as possibly with its ridiculous
    overcomplicated project files. From a unix POV all I want to do if
    I'm building a package from source is to type "make" after selecting
    the correct makefile.

    So according to you, this should be a piece of piss. OK, I'll try
    it:

    I'm not really interested in your straw men.



    Pay attention that all this slow, complicated 'configure' business
    didn't originate on Windows. It was invented in order to cover variety
    of Unixen. Which (variety) no longer exists, but religious 'free
    software' people like to pretend that it is still relevant and continue
    to use configure.

    It's more likely that they don't even think about it. It's just the way
    it's always been done, and they don't question it.

    They only get vocal when it is necessary to build on a non-Unix
    environment and complain that it is rubbish because all that baggage is missing.

    Then their program written in the 'portable' C language, even when it
    isn't full of POSIX header files, is not quite so portable because of
    external factors.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Lawrence D'Oliveiro on Sun Mar 9 16:14:51 2025
    On 07/03/2025 21:35, Lawrence D'Oliveiro wrote:
    On Fri, 7 Mar 2025 14:00:13 +0000, bart wrote:

    My view is that building from source should be made as simple as
    possible. As easy as compiling hello.c.

    For nontrivial open-source projects, that cannot be done without some help from the operating system. We have already seen, from your struggles with
    the Python source, how proprietary OSes like Microsoft Windows seem to go
    out of their way to make things difficult for users to build things.

    The whole design of Unix from the beginning was not to impose artificial distinctions between “users” and “programmers”. Indeed, *nix systems allow
    for a whole spectrum of usage patterns with different levels of automation
    in them, from point-and-click GUIs, through scripting languages, to full-
    on compile-link build workflows.

    So, how about Linux? Here I don't believe in using conditional code, so
    there is a special source version for Linux, let's say it's qu.c:

    That’s bad. Now you have to maintain two parallel sets of source.

    * No configure scripts

    * No makefiles

    * No #ifdef blocks

    * No header files (in fact virtually no macros in the source file)

    * Virtually no compiler options, except what are mandatory. Users can
    add -O, -o and -s options if they want.

    * And the entire distribution for your platform is a single C file

    All at the expense of requiring more work from the human developers/ maintainers.

    You mean, more work in not needing to create makefiles, or work out
    dependency graphs, or generate configure scripts, or enumerate compiler options?

    Have you considered how much effort could be saved by keeping things simple?

    Some of this approach is actually used in some projects, for example the single-file version of sqlite3.c, or the single-file version of Lua,
    because it makes its deployment, embedded within an application, for
    example, far simpler and less error prone.

    People have enough trouble with their own dependencies, without having
    to worry about a sprawling directory tree of a library they want to incorporate.

    This what it looks like, even using gcc:

    c:\cx>gcc sql.c -o sql # sql.c is shell.c + sqlite3.c

    c:\cx>sql
    SQLite version 3.25.3 2018-11-05 20:37:38
    Enter ".help" for usage hints.
    Connected to a transient in-memory database.
    Use ".open FILENAME" to reopen on a persistent database.
    sqlite> .q

    c:\cx>gcc lua.c -o lua

    c:\cx>lua hello.lua
    Hello

    It can work on Linux too:

    root@DESKTOP-11:/mnt/c/cx# gcc lua.c -olua -lm -ldl
    root@DESKTOP-11:/mnt/c/cx# ./lua hello.lua
    Hello

    Show me where the makefiles or configure scripts are; they don't exist!

    You can still create a makefile if you like, but it would be quite a
    short one:

    lua.exe:
    gcc lua.c -o lua

    I guess this one has a bigger chance of success. You also don't need a
    tool to generate it.


    Those of us who are accustomed to *nix systems consider the computer as a tool to lift the burden of the hard work from us, not to make more work
    for us.


    I see it as generating unnecessary work. /You/ would never understand
    that until you realise that building your project first involves running
    35,000 lines of gobbledygook in a language not supported by your machine.

    Your view is that that 35Kloc *must* be absolutely essential, mine is
    that at least 99% of it is pointless.

    Seems like Microsoft Windows inculcates a different attitude ...

    I developed commercial apps for MSDOS then Windows for about 15 years. I
    never used the tools you seem to think are indispensable under Unix, and
    I never had any problems.

    (But then, I never had the need to build, from source, third party
    libraries that originated on Unix-like systems which could only be built
    on those systems. I either used my own libraries, or binaries were
    included with Windows.)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Lawrence D'Oliveiro on Sun Mar 9 15:37:35 2025
    On 08/03/2025 23:02, Lawrence D'Oliveiro wrote:
    On Sat, 8 Mar 2025 16:46:14 +0000, bart wrote:

    What Make does is take a mountain of complexity called a 'makefile',
    which is special kind of arcane language, and tries to run it. It might
    work, it might fail immediately, or it might grind away for several
    minutes and then it stops.

    All too common with Windows, I’m afraid.

    I remember when the LibreOffice project was set up as a fork from the moribund OpenOffice, there was a blog post reporting on initial progress, from Michael Meeks I think it was, saying that the Windows build still suffered from mysterious intermittent failures, such that retrying the
    build would usually succeed.

    That kind of thing is unheard of on proper *nix systems.


    So, what you are saying is that some software that is developed using
    one particular environment, regarding its tools, resources, and testing,
    may fail on an alien environment.

    That would not be unexpected. But what is wrong is to trash that other environment for being different.

    In this case, /why/ was that build failing? Was it even using Windows,
    or some extra layers to emulate Linux on Windows?

    You'd need to pinpoint the exact reason for failure before laying blame.
    Maybe the build process is 10 times more elaborate than is necessary,
    and it's going wrong in that 90% that you don't really need anyway.

    For example, there's some steps there that might be relevant for some
    obscure corner of Linux, but are meaningless elsewhere.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to Michael S on Sun Mar 9 18:06:18 2025
    On 2025-03-09, Michael S <[email protected]> wrote:
    select/poll is the one way to do event-driven programming.
    There are other ways.

    There are other ways, sure.

    But the program you're trying to build uses poll, and not other ways.

    So if that Just Works (tm), you don't have to do a darn thing
    to the program.

    Get it?

    In particular, under Windows you can
    simultaneously wait for multiple objects with API that is called...
    Surprise! WaitForMultipleObjects.

    Does that still have a shitty limit of 64 handles?

    Taking a program which polls on pipes and making it compile and work
    with WFMO is not fun.

    If it's not enough, I would guess that if one wants ultimate
    scalability, one can force named pipes into working with I/O completion ports, which is as scalable as one could wish.

    Personal scalability is most important; not blowing all your
    evenings for the next three weeks porting some POSIX thing to
    native Win32.

    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @[email protected]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to Michael S on Sun Mar 9 18:00:26 2025
    On 2025-03-08, Michael S <[email protected]> wrote:
    Cygwin is clever. They managed to get poll/select working on pipes,
    which is something Microsoft still cannot manage on native Windows.

    cygwin is very slow.

    Cygwin as a whole isn't slow, but it has slow filesystem namespace
    access. Such is life. There are reasons for it and it's not easy to fix.

    For instance, there are situations in Windows in which a file foo.exe
    and foo must be considered the same file. Or foo.lnk and foo.
    Cygwin has to be on the lookout for these situations. That's the
    30 second summary.

    And user interface is significantly inferior
    relatively to msys2/mingw64. Or at least it was in 2018 which happens
    to be the version of cygwin that I am using regularly as part of
    Altera/Intel Nios2 SDK.
    For me the speed and UI convinience are far more important than better emulation of obscure POSIX features which is probably important only
    for programs that I would not want to run regardless.

    Almost any/every program you'd ever port to Windows with MinGW64
    is going to be a POSIX program, which will get a better, more detailed treatment under Cygwin.

    For instance programs which use POSIX termios to put the terminal into
    raw mode and use ANSI escape sequences to control the console compile
    and run under Cygwin. That's like anything which uses a line editing
    library like Libedit or Linenoise.

    Cygwin also has a little known secret weapon: the Cygnal project;
    check my signature.

    With Cygnal you can compile programs on Cygwin in the normal way and
    then deploy them as native applications which work with normal Windows
    paths and drive letters, use a normal semicolon-separated PATH variable,
    have a HOME variable that points to your Windows user profile, and popen
    and system functions that use cmd.exe not /bin/sh ...
    Yet all the POSIX stuff is there.

    All you do is bundle your executable with cygwin1.dll from
    Cygnal rather than the cygwin1.dll from your Cygwin.

    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @[email protected]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to Michael S on Sun Mar 9 17:24:15 2025
    Michael S <[email protected]> writes:
    On Sun, 9 Mar 2025 02:30:37 -0000 (UTC)
    Lawrence D'Oliveiro <[email protected]d> wrote:

    On Sun, 9 Mar 2025 01:26:26 +0200, Michael S wrote:
    =20
    cygwin is very slow. =20
    =20
    I=E2=80=99m sure it is. ;)
    =20
    For me the speed and UI convinience are far more important than
    better emulation of obscure POSIX features which is probably
    important only for programs that I would not want to run
    regardless. =20
    =20
    Unfortunately select/poll are a key part of efficient event-driven=20
    programming. In the 1990s (the heyday of Windows NT) they tried to
    handle all of this with threads, only to discover that, unless you
    were doing something heavily CPU-bound, the programming complexity
    just wasn=E2=80=99t worth it.

    select/poll is the one way to do event-driven programming.
    There are other ways. In particular, under Windows you can
    simultaneously wait for multiple objects with API that is called...
    Surprise! WaitForMultipleObjects.

    Inherited, no doubt from VMS via Dave Cutler.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Michael S on Sun Mar 9 21:48:31 2025
    On Sun, 9 Mar 2025 11:28:07 +0200, Michael S wrote:

    select/poll is the one way to do event-driven programming.

    Yes it is.

    There are other ways.

    But you just said ...

    In particular, under Windows you can simultaneously wait for
    multiple objects with API that is called... Surprise!
    WaitForMultipleObjects.

    So, just select/poll under another name, then. It really is “the one way
    to do event-driven programming”. Only with the usual Windows approach of added clunkiness.

    Yes, it does not work directly with anonymous files. But anonymous file
    can be treated as a special version of named pipe and then it does work.

    I don’t think that makes sense. Otherwise the problem wouldn’t exist.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to bart on Sun Mar 9 21:54:15 2025
    On Sun, 9 Mar 2025 12:16:56 +0000, bart wrote:

    It's more likely that they don't even think about it.

    Feel free to supply the thinking you think (heh) is missing. It’s all Open Source, after all.

    They only get vocal when it is necessary to build on a non-Unix
    environment and complain that it is rubbish because all that baggage is missing.

    No, you were the one complaining about not being able to get a build to
    work on Windows. And this for a package which is known to build on
    Windows.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Michael S on Sun Mar 9 21:52:14 2025
    On Sun, 9 Mar 2025 11:43:36 +0200, Michael S wrote:

    Pay attention that all this slow, complicated 'configure' business
    didn't originate on Windows.

    And it doesn’t work well on Windows, anyway.

    It was invented in order to cover variety of Unixen. Which (variety)
    no longer exists, but religious 'free software' people like to
    pretend that it is still relevant and continue to use configure.

    If it were purely a pretense, then it would be easy enough to devise a
    patch to get rid of all the unnecessary machinery and simplify the build.

    The saying with Open Source is: “many eyes make all bugs shallow”. And overcomplicated ways of doing things count as bugs, too.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Lawrence D'Oliveiro on Sun Mar 9 22:59:22 2025
    On 09/03/2025 21:54, Lawrence D'Oliveiro wrote:
    On Sun, 9 Mar 2025 12:16:56 +0000, bart wrote:

    It's more likely that they don't even think about it.

    Feel free to supply the thinking you think (heh) is missing. It’s all Open Source, after all.

    They only get vocal when it is necessary to build on a non-Unix
    environment and complain that it is rubbish because all that baggage is
    missing.

    No, you were the one complaining about not being able to get a build to
    work on Windows.

    A build originating on Unix systems.

    And this for a package which is known to build on
    Windows.

    It has been known to. But as I showed it doesn't always work.

    But, when I eliminate the makefile nonsense, it often does work, more
    simply and more quickly. However I need to hunt down the basic info
    needed (WHICH C FILES DO I HAVE TO SUBMIT TO THE COMPILER? It's not
    hard!), because that information is usually buried inside makefiles.

    That is, when makefiles even exist, and are not synthesised by yet
    another layer of complexity.

    The way I see it is that you guys would be lost without the hand-holding provided by your environment.

    Suppose I were to pose a challenge: take a project, in C, that normally
    relies on makefiles, and find out how it could be built using ONLY a C compiler, and the necessary .c and .h files.

    Think you could do it, or is that just too hard?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Chris M. Thomasson on Mon Mar 10 01:39:00 2025
    On Sun, 9 Mar 2025 16:50:22 -0700, Chris M. Thomasson wrote:

    On 3/8/2025 6:30 PM, Lawrence D'Oliveiro wrote:

    On Sun, 9 Mar 2025 01:26:26 +0200, Michael S wrote:

    cygwin is very slow.

    I’m sure it is. ;)

    For me the speed and UI convinience are far more important than
    better emulation of obscure POSIX features which is probably
    important only for programs that I would not want to run
    regardless.

    Unfortunately select/poll are a key part of efficient event-driven
    programming. In the 1990s (the heyday of Windows NT) they tried to
    handle all of this with threads, only to discover that, unless you
    were doing something heavily CPU-bound, the programming complexity
    just wasn’t worth it.

    IOCP on WinNT 4.0. Well, I used to use it a lot. Worked well. Way back
    in early 2000's.

    https://learn.microsoft.com/en-us/windows/win32/fileio/i-o-completion-ports

    Same limitation: note they mention named pipes, but not unnamed ones.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Chris M. Thomasson on Mon Mar 10 01:40:53 2025
    On Sun, 9 Mar 2025 16:55:24 -0700, Chris M. Thomasson wrote:

    On 3/8/2025 2:59 PM, Lawrence D'Oliveiro wrote:

    On Sat, 8 Mar 2025 13:14:00 -0800, Chris M. Thomasson wrote:

    Have you ever played around with vcpkg? Works pretty darn good with
    MSVC:

    Only mentions about 2500 library dependencies that they will manage for
    you.

    I suppose that’s all that’s available on Windows ...

    Better than zero? ;^D

    Beggars can’t be choosers, eh. ;)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Chris M. Thomasson on Mon Mar 10 06:20:25 2025
    On Sun, 9 Mar 2025 19:18:55 -0700, Chris M. Thomasson wrote:

    On 3/9/2025 6:39 PM, Lawrence D'Oliveiro wrote:

    On Sun, 9 Mar 2025 16:50:22 -0700, Chris M. Thomasson wrote:

    IOCP on WinNT 4.0. Well, I used to use it a lot. Worked well. Way back
    in early 2000's.

    https://learn.microsoft.com/en-us/windows/win32/fileio/i-o-completion-ports >>
    Same limitation: note they mention named pipes, but not unnamed ones.

    No pipes. Sockets.

    Named pipes and sockets are different things, even in Windows.

    Now, iirc, the client version limited IOCP to only four? in flight, concurrent, TransmitFile calls at a time? The server version did no
    do that...

    Don’t you just love how Microsoft takes advantage of every opportunity
    to nickle-and-dime its customers to death ...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Mon Mar 10 08:12:18 2025
    On Sun, 9 Mar 2025 11:43:36 +0200
    Michael S <[email protected]> wibbled:
    On Sun, 9 Mar 2025 08:47:28 -0000 (UTC)
    [email protected] wrote:
    So according to you, this should be a piece of piss. OK, I'll try
    it:

    I'm not really interested in your straw men.



    Pay attention that all this slow, complicated 'configure' business
    didn't originate on Windows. It was invented in order to cover variety
    of Unixen. Which (variety) no longer exists, but religious 'free

    I know. "configure" used to be fairly rare now its everywhere and I hate it. Often it doesn't work anyway which makes me wonder wtf is the point.

    portable between 4 operation systems and 2 CPU architectures that still

    TBH unless you're writing embedded assembler, doing some kind of direct byte manupulation in words or other code which cares about endian-ness then application C code should be CPU agnostic.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Waldek Hebisch@21:1/5 to bart on Mon Mar 10 10:58:09 2025
    bart <[email protected]> wrote:

    I think nobody does. There's always been some sort of mystique
    surrounding 'gcc' on Windows.

    'MinGW' supposedly 'Minimalist Gnu on Windows'. In that case I wouldn't
    like to see the full-scale one..

    "Minimalist" is not about size of the compiler. Rather, it is
    about possible support routines. For "hosted implementation" C
    mandates presence of C library and there is a lot of functions
    not in C standard, but included in libraries of C compilers.
    There is also question of operating system support, complicated
    by fact that Windows is different than other systems. Cygwin
    solved those issues by offering Posix emulation and a sizable
    collection os libraries. MinGW is minimalist in the sense
    that it provides very little own libraries and mainly uses
    what is provide by Windows.

    To put it differenly, you could compile program in one computer
    and get relatively small program which runs OK on different
    Windows machines because libraries it needs are already present.
    This is quite different compared to Cygwin, where you need to
    install Cygwin libraries before normal Cygwin program can run
    (I write about normal programs because actual compiler in
    Cygwin and Mingw used to be the same and with some tweaks one
    could use Cygwin compiler to produce MinGW execuatbles).

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Waldek Hebisch@21:1/5 to bart on Mon Mar 10 11:45:30 2025
    bart <[email protected]> wrote:
    On 08/03/2025 15:51, [email protected] wrote:
    On Sat, 8 Mar 2025 14:09:17 +0000
    bart <[email protected]> gabbled:
    My idea is similar to supplying binaries, but replacing each binary
    file with one C source file. This now needs a C compiler to turn into
    a binary, but nothing else. No configure, no makefiles, virtually no
    special options, no special compiler needed and no special version.

    So instead of just typing "make" the user has to know how to invoke the
    compiler, possibly with certain switches set. Not sure how thats any
    better.

    I've just typed 'make' in a Windows prompt. Nothing happens ('command
    not recognised'). That's a good start!

    If I look at my gcc binaries, there's a program called
    'mingw32-make.exe'. Maybe that's the one. However, build instructions
    call for 'make' so it will immediately fail.

    What Make does is take a mountain of complexity called a 'makefile',
    which is special kind of arcane language, and tries to run it. It might
    work, it might fail immediately, or it might grind away for several
    minutes and then it stops.

    Why I am aiming for is to be able to just type:

    gcc prog.c

    But apparently that won't do. Some smart-arses will point out that
    that's more typing than 'make'. Others, less smart, don't actually know
    how to directly invoke a compiler like this.

    Now, it's been a while since I've argued about makefiles and all their
    woes. But maybe things have changed. If I copy that file above to
    'make.exe', and navigate to a folder full of Lua source files, I see it
    also has this:

    c:\luac>dir make*
    02/02/2024 13:18 7,722 Makefile

    So according to you, this should be a piece of piss. OK, I'll try it:

    c:\luac>make
    makefile:103: target 'AIX' given more than once in the same rule
    makefile:117: target 'FreeBSD' given more than once in the same rule
    Guessing `uname`
    make[1]: Entering directory 'c:/luac'
    makefile:103: target 'AIX' given more than once in the same rule
    makefile:117: target 'FreeBSD' given more than once in the same rule
    make[1]: *** No rule to make target '`uname`'. Stop.
    make[1]: Leaving directory 'c:/luac'
    make: *** [makefile:101: guess] Error 2

    That went well! Maybe this is the wrong one, and I've been messing about
    with these files. So I download a fresh Lua versiom as a .tar.gz file
    and install it. Yes, there were in fact two makefiles, one in a higher directory level:

    c:\ll\lua-5.4.7>dir
    13/06/2024 22:16 <DIR> .
    08/03/2025 16:15 <DIR> ..
    13/06/2024 22:16 <DIR> doc
    08/05/2024 21:47 3,150 Makefile
    13/06/2024 22:16 151 README
    13/06/2024 22:15 <DIR> src

    I now follow the instructions from here:
    https://www.lua.org/download.html and do this:

    c:\ll\lua-5.4.7>make all test
    make[1]: Entering directory 'c:/ll/lua-5.4.7/src'
    makefile:101: target 'AIX' given more than once in the same rule
    makefile:115: target 'FreeBSD' given more than once in the same rule
    .....
    make[2]: Leaving directory 'c:/ll/lua-5.4.7/src'
    make[1]: *** [makefile:99: guess] Error 2
    make[1]: Leaving directory 'c:/ll/lua-5.4.7/src'
    make: *** [makefile:55: guess] Error 2

    Oh dear, that hasn't worked either.

    Hmm, it AFAICS worked. That is you wanted build failure and you
    got build failure. Of course you are an export on building
    Windows programs and have your tricks. In this case a simple
    one, like not having MinGW tools in the patch probably will do.

    Or I could just build Lua the easy way:

    c:\ll\lua-5.4.7\src>del luac.c
    c:\ll\lua-5.4.7\src>gcc *.c -o lua
    c:\ll\lua-5.4.7\src>lua
    Lua 5.4.7 Copyright (C) 1994-2024 Lua.org, PUC-Rio
    >

    This works! No crappy makefiles needed. Here I happened to know it
    involves compiling 33 of the 34 C files supplied (luac.c is for embedded
    I think).

    Not reading instructions help in writing newsgroup post. If you
    read documentation you would see that build process is supposed to
    build 3 related products: Lua library, Lua interpreter and Lua
    compiler (whatever the last things means). The is explicit list
    of files giving you the Lua library. Link it with one extra file
    (that is 'lua.c') and you get Lua interpteter. Link the library
    with 'luac.c' and you get the compiler.

    Documentation also mention explicit targets, like 'make mingw'.
    But you probably arranged things so that it fails too.

    The makefiles are full of useless dependency info. Lua is a small
    program, and I just want to use it, not develop it.

    AFAICS you want something to compile with your compiler and
    claim that make fails. When I needed to build programs on
    Windows make usually worked. Of course, I had to install
    dependencies first. I had to look at the PATH, in particular
    watch out for Borland 'make' which was normally quite early
    in the path, but Borland 'make' was to crappy and unable to
    handle most Makefiles. I am not sure if I needed to do this
    on Windows, but on some systems I needed to correct sources
    to get working program. For such cases having all development
    info was quite useful.

    You miss important point of sources: having sources and free
    licence means that anybody can develop program further. In
    particular people can do simple customization or bug fixes.
    So if I find program useful, it is my decision if I want
    to do work needed to keep it running on my system or port to
    a different system. I case of binaries it is usually unfeasible
    to fix bugs or port it (people use emulators, but this has
    limitations). And if program is useful enough there is good
    chance that sombody else already did the work.

    BTW: I did have trouble with some Windows sources, and main
    trouble was that source was incomplete or missed some needed
    changes. That is trouble was due to people who did not care
    about distributing sources (but should have cared, as those cases
    were Windows adaptions of GPL-ed things).

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Waldek Hebisch@21:1/5 to Michael S on Mon Mar 10 13:00:57 2025
    Michael S <[email protected]> wrote:

    Pay attention that all this slow, complicated 'configure' business
    didn't originate on Windows. It was invented in order to cover variety
    of Unixen. Which (variety) no longer exists, but religious 'free
    software' people like to pretend that it is still relevant and continue
    to use configure.

    There is a lot of variety on "single" system, that is Linux.
    Supporting this variety is important, it allows experimentation
    and fast evolution.

    And there are "legacy systems", significant fraction of which runs
    proprietary Unices. There are people supporting them, money
    is spent, etc. So there is practial use, and as long as
    there are people spending effort to make programs run on
    them it makes sense to keep support in configure and
    similar tools.

    I understand commercial attitude, where loosing %1 of the maket
    is normally deemed not worth of developement cost of supporting
    rare system. And related attitude that unknow bugs do not
    matter (=> only bugs that customers report are worth fixing).

    For free software situation is different: specific support for
    rare systems is done by people using those system. The "cost"
    for mainstream systems is needing more generality and possibly
    using compatiblity constructs. Generality has its costs, but
    usually leads to better architecture in long time. Some
    compatiblity constructs do complicate code. OTOH rare systems
    help in finging bugs which may be present on all systems, but
    features of less usual systems can make them more visible.

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael S@21:1/5 to Lawrence D'Oliveiro on Mon Mar 10 15:20:00 2025
    On Sun, 9 Mar 2025 21:48:31 -0000 (UTC)
    Lawrence D'Oliveiro <[email protected]d> wrote:

    On Sun, 9 Mar 2025 11:28:07 +0200, Michael S wrote:

    select/poll is the one way to do event-driven programming.

    Yes it is.

    There are other ways.

    But you just said ...

    In particular, under Windows you can simultaneously wait for
    multiple objects with API that is called... Surprise! WaitForMultipleObjects.

    So, just select/poll under another name, then.

    Similar to poll(), yes. Not so similar to super-ugly select(). I hope
    that Unix people stopped using select in new programs two or more
    decades ago.
    But WaitForMultipleObjects can do things that poll can not, like
    waiting on semaphore or on event or on thread (for completion, which
    POSIX people, in their eternal fondness for idiotic names call 'join').
    OTOH, WaitForMultipleObjects can not directly wait on sockets, because
    in Win32 socket is not a "kernel object". So, in order to wait on
    socket with WFMO one has to associate socket with event, which is done
    by means of WSAEventSelect. Yes, the name of the API is bad. UNIX/POSIX
    does not have monopoly on stupid names.

    It really is “the one
    way to do event-driven programming”. Only with the usual Windows
    approach of added clunkiness.


    As mentioned above, it depends on what you want to do. Sometimes UNIX
    way is simpler, sometimes it's the other way around.

    As to "the one way", you yourself mentioned substantially different way
    in your post here several weeks ago - stackless co-routines. Even if
    ends up the same under the hood, it appears quite different from
    perspective of application programmer. Since we are in c.l.c I
    should say that by now this way is not available in C.

    Yet another different way is goroutines. They feel like threads but
    lighter under the hood. I heard that similar thing was added to latests
    Java. Since we are in c.l.c I should say that by now this way is
    also not available in C. And, unlike in case of stackless co-routines,
    I don't expect that it would be added to Standard C in foreseeable
    future.

    Yes, it does not work directly with anonymous files. But anonymous
    file can be treated as a special version of named pipe and then it
    does work.

    I don’t think that makes sense. Otherwise the problem wouldn’t exist.

    I don't know where was a catch. As a matter of fact, cygwin people found solution, so the problem was soluble.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Waldek Hebisch@21:1/5 to Lawrence D'Oliveiro on Mon Mar 10 14:39:27 2025
    XPost: comp.lang.python

    In comp.lang.c Lawrence D'Oliveiro <[email protected]d> wrote:
    On Thu, 6 Mar 2025 19:21:45 -0000 (UTC), Waldek Hebisch wrote:

    Per platform Makefile-s do not scale when one wants to support multiple
    system and multiple configurations (there is exponential growth of
    possible combinations). And even of single configuration for supposedly
    single system like Linux there are troubles.
    In one project there was someting like 20 Makefile.linux_x files where x
    represented one Linux flavour. Yet regularly somebody would come and
    say: "build fails on my Linux x.y.z". If enough information was
    provided new Makefile was added, or possibly some similar Makefile was
    modified to cover more cases.

    Can you offer more details on the project in question? I ask because
    there are things that can be done in GNU Makefiles to deal more
    dynamically with environmental differences in some simpler cases,
    without resorting to a full-on meta-build system like Autotools or
    CMake, and perhaps the maintainers of this project aren’t aware of
    that.

    I guess that one could do configure-like processing inside a
    Makefile generating next stage Makefile. Autoconf offers
    ready-to-use functionalty, like a bunch of sanity checks
    or check for X libraries. There are several subdirectories
    each containing its own Makefile, propagating info via substitution
    + fixed makefile fragments looks esier than Makfile includes
    + conditionals that would be required in make-only solution.

    If you look at scale, there is something like 2000 source
    file in various languages (including about 50000 wc lines
    of C). About 450000 wc lines total, including tests and
    documentation (but documentation requires rather involved
    build process). About 140 MB generated files.

    Some currently suported features:
    - using onf of 5 different non-C compilers, each having diferent
    extentions for compiled files and needing different way of
    creating executable
    - matching linking options (shared versus static) and needed
    libraries to used compiler
    - blacklisting buggy compiler versions
    - optionally including/excluding part of functionality
    - optinally using machine independent pre-build files
    (saves compile time for users building from source)

    All this requires some code. It is possible that the work
    could be done with less code. However, history suggest
    conservative approach. Shortening the whole story, this
    is largish formerly propritary program that was released
    as open source. First 6 years of open source developement
    was mainly spend on build issues. Nontrivial part on
    build system, parts on improving portablity of code,
    changing tools, etc. Current autoconf based build system
    probably represent about 1 man year of developement effort.
    During last 15 years build system worked requiring small
    maintanence effort. History indicates that changing build
    system at least requires some non-trivial effort. And
    there is ample opportunity for troubles. So simply,
    why spend effort on replacing something that works?

    Let me mention due to disagreemnts (including build system,
    but not only) project forked. There is or maybe was (in last
    few years it made no release) fork which does not use autoconf
    and depends on multiple configuration files. It offered
    less flexibility and still regularly had build failures
    due to changing Linux configurations.

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Mon Mar 10 15:11:14 2025
    On Mon, 10 Mar 2025 15:20:00 +0200
    Michael S <[email protected]> wibbled:
    Similar to poll(), yes. Not so similar to super-ugly select(). I hope
    that Unix people stopped using select in new programs two or more
    decades ago.

    Nothing wrong with select if you're not multiplexing hundreds of file descriptors. Does the job.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to [email protected] on Mon Mar 10 17:12:06 2025
    [email protected] writes:
    On Mon, 10 Mar 2025 15:20:00 +0200
    Michael S <[email protected]> wibbled:
    Similar to poll(), yes. Not so similar to super-ugly select(). I hope
    that Unix people stopped using select in new programs two or more
    decades ago.

    Nothing wrong with select if you're not multiplexing hundreds of file >descriptors. Does the job.


    The primary constraint for select(2) is not the _number_ of files
    that can be selected amongst (although that _is_ a constraint),
    but rather the largest file descriptor number is limited by the
    select(2) bitmap interface (FD_SETSIZE not only defines the number
    of file descriptors that can be passed, but also the highest
    valued file descriptor that can be passed). poll(2) has no
    such limits.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Waldek Hebisch on Mon Mar 10 16:36:07 2025
    On 10/03/2025 10:58, Waldek Hebisch wrote:
    bart <[email protected]> wrote:

    I think nobody does. There's always been some sort of mystique
    surrounding 'gcc' on Windows.

    'MinGW' supposedly 'Minimalist Gnu on Windows'. In that case I wouldn't
    like to see the full-scale one..

    "Minimalist" is not about size of the compiler. Rather, it is
    about possible support routines. For "hosted implementation" C
    mandates presence of C library and there is a lot of functions
    not in C standard, but included in libraries of C compilers.
    There is also question of operating system support, complicated
    by fact that Windows is different than other systems. Cygwin
    solved those issues by offering Posix emulation and a sizable
    collection os libraries. MinGW is minimalist in the sense
    that it provides very little own libraries and mainly uses
    what is provide by Windows.

    I still don't get this stuff.

    I get the impression that a port of gcc to Windows is not simply about
    building C programs, but building C programs that use a lot of features
    from Linux.

    If so, then that's the wrong approach. There are various lesser
    compilers which know nothing about mingw or posix of anything of the
    sort. (For example, lccwin32, DMC, PellesC, I think Tiny C; I can't
    speak for MSVC.)


    To put it differenly, you could compile program in one computer
    and get relatively small program which runs OK on different
    Windows machines because libraries it needs are already present.
    This is quite different compared to Cygwin, where you need to
    install Cygwin libraries before normal Cygwin program can run
    (I write about normal programs because actual compiler in
    Cygwin and Mingw used to be the same and with some tweaks one
    could use Cygwin compiler to produce MinGW execuatbles).


    I'm not interested in whatever Cygwin or Mingw are about. If I were to
    use libraries not part of the OS, then it would be ones like SDL2 to get interesting things done. Not try and emulate bits of Linux that I'd
    never heard of.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to bart on Mon Mar 10 17:25:42 2025
    bart <[email protected]> writes:
    On 10/03/2025 10:58, Waldek Hebisch wrote:
    bart <[email protected]> wrote:

    I think nobody does. There's always been some sort of mystique
    surrounding 'gcc' on Windows.

    'MinGW' supposedly 'Minimalist Gnu on Windows'. In that case I wouldn't
    like to see the full-scale one..

    "Minimalist" is not about size of the compiler. Rather, it is
    about possible support routines. For "hosted implementation" C
    mandates presence of C library and there is a lot of functions
    not in C standard, but included in libraries of C compilers.
    There is also question of operating system support, complicated
    by fact that Windows is different than other systems. Cygwin
    solved those issues by offering Posix emulation and a sizable
    collection os libraries. MinGW is minimalist in the sense
    that it provides very little own libraries and mainly uses
    what is provide by Windows.

    I still don't get this stuff.

    Sure you do. You just like to complain.


    I get the impression that a port of gcc to Windows is not simply about >building C programs, but building C programs that use a lot of features
    from Linux.

    C was written for Unix. A large amount of existing C requires
    unix semantics. It would be pointless to port gcc to windows without supporting the vast majority of existing C code.


    If so, then that's the wrong approach. There are various lesser
    compilers which know nothing about mingw or posix of anything of the
    sort. (For example, lccwin32, DMC, PellesC, I think Tiny C; I can't
    speak for MSVC.)

    Nobody uses those "lesser" compilers for real-world application
    development.

    Why do you care? Use your own compiler or use MSVC if you must
    use windows.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Scott Lurndal on Mon Mar 10 17:46:03 2025
    On 10/03/2025 17:25, Scott Lurndal wrote:
    bart <[email protected]> writes:
    On 10/03/2025 10:58, Waldek Hebisch wrote:
    bart <[email protected]> wrote:

    I think nobody does. There's always been some sort of mystique
    surrounding 'gcc' on Windows.

    'MinGW' supposedly 'Minimalist Gnu on Windows'. In that case I wouldn't >>>> like to see the full-scale one..

    "Minimalist" is not about size of the compiler. Rather, it is
    about possible support routines. For "hosted implementation" C
    mandates presence of C library and there is a lot of functions
    not in C standard, but included in libraries of C compilers.
    There is also question of operating system support, complicated
    by fact that Windows is different than other systems. Cygwin
    solved those issues by offering Posix emulation and a sizable
    collection os libraries. MinGW is minimalist in the sense
    that it provides very little own libraries and mainly uses
    what is provide by Windows.

    I still don't get this stuff.

    Sure you do. You just like to complain.


    No, I don't. I really have no idea about 'MingW' other than it's a term
    that gets thrown around whenever gcc on Windows comes up.



    I get the impression that a port of gcc to Windows is not simply about
    building C programs, but building C programs that use a lot of features >>from Linux.

    C was written for Unix.

    So what was <name any other language> written for?


    A large amount of existing C requires
    unix semantics. It would be pointless to port gcc to windows without supporting the vast majority of existing C code.

    It's a language. It's not supposed to be tied to an OS. (Even though
    it's hard to prise Unix and C apart on that platform.)

    Is it not conceivable that people might want to use a lower level
    language on Windows for applications that have nothing to do with Unix?

    Or do you believe Windows programmers should use Visual Basic or C#?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to Scott Lurndal on Mon Mar 10 18:05:28 2025
    On 2025-03-10, Scott Lurndal <[email protected]> wrote:
    [email protected] writes:
    On Mon, 10 Mar 2025 15:20:00 +0200
    Michael S <[email protected]> wibbled:
    Similar to poll(), yes. Not so similar to super-ugly select(). I hope >>>that Unix people stopped using select in new programs two or more
    decades ago.

    Nothing wrong with select if you're not multiplexing hundreds of file >>descriptors. Does the job.


    The primary constraint for select(2) is not the _number_ of files
    that can be selected amongst (although that _is_ a constraint),
    but rather the largest file descriptor number is limited by the
    select(2) bitmap interface (FD_SETSIZE not only defines the number
    of file descriptors that can be passed, but also the highest
    valued file descriptor that can be passed). poll(2) has no
    such limits.

    Indeed!

    I think it would be fair to say that select was designed with
    these assumptions:

    1. The program's open file descriptors will be tightly clustered
    next to zero, with few gaps.

    2. The program will be polling almost all of those descriptors.

    Scenarios were not envisioned such as that the program will have
    lots of threads, many of which want to poll a small number of
    descriptors allocated in their own context.

    (A similar thing can be done with classic forked children: but forked
    children can close all descriptors they don't care about, and compress
    the ones they care about to be clustered close to zero.)

    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @[email protected]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Waldek Hebisch on Mon Mar 10 17:33:50 2025
    On 10/03/2025 11:45, Waldek Hebisch wrote:
    bart <[email protected]> wrote:

    Oh dear, that hasn't worked either.

    Hmm, it AFAICS worked. That is you wanted build failure and you
    got build failure.

    In last year's thread I did an experiment with I think 5 projects, and
    most failed to build using the provided tools.

    In the case of Lua, there was an additional complication in that one lot
    of online sources was incomplete (missing the top directory layer).
    However what was provided still had a makefile, to confuse matters.

    But even with the full sources, there was a catch - see below.

    Of course you are an export on building
    Windows programs and have your tricks. In this case a simple
    one, like not having MinGW tools in the patch probably will do.

    It will nearly always do. In the case of LIBJPEG, there are 5 binaries
    to build including the two main ones (encode and decode). Each of those comprises 8 .c files, plus they share 46 other .c files.

    The official makefile (the fallback one as there were lots!), built
    those 46 into a .a archive, but which was then /statically/ linked into
    each executable, so it didn't save any space.

    I had to get it working once via the makefile, and arrange to capture
    the shell commands used in order to determine all this.

    From those, I was able to create two @ files so that I could build only
    using a compiler. Each file simply lists the 54 files that are needed,
    and is 4% the size of the makefile. (They can also use a shared @ file
    to avoid repeating the shared files.)

    Using tcc, each program builds from source in 0.3 seconds using such a
    list, even though 46 source files are processed twice.

    This works! No crappy makefiles needed. Here I happened to know it
    involves compiling 33 of the 34 C files supplied (luac.c is for embedded
    I think).

    Not reading instructions help in writing newsgroup post. If you
    read documentation you would see that build process is supposed to
    build 3 related products: Lua library, Lua interpreter and Lua
    compiler (whatever the last things means). The is explicit list
    of files giving you the Lua library. Link it with one extra file
    (that is 'lua.c') and you get Lua interpteter. Link the library
    with 'luac.c' and you get the compiler.

    I always build lua.exe. I mentioned that luac.c was for embedded, or
    something.

    Documentation also mention explicit targets, like 'make mingw'.
    But you probably arranged things so that it fails too.


    Actually, looking at the docs more carefully, it seems the makefiles
    only work for Linux.

    For Windows you are on you own. But at least it does list the files
    involved.

    However, I thought the point of 'make' was that you just typed 'make'
    and it goes and builds your program with no further input. Here, the
    makefile could have provided a helpful message saying that Windows was
    not supported.


    The makefiles are full of useless dependency info. Lua is a small
    program, and I just want to use it, not develop it.

    AFAICS you want something to compile with your compiler and
    claim that make fails. When I needed to build programs on
    Windows make usually worked. Of course, I had ....

    So they usually worked after you fixed all the problems? OK!

    You miss important point of sources: having sources and free
    licence means that anybody can develop program further.

    There are two things you may want to do when building sources:

    (1) You want to do further development as you say

    (2) You simply want to build a working binary and have no interest in
    anything else.

    Those two requirements are utterly different, yet most developers who
    provide sources ignore that, and simply provide the entire directory
    tree and a hundred other things that might be needed for (1).

    For (2):

    * You don't need a sprawling directory tree; files can be flattened into
    one folder

    * (You don't need separate files; they can be flattened into one file
    via various tools and scripts. In my case, I do that via a transpiler.
    For C, this provides the opportunity for whole-program optimisation.)

    * You don't need makefiles with tons of dependency info. This stuff is
    for incremental compilation, but here we are only building once, so it
    has to be done from scratch anyway. It is not time-critical.

    * You might still need to orchestrate the building of multiple binaries,
    or to install the result, but for this there are better scripting
    languages than 'make'. Even C will do, for which the user will already
    have a compiler. (IMV installation is a quite different process from
    building.)

    * If this is for a known platform, then the process can be streamlined
    further

    Examples of (2) for me are GMP and LIBFFI libraries which are a
    nightmare to build on Windows.


    In
    particular people can do simple customization or bug fixes.
    So if I find program useful, it is my decision if I want
    to do work needed to keep it running on my system or port to
    a different system. I case of binaries it is usually unfeasible
    to fix bugs or port it (people use emulators, but this has
    limitations). And if program is useful enough there is good
    chance that sombody else already did the work.

    BTW: I did have trouble with some Windows sources, and main
    trouble was that source was incomplete or missed some needed
    changes.

    You really want to fix things in gcc for example by messing with the
    source files? I think we establshed that there were at least 79,000 .c
    files. (Better set aside the rest of the decade to get familiar with it!)


    That is trouble was due to people who did not care
    about distributing sources (but should have cared, as those cases
    were Windows adaptions of GPL-ed things).

    I provide source code for reason (2) above. This is likely to be
    amalgamated into one file, or transpiled to one C file

    For (1), I can provide original source files, but building source in my personal language is problematical. For a start, you need a binary to
    get started, but people don't like binaries because of AV issues or lack
    of trust.

    (They generally work for mainstream products on Windows; presumably the providers are whitelisted by MS, even if they are not in the MS Store.)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to bart on Mon Mar 10 18:00:39 2025
    On 2025-03-10, bart <[email protected]> wrote:
    On 10/03/2025 10:58, Waldek Hebisch wrote:
    bart <[email protected]> wrote:

    I think nobody does. There's always been some sort of mystique
    surrounding 'gcc' on Windows.

    'MinGW' supposedly 'Minimalist Gnu on Windows'. In that case I wouldn't
    like to see the full-scale one..

    "Minimalist" is not about size of the compiler. Rather, it is
    about possible support routines. For "hosted implementation" C
    mandates presence of C library and there is a lot of functions
    not in C standard, but included in libraries of C compilers.
    There is also question of operating system support, complicated
    by fact that Windows is different than other systems. Cygwin
    solved those issues by offering Posix emulation and a sizable
    collection os libraries. MinGW is minimalist in the sense
    that it provides very little own libraries and mainly uses
    what is provide by Windows.

    I still don't get this stuff.

    I get the impression that a port of gcc to Windows is not simply about building C programs, but building C programs that use a lot of features
    from Linux.

    That is basically right. These tools can be used to write a Windows-only program from scratch, but they are oriented toward cross-platform.

    If so, then that's the wrong approach. There are various lesser
    compilers which know nothing about mingw or posix of anything of the
    sort. (For example, lccwin32, DMC, PellesC, I think Tiny C; I can't
    speak for MSVC.)

    What is the wrong approach though? Say you have a large program
    that is oriented toward POSIX or Linux, and you'd like to get
    it working on Windows with as much functionality as possible.

    Now what?

    (Note that the requirements in such a situation can easily rule out
    MinGW or MinGW64, too.)


    To put it differenly, you could compile program in one computer
    and get relatively small program which runs OK on different
    Windows machines because libraries it needs are already present.
    This is quite different compared to Cygwin, where you need to
    install Cygwin libraries before normal Cygwin program can run
    (I write about normal programs because actual compiler in
    Cygwin and Mingw used to be the same and with some tweaks one
    could use Cygwin compiler to produce MinGW execuatbles).

    I'm not interested in whatever Cygwin or Mingw are about. If I were to
    use libraries not part of the OS, then it would be ones like SDL2 to get interesting things done. Not try and emulate bits of Linux that I'd
    never heard of.

    Obviously, someone with a view toward creating a cross-platform program
    which can be used on free operating systems would probably evaluate the situation a bit differently. They would have to be prepared to become
    familiar with some bits they have not heard of.

    It used to be that you would have to write significant parts of
    a cross-platform application twice: for POSIX and Win32.

    There are ways to reduce the work. You can have some abstraction which
    hides both platforms. You can make one platform look like the other:
    have a POSIX implementation on Windows, or Win32 on POSIX.

    If you're mostly a Windows programs who's not heard of various bits of
    Linux, but you'd like your stuff usable by Linux users, you can probably
    just, oh, validate that your stuff runs under Wine: https://winehq.org

    Wine is in some ways the "opposite" of what we have been talking about
    in these threads. With, say, Cygwin, I can port a POSIX program to
    Windows, without having to are about bits of Windows I've never heard
    of. Wine lets a Windows developer get their program running on one of a
    number of Unix-like operating systems, without caring about bits of them
    they have never heard of. Cygwin translates POSIX library funtion calls
    into Win32. Wine translates Win32 calls into POSIX.

    If you don't like either option, you can use something else: some
    OS abstraction layer, and so on.

    The SDL library you mention is such a layer, just for graphics and
    interactive input.

    Parts of the ISO C library provide a basic OS abstraction layer:
    like malloc for memory, and stdio for file and other I/O.

    If we want to write some game or graphics demo, which needs keyboard
    or mouse input, pixel output, and needs to read and write some files,
    we can probably get away with SDL, plus just <stdio.h>: fopen, fread,
    getc, ...

    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @[email protected]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to bart on Mon Mar 10 18:12:27 2025
    bart <[email protected]> writes:
    On 10/03/2025 17:25, Scott Lurndal wrote:


    Or do you believe Windows programmers should use Visual Basic or C#?


    I believe they'd be better off dumping windows completely and switching
    to something else.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to bart on Mon Mar 10 18:15:16 2025
    On 2025-03-10, bart <[email protected]> wrote:
    On 10/03/2025 11:45, Waldek Hebisch wrote:
    bart <[email protected]> wrote:

    Oh dear, that hasn't worked either.

    Hmm, it AFAICS worked. That is you wanted build failure and you
    got build failure.

    In last year's thread I did an experiment with I think 5 projects, and
    most failed to build using the provided tools.

    If you're building cross-platform programs that come from Unix
    environments on Windows, you're probably in for some pain.

    Windows is often treated as a special case. The project developers
    themselves take it on to produce builds for Windows users. There is
    often an assumption that Windows users will just be using the prebuilt binaries.

    The steps to build those binaries might just be something that works on
    their machine. There may be manual steps involved that are not even
    documented.

    Compiling programs for Unixes used to be the same mess. What has changed
    in the last 30 years is the emergence of free software distros which
    do packaging. The main consumers of source code became these distros.

    Authors of free software care that their stuff works with distros,
    and for that they have to make it easy for the package maintainers
    to build their stuff.

    So you have a situation where projects care that their stuff is
    easy to build by people who are packaging it for Debian, Fedora,
    NixOS and whatever else ... we can include Cygwin here! Whenever they
    make a new release, these downstream distros pick it up and take care of packaging it. And then they also have a native Windows port, which they
    take care of packaging themselves. Since there is no downstream package maintainer who has to be able to reproduce the Windows build work,
    someone trying to step in and do that might have various interesting experiences, and might need help from the project.

    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @[email protected]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to Kaz Kylheku on Mon Mar 10 19:26:58 2025
    Kaz Kylheku <[email protected]> writes:
    On 2025-03-10, Scott Lurndal <[email protected]> wrote:
    [email protected] writes:
    On Mon, 10 Mar 2025 15:20:00 +0200
    Michael S <[email protected]> wibbled:
    Similar to poll(), yes. Not so similar to super-ugly select(). I hope >>>>that Unix people stopped using select in new programs two or more >>>>decades ago.

    Nothing wrong with select if you're not multiplexing hundreds of file >>>descriptors. Does the job.


    The primary constraint for select(2) is not the _number_ of files
    that can be selected amongst (although that _is_ a constraint),
    but rather the largest file descriptor number is limited by the
    select(2) bitmap interface (FD_SETSIZE not only defines the number
    of file descriptors that can be passed, but also the highest
    valued file descriptor that can be passed). poll(2) has no
    such limits.

    Indeed!

    I think it would be fair to say that select was designed with
    these assumptions:

    1. The program's open file descriptors will be tightly clustered
    next to zero, with few gaps.

    2. The program will be polling almost all of those descriptors.

    3. Perhaps the underlying operating system under which select was
    initially developed (BSD2?) had a hard NFILE limit which
    matched FD_SETSIZE. V7 had a fixed per-process descriptor table indexed
    by the file descriptor, IIRC.


    I belive poll showed up in AT&T unix around SVR3, if I
    recall correctly.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to Chris M. Thomasson on Mon Mar 10 20:59:16 2025
    On 2025-03-10, Chris M. Thomasson <[email protected]> wrote:
    Fwiw, I only used IOCP with Sockets. ;^o

    I've only used code from IOCCC.

    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @[email protected]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Muttley on Mon Mar 10 21:38:35 2025
    On Mon, 10 Mar 2025 15:11:14 -0000 (UTC), Muttley wrote:

    Nothing wrong with select if you're not multiplexing hundreds of file descriptors. Does the job.

    But it still requires allocating a fixed-length bit array hundreds of
    bytes in size, even if you are only concerned with one or two FDs. And if
    the numbers of those FDs lie beyond the upper limit of the array, you’re stuffed.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Michael S on Mon Mar 10 21:36:49 2025
    On Mon, 10 Mar 2025 15:20:00 +0200, Michael S wrote:

    Similar to poll(), yes. Not so similar to super-ugly select(). I
    hope that Unix people stopped using select in new programs two or
    more decades ago.

    Seems like WaitForMultipleObjects is more similar to select() than
    poll(), though: it has a fixed limit (MAXIMUM_WAIT_OBJECTS) on the
    number of objects you can wait on at once.

    But WaitForMultipleObjects can do things that poll can not, like
    waiting on semaphore or on event or on thread (for completion, which
    POSIX people, in their eternal fondness for idiotic names call
    'join').

    There are actually some straightforward techniques to handle that.

    <https://manpages.debian.org/eventfd(2)> <https://manpages.debian.org/signalfd(2)>

    There are slightly more roundabout ways to do it within vanilla POSIX,
    too. There’s an old technique -- I think invented by Daniel Bernstein
    -- where worker threads can report their termination back to the main
    thread by writing to a pipe. I use that technique here (look! actual C
    code for a change!) <https://gitlab.com/ldo/slow_dbus_server>.

    As to "the one way", you yourself mentioned substantially different way
    in your post here several weeks ago - stackless co-routines. Even if
    ends up the same under the hood, it appears quite different from
    perspective of application programmer.

    It is still built on the exact same underlying poll/select calls --
    that’s the whole point. It allows for interoperability, too. Yes, it
    does make a lot of things easier -- that, too, is part of the point.

    Interesting to see how trying to implement such event loops on Windows
    is far from straightforward. Python has to offer a choice of 2
    different implementations, neither of which quite covers all the bases <https://docs.python.org/3/library/asyncio-eventloop.html#event-loop-implementations>.

    I don't know where was a catch. As a matter of fact, cygwin people
    found solution, so the problem was soluble.

    But not, it seems, by Microsoft ...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Chris M. Thomasson on Mon Mar 10 21:42:15 2025
    On Mon, 10 Mar 2025 14:09:13 -0700, Chris M. Thomasson wrote:

    lol! IOCP is not all that bad... :^) They have an interesting
    function:

    https://learn.microsoft.com/en-us/windows/win32/api/ioapiset/nf-ioapiset-getqueuedcompletionstatusex

    It’s a blocking call:

    This function associates a thread with the specified completion
    port. A thread can be associated with at most one completion port.

    So, no nondeterministic event-loop handling for you ...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to Chris M. Thomasson on Mon Mar 10 21:55:07 2025
    On 2025-03-10, Chris M. Thomasson <[email protected]> wrote:
    On 3/10/2025 2:36 PM, Lawrence D'Oliveiro wrote:
    On Mon, 10 Mar 2025 15:20:00 +0200, Michael S wrote:

    Similar to poll(), yes. Not so similar to super-ugly select(). I
    hope that Unix people stopped using select in new programs two or
    more decades ago.

    Seems like WaitForMultipleObjects is more similar to select() than
    poll(), though: it has a fixed limit (MAXIMUM_WAIT_OBJECTS) on the
    number of objects you can wait on at once.

    But WaitForMultipleObjects can do things that poll can not, like
    waiting on semaphore or on event or on thread (for completion, which
    POSIX people, in their eternal fondness for idiotic names call
    'join').

    [...]

    For some damn reason I am remembering that the array that WaitForMultipleObjects waits on should be "shifted" or even randomized
    per call in a server loop that is using EVENTS. IIRC, this was way back
    in late 90's and early 2000's.

    You remember correctly. I remember coding this.

    The problem is that the function has no way to indicate which individual objects are signaled, when used with the "or" semantics (any one object
    being signaled can wake it up).

    The function cannot indicate to the caller anything like:
    you successfully acquired mutexes [3] and [4], and were
    signaled by event [7].

    It identifies a single object that was signaled, in spite of
    the "Multiple" in its name.

    When multiple objects are in some signaled state (e.g. unlocked
    mutexes), the function favors the leftmost ones in the array,
    leading to starvation problems in event dispatch.

    The application must permute the array in order to ensure
    fairness in servicing all the objects.

    The current documentation still notes that:

    When bWaitAll is FALSE, this function checks the handles in the array
    in order starting with index 0, until one of the objects is signaled.
    If multiple objects become signaled, the function returns the index of
    the first handle in the array whose object was signaled.

    Amazingly, it still doesn't caution the programmer against the
    issue this can cause and the doesn't recommend permuting the array.

    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @[email protected]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael S@21:1/5 to Kaz Kylheku on Tue Mar 11 00:24:46 2025
    On Mon, 10 Mar 2025 21:55:07 -0000 (UTC)
    Kaz Kylheku <[email protected]> wrote:


    Amazingly, it still doesn't caution the programmer against the
    issue this can cause and the doesn't recommend permuting the array.


    I think, I had seen sentences like "Don't use WaitForMultipleObjects()
    with auto-reset events" in MS docs as far back as in 1999.
    I don't recollect ever using semaphores, so never was interested in
    workaround in this case.
    May be, for a typical use of semaphore default semantics are o.k.?
    It's late now so I don't want to think about it.
    For all other sorts of objects I don't see a problem.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Chris M. Thomasson on Mon Mar 10 23:21:05 2025
    On Mon, 10 Mar 2025 14:45:51 -0700, Chris M. Thomasson wrote:

    On 3/10/2025 2:42 PM, Lawrence D'Oliveiro wrote:

    On Mon, 10 Mar 2025 14:09:13 -0700, Chris M. Thomasson wrote:

    lol! IOCP is not all that bad... :^) They have an interesting
    function:

    https://learn.microsoft.com/en-us/windows/win32/api/ioapiset/nf-ioapiset-getqueuedcompletionstatusex

    It’s a blocking call:

    This function associates a thread with the specified completion
    port. A thread can be associated with at most one completion port.

    did you notice the timeout parameter?

    That leads to busy-waiting.

    So, no nondeterministic event-loop handling for you ...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Chris M. Thomasson on Mon Mar 10 23:19:27 2025
    On Mon, 10 Mar 2025 14:40:23 -0700, Chris M. Thomasson wrote:

    For some damn reason I am remembering that the array that WaitForMultipleObjects waits on should be "shifted" or even randomized
    per call in a server loop that is using EVENTS. IIRC, this was way back
    in late 90's and early 2000's.

    I would hope that the order of entries is not important, as that would
    defeat the point of non-determinism.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to bart on Mon Mar 10 23:26:12 2025
    On Sun, 9 Mar 2025 16:14:51 +0000, bart wrote:

    You mean, more work in not needing to create makefiles, or work out dependency graphs, or generate configure scripts, or enumerate compiler options?

    All those things put together tend to be a fraction of the size of the
    source code. So multiplying the size of the source code by adding multiple almost-the-same versions of source files is not helpful.

    Have you considered how much effort could be saved by keeping things
    simple?

    We do. That’s why we can build complex open-source projects on *nix
    systems that you struggle with on Windows.

    People have enough trouble with their own dependencies, without having
    to worry about a sprawling directory tree of a library they want to incorporate.

    Not sure why they have to. Those libraries are built and installed
    separately; your build scripts only have to find the right compiler/linker options to access the include files (for compiling) and library files (for linking) in their installed locations, and Bob’s your uncle.

    I see it as generating unnecessary work. /You/ would never understand
    that until you realise that building your project first involves
    running 35,000 lines of gobbledygook in a language not supported by your machine.

    Your hardware is not at fault. It’s the dumb software you choose to run on it. Your actual machine is capable of so much more than you give it credit
    for.

    Your view is that that 35Kloc *must* be absolutely essential, mine is
    that at least 99% of it is pointless.

    The onus is on you to prove it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Waldek Hebisch@21:1/5 to bart on Tue Mar 11 00:06:21 2025
    bart <[email protected]> wrote:
    On 07/03/2025 01:07, Waldek Hebisch wrote:
    bart <[email protected]> wrote:

    If so, why doesn't the same apply to the main language of the
    application? (Why isn't the application written in that language!)

    You like benchmarks, so try some benchmarks of speed of shell
    programs. Or believe me that for computational problems shell
    programs are dog slow (of order of 100 times slower than normal
    interpreted languages like Python).

    That wasn't a serious suggestion. But why not have a language that can
    run anywhere? A compiler is a program that reads in some files and
    writes one or more output files - you can't get anything more portable!

    But some people took this seriously and implemented actual
    applications in shell language.

    I've also seen a project where the configuration program was a C file,
    one which didn't need any special options, whose output was used to
    build the main app.

    Yes, that is a possiblity. Some time ago I was thinking about
    similar thing. Basically, configure scripts are slow, ugly and
    long due to limitations of shell and need to work with "any"
    shell. Could we write resonably small "better shell" to
    execute simpler version of configure script?

    You'd still have to sell me on the need for a configuration script at all.

    I accept that sometimes scripting is needed to orchestrate certain
    builds or to perform installation, but such programs would be 2-3
    magnitudes smaller than that 35Kloc monstrosity.

    This 35 Kloc is mechanicaly generated. What matter for developers
    is how much code they need to write by hand and how much effort
    it takes. Volume of hand written configuration code is much
    smaller and it is likely that decreasing size of generated code
    would require more hand written code.

    Again, why can't the main app be made to work like the small one?

    Modern applications depend on libraries. Let me mention a dll
    for Windows that I created many years ago. My own code was
    about 2000 (wc) lines of code, part of it numeric code that
    provided main functionality (image transformation), rest was
    glue code to the libraries. Input data came from .tiff files
    and I used libtiff to read them. I needed some geometry code
    which I found on the net. I needed linear equation solver,
    that I got from Lapack. So there were 4 libraries (3 that
    I used directly and libjpeg used by libtiff), and most
    code in "my" dll actually came from the other libraries.

    In this dll was doing rather special thing used as a part
    of bigger process. In modern times application like gimp
    connects several things of similar complexity. There is
    a lot of image formats, so many libraries just to read and
    write graphic files. I did not look at gimp build process,
    but at configure stage is must verify if all needed libraries
    (probably tens if not more) are present. Libraries need to be
    in sufficiently new versions and export needed functionality
    (libraries frequently may be compiled skipping part of
    functionality). I am pretty sure that parts of gimp are
    optional, that is you may include or skip them. And some
    other projects may wish to use parts of gimp, so build
    probaly created quite a few of libraries (that is separate
    things that need to be linked).

    Some DLLS will be part of the OS. Some are easy to obtain by the user.
    Some could be bundled.

    However my apps (those mentioned below) would not fail if one was
    missing; only if specific functions from a DLL were needed. (I think I
    only needed one, to do with JPEG handling).

    If I was still making apps, I would not have a dependency of an elusive library. One such is GMPxxx.DLL; that was so difficult to source, or
    even to build from source code (yes it has its own 30Kloc configure
    file!) that I found it easier to create my own library.

    When I need multiple precision artithmetic usually I also need
    speed. That requires special cases. I do not need most GMP
    "high level" functions, so I could simplify it a bit. But most
    complexity is in low level parts, in particular having fast code
    on multiple targets (which I need). So, _sometimes_ I can
    use simpler and slower code, but to cover all my needs
    it would take something of complexity comparable to GMP.
    So using GMP is easier.

    In modern times applications are supposed to be internationalized.
    That is various messages should appear in selected language.
    Normal practise in modern times is to have separate build
    step to expract english messages from source files and
    create connetion to translations. That alone means that
    build is more complex than simply compiling C files.

    Actually my 1990s apps were internationalised (working in English,
    French, German, Dutch). A dictionary of translations was provided by distributors. There was some scripting to help with that, but the script language was built-in to the app.

    It was all taken care of. No need for makefiles or any stuff like that. Supporting a different language didn't need a new build; just a data file.

    You can do internationalization essentially by hand, that is
    with extra developement effort. If you control compiler you could
    add apropriate compiler extention to automate large part of
    this work. Or you can use some scripting language (like your
    own). Point is that most projects do _not_ have own compiler
    or own scripting language, so they prefer tools developed by
    other folks. Popular such tools are designed to work as
    part of 'make' based build.

    And yes, result of build is binary + base data file. Translators
    add translations to data file without need to recompile
    main binary.

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to bart on Tue Mar 11 00:55:38 2025
    On Sun, 9 Mar 2025 15:37:35 +0000, bart wrote:

    So, what you are saying is that some software that is developed using
    one particular environment, regarding its tools, resources, and testing,
    may fail on an alien environment.

    No, actually that software is able to build and run nicely on every single environment it has been ported to ... except one.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to bart on Tue Mar 11 00:57:09 2025
    On Sun, 9 Mar 2025 22:59:22 +0000, bart wrote:

    On 09/03/2025 21:54, Lawrence D'Oliveiro wrote:

    And this for a package which is known to build on Windows.

    It has been known to. But as I showed it doesn't always work.

    No, you weren’t able to get it to work. Clearly others have the skills to make it work.

    But, when I eliminate the makefile nonsense, it often does work, more
    simply and more quickly.

    Prove it: do it with the Python build.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Waldek Hebisch@21:1/5 to bart on Tue Mar 11 01:33:18 2025
    bart <[email protected]> wrote:
    On 10/03/2025 10:58, Waldek Hebisch wrote:
    bart <[email protected]> wrote:

    I think nobody does. There's always been some sort of mystique
    surrounding 'gcc' on Windows.

    'MinGW' supposedly 'Minimalist Gnu on Windows'. In that case I wouldn't
    like to see the full-scale one..

    "Minimalist" is not about size of the compiler. Rather, it is
    about possible support routines. For "hosted implementation" C
    mandates presence of C library and there is a lot of functions
    not in C standard, but included in libraries of C compilers.
    There is also question of operating system support, complicated
    by fact that Windows is different than other systems. Cygwin
    solved those issues by offering Posix emulation and a sizable
    collection os libraries. MinGW is minimalist in the sense
    that it provides very little own libraries and mainly uses
    what is provide by Windows.

    I still don't get this stuff.

    I get the impression that a port of gcc to Windows is not simply about building C programs, but building C programs that use a lot of features
    from Linux.

    You apparently do not get fact that people want tools to
    automate various routine tasks. And people do not want
    to reinvent the wheel, they prefer to use code written
    by others. Folks at Bell Labs had several good ideas
    and shared them with others. Those ideas are not limited
    to Linux or Unix, you can look at old "Software tools in ..."
    books to understand what I am talking about. MinGW
    _distribution_ bundles several tools. This allows you
    to compile programs when build process uses those tools.
    You can also use the tools for your purpose. Aparently
    you have very strong "not invented here" syndrom and
    insist on usig your own tools. That is fine, as long
    as you keep this to yourselfs. But refusing other
    folks right to use tools they want to use is not
    fair. Or, to put it differently, when you refuse
    the tools _you_ need to do by hand needed work.
    You may be able to extract from work of others
    something that fits your taste (like list of files
    to compile), but that is your business.

    If so, then that's the wrong approach. There are various lesser
    compilers which know nothing about mingw or posix of anything of the
    sort. (For example, lccwin32, DMC, PellesC, I think Tiny C; I can't
    speak for MSVC.)

    You may be able to do some things using just a C compiler.
    But requesting people to do other things by hand is as
    wise as requesting them to code in assembler (assembler
    may be converted to binary faster than C, and with enough
    effort resulting binary will run faster than result of
    C compilation :). Another thing are libraries and
    bigger applications. Some folks want "true Windows look
    and feel", some say that proper Windows DLL must be
    compiled by MSVC (otherwise is lack some features that
    they consider essential). But there are people who
    had to or wanted to use Windows, but also wanted to
    use Unix applications. Cygwin was addressed to such
    folks: it allows you to compile substantial Unix
    application so that it runs on Windows. If you have
    no interest in such applications, than fine, Cygwin
    is probably not for you. Today WSL may be better
    for such a goal, but in the past Cygwin provided
    easiest way to port Unix application to Windows.
    If easy port was the goal and application was
    substantial, then Cygwin usually was right choice.

    To put it differenly, you could compile program in one computer
    and get relatively small program which runs OK on different
    Windows machines because libraries it needs are already present.
    This is quite different compared to Cygwin, where you need to
    install Cygwin libraries before normal Cygwin program can run
    (I write about normal programs because actual compiler in
    Cygwin and Mingw used to be the same and with some tweaks one
    could use Cygwin compiler to produce MinGW execuatbles).


    I'm not interested in whatever Cygwin or Mingw are about.

    Oh, so you do not want to know. In such case why you started
    discussing it?

    If I were to
    use libraries not part of the OS, then it would be ones like SDL2 to get interesting things done. Not try and emulate bits of Linux that I'd
    never heard of.

    I mentioned one case: about 90% of code in "my" library was
    provided in fact by other libraries. So using code provided
    by other saved me a lot of work, turning something that
    otherwise could be multiyear job into reasonably small effort.
    To use the libraries I had to work out build process, thanks
    to tools it was very easy. Also, speed of library was
    major concern and using 'gcc' (as opposed to Borland C that
    I used earlier) gave me substantial speedup. And yes,
    the libraries I used were purely computational (data came
    from a file and output was to a file).

    MinGW bundle is a good way to build such libraries. Having
    only a C compiler may be too little.

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Chris M. Thomasson on Tue Mar 11 03:07:28 2025
    On Mon, 10 Mar 2025 19:01:16 -0700, Chris M. Thomasson wrote:

    On 3/10/2025 4:21 PM, Lawrence D'Oliveiro wrote:
    On Mon, 10 Mar 2025 14:45:51 -0700, Chris M. Thomasson wrote:

    On 3/10/2025 2:42 PM, Lawrence D'Oliveiro wrote:

    It’s a blocking call:

    This function associates a thread with the specified completion
    port. A thread can be associated with at most one completion
    port.

    did you notice the timeout parameter?

    That leads to busy-waiting.

    It can be blocking ...

    Yes, we already covered that.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Waldek Hebisch@21:1/5 to bart on Tue Mar 11 03:38:06 2025
    bart <[email protected]> wrote:
    On 10/03/2025 11:45, Waldek Hebisch wrote:
    bart <[email protected]> wrote:

    Oh dear, that hasn't worked either.

    Hmm, it AFAICS worked. That is you wanted build failure and you
    got build failure.

    In last year's thread I did an experiment with I think 5 projects, and
    most failed to build using the provided tools.

    In the case of Lua, there was an additional complication in that one lot
    of online sources was incomplete (missing the top directory layer).
    However what was provided still had a makefile, to confuse matters.

    But even with the full sources, there was a catch - see below.

    Of course you are an export on building
    Windows programs and have your tricks. In this case a simple
    one, like not having MinGW tools in the patch probably will do.

    It will nearly always do. In the case of LIBJPEG, there are 5 binaries
    to build including the two main ones (encode and decode). Each of those comprises 8 .c files, plus they share 46 other .c files.

    The official makefile (the fallback one as there were lots!), built
    those 46 into a .a archive, but which was then /statically/ linked into
    each executable, so it didn't save any space.

    Libraries usualy save space compared to linking object files:
    old-style linker includes all explicitely mentioned object
    files, but only referenced object files from a library.
    And library saves you effort to list object files, just
    give single library name.

    And compilng to .o files or .a saves time that otherwise would
    be spent recompiling sources mutiple times.

    I had to get it working once via the makefile, and arrange to capture
    the shell commands used in order to determine all this.

    From those, I was able to create two @ files so that I could build only
    using a compiler. Each file simply lists the 54 files that are needed,
    and is 4% the size of the makefile. (They can also use a shared @ file
    to avoid repeating the shared files.)

    Using tcc, each program builds from source in 0.3 seconds using such a
    list, even though 46 source files are processed twice.

    I would expect gcc-compiled libjpeg to be quite a bit faster.

    This works! No crappy makefiles needed. Here I happened to know it
    involves compiling 33 of the 34 C files supplied (luac.c is for embedded >>> I think).

    Not reading instructions help in writing newsgroup post. If you
    read documentation you would see that build process is supposed to
    build 3 related products: Lua library, Lua interpreter and Lua
    compiler (whatever the last things means). The is explicit list
    of files giving you the Lua library. Link it with one extra file
    (that is 'lua.c') and you get Lua interpteter. Link the library
    with 'luac.c' and you get the compiler.

    I always build lua.exe. I mentioned that luac.c was for embedded, or something.

    Documentation also mention explicit targets, like 'make mingw'.
    But you probably arranged things so that it fails too.


    Actually, looking at the docs more carefully, it seems the makefiles
    only work for Linux.

    For Windows you are on you own. But at least it does list the files
    involved.

    I had no need for Windows in recent time. But Makefile looked fine,
    I have no reason to doubt that it will work on Windows. Of course,
    the first thing uses 'uname' and will fail if appropiate directory
    is not in the PATH.

    However, I thought the point of 'make' was that you just typed 'make'
    and it goes and builds your program with no further input. Here, the
    makefile could have provided a helpful message saying that Windows was
    not supported.

    It first needed to check that you are on Windows with MinGW, but
    apparently you prevented it from running program that would
    detect this.

    The makefiles are full of useless dependency info. Lua is a small
    program, and I just want to use it, not develop it.

    AFAICS you want something to compile with your compiler and
    claim that make fails. When I needed to build programs on
    Windows make usually worked. Of course, I had ....

    So they usually worked after you fixed all the problems? OK!

    If you consider properly installing a program and putting was
    is needed in the PATH to be a problem, then yes I fixed the
    problem. You see, for people that used computers for some
    time (even non-developers), those are obvious things. And
    usually what was needed were documented, so there was really
    no need to think, just follow the instructions. Current
    users are conditioned to expect magic, that is programs
    doing stuff like this behind the scene. And part of crap
    that you are complaining about is doing this. But if you
    interfere by hand then you break automation. If your goal
    is to complain that automation does not work, then you
    get what you want. If you want to do the job, manual
    intervention must be complete, you need to compensate
    for changes that you made.

    Of course, I can not exclude bugs in say MinGW installer.
    But you consistenly report troubles with things that work(ed)
    for me and other folks. And when you give some detail it
    is clear that you do not follow instructions. I know,
    dong things "better" or "simpler" is tempting, and
    several times I did thing my way (differently than official
    way). But if you do not _want_ to follow instructions, then
    you are on your own resoling problems.

    You miss important point of sources: having sources and free
    licence means that anybody can develop program further.

    There are two things you may want to do when building sources:

    (1) You want to do further development as you say

    (2) You simply want to build a working binary and have no interest in anything else.

    Those two requirements are utterly different, yet most developers who
    provide sources ignore that, and simply provide the entire directory
    tree and a hundred other things that might be needed for (1).

    For (2):

    * You don't need a sprawling directory tree; files can be flattened into
    one folder

    * (You don't need separate files; they can be flattened into one file
    via various tools and scripts. In my case, I do that via a transpiler.
    For C, this provides the opportunity for whole-program optimisation.)

    * You don't need makefiles with tons of dependency info. This stuff is
    for incremental compilation, but here we are only building once, so it
    has to be done from scratch anyway. It is not time-critical.

    * You might still need to orchestrate the building of multiple binaries,
    or to install the result, but for this there are better scripting
    languages than 'make'. Even C will do, for which the user will already
    have a compiler. (IMV installation is a quite different process from building.)

    FYI, packages insist that to install files you run "install" program.
    You may run it from a Makefile, you may run it from C code.
    But if you have a Makefile for developement purpose, than it is
    easier to run "install" from a Makefile.

    You may be surprised, but packagers routinely apply modifications
    to released sources. Keeping track of them is easier when
    there is no split between (1) and (2). For example, packagers
    for compatiblity reason may prefer keeping old version, but
    selectively apply bug fix from developement version. Or
    packagers create a bugfix and want it included in developement
    version.

    And in general, not having separate "release build" is simpler.
    In other worlds, splitting cases (1) and (2) adds to work of
    all people developement releated work.

    * If this is for a known platform, then the process can be streamlined further

    Examples of (2) for me are GMP and LIBFFI libraries which are a
    nightmare to build on Windows.


    In
    particular people can do simple customization or bug fixes.
    So if I find program useful, it is my decision if I want
    to do work needed to keep it running on my system or port to
    a different system. I case of binaries it is usually unfeasible
    to fix bugs or port it (people use emulators, but this has
    limitations). And if program is useful enough there is good
    chance that sombody else already did the work.

    BTW: I did have trouble with some Windows sources, and main
    trouble was that source was incomplete or missed some needed
    changes.

    You really want to fix things in gcc for example by messing with the
    source files? I think we establshed that there were at least 79,000 .c
    files. (Better set aside the rest of the decade to get familiar with it!)

    I fixed a few bugs in gcc. Part of it is having options: at
    configure time one can request inclusion of extra internal checks
    in gcc, that simplifies debugging. Part is proper use of debugger,
    simplest things is segmentation violation. In such case debugger
    tells you exact locatiation of offending code. So you can look
    just at a single place in a single source file. In other
    cases breakpoint in error reporting function will tell you
    which place detected error. In case of wrong code it helps to
    request dumps from various passes, that may give idea which
    pass is responsible. Of course, there is some work involved
    in finding good fix. Less popular programs may have very simple
    bugs where fix is easy and can be done in few minutes. In gcc
    bugs with verys simple fix are less likely, so expect hours or
    days of work in relatively easy cases. And some things are
    harder.

    Point is, even if you do not want to debug gcc, there are
    people which can do this. And there is no need to understand
    all of source code.

    And you may wish to modify gcc. Many years ago I did a
    modification so that gcc treated all characters with codes
    above 127 as letters. At that time gcc did not support
    Unicode in input, so for example source identifiers were
    limited to ASCII. With my patch gcc accepted various junk
    in identifiers, but in particular all letters from popular
    code pages and all UTF-8 letters.

    You may get extra warnings or error messages or disable some
    (modern gcc allows a lot of control of warnings and error
    messages, but one may still wish for something special,
    not coverd by existing options).

    That is trouble was due to people who did not care
    about distributing sources (but should have cared, as those cases
    were Windows adaptions of GPL-ed things).

    I provide source code for reason (2) above. This is likely to be
    amalgamated into one file, or transpiled to one C file

    For (1), I can provide original source files, but building source in my personal language is problematical. For a start, you need a binary to
    get started, but people don't like binaries because of AV issues or lack
    of trust.

    (They generally work for mainstream products on Windows; presumably the providers are whitelisted by MS, even if they are not in the MS Store.)

    Well, I do not know what is your motivation for releasing your
    code. I have impression that you treat your code as a freeware,
    that is release it for other to use, but do not care about their
    ability to develop it. IMO this combines worst aspect of
    paid proprietary developement with worst aspect of open source
    developement. Namely, in open source case users can engage
    in developement. That could be in form of improvement or bug
    fixes. But also bug reports or developement suggestions.
    In practice this leads to improved developement efficiency.
    But without buildable source some of this is impossible
    and what is possible is strongly discouraged (engagement
    takes effort and why spent effort on something that may
    become inaccessible if you slightly change your mind).
    Paid proprietary developement uses more developement
    resources, but is optimized to generate money to pay for
    developement. But freeware typically generates no money.

    Concerning problem of needing binary to compile your
    langiages, there are various approaches. One possiblity
    is to have binary and sources that rebuild this binary.
    People can then check that binary indeed correspond to
    provided sources. Some project offer bootstraping via
    C. For example GNU Modula 2 has part written in Modula 2.
    But it also has a Modula 2 to C converter, which is not
    designed as general product, but used to compile first
    version of compiler which is than used to compile final
    version. There is no warranty that people will want
    to use your compiler if you release sources. But
    having developement sources and corresponding binary
    (or generated C) is first step in overcoming doubts.
    The point is that while theoretically inside binary
    there could be self-replicating virus, it is quite
    hard to hide it so that it survives undetected when
    sources are modified. With sources split into
    reasonable small pieces it is frequently not so
    hard to track correspondence between sources and
    binary and check that there are no binary parts
    without corresponding source.

    Part of your trouble is that you want to develop on
    Windows. Apparently, it is hard to find people who
    want to develop free software on Windows (at least
    harder than finding people who want to develop free
    software on Linux). I am not saying that for small
    free software project it is easy to find people who
    want to develop on Linux, but is definitely harder
    to find people wanting to develop on Windows.

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Chris M. Thomasson on Tue Mar 11 06:39:27 2025
    On Mon, 10 Mar 2025 21:30:16 -0700, Chris M. Thomasson wrote:

    On 3/10/2025 8:07 PM, Lawrence D'Oliveiro wrote:

    On Mon, 10 Mar 2025 19:01:16 -0700, Chris M. Thomasson wrote:

    On 3/10/2025 4:21 PM, Lawrence D'Oliveiro wrote:
    On Mon, 10 Mar 2025 14:45:51 -0700, Chris M. Thomasson wrote:

    On 3/10/2025 2:42 PM, Lawrence D'Oliveiro wrote:

    It’s a blocking call:

    This function associates a thread with the specified
    completion port. A thread can be associated with at most one >>>>>> completion port.

    did you notice the timeout parameter?

    That leads to busy-waiting.

    It can be blocking ...

    Yes, we already covered that.

    So, that's that. There is no busy wait.

    There is if you don’t want to block.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Chris M. Thomasson on Tue Mar 11 06:38:42 2025
    On Mon, 10 Mar 2025 21:25:21 -0700, Chris M. Thomasson wrote:

    On 3/10/2025 8:07 PM, Lawrence D'Oliveiro wrote:

    Surely events relevant to entries in the list should be
    serviced in the order they arrive, not in the order in which the
    entries happen to occur in the list. There is no other reasonable way
    to do it.

    Well, it just the way WFMO is implemented.

    Typical of Microsoft to go for convenience of implementation rather than correctness of behaviour, isn’t it.

    Also Dave Cutler, the mastermind behind Windows NT, was trying to
    (re)create an OS like the ones his former employer, DEC, used to make.
    (Many of the quirks in Windows make more sense when you look at it in this light.) The company was dominated by Unix-haters at the time, and he was
    one of them.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Tue Mar 11 08:34:43 2025
    On Mon, 10 Mar 2025 21:38:35 -0000 (UTC)
    Lawrence D'Oliveiro <[email protected]d> wibbled:
    On Mon, 10 Mar 2025 15:11:14 -0000 (UTC), Muttley wrote:

    Nothing wrong with select if you're not multiplexing hundreds of file
    descriptors. Does the job.

    But it still requires allocating a fixed-length bit array hundreds of
    bytes in size, even if you are only concerned with one or two FDs. And if

    Hundreds of bytes of unused memory may have mattered in 1985, its a total irrelevance in 2025.

    the numbers of those FDs lie beyond the upper limit of the array, you’re >stuffed.

    Any descriptor created that had a value greater than select() could cope with would break a lot of old code so although I have no proof, I'd bet money on
    the kernel/libc authors taking this into account when allocating user space descriptor values.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Tue Mar 11 08:31:31 2025
    On Mon, 10 Mar 2025 17:12:06 GMT
    [email protected] (Scott Lurndal) wibbled:
    [email protected] writes:
    On Mon, 10 Mar 2025 15:20:00 +0200
    Michael S <[email protected]> wibbled:
    Similar to poll(), yes. Not so similar to super-ugly select(). I hope >>>that Unix people stopped using select in new programs two or more
    decades ago.

    Nothing wrong with select if you're not multiplexing hundreds of file >>descriptors. Does the job.


    The primary constraint for select(2) is not the _number_ of files
    that can be selected amongst (although that _is_ a constraint),
    but rather the largest file descriptor number is limited by the
    select(2) bitmap interface (FD_SETSIZE not only defines the number
    of file descriptors that can be passed, but also the highest
    valued file descriptor that can be passed). poll(2) has no
    such limits.

    File descriptors get reused on every version of *nix I've ever programmed
    on so unless you have hundreds of descriptors open at any one time thats not going to be a problem.

    I'm not saying select() is as good as poll(), its not, but its not as bad
    as people make out.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael S@21:1/5 to Lawrence D'Oliveiro on Tue Mar 11 13:49:31 2025
    On Tue, 11 Mar 2025 00:55:38 -0000 (UTC)
    Lawrence D'Oliveiro <[email protected]d> wrote:

    On Sun, 9 Mar 2025 15:37:35 +0000, bart wrote:

    So, what you are saying is that some software that is developed
    using one particular environment, regarding its tools, resources,
    and testing, may fail on an alien environment.

    No, actually that software is able to build and run nicely on every
    single environment it has been ported to ... except one.

    Do you really think that many Linux-originated Open Source projects that
    can not be built easily on Windows/Msys2 are easy to build on such OSes
    like:
    1. zOS (it is certified UNIX, but somehow I am not sure that it's
    enough)
    2. VMS
    3. iOS (it has BSD-derived kernel, but somehow I am not sure that it's
    enough)
    4. Android (it has Linux kernel, but somehow I am not sure that it's
    enough. Although do expect that rate of success would be higher than in
    cases 1,2 and 3).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael S@21:1/5 to bart on Tue Mar 11 13:59:28 2025
    On Tue, 11 Mar 2025 11:43:50 +0000
    bart <[email protected]> wrote:

    On 11/03/2025 00:57, Lawrence D'Oliveiro wrote:
    On Sun, 9 Mar 2025 22:59:22 +0000, bart wrote:

    On 09/03/2025 21:54, Lawrence D'Oliveiro wrote:

    And this for a package which is known to build on Windows.

    It has been known to. But as I showed it doesn't always work.

    No, you weren’t able to get it to work.

    A build process should be foolproof. You seem to be moving from
    'Windows is rubbish' to 'the person trying to build it is an idiot'.
    What excuse will you come up with next?

    I suppose it is inconceivable that the build process is
    over-elaborate, highly error prone and over-dependent on third-party
    tools?

    The CPython build for Windows, /10 years ago/ (I guess it wouldn't
    have gotten any simpler!) involved VS, MSVC, MS Build Tools, GIT, SVN
    and a bunch of stuff I can't even remember. It still didn't work.

    Clearly others have the skills to
    make it work.

    But, when I eliminate the makefile nonsense, it often does work,
    more simply and more quickly.

    Prove it: do it with the Python build.

    Sure, just tell me the C files that comprise each binary, and ensure
    all .c and .h files are supplied.

    This the bit that the supplied build process makes near-impossible to
    do in a straightforward way.

    For /my/ interpreted language, ON WINDOWS (the OS you seem to think
    it incapable of building any software), it is built from source as
    follows:

    Start with these TWO files:

    c:\demo>dir
    07/03/2025 21:00 402,432 mm.exe
    11/03/2025 11:33 865,928 qq.ma

    Compile one with the other:

    c:\demo>mm qq
    Compiling qq.m to qq.exe

    Now there are THREE files:

    c:\demo>dir
    07/03/2025 21:00 402,432 mm.exe
    11/03/2025 11:34 567,808 qq.exe
    11/03/2025 11:33 865,928 qq.ma

    The new one is the interpreter. Neat, yes? I doubt you can get much
    simpler and more effortless than this.

    However, this is me making the effort to make it so. AFAICS nobody
    over at Linux-land is trying make things simpler; they're making
    things bigger and more complicated instead by adding extra layers.

    Hint: the ability to type 'make' (one character less than 'mm qq') to
    start a build process involving 1000s of files, 100s of directories,
    10s of 1000s of lines of scripts, dozens of specialist utilities,
    taking several minutes to complete, with myriad failure points, is
    NOT what I would count as simpler.




    It is far more complicated than yours if all the person wants is an exe.
    It is simpler than your process if the person has higher ambitions.
    Like fixing bugs or adding features.

    I suppose that you achieved build simplicity by means of amalgamation.
    Do you provide your potential users with de-amalgamation tool, just to
    giv'em a minimal chance?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Lawrence D'Oliveiro on Tue Mar 11 11:43:50 2025
    On 11/03/2025 00:57, Lawrence D'Oliveiro wrote:
    On Sun, 9 Mar 2025 22:59:22 +0000, bart wrote:

    On 09/03/2025 21:54, Lawrence D'Oliveiro wrote:

    And this for a package which is known to build on Windows.

    It has been known to. But as I showed it doesn't always work.

    No, you weren’t able to get it to work.

    A build process should be foolproof. You seem to be moving from 'Windows
    is rubbish' to 'the person trying to build it is an idiot'. What excuse
    will you come up with next?

    I suppose it is inconceivable that the build process is over-elaborate,
    highly error prone and over-dependent on third-party tools?

    The CPython build for Windows, /10 years ago/ (I guess it wouldn't have
    gotten any simpler!) involved VS, MSVC, MS Build Tools, GIT, SVN and a
    bunch of stuff I can't even remember. It still didn't work.

    Clearly others have the skills to
    make it work.

    But, when I eliminate the makefile nonsense, it often does work, more
    simply and more quickly.

    Prove it: do it with the Python build.

    Sure, just tell me the C files that comprise each binary, and ensure all
    .c and .h files are supplied.

    This the bit that the supplied build process makes near-impossible to do
    in a straightforward way.

    For /my/ interpreted language, ON WINDOWS (the OS you seem to think it incapable of building any software), it is built from source as follows:

    Start with these TWO files:

    c:\demo>dir
    07/03/2025 21:00 402,432 mm.exe
    11/03/2025 11:33 865,928 qq.ma

    Compile one with the other:

    c:\demo>mm qq
    Compiling qq.m to qq.exe

    Now there are THREE files:

    c:\demo>dir
    07/03/2025 21:00 402,432 mm.exe
    11/03/2025 11:34 567,808 qq.exe
    11/03/2025 11:33 865,928 qq.ma

    The new one is the interpreter. Neat, yes? I doubt you can get much
    simpler and more effortless than this.

    However, this is me making the effort to make it so. AFAICS nobody over
    at Linux-land is trying make things simpler; they're making things
    bigger and more complicated instead by adding extra layers.

    Hint: the ability to type 'make' (one character less than 'mm qq') to
    start a build process involving 1000s of files, 100s of directories, 10s
    of 1000s of lines of scripts, dozens of specialist utilities, taking
    several minutes to complete, with myriad failure points, is NOT what I
    would count as simpler.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Lawrence D'Oliveiro on Tue Mar 11 11:21:51 2025
    On 11/03/2025 00:55, Lawrence D'Oliveiro wrote:
    On Sun, 9 Mar 2025 15:37:35 +0000, bart wrote:

    So, what you are saying is that some software that is developed using
    one particular environment, regarding its tools, resources, and testing,
    may fail on an alien environment.

    No, actually that software is able to build and run nicely on every single environment it has been ported to ... except one.


    There are two main environments A and B, and it manages to build on A,
    because the build process depends entirely on shell commands, utilities
    and libraries that are exclusive to A.

    However the software I create for B doesn't rely on anything exclusive
    to B, so can be built on A or B. Which process is more portable?

    BTW see: https://gs.statcounter.com/os-market-share/desktop/worldwide

    This is market share of desktop and laptops OSes:

    Windows 70%
    OS X 16%
    Linux 4%
    Chrome 2%

    For all devices including phones and tablets, Windows is at 25% market
    share.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to [email protected] on Tue Mar 11 14:12:45 2025
    [email protected] writes:
    On Mon, 10 Mar 2025 17:12:06 GMT
    [email protected] (Scott Lurndal) wibbled:
    [email protected] writes:
    On Mon, 10 Mar 2025 15:20:00 +0200
    Michael S <[email protected]> wibbled:
    Similar to poll(), yes. Not so similar to super-ugly select(). I hope >>>>that Unix people stopped using select in new programs two or more >>>>decades ago.

    Nothing wrong with select if you're not multiplexing hundreds of file >>>descriptors. Does the job.


    The primary constraint for select(2) is not the _number_ of files
    that can be selected amongst (although that _is_ a constraint),
    but rather the largest file descriptor number is limited by the
    select(2) bitmap interface (FD_SETSIZE not only defines the number
    of file descriptors that can be passed, but also the highest
    valued file descriptor that can be passed). poll(2) has no
    such limits.

    File descriptors get reused on every version of *nix I've ever programmed
    on so unless you have hundreds of descriptors open at any one time thats not >going to be a problem.

    $ man dup2

    There are very few reasons to favor select over poll in new code.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Michael S on Tue Mar 11 13:47:25 2025
    On 11/03/2025 11:59, Michael S wrote:
    On Tue, 11 Mar 2025 11:43:50 +0000

    Hint: the ability to type 'make' (one character less than 'mm qq') to
    start a build process involving 1000s of files, 100s of directories,
    10s of 1000s of lines of scripts, dozens of specialist utilities,
    taking several minutes to complete, with myriad failure points, is
    NOT what I would count as simpler.




    It is far more complicated than yours if all the person wants is an exe.
    It is simpler than your process if the person has higher ambitions.
    Like fixing bugs or adding features.

    I explained about these (1) and (2) requirements in another post.


    I suppose that you achieved build simplicity by means of amalgamation.

    Actually build simplicity is exactly the same without amalgamation:

    c:\qx>mm qq
    Compiling qq.m to qq.exe

    But here qq.m is the lead module of several dozen comprising the
    project, plus there are embedded support files.

    If distributing source for somebody else to build from scratch however, provided they have mm.exe, then this is a tidy way to do it.

    The amalgamation was created like this:

    c:\qx>mm -ma qq
    Compiling qq.m to qq.ma
    Writing qq.ma

    The 'mm qq' invocation is a feature of my language which has a module
    scheme, which lets it discover the dependent source files.

    C doesn't have that. I have played around with a few ideas, but they
    require either a modified C compiler, or some script which extracts
    build info embedded in the C source.

    However this will only work for new programs; it doesn't help with
    existing open source software where that info is disseminated within
    various makefiles or scripts.

    So the latter still comes down to being able to determine the inputs to
    feed to a C compiler - basically the list of C files.

    The C source /I/ might provide will be transpiled from my original
    source projects, and will be a single C source file with no headers. For example:

    c:\qx>mc -c qc # For Windows target
    M6 Compiling qc.m---------- to qc.c

    c:\qx>mc -c -linux qc -out:qu # For Linux target
    M6 Compiling qc.m---------- to qu.c

    Those files can be trivially built on either OS with no makefile:

    c:\qx>gcc qc.c # Windows

    c:\qx>wsl
    root@DESKTOP-11:/mnt/c/qx# gcc qu.c -lm -ldl -fno-builtin # Linux

    (Check it works on Linux:)

    root@DESKTOP-11:/mnt/c/qx# ./a.out -nosys hello
    Hello, World! 11-Jan-2025 13:36:06

    (qc.c is a version 'qq' without an ASM-based accelerator module. Inline assembly can't be transpiled to C.)

    Do you provide your potential users with de-amalgamation tool, just to
    giv'em a minimal chance?

    The .ma file is just a text file that concatenates the source and
    support files, each preceded by a header like this:

    === qq.m 0 0 1/44 ===

    A simple script can separate them (or a text editor can do it manually).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Tue Mar 11 14:24:41 2025
    On Tue, 11 Mar 2025 14:12:45 GMT
    [email protected] (Scott Lurndal) wibbled:
    [email protected] writes:
    On Mon, 10 Mar 2025 17:12:06 GMT
    [email protected] (Scott Lurndal) wibbled:
    [email protected] writes:
    On Mon, 10 Mar 2025 15:20:00 +0200
    Michael S <[email protected]> wibbled:
    Similar to poll(), yes. Not so similar to super-ugly select(). I hope >>>>>that Unix people stopped using select in new programs two or more >>>>>decades ago.

    Nothing wrong with select if you're not multiplexing hundreds of file >>>>descriptors. Does the job.


    The primary constraint for select(2) is not the _number_ of files
    that can be selected amongst (although that _is_ a constraint),
    but rather the largest file descriptor number is limited by the
    select(2) bitmap interface (FD_SETSIZE not only defines the number
    of file descriptors that can be passed, but also the highest
    valued file descriptor that can be passed). poll(2) has no
    such limits.

    File descriptors get reused on every version of *nix I've ever programmed >>on so unless you have hundreds of descriptors open at any one time thats not >>going to be a problem.

    $ man dup2

    There are very few reasons to favor select over poll in new code.

    Theres one very big one in that with select you don't have to manage a
    pollfd array. With poll you either have to hardcode its size and then do [something] if you have too many descriptors, or piss about with realloc() nonsense. For a simple client that maybe only has stdout and a socket open
    I'd choose select() every single time.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Brown@21:1/5 to bart on Tue Mar 11 16:06:15 2025
    On 11/03/2025 15:24, bart wrote:

    To build open source projects, I'm happy to use an existing C compiler.
    I'm NOT happy about bending over backwards to use CYGWIN, MSYS2 or WSL because the developers insist on forcing their Linux dependencies down
    my throat.


    Developers can do what they like. But they shouldn't inflict their
    choices on other people, especially those using other OSes.


    I have not paid a lot of attention to this thread. But I am curious
    here - who do you think is /forcing/ you to compile their code? Why do
    you think it is appropriate for /you/ to demand that people writing open
    source projects (often as voluntary work) should go out of their way to
    make /your/ life easier? Why are you trying to inflict /your/ choices
    on them?

    It is very strange to me that you feel open source developers should bow
    to your preferences and famously restricted build requirements.

    If someone wants to write software that only works on Windows, that's
    their choice. If I want to use it on Linux, I may have to re-write
    parts of it, or use Wine, or Mono, or perhaps be unable to use it at
    all. That's fair enough. The same applies if I - or anyone else - want
    to use software written for Linux on Windows. It doesn't matter if
    making the code cross-platform or independent of a particular library,
    header or tool would have been a big job or a small job. I have no
    right to complain that an open source project is hard for me to build on
    my chosen system - and neither do you.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Waldek Hebisch on Tue Mar 11 14:24:15 2025
    On 11/03/2025 01:33, Waldek Hebisch wrote:
    bart <[email protected]> wrote:
    On 10/03/2025 10:58, Waldek Hebisch wrote:
    bart <[email protected]> wrote:

    I think nobody does. There's always been some sort of mystique
    surrounding 'gcc' on Windows.

    'MinGW' supposedly 'Minimalist Gnu on Windows'. In that case I wouldn't >>>> like to see the full-scale one..

    "Minimalist" is not about size of the compiler. Rather, it is
    about possible support routines. For "hosted implementation" C
    mandates presence of C library and there is a lot of functions
    not in C standard, but included in libraries of C compilers.
    There is also question of operating system support, complicated
    by fact that Windows is different than other systems. Cygwin
    solved those issues by offering Posix emulation and a sizable
    collection os libraries. MinGW is minimalist in the sense
    that it provides very little own libraries and mainly uses
    what is provide by Windows.

    I still don't get this stuff.

    I get the impression that a port of gcc to Windows is not simply about
    building C programs, but building C programs that use a lot of features
    from Linux.

    You apparently do not get fact that people want tools to
    automate various routine tasks.

    What routine task is this? I'm talking exclusively about turning a bunch
    of source files in some language (here it is C) into an executable binary.

    This task can be done with a program called a 'compiler'.

    However, what I'm arguing about is that this simple task has become unnecessarily elaborate on OSes like Linux, by introducing makefiles, OS-specific scripts, and OS-specific utilities.

    This is done even on smaller, simple applications, and also on those
    that are supposedly cross-platform that are to be built on the target.

    If scripts are going to be used, then use them at the developer site
    only, and make the script generate the streamlined set of files for the particular platform of interest.

    It should not rely on anything that is not native to the target platform.


    And people do not want
    to reinvent the wheel, they prefer to use code written
    by others.

    What wheels are these that are being reinvented? I'm simply arguing for
    using either 2 or 4 wheels, not 18!

    And I'm not suggesting reinventing those 2/4 either, just using the ones
    I have on my OS.


    Folks at Bell Labs had several good ideas
    and shared them with others. Those ideas are not limited
    to Linux or Unix, you can look at old "Software tools in ..."
    books to understand what I am talking about. MinGW
    _distribution_ bundles several tools. This allows you
    to compile programs when build process uses those tools.
    You can also use the tools for your purpose. Aparently
    you have very strong "not invented here" syndrom and
    insist on usig your own tools.

    That's another aspect of it which is not that relevant, other than it
    shows just how simple things could be.

    To build open source projects, I'm happy to use an existing C compiler.
    I'm NOT happy about bending over backwards to use CYGWIN, MSYS2 or WSL
    because the developers insist on forcing their Linux dependencies down
    my throat.

    (Those developers also seem to think that the only alternative to MSYS2, configure scripts etc is to use the monstrosity that is MS Visual Studio
    and all it comprises.)

    If an application is written in C, then a C compiler should suffice.

    That is fine, as long
    as you keep this to yourselfs. But refusing other
    folks right to use tools they want to use is not
    fair.

    Developers can do what they like. But they shouldn't inflict their
    choices on other people, especially those using other OSes.



    Or, to put it differently, when you refuse
    the tools _you_ need to do by hand needed work.
    You may be able to extract from work of others
    something that fits your taste (like list of files
    to compile), but that is your business.

    Fine. In that case tell me what the files are! Lua actually does this
    (but it's not obvious, it's also unexpected since the majority of apps
    are unhelpful in such matters).

    When I tried to build A68G, the whole build process, under VirtualBox
    Linux, took 5 minutes. I couldn't build under Windows because of a
    30,000-line bash script.

    However, with some effort, I was able to isolate the C files needed, and fortunately there was no synthesised code. Given that list of 12 files
    (!) building the app on Windows took my compiler one second.

    If so, then that's the wrong approach. There are various lesser
    compilers which know nothing about mingw or posix of anything of the
    sort. (For example, lccwin32, DMC, PellesC, I think Tiny C; I can't
    speak for MSVC.)

    You may be able to do some things using just a C compiler.
    But requesting people to do other things by hand is as
    wise as requesting them to code in assembler

    What things, what assembly? I'm talking about building a program written
    in a HLL using an existing compiler.

    That seems reasonable enough, yes?

    The only info needed is the list of files to submit to said compiler.

    (assembler
    may be converted to binary faster than C, and with enough
    effort resulting binary will run faster than result of
    C compilation :). Another thing are libraries and
    bigger applications. Some folks want "true Windows look
    and feel", some say that proper Windows DLL must be
    compiled by MSVC

    Any C compiler for Windows can generate DLL files.

    (otherwise is lack some features that
    they consider essential). But there are people who
    had to or wanted to use Windows, but also wanted to
    use Unix applications. Cygwin was addressed to such
    folks: it allows you to compile substantial Unix
    application so that it runs on Windows. If you have
    no interest in such applications, than fine, Cygwin
    is probably not for you. Today WSL may be better
    for such a goal, but in the past Cygwin provided
    easiest way to port Unix application to Windows.
    If easy port was the goal and application was
    substantial, then Cygwin usually was right choice.

    As I understand it, POSIX is about 80 header files, of which ~30 are the standard C headers, leaving 50 POSIX headers that do not exist on Windows.

    If your Linux app uses those headers, and you want to port it to
    Windows, then you have problems to solve.

    But I would question whether the apps I want to build need all that. How
    does POSIX figure in the GMP library for example?

    Why does so much code use open() for example instead of the standard
    fopen()?

    So, not only are people relying the Linux eco-system for the build
    process, but they are also needlessly using POSIX-specific headers.

    C is supposed to be that famous portable HLL, but in developer's minds, 'portable' seems to mean working only on any Unix-like system!

    (My language, not C, has a std library that includes some OS
    functionality. But those are wrapped in a set of functions that reside
    in one OS-specific module, that provides the same API across Windows and
    Linux.

    For example, the function 'os_getdllinst' is implemented on top of 'LoadLibrary' on Windows, and 'dlopen' on Linux.

    What I don't do is directly use LoadLibrary, and insist that people
    running it on Linux have to install some emulation library to provide
    that Windows functionality. Which wouldn't work anyway as it would also
    work with .dll files rather than .so files.

    You see the kind of thought I put into this stuff? I wish others would
    do the same! Instead of being so 'provincial'.)



    To put it differenly, you could compile program in one computer
    and get relatively small program which runs OK on different
    Windows machines because libraries it needs are already present.
    This is quite different compared to Cygwin, where you need to
    install Cygwin libraries before normal Cygwin program can run
    (I write about normal programs because actual compiler in
    Cygwin and Mingw used to be the same and with some tweaks one
    could use Cygwin compiler to produce MinGW execuatbles).


    I'm not interested in whatever Cygwin or Mingw are about.

    Oh, so you do not want to know. In such case why you started
    discussing it?

    Because it comes up everwhere that gcc is used on Windows?

    I started by saying I didn't know exactly what Mingw was. I used to
    think it was the compiler, and indeed obtaining gcc used to involve
    visiting sites where 'mingw' or 'mingw64' names figured heavily.

    Some of my gcc files also have 'mingw32' in them; I don't know why:

    c:\tdm\bin>fc gcc.exe x86_64-w64-mingw32-gcc.exe
    Comparing files gcc.exe and X86_64-W64-MINGW32-GCC.EXE
    FC: no differences encountered

    Apparently it is to do with some boring functions discussed in parallel subthreads.

    If I were to
    use libraries not part of the OS, then it would be ones like SDL2 to get
    interesting things done. Not try and emulate bits of Linux that I'd
    never heard of.

    I mentioned one case: about 90% of code in "my" library was
    provided in fact by other libraries. So using code provided
    by other saved me a lot of work, turning something that
    otherwise could be multiyear job into reasonably small effort.

    Sure. Then just provide the binaries which somebody (or even some
    script) can build once, on a machine where everything is known to work.

    This suits Windows which has famous binary compatibility. (If there is a
    32-bit version of Windows 11, it can probably still run my 1990s 16-bit binaries!)

    To use the libraries I had to work out build process, thanks
    to tools it was very easy.

    Thanks to tools designed to work within a labyrinthine build
    environment, working within such an environment.

    Purely as an exercise, could you have produced a minimal viable bundle
    of source files, compiler (or recommendation for one), readme and what
    ever else was necessary, that would work in an alien environment? Say,
    Windows.

    MinGW bundle is a good way to build such libraries. Having
    only a C compiler may be too little.

    All I can say is that if /I/ produce software expressed in C, then you
    need a C compiler to run it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Brown@21:1/5 to bart on Tue Mar 11 18:09:26 2025
    On 11/03/2025 17:23, bart wrote:
    On 11/03/2025 15:06, David Brown wrote:
    On 11/03/2025 15:24, bart wrote:

    To build open source projects, I'm happy to use an existing C
    compiler. I'm NOT happy about bending over backwards to use CYGWIN,
    MSYS2 or WSL because the developers insist on forcing their Linux
    dependencies down my throat.


    Developers can do what they like. But they shouldn't inflict their
    choices on other people, especially those using other OSes.


    I have not paid a lot of attention to this thread.  But I am curious
    here - who do you think is /forcing/ you to compile their code?

    OK, tell me where to get ready-made DLLs for GMP and LIBFFI that I can
    can use on Windows. If that's not possible then there is no choice
    (other than not to use them at all, which is what I do).


    So do you think that those projects are /forcing/ you to use their code?
    Are the folks who wrote GMP responsible for /your/ insistence on using /their/ code, without using additional tools or libraries? You want to
    use what probably amounts to hundreds of person-years of specialised
    work, for free, and you are not willing to go to the effort of
    downloading and installing a few other bits of /free/ software first, in
    order to be able to follow freely available instructions found online?

    And you blame the GMP and LIBFFI for all this? They are, after all,
    holding a gun to your head and insisting that you use their software
    while viscously and maliciously refusing to re-write their code to
    remove traces of code that rely on the platforms they use themselves.

    Or maybe it is now /my/ responsibility to find these dll's for you?

    Well, you are in luck :

    <https://packages.msys2.org/packages/mingw-w64-ucrt-x86_64-gmp> <https://packages.msys2.org/packages/mingw-w64-ucrt-x86_64-libffi>

    The compressed tarballs include the dlls.

      Why do you think it is appropriate for /you/ to demand that people
    writing open source projects (often as voluntary work) should go out
    of their way to make /your/ life easier?

    It would make everyone's life easier. Especially those who struggle to
    build that stuff on Windows.

    No, it would make /your/ life easier. The half-dozen other people who
    might want to compile gmp on Windows are probably quite capable of
    installing mys2 and mingw64 (or Cygwin, or WSL, or other preferred
    solution), and won't see a problem with doing so. They will almost
    certainly already be familiar with the pre-compiled versions that are
    easily installed.


    Windows is getting an unfairly bad reputation for building applications;
    why do you think that is?

    I don't think its reputation /is/ unfair.

    Equally, I think it is often a challenge to get software that is made specifically for Windows, to build or run on Linux. Why are you
    complaining about an open source project that is based on POSIX and
    somewhat inconvenient to build on Windows, but not about Windows
    projects that are inconvenient to build on Linux?

    It's almost like the people on Linux
    deliberately keep their build systems Linux-centric just to maintain
    that myth!

    When GMP was started, Windows was solidly 16-bit. The scientific,
    mathematical and engineering world used Unix of various flavours -
    Windows was for playing Minesweeper and writing crap with Word, and
    Linux was just announced on Usenet.

    It is almost like people use the systems they want to use, and put
    little effort into support for systems they have no interest in and
    their users are not interested in. This goes both ways - it is at least
    as much a "Windows thing" as it is a "*nix thing".


     Why are you trying to inflict /your/ choices on them?


    <snip whining that doesn't answer the question>

    The world does not revolve around you. Get over it.

    If you want to use GMP on Windows, install mingw64 - or put the effort
    in yourself to make it compile with whatever weird and limited tools you
    feel are so wonderful.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to bart on Tue Mar 11 16:49:07 2025
    On 2025-03-11, bart <[email protected]> wrote:
    Windows is getting an unfairly bad reputation for building applications;
    why do you think that is? It's almost like the people on Linux
    deliberately keep their build systems Linux-centric just to maintain
    that myth!

    I worked as a Windows-only dev in a Windows-only shop. Visual C++
    project files and builds were a builds were an incredible shitshow,
    even though everything was for the one and only platform.

    At one point I tried using make. That's when I found out hat the CL.EXE compiler by itself had no idea where the include and library files are
    at all; I had to specify all those details, LOL.

    Open source developers presumably want people to use their programs,
    even those working on Windows. And I mentioned elsewhere that 70% of

    Not all open source developers care about Windows. Some do. The GNU
    project started in the mid 1980s by rewriting Unix user space, without
    its own kernel. Stallman justified the use of the proprietary platforms
    because a complete free platform was not available. Today, the GNU
    project de-emphasizes support for proprietary platforms; they should
    not be used except to study them to replicate their features.

    desktop systems and laptops use Windows. So why alienate those people?

    Windows *users* don't have to build anything. In fact, many open source projects go out of their way for Windows users, giving them a nice
    installer.

    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @[email protected]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to David Brown on Tue Mar 11 16:23:25 2025
    On 11/03/2025 15:06, David Brown wrote:
    On 11/03/2025 15:24, bart wrote:

    To build open source projects, I'm happy to use an existing C
    compiler. I'm NOT happy about bending over backwards to use CYGWIN,
    MSYS2 or WSL because the developers insist on forcing their Linux
    dependencies down my throat.


    Developers can do what they like. But they shouldn't inflict their
    choices on other people, especially those using other OSes.


    I have not paid a lot of attention to this thread.  But I am curious
    here - who do you think is /forcing/ you to compile their code?

    OK, tell me where to get ready-made DLLs for GMP and LIBFFI that I can
    can use on Windows. If that's not possible then there is no choice
    (other than not to use them at all, which is what I do).


      Why do
    you think it is appropriate for /you/ to demand that people writing open source projects (often as voluntary work) should go out of their way to
    make /your/ life easier?

    It would make everyone's life easier. Especially those who struggle to
    build that stuff on Windows.

    Windows is getting an unfairly bad reputation for building applications;
    why do you think that is? It's almost like the people on Linux
    deliberately keep their build systems Linux-centric just to maintain
    that myth!

     Why are you trying to inflict /your/ choices
    on them?

    What choices are those? To have to supply, with a multi-MB source
    download, a text file listing the files I have to submit to the compiler?

    Would it really be that onerous? Such a file would also work on Linux
    and save everyone a lot of time.

    Open source developers presumably want people to use their programs,
    even those working on Windows. And I mentioned elsewhere that 70% of
    desktop systems and laptops use Windows. So why alienate those people?


    It is very strange to me that you feel open source developers should bow
    to your preferences and famously restricted build requirements.

    Requiring a 35,000 configure script is a ******* joke even on Linux. The mystery is that no one seems to care. Maybe everyone is so inured to
    this stuff now that they think it's a routine necessity.

    It's only with the POV from a different environment that you see what a
    load of rubbish it really is.

    People STILL don't get that many just want to do a one-off build of some software to use, not tinker with the source code. And for that, the
    source bundle can be vastly simplified.

    Do even open source developers not take pride in their work? They go to
    the trouble of creating a system that can turn a sprawling set of files
    into a small number of binaries.

    But applying the same approach to producing a compact set of source
    files for a streamlined build is beyond them?


    If someone wants to write software that only works on Windows, that's
    their choice.  If I want to use it on Linux, I may have to re-write
    parts of it, or use Wine, or Mono, or perhaps be unable to use it at
    all.  That's fair enough.  The same applies if I - or anyone else - want
    to use software written for Linux on Windows.  It doesn't matter if
    making the code cross-platform or independent of a particular library,
    header or tool would have been a big job or a small job.  I have no
    right to complain that an open source project is hard for me to build on
    my chosen system - and neither do you.

    It could be hard to build on Linux too. Certainly it can waste a
    considerable amount of resources.

    And yes, you certainly can give feedback even to open source developers.

    Long ago I complained about Seed7 being hard to build from source on
    Windows, and now a prebuilt binary is available.

    If my stuff was open source intended to be built on a user's machine, I
    could give priority to making that as simple and effortless as possible.
    I would listen to feedback.

    (My work is not closed source but I don't encourage users now. I'm not
    well enough to provide support.)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to David Brown on Tue Mar 11 17:47:24 2025
    On 11/03/2025 17:09, David Brown wrote:
    On 11/03/2025 17:23, bart wrote:
    On 11/03/2025 15:06, David Brown wrote:
    On 11/03/2025 15:24, bart wrote:

    To build open source projects, I'm happy to use an existing C
    compiler. I'm NOT happy about bending over backwards to use CYGWIN,
    MSYS2 or WSL because the developers insist on forcing their Linux
    dependencies down my throat.


    Developers can do what they like. But they shouldn't inflict their
    choices on other people, especially those using other OSes.


    I have not paid a lot of attention to this thread.  But I am curious
    here - who do you think is /forcing/ you to compile their code?

    OK, tell me where to get ready-made DLLs for GMP and LIBFFI that I can
    can use on Windows. If that's not possible then there is no choice
    (other than not to use them at all, which is what I do).


    So do you think that those projects are /forcing/ you to use their code?
     Are the folks who wrote GMP responsible for /your/ insistence on
    using /their/ code, without using additional tools or libraries?  You
    want to use what probably amounts to hundreds of person-years of
    specialised work, for free, and you are not willing to go to the effort
    of downloading and installing a few other bits of /free/ software first,
    in order to be able to follow freely available instructions found online?

    And you blame the GMP and LIBFFI for all this?  They are, after all,
    holding a gun to your head and insisting that you use their software
    while viscously and maliciously refusing to re-write their code to
    remove traces of code that rely on the platforms they use themselves.

    Or maybe it is now /my/ responsibility to find these dll's for you?

    Well, you are in luck :

    <https://packages.msys2.org/packages/mingw-w64-ucrt-x86_64-gmp> <https://packages.msys2.org/packages/mingw-w64-ucrt-x86_64-libffi>

    The compressed tarballs include the dlls.

    I downloaded a couple of large files, including mingw64-x86_64-gmp-6.3.0-1-src.tar, but found no trace of any DLL files.

    (But I'm pleased that the GMP configure script hasn't grown beyond 30583
    lines. When they manage 0 lines, let me know.)

    Meanwhile here is the library *I* had to use instead:

    https://github.com/sal55/langs/tree/master/bignum

    There are 4 files:

    bignum.c Source code
    bignum.h Header provides the API
    bignum.dll Prebuilt binary
    pid.c Demo to show it works

    You can build bignum.c into the .dll yourself (sorry, I don't have a 40,000-line configure script or massive makefile for that, you'll have
    to figure it out yourself!), or compile it into your application.

    The demo (shows digits of pi) is built like this:

    tcc pid.c bignum.dll

    This is what simplicity looks like.

    (GMP now includes 'minigmp', which is one-file version plus headers. Performance is roughly on a par with my library.

    However my library uses decimal representation, and includes arbitrary precision floating point.)

    Oh, and it's open source and is in public domain.

    <snip rest of your post>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael S@21:1/5 to bart on Tue Mar 11 19:34:20 2025
    On Tue, 11 Mar 2025 16:23:25 +0000
    bart <[email protected]> wrote:


    OK, tell me where to get ready-made DLLs for GMP and LIBFFI that I
    can can use on Windows.


    May be, here?
    https://github.com/ShiftMediaProject/gmp/releases

    Of course, nobody tested them with compilers others than Microsoft's so
    success with tcc is not guaranteed.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael S@21:1/5 to bart on Tue Mar 11 20:09:11 2025
    On Tue, 11 Mar 2025 17:47:24 +0000
    bart <[email protected]> wrote:

    On 11/03/2025 17:09, David Brown wrote:
    On 11/03/2025 17:23, bart wrote:
    On 11/03/2025 15:06, David Brown wrote:
    On 11/03/2025 15:24, bart wrote:

    To build open source projects, I'm happy to use an existing C
    compiler. I'm NOT happy about bending over backwards to use
    CYGWIN, MSYS2 or WSL because the developers insist on forcing
    their Linux dependencies down my throat.


    Developers can do what they like. But they shouldn't inflict
    their choices on other people, especially those using other OSes.


    I have not paid a lot of attention to this thread.  But I am
    curious here - who do you think is /forcing/ you to compile their
    code?

    OK, tell me where to get ready-made DLLs for GMP and LIBFFI that I
    can can use on Windows. If that's not possible then there is no
    choice (other than not to use them at all, which is what I do).


    So do you think that those projects are /forcing/ you to use their
    code? Are the folks who wrote GMP responsible for /your/ insistence
    on using /their/ code, without using additional tools or libraries?
    You want to use what probably amounts to hundreds of person-years
    of specialised work, for free, and you are not willing to go to the
    effort of downloading and installing a few other bits of /free/
    software first, in order to be able to follow freely available
    instructions found online?

    And you blame the GMP and LIBFFI for all this?  They are, after
    all, holding a gun to your head and insisting that you use their
    software while viscously and maliciously refusing to re-write their
    code to remove traces of code that rely on the platforms they use themselves.

    Or maybe it is now /my/ responsibility to find these dll's for you?

    Well, you are in luck :

    <https://packages.msys2.org/packages/mingw-w64-ucrt-x86_64-gmp> <https://packages.msys2.org/packages/mingw-w64-ucrt-x86_64-libffi>

    The compressed tarballs include the dlls.

    I downloaded a couple of large files, including mingw64-x86_64-gmp-6.3.0-1-src.tar, but found no trace of any DLL
    files.

    (But I'm pleased that the GMP configure script hasn't grown beyond
    30583 lines. When they manage 0 lines, let me know.)

    Meanwhile here is the library *I* had to use instead:

    https://github.com/sal55/langs/tree/master/bignum

    There are 4 files:

    bignum.c Source codeI
    bignum.h Header provides the API
    bignum.dll Prebuilt binary
    pid.c Demo to show it works

    You can build bignum.c into the .dll yourself (sorry, I don't have a 40,000-line configure script or massive makefile for that, you'll
    have to figure it out yourself!), or compile it into your application.

    The demo (shows digits of pi) is built like this:

    tcc pid.c bignum.dll

    This is what simplicity looks like.

    (GMP now includes 'minigmp', which is one-file version plus headers. Performance is roughly on a par with my library.

    However my library uses decimal representation, and includes
    arbitrary precision floating point.)

    Oh, and it's open source and is in public domain.

    <snip rest of your post>


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael S@21:1/5 to bart on Tue Mar 11 20:17:57 2025
    On Tue, 11 Mar 2025 17:47:24 +0000
    bart <[email protected]> wrote:

    Performance is roughly on a par with my library.


    You can not appreciate performance of performace of GMP until you use
    it with BIG numbers. Not 100 or 1,000 digits, although for 1,000
    digits it likely beats your library by a good margin. Try to multiply
    numbers with 100,000 or more digits. Then you will see really massive difference.
    As to floating-point, GMP used to have it, but long ago decided that it
    is out of scope. Support for floating-point is still here for historical reasons, but for new software they recommend to use MPFR.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Brown@21:1/5 to bart on Tue Mar 11 21:20:38 2025
    On 11/03/2025 18:47, bart wrote:
    On 11/03/2025 17:09, David Brown wrote:
    On 11/03/2025 17:23, bart wrote:
    On 11/03/2025 15:06, David Brown wrote:
    On 11/03/2025 15:24, bart wrote:

    To build open source projects, I'm happy to use an existing C
    compiler. I'm NOT happy about bending over backwards to use CYGWIN,
    MSYS2 or WSL because the developers insist on forcing their Linux
    dependencies down my throat.


    Developers can do what they like. But they shouldn't inflict their
    choices on other people, especially those using other OSes.


    I have not paid a lot of attention to this thread.  But I am curious
    here - who do you think is /forcing/ you to compile their code?

    OK, tell me where to get ready-made DLLs for GMP and LIBFFI that I
    can can use on Windows. If that's not possible then there is no
    choice (other than not to use them at all, which is what I do).


    So do you think that those projects are /forcing/ you to use their
    code?   Are the folks who wrote GMP responsible for /your/ insistence
    on using /their/ code, without using additional tools or libraries?
    You want to use what probably amounts to hundreds of person-years of
    specialised work, for free, and you are not willing to go to the
    effort of downloading and installing a few other bits of /free/
    software first, in order to be able to follow freely available
    instructions found online?

    And you blame the GMP and LIBFFI for all this?  They are, after all,
    holding a gun to your head and insisting that you use their software
    while viscously and maliciously refusing to re-write their code to
    remove traces of code that rely on the platforms they use themselves.

    Or maybe it is now /my/ responsibility to find these dll's for you?

    Well, you are in luck :

    <https://packages.msys2.org/packages/mingw-w64-ucrt-x86_64-gmp>
    <https://packages.msys2.org/packages/mingw-w64-ucrt-x86_64-libffi>

    The compressed tarballs include the dlls.

    I downloaded a couple of large files, including mingw64-x86_64-gmp-6.3.0-1-src.tar, but found no trace of any DLL files.

    You downloaded the source tarballs, and are surprised to find they
    contain source files - not binaries? Did the abbreviation "src" not
    give you a clue?

    Try the link that is labelled "File:" - it is the msys2/mingw-w64
    tarball with libgmp-10.dll and all the other files shown in the list at
    the bottom of the page, under "Files:".

    Now, it may be that those dll's rely on other dll's that are a standard
    part of the msys2 packaging - that's up to you to figure out, since you
    don't want to use a convenient setup.

    The page also has a link to a page on a site called
    "release-monitoring.org", which again has a link to a page on "cran.r-project.org" :

    <https://cran.r-project.org/web/packages/gmp/index.html>

    This also has Windows binaries for gmp. I leave it up to you to figure
    out which file you should be downloading, and to check if the dll is
    directly suitable for you.



    (But I'm pleased that the GMP configure script hasn't grown beyond 30583 lines. When they manage 0 lines, let me know.)

    Meanwhile here is the library *I* had to use instead:

      https://github.com/sal55/langs/tree/master/bignum


    It is not exactly comparable, is it?

    If all you need is some simple arithmetic done in a naïve school long multiplication way, then the code is fine. Your code is a reasonably
    clear and straightforward implementation of that. If you have no need
    of more than that, there is little point in going for something as
    powerful as GMP - it is probably faster to write such code than it is to
    learn how to use GMP.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to bart on Tue Mar 11 20:37:14 2025
    On Tue, 11 Mar 2025 14:24:15 +0000, bart wrote:

    On 11/03/2025 01:33, Waldek Hebisch wrote:

    You apparently do not get fact that people want tools to automate
    various routine tasks.

    What routine task is this? I'm talking exclusively about turning a bunch
    of source files in some language (here it is C) into an executable
    binary.

    Interesting that you don’t see an app build as a “routine task”.

    Think of how often, while developing a program in (at least partly) a
    compiled a language, you have to go through

    edit → build → run → crash

    ad nauseam.

    This is why we have makefiles, because usually the whole source does not
    need to be recompiled each time, only the parts that have changed since
    the last run.

    However, what I'm arguing about is that this simple task has become unnecessarily elaborate on OSes like Linux, by introducing makefiles, OS-specific scripts, and OS-specific utilities.

    And yet all that automation makes it quite easy to build quite complex
    apps on Linux. You were the one who had trouble on Windows.

    If scripts are going to be used, then use them at the developer site
    only, and make the script generate the streamlined set of files for the particular platform of interest.

    Funny, that’s how Autotools works (generating the configure script from
    the much more human-readable configure.ac source), and yet you were
    complaining about what an unreadable blob it produced.

    It should not rely on anything that is not native to the target
    platform.

    Unfortunately that rules out developing for Windows completely, since
    there is essentially nothing development-related that is native to
    Windows. Everything has to be added on.

    To build open source projects, I'm happy to use an existing C compiler.
    I'm NOT happy about bending over backwards to use CYGWIN, MSYS2 or WSL because the developers insist on forcing their Linux dependencies down
    my throat.

    Beggars can’t be choosers. As long as you don’t have the skills or
    patience to actually contribute to such development, you have to accept
    what you get.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Muttley on Tue Mar 11 20:52:19 2025
    On Tue, 11 Mar 2025 08:34:43 -0000 (UTC), Muttley wrote:

    On Mon, 10 Mar 2025 21:38:35 -0000 (UTC)
    Lawrence D'Oliveiro <[email protected]d> wrote:

    the numbers of those FDs lie beyond the upper limit of the array, you’re >>stuffed.

    Any descriptor created that had a value greater than select() could cope
    with would break a lot of old code so although I have no proof, I'd bet
    money on the kernel/libc authors taking this into account when
    allocating user space descriptor values.

    You really want to bet money? From
    <https://manpages.debian.org/select(2)>:

    BUGS

    POSIX allows an implementation to define an upper limit,
    advertised via the constant FD_SETSIZE, on the range of file
    descriptors that can be specified in a file descriptor set. The
    Linux kernel imposes no fixed limit, but the glibc implementation
    makes fd_set a fixed-size type, with FD_SETSIZE defined as 1024,
    and the FD_*() macros operating according to that limit.

    Default settings on my current system:

    ldo@theon:~> prlimit -n
    RESOURCE DESCRIPTION SOFT HARD UNITS
    NOFILE max number of open files 1024 524288 files

    How much are you going to pay?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Harnden@21:1/5 to bart on Tue Mar 11 21:26:43 2025
    On 11/03/2025 21:18, bart wrote:
    The above gmp DLL is 666KB

    The Big Number of the Beast.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to David Brown on Tue Mar 11 21:18:34 2025
    On 11/03/2025 20:20, David Brown wrote:
    On 11/03/2025 18:47, bart wrote:

    <https://packages.msys2.org/packages/mingw-w64-ucrt-x86_64-gmp>
    <https://packages.msys2.org/packages/mingw-w64-ucrt-x86_64-libffi>

    The compressed tarballs include the dlls.

    I downloaded a couple of large files, including mingw64-x86_64-
    gmp-6.3.0-1-src.tar, but found no trace of any DLL files.

    You downloaded the source tarballs, and are surprised to find they
    contain source files - not binaries?  Did the abbreviation "src" not
    give you a clue?

    You said the 'tarballs include the dlls'. I associate tarballs with
    source code, so I was mildly surprised, but I looked anyway. The other
    file was mingw-packages.master.zip, but it would have taken forever to
    unzip the lot looking for one file that probably wasn't there.



    Try the link that is labelled "File:" - it is the msys2/mingw-w64
    tarball with libgmp-10.dll and all the other files shown in the list at
    the bottom of the page, under "Files:".

    So: https://mirror.msys2.org/mingw/ucrt64/mingw-w64-ucrt-x86_64-gmp-6.3.0-2-any.pkg.tar.zst,
    obviously.


    Meanwhile here is the library *I* had to use instead:

       https://github.com/sal55/langs/tree/master/bignum


    It is not exactly comparable, is it?

    No. Mine was available when I needed it a decade or so ago. GMP dlls
    were everywhere, mostly on dodgy-looking sites but every one was
    different. Then you had the job of finding a matching gmp.h file.

    If all you need is some simple arithmetic done in a naïve school long multiplication way, then the code is fine.

    I needed support for big numbers in my interpreter. My product is well-integrated, and represents 5% of the 250KB interpreter size. The
    above gmp DLL is 666KB so is a poor match.


    Your code is a reasonably
    clear and straightforward implementation of that.  If you have no need
    of more than that, there is little point in going for something as
    powerful as GMP - it is probably faster to write such code than it is to learn how to use GMP.

    My library has some special features such as using decimal, and
    supporting arbitrary floating point within the same type. This is it in
    use within my scripting language:

    a := 2e1'000'000'000L
    b := 3e1'000'000'000L

    println a+b
    println a*b
    println a/b

    Output is:

    5.0e1000000000
    6.0e2000000000
    0.666666...666 (default precision is 300 decimals)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Michael S on Tue Mar 11 21:37:36 2025
    On 11/03/2025 18:17, Michael S wrote:
    On Tue, 11 Mar 2025 17:47:24 +0000
    bart <[email protected]> wrote:

    Performance is roughly on a par with my library.


    You can not appreciate performance of performace of GMP until you use
    it with BIG numbers. Not 100 or 1,000 digits, although for 1,000
    digits it likely beats your library by a good margin. Try to multiply
    numbers with 100,000 or more digits. Then you will see really massive difference.

    I meant performance of mini-gmp. But I just tried it on a couple of
    tests, and mini-gmp was 80% faster, when both are optimised the same way.

    But both are magnitudes slower than the full GMP, at least with bigger precision. (The dlls you linked didn't work; the one that David Brown
    vaguely linked to, which I eventually found, did work.) However I needed
    all these years ago.

    As to floating-point, GMP used to have it, but long ago decided that it
    is out of scope. Support for floating-point is still here for historical reasons, but for new software they recommend to use MPFR.


    There are special issues with arbitrary precision floating point. For
    example, if, you do 1.0/3.0, it scan spend forever working out 0.3333...
    until it runs out of memory, or just takes too long.

    I only support basic arithmetic, with configurable caps on precision.
    Doing stuff like trig functions, for which I used to use Taylor Series,
    would be challenging (in finding something that converges to a specific precision in a reasonable time).

    But the whole thing is just a bit of fun.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to bart on Tue Mar 11 21:51:24 2025
    bart <[email protected]> writes:
    On 11/03/2025 17:09, David Brown wrote:
    On 11/03/2025 17:23, bart wrote:

    <https://packages.msys2.org/packages/mingw-w64-ucrt-x86_64-gmp>
    <https://packages.msys2.org/packages/mingw-w64-ucrt-x86_64-libffi>

    The compressed tarballs include the dlls.

    I downloaded a couple of large files, including >mingw64-x86_64-gmp-6.3.0-1-src.tar, but found no trace of any DLL files.

    Why would you expect an archive with 'src' in the name to have a DLL file?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to bart on Tue Mar 11 21:43:10 2025
    bart <[email protected]> writes:
    On 11/03/2025 15:06, David Brown wrote:
    On 11/03/2025 15:24, bart wrote:

    To build open source projects, I'm happy to use an existing C
    compiler. I'm NOT happy about bending over backwards to use CYGWIN,
    MSYS2 or WSL because the developers insist on forcing their Linux
    dependencies down my throat.


    Developers can do what they like. But they shouldn't inflict their
    choices on other people, especially those using other OSes.


    I have not paid a lot of attention to this thread.  But I am curious
    here - who do you think is /forcing/ you to compile their code?

    OK, tell me where to get ready-made DLLs for GMP and LIBFFI that I can
    can use on Windows.

    Why do you think anybody owes you anything? The developers of those libraries, mostly working for free, make the source available for
    for free. They are required to make -your- life easy.

    Here's a thought - why don't you write your own multiprecision
    library and release it as open source?



    It would make everyone's life easier.

    Highly doubtful, most projects are far more complex than your
    simple single-source file world.




    Windows is getting an unfairly bad reputation for building applications;

    Because we've used it, and it sucks?

    What choices are those? To have to supply, with a multi-MB source
    download, a text file listing the files I have to submit to the compiler?

    Pretty much every open source project out there, particularly those with
    large source-bases actually provide a text file listing the files you
    need to compile. It's called "Makefile".

    Would it really be that onerous? Such a file would also work on Linux
    and save everyone a lot of time.

    Indeed, Makefiles save everyone a lot of time.

    Further repetative complaints elided.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Lawrence D'Oliveiro on Tue Mar 11 22:02:37 2025
    On 11/03/2025 20:37, Lawrence D'Oliveiro wrote:
    On Tue, 11 Mar 2025 14:24:15 +0000, bart wrote:

    On 11/03/2025 01:33, Waldek Hebisch wrote:

    You apparently do not get fact that people want tools to automate
    various routine tasks.

    What routine task is this? I'm talking exclusively about turning a bunch
    of source files in some language (here it is C) into an executable
    binary.

    Interesting that you don’t see an app build as a “routine task”.

    Think of how often, while developing a program in (at least partly) a compiled a language, you have to go through

    edit → build → run → crash

    ad nauseam.

    This is why we have makefiles, because usually the whole source does not
    need to be recompiled each time, only the parts that have changed since
    the last run.

    That has never, ever been a problem. In the past, using independent compilation, because I was familiar with what need to be recompiled
    (altough a full build was only seconds anyway).

    And now a full build is more or less instant using my own tools.

    For me, independent compilation (of the modules of one binary) is old
    hat. Linking is old hat (whatever it does, I replaced it in about 1983).

    You have machines now that are 1000 times faster than what I was using,
    and yet compilation time is still be an issue unless you use all these
    tricks?

    Apparently the answer is to pile on more layers of complexity, that'll
    speed it up!

    (Hint: if your car can only do 3mph, then you need to get a faster car,
    not either look for short cuts, or avoid going anywhere.)


    However, what I'm arguing about is that this simple task has become
    unnecessarily elaborate on OSes like Linux, by introducing makefiles,
    OS-specific scripts, and OS-specific utilities.

    And yet all that automation makes it quite easy to build quite complex
    apps on Linux. You were the one who had trouble on Windows.

    If scripts are going to be used, then use them at the developer site
    only, and make the script generate the streamlined set of files for the
    particular platform of interest.

    Funny, that’s how Autotools works (generating the configure script from
    the much more human-readable configure.ac source), and yet you were complaining about what an unreadable blob it produced.

    The output would be something like this, to build a standalone Lua.exe
    on Windows for example:

    gcc -O3 -o lua lua.c lapi.c lcode.c lctype.c ldebug.c ldo.c ldump.c
    lfunc.c lgc.c llex.c lmem.c lobject.c lopcodes.c lparser.c lstate.c
    lstring.c ltable.c ltm.c lundump.c lvm.c lzio.c lauxlib.c lbaselib.c
    lcorolib.c ldblib.c liolib.c lmathlib.c loadlib.c loslib.c lstrlib.c
    ltablib.c lutf8lib.c linit.c -lm -ldl

    It should not rely on anything that is not native to the target
    platform.

    Unfortunately that rules out developing for Windows completely, since
    there is essentially nothing development-related that is native to
    Windows. Everything has to be added on.

    You have to assume a compiler, since this is not bundled with source
    code anyway. Then, what else is there that is not source code?


    To build open source projects, I'm happy to use an existing C compiler.
    I'm NOT happy about bending over backwards to use CYGWIN, MSYS2 or WSL
    because the developers insist on forcing their Linux dependencies down
    my throat.

    Beggars can’t be choosers. As long as you don’t have the skills or patience to actually contribute to such development, you have to accept
    what you get.

    Have you actually tried it? I mean what I suggested in taking a project,
    and extracting the most basic steps. Like the invocation of gcc above.
    You might start questioning all this pointless complexity yourself.

    There's actually something magical about that gcc invocation: it works
    on both Windows and Linux. Pretty amazing, yes? (OK, I had to add the
    '-lm -ldl' bits.)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Scott Lurndal on Tue Mar 11 22:24:01 2025
    On 11/03/2025 21:43, Scott Lurndal wrote:
    bart <[email protected]> writes:
    On 11/03/2025 15:06, David Brown wrote:
    On 11/03/2025 15:24, bart wrote:

    To build open source projects, I'm happy to use an existing C
    compiler. I'm NOT happy about bending over backwards to use CYGWIN,
    MSYS2 or WSL because the developers insist on forcing their Linux
    dependencies down my throat.


    Developers can do what they like. But they shouldn't inflict their
    choices on other people, especially those using other OSes.


    I have not paid a lot of attention to this thread.  But I am curious
    here - who do you think is /forcing/ you to compile their code?

    OK, tell me where to get ready-made DLLs for GMP and LIBFFI that I can
    can use on Windows.

    Why do you think anybody owes you anything? The developers of those libraries, mostly working for free, make the source available for
    for free. They are required to make -your- life easy.

    I'm not complaining about the quality of the library. Only about
    packaging of the source code. They might be whiz numerologists and C programmers, but the build process sucks.



    Here's a thought - why don't you write your own multiprecision
    library and release it as open source?

    I did. It's only a simple one, but it will do the job, just much more
    slowly if precision gets too high.

    https://github.com/sal55/langs/tree/master/bignum


    Highly doubtful, most projects are far more complex than your
    simple single-source file world.

    Are they? The GMP DLL I finally saw is only 660KB, roughly 70Kloc. That
    is not huge.

    Windows is getting an unfairly bad reputation for building applications;

    Because we've used it, and it sucks?

    And I've used your build systems, and *they* suck. Or does only your
    opinion count?


    What choices are those? To have to supply, with a multi-MB source
    download, a text file listing the files I have to submit to the compiler?

    Pretty much every open source project out there, particularly those with large source-bases actually provide a text file listing the files you
    need to compile. It's called "Makefile".

    Sure. And next week's winning lottery numbers are contained within this
    file too:

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
    28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Chris M. Thomasson on Tue Mar 11 22:56:59 2025
    On Tue, 11 Mar 2025 14:12:01 -0700, Chris M. Thomasson wrote:

    A "traditional" server loop would block on IOCP (aka INFINITE).

    A traditional server loop (I’ve written a few) would block on one of a
    number of possible conditions occurring, e.g.

    * A new client connection coming in
    * A new request received on a client connection
    * A response ready to go out on a client connection
    * A timeout of a client connection due to inactivity
    * Some periodic housekeeping task needing to be performed

    You want things to be nondeterministic: the server loop should be able to respond immediately to the first event that comes in from whatever source,
    not based on some arbitrary ordering of entries in an array to a poll(2)-
    style call.

    Also, waiting for say 5 minutes for IO and timing out so the server
    loop in the worker threads can examine other things can be
    beneficial as well.

    It would be more efficient to have the timeout equal to the due time of
    the earliest timed task needing attention.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael S@21:1/5 to bart on Wed Mar 12 00:58:43 2025
    On Tue, 11 Mar 2025 21:37:36 +0000
    bart <[email protected]> wrote:

    On 11/03/2025 18:17, Michael S wrote:

    But both are magnitudes slower than the full GMP, at least with
    bigger precision. (The dlls you linked didn't work; the one that
    David Brown vaguely linked to, which I eventually found, did work.)
    However I needed all these years ago.


    I tried the last one (libgmp_6.2.1-4_msvc17.zip) with MSVC from VS2022.
    As expected, it worked both in DLL variant and as a static library.

    I had tcc somwhere, but don't remeber where and don't remember if it is
    on the same computer, so didn't test with it. But I would guess that
    with tcc you'd have the best chance of success with either libgmp_6.2.1-4_msvc12 or with libgmp_6.2.1-4_msvc14.

    BTW, I think that tcc is doing damage to itself by refusal to support
    ucrt variant of Microsoft's C RTL. IMHO, it's at most a week of work,
    and will improve their product quite a lot.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to bart on Tue Mar 11 23:46:36 2025
    bart <[email protected]> writes:
    On 11/03/2025 20:37, Lawrence D'Oliveiro wrote:
    On Tue, 11 Mar 2025 14:24:15 +0000, bart wrote:

    On 11/03/2025 01:33, Waldek Hebisch wrote:

    You apparently do not get fact that people want tools to automate
    various routine tasks.

    What routine task is this? I'm talking exclusively about turning a bunch >>> of source files in some language (here it is C) into an executable
    binary.

    Interesting that you don’t see an app build as a “routine task”.

    Think of how often, while developing a program in (at least partly) a
    compiled a language, you have to go through

    edit → build → run → crash

    ad nauseam.

    This is why we have makefiles, because usually the whole source does not
    need to be recompiled each time, only the parts that have changed since
    the last run.

    That has never, ever been a problem.

    For you, perhaps. For real world large codebases, it's a huge
    win. In my case, it could cost an hour[*] everytime a small change
    is made to recompile the entire project, versus a few seconds
    to recompile a single file.

    But you've been trolling on this meme for years now.

    [*] Parallel make reduces that to about 15 minutes on a 64-core xeon.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael S@21:1/5 to bart on Wed Mar 12 01:15:54 2025
    On Tue, 11 Mar 2025 22:24:01 +0000
    bart <[email protected]> wrote:


    Are they? The GMP DLL I finally saw is only 660KB, roughly 70Kloc.
    That is not huge.


    gmp.dll that I tried minutes ago is 403,968 bytes.
    Static library libgmp.lib is a lot bigger - 4,515,340 bytes.
    I have no idea about the reasons of the difference.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Chris M. Thomasson on Wed Mar 12 00:45:36 2025
    On Tue, 11 Mar 2025 17:17:45 -0700, Chris M. Thomasson wrote:

    Have you ever used IOCP before?

    Never done Windows programming, and judging from its limitations, I never
    want to.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Michael S on Wed Mar 12 00:43:51 2025
    On Wed, 12 Mar 2025 00:58:43 +0200, Michael S wrote:

    BTW, I think that tcc is doing damage to itself by refusal to support
    ucrt variant of Microsoft's C RTL.

    Damaging their market share and hurting their revenues?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Chris M. Thomasson on Wed Mar 12 03:12:01 2025
    On Tue, 11 Mar 2025 20:04:30 -0700, Chris M. Thomasson wrote:

    IOCP works fine ...

    But not with pipes.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tim Rentsch@21:1/5 to Scott Lurndal on Tue Mar 11 21:18:41 2025
    [email protected] (Scott Lurndal) writes:

    Why do you think anybody owes you anything? The developers of
    [open source] libraries, mostly working for free, make the source
    available for for free. They are required to make -your- life
    easy.

    If they are required to make my life easy they aren't doing
    a very good job. ;)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Chris M. Thomasson on Wed Mar 12 06:50:46 2025
    On Tue, 11 Mar 2025 21:22:22 -0700, Chris M. Thomasson wrote:

    On 3/11/2025 8:12 PM, Lawrence D'Oliveiro wrote:

    On Tue, 11 Mar 2025 20:04:30 -0700, Chris M. Thomasson wrote:

    IOCP works fine ...

    But not with pipes.

    Never tried them with pipes, only sockets.

    The Python developers have tried. They ended up creating two event
    loop implementations on Windows, neither of which quite covers all the
    bases <https://docs.python.org/3/library/asyncio-eventloop.html#event-loop-implementations>.

    According to the platform support notes <https://docs.python.org/3/library/asyncio-platforms.html>,
    SelectorEventLoop can only handle sockets (and has a limit of 512 of
    them), not pipes or subprocesses. ProactorEventLoop uses your
    favourite IOCP, but does not allow the addition of reader/writer
    callbacks for caller-supplied file descriptors.

    Neither one supports signal handlers. And there seems to be no Windows equivalent to Unix-style sockets.

    So on Windows, it’s a question of choosing which one is the least bad
    fit for your needs, and hoping you can make that work over your entire
    program.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Michael S on Wed Mar 12 06:56:02 2025
    On Tue, 11 Mar 2025 13:49:31 +0200, Michael S wrote:

    Do you really think that many Linux-originated Open Source projects that
    can not be built easily on Windows/Msys2 are easy to build on such OSes like:
    1. zOS (it is certified UNIX, but somehow I am not sure that it's
    enough)
    2. VMS

    Both lost causes.

    3. iOS (it has BSD-derived kernel, but somehow I am not sure that it's enough)

    Given Apple’s restrictions on what is and isn’t allowed to run on its mobile OSes, is it even worth trying?

    4. Android (it has Linux kernel, but somehow I am not sure that it's
    enough. Although do expect that rate of success would be higher than in
    cases 1,2 and 3).

    Funnily enough, Google is ahead of you. It is allowing
    suitably-specced Android devices to run a Debian userland <https://www.zdnet.com/article/your-android-phone-will-run-debian-linux-soon-like-some-pixels-already-can/>.

    So yes, I imagine it should be possible to get most existing apps that
    work on regular Linux distros to run on that.

    PS: Anybody remember the Nokia N9?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to bart on Wed Mar 12 07:00:07 2025
    On Tue, 11 Mar 2025 11:21:51 +0000, bart wrote:

    There are two main environments A and B, and it manages to build on A, because the build process depends entirely on shell commands, utilities
    and libraries that are exclusive to A.

    Remember A is not just one platform, it is a whole family of
    platforms, running on a broad range of processor architectures
    (everything that matters nowadays, and a few others besides), based on
    an official open standard (POSIX). You can’t say the same for platform
    B, which just about manages to work on one architecture (with a lot of
    ongoing maintenance effort) and is struggling to gain a foothold on a
    second one.

    BTW see: https://gs.statcounter.com/os-market-share/desktop/worldwide

    Statcounter. You realize their numbers are pretty much junk, right? <https://www.zdnet.com/article/statcounters-windows-market-share-data-is-not-accurate-or-reliable-and-i-can-prove-it/>

    See also my comments about the difference between passive users and
    active contributors.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Wed Mar 12 08:11:45 2025
    On Tue, 11 Mar 2025 20:52:19 -0000 (UTC)
    Lawrence D'Oliveiro <[email protected]d> wibbled:
    On Tue, 11 Mar 2025 08:34:43 -0000 (UTC), Muttley wrote:

    On Mon, 10 Mar 2025 21:38:35 -0000 (UTC)
    Lawrence D'Oliveiro <[email protected]d> wrote:

    the numbers of those FDs lie beyond the upper limit of the array, you’re >>>stuffed.

    Any descriptor created that had a value greater than select() could cope
    with would break a lot of old code so although I have no proof, I'd bet
    money on the kernel/libc authors taking this into account when
    allocating user space descriptor values.

    You really want to bet money? From
    <https://manpages.debian.org/select(2)>:

    BUGS

    POSIX allows an implementation to define an upper limit,
    advertised via the constant FD_SETSIZE, on the range of file
    descriptors that can be specified in a file descriptor set. The
    Linux kernel imposes no fixed limit, but the glibc implementation
    makes fd_set a fixed-size type, with FD_SETSIZE defined as 1024,
    and the FD_*() macros operating according to that limit.

    Default settings on my current system:

    ldo@theon:~> prlimit -n
    RESOURCE DESCRIPTION SOFT HARD UNITS
    NOFILE max number of open files 1024 524288 files

    How much are you going to pay?

    Nothing, because who knows what libc will do if the descriptor exceeds
    that soft limit. It may try again to get a lower value.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael S@21:1/5 to Chris M. Thomasson on Wed Mar 12 11:08:13 2025
    On Tue, 11 Mar 2025 14:18:32 -0700
    "Chris M. Thomasson" <[email protected]> wrote:

    On 3/11/2025 9:23 AM, bart wrote:
    On 11/03/2025 15:06, David Brown wrote:
    On 11/03/2025 15:24, bart wrote:

    To build open source projects, I'm happy to use an existing C
    compiler. I'm NOT happy about bending over backwards to use
    CYGWIN, MSYS2 or WSL because the developers insist on forcing
    their Linux dependencies down my throat.


    Developers can do what they like. But they shouldn't inflict
    their choices on other people, especially those using other OSes.


    I have not paid a lot of attention to this thread.  But I am
    curious here - who do you think is /forcing/ you to compile their
    code?

    OK, tell me where to get ready-made DLLs for GMP and LIBFFI that I
    can can use on Windows. If that's not possible then there is no
    choice (other than not to use them at all, which is what I
    do).[...]

    FWIW, vcpkg can build them all for you and optionally integrate them directly into MSVC.

    You can not convince Bart to use Visual Studio Build Tools, with or
    without vcpkg.
    He sees it aa heresy of similar proportion to installation of msys2
    and systematic use pacman package manager.
    That is, he can install either, but only for sake of complaining
    (rightly) that the thing is bloated out of proportion. Any other usage considered surrender to forces of evil.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to David Brown on Wed Mar 12 11:14:08 2025
    On 12/03/2025 10:37, David Brown wrote:
    On 11/03/2025 22:18, bart wrote:

    I needed support for big numbers in my interpreter. My product is
    well-integrated, and represents 5% of the 250KB interpreter size. The
    above gmp DLL is 666KB so is a poor match.


    Out of curiosity - how often are such big numbers needed and used with
    your interpreter, excluding demos to show how to use big numbers? 64-bit arithmetic is enough for the huge majority of purposes outside of cryptography and mathematics, and 128-bit arithmetic covers almost all
    of the rest.  Your code is not suitable for cryptography or mathematics.
     So what is it used for?  And could it have been handled much more
    simply by using 128-bit fixed sizes?


    How often are big numbers used in Python? There, its integer type
    transparently overflows into a big integer when needed (so C-style
    algorithms that rely on being masked to 64 bits won't work).

    In my language you have to explicitly request the bignum type. It is
    used mainly for recreational code. Or sometimes to get accurate
    reference results to compare against when working with 64-bit ints and
    floats.

    (How big is a 128-bit range for example? I can just do 'print 2L**128'.)

    I did have 128-bit support in my implementation language once, better
    than gcc's in C since it also supported literals, and Print. I did think
    about using that instead of, or as well as, bignums. Maybe as the
    default int type instead of 64 bits.

    But, as you say, real needs beyond 64 bits are rare. When it is needed,
    then they can be arbitrary large (forget 2**128, what about 2**1000000?
    Or you want to look at Fibonacci numbers beyond fib(92) which is the
    limit with int64).

    In the end I dropped 128-bit numbers, because the only use-case, apart
    from bragging about it, was supporting 128 bits in the self-hosted compiler.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Brown@21:1/5 to bart on Wed Mar 12 11:37:28 2025
    On 11/03/2025 22:18, bart wrote:
    On 11/03/2025 20:20, David Brown wrote:
    On 11/03/2025 18:47, bart wrote:

    <https://packages.msys2.org/packages/mingw-w64-ucrt-x86_64-gmp>
    <https://packages.msys2.org/packages/mingw-w64-ucrt-x86_64-libffi>

    The compressed tarballs include the dlls.

    I downloaded a couple of large files, including mingw64-x86_64-
    gmp-6.3.0-1-src.tar, but found no trace of any DLL files.

    You downloaded the source tarballs, and are surprised to find they
    contain source files - not binaries?  Did the abbreviation "src" not
    give you a clue?

    You said the 'tarballs include the dlls'. I associate tarballs with
    source code, so I was mildly surprised, but I looked anyway. The other
    file was mingw-packages.master.zip, but it would have taken forever to
    unzip the lot looking for one file that probably wasn't there.


    A tarball is just a bunch of files collected together. It can be
    anything - not just source code.

    There also seems to be a variety of binary packages for gmp, from the
    base package at <https://packages.msys2.org/base/mingw-w64-gmp> . These
    might be more or less appropriate, depending on the other libraries or toolchains in use.




    Try the link that is labelled "File:" - it is the msys2/mingw-w64
    tarball with libgmp-10.dll and all the other files shown in the list
    at the bottom of the page, under "Files:".

    So: https://mirror.msys2.org/mingw/ucrt64/mingw-w64-ucrt-x86_64-gmp-6.3.0-2-any.pkg.tar.zst, obviously.


    Yes.



    Meanwhile here is the library *I* had to use instead:

       https://github.com/sal55/langs/tree/master/bignum


    It is not exactly comparable, is it?

    No. Mine was available when I needed it a decade or so ago. GMP dlls
    were everywhere, mostly on dodgy-looking sites but every one was
    different. Then you had the job of finding a matching gmp.h file.

    Based on the "view changes" page, the msys2 GMP binaries have been
    around since about 2013. (Again, I have no idea of their suitability or compatibility for your needs.) And the package contains a gmp.h file.

    I am happy to believe that it is easier to get such packages now than it
    was a decade ago - I had no interest in searching for them at that time,
    and no interest in them now. If I need to use GMP on Windows, I can
    just install it with msys2 (in fact I see it is already installed on my
    Windows system). Before msys2, I could have got it from msys or Cygwin.
    Someone else has already done the work of porting and compiling to
    make it work on Windows - why would I bother trying to duplicate that
    effort?


    If all you need is some simple arithmetic done in a naïve school long
    multiplication way, then the code is fine.

    I needed support for big numbers in my interpreter. My product is well-integrated, and represents 5% of the 250KB interpreter size. The
    above gmp DLL is 666KB so is a poor match.


    Out of curiosity - how often are such big numbers needed and used with
    your interpreter, excluding demos to show how to use big numbers?
    64-bit arithmetic is enough for the huge majority of purposes outside of cryptography and mathematics, and 128-bit arithmetic covers almost all
    of the rest. Your code is not suitable for cryptography or mathematics.
    So what is it used for? And could it have been handled much more
    simply by using 128-bit fixed sizes?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Brown@21:1/5 to bart on Wed Mar 12 15:58:56 2025
    On 12/03/2025 12:14, bart wrote:
    On 12/03/2025 10:37, David Brown wrote:
    On 11/03/2025 22:18, bart wrote:

    I needed support for big numbers in my interpreter. My product is
    well-integrated, and represents 5% of the 250KB interpreter size. The
    above gmp DLL is 666KB so is a poor match.


    Out of curiosity - how often are such big numbers needed and used with
    your interpreter, excluding demos to show how to use big numbers?
    64-bit arithmetic is enough for the huge majority of purposes outside
    of cryptography and mathematics, and 128-bit arithmetic covers almost
    all of the rest.  Your code is not suitable for cryptography or
    mathematics.   So what is it used for?  And could it have been handled
    much more simply by using 128-bit fixed sizes?


    How often are big numbers used in Python? There, its integer type transparently overflows into a big integer when needed (so C-style
    algorithms that rely on being masked to 64 bits won't work).


    I'd imagine they are not often used, as a proportion of Python users,
    and that 128-bit integers would be more than good enough in most
    situations. However, Python /is/ used in mathematics work, and big
    numbers are useful there. And Python numbers are, like everything in
    Python, objects - each number is already a memory allocation, a struct,
    a reference to a shared object. There's a lot of overhead even for a
    simple integer. That means there is little extra cost for having the possibility of big numbers if the user wants them. Similarly, the rest
    of Python is so large that the incremental cost for using shared GMP
    libraries (which are likely already installed on many systems) is minor.
    And of course Python is used by millions - including people who
    regularly need large integers. Your interpreter is used by you.

    So again, how often do /you/ need big numbers in /your/ language?


    (I'm not sure what you are talking about with "C-style algorithms that
    rely on being masked to 64-bits". Are you suggesting that if badly
    written C code is translated directly into bad Python code, it might not
    work?)



    In my language you have to explicitly request the bignum type. It is
    used mainly for recreational code. Or sometimes to get accurate
    reference results to compare against when working with 64-bit ints and floats.

    (How big is a 128-bit range for example? I can just do 'print 2L**128'.)

    I did have 128-bit support in my implementation language once, better
    than gcc's in C since it also supported literals, and Print. I did think about using that instead of, or as well as, bignums. Maybe as the
    default int type instead of 64 bits.

    But, as you say, real needs beyond 64 bits are rare. When it is needed,
    then they can be arbitrary large (forget 2**128, what about 2**1000000?
    Or you want to look at Fibonacci numbers beyond fib(92) which is the
    limit with int64).

    In the end I dropped 128-bit numbers, because the only use-case, apart
    from bragging about it, was supporting 128 bits in the self-hosted
    compiler.

    Whereas in your interpreted language, the only reason for having
    anything bigger than 64-bits seems to be for bragging about it. If you
    think that is worth the effort, that's fine - I've nothing against doing something like this for the fun of it. But it seems strange to get so
    worked up about how the GMP authors are forcing you to use dependencies
    you don't want, and forcing you to write your own bignum code, when all
    you really want is to be able to tell your users - you alone - that you
    support bignums so that you can calculate 2 ^ 128 and fib(92). It's a
    lot of effort, and a lot of aggravation, for extremely little use.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to David Brown on Wed Mar 12 15:32:14 2025
    On 12/03/2025 14:58, David Brown wrote:
    On 12/03/2025 12:14, bart wrote:
    On 12/03/2025 10:37, David Brown wrote:
    On 11/03/2025 22:18, bart wrote:

    I needed support for big numbers in my interpreter. My product is
    well-integrated, and represents 5% of the 250KB interpreter size.
    The above gmp DLL is 666KB so is a poor match.


    Out of curiosity - how often are such big numbers needed and used
    with your interpreter, excluding demos to show how to use big
    numbers? 64-bit arithmetic is enough for the huge majority of
    purposes outside of cryptography and mathematics, and 128-bit
    arithmetic covers almost all of the rest.  Your code is not suitable
    for cryptography or mathematics.   So what is it used for?  And could >>> it have been handled much more simply by using 128-bit fixed sizes?


    How often are big numbers used in Python? There, its integer type
    transparently overflows into a big integer when needed (so C-style
    algorithms that rely on being masked to 64 bits won't work).


    I'd imagine they are not often used, as a proportion of Python users,
    and that 128-bit integers would be more than good enough in most situations.  However, Python /is/ used in mathematics work, and big
    numbers are useful there.  And Python numbers are, like everything in Python, objects - each number is already a memory allocation, a struct,
    a reference to a shared object.  There's a lot of overhead even for a
    simple integer.  That means there is little extra cost for having the possibility of big numbers if the user wants them.  Similarly, the rest
    of Python is so large that the incremental cost for using shared GMP libraries (which are likely already installed on many systems) is minor.
     And of course Python is used by millions - including people who
    regularly need large integers.  Your interpreter is used by you.

    So again, how often do /you/ need big numbers in /your/ language?


    (I'm not sure what you are talking about with "C-style algorithms that
    rely on being masked to 64-bits".  Are you suggesting that if badly
    written C code is translated directly into bad Python code, it might not work?)

    It might be code like this where the top bits of left-shifts disappear:

    z = ((Q[i]<<41)>>1)+((Q[i]<<39)>>1)+(carry>>1);


    In the end I dropped 128-bit numbers, because the only use-case, apart
    from bragging about it, was supporting 128 bits in the self-hosted
    compiler.

    Whereas in your interpreted language, the only reason for having
    anything bigger than 64-bits seems to be for bragging about it.  If you think that is worth the effort, that's fine - I've nothing against doing something like this for the fun of it.  But it seems strange to get so worked up about how the GMP authors are forcing you to use dependencies
    you don't want, and forcing you to write your own bignum code, when all
    you really want is to be able to tell your users - you alone - that you support bignums so that you can calculate 2 ^ 128 and fib(92).  It's a
    lot of effort, and a lot of aggravation, for extremely little use.

    I see. So the real reason for your apparently friendly interest comes to
    light. It is just to trash everything I do and to be as condescending as
    hell.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael S@21:1/5 to David Brown on Wed Mar 12 17:32:10 2025
    On Wed, 12 Mar 2025 15:58:56 +0100
    David Brown <[email protected]> wrote:

    On 12/03/2025 12:14, bart wrote:
    On 12/03/2025 10:37, David Brown wrote:
    On 11/03/2025 22:18, bart wrote:

    I needed support for big numbers in my interpreter. My product is
    well-integrated, and represents 5% of the 250KB interpreter size.
    The above gmp DLL is 666KB so is a poor match.


    Out of curiosity - how often are such big numbers needed and used
    with your interpreter, excluding demos to show how to use big
    numbers? 64-bit arithmetic is enough for the huge majority of
    purposes outside of cryptography and mathematics, and 128-bit
    arithmetic covers almost all of the rest.  Your code is not
    suitable for cryptography or mathematics.   So what is it used
    for?  And could it have been handled much more simply by using
    128-bit fixed sizes?

    How often are big numbers used in Python? There, its integer type transparently overflows into a big integer when needed (so C-style algorithms that rely on being masked to 64 bits won't work).


    I'd imagine they are not often used, as a proportion of Python users,
    and that 128-bit integers would be more than good enough in most
    situations. However, Python /is/ used in mathematics work, and big
    numbers are useful there. And Python numbers are, like everything in Python, objects - each number is already a memory allocation, a
    struct, a reference to a shared object. There's a lot of overhead
    even for a simple integer. That means there is little extra cost for
    having the possibility of big numbers if the user wants them.
    Similarly, the rest of Python is so large that the incremental cost
    for using shared GMP libraries (which are likely already installed on
    many systems) is minor.

    Default Python integer is not GMP. GMP can be used from Python and
    doing it is much easier than using GMP from C, but it is not transparent
    to programmer.
    We discussed it relatively recently on comp.lang.c++. See Message-ID: <[email protected]> and following short sub-thread.

    And of course Python is used by millions -
    including people who regularly need large integers. Your interpreter
    is used by you.

    So again, how often do /you/ need big numbers in /your/ language?


    (I'm not sure what you are talking about with "C-style algorithms
    that rely on being masked to 64-bits". Are you suggesting that if
    badly written C code is translated directly into bad Python code, it
    might not work?)


    Huh?
    In C default modulo arithmetic on unsigned numbers is 100% standard and
    is used in plenty of well-written C code.



    In my language you have to explicitly request the bignum type. It
    is used mainly for recreational code. Or sometimes to get accurate reference results to compare against when working with 64-bit ints
    and floats.

    (How big is a 128-bit range for example? I can just do 'print
    2L**128'.)

    I did have 128-bit support in my implementation language once,
    better than gcc's in C since it also supported literals, and Print.
    I did think about using that instead of, or as well as, bignums.
    Maybe as the default int type instead of 64 bits.

    But, as you say, real needs beyond 64 bits are rare. When it is
    needed, then they can be arbitrary large (forget 2**128, what about 2**1000000? Or you want to look at Fibonacci numbers beyond fib(92)
    which is the limit with int64).

    In the end I dropped 128-bit numbers, because the only use-case,
    apart from bragging about it, was supporting 128 bits in the
    self-hosted compiler.

    Whereas in your interpreted language, the only reason for having
    anything bigger than 64-bits seems to be for bragging about it. If
    you think that is worth the effort, that's fine - I've nothing
    against doing something like this for the fun of it. But it seems
    strange to get so worked up about how the GMP authors are forcing you
    to use dependencies you don't want, and forcing you to write your own
    bignum code, when all you really want is to be able to tell your
    users - you alone - that you support bignums so that you can
    calculate 2 ^ 128 and fib(92). It's a lot of effort, and a lot of aggravation, for extremely little use.


    As already said by Bart, it is a bit of fun.
    To me it sounds like sufficient reason.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to David Brown on Wed Mar 12 17:12:34 2025
    On 12/03/2025 16:48, David Brown wrote:
    On 12/03/2025 16:32, Michael S wrote:

    As already said by Bart, it is a bit of fun.
    To me it sounds like sufficient reason.


    Fun - or learning - are always perfectly good reasons for doing almost anything in programming as far as I am concerned (baring things like
    writing malware for fun).  And I can entirely appreciate the fun in
    writing a bignum library, or supporting it in an interpreted language.

    But I have trouble seeing the fun in endless complaints, blaming GMP
    authors for not making Bart's life easier, insisting on limiting
    everything in his build environment for no good reason, and all the rest
    of it.  Maybe Bart /does/ find that fun.

    GMP and LIBFFI were a couple of well-known examples that came to mind. I
    have grappled with *dozens* of such projects.

    Basically ANYTHING that requires on a shell-script that only works on
    Unixes and will not work on native Windows is going to be troublesome to
    build on the latter.

    It doesn't just affect me either.

    I also feel it is wrong to paint Windows as a poor machine for
    development, simply because it is not a Unix clone.

    You make a choice to rely heavily (30K+ lines is 'heavily'!) on
    scripting features of a particular OS, which IMO would be a bad choice
    anyway, and then criticise some other OS for not being able to run that
    exact same script, or for not having the exact same bunch of utilities.

    It would be like me saying I find Linux rubbish for development because
    it doesn't run my BAT scripts.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Brown@21:1/5 to bart on Wed Mar 12 17:55:40 2025
    On 12/03/2025 16:32, bart wrote:
    On 12/03/2025 14:58, David Brown wrote:
    On 12/03/2025 12:14, bart wrote:
    On 12/03/2025 10:37, David Brown wrote:
    On 11/03/2025 22:18, bart wrote:

    I needed support for big numbers in my interpreter. My product is
    well-integrated, and represents 5% of the 250KB interpreter size.
    The above gmp DLL is 666KB so is a poor match.


    Out of curiosity - how often are such big numbers needed and used
    with your interpreter, excluding demos to show how to use big
    numbers? 64-bit arithmetic is enough for the huge majority of
    purposes outside of cryptography and mathematics, and 128-bit
    arithmetic covers almost all of the rest.  Your code is not suitable
    for cryptography or mathematics.   So what is it used for?  And
    could it have been handled much more simply by using 128-bit fixed
    sizes?


    How often are big numbers used in Python? There, its integer type
    transparently overflows into a big integer when needed (so C-style
    algorithms that rely on being masked to 64 bits won't work).


    I'd imagine they are not often used, as a proportion of Python users,
    and that 128-bit integers would be more than good enough in most
    situations.  However, Python /is/ used in mathematics work, and big
    numbers are useful there.  And Python numbers are, like everything in
    Python, objects - each number is already a memory allocation, a
    struct, a reference to a shared object.  There's a lot of overhead
    even for a simple integer.  That means there is little extra cost for
    having the possibility of big numbers if the user wants them.
    Similarly, the rest of Python is so large that the incremental cost
    for using shared GMP libraries (which are likely already installed on
    many systems) is minor.   And of course Python is used by millions -
    including people who regularly need large integers.  Your interpreter
    is used by you.

    So again, how often do /you/ need big numbers in /your/ language?


    (I'm not sure what you are talking about with "C-style algorithms that
    rely on being masked to 64-bits".  Are you suggesting that if badly
    written C code is translated directly into bad Python code, it might
    not work?)

    It might be code like this where the top bits of left-shifts disappear:

      z = ((Q[i]<<41)>>1)+((Q[i]<<39)>>1)+(carry>>1);


    Okay... and how often would this cause trouble for Python code? And why
    is it specific for 64 bits?


    In the end I dropped 128-bit numbers, because the only use-case,
    apart from bragging about it, was supporting 128 bits in the
    self-hosted compiler.

    Whereas in your interpreted language, the only reason for having
    anything bigger than 64-bits seems to be for bragging about it.  If
    you think that is worth the effort, that's fine - I've nothing against
    doing something like this for the fun of it.  But it seems strange to
    get so worked up about how the GMP authors are forcing you to use
    dependencies you don't want, and forcing you to write your own bignum
    code, when all you really want is to be able to tell your users - you
    alone - that you support bignums so that you can calculate 2 ^ 128 and
    fib(92).  It's a lot of effort, and a lot of aggravation, for
    extremely little use.

    I see. So the real reason for your apparently friendly interest comes to light. It is just to trash everything I do and to be as condescending as hell.



    I am merely trying to understand you (as well as helping you - providing
    links to the dlls you could not find yourself).

    I fully understand the fun of making your own bignum code - or of adding
    bignum support to your interpreted language. I do not understand the
    effort you go to complaining, blaming others, and making your own life
    more difficult. I do not understand any thoughts that this is somehow a
    useful expenditure of time and effort.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Brown@21:1/5 to Michael S on Wed Mar 12 17:48:17 2025
    On 12/03/2025 16:32, Michael S wrote:
    On Wed, 12 Mar 2025 15:58:56 +0100
    David Brown <[email protected]> wrote:

    On 12/03/2025 12:14, bart wrote:
    On 12/03/2025 10:37, David Brown wrote:
    On 11/03/2025 22:18, bart wrote:

    I needed support for big numbers in my interpreter. My product is
    well-integrated, and represents 5% of the 250KB interpreter size.
    The above gmp DLL is 666KB so is a poor match.


    Out of curiosity - how often are such big numbers needed and used
    with your interpreter, excluding demos to show how to use big
    numbers? 64-bit arithmetic is enough for the huge majority of
    purposes outside of cryptography and mathematics, and 128-bit
    arithmetic covers almost all of the rest.  Your code is not
    suitable for cryptography or mathematics.   So what is it used
    for?  And could it have been handled much more simply by using
    128-bit fixed sizes?

    How often are big numbers used in Python? There, its integer type
    transparently overflows into a big integer when needed (so C-style
    algorithms that rely on being masked to 64 bits won't work).


    I'd imagine they are not often used, as a proportion of Python users,
    and that 128-bit integers would be more than good enough in most
    situations. However, Python /is/ used in mathematics work, and big
    numbers are useful there. And Python numbers are, like everything in
    Python, objects - each number is already a memory allocation, a
    struct, a reference to a shared object. There's a lot of overhead
    even for a simple integer. That means there is little extra cost for
    having the possibility of big numbers if the user wants them.
    Similarly, the rest of Python is so large that the incremental cost
    for using shared GMP libraries (which are likely already installed on
    many systems) is minor.

    Default Python integer is not GMP. GMP can be used from Python and
    doing it is much easier than using GMP from C, but it is not transparent
    to programmer.
    We discussed it relatively recently on comp.lang.c++. See Message-ID: <[email protected]> and following short sub-thread.

    OK. It doesn't matter for the point in question, but I appreciate the technical correction.


    And of course Python is used by millions -
    including people who regularly need large integers. Your interpreter
    is used by you.

    So again, how often do /you/ need big numbers in /your/ language?


    (I'm not sure what you are talking about with "C-style algorithms
    that rely on being masked to 64-bits". Are you suggesting that if
    badly written C code is translated directly into bad Python code, it
    might not work?)


    Huh?
    In C default modulo arithmetic on unsigned numbers is 100% standard and
    is used in plenty of well-written C code.


    If you are using uint64_t, you can rely on 64-bit modulo arithmetic in
    your C code. Anything else (without suitable checks) is implementation dependent. Yes, C code could be well-written and rely on that using
    uint64_t - but translating it into Python numbers directly would then be
    wrong.


    Whereas in your interpreted language, the only reason for having
    anything bigger than 64-bits seems to be for bragging about it. If
    you think that is worth the effort, that's fine - I've nothing
    against doing something like this for the fun of it. But it seems
    strange to get so worked up about how the GMP authors are forcing you
    to use dependencies you don't want, and forcing you to write your own
    bignum code, when all you really want is to be able to tell your
    users - you alone - that you support bignums so that you can
    calculate 2 ^ 128 and fib(92). It's a lot of effort, and a lot of
    aggravation, for extremely little use.


    As already said by Bart, it is a bit of fun.
    To me it sounds like sufficient reason.


    Fun - or learning - are always perfectly good reasons for doing almost
    anything in programming as far as I am concerned (baring things like
    writing malware for fun). And I can entirely appreciate the fun in
    writing a bignum library, or supporting it in an interpreted language.

    But I have trouble seeing the fun in endless complaints, blaming GMP
    authors for not making Bart's life easier, insisting on limiting
    everything in his build environment for no good reason, and all the rest
    of it. Maybe Bart /does/ find that fun.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to bart on Thu Mar 13 00:08:19 2025
    On Wed, 12 Mar 2025 17:12:34 +0000, bart wrote:

    I also feel it is wrong to paint Windows as a poor machine for
    development, simply because it is not a Unix clone.

    The fact that Windows developers themselves are unable to improve the
    situation is all the justification we need.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Lawrence D'Oliveiro on Thu Mar 13 00:33:27 2025
    On 13/03/2025 00:08, Lawrence D'Oliveiro wrote:
    On Wed, 12 Mar 2025 17:12:34 +0000, bart wrote:

    I also feel it is wrong to paint Windows as a poor machine for
    development, simply because it is not a Unix clone.

    The fact that Windows developers themselves are unable to improve the situation is all the justification we need.

    Improve what situation?

    Unix based developers insist of using some nonsense called XYZZY for all
    their projects, which only works on Unix, and Windows is at fault for
    not immediately implementing XYZZY too?

    I think somebody said that XYZZY only exists to tie together endless
    variations of Unix systems, and would be meaningless on Windows.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to bart on Thu Mar 13 02:35:41 2025
    On Thu, 13 Mar 2025 00:33:27 +0000, bart wrote:

    On 13/03/2025 00:08, Lawrence D'Oliveiro wrote:

    On Wed, 12 Mar 2025 17:12:34 +0000, bart wrote:

    I also feel it is wrong to paint Windows as a poor machine for
    development, simply because it is not a Unix clone.

    The fact that Windows developers themselves are unable to improve the
    situation is all the justification we need.

    Improve what situation?

    The one you’ve been complaining about.

    Unix based developers insist of using some nonsense called XYZZY for
    all their projects, which only works on Unix, and Windows is at
    fault for not immediately implementing XYZZY too?

    It’s their fault for wanting to run the Unix software, instead of
    developing their own.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Lawrence D'Oliveiro on Thu Mar 13 11:16:00 2025
    On 13/03/2025 02:35, Lawrence D'Oliveiro wrote:
    On Thu, 13 Mar 2025 00:33:27 +0000, bart wrote:

    On 13/03/2025 00:08, Lawrence D'Oliveiro wrote:

    On Wed, 12 Mar 2025 17:12:34 +0000, bart wrote:

    I also feel it is wrong to paint Windows as a poor machine for
    development, simply because it is not a Unix clone.

    The fact that Windows developers themselves are unable to improve the
    situation is all the justification we need.

    Improve what situation?

    The one you’ve been complaining about.

    Unix based developers insist of using some nonsense called XYZZY for
    all their projects, which only works on Unix, and Windows is at
    fault for not immediately implementing XYZZY too?

    It’s their fault for wanting to run the Unix software, instead of developing their own.

    Ha! It's just 'software' when it's cross-platform.

    Cross-platform means somebody ensures it will run across different OSes.
    But it would be odd to go to that trouble and not have a cross-platform
    build process too. Unless they will consent to providing binaries for
    which they will use a cross-compilation process.

    What I also find amusing is that this is a group about the C language
    which is touted to run every conceivable target on the planet, past,
    present and future.

    The reason for half the UBs is because some operation is badly defined
    on whacko architecture which accounts for 0.00001% of machines.

    So it takes portability seriously.

    Yet when it comes to *building* software, which is just another kind of application, then apparently only Unix-like exists.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to Chris M. Thomasson on Thu Mar 13 16:36:30 2025
    On 2025-03-13, Chris M. Thomasson <[email protected]> wrote:
    On 3/10/2025 2:55 PM, Kaz Kylheku wrote:
    I tried to email you back but it got kicked back.

    What? After all the corporate anti-corruption training videos I've had
    to watch?

    Seriously, though my mail server was down for quite a few hours, the other
    day, so that could be it. If it was spam filtering, use the numeric
    address you see in the From: header here. That bypasses almost all
    SMTP-level checks.

    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @[email protected]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Chris M. Thomasson on Thu Mar 13 20:36:55 2025
    On Wed, 12 Mar 2025 22:25:49 -0700, Chris M. Thomasson wrote:

    On 3/11/2025 11:50 PM, Lawrence D'Oliveiro wrote:

    On Tue, 11 Mar 2025 21:22:22 -0700, Chris M. Thomasson wrote:

    On 3/11/2025 8:12 PM, Lawrence D'Oliveiro wrote:

    On Tue, 11 Mar 2025 20:04:30 -0700, Chris M. Thomasson wrote:

    IOCP works fine ...

    But not with pipes.

    Never tried them with pipes, only sockets.

    The Python developers have tried. They ended up creating two event loop
    implementations on Windows, neither of which quite covers all the bases
    <https://docs.python.org/3/library/asyncio-eventloop.html#event-loop-implementations>.

    For some damn reason, I don't think you have tried IOCP with sockets,
    pipes, ect, even Linux AIO?

    If you think you know something the Python developers overlooked in
    their Windows implementation, feel free to tell us about it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tim Rentsch@21:1/5 to bart on Thu Mar 13 14:40:11 2025
    bart <[email protected]> writes:

    The reason for half the UBs is because some operation is badly defined
    on whacko architecture which accounts for 0.00001% of machines.

    Demonstrably false.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tim Rentsch@21:1/5 to bart on Thu Mar 13 14:41:34 2025
    bart <[email protected]> writes:

    But here qq.m is the lead module of several dozen comprising the
    project, plus there are embedded support files.

    A project comprises its modules, not the other way around.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tim Rentsch@21:1/5 to Waldek Hebisch on Thu Mar 13 14:49:11 2025
    [email protected] (Waldek Hebisch) writes:

    Tim Rentsch <[email protected]> wrote:

    bart <[email protected]> writes:

    On 05/03/2025 23:36, Tim Rentsch wrote:

    bart <[email protected]> writes:

    [...]

    [long list of features]

    My understanding is that it is missing the two most important
    features of a programming language:

    (1) a user manual that defines and documents the language

    (2) an available implementation so that other people can
    use it to write programs

    The 1990s version, where it supported a substantial application,
    had a 350-page manual. That one was used by other people to
    create add-on products.

    But it's now a personal tool and I only have reference material
    for my own use.

    If you post some links where I can download a current user
    manual and a current compiler or interpreter, I will gladly
    withdraw my comment.

    Otherwise, I stand by my comment, and see no reason to
    consider your alleged environment as anything other than
    fiction-ware.

    Bart has a project on github. In the past he provides part
    of source code for his languages. More precisely, he provided
    generated C source code for C compiler, generated C source
    code for implementation of his "dynamic" Q language, and
    source for compiler of his M language (in Q). So, those
    things existed and run times were consitent with what he
    claimed. AFAICS parts of source we missing, and it seems
    that he later removed the sources from github.

    The point of my question is not to determine if something exists but
    to find out what the purported language is. I'm tired of hearing
    bart brag about his personal programming language but never giving
    the specifics of what the language syntax and semantics are. It's
    like listening to a used car salesman who won't let you see the
    actual car.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tim Rentsch@21:1/5 to bart on Thu Mar 13 14:52:23 2025
    bart <[email protected]> writes:

    Here however is a summary of these fictional tools:

    https://github.com/sal55/langs/blob/master/CompilerSuite.md

    I'm not interested in the tools. What I am asking to see is
    the language.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to Lawrence D'Oliveiro on Thu Mar 13 23:17:13 2025
    On 2025-03-13, Lawrence D'Oliveiro <[email protected]d> wrote:
    If you think you know something the Python developers overlooked in
    their Windows implementation, feel free to tell us about it.

    [Is that like the royal "us" or has idiot-boy joined an imaginary gang?]

    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @[email protected]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to bart on Thu Mar 13 23:34:37 2025
    On Thu, 13 Mar 2025 11:16:00 +0000, bart wrote:

    Yet when it comes to *building* software, which is just another kind of application, then apparently only Unix-like exists.

    Yeah, funny that, that systems that adhere to something resembling an
    official, open standard are easier to support than ones that don’t.

    If other systems are important enough to be worth supporting, why is it
    nobody who uses those systems has the skills and the patience to step
    forward and do it?

    Could it be that those systems, being proprietary, are designed by their
    owners to be inherently hostile in some way to open-source development?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Waldek Hebisch@21:1/5 to bart on Fri Mar 14 00:37:48 2025
    bart <[email protected]> wrote:
    On 11/03/2025 01:33, Waldek Hebisch wrote:
    bart <[email protected]> wrote:
    On 10/03/2025 10:58, Waldek Hebisch wrote:
    bart <[email protected]> wrote:

    I think nobody does. There's always been some sort of mystique
    surrounding 'gcc' on Windows.

    'MinGW' supposedly 'Minimalist Gnu on Windows'. In that case I wouldn't >>>>> like to see the full-scale one..

    "Minimalist" is not about size of the compiler. Rather, it is
    about possible support routines. For "hosted implementation" C
    mandates presence of C library and there is a lot of functions
    not in C standard, but included in libraries of C compilers.
    There is also question of operating system support, complicated
    by fact that Windows is different than other systems. Cygwin
    solved those issues by offering Posix emulation and a sizable
    collection os libraries. MinGW is minimalist in the sense
    that it provides very little own libraries and mainly uses
    what is provide by Windows.

    I still don't get this stuff.

    I get the impression that a port of gcc to Windows is not simply about
    building C programs, but building C programs that use a lot of features
    from Linux.

    You apparently do not get fact that people want tools to
    automate various routine tasks.

    What routine task is this? I'm talking exclusively about turning a bunch
    of source files in some language (here it is C) into an executable binary.

    This task can be done with a program called a 'compiler'.

    You ignore fact that people are developing programs. And developement
    is much more than "turning a bunch of source files into an executable".
    GPL says "The source code for a work means the preferred form of
    the work for making modifications to it". And that nicely captures
    the idea: sources are in form that is convenient for developer
    and may require several steps before one gets the executable.

    However, what I'm arguing about is that this simple task has become unnecessarily elaborate on OSes like Linux, by introducing makefiles, OS-specific scripts, and OS-specific utilities.

    There is not much OS-specific in "Linux tools". 'make' is
    problematic on zOS, because files have no timestamps there,
    but most normal OS-es have timestamps (and IIUC even zOS
    has USS where timestamps are available). You need ability
    to invoke a program from a different program, exact form
    of this is OS-dependent, but ability is there in any
    semi-reasonable general purpose OS. You need ability
    to get exit status of a program, again exact form is
    OS-dependent but ability is there.

    FYI, is started using "Linux tools" on MS-DOS, before I
    heard about Linux. And tools are widely available,
    IIUC classic zOS is problematic, but I think that USS
    is OK. Some systems may be prone to breakage, when
    there is small number of _active_ users and nobody bothers
    to timely report real problems.

    Coming back to developement, in many cases it is desirable
    to generate some C files. C preprocessor can do some
    transformations, but is may be convenient to transform
    source in a way hard to do via proprocessor. Also,
    this is C group, but big programs frequently have parts
    in different languages, an then it is good to have
    language-neutral tools. Simple tools to transform
    or generate files are 'sed' and 'awk'. Some people
    use 'perl' or 'python' for such purpose and in principle
    there is much more possiblities.

    More specialised are compiler-writing tools like 'bison'
    and 'flex'. You can write a parser by hand, but using
    'bison' one does not need to know much to write working
    parser. 'flex' helps in writing scanners, but IMO
    is quite useful for text processing task (its support
    for regular expressions is nicer than Perl or Python
    offer, and speed frequently is much better too).

    Users beside binary need also documentation. In principle
    documentation could be provided as plain text, but there
    is now tendency to offer nicely formatted documentation
    and to offer multiple formats. Which means that there is
    need for formatting tools. Old ones are Texinfo and TeX.
    And some moment there was push towards SGML and formats
    like DocBook. This needs appropriate tools. Some people
    now prefer tools like 'sphinx' (which needs Python with
    several extention packages). There is 'doxygen' which
    extract information from source files and presents nicely
    formated info about API (I am not a fan of 'doxygen' but
    is seems to be widely used).

    Beside building program and documentation one wants some
    automatic way of running tests. And people want to
    automate more tasks, for example removal of generated
    files or installation.

    Automation requires some scripting language. For authors
    of free programs important point is free availability
    (preferably with sources) of choosen language. That
    ruled out things like MS Basic or 'command.com' (and
    'command.com' is quite limited). Unix shell was
    available as port of OS on Unix systems and quite early
    there were free ports of Unix shell to other systems.
    So there were natural preference to Unix shell, simply
    because of wide availability. Similarly with other
    classic Unix tools. One can argue that those classic
    tools are now dated, but there is stong inertia in
    action: tools are widely used, widely availeble, there
    is knowldege how to use them so people keep using them.

    When one thinks about possible replacements, it is not an
    easy job. Namely, Unix tools evolved and are designed
    to work together. Different tool either must cooperate
    nicely with existing tools, which forces similar
    behaviour to current tools, or must provide replacement
    for the whole toolkit which is much more complicated
    than replacing a single tool.

    When you look at bloat, I expect competing tools to be
    much more bloated than classic Unix tools. Namely,
    Unix tools were designed to be simple and power comes
    from possibility to compose them. It is hard to
    imagine way of composing tools that is both simple
    and offers more possibilities than Unix way. So
    one can have simpler/smaller tools but less powerful.
    Or one can increase fuctionality of each tools separately
    (to some degree this is happening with Unix tools), but
    this increases complexity of each tool. One can try
    to make one tool that replaces the whole toolkit, but
    experiance suggest that such a single tool would be
    much more complicated. To summarize, more powerful
    tools are likely to be more complicated, hence more
    bloated than classic Unix tools. Given that classic
    Unix tools are quite small compared to modern systems
    (they can be implemented in few megabytes of code)
    incentive to make smaller tools is rather low.

    This is done even on smaller, simple applications, and also on those
    that are supposedly cross-platform that are to be built on the target.

    You can have basic toolkit running on rather wide set of systems.
    So this is not a big burden for recipients, in particuar since
    the same toolkit may be used to build many programs.

    If scripts are going to be used, then use them at the developer site
    only, and make the script generate the streamlined set of files for the particular platform of interest.

    Current free software ecosystem is colaborative work of many people.
    In particular, there are people creating binary packages and if
    all you want is running binary you may be better off getting a
    package from them. Now, people creating binaries want to do
    this in an automated way. For them having to give a list of files
    to compiler each time when they build a package is too mach work.
    They have scripts that fetch sources from the net, check checksums
    (to verify authenticity), run 'configure' and 'make'. They are
    willing to install tools which are needed for this work.

    It should not rely on anything that is not native to the target platform.

    Why not? You already admited that one need a compiler. While
    a bunch of tiny tools should be a blocker?

    And people do not want
    to reinvent the wheel, they prefer to use code written
    by others.

    What wheels are these that are being reinvented? I'm simply arguing for
    using either 2 or 4 wheels, not 18!

    And I'm not suggesting reinventing those 2/4 either, just using the ones
    I have on my OS.

    Well, one trouble is that things you have on your preferred OS are
    not free, one can not use them legally on a different OS. And when
    it comes to developement tools what cames with basic install of
    your OS seem to be quite limited. No law prevents you from installing
    free tools and that is simplest solution.

    Alternative is extra work for developers to reproduce what tool do
    within program, that would be reinventing the wheel. Or some
    intermedate stages between binary and source, which require extra
    work and there seem to be small interest in such things (say
    hundreds of people among milions using free software).

    Folks at Bell Labs had several good ideas
    and shared them with others. Those ideas are not limited
    to Linux or Unix, you can look at old "Software tools in ..."
    books to understand what I am talking about. MinGW
    _distribution_ bundles several tools. This allows you
    to compile programs when build process uses those tools.
    You can also use the tools for your purpose. Aparently
    you have very strong "not invented here" syndrom and
    insist on usig your own tools.

    That's another aspect of it which is not that relevant, other than it
    shows just how simple things could be.

    To build open source projects, I'm happy to use an existing C compiler.
    I'm NOT happy about bending over backwards to use CYGWIN, MSYS2 or WSL because the developers insist on forcing their Linux dependencies down
    my throat.

    As I explained they want to use tools. Some tools may be problematic,
    but I see no reason to reject base tools. For most programs you do
    not need to CYGWIN or WSL. Concerning MSYS2, IIUC they reuse small
    part of Cygwin to support developement tools. If for some reason
    you find this problematic, you may invest some time in making
    the tools more pure, that is using native Windows calls instead
    of Posix emulation provided by Cygwin. Some of this was done
    to improve performance, but for people using MSYS2 performance
    seem to be OK and clearly using native calls Windows calls on
    Windows means that there need to be special variant for Windows
    which adds extra work, so they have little motivation to remove
    all traces of Cygwin. If you are concerned about bloat, then
    you should take into account that base tools can be quite
    small (of order of few megabytes for whole toolkit).

    If you object using tools that behave the same on Linux and
    Windows, then really developers insist on this. Simply,
    using common tools is basic survival strategy. Otherwise
    they would have to spend effort on incompatible "Windows
    native toolkit" which would fragment developement effort.

    Using no tools may work for very simple projects, but
    means too much extra work in other cases.

    Extra remark: in one case I asked people using a program
    on Windows which way is most convenient for them. Rather
    old answer was "And Linux" (which was a package allowing
    to run Linux binaries on Windows), modern answer was WSL.
    You see, people were interested in shortest way to get
    running program, not about purity of approach.

    (Those developers also seem to think that the only alternative to MSYS2, configure scripts etc is to use the monstrosity that is MS Visual Studio
    and all it comprises.)

    You see, people that use Windows also want to use tools. And
    when they do not like or can not use simpler tools they go to
    Visual Studio.

    If an application is written in C, then a C compiler should suffice.

    That is fine, as long
    as you keep this to yourselfs. But refusing other
    folks right to use tools they want to use is not
    fair.

    Developers can do what they like. But they shouldn't inflict their
    choices on other people, especially those using other OSes.

    Well, I use Linux and can maintain X based GUI. Since I do
    not have Windows I can not create native Windows GUI. And
    while there were several significant contributors to the
    program (some working on Windows), nobody volunteered to
    create Windows GUI. So ATM for this program the only way
    to get GUI on Windows is to use Cygwin and X library provided
    by Cygwin or run Linux version under WSL. AFAIK related
    approach was used by several commercial vendors providing
    both Unix and Windows versions of their programs: they used
    X based GUI, on Windows linked with commercial X library and
    connected to available X server. So, simply since "cost" of
    providing native GUI is too high, programs used X based GUI.

    I do not know why you develop software. For me significant
    part is fun, in particular that I can do "interesting"
    things with moderate effort. But all that fun disappears
    if somebody want we to do a lot of work for no good
    reason (beyond "I want it that way"). There were cases
    when I wanted things some way and spent effort to make
    them work that way. I do not complain that other
    developers did not want to do work for me.

    Or, to put it differently, when you refuse
    the tools _you_ need to do by hand needed work.
    You may be able to extract from work of others
    something that fits your taste (like list of files
    to compile), but that is your business.

    Fine. In that case tell me what the files are! Lua actually does this
    (but it's not obvious, it's also unexpected since the majority of apps
    are unhelpful in such matters).

    When I tried to build A68G, the whole build process, under VirtualBox
    Linux, took 5 minutes. I couldn't build under Windows because of a 30,000-line bash script.

    IME shell scripts usually were no problem, except for possibly
    requiring some patience (they run significantly slower than on
    Linux). In one case 'configure' script was really problematic,
    that is for about 2 weeks Windows NT 4.0 kept crashing, guy
    wanting to compile program restarted Windows, 'configure' made
    some progress and then Windows crashed again. After 2 weeks
    the guy gave up, run configure on Linux (I think it was the
    same hardware), 'configure' needed 2 hours on Linux, but
    went fine. Then some extra hours to compile the program.
    Note that there were _system_ crashes running otherwise ordinary
    program. However, Windows now seem to be much more reliable,
    so I do not expect trouble like this. And the mentioned 'configure'
    script on Linux run exceptionally long.

    However, with some effort, I was able to isolate the C files needed, and fortunately there was no synthesised code. Given that list of 12 files
    (!) building the app on Windows took my compiler one second.

    If so, then that's the wrong approach. There are various lesser
    compilers which know nothing about mingw or posix of anything of the
    sort. (For example, lccwin32, DMC, PellesC, I think Tiny C; I can't
    speak for MSVC.)

    You may be able to do some things using just a C compiler.
    But requesting people to do other things by hand is as
    wise as requesting them to code in assembler

    What things, what assembly? I'm talking about building a program written
    in a HLL using an existing compiler.

    That seems reasonable enough, yes?

    The only info needed is the list of files to submit to said compiler.

    If thats to the only needed info than Makefile.in (thing used as
    a template for Makefile) should contain something like:

    SRCS = file1.c file2.c fileN.c

    and list of files would be easy to extract from Makefile.in
    (just look for list of files). But usually there is more to
    this, like compiler flags, generated headers, etc. And the
    list of files usually depends on OS and possibly other
    factors.

    (assembler
    may be converted to binary faster than C, and with enough
    effort resulting binary will run faster than result of
    C compilation :). Another thing are libraries and
    bigger applications. Some folks want "true Windows look
    and feel", some say that proper Windows DLL must be
    compiled by MSVC

    Any C compiler for Windows can generate DLL files.

    I am not an expert on Windows features. But one things was
    that they wanted "components". Another was exception handling.
    So "just a DLL" was too little for them.

    (otherwise is lack some features that
    they consider essential). But there are people who
    had to or wanted to use Windows, but also wanted to
    use Unix applications. Cygwin was addressed to such
    folks: it allows you to compile substantial Unix
    application so that it runs on Windows. If you have
    no interest in such applications, than fine, Cygwin
    is probably not for you. Today WSL may be better
    for such a goal, but in the past Cygwin provided
    easiest way to port Unix application to Windows.
    If easy port was the goal and application was
    substantial, then Cygwin usually was right choice.

    As I understand it, POSIX is about 80 header files, of which ~30 are the standard C headers, leaving 50 POSIX headers that do not exist on Windows.

    If your Linux app uses those headers, and you want to port it to
    Windows, then you have problems to solve.

    But I would question whether the apps I want to build need all that. How
    does POSIX figure in the GMP library for example?

    Well, GMP needs some way to signal division by 0. Which in principle
    do not require system stuff, but maybe they use something to
    do it nicer. GMP need memory allocation, which can be done via
    'malloc' but also my be dan via system calls.

    But I think that in case of GMP main part is choosing correct
    version is assembler code or compiler intrinsics (for speed
    critical parts use special machine instructions). GMP may need
    code to detect CPU (which on Linux can be done via appropriate
    system interface). So there is compile time choice, dependent
    on target machine aritecture and available compiler and possibly
    special detection code at runtime.

    So there are complex things to do at compile time and Posix may
    play some role when running auxiliary program. Posix _may_
    play some role for resulting binary, but it should not be
    much.

    Why does so much code use open() for example instead of the standard
    fopen()?

    Both on Linux and Window 'read' goes to system skipping STDIO
    buffering. This may have runtime impact (I think that one can
    implement C library so that for bigger sizes 'fread' is essentially
    as fast as 'read' and skips STDIO, but at least on some implementations
    'fread' was slower), so people used 'read' as having guaranted
    performance. Some operations need file descriptors (file handles
    on Windows) and would not work with STDIO files.

    Of course, when there is need to skip STDIO, then 'open' is
    natural choice.

    So, not only are people relying the Linux eco-system for the build
    process, but they are also needlessly using POSIX-specific headers.

    Maybe some are using lower level interfaces without need. But
    once one place in a program must go beyond plain C, then you
    need system specific headers anyway. And it is natural to
    use the same interface (C or system) for all code in the program.

    C is supposed to be that famous portable HLL, but in developer's minds, 'portable' seems to mean working only on any Unix-like system!

    All general purpose OS-es that I know provide files and some
    form of 'open'. Of course, that needs system specific headers.
    On systems providing POSIX headers one can just use POSIX, for
    others do whatever given system need to be done.

    (My language, not C, has a std library that includes some OS
    functionality. But those are wrapped in a set of functions that reside
    in one OS-specific module, that provides the same API across Windows and Linux.

    For example, the function 'os_getdllinst' is implemented on top of 'LoadLibrary' on Windows, and 'dlopen' on Linux.

    What I don't do is directly use LoadLibrary, and insist that people
    running it on Linux have to install some emulation library to provide
    that Windows functionality. Which wouldn't work anyway as it would also
    work with .dll files rather than .so files.

    You see the kind of thought I put into this stuff? I wish others would
    do the same! Instead of being so 'provincial'.)

    Your library stuff is nice. I am not sure why you find 'open'
    troubling? AFAIR it was available in C libraries of DOS and
    Windows compilers that I used (IIRC there was some part talking
    about '_open' which was supposed to be more official interface,
    but one could make plain 'open' to work).


    To put it differenly, you could compile program in one computer
    and get relatively small program which runs OK on different
    Windows machines because libraries it needs are already present.
    This is quite different compared to Cygwin, where you need to
    install Cygwin libraries before normal Cygwin program can run
    (I write about normal programs because actual compiler in
    Cygwin and Mingw used to be the same and with some tweaks one
    could use Cygwin compiler to produce MinGW execuatbles).


    I'm not interested in whatever Cygwin or Mingw are about.

    Oh, so you do not want to know. In such case why you started
    discussing it?

    Because it comes up everwhere that gcc is used on Windows?

    I started by saying I didn't know exactly what Mingw was. I used to
    think it was the compiler, and indeed obtaining gcc used to involve
    visiting sites where 'mingw' or 'mingw64' names figured heavily.

    Some of my gcc files also have 'mingw32' in them; I don't know why:

    c:\tdm\bin>fc gcc.exe x86_64-w64-mingw32-gcc.exe
    Comparing files gcc.exe and X86_64-W64-MINGW32-GCC.EXE
    FC: no differences encountered

    Apparently it is to do with some boring functions discussed in parallel subthreads.

    The 'x86_64-w64-mingw32' part is so called target triple, it
    specifies on which system binaries produced by the compiler
    are supposed to run. 'mingw' really means using Microsoft
    libraries. I am not sure what _exactly_ this combination
    means, it could mean 32-bit code which can only be run on
    64-bit Windows. Or 64-bit code that uses library confusingly
    named 'mingw32'.

    If I was really interested I could try to build on Linux
    gcc with such a target and look what it produces, but
    I do not thing we are interested enough in the answer to
    do this.

    If I were to
    use libraries not part of the OS, then it would be ones like SDL2 to get >>> interesting things done. Not try and emulate bits of Linux that I'd
    never heard of.

    I mentioned one case: about 90% of code in "my" library was
    provided in fact by other libraries. So using code provided
    by other saved me a lot of work, turning something that
    otherwise could be multiyear job into reasonably small effort.

    Sure. Then just provide the binaries which somebody (or even some
    script) can build once, on a machine where everything is known to work.

    This suits Windows which has famous binary compatibility. (If there is a 32-bit version of Windows 11, it can probably still run my 1990s 16-bit binaries!)

    To use the libraries I had to work out build process, thanks
    to tools it was very easy.

    Thanks to tools designed to work within a labyrinthine build
    environment, working within such an environment.

    Purely as an exercise, could you have produced a minimal viable bundle
    of source files, compiler (or recommendation for one), readme and what
    ever else was necessary, that would work in an alien environment? Say, Windows.

    IIRC I produced a CDROM containg sources and MinGW, installing it
    on Windows and running 'make' would recompile my library from
    sources. I do not remember exactly, but I think that it would only
    recompile "my" files and simply link in libraries that I used.

    If you mean source bundle for everything, then there were 6
    general libraries involved: libz (compression, needed by
    libtiff), libjpeg (needed by libtiff), libtiff, lapack,
    BLAS (needed by lapack), hull (geometry code). Each had its
    own Makefile. lapack and BLAS needed fortran compiler.
    I am not sure if I tried to build the libraries on Windows,
    but I think that possibly with small tweaks to Makefiles it
    would work (using MinGW compiler + tools). I write about tweaks
    as libtiff needed to run a program, but probably did not provide
    an '.exe' extention.

    If you want really minimal thing, then it would be more tricky.
    lapack contains hundreds of routines, I called one or two,
    this in turn called some other routines, probably 10 or 20.
    I created a full library and depended on linker to include
    only needed routines. From the symbol table of DLL I could
    extract list of actually used routines, but it would be
    extra work. In case of libtiff I probably used most of it,
    it would be work to check if some part was skipped by the
    linker. Similarly for libz, libjpeg and hull (this one
    is small so small effort).

    If you want list of files and compiler commands, I probably
    could extract it from build log. However, it would be
    extra effort and result would be fragile, different target
    would need different compiler command and different options.
    Some generated files contained info about target, so would
    not work on different target. My code was not really
    intended to be very portable, just run on Linux (where
    I did most of developement and testing) and on Windows
    (needed by users), for different targets I probably would
    need my own 'configure'. So if you mean something that
    will compile on specific target like Windows, then I had
    non-minimal version with external libraries in binary form
    and I think that if needed I could fix build so that
    external libraries would build on Windows. If you
    mean code working on many targets, then I would have to
    spend some more work on portablity of my own code
    (probably not much).

    Just to stress one thing: list of files to compile was
    different when targeting Windows compared to targeting
    Linux. That possibly could be avoided by conditionally
    compiling part of code, but then you need approriate
    target specific definitions, either on command line,
    or in a config file. If you ask for reason: there were
    Linux library function that did exactly what I needed.
    This function was not present on Windows, so I had to
    add implementation for Windows.
    MinGW bundle is a good way to build such libraries. Having
    only a C compiler may be too little.

    All I can say is that if /I/ produce software expressed in C, then you
    need a C compiler to run it.

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Chris M. Thomasson on Fri Mar 14 01:48:09 2025
    On Thu, 13 Mar 2025 16:45:28 -0700, Chris M. Thomasson wrote:

    I have no idea how the Python dev's use IOCP with sockets.

    They can’t figure out a way to support file I/O notifiers (of the kind commonly used with event loops) with it. If you know of a way to do it,
    please tell us.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Muttley on Fri Mar 14 01:47:02 2025
    On Wed, 12 Mar 2025 08:11:45 -0000 (UTC), Muttley wrote:

    On Tue, 11 Mar 2025 20:52:19 -0000 (UTC)
    Lawrence D'Oliveiro <[email protected]d> wibbled:

    How much are you going to pay?

    Nothing, because who knows what libc will do if the descriptor exceeds
    that soft limit.

    But you said “I'd bet money on the kernel/libc authors taking this into account when allocating user space descriptor values”. But they didn’t -- otherwise we *would* know what libc would do, and you yourself have
    admitted that we don’t. Therefore you have lost the bet. QED.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Waldek Hebisch on Fri Mar 14 02:21:11 2025
    On 14/03/2025 00:37, Waldek Hebisch wrote:
    bart <[email protected]> wrote:

    But I would question whether the apps I want to build need all that. How
    does POSIX figure in the GMP library for example?

    Well, GMP needs some way to signal division by 0. Which in principle
    do not require system stuff, but maybe they use something to
    do it nicer.

    I checked my library. Dividing by zero just returns <infinity>. This
    feeds through into subsequent operations if an attempt is made to work
    with it (and may result in <nan>).

    However if the explicit library is used (using bn_div()) etc) the
    function returns a status code that can be checked.

    Within the library embedded in my interpreter, I could also choose to
    trigger an internal exception that user code could trap.

    I wouldn't like to have to grapple with an interrupt or signal handler
    if that is how GMP does it.

    (Replying to rest of post separately.)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Heathfield@21:1/5 to All on Fri Mar 14 09:54:07 2025
    On 14/03/2025 09:32, Michael S wrote:

    .... a 405-line article, of which 387 lines were >chevron-quoted.

    Learn to snip! Furrfu FCOL etc etc.

    --
    Richard Heathfield
    Email: rjh at cpax dot org dot uk
    "Usenet is a strange place" - dmr 29 July 1999
    Sig line 4 vacant - apply within

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael S@21:1/5 to Waldek Hebisch on Fri Mar 14 11:32:17 2025
    On Fri, 14 Mar 2025 00:37:48 -0000 (UTC)
    [email protected] (Waldek Hebisch) wrote:

    bart <[email protected]> wrote:
    On 11/03/2025 01:33, Waldek Hebisch wrote:
    bart <[email protected]> wrote:
    On 10/03/2025 10:58, Waldek Hebisch wrote:
    bart <[email protected]> wrote:

    I think nobody does. There's always been some sort of mystique
    surrounding 'gcc' on Windows.

    'MinGW' supposedly 'Minimalist Gnu on Windows'. In that case I
    wouldn't like to see the full-scale one..

    "Minimalist" is not about size of the compiler. Rather, it is
    about possible support routines. For "hosted implementation" C
    mandates presence of C library and there is a lot of functions
    not in C standard, but included in libraries of C compilers.
    There is also question of operating system support, complicated
    by fact that Windows is different than other systems. Cygwin
    solved those issues by offering Posix emulation and a sizable
    collection os libraries. MinGW is minimalist in the sense
    that it provides very little own libraries and mainly uses
    what is provide by Windows.

    I still don't get this stuff.

    I get the impression that a port of gcc to Windows is not simply
    about building C programs, but building C programs that use a lot
    of features from Linux.

    You apparently do not get fact that people want tools to
    automate various routine tasks.

    What routine task is this? I'm talking exclusively about turning a
    bunch of source files in some language (here it is C) into an
    executable binary.

    This task can be done with a program called a 'compiler'.

    You ignore fact that people are developing programs. And developement
    is much more than "turning a bunch of source files into an
    executable". GPL says "The source code for a work means the preferred
    form of the work for making modifications to it". And that nicely
    captures the idea: sources are in form that is convenient for
    developer and may require several steps before one gets the
    executable.

    However, what I'm arguing about is that this simple task has become unnecessarily elaborate on OSes like Linux, by introducing
    makefiles, OS-specific scripts, and OS-specific utilities.

    There is not much OS-specific in "Linux tools". 'make' is
    problematic on zOS, because files have no timestamps there,
    but most normal OS-es have timestamps (and IIUC even zOS
    has USS where timestamps are available). You need ability
    to invoke a program from a different program, exact form
    of this is OS-dependent, but ability is there in any
    semi-reasonable general purpose OS. You need ability
    to get exit status of a program, again exact form is
    OS-dependent but ability is there.

    FYI, is started using "Linux tools" on MS-DOS, before I
    heard about Linux. And tools are widely available,
    IIUC classic zOS is problematic, but I think that USS
    is OK. Some systems may be prone to breakage, when
    there is small number of _active_ users and nobody bothers
    to timely report real problems.

    Coming back to developement, in many cases it is desirable
    to generate some C files. C preprocessor can do some
    transformations, but is may be convenient to transform
    source in a way hard to do via proprocessor. Also,
    this is C group, but big programs frequently have parts
    in different languages, an then it is good to have
    language-neutral tools. Simple tools to transform
    or generate files are 'sed' and 'awk'. Some people
    use 'perl' or 'python' for such purpose and in principle
    there is much more possiblities.

    More specialised are compiler-writing tools like 'bison'
    and 'flex'. You can write a parser by hand, but using
    'bison' one does not need to know much to write working
    parser. 'flex' helps in writing scanners, but IMO
    is quite useful for text processing task (its support
    for regular expressions is nicer than Perl or Python
    offer, and speed frequently is much better too).

    Users beside binary need also documentation. In principle
    documentation could be provided as plain text, but there
    is now tendency to offer nicely formatted documentation
    and to offer multiple formats. Which means that there is
    need for formatting tools. Old ones are Texinfo and TeX.
    And some moment there was push towards SGML and formats
    like DocBook. This needs appropriate tools. Some people
    now prefer tools like 'sphinx' (which needs Python with
    several extention packages). There is 'doxygen' which
    extract information from source files and presents nicely
    formated info about API (I am not a fan of 'doxygen' but
    is seems to be widely used).

    Beside building program and documentation one wants some
    automatic way of running tests. And people want to
    automate more tasks, for example removal of generated
    files or installation.

    Automation requires some scripting language. For authors
    of free programs important point is free availability
    (preferably with sources) of choosen language. That
    ruled out things like MS Basic or 'command.com' (and
    'command.com' is quite limited). Unix shell was
    available as port of OS on Unix systems and quite early
    there were free ports of Unix shell to other systems.
    So there were natural preference to Unix shell, simply
    because of wide availability. Similarly with other
    classic Unix tools. One can argue that those classic
    tools are now dated, but there is stong inertia in
    action: tools are widely used, widely availeble, there
    is knowldege how to use them so people keep using them.

    When one thinks about possible replacements, it is not an
    easy job. Namely, Unix tools evolved and are designed
    to work together. Different tool either must cooperate
    nicely with existing tools, which forces similar
    behaviour to current tools, or must provide replacement
    for the whole toolkit which is much more complicated
    than replacing a single tool.

    When you look at bloat, I expect competing tools to be
    much more bloated than classic Unix tools. Namely,
    Unix tools were designed to be simple and power comes
    from possibility to compose them. It is hard to
    imagine way of composing tools that is both simple
    and offers more possibilities than Unix way. So
    one can have simpler/smaller tools but less powerful.
    Or one can increase fuctionality of each tools separately
    (to some degree this is happening with Unix tools), but
    this increases complexity of each tool. One can try
    to make one tool that replaces the whole toolkit, but
    experiance suggest that such a single tool would be
    much more complicated. To summarize, more powerful
    tools are likely to be more complicated, hence more
    bloated than classic Unix tools. Given that classic
    Unix tools are quite small compared to modern systems
    (they can be implemented in few megabytes of code)
    incentive to make smaller tools is rather low.

    This is done even on smaller, simple applications, and also on
    those that are supposedly cross-platform that are to be built on
    the target.

    You can have basic toolkit running on rather wide set of systems.
    So this is not a big burden for recipients, in particuar since
    the same toolkit may be used to build many programs.

    If scripts are going to be used, then use them at the developer
    site only, and make the script generate the streamlined set of
    files for the particular platform of interest.

    Current free software ecosystem is colaborative work of many people.
    In particular, there are people creating binary packages and if
    all you want is running binary you may be better off getting a
    package from them. Now, people creating binaries want to do
    this in an automated way. For them having to give a list of files
    to compiler each time when they build a package is too mach work.
    They have scripts that fetch sources from the net, check checksums
    (to verify authenticity), run 'configure' and 'make'. They are
    willing to install tools which are needed for this work.

    It should not rely on anything that is not native to the target
    platform.

    Why not? You already admited that one need a compiler. While
    a bunch of tiny tools should be a blocker?

    And people do not want
    to reinvent the wheel, they prefer to use code written
    by others.

    What wheels are these that are being reinvented? I'm simply arguing
    for using either 2 or 4 wheels, not 18!

    And I'm not suggesting reinventing those 2/4 either, just using the
    ones I have on my OS.

    Well, one trouble is that things you have on your preferred OS are
    not free, one can not use them legally on a different OS. And when
    it comes to developement tools what cames with basic install of
    your OS seem to be quite limited. No law prevents you from installing
    free tools and that is simplest solution.

    Alternative is extra work for developers to reproduce what tool do
    within program, that would be reinventing the wheel. Or some
    intermedate stages between binary and source, which require extra
    work and there seem to be small interest in such things (say
    hundreds of people among milions using free software).

    Folks at Bell Labs had several good ideas
    and shared them with others. Those ideas are not limited
    to Linux or Unix, you can look at old "Software tools in ..."
    books to understand what I am talking about. MinGW
    _distribution_ bundles several tools. This allows you
    to compile programs when build process uses those tools.
    You can also use the tools for your purpose. Aparently
    you have very strong "not invented here" syndrom and
    insist on usig your own tools.

    That's another aspect of it which is not that relevant, other than
    it shows just how simple things could be.

    To build open source projects, I'm happy to use an existing C
    compiler. I'm NOT happy about bending over backwards to use CYGWIN,
    MSYS2 or WSL because the developers insist on forcing their Linux dependencies down my throat.

    As I explained they want to use tools. Some tools may be problematic,
    but I see no reason to reject base tools. For most programs you do
    not need to CYGWIN or WSL. Concerning MSYS2, IIUC they reuse small
    part of Cygwin to support developement tools. If for some reason
    you find this problematic, you may invest some time in making
    the tools more pure, that is using native Windows calls instead
    of Posix emulation provided by Cygwin. Some of this was done
    to improve performance, but for people using MSYS2 performance
    seem to be OK and clearly using native calls Windows calls on
    Windows means that there need to be special variant for Windows
    which adds extra work, so they have little motivation to remove
    all traces of Cygwin. If you are concerned about bloat, then
    you should take into account that base tools can be quite
    small (of order of few megabytes for whole toolkit).

    If you object using tools that behave the same on Linux and
    Windows, then really developers insist on this. Simply,
    using common tools is basic survival strategy. Otherwise
    they would have to spend effort on incompatible "Windows
    native toolkit" which would fragment developement effort.

    Using no tools may work for very simple projects, but
    means too much extra work in other cases.

    Extra remark: in one case I asked people using a program
    on Windows which way is most convenient for them. Rather
    old answer was "And Linux" (which was a package allowing
    to run Linux binaries on Windows), modern answer was WSL.
    You see, people were interested in shortest way to get
    running program, not about purity of approach.

    (Those developers also seem to think that the only alternative to
    MSYS2, configure scripts etc is to use the monstrosity that is MS
    Visual Studio and all it comprises.)

    You see, people that use Windows also want to use tools. And
    when they do not like or can not use simpler tools they go to
    Visual Studio.

    If an application is written in C, then a C compiler should suffice.

    That is fine, as long
    as you keep this to yourselfs. But refusing other
    folks right to use tools they want to use is not
    fair.

    Developers can do what they like. But they shouldn't inflict their
    choices on other people, especially those using other OSes.

    Well, I use Linux and can maintain X based GUI. Since I do
    not have Windows I can not create native Windows GUI. And
    while there were several significant contributors to the
    program (some working on Windows), nobody volunteered to
    create Windows GUI. So ATM for this program the only way
    to get GUI on Windows is to use Cygwin and X library provided
    by Cygwin or run Linux version under WSL. AFAIK related
    approach was used by several commercial vendors providing
    both Unix and Windows versions of their programs: they used
    X based GUI, on Windows linked with commercial X library and
    connected to available X server. So, simply since "cost" of
    providing native GUI is too high, programs used X based GUI.

    I do not know why you develop software. For me significant
    part is fun, in particular that I can do "interesting"
    things with moderate effort. But all that fun disappears
    if somebody want we to do a lot of work for no good
    reason (beyond "I want it that way"). There were cases
    when I wanted things some way and spent effort to make
    them work that way. I do not complain that other
    developers did not want to do work for me.

    Or, to put it differently, when you refuse
    the tools _you_ need to do by hand needed work.
    You may be able to extract from work of others
    something that fits your taste (like list of files
    to compile), but that is your business.

    Fine. In that case tell me what the files are! Lua actually does
    this (but it's not obvious, it's also unexpected since the majority
    of apps are unhelpful in such matters).

    When I tried to build A68G, the whole build process, under
    VirtualBox Linux, took 5 minutes. I couldn't build under Windows
    because of a 30,000-line bash script.

    IME shell scripts usually were no problem, except for possibly
    requiring some patience (they run significantly slower than on
    Linux). In one case 'configure' script was really problematic,
    that is for about 2 weeks Windows NT 4.0 kept crashing, guy
    wanting to compile program restarted Windows, 'configure' made
    some progress and then Windows crashed again. After 2 weeks
    the guy gave up, run configure on Linux (I think it was the
    same hardware), 'configure' needed 2 hours on Linux, but
    went fine. Then some extra hours to compile the program.
    Note that there were _system_ crashes running otherwise ordinary
    program. However, Windows now seem to be much more reliable,
    so I do not expect trouble like this. And the mentioned 'configure'
    script on Linux run exceptionally long.

    However, with some effort, I was able to isolate the C files
    needed, and fortunately there was no synthesised code. Given that
    list of 12 files (!) building the app on Windows took my compiler
    one second.
    If so, then that's the wrong approach. There are various lesser
    compilers which know nothing about mingw or posix of anything of
    the sort. (For example, lccwin32, DMC, PellesC, I think Tiny C; I
    can't speak for MSVC.)

    You may be able to do some things using just a C compiler.
    But requesting people to do other things by hand is as
    wise as requesting them to code in assembler

    What things, what assembly? I'm talking about building a program
    written in a HLL using an existing compiler.

    That seems reasonable enough, yes?

    The only info needed is the list of files to submit to said
    compiler.

    If thats to the only needed info than Makefile.in (thing used as
    a template for Makefile) should contain something like:

    SRCS = file1.c file2.c fileN.c

    and list of files would be easy to extract from Makefile.in
    (just look for list of files). But usually there is more to
    this, like compiler flags, generated headers, etc. And the
    list of files usually depends on OS and possibly other
    factors.

    (assembler
    may be converted to binary faster than C, and with enough
    effort resulting binary will run faster than result of
    C compilation :). Another thing are libraries and
    bigger applications. Some folks want "true Windows look
    and feel", some say that proper Windows DLL must be
    compiled by MSVC

    Any C compiler for Windows can generate DLL files.

    I am not an expert on Windows features. But one things was
    that they wanted "components". Another was exception handling.
    So "just a DLL" was too little for them.

    (otherwise is lack some features that
    they consider essential). But there are people who
    had to or wanted to use Windows, but also wanted to
    use Unix applications. Cygwin was addressed to such
    folks: it allows you to compile substantial Unix
    application so that it runs on Windows. If you have
    no interest in such applications, than fine, Cygwin
    is probably not for you. Today WSL may be better
    for such a goal, but in the past Cygwin provided
    easiest way to port Unix application to Windows.
    If easy port was the goal and application was
    substantial, then Cygwin usually was right choice.

    As I understand it, POSIX is about 80 header files, of which ~30
    are the standard C headers, leaving 50 POSIX headers that do not
    exist on Windows.

    If your Linux app uses those headers, and you want to port it to
    Windows, then you have problems to solve.

    But I would question whether the apps I want to build need all
    that. How does POSIX figure in the GMP library for example?

    Well, GMP needs some way to signal division by 0. Which in principle
    do not require system stuff, but maybe they use something to
    do it nicer.

    From GMP manual:
    "Division is undefined if the divisor is zero. Passing a zero divisor to
    the division or modulo functions (including the modular powering
    functions mpz_powm and mpz_powm_ui) will cause an intentional division
    by zero. This lets a program handle arithmetic exceptions in these
    functions the same way as for normal C int arithmetic."

    So, they didn't find reason to complicate it with unnecessary
    dependencies.

    GMP need memory allocation, which can be done via
    'malloc' but also my be dan via system calls.


    I am pretty sure that they don't use system calls.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Fri Mar 14 10:37:32 2025
    On Fri, 14 Mar 2025 01:47:02 -0000 (UTC)
    Lawrence D'Oliveiro <[email protected]d> wibbled:
    On Wed, 12 Mar 2025 08:11:45 -0000 (UTC), Muttley wrote:

    On Tue, 11 Mar 2025 20:52:19 -0000 (UTC)
    Lawrence D'Oliveiro <[email protected]d> wibbled:

    How much are you going to pay?

    Nothing, because who knows what libc will do if the descriptor exceeds
    that soft limit.

    But you said “I'd bet money on the kernel/libc authors taking this into >account when allocating user space descriptor values”. But they didn’t -- >otherwise we *would* know what libc would do, and you yourself have
    admitted that we don’t. Therefore you have lost the bet. QED.

    You can't lose a bet if the race hasn't even started. Someone would need to exam
    ine the
    libc code and check. I have better things to do.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael S@21:1/5 to Richard Heathfield on Fri Mar 14 12:32:41 2025
    On Fri, 14 Mar 2025 09:54:07 +0000
    Richard Heathfield <[email protected]> wrote:

    On 14/03/2025 09:32, Michael S wrote:

    .... a 405-line article, of which 387 lines were >chevron-quoted.

    Learn to snip! Furrfu FCOL etc etc.


    I know, I know. I mean, *after* I hit 'Send' button, I know.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to Michael S on Fri Mar 14 15:07:29 2025
    Michael S <[email protected]> writes:
    On Fri, 14 Mar 2025 00:37:48 -0000 (UTC)
    [email protected] (Waldek Hebisch) wrote:



    GMP need memory allocation, which can be done via
    'malloc' but also my be dan via system calls.
    =20

    I am pretty sure that they don't use system calls.

    They let malloc handle the details (malloc will
    call mmap/brk/sbrk to allocate a region of memory
    that malloc will manage).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Heathfield@21:1/5 to Michael S on Fri Mar 14 14:33:44 2025
    On 14/03/2025 10:32, Michael S wrote:
    On Fri, 14 Mar 2025 09:54:07 +0000
    Richard Heathfield <[email protected]> wrote:

    On 14/03/2025 09:32, Michael S wrote:

    .... a 405-line article, of which 387 lines were >chevron-quoted.

    Learn to snip! Furrfu FCOL etc etc.


    I know, I know. I mean, *after* I hit 'Send' button, I know.

    Fair enough. To err is human, but to really foul things up click
    'Send'.

    --
    Richard Heathfield
    Email: rjh at cpax dot org dot uk
    "Usenet is a strange place" - dmr 29 July 1999
    Sig line 4 vacant - apply within

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to [email protected] on Fri Mar 14 15:10:09 2025
    [email protected] writes:
    On Fri, 14 Mar 2025 01:47:02 -0000 (UTC)
    Lawrence D'Oliveiro <[email protected]d> wibbled:
    On Wed, 12 Mar 2025 08:11:45 -0000 (UTC), Muttley wrote:

    On Tue, 11 Mar 2025 20:52:19 -0000 (UTC)
    Lawrence D'Oliveiro <[email protected]d> wibbled:

    How much are you going to pay?

    Nothing, because who knows what libc will do if the descriptor exceeds
    that soft limit.

    But you said “I'd bet money on the kernel/libc authors taking this into >>account when allocating user space descriptor values”. But they didn’t -- >>otherwise we *would* know what libc would do, and you yourself have >>admitted that we don’t. Therefore you have lost the bet. QED.

    You can't lose a bet if the race hasn't even started. Someone would need to exam
    ine the
    libc code and check. I have better things to do.


    The allocation of file descriptors _by the kernel_ is well known and standardized. The lowest numbered non-open file descriptor is selected
    (except for cases like dup2, passing FD's via pipes/sockets/streams
    and a couple other cases where the FD # is chosen by the caller, not
    the kernel).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Waldek Hebisch on Fri Mar 14 17:05:21 2025
    On 14/03/2025 00:37, Waldek Hebisch wrote:
    bart <[email protected]> wrote:

    This task can be done with a program called a 'compiler'.

    You ignore fact that people are developing programs.

    And many, for assorted reasons, just need to build programs from source
    code ...

    And developement
    is much more than "turning a bunch of source files into an executable".

    ... then this /is/ pretty much it. If the process /has/ to involve
    multiple source languages (rather than just being the nearest language
    the developer had on-hand to solve some aspect), then support for those
    become part of the set of dependencies.

    Those dependencies become part of the configuration needed at the
    build-site, and ought to be carefully considered.

    Instead, the expectation seems to be that the user of the build-machine
    has EVERYTHING the developer has, even if poorly justified.

    GPL says "The source code for a work means the preferred form of
    the work for making modifications to it". And that nicely captures
    the idea: sources are in form that is convenient for developer
    and may require several steps before one gets the executable.

    And my idea is different; there is:

    * The development source code

    * <Intermediate>

    * The runnable binaries

    What I'm suggesting goes in the middle. A minimal, streamlined set of
    sources, possibly amalgamated (which helps if the user wants to
    incorporate this product into their own), with a minimal set of
    dependencies.

    But even if users want to be able to develop the program further, I have
    doubts as to how much the personal choices and programming styles of the
    main developer(s) should be inflicted on others.



    FYI, is started using "Linux tools" on MS-DOS, before I
    heard about Linux. And tools are widely available,
    IIUC classic zOS is problematic, but I think that USS

    Before I started working with microprocessors on basically bare systems,
    I used DEC and ICL computers. There I never used any such tools. There
    were compilers, and there were linkers.

    While on 1980s PC-style machines, programs were typically not huge. I
    used my own fast compilers and fast loaders (to combine object files
    into one program).

    I would be very, very familar with the modules of my application. And I
    would know the dependencies.

    In the language I used, all modules of an app shared the same
    program-wide header. Any changes in a header usually meant a full
    recompile, unless I was confident that wasn't needed. In any case, a
    full build was still a matter of seconds.

    So for me they would have been pointless.

    (I didn't use any other third party tools, so why 'make' of all things?
    How would it even work when my compiler was built into my IDE as a
    resident program? Make needs to invoke it as a discrete program. It
    would make things slower rather than faster!

    And of course now, it wouldn't work AT ALL with my whole-program
    compiler - it's either all files or nothing.)

    is OK. Some systems may be prone to breakage, when
    there is small number of _active_ users and nobody bothers
    to timely report real problems.

    Coming back to developement, in many cases it is desirable
    to generate some C files. C preprocessor can do some
    transformations, but is may be convenient to transform
    source in a way hard to do via proprocessor. Also,
    this is C group, but big programs frequently have parts
    in different languages, an then it is good to have
    language-neutral tools. Simple tools to transform
    or generate files are 'sed' and 'awk'. Some people
    use 'perl' or 'python' for such purpose and in principle
    there is much more possiblities.

    I think a built-in, /capable/ but still compact script language in an OS
    would have a been good idea, even better if it was the same one across
    OSes. Shell scripts don't really count, and ones like Python are quite
    massive (and then, people coding in Python are 99% guaranteed to need to
    import third party modules that have to be installed).

    So it hasn't happened. In that case, supply scripts tuned to the OS
    where to the build is to be done, or avoid them, or use a language which
    /has/ to be pressent (eg. C if the main app is already in C).

    Or provide something that Just Works, without it being some behemoth
    that involves multi-GB downloads, takes an hour, and with a thousand
    failure points, to end up with that 0.5MB binary.

    More specialised are compiler-writing tools like 'bison'
    and 'flex'. You can write a parser by hand, but using
    'bison' one does not need to know much to write working
    parser. 'flex' helps in writing scanners, but IMO
    is quite useful for text processing task (its support
    for regular expressions is nicer than Perl or Python
    offer, and speed frequently is much better too).

    Help! I've played with those tools, and believe me you don't want such dependencies. (For a start, there are a hundred variations from 100KB to
    10MB.)

    You build your app, but then you want someone else to build it. Now THEY
    have to source the exact tools you used.

    Users beside binary need also documentation. In principle
    documentation could be provided as plain text,

    Users of applications? Come on, this is not about creating a binary
    anymore, it is about packaging an application. That is an entirely
    different endeavour. It might not even involve running any compilers.

    It might however involve writing additional applications such as
    installers. Or web-programming if it's partly done on-line.

    How far do you take this, how much of the computer industry are you
    going to drag in, to justify a complex makefile - and configure script -
    for some Mickey Mouse project I'm trying to build?

    but there
    is now tendency to offer nicely formatted documentation

    <long snip>

    (they can be implemented in few megabytes of code)
    incentive to make smaller tools is rather low.

    To reiterate, I am talking about this particular subtask:

    * You have N source files to translate into a 1 binary file, using a
    compiler.

    That Is All. You want to justify not caring about how badly this one
    task is done, because there may be a whole lot of other stuff that could
    be needed on top.

    But it is this one task that is my biggest stumbling block with other
    people's programs. And usually I don't need anything else.

    In this case of GMP.DLL (please don't send me any more links; it was
    just an example of something I wanted to try out many years ago), the
    end result is one binary of 0.4-0.7MB. Nothing else; no installation, no manuals written in LaTeX, no nothing.

    To that end, the build process is over-the-top in my view.

    How you thought that maybe, such things have gotten out of hand, and if
    so, why is that? Maybetoo many people not caring, because the process
    works (eventually, and having to bend over backwards on non-compliant
    OSes), and it is apparently nobody's job to keep on top of such things.

    Just add extra layers to solve problems, or buy faster machines with
    more cores!

    (I would love to know how long such a build process would have taken on
    a 1980s machine with floppy disks! Possibly a week.)

    It should not rely on anything that is not native to the target
    platform.

    Why not? You already admited that one need a compiler. While
    a bunch of tiny tools should be a blocker?

    Odd attitude. So if I need one small dependency, I might as well have a
    hundred bigger ones?

    With such attitudes, I think we're talking at cross purposes.

    And I'm not suggesting reinventing those 2/4 either, just using the ones
    I have on my OS.

    Well, one trouble is that things you have on your preferred OS are
    not free, one can not use them legally on a different OS.

    I haven't suggested that (which things?). And compilers are generally
    free on Windows too.

    (Also I'm not sure why people have a problem with a paid-for OS. Is
    Mac-OS free?

    Is Android free? If so, should people be allowed to complain if there's something wrong with it? According to Scott Lurndal, they're not allowed
    to complain about free, open source software. They should write their own!)

    it comes to developement tools what cames with basic install of
    your OS seem to be quite limited. No law prevents you from installing
    free tools and that is simplest solution.

    Yeah, but it's not just a couple of tools, is it? It's basically
    duplicating most of the Linux eco-system on Windows.

    Suppose you want to run some software on Linux, but it was only
    available as source code, and it could only be built within Visual Studio.

    What would you think about installing the whole of VS under Linux, under
    a complex set of emulation layers? What about the end result being an
    EXE, not ELF file, itself needing to run under Wine?

    It's messy isn't it? And completely out of proportion to the perhaps
    300KB end-result. And with plenty of failure points (I don't think I've
    had anything work properly under Wine.)

    Wouldn't you rather just build it natively on Linux with the tools you
    already have?

    Perhaps you're starting to see my point of view!

    Alternative is extra work for developers to reproduce what tool do
    within program, that would be reinventing the wheel.

    Reinventing a wheel is fine, if it means I end up with a 26" wheel
    exactly the right size for my bike, rather than a monstrous 100' one
    that threatens to destroy my town!

    (26" is 0.7m, 100' is 30m.)

    Or some
    intermedate stages between binary and source, which require extra
    work and there seem to be small interest in such things (say
    hundreds of people among milions using free software).

    Take the argument further: why even bother with binary anymore? What is
    the point? Just provide EVERYTHING as source code.

    Apparently it is completely error-proof provided Bart isn't involved.

    But if you admit to there being some advantages to binary, then some
    apply to streamlined source code too.

    Otherwise
    they would have to spend effort on incompatible "Windows
    native toolkit" which would fragment developement effort.

    A simplified, streamlined build process would be simpler and faster on
    any target not just Windows.

    After all there wouldn't be any Windows dependencies - as you say
    there's nothing in Windows for them to use!

    Using no tools may work for very simple projects, but
    means too much extra work in other cases.

    (Those developers also seem to think that the only alternative to MSYS2,
    configure scripts etc is to use the monstrosity that is MS Visual Studio
    and all it comprises.)

    You see, people that use Windows also want to use tools.

    Voluntarily, or because they have to as so much stuff needs them, or
    they have been exposed to developing software in academia where they
    used Linux?



    If an application is written in C, then a C compiler should suffice.

    That is fine, as long
    as you keep this to yourselfs. But refusing other
    folks right to use tools they want to use is not
    fair.

    Developers can do what they like. But they shouldn't inflict their
    choices on other people, especially those using other OSes.

    Well, I use Linux and can maintain X based GUI. Since I do
    not have Windows I can not create native Windows GUI. And
    while there were several significant contributors to the
    program (some working on Windows), nobody volunteered to
    create Windows GUI. So ATM for this program the only way
    to get GUI on Windows is to use Cygwin and X library provided
    by Cygwin or run Linux version under WSL.

    About a decade ago, I needed a console library for my scripting
    language, that was designed to work on Windows or Linux. Again it was an
    API layer which either worked on top of WinAPI, or used Linux functions
    (which mostly used escape codes).

    I similar plans for for GUI/graphics, but I lost interest, and also
    didn't relish working with X11 which seemed even more impossible than
    WinAPI.

    However there are some cross-platform libraries, and for some stuff I
    could use those.

    So I think you used the wrong approach by being too dependent on your
    native GUI library. Actually I'd use a simpler API layer anyway even if
    I wasn't planning to go cross-platform.


    I do not know why you develop software.

    The stuff I do now is language related: compilers, interpreters,
    assemblers, backends, and (shortly) emulators.

    It's fascinating getting an idea, especially a bold one, and running
    with it to see what happens.

    Like a new module scheme, but it's not so great then you refine it
    further, now it is gorgeous.

    Whole-program compilation - can it work? Will it be fast enough? Is it
    fast enough to run from source?

    What happens if I try and interpret C code? What happens if I interpret
    sql.c (a 250Loc file)? What happens if I interpret the compiler which
    then interprets sql.c?

    Can a C compiler (not interpreter) work without a linker?

    How tidily can such tools be packaged? How small can they be? How self-contained? How fast?

    How can I minimise dependencies? How easy is it to distribute source
    code for someone else to build on a remote machine? (Getting on topic!)

    How much faster is my dynamic language than equivalents? How much more
    adept is it?

    I can do all this with no outside help (I need a file system and a C
    library, both provided by Windows; on Linux I'd also need a local C
    compiler, as mine targets Windows ABI.)

    So, what I do is fun for me and challenging. Having to use what I
    consider inferior and dated tools is not. Neither would I want to use
    massive GUI apps to develop software.

    I haven't even touched on a language development.


    For me significant
    part is fun, in particular that I can do "interesting"
    things with moderate effort. But all that fun disappears
    if somebody want we to do a lot of work for no good
    reason (beyond "I want it that way").

    That is exactly my view of makefiles.

    Note that virtually all my development is done with a small, simple,
    text-mode IDE. That's been the case since 1981, when the IDE included a resident primitive editor and compiler.

    The IDE displays the modules of my project, and allows me to edit,
    compile, link (in the old days, or for C now) and run.

    same hardware), 'configure' needed 2 hours on Linux, but
    went fine. Then some extra hours to compile the program.

    How long ago and what size was the final result?


    C is supposed to be that famous portable HLL, but in developer's minds,
    'portable' seems to mean working only on any Unix-like system!

    All general purpose OS-es that I know provide files and some
    form of 'open'. Of course, that needs system specific headers.
    On systems providing POSIX headers one can just use POSIX, for
    others do whatever given system need to be done.

    (My language, not C, has a std library that includes some OS
    functionality. But those are wrapped in a set of functions that reside
    in one OS-specific module, that provides the same API across Windows and
    Linux.

    For example, the function 'os_getdllinst' is implemented on top of
    'LoadLibrary' on Windows, and 'dlopen' on Linux.

    What I don't do is directly use LoadLibrary, and insist that people
    running it on Linux have to install some emulation library to provide
    that Windows functionality. Which wouldn't work anyway as it would also
    work with .dll files rather than .so files.

    You see the kind of thought I put into this stuff? I wish others would
    do the same! Instead of being so 'provincial'.)

    Your library stuff is nice. I am not sure why you find 'open'
    troubling? AFAIR it was available in C libraries of DOS and
    Windows compilers that I used (IIRC there was some part talking
    about '_open' which was supposed to be more official interface,
    but one could make plain 'open' to work).


    To put it differenly, you could compile program in one computer
    and get relatively small program which runs OK on different
    Windows machines because libraries it needs are already present.
    This is quite different compared to Cygwin, where you need to
    install Cygwin libraries before normal Cygwin program can run
    (I write about normal programs because actual compiler in
    Cygwin and Mingw used to be the same and with some tweaks one
    could use Cygwin compiler to produce MinGW execuatbles).


    I'm not interested in whatever Cygwin or Mingw are about.

    Oh, so you do not want to know. In such case why you started
    discussing it?

    Because it comes up everwhere that gcc is used on Windows?

    I started by saying I didn't know exactly what Mingw was. I used to
    think it was the compiler, and indeed obtaining gcc used to involve
    visiting sites where 'mingw' or 'mingw64' names figured heavily.

    Some of my gcc files also have 'mingw32' in them; I don't know why:

    c:\tdm\bin>fc gcc.exe x86_64-w64-mingw32-gcc.exe
    Comparing files gcc.exe and X86_64-W64-MINGW32-GCC.EXE
    FC: no differences encountered

    Apparently it is to do with some boring functions discussed in parallel
    subthreads.

    The 'x86_64-w64-mingw32' part is so called target triple, it
    specifies on which system binaries produced by the compiler
    are supposed to run. 'mingw' really means using Microsoft
    libraries. I am not sure what _exactly_ this combination
    means, it could mean 32-bit code which can only be run on
    64-bit Windows. Or 64-bit code that uses library confusingly
    named 'mingw32'.

    If I was really interested I could try to build on Linux
    gcc with such a target and look what it produces, but
    I do not thing we are interested enough in the answer to
    do this.

    If I were to
    use libraries not part of the OS, then it would be ones like SDL2
    to get
    interesting things done. Not try and emulate bits of Linux that I'd
    never heard of.

    I mentioned one case: about 90% of code in "my" library was
    provided in fact by other libraries. So using code provided
    by other saved me a lot of work, turning something that
    otherwise could be multiyear job into reasonably small effort.

    Sure. Then just provide the binaries which somebody (or even some
    script) can build once, on a machine where everything is known to work.

    This suits Windows which has famous binary compatibility. (If there is a
    32-bit version of Windows 11, it can probably still run my 1990s 16-bit
    binaries!)

    To use the libraries I had to work out build process, thanks
    to tools it was very easy.

    Thanks to tools designed to work within a labyrinthine build
    environment, working within such an environment.

    Purely as an exercise, could you have produced a minimal viable bundle
    of source files, compiler (or recommendation for one), readme and what
    ever else was necessary, that would work in an alien environment? Say,
    Windows.

    IIRC I produced a CDROM containg sources and MinGW, installing it
    on Windows and running 'make' would recompile my library from
    sources. I do not remember exactly, but I think that it would only recompile "my" files and simply link in libraries that I used.

    If you mean source bundle for everything, then there were 6
    general libraries involved: libz (compression, needed by
    libtiff), libjpeg (needed by libtiff), libtiff, lapack,
    BLAS (needed by lapack), hull (geometry code). Each had its
    own Makefile. lapack and BLAS needed fortran compiler.
    I am not sure if I tried to build the libraries on Windows,
    but I think that possibly with small tweaks to Makefiles it
    would work (using MinGW compiler + tools). I write about tweaks
    as libtiff needed to run a program, but probably did not provide
    an '.exe' extention.

    In 1990s I depended on an Intel 'IJL' DLL for loading Jpegs. Then Intel withdrew the binary from their website (fortunately I still had copies).

    Instead, they provided a developer's download, which included the source
    code for you to build it yourself. But it was a part of much bigger
    package which was a 75MB download. At time, I was still using a modem
    that might have run at max 33K baud.

    The effort needed to create that DLL (I didn't even have a C compiler), together with the small chance of sucess was completely off the scale
    compared with just downloading a 350KB ready-to-use binary.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to bart on Fri Mar 14 18:00:06 2025
    bart <[email protected]> writes:

    On 14/03/2025 00:37, Waldek Hebisch wrote:
    bart <[email protected]> wrote:


    Instead, the expectation seems to be that the user of the build-machine
    has EVERYTHING the developer has, even if poorly justified.

    The expection is that the end-user trying to build the package
    has all the necessary prerequisites. Not "EVERYTHING the developer has".


    What I'm suggesting goes in the middle. A minimal, streamlined set of >sources, possibly amalgamated (which helps if the user wants to
    incorporate this product into their own), with a minimal set of
    dependencies.

    Why on earth would a developer do this just to make -your- life
    easier? Nobody else is complaining endlessly about it.



    Before I started working with microprocessors on basically bare systems,
    I used DEC and ICL computers. There I never used any such tools. There
    were compilers, and there were linkers.

    And there were subsystems used to build the application; perhaps
    a few cards, or perhaps a program like WFL (workflow language
    Burroughs mainframes used to automate the builds).


    While on 1980s PC-style machines, programs were typically not huge. I
    used my own fast compilers and fast loaders (to combine object files
    into one program).

    The last thing a Unix programmer would want is to use a 1980s PC,
    then or now.

    <snip 1000 lines>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Scott Lurndal on Fri Mar 14 19:04:33 2025
    On 14/03/2025 18:00, Scott Lurndal wrote:
    bart <[email protected]> writes:

    On 14/03/2025 00:37, Waldek Hebisch wrote:
    bart <[email protected]> wrote:


    Instead, the expectation seems to be that the user of the build-machine
    has EVERYTHING the developer has, even if poorly justified.

    The expection is that the end-user trying to build the package
    has all the necessary prerequisites. Not "EVERYTHING the developer has".

    Think about the word 'necessary'.

    Think also about how much arbitrary cruft a developer may accumulate,
    not just over the lifetime of one project, but longer term, and whether
    it is fair to inflict /that/ on the poor sod who has to duplicate the
    exact environment.

    Further think about whether the developer, whose skills may lie better
    within the application area, has in place the most efficient build
    processes.

    Oh hang on, scrap that. No one thinks about such stuff at all. Just
    throw extra machine resources at the problem and expect everyone else to
    do the same. Because after all the developer only has to run these
    processes dozens of times a day for months or years of development, so
    it is not worth considering.




    What I'm suggesting goes in the middle. A minimal, streamlined set of
    sources, possibly amalgamated (which helps if the user wants to
    incorporate this product into their own), with a minimal set of
    dependencies.

    Why on earth would a developer do this just to make -your- life
    easier? Nobody else is complaining endlessly about it.

    Perhaps you'd like to answer the question I posed about why bother with distributing software as binaries if building from source is so effortless.

    Or maybe, why single file amalagamations like sqlite3.c exist. After all
    no one (according to you) was complaining about grappling with 100
    discrete files.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to Michael S on Fri Mar 14 19:28:35 2025
    On 2025-03-14, Michael S <[email protected]> wrote:
    On Fri, 14 Mar 2025 09:54:07 +0000
    Richard Heathfield <[email protected]> wrote:

    On 14/03/2025 09:32, Michael S wrote:

    .... a 405-line article, of which 387 lines were >chevron-quoted.

    Learn to snip! Furrfu FCOL etc etc.


    I know, I know. I mean, *after* I hit 'Send' button, I know.

    It's not easy!

    Get this: I patched the slrn newsreader myself to calculate the
    quoted line to original line ratio and issue a diagnostic against a configurable threshold.

    And then, what do I do?

    I just force past it most of the time.

    Wasn't meant to be.

    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @[email protected]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Harnden@21:1/5 to bart on Fri Mar 14 19:37:01 2025
    On 14/03/2025 19:04, bart wrote:
    After all no one (according to you) was complaining about grappling with
    100 discrete files.

    100 discrete files helps 100 developers not to step on each other's toes.

    And most of those 100 .o's won't need to be recompiled on every make.
    It's quicker and easier.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Scott Lurndal on Fri Mar 14 19:18:34 2025
    On 14/03/2025 18:00, Scott Lurndal wrote:
    bart <[email protected]> writes:

    While on 1980s PC-style machines, programs were typically not huge. I
    used my own fast compilers and fast loaders (to combine object files
    into one program).

    The last thing a Unix programmer would want is to use a 1980s PC,
    then or now.

    <snip 1000 lines>

    This is one of the lines you snipped:

    (I would love to know how long such a build process would have taken
    on a 1980s machine with floppy disks! Possibly a week.)

    The context is a project like GMP and its 35,000 of script which is the
    first hurdle. The end result is an approx 0.5MB library, which is not
    that far off being a plausible piece of software for those 1980s PCs.

    I'm guessing that it would have taken an unreasonably long time on such
    a machine. Ergo, it would be considered hopelessly inefficient.

    So, it sounds like you're either completely missing the point, or
    choosing to ignore it. Which is that the build task in this case is too
    long and slow in proportion to the task.

    (Of course, I realise this is not quite as on topic as 1970s Burroughs machines.)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to Richard Harnden on Fri Mar 14 20:26:18 2025
    On 2025-03-14, Richard Harnden <[email protected]d> wrote:
    On 14/03/2025 19:04, bart wrote:
    After all no one (according to you) was complaining about grappling with
    100 discrete files.

    100 discrete files helps 100 developers not to step on each other's toes.

    And most of those 100 .o's won't need to be recompiled on every make.
    It's quicker and easier.

    But, here we go again, Bart's compiler can rebuild all 100 .o's
    faster than gcc can compile just one, etc, etc.

    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @[email protected]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Richard Harnden on Fri Mar 14 21:15:10 2025
    On 14/03/2025 19:37, Richard Harnden wrote:
    On 14/03/2025 19:04, bart wrote:
    After all no one (according to you) was complaining about grappling
    with 100 discrete files.

    100 discrete files helps 100 developers not to step on each other's toes.

    And most of those 100 .o's won't need to be recompiled on every make.
    It's quicker and easier.


    That may be true about the people who /develop/ this sqlite3 product.

    But this is a file created to ease deployment by people who want to
    /use/ it.

    I don't know why nobody in this group can grasp that concept even though
    I've explained it a hundred times. For example, I have a transpiler
    product that turns a 50-module project in my language into a single, easy-to-build C source file.

    But everyone makes the same point about it being hard to manage. No one
    is even going to look inside it!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Harnden@21:1/5 to bart on Fri Mar 14 21:35:13 2025
    On 14/03/2025 21:15, bart wrote:
    On 14/03/2025 19:37, Richard Harnden wrote:
    On 14/03/2025 19:04, bart wrote:
    After all no one (according to you) was complaining about grappling
    with 100 discrete files.

    100 discrete files helps 100 developers not to step on each other's toes.

    And most of those 100 .o's won't need to be recompiled on every make.
    It's quicker and easier.


    That may be true about the people who /develop/ this sqlite3 product.

    But this is a file created to ease deployment by people who want to /
    use/ it.

    This is a newsgroup populated by developers.

    Users won't be going anywhere near a compiler - they'll get shipped the
    binary.


    I don't know why nobody in this group can grasp that concept even though
    I've explained it a hundred times. For example, I have a transpiler
    product that turns a 50-module project in my language into a single, easy-to-build C source file.

    But everyone makes the same point about it being hard to manage. No one
    is even going to look inside it!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Keith Thompson on Fri Mar 14 21:43:09 2025
    On 14/03/2025 20:04, Keith Thompson wrote:
    bart <[email protected]> writes:
    On 14/03/2025 18:00, Scott Lurndal wrote:
    bart <[email protected]> writes:
    [...]
    What I'm suggesting goes in the middle. A minimal, streamlined set of
    sources, possibly amalgamated (which helps if the user wants to
    incorporate this product into their own), with a minimal set of
    dependencies.
    Why on earth would a developer do this just to make -your- life
    easier? Nobody else is complaining endlessly about it.

    Perhaps you'd like to answer the question I posed about why bother
    with distributing software as binaries if building from source is so
    effortless.

    Nobody said it was "effortless". You made that up.



    I can install a binary software package on my computer without
    needing a compiler, and it typically takes a few seconds because
    someone else has done the work of building it. I happen to have
    a compiler, but not everyone does. If I have the sources, I can
    probably install a newer version than my OS makes available, and
    perhaps I can choose some configuration options. And yes, it's a
    bit more effort.

    A 'bit more effort' is an understatement. It needs more dependencies. It
    will take much longer. And it's more likely to fail.

    So I suggested an intermediate compromise that is suited for when your
    aim /isn't/ to work on the product yourself.

    But people like you are downplaying the differences, and pissing all
    over my suggestions.

    (Yet, when products that include part-compiled code, such as JVM, or
    that has final JIT-compilation applied at the user-site, will
    undoubtably be lauded here. Even though they are a similar concept.)

    Or maybe, why single file amalagamations like sqlite3.c
    exist. After all no one (according to you) was complaining about
    grappling with 100 discrete files.

    Think about why single file amalgamations like sqlite3.c are so
    rare. There isn't much demand for them.

    Is that true? Libraries whose source is presented as either one .h and
    one .c file, or even a single .h file, seem popular.

    For example I use one called stb_image.h, which contains loaders or
    decoders for 9 different image format.

    Contrast with LIBJPEG which needs 54 .c files (and a bunch of .h files)
    just to decode JPEG. Which one is going to be easier to deploy if you
    just want to statically add that capability to your project?

    (Or will people still insist that want everyone wants to really do is
    mess about with the source code?)

    There's a few more here: https://github.com/r-lyeh/single_file_libs

    Here's a comment from Reddit in response to 'Are single header libraries good?':

    "They're great for simple commonly-used things. Users don't have to
    download a crap ton of files, figure out some convoluted build system,
    or troubleshooting linking files together. You can usually just copy the
    header file and immediately use it by adding two lines of code."

    BTW I didn't post that. In this newsgroup, no one here is ever going to
    admit that build systems can be convoluted. But it becomes important if
    trying to integrate such projects into yours.



    I think that SQLite3 is
    designed with portability in mind far more than most software is.
    Presumably its developers expend considerable effort to keep it
    that way, effort that developers of other software probably don't
    feel the need to expend.

    It works on Windows and Linux; that's not exactly ultra portable.


    For most software packages, building them from source is reasonably
    easy. I don't care how big that the "configure" script is, because
    99.9% of the time I don't even look at it. It takes some time to
    run, and sure, that could probably be streamlined, but I typically go
    off and do other things while it's running.

    sql.c (a standalone product using sqlite3.c) takes 0.25 seconds to
    build. Or 0.15 seconds if I choose to interpret it.

    Even gcc only takes 7 seconds, and this is a 1MB excutable. Not really
    much time to do anything.

    I'm aware that it's not
    so easy in your environment.

    As I showed, it is very easy when you dump the 'convoluted' build system!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Chris M. Thomasson on Fri Mar 14 21:20:17 2025
    On Fri, 14 Mar 2025 12:46:21 -0700, Chris M. Thomasson wrote:

    On 3/13/2025 6:48 PM, Lawrence D'Oliveiro wrote:

    On Thu, 13 Mar 2025 16:45:28 -0700, Chris M. Thomasson wrote:

    I have no idea how the Python dev's use IOCP with sockets.

    They can’t figure out a way to support file I/O notifiers (of the kind
    commonly used with event loops) with it. If you know of a way to do it,
    please tell us.

    Well, usually, iirc, been a while, when GQCSEX returns we take the WSAOVERLAPPED and convert it to our extended structure. Basically
    similar to how Linux uses offsetof to extend node structures, or on
    Windows CONTAINING_RECORD, then we can use that to pass into a function called on_read, on_write, on_accept, on_connect, ect... type of
    functions.

    Does that require explicitly queuing a read or a write operation?

    According to the platform support notes <https://docs.python.org/3/library/asyncio-platforms.html>,
    ProactorEventLoop does not allow the addition of reader/writer callbacks
    for caller-supplied file descriptors.

    Remember what these callbacks do: they notify that the FD will accept a
    read or a write, not that a pending read or write has completed.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Richard Harnden on Fri Mar 14 21:47:34 2025
    On 14/03/2025 21:35, Richard Harnden wrote:
    On 14/03/2025 21:15, bart wrote:
    On 14/03/2025 19:37, Richard Harnden wrote:
    On 14/03/2025 19:04, bart wrote:
    After all no one (according to you) was complaining about grappling
    with 100 discrete files.

    100 discrete files helps 100 developers not to step on each other's
    toes.

    And most of those 100 .o's won't need to be recompiled on every make.
    It's quicker and easier.


    That may be true about the people who /develop/ this sqlite3 product.

    But this is a file created to ease deployment by people who want to /
    use/ it.

    This is a newsgroup populated by developers.

    Yes, but in this example, they're developers working on their own
    product, who want to incorporate somebody else's project as source code.

    Then 1 or 2 files will be hell of a lot easier than 100 files in some
    arbitrary directory tree.

    Users won't be going anywhere near a compiler - they'll get shipped the binary.

    Why not? Apparently all they have to is type 'make'.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Richard Heathfield on Fri Mar 14 23:01:07 2025
    On Fri, 14 Mar 2025 09:54:07 +0000, Richard Heathfield wrote:

    Learn to snip!

    I do that, and then the other person claims that I snipped out something important that made their point seem completely the opposite to what I
    thought it was.

    Of course, they are never able to point to the part that was so
    important ...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Chris M. Thomasson on Fri Mar 14 23:03:55 2025
    On Fri, 14 Mar 2025 15:06:47 -0700, Chris M. Thomasson wrote:

    On 3/14/2025 2:20 PM, Lawrence D'Oliveiro wrote:

    Does that require explicitly queuing a read or a write operation?

    Well, I still don't know how Python is implementing things.

    The question is, how do *you* think they should be implemented, in such a
    way that those claimed limitations would not exist?

    Keep in mind that successful IOCP means the completion of an io action
    has occurred, or an error has been raised. It could be a new connection,
    a buffer was sent, data has been read. That is the C (completion) in
    IOCP, see?

    In other words, you actually have to have queued I/O operations
    outstanding on every connection in order to use IOCP. Dave Cutler
    basically reinvented VMS-style programming, with completion callbacks, in
    a slightly more message-based form.

    This kind of thing does not scale to having thousands of connections open
    at once.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Keith Thompson on Fri Mar 14 23:16:06 2025
    On 14/03/2025 22:15, Keith Thompson wrote:
    bart <[email protected]> writes:
    On 14/03/2025 20:04, Keith Thompson wrote:
    bart <[email protected]> writes:
    On 14/03/2025 18:00, Scott Lurndal wrote:
    bart <[email protected]> writes:
    [...]
    What I'm suggesting goes in the middle. A minimal, streamlined set of >>>>>> sources, possibly amalgamated (which helps if the user wants to
    incorporate this product into their own), with a minimal set of
    dependencies.
    Why on earth would a developer do this just to make -your- life
    easier? Nobody else is complaining endlessly about it.

    Perhaps you'd like to answer the question I posed about why bother
    with distributing software as binaries if building from source is so
    effortless.
    Nobody said it was "effortless". You made that up.

    No response to that?

    You misrepresent what others have said, and don't reply when it's
    pointed out.

    If you can cite someone here actually saying that building from source
    is "effortless", I'll retract this statement.

    Every single post arguing against me implies that it is effortless: that
    is, all you have to do is type 'make'.

    NO ONE wants to admit to building can be a difficult process. Or they
    do, they will not admit of any alternative but to provide a binary.

    I can install a binary software package on my computer without
    needing a compiler, and it typically takes a few seconds because
    someone else has done the work of building it. I happen to have
    a compiler, but not everyone does. If I have the sources, I can
    probably install a newer version than my OS makes available, and
    perhaps I can choose some configuration options. And yes, it's a
    bit more effort.

    A 'bit more effort' is an understatement. It needs more
    dependencies. It will take much longer. And it's more likely to fail.

    So I suggested an intermediate compromise that is suited for when your
    aim /isn't/ to work on the product yourself.

    If I understand correctly, you want one build system for developer and
    a simpler one for end users. Is that accurate?

    By all means feel free to make such a thing. But having two different
    build systems means they both have to be maintained. It makes it more
    likely that something works correctly for the developers and fails for
    end users.

    Wouldn't that be the case for both types of build? And which one kind is
    more likely to fail?

    You can well find that a simpler build process results in fewer issues
    overall.

    And it's useful only for end users who build from source. I do that,
    but most users don't. Even in my case, the vast majority of the
    software on my system is installed from pre-built binaries via the OS's package management system. For a more typical user, it's likely that
    all of it is.

    So in a sense the simpler build system you want already exists: copying binary files to where they need to be.

    If a binary files exists, and if AV will let me download it, or run it.

    I have a problem supplying binaries to anyone who wants to run my
    programs on their Windows machine. So I use my own intermediate representations. They look like this:

    c:\qx>mc -c qc
    M6 Compiling qc.m---------- to qc.c

    c:\qx>dir qc.c
    14/03/2025 22:39 1,095,211 qc.c

    'mc' is a transpiler which converts dozens of modules into one C file.
    That C file is what is downloaded by the user. The build process on
    Windows is this:

    c:\qx\gcc qc.c

    You see how utterly simple it can be and how trivial it is to build?

    The file I generate corresponds 1:1 with the binary file that I would
    have prefered to provide. It's as simple as a binary, and needs only
    that one-line step to turn into an actual binary.

    The above is for Windows however; for Linux it's a bit harder:

    c:\qx>mc -c -linux qc -out:qu
    M6 Compiling qc.m---------- to qu.c

    Here gcc on Linux needs a couple more options, and a binary would not be
    an option even without AV issues.

    So, a build CAN be this simple. You might say, these are small products
    and real ones are more complicated. Well take a look at NASM: https://github.com/netwide-assembler/nasm/tree/master, and in INSTALL.

    It supposedly builds on Windows, but I can't make head or tail of the instructions. There are 2000 files here in two dozen directories.

    NASM is an x64 assembler; I have one of those too; I can also provide a
    single C file which can be trivially built.

    So your arguments are spurious. You're making excuses about why such
    things are not possible or are too hard while knowing little about it.

    As I showed, it is very easy when you dump the 'convoluted' build system!

    Great. Show us how you can "dump the 'convoluted' build system" for,
    say, GNU coreutils.

    I don't know those products. Maybe they are already ten times more
    complex than need be. For the products I create (compilers,
    interpreters, assemblers, backends) there is no build system to speak
    of, and I've showed two examples.

    The build process involved download and compiling one source file.
    Sorry, I haven't managed to reduce it to zero source files!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to bart on Sat Mar 15 01:11:00 2025
    On Fri, 14 Mar 2025 19:04:33 +0000, bart wrote:

    Think also about how much arbitrary cruft a developer may accumulate,
    not just over the lifetime of one project, but longer term, and whether
    it is fair to inflict /that/ on the poor sod who has to duplicate the
    exact environment.

    You’re thinking of proprietary software. Open Source doesn’t work that
    way. Think of how the Linux kernel has a policy that every line of code
    has to have a maintainer, who responds to a known email address. Otherwise
    the code gets dropped.

    Microsoft discovered this the hard way, a few years ago.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to bart on Sat Mar 15 01:14:06 2025
    On Fri, 14 Mar 2025 21:47:34 +0000, bart wrote:

    On 14/03/2025 21:35, Richard Harnden wrote:

    Users won't be going anywhere near a compiler - they'll get shipped the
    binary.

    Why not? Apparently all they have to is type 'make'.

    There are build-from-source distros. E.g. on Gentoo, you type “emerge”.

    I think some BSDs have that option, too.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Richard Harnden on Sat Mar 15 01:13:08 2025
    On Fri, 14 Mar 2025 19:37:01 +0000, Richard Harnden wrote:

    100 discrete files helps 100 developers not to step on each other's
    toes.

    That’s not why we split things up. Things are split into separate files because it’s logical to do so.

    Git’s merge function is good at figuring out multiple patches to the same file, and helping the person doing the merging sort out any merge
    conflicts. That was its main big advance on the VCSes that came before,
    and a big reason why it has come to dominate the VCS scene nowadays.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Chris M. Thomasson on Sat Mar 15 01:16:27 2025
    On Fri, 14 Mar 2025 16:25:48 -0700, Chris M. Thomasson wrote:

    This kind of thing does not scale to having thousands of connections
    open at once.

    Yawn. Of course it does! 50,000 concurrent connections way back in early 2000's.

    So, you have, what is it, 50,000 concurrent read and/or 50,000 concurrent
    write requests in flight at once?

    By the way, the default “hard” process open-file limit on this system I’m using is half a million.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to bart on Sat Mar 15 02:30:13 2025
    On Fri, 14 Mar 2025 23:16:06 +0000, bart wrote:

    Every single post arguing against me implies that it is effortless: that
    is, all you have to do is type 'make'.

    NO ONE wants to admit to building can be a difficult process.

    You don’t have to take anybody’s word for it. Spend a few weeks doing some builds and development on a Linux system for yourself. The difference
    between Windows and Linux is like night and day.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to bart on Sat Mar 15 02:28:51 2025
    On Fri, 14 Mar 2025 21:43:09 +0000, bart wrote:

    It needs more dependencies. It will take much longer. And it's more
    likely to fail.

    There is an old engineering adage: “in any system, the complexity arises
    not so much from the number of components, as from the potential
    interactions between them”.

    Open-source platforms are made from a great number of interlocking pieces, which tend to be well-disciplined in their interactions. This is how Linux distros can scale up to offer tens of thousands of packages for
    installation, without falling over.

    Proprietary developers tend not to be so disciplined. That is why
    Microsoft Windows is the fragile house of cards that it is. And why people
    like you cannot manage a comparatively simple cross-platform build without suffering a lot of pain in the process.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Chris M. Thomasson on Sat Mar 15 02:31:55 2025
    On Fri, 14 Mar 2025 16:29:34 -0700, Chris M. Thomasson wrote:

    There is a way to tell IOCP to do a so-called "zero byte
    receive" where it does not use any non-paged memory for the receive
    buffer because it's zero. Then when IOCP completes it means you are guaranteed a non-blocking receive call, pretty nice!

    Not sure why you need such a roundabout trick just to get a nonblocking
    version of an I/O call.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James Kuyper@21:1/5 to Lawrence D'Oliveiro on Fri Mar 14 23:26:17 2025
    On 3/14/25 19:01, Lawrence D'Oliveiro wrote:
    On Fri, 14 Mar 2025 09:54:07 +0000, Richard Heathfield wrote:

    Learn to snip!

    I do that, and then the other person claims that I snipped out something important that made their point seem completely the opposite to what I thought it was.

    Of course, they are never able to point to the part that was so
    important ...

    I've occasionally made such a claim, but every time I've done so I
    identified the part that was missing. Often I've copied it into my
    response, but at a minimum I have always described the missing part is sufficient detail to uniquely identify it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Chris M. Thomasson on Sat Mar 15 05:56:39 2025
    On Fri, 14 Mar 2025 19:33:59 -0700, Chris M. Thomasson wrote:

    I remember having a timeout thread that would see if a connection was in
    a stale condition.

    That’s one of those things that is really easier done without threads.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Sat Mar 15 10:42:17 2025
    On Sat, 15 Mar 2025 10:18:49 +0000
    bart <[email protected]> gabbled:
    There /is/ no build system speak of. Compiling any program even of 100 >modules is this invocation:

    mm prog # prog.m is the lead module

    So whats the equivalent of fork() in your language then and how does it work
    on Windows?

    Or you can forget about building completely, and just run direct from
    source code:

    mm -r prog # (via native code)
    mm -i prog # (interpreted)

    If there's a simpler way to compile or run source code, I'd like to know
    what it is!

    python3 <filename>

    C is a little different because the language doesn't allow for automatic >discovery of modules. But the extra info needed is simple: a list of files.

    Finding dynamic libraries is job of the linker and loader, not the C compiler or the language itself. For static libraries yes it does need to search but the only way to "automatically" discover them if you don't have a default list of directories to scan - which C/C++ compilers do - is to scan the whole filesystem which on a machine with a large disk could take a very long time
    and wouldn't make you popular if its a heavily used server.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Lawrence D'Oliveiro on Sat Mar 15 10:18:49 2025
    On 15/03/2025 02:30, Lawrence D'Oliveiro wrote:
    On Fri, 14 Mar 2025 23:16:06 +0000, bart wrote:

    Every single post arguing against me implies that it is effortless: that
    is, all you have to do is type 'make'.

    NO ONE wants to admit to building can be a difficult process.

    You don’t have to take anybody’s word for it. Spend a few weeks doing some
    builds and development on a Linux system for yourself. The difference
    between Windows and Linux is like night and day.


    Spend a few weeks using my language. The difference between how it works
    and what you do on Linux is even starker.

    There /is/ no build system speak of. Compiling any program even of 100
    modules is this invocation:

    mm prog # prog.m is the lead module

    Or you can forget about building completely, and just run direct from
    source code:

    mm -r prog # (via native code)
    mm -i prog # (interpreted)

    If there's a simpler way to compile or run source code, I'd like to know
    what it is!

    C is a little different because the language doesn't allow for automatic discovery of modules. But the extra info needed is simple: a list of files.

    For single-module programs however, my C compile works just like 'mm' above.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to [email protected] on Sat Mar 15 11:50:19 2025
    On 15/03/2025 10:42, [email protected] wrote:
    On Sat, 15 Mar 2025 10:18:49 +0000
    bart <[email protected]> gabbled:
    There /is/ no build system speak of. Compiling any program even of 100
    modules is this invocation:

       mm prog                # prog.m is the lead module

    So whats the equivalent of fork() in your language then and how does it
    work
    on Windows?

    I've no idea, but this is little to do with a language, or how it is built.

    How does it work in C on Windows? Whatever it ends up calling, any
    language including mine can do the same.


    Or you can forget about building completely, and just run direct from
    source code:

       mm -r prog             # (via native code)
       mm -i prog             # (interpreted)

    If there's a simpler way to compile or run source code, I'd like to
    know what it is!

    python3 <filename>

    This is running a scripting language. Build processes are associated
    with languages that normally compile to native code, which are much more complicated especially with no module scheme.

    Still, I'll play along: if I copy mm.exe to ms.exe (the name is
    significant) then I can run from source like this:

    ms file # run file.m

    In Python you need:

    python file.py

    Note the '.py' extension if you want to use that. Note also that 'ms'
    compiles to native code first.

    I can go one step further:

    c:\qx>ms qc hello
    Hello, World! 15-Mar-2025 11:38:38

    Here, I'm running a project 'qc' from source code. QC is the lead module
    of my 250KB scripting language interpreter.

    So ms is compiling a 40Kloc program in dozens of source files, into
    memory, and running it on an input 'hello.q'. The whole thing took 0.1
    seconds.

    When you can do:

    gcc -run python.c hello.py

    then come back and we'll talk. That is, doing a fresh compilation of
    Python from source code, and doing it fast enough that you can do it
    everytime you want to run a Python program.


    C is a little different because the language doesn't allow for
    automatic discovery of modules. But the extra info needed is simple: a
    list of files.

    Finding dynamic libraries is job of the linker and loader, not the C
    compiler

    Who's talking about dynamic libraries? If your C program consists of 100 different modules, this is about finding out what the other 99 modules
    are, given the first one.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Tim Rentsch on Sat Mar 15 11:30:16 2025
    On 13/03/2025 21:52, Tim Rentsch wrote:
    bart <[email protected]> writes:

    Here however is a summary of these fictional tools:

    https://github.com/sal55/langs/blob/master/CompilerSuite.md

    I'm not interested in the tools. What I am asking to see is
    the language.

    I'm working on a document that summaries the features.

    Since the language is close to C (mine is probably the nearest such
    language if you disregard the different syntax) many will be compared to
    the C equivalents.

    I realise there is a very high probability that I will do a considerable
    amount of work, only for you to curtly dismiss it in one sentence.

    There has to be a wider reason to do the work. So, it can serve as a
    summary for my own use (sometimes I forget how much stuff there is!).

    But, together with example programs, there should be enough info for
    someone, already familiar with C, to play with it, given a suitable implementation.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Sat Mar 15 12:03:15 2025
    On Sat, 15 Mar 2025 11:50:19 +0000
    bart <[email protected]> gabbled:
    On 15/03/2025 10:42, [email protected] wrote:
    So whats the equivalent of fork() in your language then and how does it
    work
    on Windows?

    I've no idea, but this is little to do with a language, or how it is built.

    So major API functions have nothing to do with a language. Well that is strictly
    true but unless your language is a toy that does nothing beyond simple operations and has no I/O or OS interaction of any sort then you're going to have to provide some libraries with it or no one will have the slightest interest in it.

    How does it work in C on Windows? Whatever it ends up calling, any

    It doesn't, that was kind of the point. win32 can't do fork().

    language including mine can do the same.

    Good luck with it on windows.

    If there's a simpler way to compile or run source code, I'd like to
    know what it is!

    python3 <filename>

    This is running a scripting language. Build processes are associated

    You say "run source code".

    Still, I'll play along:

    If you don't want an obvious answer don't ask the question.

    When you can do:

    gcc -run python.c hello.py

    then come back and we'll talk. That is, doing a fresh compilation of
    Python from source code, and doing it fast enough that you can do it >everytime you want to run a Python program.

    You do realise its utterly trivial to create a script or even an alias under *nix that will compile and run in one go. You declaration that being able to
    do both with one command is some kind of quantum leap in functionality is laughable.

    Finding dynamic libraries is job of the linker and loader, not the C
    compiler

    Who's talking about dynamic libraries? If your C program consists of 100 >different modules, this is about finding out what the other 99 modules
    are, given the first one.

    The C proprocessor has built in search paths to find headers and you can pass it others if you want. There's also nothing stopping you doing a

    #include "something.c"

    if you want an inefficient build. Most people however don't like rebuilding from scratch everytime there's a code change in a single module, hence makefiles.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to [email protected] on Sat Mar 15 13:39:39 2025
    On 15/03/2025 12:03, [email protected] wrote:
    On Sat, 15 Mar 2025 11:50:19 +0000
    bart <[email protected]> gabbled:
    On 15/03/2025 10:42, [email protected] wrote:
    So whats the equivalent of fork() in your language then and how does
    it work
    on Windows?

    I've no idea, but this is little to do with a language, or how it is
    built.

    So major API functions have nothing to do with a language. Well that is strictly
    true but unless your language is a toy that does nothing beyond simple operations and has no I/O or OS interaction of any sort then you're
    going to
    have to provide some libraries with it or no one will have the slightest interest in it.

    How does it work in C on Windows? Whatever it ends up calling, any

    It doesn't, that was kind of the point. win32 can't do fork().

    So, WTF does that have to do with the subject? I can also ask how what
    is the equivalent of some random WinAPI funcion on Linux.


    When you can do:

        gcc -run python.c hello.py

    then come back and we'll talk. That is, doing a fresh compilation of
    Python from source code, and doing it fast enough that you can do it
    everytime you want to run a Python program.

    You do realise its utterly trivial to create a script or even an alias
    under
    *nix that will compile and run in one go. You declaration that being
    able to
    do both with one command is some kind of quantum leap in functionality is laughable.

    OK. Try it with CPython: start with no CPython executable, just the
    source files. You want to be able to run hello.py with one command that
    will build CPython from source and run it.

    Tell me how long it took to write the script, how long it took to run,
    and how many disk files were generated. Also, how many utility programs
    were involved to make it possible; a C compiler will be one.

    My example didn't need a script; it ran in 0.1 seconds, and generated
    zero files. It needed one tool, the compiler.

    Yes it is a 'quantum' leap compared with how things are usually done.
    But carry on deluding yourself that your current set of tools can do the
    job as simply or as briskly.

    (A CPython sufficient to run hello.py might be 20 times the size of my
    product, but you will likely be running a more powerful machine with
    multiple cores. Still, I doubt you could do it even in 2 seconds.)

    Who's talking about dynamic libraries? If your C program consists of
    100 different modules, this is about finding out what the other 99
    modules are, given the first one.

    The C proprocessor has built in search paths to find headers and you can
    pass
    it others if you want. There's also nothing stopping you doing a
    #include "something.c"

    if you want an inefficient build. Most people however don't like rebuilding from scratch everytime there's a code change in a single module, hence makefiles.

    Here, you don't seem to understand what this is about.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Sat Mar 15 16:53:20 2025
    On Sat, 15 Mar 2025 13:39:39 +0000
    bart <[email protected]> gabbled:
    On 15/03/2025 12:03, [email protected] wrote:
    It doesn't, that was kind of the point. win32 can't do fork().

    So, WTF does that have to do with the subject? I can also ask how what

    Umm, you're trying to promote your language. Might be helpful if it did something fucking useful. Or is it just a toy?

    You do realise its utterly trivial to create a script or even an alias
    under
    *nix that will compile and run in one go. You declaration that being
    able to
    do both with one command is some kind of quantum leap in functionality is
    laughable.

    OK. Try it with CPython: start with no CPython executable, just the
    source files. You want to be able to run hello.py with one command that
    will build CPython from source and run it.

    Something like this I imagine:

    alias hello="cd cpython;make;bin/python hello.py"

    Tell me how long it took to write the script, how long it took to run,

    10 secs and no idea. How long does it take to build your language from
    scratch?

    My example didn't need a script; it ran in 0.1 seconds, and generated
    zero files. It needed one tool, the compiler.

    So what language is your compiler written in? Does it magically just work or does it have to be built first?

    Yes it is a 'quantum' leap compared with how things are usually done.

    How exactly?

    if you want an inefficient build. Most people however don't like rebuilding >> from scratch everytime there's a code change in a single module, hence
    makefiles.

    Here, you don't seem to understand what this is about.

    I understand that everytime I ask you something relevant your answer is
    the equivalent of "Look! Squirrel!"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to [email protected] on Sat Mar 15 17:51:17 2025
    On 15/03/2025 16:53, [email protected] wrote:
    On Sat, 15 Mar 2025 13:39:39 +0000
    bart <[email protected]> gabbled:
    On 15/03/2025 12:03, [email protected] wrote:
    It doesn't, that was kind of the point. win32 can't do fork().

    So, WTF does that have to do with the subject? I can also ask how what

    Umm, you're trying to promote your language.

    No. I was responding to somebody saying how great Linux is to build
    software (where you have to run huge configure scripts) and how rubbish
    Windows was.

    I gave an example of how simple building something was /on Windows/
    without any support whatsoever other than a compiler.

    Might be helpful if it did
    something fucking useful. Or is it just a toy?

    Is there any conceivable answer I can give where you're not just going
    to give a smart-arse reply?



    You do realise its utterly trivial to create a script or even an
    alias under
    *nix that will compile and run in one go. You declaration that being
    able to
    do both with one command is some kind of quantum leap in
    functionality is
    laughable.

    OK. Try it with CPython: start with no CPython executable, just the
    source files. You want to be able to run hello.py with one command
    that will build CPython from source and run it.

    Something like this I imagine:

    alias hello="cd cpython;make;bin/python hello.py"

    I guess you need to clear the existing version first or it will do nothing.

    Tell me how long it took to write the script, how long it took to run,

    10 secs and no idea.

    So you haven't tried it. OK, if you don't want to do so, then from your
    vast experience of these things, how long do you think it would take to
    build CPython from scratch, and would be it viable to do that each time
    you evoked it?



    How long does it take to build your language from
    scratch?

    I may have mentioned it 50 times; I doubt there's any point in a 51st time.



    My example didn't need a script; it ran in 0.1 seconds, and generated
    zero files. It needed one tool, the compiler.

    So what language is your compiler written in? Does it magically just
    work or
    does it have to be built first?

    Yes it is a 'quantum' leap compared with how things are usually done.

    How exactly?

    if you want an inefficient build. Most people however don't like
    rebuilding
    from scratch everytime there's a code change in a single module,
    hence makefiles.

    Here, you don't seem to understand what this is about.

    I understand that everytime I ask you something relevant your answer is
    the equivalent of "Look! Squirrel!"

    I understand that you keep misunderstanding everything and spouting
    random rubbish.

    But if you want to be serious for a minute and not just a dick, I
    originally said this:

    "C is a little different because the language doesn't allow for
    automatic discovery of modules. But the extra info needed is simple: a
    list of files."

    What this means is that a C compiler must be told all the C source files
    that make up a program; it can't work it out for itself.

    So you have to give it a list of files, but this simple requirement has
    blown up into over-complex and error prone build systems.

    Your replies showed that you misunderstood the point.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to bart on Sat Mar 15 21:47:35 2025
    On Sat, 15 Mar 2025 10:18:49 +0000, bart wrote:

    On 15/03/2025 02:30, Lawrence D'Oliveiro wrote:

    On Fri, 14 Mar 2025 23:16:06 +0000, bart wrote:

    Every single post arguing against me implies that it is effortless:
    that is, all you have to do is type 'make'.

    NO ONE wants to admit to building can be a difficult process.

    You don’t have to take anybody’s word for it. Spend a few weeks doing
    some builds and development on a Linux system for yourself. The
    difference between Windows and Linux is like night and day.

    Spend a few weeks using my language.

    What can it do that the wide variety of languages already available on
    *nix systems can’t do?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Lawrence D'Oliveiro on Sat Mar 15 21:59:55 2025
    On 15/03/2025 21:47, Lawrence D'Oliveiro wrote:
    On Sat, 15 Mar 2025 10:18:49 +0000, bart wrote:

    On 15/03/2025 02:30, Lawrence D'Oliveiro wrote:

    On Fri, 14 Mar 2025 23:16:06 +0000, bart wrote:

    Every single post arguing against me implies that it is effortless:
    that is, all you have to do is type 'make'.

    NO ONE wants to admit to building can be a difficult process.

    You don’t have to take anybody’s word for it. Spend a few weeks doing >>> some builds and development on a Linux system for yourself. The
    difference between Windows and Linux is like night and day.

    Spend a few weeks using my language.

    What can it do that the wide variety of languages already available on
    *nix systems can’t do?

    People keep changing the subject. You were talking about building and development on Linux vs Windows, rather than the benefits of a
    particular language.

    Well, my language doesn't need a huge ecosystem of specialist tools for
    a start. Its compiler can turn a source files in the language into
    runnable code without any outside help!

    I used to think that was the job of a compiler, but now I'm not so sure.

    I wonder, do you any examples of a project which can be built using ONLY
    a C compiler, and a set of source files?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Lawrence D'Oliveiro on Sat Mar 15 23:08:42 2025
    On 15/03/2025 22:22, Lawrence D'Oliveiro wrote:
    On Sat, 15 Mar 2025 21:59:55 +0000, bart wrote:

    On 15/03/2025 21:47, Lawrence D'Oliveiro wrote:
    On Sat, 15 Mar 2025 10:18:49 +0000, bart wrote:

    On 15/03/2025 02:30, Lawrence D'Oliveiro wrote:

    On Fri, 14 Mar 2025 23:16:06 +0000, bart wrote:

    Every single post arguing against me implies that it is effortless: >>>>>> that is, all you have to do is type 'make'.

    NO ONE wants to admit to building can be a difficult process.

    You don’t have to take anybody’s word for it. Spend a few weeks doing >>>>> some builds and development on a Linux system for yourself. The
    difference between Windows and Linux is like night and day.

    Spend a few weeks using my language.

    What can it do that the wide variety of languages already available on
    *nix systems can’t do?

    People keep changing the subject. You were talking about building and
    development on Linux vs Windows, rather than the benefits of a
    particular language.

    Then why did you suggest using your language in the first place?

    What difference does it make?

    You said how easy it it to build stuff in Linux without specifying any language. I gave an example of how easy it can be on Windows.

    I happen to use my language as I had it to hand; there will be others
    with module schemes where just 'X Y' (compiler name and main module
    name) will also build with minimal fuss.

    C requires extra info, but here's an example of an old C compiler I made
    that tries to discover modules by tracking includes:

    c:\bcx>bcc -auto cipher
    1 Compiling cipher.c to cipher.asm (Pass 1)
    * 2 Compiling hmac.c to hmac.asm (Pass 2)
    * 3 Compiling sha2.c to sha2.asm (Pass 2)
    Assembling to cipher.exe

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to bart on Sat Mar 15 22:22:17 2025
    On Sat, 15 Mar 2025 21:59:55 +0000, bart wrote:

    On 15/03/2025 21:47, Lawrence D'Oliveiro wrote:
    On Sat, 15 Mar 2025 10:18:49 +0000, bart wrote:

    On 15/03/2025 02:30, Lawrence D'Oliveiro wrote:

    On Fri, 14 Mar 2025 23:16:06 +0000, bart wrote:

    Every single post arguing against me implies that it is effortless:
    that is, all you have to do is type 'make'.

    NO ONE wants to admit to building can be a difficult process.

    You don’t have to take anybody’s word for it. Spend a few weeks doing >>>> some builds and development on a Linux system for yourself. The
    difference between Windows and Linux is like night and day.

    Spend a few weeks using my language.

    What can it do that the wide variety of languages already available on
    *nix systems can’t do?

    People keep changing the subject. You were talking about building and development on Linux vs Windows, rather than the benefits of a
    particular language.

    Then why did you suggest using your language in the first place?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Waldek Hebisch@21:1/5 to bart on Sun Mar 16 01:58:55 2025
    bart <[email protected]> wrote:
    On 14/03/2025 18:00, Scott Lurndal wrote:
    bart <[email protected]> writes:

    While on 1980s PC-style machines, programs were typically not huge. I
    used my own fast compilers and fast loaders (to combine object files
    into one program).

    The last thing a Unix programmer would want is to use a 1980s PC,
    then or now.

    <snip 1000 lines>

    This is one of the lines you snipped:

    (I would love to know how long such a build process would have taken
    on a 1980s machine with floppy disks! Possibly a week.)

    The context is a project like GMP and its 35,000 of script which is the
    first hurdle. The end result is an approx 0.5MB library, which is not
    that far off being a plausible piece of software for those 1980s PCs.

    I'm guessing that it would have taken an unreasonably long time on such
    a machine. Ergo, it would be considered hopelessly inefficient.

    You miss some points:
    - one significant plus of GMP is use of advanced algorithms. On
    modern machine the algoritms give gain at about 16 machine
    words, that is about 150 digits,
    - GMP uses specialized code (assembler or machine-specific C).
    It has code for many architecures and processor variants.
    - On classic 8-bitters or even 8088 based PC multiple-precision
    code tends to be larger and slower than code on more modern
    machines.

    On classic 8-bitter GMP is clearly too large and you do not have
    enough space for numbers large enough to give you substantial
    gain. On 8088 you probably could be able to fit some advanced
    capability info available space. But you would have to fight
    with segmentation and provide optimized assembly. Beyond that
    you would need to tune several paramenters.

    Simply, GMP is not for 1980 era machines.

    But let us look at your compiler. AFAICS it is way too large
    for classic 8-bitters. On 8088 based PC you could fit the compiler
    in the RAM, but you also have large statically allocated tables,
    you would need to shrink them. Merely loading your compiler
    from the floppy would take substantial time, so you probably
    would want it to be resident, which means you would need to
    add some user interface. Similarly, reading source and
    writing executable to floppy takes time, so you probably
    would like to keep that resident too. But then you almost
    surely would run out of RAM, at least when trying to
    self-compile: compiler + user interface + source code of the
    compiler + generated executable code look like more than
    640 kB.

    So neither you nor most other developers develop for 1980 era
    machines.

    Concerning "hopelessly inefficient", I know about a program
    for which full re-compile on a machine much more powerful than
    a 8088 based PC took 3 weeks. Apparently developers coped
    with this reasonably well (part of the trick was that full
    re-compile was rarely needed).

    So, it sounds like you're either completely missing the point, or
    choosing to ignore it. Which is that the build task in this case is too
    long and slow in proportion to the task.

    GMP is in business of providing highest execution speed given
    avaliable (limited) developement time. Given the goal, build
    time has secondary importance and is actually quite reasonable.
    Note that as a user I would build given version once: after
    compilation it is available to all programs. Also, most PC-s
    are idle most of the time, spending many compute cycles on
    compilation is not good for environment, but otherwise quite
    cheap. What matters more is developers time, developers
    must do many compilations and they organize things to save
    their time (like using 'make' but also replacing manual
    effort by computer work).

    I like efficient programs and in my code I am trying to avoid
    wasting computer time. But it is hard to blame other people
    that they save their time at expense of some extra work for
    computers, computer time is much cheaper than human time so
    it makes economic sense.

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to Chris M. Thomasson on Sun Mar 16 06:41:28 2025
    On 2025-03-15, Chris M. Thomasson <[email protected]> wrote:
    On 3/14/2025 10:56 PM, Lawrence D'Oliveiro wrote:
    On Fri, 14 Mar 2025 19:33:59 -0700, Chris M. Thomasson wrote:

    I remember having a timeout thread that would see if a connection was in >>> a stale condition.

    That’s one of those things that is really easier done without threads.

    Well, any more insight on that comment?

    You'd really be better off chatting with AI.

    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @[email protected]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From tTh@21:1/5 to bart on Sun Mar 16 08:42:40 2025
    On 3/15/25 22:59, bart wrote:

    I wonder, do you any examples of a project which can be built using ONLY
     a C compiler, and a set of source files?

    There's no example of a project like that, because nobody do that.

    --
    ** **
    * tTh des Bourtoulots *
    * http://maison.tth.netlib.re/ *
    ** **

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to tTh on Sun Mar 16 08:02:42 2025
    On Sun, 16 Mar 2025 08:42:40 +0100, tTh wrote:

    On 3/15/25 22:59, bart wrote:

    I wonder, do you any examples of a project which can be built using
    ONLY a C compiler, and a set of source files?

    There's no example of a project like that, because nobody do that.

    One source file, yes <https://gitlab.com/ldo/slow_dbus_server>. I even
    include the necessary compiler command in the header comments.

    More than one source file -- things get fiddly without at least a simple Makefile to keep it tidy.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Waldek Hebisch@21:1/5 to bart on Sun Mar 16 10:06:17 2025
    bart <[email protected]> wrote:
    On 14/03/2025 19:37, Richard Harnden wrote:
    On 14/03/2025 19:04, bart wrote:
    After all no one (according to you) was complaining about grappling
    with 100 discrete files.

    100 discrete files helps 100 developers not to step on each other's toes.

    And most of those 100 .o's won't need to be recompiled on every make.
    It's quicker and easier.


    That may be true about the people who /develop/ this sqlite3 product.

    But this is a file created to ease deployment by people who want to
    /use/ it.

    I don't know why nobody in this group can grasp that concept even though
    I've explained it a hundred times. For example, I have a transpiler
    product that turns a 50-module project in my language into a single, easy-to-build C source file.

    But everyone makes the same point about it being hard to manage. No one
    is even going to look inside it!

    Do you realize that your amalgamation destroys most of C
    modularization? In C there is no conflict between static
    objects at file scope in different files, even is they use
    the same name. In single file there may be conflict.
    Avoiding such conflicts is an extra developement effort.

    In case of libraries you loose one feature which may be
    important, namely ability of linker to link in only used
    files (that is the main reason that libraries used a
    lot of very small files). Modern compiler + linker combo
    may offer better feature, but this better freature
    has its own limitations so people still depend on
    classic liker behaviour.

    You like idea of amalgamation, but for most uses it helps
    nothing and may create troubles.

    Concerning looking inside: I frequently look inside code
    that I use. One reason may be because description is not
    clear enough. Or I would like to see how something is
    done.

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Sun Mar 16 10:06:16 2025
    On Sat, 15 Mar 2025 17:51:17 +0000
    bart <[email protected]> wibbled:
    On 15/03/2025 16:53, [email protected] wrote:
    Umm, you're trying to promote your language.

    No. I was responding to somebody saying how great Linux is to build
    software (where you have to run huge configure scripts) and how rubbish >Windows was.

    Some linux software has huge configure scripts. Well written software doesn't need them.

    I gave an example of how simple building something was /on Windows/
    without any support whatsoever other than a compiler.

    Building can be made as hard or as easy as the author can be bothered to make it regardless of the OS>

    Might be helpful if it did
    something fucking useful. Or is it just a toy?

    Is there any conceivable answer I can give where you're not just going
    to give a smart-arse reply?

    Well does it do anything useful? You seem rather dismissive of including any kind of OS API with it rendering it effectively useless except as an academic exercise.

    Something like this I imagine:

    alias hello="cd cpython;make;bin/python hello.py"

    I guess you need to clear the existing version first or it will do nothing.

    No idea.

    Tell me how long it took to write the script, how long it took to run,

    10 secs and no idea.

    So you haven't tried it. OK, if you don't want to do so, then from your

    You plucked cpython out your arse and expect me to go download and build it? Are you fucking kidding me, you think I have nothing better to do with my time?

    vast experience of these things, how long do you think it would take to
    build CPython from scratch, and would be it viable to do that each time
    you evoked it?

    Not sure why you seem think a language could be built from scratch before
    you use it. Does your compiler have to be built from scratch each time you
    want to compile something with it? No, didn't think so.

    I may have mentioned it 50 times; I doubt there's any point in a 51st time.

    It'll take as long as any other program written in whatever you've written
    it in, presumably C.

    I understand that everytime I ask you something relevant your answer is
    the equivalent of "Look! Squirrel!"

    I understand that you keep misunderstanding everything and spouting
    random rubbish.

    You're just moving goalposts as soon as you see something you can't answer coming over the horizon.

    "C is a little different because the language doesn't allow for
    automatic discovery of modules. But the extra info needed is simple: a
    list of files."

    You haven't even defined modules properly. Do you mean other C source files, compiled .o files, .so files, .a files or something else?

    What this means is that a C compiler must be told all the C source files
    that make up a program; it can't work it out for itself.

    For a start a C compiler only compiles one file at a time and secondly I wouldn't want it to try and second guess what modules I want it to build
    with. I've already explained why previously. You seem to live in a simple
    world of simple programs with no system specific dependencies.

    So you have to give it a list of files, but this simple requirement has
    blown up into over-complex and error prone build systems.

    Only by people who don't know what they're doing.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Lawrence D'Oliveiro on Sun Mar 16 11:04:40 2025
    On 16/03/2025 08:02, Lawrence D'Oliveiro wrote:
    On Sun, 16 Mar 2025 08:42:40 +0100, tTh wrote:

    On 3/15/25 22:59, bart wrote:

    I wonder, do you any examples of a project which can be built using
    ONLY a C compiler, and a set of source files?

    There's no example of a project like that, because nobody do that.

    One source file, yes <https://gitlab.com/ldo/slow_dbus_server>. I even include the necessary compiler command in the header comments.

    More than one source file -- things get fiddly without at least a simple Makefile to keep it tidy.

    You've never heard of an '@' file? Take this 3-module project with files 'cipher.c sha2.c hmac.c':

    c:\c>type cipher
    -O3 -s -o cipher.exe # list options and source files
    cipher.c
    sha2.c
    hmac.c

    c:\c>gcc @cipher # build with compiler of choice

    c:\c>tcc @cipher

    Yes, each build will process all the source files. But:

    (1) For a one-off build at a user site to get a working binary, you'd
    have to compile all files anyway

    (2) If using a compiler like tcc, it probably wouldn't take long:

    c:\luac>tim tcc @lua
    Time: 0.28

    least a simple
    Makefile to keep it tidy.

    Every single makefile I've seen seems to be the opposite of tidy.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to [email protected] on Sun Mar 16 12:06:20 2025
    On 16/03/2025 10:06, [email protected] wrote:
    On Sat, 15 Mar 2025 17:51:17 +0000
    bart <[email protected]> wibbled:
    On 15/03/2025 16:53, [email protected] wrote:
    Umm, you're trying to promote your language.

    No. I was responding to somebody saying how great Linux is to build
    software (where you have to run huge configure scripts) and how rubbish
    Windows was.

    Some linux software has huge configure scripts. Well written software doesn't need them.

    I gave an example of how simple building something was /on Windows/
    without any support whatsoever other than a compiler.

    Building can be made as hard or as easy as the author can be bothered to make it regardless of the OS>

    Might be helpful if it did
    something fucking useful. Or is it just a toy?

    Is there any conceivable answer I can give where you're not just going
    to give a smart-arse reply?

    Well does it do anything useful? You seem rather dismissive of including any kind of OS API with it rendering it effectively useless except as an academic exercise.

    I first used it as an in-house product over 40 years ago. It was used internally in my company that developed hardware, for writing test
    software. Later it was used to make commercial low-end CAD products,
    which included integrated scripting languages.

    Basically, it could do anything C could do, but more comfortably (I
    never managed to switch to C and prefered my product).

    For the last 20 years it has been a personal tool for me for working on hobbyist, experimental language-related projects like compilers,
    assemblers, linkers, interpreters, IL processors, and necessary support libraries.

    I developed for example new module schemes, whole-program compilers, new
    ILs (intermediate languages) and new binary formats for executables and
    shared libraries.



    So you haven't tried it. OK, if you don't want to do so, then from your

    You plucked cpython out your arse and expect me to go download and build it? Are you fucking kidding me, you think I have nothing better to do with my time?

    EXACTLY!

    It was actually YOU who brought up the Python example, because you
    thought that:

    python file.py

    for a scripting language with a lead module file.py was a fair
    comparison with my product being able to do the same with:

    ms file

    which is for a statically compiled language with near-instant
    compilation. I then suggested this example:

    ms qc file

    which is equivalent to compiling the whole of CPython, in memory, then
    running it in memory to run some script. The point, which you now admit,
    is that it would take forever. But if you do get around to it, look at
    this further example:

    c:\qx>tim ms mm qq hello
    Hello, World! 16-Mar-2025 11:45:22
    Time: 0.169

    This compiles and runs my compiler (mm) from source code, compiles runs
    the interpreter (qc) from source code, then runs hello.q. It look 1/6th
    of a second. (tim is a timer.)

    This is equivalent to compiling gcc into memory, then using that to
    compile CPython into memory, then using that to run hello.py.

    That is quite astonishing. But the point is to show how fast machines
    are these days, and how effortless building can be EVEN ON WINDOWS.

    But everyone is trying to force makefiles and colossal, Linux-specific configure scripts down my throat.

    No one is even prepared to consider simple @ files that I demonstrated
    in my last post. It has to be complicated, or nothing!

    vast experience of these things, how long do you think it would take to
    build CPython from scratch, and would be it viable to do that each time
    you evoked it?

    Not sure why you seem think a language could be built from scratch before
    you use it. Does your compiler have to be built from scratch each time you want to compile something with it? No, didn't think so.

    Not usually, but my tools are so fast that it could be (see example
    above). The point of the example was that the task of building even a substantial program can be NOTHING.

    It's instant, like turning on a light switch. But using your normal
    Linux tools would be more like first building a fire, then using that to
    drive a steam-powered generator!

    "C is a little different because the language doesn't allow for
    automatic discovery of modules. But the extra info needed is simple: a
    list of files."

    You haven't even defined modules properly. Do you mean other C source files, compiled .o files, .so files, .a files or something else?

    Well, these are all inputs that can be submitted to a compiler at the
    same time. Personally, for C, I only use .c files and sometimes .dll
    files, while most open source projects I want to build only involve C files.

    It is still just a list of files.

    What this means is that a C compiler must be told all the C source files
    that make up a program; it can't work it out for itself.

    For a start a C compiler only compiles one file at a time and secondly I wouldn't want it to try and second guess what modules I want it to build with. I've already explained why previously. You seem to live in a simple world of simple programs with no system specific dependencies.

    So, anything more than one .c file, and you immediately create some
    makefile full of gobbledygook?

    This would be like using your car to drive anywhere that is not
    immediately next door, even if it's down the street.

    Or, more on point, using a makefile even to write a shopping list. Which
    is exactly what a compiler needs: a list of files.

    So you have to give it a list of files, but this simple requirement has
    blown up into over-complex and error prone build systems.

    Only by people who don't know what they're doing.

    I've only been writing compilers since 1979, so you could be right!

    Personally I always used project files to list dependences, but those
    are specific to my private IDE. I wouldn't inflict them, or my tools, on
    anyone else trying to build my programs.

    For that purpose I supply direct build instructions for a one-off build,
    even if it's just this:

    gcc *.c -o prog.exe

    Actually, just yesterday I tried to build someone's small /Windows/
    project via the makefile. It failed (missing files), although it may not
    been intended to be used, or not tested outside the developer's machine.

    However, 'gcc *.c' worked!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Waldek Hebisch on Sun Mar 16 12:15:56 2025
    On 16/03/2025 10:06, Waldek Hebisch wrote:
    bart <[email protected]> wrote:
    On 14/03/2025 19:37, Richard Harnden wrote:
    On 14/03/2025 19:04, bart wrote:
    After all no one (according to you) was complaining about grappling
    with 100 discrete files.

    100 discrete files helps 100 developers not to step on each other's toes. >>>
    And most of those 100 .o's won't need to be recompiled on every make.
    It's quicker and easier.


    That may be true about the people who /develop/ this sqlite3 product.

    But this is a file created to ease deployment by people who want to
    /use/ it.

    I don't know why nobody in this group can grasp that concept even though
    I've explained it a hundred times. For example, I have a transpiler
    product that turns a 50-module project in my language into a single,
    easy-to-build C source file.

    But everyone makes the same point about it being hard to manage. No one
    is even going to look inside it!

    Do you realize that your amalgamation destroys most of C
    modularization?

    Do you realise that you're reinforcing the point I made?

    The fact is, IT DOESN'T MATTER!

    Creating a binary also destroys modularisation; so what?

    The amalgamation is just a means to am end: incorporating some third
    party library, but from source code rather than binary. However the
    original source would be unwieldy so it's packed into one file.

    As for the reasons to use source rather than binary here, there could be several. Ask also why JVM files are distributed rather than native code.

    If somebody wants to work on SQLite source code, the original sources
    are available. But most people don't!

    (For me it's a highly useful test file.)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Waldek Hebisch@21:1/5 to bart on Sun Mar 16 14:21:13 2025
    bart <[email protected]> wrote:
    On 16/03/2025 10:06, Waldek Hebisch wrote:
    bart <[email protected]> wrote:
    On 14/03/2025 19:37, Richard Harnden wrote:
    On 14/03/2025 19:04, bart wrote:
    After all no one (according to you) was complaining about grappling
    with 100 discrete files.

    100 discrete files helps 100 developers not to step on each other's toes. >>>>
    And most of those 100 .o's won't need to be recompiled on every make.
    It's quicker and easier.


    That may be true about the people who /develop/ this sqlite3 product.

    But this is a file created to ease deployment by people who want to
    /use/ it.

    I don't know why nobody in this group can grasp that concept even though >>> I've explained it a hundred times. For example, I have a transpiler
    product that turns a 50-module project in my language into a single,
    easy-to-build C source file.

    But everyone makes the same point about it being hard to manage. No one
    is even going to look inside it!

    Do you realize that your amalgamation destroys most of C
    modularization?

    Do you realise that you're reinforcing the point I made?

    The fact is, IT DOESN'T MATTER!

    Creating a binary also destroys modularisation; so what?

    Have you read what I wrote? To remaind you, just after the
    quoted statement I wrote:

    : In C there is no conflict between static
    : objects at file scope in different files, even is they use
    : the same name. In single file there may be conflict.
    : Avoiding such conflicts is an extra developement effort.

    Creating binary from multiple file preserves this property,
    so one should rather say that creating binary respects
    modularisation. Amalgamation on source level does not.

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Waldek Hebisch on Sun Mar 16 15:30:40 2025
    On 16/03/2025 14:21, Waldek Hebisch wrote:
    bart <[email protected]> wrote:
    On 16/03/2025 10:06, Waldek Hebisch wrote:
    bart <[email protected]> wrote:
    On 14/03/2025 19:37, Richard Harnden wrote:
    On 14/03/2025 19:04, bart wrote:
    After all no one (according to you) was complaining about grappling >>>>>> with 100 discrete files.

    100 discrete files helps 100 developers not to step on each other's toes. >>>>>
    And most of those 100 .o's won't need to be recompiled on every make. >>>>> It's quicker and easier.


    That may be true about the people who /develop/ this sqlite3 product.

    But this is a file created to ease deployment by people who want to
    /use/ it.

    I don't know why nobody in this group can grasp that concept even though >>>> I've explained it a hundred times. For example, I have a transpiler
    product that turns a 50-module project in my language into a single,
    easy-to-build C source file.

    But everyone makes the same point about it being hard to manage. No one >>>> is even going to look inside it!

    Do you realize that your amalgamation destroys most of C
    modularization?

    Do you realise that you're reinforcing the point I made?

    The fact is, IT DOESN'T MATTER!

    Creating a binary also destroys modularisation; so what?

    Have you read what I wrote? To remaind you, just after the
    quoted statement I wrote:

    : In C there is no conflict between static
    : objects at file scope in different files, even is they use
    : the same name. In single file there may be conflict.
    : Avoiding such conflicts is an extra developement effort.

    Creating binary from multiple file preserves this property,
    so one should rather say that creating binary respects
    modularisation. Amalgamation on source level does not.

    OK. If you were to just blindly source files together, then you are
    likely to get clashes (as well headers being repeated etc or things
    ending up in the wrong order).

    But I'm sure the amalgamation process is well aware of that.

    I might be wrong; maybe sqlite3.c /is/ created like this:

    copy folder\*.c sqlite3.c

    But I doubt that very much!

    The transpilation process I use (multiple M files to one C file)
    decorates names so that the same static local name X used in modules A
    and B becomes A$X and B$X, so avoiding any conflicts.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to bart on Sun Mar 16 23:13:13 2025
    On Sun, 16 Mar 2025 11:04:40 +0000, bart wrote:

    On 16/03/2025 08:02, Lawrence D'Oliveiro wrote:

    More than one source file -- things get fiddly without at least a
    simple Makefile to keep it tidy.

    You've never heard of an '@' file?

    Makefiles do it better. They will conditionally only compile the parts
    that need (re)compiling, with minimal effort on my part.

    Every single makefile I've seen seems to be the opposite of tidy.

    How about the one I posted elsewhere in this thread?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Mon Mar 17 12:07:34 2025
    On Sun, 16 Mar 2025 12:06:20 +0000
    bart <[email protected]> wibbled:
    On 16/03/2025 10:06, [email protected] wrote:
    Well does it do anything useful? You seem rather dismissive of including any >> kind of OS API with it rendering it effectively useless except as an academic

    exercise.

    I first used it as an in-house product over 40 years ago. It was used >internally in my company that developed hardware, for writing test
    software. Later it was used to make commercial low-end CAD products,
    which included integrated scripting languages.

    Basically, it could do anything C could do, but more comfortably (I
    never managed to switch to C and prefered my product).

    Anything C could do so long as you don't include all the standard C libraries in "anything".

    You plucked cpython out your arse and expect me to go download and build it? >> Are you fucking kidding me, you think I have nothing better to do with my >time?

    EXACTLY!

    It was actually YOU who brought up the Python example, because you
    thought that:

    python file.py

    for a scripting language with a lead module file.py was a fair
    comparison with my product being able to do the same with:

    You asked how to run a program in another language with 2 words. I gave you
    an example. FWIW python does internally compile the code down to some intermediate language before it runs it.

    It's instant, like turning on a light switch. But using your normal
    Linux tools would be more like first building a fire, then using that to >drive a steam-powered generator!

    So how would your compiler know what libraries to link with? I imagine its
    not a problem if you don't bother with libraries in the first place.

    Only by people who don't know what they're doing.

    I've only been writing compilers since 1979, so you could be right!

    I'd find another hobby given no one has heard of any language you've written.

    However, 'gcc *.c' worked!

    Yes, you can use that old school method and sometimes it does work and leave
    an a.out there, but more often that not different modules require different compilation parameters and it all goes tits up. And thats assuming you don't get multiple definition errors when it tries to link.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to [email protected] on Mon Mar 17 14:25:46 2025
    On 17/03/2025 12:07, [email protected] wrote:
    On Sun, 16 Mar 2025 12:06:20 +0000
    bart <[email protected]> wibbled:
    On 16/03/2025 10:06, [email protected] wrote:
    Well does it do anything useful? You seem rather dismissive of including any
    kind of OS API with it rendering it effectively useless except as an academic

    exercise.

    I first used it as an in-house product over 40 years ago. It was used
    internally in my company that developed hardware, for writing test
    software. Later it was used to make commercial low-end CAD products,
    which included integrated scripting languages.

    Basically, it could do anything C could do, but more comfortably (I
    never managed to switch to C and prefered my product).

    Anything C could do so long as you don't include all the standard C libraries in "anything".

    Another mysterious remark. You seem to consider it your job to put down anything I do or say!

    So, what do the standard C libraries have to do with anything here?

    My language literally could anything, and in those days it had to, as
    80% of what you take for granted now, provided from the OS or endless
    free libraries, you had to write yourself.

    You plucked cpython out your arse and expect me to go download and build it?
    Are you fucking kidding me, you think I have nothing better to do with my >> time?

    EXACTLY!

    It was actually YOU who brought up the Python example, because you
    thought that:

    python file.py

    for a scripting language with a lead module file.py was a fair
    comparison with my product being able to do the same with:

    You asked how to run a program in another language with 2 words.

    You responded to this comment of mine:

    "There /is/ no build system speak of. Compiling any program even of 100
    modules is this invocation: mm prog"

    where mm is a compiler. That itself was in the context of build tools on
    Linux which usually involve makefiles, shell scripts and other
    OS-specific junk, which was touted to be far superior to the Windows experience.

    I showed an example of an effortless build /on Windows/.


    I gave you
    an example. FWIW python does internally compile the code down to some intermediate language before it runs it.

    A fairer comparison is building a significant 100-module C program on
    Linux, and even better is trying to use that exact same process to build
    the same app on Windows (which is exactly what many open-source
    cross-platform apps expect you to do).

    That's where it starts to fall down, and this longer than expected
    subthread started. If the process was much simpler and more OS-neutral
    in the first place, even if not quite as sweet as my example, it would
    be much smoother.


    It's instant, like turning on a light switch. But using your normal
    Linux tools would be more like first building a fire, then using that to
    drive a steam-powered generator!

    So how would your compiler know what libraries to link with? I imagine its not a problem if you don't bother with libraries in the first place.

    What, within my language? They are either specified via the module
    scheme which lists the source files and libraries used, or infered from
    the FFI declarations needed. This is from my scripting language for example:

    importdll sdl2 =
    func "SDL_OpenAudio"(ref sdl_audiospec desired, obtained=nil)i32
    ...
    end

    So it knows it needs to use sdl2.dll when an attempt is made to call
    that function.

    In either case, the information needed is inside the source files.

    Only by people who don't know what they're doing.

    I've only been writing compilers since 1979, so you could be right!

    I'd find another hobby given no one has heard of any language you've written.

    Huh? Not all languages need to be famous or mainstream. Mine were
    in-house tools, in an era where software tools were not instant free
    downloads.

    I probably haven't heard of anything you've done either.


    However, 'gcc *.c' worked!

    Yes, you can use that old school method and sometimes it does work and leave an a.out there, but more often that not different modules require different compilation parameters and it all goes tits up. And thats assuming you don't get multiple definition errors when it tries to link.

    So, you can also enumerate the 10 or so files needed. The requirements
    are really very simple. Besides, the makefile in this case also used
    *.c! I've shown it below.

    (Probably it didn't work because it's specfic to MS' CL and LINK tools,
    and I'd used gcc. Another reason why compiler-neutral build info is
    better, where possible.)

    -----------------------
    CCFLAGS=/nologo /std:c11 /TC /W4 /Zi /wd4201 /wd4996
    LINKFLAGS=/nologo /subsystem:console /defaultlib:msvcrt.lib /defaultlib:legacy_stdio_definitions.lib /defaultlib:Kernel32.lib
    EXENAME=minic
    OBJDIR=obj
    BINDIR=bin

    all:
    IF NOT EXIST $(OBJDIR) MKDIR $(OBJDIR)
    IF NOT EXIST $(BINDIR) MKDIR $(BINDIR)
    cl $(CCFLAGS) src\*.c /Fo.\$(OBJDIR)\ /Fe$(EXENAME).exe
    IF EXIST *.exe MOVE *.exe $(BINDIR)
    IF EXIST *.idb MOVE *.idb $(BINDIR)
    IF EXIST *.ilk MOVE *.ilk $(BINDIR)
    IF EXIST *.pdb MOVE *.pdb $(BINDIR)

    test:
    python tests/run_tests.py

    test_file:
    python tests/run_tests.py --file $(FILE)

    asm:
    nasm -f win64 tmp.asm -o tmp.obj
    link /nologo /subsystem:console /entry:main tmp.obj ucrt.lib vcruntime.lib legacy_stdio_definitions.lib

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to [email protected] on Mon Mar 17 17:10:59 2025
    On 17/03/2025 16:32, [email protected] wrote:
    On Mon, 17 Mar 2025 14:25:46 +0000
    bart <[email protected]> wibbled:
    On 17/03/2025 12:07, [email protected] wrote:
    Anything C could do so long as you don't include all the standard C libraries

    in "anything".

    Another mysterious remark. You seem to consider it your job to put down
    anything I do or say!

    So, what do the standard C libraries have to do with anything here?

    They're generally the interface to the OS on *nix. No idea about windows.

    I think you can assume that the tool I used was up to the job

    where mm is a compiler. That itself was in the context of build tools on
    Linux which usually involve makefiles, shell scripts and other
    OS-specific junk, which was touted to be far superior to the Windows
    experience.

    So presumably your amazing build system checks the current module build dates and doesn't rebuild stuff that it doesn't have to?

    Why would it matter? I can compile code at one million lines every two
    seconds, and my largest project is 50K lines - do the math.

    In any case, my comments were about doing a one-off build from source of open-source software - so you have build everything anyway.

    I find it astonishing that even with machines at least a thousand times
    faster than I've used in the past, you have to resort to tricks to avoid compilation.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Mon Mar 17 16:32:32 2025
    On Mon, 17 Mar 2025 14:25:46 +0000
    bart <[email protected]> wibbled:
    On 17/03/2025 12:07, [email protected] wrote:
    Anything C could do so long as you don't include all the standard C libraries

    in "anything".

    Another mysterious remark. You seem to consider it your job to put down >anything I do or say!

    So, what do the standard C libraries have to do with anything here?

    They're generally the interface to the OS on *nix. No idea about windows.

    where mm is a compiler. That itself was in the context of build tools on >Linux which usually involve makefiles, shell scripts and other
    OS-specific junk, which was touted to be far superior to the Windows >experience.

    So presumably your amazing build system checks the current module build dates and doesn't rebuild stuff that it doesn't have to?

    So how would your compiler know what libraries to link with? I imagine its >> not a problem if you don't bother with libraries in the first place.

    What, within my language? They are either specified via the module
    scheme which lists the source files and libraries used, or infered from
    the FFI declarations needed. This is from my scripting language for example:

    importdll sdl2 =
    func "SDL_OpenAudio"(ref sdl_audiospec desired, obtained=nil)i32
    ...
    end

    I don't know how .dll works in windows, but on *nix there are a couple of different compiled object types: ".o" are compiled code meant to be merged together to create a binary. ".so" are compiled code which can either be stub linked to the code itself at linktime , or dynamically loaded by the code itself at runtime. Which are you talking about?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to [email protected] on Mon Mar 17 17:29:13 2025
    [email protected] writes:
    On Mon, 17 Mar 2025 14:25:46 +0000
    bart <[email protected]> wibbled:
    On 17/03/2025 12:07, [email protected] wrote:
    Anything C could do so long as you don't include all the standard C libraries


    I don't know how .dll works in windows, but on *nix there are a couple of >different compiled object types: ".o" are compiled code meant to be merged >together to create a binary. ".so" are compiled code which can either be stub >linked to the code itself at linktime , or dynamically loaded by the code >itself at runtime. Which are you talking about?


    The 'd' in 'dll' should be sufficiently explanatory.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Tue Mar 18 09:56:04 2025
    On Mon, 17 Mar 2025 17:29:13 GMT
    [email protected] (Scott Lurndal) wibbled:
    [email protected] writes:
    On Mon, 17 Mar 2025 14:25:46 +0000
    bart <[email protected]> wibbled:
    On 17/03/2025 12:07, [email protected] wrote:
    Anything C could do so long as you don't include all the standard C >libraries


    I don't know how .dll works in windows, but on *nix there are a couple of >>different compiled object types: ".o" are compiled code meant to be merged >>together to create a binary. ".so" are compiled code which can either be stub >>linked to the code itself at linktime , or dynamically loaded by the code >>itself at runtime. Which are you talking about?


    The 'd' in 'dll' should be sufficiently explanatory.

    Should be, but its windows so nothing is certain. And he still hasn't said which kind of module he's refering to but frankly I've lost interest anyway. All we ever read is how his language is some amazing C replacement that can
    do everything and build in a fraction of the time. With zero examples.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Tue Mar 18 09:53:59 2025
    On Mon, 17 Mar 2025 17:10:59 +0000
    bart <[email protected]> wibbled:
    On 17/03/2025 16:32, [email protected] wrote:
    On Mon, 17 Mar 2025 14:25:46 +0000
    bart <[email protected]> wibbled:
    On 17/03/2025 12:07, [email protected] wrote:
    Anything C could do so long as you don't include all the standard C >libraries

    in "anything".

    Another mysterious remark. You seem to consider it your job to put down
    anything I do or say!

    So, what do the standard C libraries have to do with anything here?

    They're generally the interface to the OS on *nix. No idea about windows.

    I think you can assume that the tool I used was up to the job

    I'm assuming nothing since all we have is your word for it.

    So presumably your amazing build system checks the current module build dates

    and doesn't rebuild stuff that it doesn't have to?

    Why would it matter? I can compile code at one million lines every two >seconds, and my largest project is 50K lines - do the math.

    You'll have to excuse me if I take that figure with a large packet of salt unless the code does nothing particularly complicated.

    I find it astonishing that even with machines at least a thousand times >faster than I've used in the past, you have to resort to tricks to avoid >compilation.

    Why not? Many large companies have automated build systems that could be building many projects many times during the day as people check in code updates. Not rebuilding code that doesn't need it saves CPU time and hence power usage.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to [email protected] on Tue Mar 18 10:59:27 2025
    On 18/03/2025 09:53, [email protected] wrote:
    On Mon, 17 Mar 2025 17:10:59 +0000
    bart <[email protected]> wibbled:
    On 17/03/2025 16:32, [email protected] wrote:
    On Mon, 17 Mar 2025 14:25:46 +0000
    bart <[email protected]> wibbled:
    On 17/03/2025 12:07, [email protected] wrote:
    Anything C could do so long as you don't include all the standard C
    libraries

    in "anything".

    Another mysterious remark. You seem to consider it your job to put down >>>> anything I do or say!

    So, what do the standard C libraries have to do with anything here?

    They're generally the interface to the OS on *nix. No idea about windows. >>
    I think you can assume that the tool I used was up to the job

    I'm assuming nothing since all we have is your word for it.

    So presumably your amazing build system checks the current module build dates

    and doesn't rebuild stuff that it doesn't have to?

    Why would it matter? I can compile code at one million lines every two
    seconds, and my largest project is 50K lines - do the math.


    You'll have to excuse me if I take that figure with a large packet of salt unless the code does nothing particularly complicated.

    If you don't believe my figures, try Tiny C on actual C programs.

    Tiny C is single pass, mine does multiple passes so is a little slower.

    What the code does is not that relevant:

    c:\cx\big>tim tcc fann4.c
    Time: 0.855

    c:\cx\big>dir fann4.exe
    18/03/2025 10:44 10,491,904 fann4.exe

    So tcc can generate 12MB per second in this case, for a test file of
    nearly 1M lines.

    What you should find harder to believe is this figure:

    c:\cx\big>tim gcc fann4.c
    Time: 50.571 (44.2 on subsequent build)

    c:\cx\big>dir a.exe
    18/03/2025 10:51 9,873,707 a.exe

    Since it can only manage 0.2MB per second for the same quality of code.

    How about making such compilers faster first before resorting to
    makefile tricks?

    Here is my C compiler on the same task:

    c:\cx\big>tim bcc fann4
    Time: 1.624

    c:\cx\big>dir fann4.exe
    18/03/2025 10:55 6,842,368 fann4.exe

    Throughput is only 4MB/second, but it is generating a smaller executable.

    I find it astonishing that even with machines at least a thousand times
    faster than I've used in the past, you have to resort to tricks to avoid
    compilation.

    Why not?

    You're missing the point. I mentioned a throughput of 500Klps above;
    divide that by 1000, and it means a machine from 40 years was able to
    build programs at 500 lines per second, which seems plausible.

    So what do you think is a more realistic figure for today's machines:
    20Klps for an unoptimised build? (The gcc test managed 22Klps.) That
    would mean a compilation speed of 20 lines per second on an early 80s
    PC, which is ludicrous.

    Something is badly wrong.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Harnden@21:1/5 to bart on Tue Mar 18 11:48:41 2025
    On 18/03/2025 10:59, bart wrote:
    for a test file of nearly 1M lines.

    Any sane shop would reject a source file that long.
    It's unmaintainable.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Richard Harnden on Tue Mar 18 14:22:55 2025
    On 18/03/2025 11:48, Richard Harnden wrote:
    On 18/03/2025 10:59, bart wrote:
    for a test file of nearly 1M lines.

    Any sane shop would reject a source file that long.
    It's unmaintainable.


    It's called a benchmark, and can be used a stress test.

    Most cars for example wouldn't make a journey like Paris-Dakar in one
    trip, but it's a useful test of how different models perform. That can
    help detect inefficiences and ideas for improvements.

    Files that big /are/ sometimes generated; I remember one called gcc.c
    which was 750K lines.

    Presumably they are expected to be compiled at some point, then how long
    it takes could matter.

    Somebody didn't believe it was possible to compile 1M lines in two
    seconds, so testing even 10K lines wouldn't have been convincing. Also,
    various overheads would affect the measurements of a very fast compiler
    if the input is too small and it completes too quickly.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael S@21:1/5 to Richard Harnden on Tue Mar 18 16:15:51 2025
    On Tue, 18 Mar 2025 11:48:41 +0000
    Richard Harnden <[email protected]d> wrote:

    On 18/03/2025 10:59, bart wrote:
    for a test file of nearly 1M lines.

    Any sane shop would reject a source file that long.
    It's unmaintainable.


    First, you response has very little to do with arguments that are going
    on.
    Second, huge "source" files tend to be computer-generated. So they are
    only source from POV of back-end compiler. From the POV of humans they
    are intermediate products. So, there are no concerns of maintainability.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Tue Mar 18 16:36:29 2025
    On Tue, 18 Mar 2025 10:59:27 +0000
    bart <[email protected]> wibbled:
    On 18/03/2025 09:53, [email protected] wrote:
    You'll have to excuse me if I take that figure with a large packet of salt >> unless the code does nothing particularly complicated.

    If you don't believe my figures, try Tiny C on actual C programs.

    Tiny C is single pass, mine does multiple passes so is a little slower.

    What the code does is not that relevant:

    c:\cx\big>tim tcc fann4.c
    Time: 0.855

    c:\cx\big>dir fann4.exe
    18/03/2025 10:44 10,491,904 fann4.exe

    So tcc can generate 12MB per second in this case, for a test file of
    nearly 1M lines.

    What you should find harder to believe is this figure:

    c:\cx\big>tim gcc fann4.c
    Time: 50.571 (44.2 on subsequent build)

    Without seeing some of the code its impossible to know though I imagine gcc isn't optimised for Windows.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Waldek Hebisch@21:1/5 to bart on Tue Mar 18 16:27:00 2025
    bart <[email protected]> wrote:
    On 18/03/2025 09:53, [email protected] wrote:
    On Mon, 17 Mar 2025 17:10:59 +0000
    bart <[email protected]> wibbled:
    On 17/03/2025 16:32, [email protected] wrote:
    On Mon, 17 Mar 2025 14:25:46 +0000
    bart <[email protected]> wibbled:
    On 17/03/2025 12:07, [email protected] wrote:
    Anything C could do so long as you don't include all the standard C
    libraries

    in "anything".

    Another mysterious remark. You seem to consider it your job to put down >>>>> anything I do or say!

    So, what do the standard C libraries have to do with anything here?

    They're generally the interface to the OS on *nix. No idea about windows. >>>
    I think you can assume that the tool I used was up to the job

    I'm assuming nothing since all we have is your word for it.

    So presumably your amazing build system checks the current module build dates

    and doesn't rebuild stuff that it doesn't have to?

    Why would it matter? I can compile code at one million lines every two
    seconds, and my largest project is 50K lines - do the math.


    You'll have to excuse me if I take that figure with a large packet of salt >> unless the code does nothing particularly complicated.

    If you don't believe my figures, try Tiny C on actual C programs.

    Tiny C is single pass, mine does multiple passes so is a little slower.

    What the code does is not that relevant:

    c:\cx\big>tim tcc fann4.c
    Time: 0.855

    c:\cx\big>dir fann4.exe
    18/03/2025 10:44 10,491,904 fann4.exe

    So tcc can generate 12MB per second in this case, for a test file of
    nearly 1M lines.

    What you should find harder to believe is this figure:

    c:\cx\big>tim gcc fann4.c
    Time: 50.571 (44.2 on subsequent build)

    c:\cx\big>dir a.exe
    18/03/2025 10:51 9,873,707 a.exe

    Since it can only manage 0.2MB per second for the same quality of code.

    How about making such compilers faster first before resorting to
    makefile tricks?

    Here is my C compiler on the same task:

    c:\cx\big>tim bcc fann4
    Time: 1.624

    c:\cx\big>dir fann4.exe
    18/03/2025 10:55 6,842,368 fann4.exe

    Throughput is only 4MB/second, but it is generating a smaller executable.

    I find it astonishing that even with machines at least a thousand times
    faster than I've used in the past, you have to resort to tricks to avoid >>> compilation.

    Why not?

    You're missing the point. I mentioned a throughput of 500Klps above;
    divide that by 1000, and it means a machine from 40 years was able to
    build programs at 500 lines per second, which seems plausible.

    So what do you think is a more realistic figure for today's machines:
    20Klps for an unoptimised build? (The gcc test managed 22Klps.) That
    would mean a compilation speed of 20 lines per second on an early 80s
    PC, which is ludicrous.

    Actually 20 lines per per second would be not bad. Early Turbo
    Pascal was considerd very fast and IIRC did 8000 lines per minute,
    that is about 130 lines per second.

    Modern machines are more than 1000 faster than early PC-s, probably
    closer to 10000 faster. If you belive in Dhrystones, slow RISCV
    board is doing 1820.7 DMIPS, slow Atom 2952 DMIPS, And Zen at about
    3 GHz 30501 DMIPS. VAX in 1 DMIPS and is quite a bit faster
    than early PC-s.

    OTOH, compiler are bad case for modern machines. gcc folks
    observed that gcc execution time correlates better with
    databases than with compute intensive programs. In particular
    there are a lot of cache misses which are costly on modern
    machines.

    Something is badly wrong.

    People want compilers to do more work. The idea is to write
    simple program without doing various speed-enhancing tricks
    and still get good execution time. Look at functions below.
    'aref' guarantees that all access are in bounds. But at
    -O2 gcc compiled code for 'my_sum' is the same as code with
    no bound checking. Simply, compiler can prove that all array
    accesses are in bound, so it can safely remove checking
    code. How good is code from your compiler (assuming that
    source code is checking all array accesses)?

    #include <stddef.h>
    #include <stdio.h>
    #include <stdlib.h>

    void
    my_error(void) {
    fprintf(stderr, "my_error called\n");
    exit(EXIT_FAILURE);
    }

    typedef struct {size_t size; int a[];} my_arr;

    int
    aref(my_arr * t, size_t i) {
    if (i < t->size) {
    return t->a[i];
    } else {
    my_error();
    return 0;
    }
    }

    long
    my_sum(my_arr * t) {
    size_t n = t->size;
    size_t i;
    long sum = 0;
    for(i = 0; i < n; i++) {
    sum += aref(t, i);
    }
    return sum;
    }



    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael S@21:1/5 to Waldek Hebisch on Tue Mar 18 20:16:23 2025
    On Tue, 18 Mar 2025 16:27:00 -0000 (UTC)
    [email protected] (Waldek Hebisch) wrote:

    bart <[email protected]> wrote:

    Actually 20 lines per per second would be not bad. Early Turbo
    Pascal was considerd very fast and IIRC did 8000 lines per minute,
    that is about 130 lines per second.

    Modern machines are more than 1000 faster than early PC-s, probably
    closer to 10000 faster. If you belive in Dhrystones, slow RISCV
    board is doing 1820.7 DMIPS, slow Atom 2952 DMIPS, And Zen at about
    3 GHz 30501 DMIPS. VAX in 1 DMIPS and is quite a bit faster
    than early PC-s.


    Not sure how VAX compares to early PCs in general, but if my deem
    memories of casual 1st hand experience are worth anything then I'd dare
    to say that compiling Pascal program on 780/11 with VMS Pascal was at
    least 10 times slower than doing the same on PC/AT clone with Turbo
    Pascal. Possibly, up to 50 times slower, but certainly not less than 10.
    It is possible that AT clone was running faster than original IBM AT,
    but it was 286, not 386.

    OTOH, compiler are bad case for modern machines. gcc folks
    observed that gcc execution time correlates better with
    databases than with compute intensive programs. In particular
    there are a lot of cache misses which are costly on modern
    machines.


    SPEC CPU benchmarks suit has gcc-based subtest. By this subtest, modern
    CPUs are quite a lot faster doing gcc compilation than even circa-2006
    Cor2Duo that back then was considered new class for this sort of tasks.
    All result below are Base scores.

    SPEC CPU2006
    2006:
    3.0 GHz, Intel Xeon 5160 403.gcc - 15.2 (i.e. 15.2 times faster
    than Sun Ultra Enterprise 2)
    2017:
    4.20 GHz, Intel Xeon E3-1270 v6 403.gcc - 54.8

    SPEC CPU2017
    2017:
    4.20 GHz, Intel Xeon E3-1270 v6 602.gcc_s - 11.0
    2024:
    5.4 GHz, AMD EPYC 4364P 602.gcc_s - 20.6

    So, total speed up of gcc compilation in 18 years:
    (20.6/11.0)*(54.8/15.2) = 6.75
    Not too bad, I should say.

    Something like Apple M4 or fastest Intel and AMD desktop chips are
    probably even faster, but nowadays vendors don't submit SPEC results
    for client-class CPUs.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Waldek Hebisch on Tue Mar 18 20:36:11 2025
    On 18/03/2025 16:27, Waldek Hebisch wrote:
    bart <[email protected]> wrote:

    Actually 20 lines per per second would be not bad. Early Turbo
    Pascal was considerd very fast and IIRC did 8000 lines per minute,
    that is about 130 lines per second.

    You're probably thinking of early commercial compilers for CP/M and
    MSDOS which were badly ported from bigger machines, disk intensive, and
    took minutes for the simplest programs. (According to reviews in Byte magazine.)

    I had in mind more sensible, specially written ones like mine, or like
    Turbo Pascal.

    Something is badly wrong.

    People want compilers to do more work. The idea is to write
    simple program without doing various speed-enhancing tricks
    and still get good execution time. Look at functions below.
    'aref' guarantees that all access are in bounds. But at
    -O2 gcc compiled code for 'my_sum' is the same as code with
    no bound checking. Simply, compiler can prove that all array
    accesses are in bound, so it can safely remove checking
    code. How good is code from your compiler (assuming that
    source code is checking all array accesses)?

    I assume you mean that -O2 will inline the aref() call, and then also
    figure out that the check is not needed, or can be hoisted out of the loop?

    My compiler will translate everything exactly as written. It will assume
    the programmer will write reasonably sensible code, and not add their
    own bound-checking code, not only per-iteration, but in a separate function!

    If you write (or generate) code like this, in the expectation that a
    clever compiler will optimise it out, then you will need such a compiler.

    The problem is that gcc-O0 will not optimise either, and it still builds
    20-30 times more slowly than those fast compilers!

    (I run a interpreted language with bounds checking. Runtime bounds
    errors on finished programs are incredibly rare. I would not expect to
    need such checks in compiled languages except during development or on
    debug versions.

    And especially in examples like yours when you expect to trust the size
    that the array object carries with it.)

    I tested a version of your code as shown below, which needs a 1.6GB
    allocaton. Runtimes were:

    tcc 4.1 seconds
    gcc -O0 3.7 seconds
    DMC -o 2.0 seconds (32-bits)
    bcc 1.8 seconds (my product)
    gcc -O2 1.2 seconds (-fno_inline)
    mm 1.1 seconds (in my language, when aref is a macro)
    gcc -O2 0.8 seconds

    When you see 4.5:1 between optimised/non-optimised then you know there's
    funny business going on: C code that is written in a manner that will
    rely heavily on optimisations.

    -----------------------------

    #include <stddef.h>
    #include <stdio.h>
    #include <stdlib.h>

    void my_error(void) {
    fprintf(stderr, "my_error called\n");
    exit(EXIT_FAILURE);
    }

    typedef struct {size_t size; int a[];} my_arr;

    int aref(my_arr * t, size_t i) {
    if (i < t->size) {
    return t->a[i];
    } else {
    my_error();
    return 0;
    }
    }

    long long my_sum(my_arr * t) {
    size_t n = t->size;
    size_t i;
    long long sum = 0;
    for(i = 0; i < n; i++) {
    sum += aref(t, i);
    }
    return sum;
    }

    int main() {
    enum {n=400000000};
    my_arr* S;
    long long sum=0;

    S=malloc(n*sizeof(n)+sizeof(int));
    S->size=n;

    for (int i=0; i<n; ++i) S->a[i]=i+1;

    sum=my_sum(S);

    printf("N=%d Sum=%lld\n", n, sum);
    }

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tim Rentsch@21:1/5 to bart on Wed Mar 19 00:14:59 2025
    bart <[email protected]> writes:

    On 13/03/2025 21:52, Tim Rentsch wrote:

    bart <[email protected]> writes:

    Here however is a summary of these fictional tools:

    https://github.com/sal55/langs/blob/master/CompilerSuite.md

    I'm not interested in the tools. What I am asking to see is
    the language.

    I'm working on a document that summaries the features.

    I expect some people will find it interesting reading. It is
    almost certainly worth writing, assuming there is an interested
    audience.

    My interest is seeing a definition of the language, including
    at least a complete syntax, and some sort of description of
    the semantics for each construct, especially those that look
    or behave differently than familiar constructs in mainstream
    languages. Being concise or terse is okay; I don't need to
    read a belabored explanation of, for example, how function
    calls work, if they work the same way that function calls in
    C work. But it is important, in this example, to say that
    function arguments are always evaluated left-to-right (if
    indeed that is the case), because it may change the meaning
    of a code fragment relative to common expectations.

    In short, I would like to see a minimal document that lets
    me say with confidence that I can write code in the language
    and that I can read any legal program in the language and
    know what it does.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to Michael S on Wed Mar 19 13:59:06 2025
    Michael S <[email protected]> writes:
    On Tue, 18 Mar 2025 16:27:00 -0000 (UTC)
    [email protected] (Waldek Hebisch) wrote:

    bart <[email protected]> wrote:

    Actually 20 lines per per second would be not bad. Early Turbo
    Pascal was considerd very fast and IIRC did 8000 lines per minute,
    that is about 130 lines per second.

    Modern machines are more than 1000 faster than early PC-s, probably
    closer to 10000 faster. If you belive in Dhrystones, slow RISCV
    board is doing 1820.7 DMIPS, slow Atom 2952 DMIPS, And Zen at about
    3 GHz 30501 DMIPS. VAX in 1 DMIPS and is quite a bit faster
    than early PC-s.


    Not sure how VAX compares to early PCs in general, but if my deem
    memories of casual 1st hand experience are worth anything then I'd dare
    to say that compiling Pascal program on 780/11 with VMS Pascal was at
    least 10 times slower than doing the same on PC/AT clone with Turbo
    Pascal

    I find it very difficult to agree with your performance assessment.

    I did systems programming in VAX-11 Pascal for three years; the
    compiler wasn't slow at all (particularly when compared with
    UCSD Pascal on a Terek box).

    Granted that was 45 years ago. I do have some compiler listings
    in a box somewhere, that probably have lines-per-minute rates
    listed.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bart@21:1/5 to Tim Rentsch on Wed Mar 19 16:21:54 2025
    On 19/03/2025 07:14, Tim Rentsch wrote:
    bart <[email protected]> writes:

    On 13/03/2025 21:52, Tim Rentsch wrote:

    bart <[email protected]> writes:

    Here however is a summary of these fictional tools:

    https://github.com/sal55/langs/blob/master/CompilerSuite.md

    I'm not interested in the tools. What I am asking to see is
    the language.

    I'm working on a document that summaries the features.

    I expect some people will find it interesting reading. It is
    almost certainly worth writing, assuming there is an interested
    audience.

    I don't know if you've seen the thread I made, where I posted a link to
    it. So any suggestions now are a little late.

    The evidence is that no one is interested in this kind of language now.

    I will use the write-up for my quick reference (to remind me of what's
    in there, which is quite a lot). But I will probably add appendices with
    some proper reference material.

    My interest is seeing a definition of the language, including
    at least a complete syntax, and some sort of description of
    the semantics for each construct, especially those that look
    or behave differently than familiar constructs in mainstream
    languages.

    Most languages I've tinkered with, I haven't bothered with any
    references. I just need to know the basics (hello world; defining a
    function; printing a number).

    I think most people don't until they have to use a language properly.

    Being concise or terse is okay; I don't need to
    read a belabored explanation of, for example, how function
    calls work, if they work the same way that function calls in
    C work. But it is important, in this example, to say that
    function arguments are always evaluated left-to-right (if
    indeed that is the case),

    A lot of this stuff is up to the implementation. Here, function
    arguments I believe are always evaluated right-to-left, which in my own implementation, is an assumption made in the front-end.

    But it's really up to the backend. It could decide to reverse the order;
    there is enough info in the IL to do that, but it's messy. So it should
    really be a characeteristic that the front-end interrogates.

    There's another issue with the stack, which normal grows downwards, but
    when the backend is told to interpret the IL, it grows upwards. So
    function arguments are physically ordered the other way around, but the right-most in the source code is still evaluated first.

    (This had a bearing when the backend was used to interpret C, where my implementation of variadic function bodies assumed the stack went a
    certain way.)

    Anyway, the ordering is not specified by the language, and should be be
    relied upon. It won't hurt to mention that though.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tim Rentsch@21:1/5 to bart on Fri Mar 21 00:20:00 2025
    bart <[email protected]> writes:

    On 19/03/2025 07:14, Tim Rentsch wrote:

    bart <[email protected]> writes:

    On 13/03/2025 21:52, Tim Rentsch wrote:

    bart <[email protected]> writes:

    Here however is a summary of these fictional tools:

    https://github.com/sal55/langs/blob/master/CompilerSuite.md

    I'm not interested in the tools. What I am asking to see is
    the language.

    I'm working on a document that summaries the features.

    I expect some people will find it interesting reading. It is
    almost certainly worth writing, assuming there is an interested
    audience.

    I don't know if you've seen the thread I made, where I posted a
    link to it. So any suggestions now are a little late.

    I have. I don't mean to make any suggestions about writing you
    have been planning to do; I am only stating what kind of
    information I'm looking for.

    The evidence is that no one is interested in this kind of language
    now.

    It's hard to understand how you can think that, given that I have
    explicitly asked for some sort of language reference. Ideally that
    would be a complete and comprehensive document: not too long, and
    not aimed at beginners, but simply giving a concise but complete
    description of the language. In other words a single document that
    I can just sit down and read, without having to read anything else,
    after which I would know everything about what language is defined.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Michael S on Tue Mar 25 06:11:04 2025
    On Tue, 18 Mar 2025 16:15:51 +0200, Michael S wrote:

    On Tue, 18 Mar 2025 11:48:41 +0000 Richard Harnden <[email protected]d> wrote:

    Any sane shop would reject a source file that long.
    It's unmaintainable.

    Second, huge "source" files tend to be computer-generated. So they are
    only source from POV of back-end compiler. From the POV of humans they
    are intermediate products. So, there are no concerns of maintainability.

    If the intermediate file was in something like LLVM-IR instead of C, it
    would be even larger, by an order of magnitude or more.

    Typically, though, it wouldn’t exist as a discrete file on disk, but just
    a stream of data through a pipe.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to bart on Thu Apr 10 06:54:00 2025
    On Tue, 11 Mar 2025 22:02:37 +0000, bart wrote:

    You have machines now that are 1000 times faster than what I was using,
    and yet compilation time is still be an issue unless you use all these tricks?

    The programs are 1000 times bigger, too.

    How long do you think it takes Microsoft to rebuild Windows? Think
    your tools could cope with that?

    Beggars can’t be choosers. As long as you don’t have the skills or
    patience to actually contribute to such development, you have to accept
    what you get.

    Have you actually tried it? I mean what I suggested in taking a
    project, and extracting the most basic steps. Like the invocation of gcc above. You might start questioning all this pointless complexity
    yourself.

    I do open-source builds all the time. I have even contributed patches
    to some build scripts. Here is a small part of a wrapper I did for the
    Blender build script, which handles my particular choice of build
    options:

    cmake ${CMAKE_DEBUG_FLAGS} ${EXTRA_FLAGS} \
    -D WITH_BUILDINFO=ON -D WITH_DOC_MANPAGE=ON \
    -D WITH_PLAYER=OFF -D WITH_GAMEENGINE=OFF \
    -D WITH_PYTHON_INSTALL=OFF -D PYTHON_VERSION=$PYVERSION \
    -D PYTHON_INCLUDE_DIR=/usr/include/python${PYVERSION} \
    -D PYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython${PYVERSION}.so \
    -D WITH_FFTW3=ON -D WITH_MOD_OCEANSIM=ON -D WITH_IMAGE_OPENEXR=ON -D WITH_OPENCOLORIO=ON \
    -D FREETYPE_INCLUDE_DIRS=/usr/include/freetype2 \
    -D WITH_LLVM=ON -D LLVM_ROOT_DIR=${LLVM_ROOT_DIR} -D LLVM_VERSION=${LLVM_VERSION} \
    ${OSL_OPTS} \
    -D WITH_OPENSUBDIV=${WITH_OPENSUBDIV} \
    -D WITH_MEM_JEMALLOC=${WITH_MEM_JEMALLOC} \
    -D EMBREE_INCLUDE_DIR=/usr/include -D EMBREE_ROOT_DIR=/usr/lib/x86_64-linux-gnu -D EMBREE_LIBRARY=/usr/lib/x86_64-linux-gnu/libembree3.so -D EMBREE_EMBREE3_LIBRARY=/usr/lib/x86_64-linux-gnu/libembree3.so \
    -D WITH_JACK=${WITH_JACK} -D WITH_SDL=OFF \
    -D WITH_OPENCOLLADA=$WITH_COLLADA \
    ${FFMPEG_OPTS} \
    -D WITH_CODEC_SNDFILE=ON \
    -D CMAKE_VERBOSE_MAKEFILE=$CMAKE_VERBOSE_MAKEFILE \
    -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE \
    ../"$CHECKOUTDIR"

    Go on, tell me what “most basic steps” you can “extract” from that. I can go over it in detail, if you want.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)