• =?UTF-8?B?V2hhdOKAmXM=?= Your Least Favourite Programming Language?

    From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.lang.misc on Fri Oct 31 06:48:08 2025
    From Newsgroup: comp.lang.misc

    As their soundcheck question for 2024, Computerphile asked their
    interviewees what their least favourite programming language was <https://www.youtube.com/watch?v=03lRzf7iSiU>.

    The most popular answer was JavaScript, with 4 votes. There were 2
    votes for PHP, and one each for Lisp and Python.

    The Python-hater didnrCOt like dynamic typing. Given how many
    dynamically-typed languages there are (including lots older than
    Python), how come Python was the first one he thought of?

    As for JavaScript, I think itrCOs misunderstood. The only one who gave a
    reason for his dislike gave an outdated reason -- scope hoisting. That doesnrCOt have to apply any more, if you avoid rCLvarrCY declarations, and
    also use strict mode to avoid implicit globals.

    I imagine PHP would have got more votes, if more people had had to use
    it.

    One mentioned COBOL (which for him was worse than Fortran), but nobody
    thought of BASIC. I guess that is now so far in the past, many among
    the interviewees wouldnrCOt even have any memories of using it ...
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From David Brown@david.brown@hesbynett.no to comp.lang.misc on Fri Oct 31 13:28:36 2025
    From Newsgroup: comp.lang.misc

    On 31/10/2025 07:48, Lawrence DrCOOliveiro wrote:
    As their soundcheck question for 2024, Computerphile asked their
    interviewees what their least favourite programming language was <https://www.youtube.com/watch?v=03lRzf7iSiU>.

    The most popular answer was JavaScript, with 4 votes. There were 2
    votes for PHP, and one each for Lisp and Python.

    The Python-hater didnrCOt like dynamic typing. Given how many dynamically-typed languages there are (including lots older than
    Python), how come Python was the first one he thought of?

    As for JavaScript, I think itrCOs misunderstood. The only one who gave a reason for his dislike gave an outdated reason -- scope hoisting. That doesnrCOt have to apply any more, if you avoid rCLvarrCY declarations, and also use strict mode to avoid implicit globals.

    I imagine PHP would have got more votes, if more people had had to use
    it.

    One mentioned COBOL (which for him was worse than Fortran), but nobody thought of BASIC. I guess that is now so far in the past, many among
    the interviewees wouldnrCOt even have any memories of using it ...

    I suppose it is all about which languages people know and use. It would
    be unreasonable to answer "Brainfuck", given that very few people have
    written code in it. (I expect more people have written Brainfuck
    interpreters than programs in Brainfuck.)

    So for the Python-hater, Python was presumably the only dynamically
    typed language they used. And very few people these days have much
    experience with COBOL.

    Did you have a "least favourite" language yourself?

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From John Ames@commodorejohn@gmail.com to comp.lang.misc on Fri Oct 31 08:17:42 2025
    From Newsgroup: comp.lang.misc

    On Fri, 31 Oct 2025 06:48:08 -0000 (UTC)
    Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
    One mentioned COBOL (which for him was worse than Fortran), but nobody thought of BASIC. I guess that is now so far in the past, many among
    the interviewees wouldnrCOt even have any memories of using it ...
    And/or that anybody using BASIC in a modern context is gonna be using
    something like FreeBASIC, which is a vastly improved and perfectly
    reasonable little language compared to the early microcomputer BASICs.
    Re: Javascript, it's true that a lot of improvements have been made to
    it, but from a certain perspective it's all lipstick on a pig; there's
    been so many things slapped on to paper over some poor initial design
    decisions or chase trends in web development over the years that at
    this point it's a fossil shale of a language.
    Anyway, there's things to dislike about most any language, but there
    aren't too many that I'd universally condemn in my own assessment.
    Pascal gets a frowny-face for design decisions that should never, ever
    have made it past the initial draft of the first paper (making array
    size part of the type specification was braindead from the start - an impediment to good design *and* a burden on performance, all in the
    name of avoiding a problem that there were much better solutions for,)
    and while newer iterations have improved things somewhat, it would've
    been better to throw it out and re-do from scratch...*but* the FP folks
    do put a lot of effort into making it a full-featured and surprisingly
    portable platform for development.
    Another language that feels needlessly gross and tedious is Java - it's
    just *unreasonably* verbose, to the point where one is tempted to
    employ a macro preprocessor just to condense sesquipedalian nonsense
    like System.out.println() down to furshlugginer print() and so forth.
    Any language that *requires* an IDE with weapons-grade autocomplete
    deserves censure...but then it's somehow still the best solution we've
    got for write-once-run-anywhere development, which is maddening :/
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@bc@freeuk.com to comp.lang.misc on Fri Oct 31 22:47:16 2025
    From Newsgroup: comp.lang.misc

    On 31/10/2025 15:17, John Ames wrote:
    On Fri, 31 Oct 2025 06:48:08 -0000 (UTC)
    Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:

    One mentioned COBOL (which for him was worse than Fortran), but nobody
    thought of BASIC. I guess that is now so far in the past, many among
    the interviewees wouldnrCOt even have any memories of using it ...

    And/or that anybody using BASIC in a modern context is gonna be using something like FreeBASIC, which is a vastly improved and perfectly
    reasonable little language compared to the early microcomputer BASICs.

    Re: Javascript, it's true that a lot of improvements have been made to
    it, but from a certain perspective it's all lipstick on a pig; there's
    been so many things slapped on to paper over some poor initial design decisions or chase trends in web development over the years that at
    this point it's a fossil shale of a language.

    Anyway, there's things to dislike about most any language, but there
    aren't too many that I'd universally condemn in my own assessment.
    Pascal gets a frowny-face for design decisions that should never, ever
    have made it past the initial draft of the first paper (making array
    size part of the type specification was braindead from the start - an impediment to good design *and* a burden on performance, all in the
    name of avoiding a problem that there were much better solutions for,)
    and while newer iterations have improved things somewhat, it would've
    been better to throw it out and re-do from scratch...*but* the FP folks
    do put a lot of effort into making it a full-featured and surprisingly portable platform for development.

    Another language that feels needlessly gross and tedious is Java - it's
    just *unreasonably* verbose, to the point where one is tempted to
    employ a macro preprocessor just to condense sesquipedalian nonsense
    like System.out.println() down to furshlugginer print() and so forth.

    Zig is worse ('i' is an integer):

    const std = @import("std");

    std.debug.print("{} {}\n", .{i, @sqrt(@as(f64, @floatFromInt(i)))});


    This is the equivalent of this in mine:

    println i, sqrt(i)

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.lang.misc on Sat Nov 1 06:26:55 2025
    From Newsgroup: comp.lang.misc

    On Fri, 31 Oct 2025 08:17:42 -0700, John Ames wrote:

    Re: Javascript, it's true that a lot of improvements have been made
    to it, but from a certain perspective it's all lipstick on a pig;
    there's been so many things slapped on to paper over some poor
    initial design decisions or chase trends in web development over the
    years that at this point it's a fossil shale of a language.

    I donrCOt think it is. It has lexical binding, and functions as
    first-class objects! So has Python, but what else can you name that
    has that? Strict mode and let/const-in-place-of-var lets you get rid
    of a lot of the boneheadedness. The statement-continuation rule is
    weird, but manageable.

    My main use of it has been in web pages, where I maybe write a few
    hundred lines of it at a time, commonly less. From a recent bit of
    fun I did for a friend, here is the setup of column headings for
    a table of data that are clickable to set the table sort order:

    const row = document.createElement("tr")
    const cell = document.createElement("th")
    cell.textContent = ""
    row.appendChild(cell)
    let fieldindex = 0
    for (const name of fieldnames)
    {
    const cell = document.createElement("th")
    const sortbut = document.createElement("button")
    sortbut.setAttribute("onclick", "mymod.set_sort_order(" + fieldindex.toString() + ")")
    sortbut.textContent = name
    cell.appendChild(sortbut)
    row.appendChild(cell)
    ++fieldindex
    } /*for*/
    thead.appendChild(row)

    HererCOs the function that sets the sort order (note the use of lexical binding):

    function set_sort_order(fieldindex)
    /* Note that each change of sort order is applied on top of
    the previous sort order. To start again from the default
    ordering, refresh the page. */
    {
    if (sortcol != fieldindex)
    {
    sortcol = fieldindex
    fieldvalues.sort
    (
    function (a, b)
    {
    const fieldtype = fieldtypes[fieldindex]
    const conv = sort_conv[fieldtype]
    const key_a = conv(a[fieldindex])
    const key_b = conv(b[fieldindex])
    return key_a < key_b ? -1 : key_a > key_b ? 1 : 0
    } /*function*/
    )
    load_page()
    } /*if*/
    } /*set_sort_order*/

    See the reference to that rCLsort_convrCY table? It is keyed off a column
    type, to define the appropriate sort order for that column. For
    example, a column of quarterly dates has values like rCLQ3'23rCY and rCLQ1'24rCY, and you want the former to sort before the latter. In a
    column of numbers with units, you want a value beginning rCL2GrCY to sort before one beginning rCL100MrCY. And so on.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From BGB@cr88192@gmail.com to comp.lang.misc on Mon Nov 3 14:05:12 2025
    From Newsgroup: comp.lang.misc

    On 10/31/2025 10:17 AM, John Ames wrote:
    On Fri, 31 Oct 2025 06:48:08 -0000 (UTC)
    Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:

    One mentioned COBOL (which for him was worse than Fortran), but nobody
    thought of BASIC. I guess that is now so far in the past, many among
    the interviewees wouldnrCOt even have any memories of using it ...

    And/or that anybody using BASIC in a modern context is gonna be using something like FreeBASIC, which is a vastly improved and perfectly
    reasonable little language compared to the early microcomputer BASICs.


    In one project, I ended up implementing a BASIC dialect partly inspired
    by early Unstructured BASIC dialects. Though, in this case, this was
    more because it allowed writing an interpreter in roughly 1000 lines of C.

    Though, I ended up extending it in some non-standard ways that didn't
    really match up with either 80s BASIC, or the direction the language
    went in the 90s.

    But, the use-case I had didn't really need it to go in the 90s
    direction, and keeping the interpreter small also did not favor going
    that direction (where the 90s dialects more went in the direction of
    trying to turn it into a more general purpose programming language).


    It went from 80s style Unstructured BASIC to:
    Unstructured BASIC, but with dynamic scoping and return values...
    And, CSG / vector stuff.

    Trying to do a clean up of the core idea of what it became, ended up
    sorta like this:
    https://pastebin.com/2pEE7VE8



    Re: Javascript, it's true that a lot of improvements have been made to
    it, but from a certain perspective it's all lipstick on a pig; there's
    been so many things slapped on to paper over some poor initial design decisions or chase trends in web development over the years that at
    this point it's a fossil shale of a language.


    Did another recent experiment, where I tried stripping JS back to a
    minimal core and implementing something "roughly kinda similar" but
    trying to write the interpreter in a way that minimized line count.

    Got something written in around 2700 lines of C (over around 3 days).

    FWIW: https://github.com/cr88192/bgbtech_misc/tree/master/vm_bs3l


    This reuses a few ideas from the design of the BASIC dialect, in places
    where it could save implementation complexity without trashing the
    language design too much.



    Was still lacking various language constructs (like "switch()"), but
    alas. I also went with dynamic scoping, mostly because I can implement
    dynamic scoping using less code than lexical scoping.

    Also, absent additional analysis steps or similar, and thus code
    complexity, full lexical scoping is prone to rapidly leak memory. The
    main way to avoid the massive memory leak is to detect cases of
    non-capture and either fall back to a C-like scoping model; or at least destroy the non-captured frames.

    This is a non-issue with dynamic scoping, even if, potentially, using
    dynamic scoping as the default is itself a foot gun (in terms of semantics).


    Still not really well tested. I didn't have an immediate use-case so
    more threw it together as a test/proof of concept.


    It isn't really meant to be either well written, or particularly fast.
    It parses an AST and then just sort of uses a tree-walking interpreter.

    Ultimately, it is maybe kinda moot, as pretty much any language/interpreter/compiler that sees significant use is almost
    invariably prone to turn into a bloated monstrosity.


    There are also limits.
    A while back, I had started an attempt to write a more traditional C
    compiler (with a vaguely GCC like design), but also trying to keep it
    under 30 kLOC (roughly a similar code footprint to the original version
    of the Doom engine). Sorta stalled out the project when I noted that I
    was already going to blow past this limit. I had also started to
    question whether it even makes sense to use the traditional strategy
    (or, using fully disjoint stages, producing native code object files,
    and then running them through a linker).


    My existing C compiler (that I use in my own projects) uses an approach
    of first compiling to a stack-based IL, and then doing all of the native
    code generation in what would-be the link stage. I am left suspecting
    this may actually be a more sensible approach (with the frontend stages existing more to compile from the source language to the IL used by the backend).



    I am also left to consider possible alternatives to C and C++. But, the
    best idea I have at the moment (that would fit my uses) would be to make
    a language sort of resembling a hybrid of C and C#. Though, some of the possible merits of such a language would be weakened if (for practical reasons) such a compiler is likely to also need to be able to accept
    plain old C. The main argument in favor is that "C-like with some C#
    stuff glued on" being simpler/cheaper to implement than an actual C++ compiler.

    Though, some cost notable savings would be possible by the compiler
    either not supporting C, or only supporting a restricted subset of C
    (maybe going as far as only allowing C code which is the least common denominator of both languages).

    Might be nice if one can have a compiler that:
    Can generate reasonably efficient native code binaries;
    Supports a more advanced OO language as well as a C like use cases;
    Fits the whole compiler / "toolchain" in under 100K lines.
    Where, 30K lines may be unrealistic, but at least 100K.

    My existing compiler is around 250K lines, bigger than i would like.


    Still pretty small though if compared with GCC or Clang, which both
    weigh in in well into MLOC territory (and Clang basically wrecking my PC trying to build it). Like, even if it is good/fancy/whatever, not
    inclined to try to compile something where compiling the compiler brings
    my PC to its knees for multiple hours at a time.

    I much prefer working on a compiler where the rebuild time is around 5
    seconds or so (or, around 30 seconds if building it with GCC).


    Like, seriously, we don't need the C and C++ compilers to be like "The
    One Ring": "One compiler to build them all! One compiler to link them!"

    Nor, the PC equivalent of "Forged in the fires of Mt. Doom", namely
    multi-hour build times for said compiler...

    Well, and if one is like, "Well, does your compiler generate better code
    than GCC or Clang, or target all of the same types of machines?", I can
    be like, "This is missing the point."

    More often it matters that a compiler exists, rather than which compiler
    it is, or even whether or not it is the "best" compiler (more "a
    compiler exists", and "preferably not complete garbage").



    But, then the problem with C++ exists, that it is too much of a pain to
    write a C++ compiler, so inherently it becomes a choice-limiting issue.

    Ideally, one needs a language which can serve a similar role, but for
    which writing a compiler for it is less of a nightmarish undertaking.
    Well, and where the choice is not also "just use C".


    Well, in a similar way:
    Implementing a small JS like interpreter in 2700 LOC, stands no chance
    of replacing something like SpiderMonkey or V8, but expecting it would
    do so would also be missing the point.

    There are use-cases where one may want a small (if slow) interpreter,
    and where throwing some 500 kLOC beast of a VM at the problem is not an
    ideal strategy.



    Anyway, there's things to dislike about most any language, but there
    aren't too many that I'd universally condemn in my own assessment.
    Pascal gets a frowny-face for design decisions that should never, ever
    have made it past the initial draft of the first paper (making array
    size part of the type specification was braindead from the start - an impediment to good design *and* a burden on performance, all in the
    name of avoiding a problem that there were much better solutions for,)
    and while newer iterations have improved things somewhat, it would've
    been better to throw it out and re-do from scratch...*but* the FP folks
    do put a lot of effort into making it a full-featured and surprisingly portable platform for development.

    Another language that feels needlessly gross and tedious is Java - it's
    just *unreasonably* verbose, to the point where one is tempted to
    employ a macro preprocessor just to condense sesquipedalian nonsense
    like System.out.println() down to furshlugginer print() and so forth.
    Any language that *requires* an IDE with weapons-grade autocomplete
    deserves censure...but then it's somehow still the best solution we've
    got for write-once-run-anywhere development, which is maddening :/


    Agreed, even as someone who had before designed/implemented a Java-like language...

    Well, there are reasons my current leaning would be to start from a base
    more resembling C#. In some ways, its design points make more sense
    (even if seemingly some of its choices look more like "take Java and
    make it look more like C++").


    For API design, probably makes some sense to stick close to a C like
    approach when possible. Like, try to aim for a "minimal but effective"
    API design, not so much the "try to micro-manage every possible thing a
    person might want to do in the language" approach that Java had used
    (while at the same time making it needlessly verbose to actually use
    said interfaces).

    Maybe also don't try to design the language with the seeming starting assumption that all the programmers are stupid and can't figure out how
    to do anything on their own; ...


    Though, granted, a custom non-standard C# like language, absent
    widespread adoption, would not likely achieve a WORA like goal.

    ...

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.lang.misc on Mon Nov 3 20:29:53 2025
    From Newsgroup: comp.lang.misc

    On Mon, 3 Nov 2025 14:05:12 -0600, BGB wrote:

    Also, absent additional analysis steps or similar, and thus code
    complexity, full lexical scoping is prone to rapidly leak memory.

    You mean, you need to put call frames on the heap, not the stack? And
    that will expose any lack of robustness in your memory-management
    scheme?

    By the way, Python is clever enough to only put referenced outer-level variables within the closure.

    This is a non-issue with dynamic scoping, even if, potentially,
    using dynamic scoping as the default is itself a foot gun (in terms
    of semantics).

    This sounds like a rCLI could implement it much more efficiently if I
    didnrCOt have to do it correctlyrCY kind of argument ...
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From BGB@cr88192@gmail.com to comp.lang.misc on Mon Nov 3 14:55:31 2025
    From Newsgroup: comp.lang.misc

    On 11/3/2025 2:29 PM, Lawrence DrCOOliveiro wrote:
    On Mon, 3 Nov 2025 14:05:12 -0600, BGB wrote:

    Also, absent additional analysis steps or similar, and thus code
    complexity, full lexical scoping is prone to rapidly leak memory.

    You mean, you need to put call frames on the heap, not the stack? And
    that will expose any lack of robustness in your memory-management
    scheme?


    Yes.

    Minimal memory management: Don't bother with GC;
    Minimal handling of lexical closures: Just put the frames of the heap,
    capture them if a closure is created, don't bother with case of closure
    not being created.

    But, this is a bad scenario, as it results in an explosively bad memory leak...


    By the way, Python is clever enough to only put referenced outer-level variables within the closure.


    Yes, but:
    Detecting which variables are captured, or whether or not there is
    capture or non-capture, is the "additional analysis steps" thing...


    Likewise, the cheaper option is using a per-frame flag for capture-vs-non-capture (frame is freed if the "frame was captured" flag
    is not set). Still though, this is more code complexity than not using
    lexical scoping in the first place.


    Like, dynamic scoping doesn't need frames that may or may not be
    captured, can just put all of the variables onto a stack and push/pop
    this stack position per-frame.


    This is a non-issue with dynamic scoping, even if, potentially,
    using dynamic scoping as the default is itself a foot gun (in terms
    of semantics).

    This sounds like a rCLI could implement it much more efficiently if I didnrCOt have to do it correctlyrCY kind of argument ...

    It is cheap and simple...

    But, one thing it is not, is semantically equivalent to lexical scoping.


    Some of my past languages had both lexical and dynamic scoping (with
    lexical as the default). This can make more sense.

    But, as noted, the goal in the case of this interpreter was to use less
    code, and probably would have needed to spend maybe an additional 300
    lines of code or similar to have added support for lexical scoping (that wouldn't just immediately leak all the RAM).

    ...


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.lang.misc on Mon Nov 3 23:10:23 2025
    From Newsgroup: comp.lang.misc

    On Mon, 3 Nov 2025 14:55:31 -0600, BGB wrote:

    Some of my past languages had both lexical and dynamic scoping (with
    lexical as the default). This can make more sense.

    Dynamic binding simply isnrCOt that useful. Lexical binding just works more naturally the way people expect.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From John Ames@commodorejohn@gmail.com to comp.lang.misc on Mon Nov 3 15:56:48 2025
    From Newsgroup: comp.lang.misc

    On Mon, 3 Nov 2025 14:05:12 -0600
    BGB <cr88192@gmail.com> wrote:

    And/or that anybody using BASIC in a modern context is gonna be
    using something like FreeBASIC, which is a vastly improved and
    perfectly reasonable little language compared to the early
    microcomputer BASICs.

    In one project, I ended up implementing a BASIC dialect partly
    inspired by early Unstructured BASIC dialects. Though, in this case,
    this was more because it allowed writing an interpreter in roughly
    1000 lines of C.

    Though, I ended up extending it in some non-standard ways that didn't
    really match up with either 80s BASIC, or the direction the language
    went in the 90s.

    But, the use-case I had didn't really need it to go in the 90s
    direction, and keeping the interpreter small also did not favor going
    that direction (where the 90s dialects more went in the direction of
    trying to turn it into a more general purpose programming language).

    Yeah, there've been a number of odd little one-off BASICs over the
    years. ASIC was one that struck me as particularly kooky - a shareware implementation that could compile to COM/EXE, but which lacked a number
    of operators/control structures :/

    https://en.wikipedia.org/wiki/ASIC_programming_language

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From BGB@cr88192@gmail.com to comp.lang.misc on Tue Nov 4 12:02:22 2025
    From Newsgroup: comp.lang.misc

    On 11/3/2025 5:10 PM, Lawrence DrCOOliveiro wrote:
    On Mon, 3 Nov 2025 14:55:31 -0600, BGB wrote:

    Some of my past languages had both lexical and dynamic scoping (with
    lexical as the default). This can make more sense.

    Dynamic binding simply isnrCOt that useful. Lexical binding just works more naturally the way people expect.


    I am not saying that Dynamic is preferable to Lexical by any means, from
    a semantics POV, but if the goal is to implement a semi-practical
    interpreter while also using less code (and with less risk of memory
    leaks), it can make sense.


    There are a few contexts where dynamic scoping can be useful as well,
    just usually not as the default.

    Say, for example, if you had something analogous to stdin/stdout as dynamically scoped variables, then it makes IO redirection easy.
    Likewise for other sorts of state that (in C) are often held in global variables.


    They can also serve a similar role as TLS variables (though, in a more advanced compiler, they were usually implemented as an additional local save/restore mechanism on top of TLS variables). In this case, the role
    of dynamic variables can be overloaded to that of TLS variables.

    One can debate how to best specify it.
    dynvar x; //one possibility for a language like this
    //if 'var' became lexically scoped
    dynamic var x; //my original script language
    dynamic int x; //BS2
    __dynamic int x; //In C mode in BGBCC
    _Thread_local int x; //does basically same thing as __dynamic here

    Can note that C normally uses a 2-level scope scheme:
    Global variables;
    Local Variables;
    In this case, lambdas could either capture by-reference or by value.

    In this case, a C-like scoping model could also be implemented in
    relatively little additional code (probably with lambdas just bulk
    copying all the captured local variables; could ignore both dynamic and
    global variables if going to a C-like model).

    At the moment, "function()" doesn't capture anything.



    Though, if I get around to it, lexical scoping and "switch()" would
    probably be pretty high on the "makes sense to add" list.

    Though, the handling of switch would probably also be "kinda crap":
    Just walk downwards, skipping lines until the correct case label is encountered, then start running until a "break;" or "return();" is encountered.


    May also need to implement some form of memory management. Most likely
    options ATM are slabs and zone allocation. A traditional garbage
    collector would be asking too much here, and reference counting is a pain.

    In a zone allocator, likely any newly created objects would be initially
    in an "eval" zone, and when assigned to a global variable (or into an
    object in the "global" zone) would be re-tagged as global (with a
    graph-walk to also re-assign any pointed to objects). Once eval
    terminates, any variables still in the eval zone are destroyed.

    Would likely use a zone tagging scheme similar to that used in the Doom engine, where lower-numbered zones are "more global" (so zone promotion
    merely sets it to the lowest number).


    Still, TBD.

    ...

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.lang.misc on Tue Nov 4 20:32:24 2025
    From Newsgroup: comp.lang.misc

    On Tue, 4 Nov 2025 12:02:22 -0600, BGB wrote:

    Say, for example, if you had something analogous to stdin/stdout as dynamically scoped variables, then it makes IO redirection easy.

    A better technique would be to save the current values of stdin and
    stdout, substitute different I/O streams during the execution of the inner code, then restore the outer values before returning. Offers better
    control and generalizes more readily.

    They can also serve a similar role as TLS variables (though, in a more advanced compiler, they were usually implemented as an additional local save/restore mechanism on top of TLS variables). In this case, the role
    of dynamic variables can be overloaded to that of TLS variables.

    Now yourCOre trying to justify one mechanism by mixing it up with a
    different one.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Kragen Javier Sitaker@kragen@canonical.org to comp.lang.misc on Thu Aug 27 20:09:22 2026
    From Newsgroup: comp.lang.misc

    Lawrence DrCOOliveiro <ldo@nz.invalid> writes:
    The most popular answer was JavaScript, with 4 votes. There were 2
    votes for PHP, and one each for Lisp and Python.

    This sounds like a pretty small number of votes. Back in 02017, before descending into racketeering and criminal copyleft violation, Stack
    Overflow wrote a post about rCLthe most disliked programming languagesrCY: <https://stackoverflow.blog/2017/10/31/disliked-programming-languages/>

    This was based on each user account adding tags to rCLlikedrCY and rCLdislikedrCY lists. The proportionally most disliked (over 15%) were:

    - #perl
    - #delphi
    - #vba

    And then, far behind those, between 5% and 10%:

    - #php
    - #objective-c
    - #coffeescript
    - #ruby

    Nothing else was really close, although the C# confidence interval does
    barely overlap 5% from below. Python was down around 1.5% dislikes.

    One mentioned COBOL (which for him was worse than Fortran), but nobody thought of BASIC. I guess that is now so far in the past, many among
    the interviewees wouldnrCOt even have any memories of using it ...

    I didnrCOt think it was controversial that COBOL was worse than Fortran?
    VBA was #3 on SOrCOs list.

    Kragen
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Kragen Javier Sitaker@kragen@canonical.org to comp.lang.misc on Thu Aug 27 21:11:55 2026
    From Newsgroup: comp.lang.misc

    John Ames <commodorejohn@gmail.com> writes:
    Another language that feels needlessly gross and tedious is Java -
    (...) but then it's somehow still the best solution we've got for write-once-run-anywhere development, which is maddening :/

    I think that may have been true around 02001, when J2ME could run more
    or less normal Java code on *all kinds* of fairly small feature phones.
    But it never made the leap to smaller microcontrollers like the AVR,
    feature phones evaporated, feature-phone-sized microcontrollers never
    acquired J2ME support, and now in 02026 we have a number of better
    solutions: C under Unix, portable C, Rust, Python, JavaScript, Wasm,
    Godot, and Golang.

    (In the following, by rCLUnixrCY I mean GNU/Linux, FreeBSD, and similar systems, but not Android, Microsoft Windows, macOS, iOS, or System/360.)

    - C under Unix, because you can run QEMU on just about anything that
    runs Java. If you run Microsoft Windows, it ships with WSL2, so this
    works out of the box. Unless you want a GUI, in which case you still
    probably want to run QEMU.

    Android might be the main exception; it ships with an incompatible
    implementation of Java (without, for example, AWT), and although you
    may be able to recompile Unix software for it, it can be difficult.
    IrCOm currently trying out the rCLLimbo x86 PC EmulatorrCY QEMU package from
    F-Droid, and IrCOve gotten SeaBIOS to complain that it canrCOt find an OS
    image, but I havenrCOt gotten Linux to boot in it yet.

    Unix doesnrCOt run on small microcontrollers, but C sure does. With
    sdcc you can even run it on a PIC or an 8051, though you wouldnrCOt want
    to.

    - Portable C, for example with wxWindows or Qt. For libraries rather
    than applications, this has historically been a much better choice
    than Java, because you can call it through FFIs from other languages.
    Of course, you can also write nonportable C, but you donrCOt have to.

    WORA applications written this way (and in portable C++) historically
    vastly outnumbered WORA applications written in any other way,
    including Java, but now JS has taken the crown.

    - Rust seems as easy as C to call through FFIs, and itrCOs almost as
    portable, and significantly less error-prone. It seems uglier and
    clumsier, though, and its support on microcontrollers is rocky and
    unpredictable.

    - Python, which ships with somewhat adequate web server support, and
    Tkinter, which is a somewhat adequate GUI library. ItrCOs relatively
    easy to write a Python program (GUI, command-line, or HTTP server) and
    have it run consistently on Unix, Microsoft Windows, or macOS; and
    lots of Python libraries can also run on microcontrollers with
    MicroPython/CircuitPython.

    As with C, you can write nonportable Python, but thererCOs much less
    temptation to do so, because the portable standard-library API is
    significantly more complete, including things like filesystem access,
    multithreading, asynchronous I/O, and Tkinter.

    This is a much less compelling choice in the last several years since
    the Python maintainers have adopted a policy of deliberately breaking
    standard library backward compatibility in every point release.

    WORA GUI applications written in Python include Calibre, and there are
    a vast number of WORA applications that run as web services.

    - JavaScript reduces the barrier for running your software on any
    cellphone or other personal computer about as far as possiblerCerCorCejust
    click on a link, and your JavaScript application starts running. The
    performance isnrCOt as bad as yourCOd expect, although JS authors
    habitually squander performance, and the text handing isnrCOt nearly as
    bad as PythonrCOs or CrCOs.

    This has been the overwhelmingly most popular choice for WORA for the
    last 15 years.

    JS has the unique advantage that you get portable access to not just a
    basic GUI library, but platform features like 3-D acceleration,
    multitouch, cameras, audio input and output, a form of internet access
    (though not plain sockets), the clipboard, and NFC (except on iOS).

    The browser console and inspector also represent a kind of live
    interactivity and debuggability that is really lacking in Java, C,
    Rust, or even Python (though a Jupyter-style notebook interface would
    improve the browser console further.) This is a huge advantage for JS
    in my book.

    Microcontroller-capable JS engines include Moddable (XS) and
    MicroQuickJS; maybe also Duktape, JerryScript, MuJS, and Hermes, but
    IrCOm not sure. And JS is maybe the most popular language for writing
    HTTP server apps in with Node and Deno. I donrCOt think thererCOs a
    Tkinter-like option for writing non-browser GUI apps, unless you count
    Electron, which is basically just a browser without an address bar.

    People who hate dynamic typing will appreciate TypeScript, a
    statically-typed dialect of JS.

    - Wasm (WebAssembly) also runs in all the mainstream browsers, as well
    as some non-browser runtimes, and itrCOs a much easier compilation
    target for things like C than JS is, and gets much better performance
    as well, like, double-digit percent overhead rather than
    small-integer-multiple overhead. It doesnrCOt support multithreading
    (or, it sort of supports multithreading if you bend over backwards
    enoughrCerCorCeGodot 4 supports this option, but you have to configure your
    web server specially).

    You can compile just about anything to Wasm that you can compile to
    native code, using Emscripten, which uses LLVM. But, when itrCOs
    running in browsers, you rely on JavaScript for access to any platform
    APIs. This can be annoying, but it isnrCOt really that restrictive,
    since JS has access to 53 tonnes of platform APIs, as mentioned above.

    - The Godot game engine, like C, Rust, and Python, doesnrCOt have any
    artificial sandbox limitations like Wasm, JS, and Java, and games
    written in it tend to run unchanged across Unix, macOS, Android, iOS,
    Wasm, and even Microsoft Windows, even when they use advanced
    graphical capabilities like custom 3-D shaders. The development
    environment is also rCLliverCY in a way that exceeds even JSrCOs liveness.

    (ThererCOs also very limited support for something called rCLvisionOSrCY.)

    Godot 3 can export to single-threaded Wasm that can be run from any
    web server, but Godot 4 requires you to configure the web server in a
    weird way so that Wasm can implement a sort of multithreading.

    - Golang, like Python, has an API thatrCOs significantly more stable
    across platforms than CrCOs, and unlike Python, it isnrCOt totally
    screwing the pooch when it comes to text handling and library API
    stability. It has much better performance than Python or JS, and is,
    to my eyes anyway, more readable. Because of its Plan9 heritage,
    cross-compiling for multiple platforms is trivial, but I donrCOt think
    it supports small microcontrollers at all.

    IrCOve never heard of a successful Golang GUI app (itrCOs used almost
    exclusively on web servers) but apparently thererCOs a Golang widget
    toolkit now called Fyne, which supports Android, iOS, Unix, and
    Microsoft Windows.

    The above probably isnrCOt news to most people reading this post, unless I
    got something wrong, in which case please correct me in the traditional
    Usenet fashion.

    Kragen
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.lang.misc on Fri Aug 28 04:42:44 2026
    From Newsgroup: comp.lang.misc

    On Thu, 27 Aug 2026 21:11:55 -0300, Kragen Javier Sitaker wrote:

    I think that may have been true around 02001, when J2ME could run
    more or less normal Java code on *all kinds* of fairly small feature
    phones.

    Google didnrCOt use J2ME for Android because it had an inadequate
    protection model, and also Oracle were demanding too much money for
    it.

    But J2SE was available in an open-source form, namely OpenJDK. So they
    adapted that instead.

    Android might be the main exception; it ships with an incompatible implementation of Java (without, for example, AWT), and although you
    may be able to recompile Unix software for it, it can be difficult.

    You can run regular Linux distros under Android now.

    Unix doesnrCOt run on small microcontrollers, but C sure does. With
    sdcc you can even run it on a PIC or an 8051, though you wouldnrCOt
    want to.

    How about a Unix-like system that runs on a Z80 microprocessor: <https://www.dougbraun.com/uzi.html>.

    This is a much less compelling choice in the last several years
    since the Python maintainers have adopted a policy of deliberately
    breaking standard library backward compatibility in every point
    release.

    In what way?
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From John Ames@commodorejohn@gmail.com to comp.lang.misc on Fri Aug 28 09:59:51 2026
    From Newsgroup: comp.lang.misc

    On Thu, 27 Aug 2026 21:11:55 -0300
    Kragen Javier Sitaker <kragen@canonical.org> wrote:

    Another language that feels needlessly gross and tedious is Java -
    (...) but then it's somehow still the best solution we've got for write-once-run-anywhere development, which is maddening :/

    I think that may have been true around 02001, when J2ME could run more
    or less normal Java code on *all kinds* of fairly small feature
    phones. But it never made the leap to smaller microcontrollers like
    the AVR, feature phones evaporated, feature-phone-sized micro-
    controllers never acquired J2ME support, and now in 02026 we have a
    number of better solutions: C under Unix, portable C, Rust, Python, JavaScript, Wasm, Godot, and Golang.

    Yes, things didn't quite go according to plan for them in the long run.
    I s'pose I should clarify that I was thinking of write-once-run-
    anywhere more in terms of GUI development and redistributable binaries;
    it's true that C/stdlib is about as portable as it gets, and C/POSIX
    very nearly so, but that takes a separate build step for every target
    platform (and in the freenix world, every change in the ABI.) Which is certainly possible provided the application is open-source, but would
    be nice not to *have* to do. And once you get the various GUI toolkits involved, the problem becomes even worse :/

    Java, on paper, promised a nice solution to that problem, and for a
    brief moment it even looked like a viable one; unfortunately, it went
    astray pretty quickly, and never recovered. More unforunately still,
    nothing since has really filled the same niche, and so it's still the
    best we've got in that regard...which, yes, is maddening.

    (Also: 02026 = 1046? My condolences on the loss of Bishops Gerard and Bestricus...unless you're rooting for Vata & co.)

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.lang.misc on Fri Aug 28 22:37:00 2026
    From Newsgroup: comp.lang.misc

    On Fri, 28 Aug 2026 16:43:56 -0300, Kragen Javier Sitaker wrote:

    Lawrence DrCOOliveiro <ldo@nz.invalid> writes:

    But J2SE was available in an open-source form, namely OpenJDK. So
    they adapted that instead.

    With respect, I think you may have gotten this wrong. Originally
    they used Apache Harmony (presumably they preferred its non-copyleft licensing) but switched to OpenJDK in 02016 in response to the
    Oracle lawsuit <https://arstechnica.com/tech-policy/2016/01/android-n-switches-to-openjdk-google-tells-oracle-it-is-protected-by-the-gpl/>

    You are mixing up the language implementation with the library
    implementation.

    On Thu, 27 Aug 2026 21:11:55 -0300, Kragen Javier Sitaker wrote:

    This is a much less compelling choice in the last several years
    since the Python maintainers have adopted a policy of deliberately
    breaking standard library backward compatibility in every point
    release.

    In what way?

    They call it rCLremoving dead batteries from the standard libraryrCY ...

    So they donrCOt want to keep accumulating legacy baggage that just adds
    to the ongoing support burden. Every open-source project does that.
    The key is to support the important stuff that people care about.

    Does anybody still want to use the rCLcgirCY module? Sun rCLaurCY file format? A Unix password encryption library that doesnrCOt keep up with current
    password encryption formats?

    This makes it easy to encounter situations like this poster about
    KittenTTS did, who says all of their Python versions on their various machines are either too old or too new: <https://news.ycombinator.com/item?id=44808718>

    I would like to know what code exactly they are referring to.

    Contrast the stance of the Golang development team: <https://go.dev/doc/go1compat>

    Quote: rCLit is impossible to guarantee that no future change will break
    any programrCY.

    Not really a different stance at all.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.lang.misc on Sat Aug 29 01:42:37 2026
    From Newsgroup: comp.lang.misc

    On Fri, 28 Aug 2026 21:03:13 -0300, Kragen Javier Sitaker wrote:

    However, their motivation, understandable though it is, is irrelevant to
    my point, which is that as a result of this policy, Python has, in
    practice, gone from being one of the *most* portable languages to one of
    the *least*; you canrCOt even reliably run a Python application you wrote
    on Ubuntu 25.10 (Python 3.13) on Ubuntu 26.04 (Python 3.14).

    I seriously doubt that. They only remove legacy stuff after a long
    period of deprecation.

    Lawrence DrCOOliveiro <ldo@nz.invalid> writes:

    Does anybody still want to use the rCLcgirCY module?

    Yes. Although CGI was pretty costly when it went out of style in the
    01990s, hardware has improved dramatically, and CGI can now handle
    half a billion hits per second on one server <https://jacob.gold/posts/serving-half-billion-requests-with-rust-cgi/>
    which is enough for all but the biggest public websites.

    But it still suffers from the same old limits. No serious web
    developer would want to use it (or even rCLhigher-performancerCY
    equivalents, like FastCGI) nowadays.

    I have three or four CGI scripts written in Python that IrCOve been
    using for many years without having to maintain them.

    Sun rCLaurCY file format?

    Yes, obviously? There are plenty of audio data files from 30 years ago
    in .au format.

    Leave it to purpose-built tools like FFmpeg to handle conversions on
    such old formats. TheyrCOre easy enough to invoke from a Python script,
    if you really need to get Python involved.

    And what about the others? aifc, chunk? asynchat, asyncore? nis,
    xdrlib? spwd? msilib, anybody?
    --- Synchronet 3.22a-Linux NewsLink 1.2