• Re: C/C++ timeline (was Re: Python: A Little Trick For Every Need)

    From The Natural Philosopher@tnp@invalid.invalid to comp.os.linux.misc on Sat Feb 7 11:53:29 2026
    From Newsgroup: comp.os.linux.misc

    On 06/02/2026 21:55, John Ames wrote:
    Java is just arbitrary and confusing for no reason.

    So is the real world
    --
    Religion is regarded by the common people as true, by the wise as
    foolish, and by the rulers as useful.

    (Seneca the Younger, 65 AD)


    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From Richard Kettlewell@invalid@invalid.invalid to comp.os.linux.misc on Sat Feb 7 15:36:18 2026
    From Newsgroup: comp.os.linux.misc

    John Ames <commodorejohn@gmail.com> writes:
    Richard Kettlewell <invalid@invalid.invalid> wrote:

    I donrCOt get on well with Java either, but I think the last two
    examples are written in an unnecessarily obscure fashion. I think you
    would normally write the following:

    Integer a = 2, b = 3;
    Integer c = Integer.max(a, b);

    ...which is certainly a trifle verbose, but not actively misleading.

    I could've been clearer, I s'pose, but it was my point that there are,
    for a random subset of math functions, multiple ways to write the same
    thing, using classes with no direct relationship - java.lang.Math isn't
    a subclass of java.lang.Number and its subclasses, nor the other way
    around, nor is there some kind of Math<T> interface that they both
    implement. (In fact, these methods aren't even part of Number - they
    only belong to its subclasses individually!)

    Why, then, do they duplicate functionality? Why some methods and not
    others? Why are the methods for specific Number types static instead of specific to the object, so that one could at least have Math.round(num)
    for arbitrary number variables, but Double.round() for reflexive
    rounding of a specific Double object?

    It's just arbitrary and weird.

    ItrCOs not like Java has a monopoly on being arbitrary and weird!

    int fputs(const char *s, FILE *stream);
    int fprintf(FILE *stream, const char *format, ...);

    Whether the stream argument is first or last depends which function
    yourCOre using.

    Another:

    int putc(int c, FILE *stream);
    int fputc(int c, FILE *stream);

    Two interfaces with the same name, except putc is allowed to be a macro
    and evaluate rCystreamrCO more than one. In practice it usually isnrCOt for reasons related to threading and if you do want an optimized version the language has supported inline functions for the last quarter century[1],
    but we still have this weirdness in the standardized API due to the
    limitations of 1970s compiler capabilities.

    Another:

    printf is equivalent to fprintf but with stream=stdout. But puts is
    _not_ equivalent to fputs but with stream=stdout, it adds an extra
    newline.

    Another:

    Inside a function, static means an object has static storage duration
    (and this seems etymologically justifiable); outside a function it means
    it has internal linkage, which feels like they just need a keyword and
    picked one that didnrCOt yet have a meaning in that slot. (Subsequent additional meanings of rCystaticrCO continue the pattern...)


    IrCOd suggest that any language that doesnrCOt start out with odd corners
    like this will grow them over time as it responds to new thinking, new requirements, etc.


    [1] makes me wonder when explicitly-marked inline functions were
    invented. Maybe a question for the C++ timeline thread.
    --
    https://www.greenend.org.uk/rjk/
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From rbowman@bowman@montana.com to comp.os.linux.misc on Sat Feb 7 20:49:13 2026
    From Newsgroup: comp.os.linux.misc

    On Sat, 07 Feb 2026 15:36:18 +0000, Richard Kettlewell wrote:


    ItrCOs not like Java has a monopoly on being arbitrary and weird!

    int fputs(const char *s, FILE *stream);
    int fprintf(FILE *stream, const char *format, ...);

    Whether the stream argument is first or last depends which function
    yourCOre using.

    After all these years I use 'man fputs' more than I should. Then you throw
    in the similar functions that take an int file descriptor rather than a
    FILE*.

    I'd still rather deal with that arbitrariness than C++'s streams.
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From Charlie Gibbs@cgibbs@kltpzyxm.invalid to comp.os.linux.misc on Sat Feb 7 21:26:55 2026
    From Newsgroup: comp.os.linux.misc

    On 2026-02-07, rbowman <bowman@montana.com> wrote:

    On Sat, 07 Feb 2026 15:36:18 +0000, Richard Kettlewell wrote:

    ItrCOs not like Java has a monopoly on being arbitrary and weird!

    int fputs(const char *s, FILE *stream);
    int fprintf(FILE *stream, const char *format, ...);

    Whether the stream argument is first or last depends which function
    yourCOre using.

    After all these years I use 'man fputs' more than I should. Then you throw in the similar functions that take an int file descriptor rather than a FILE*.

    I'd still rather deal with that arbitrariness than C++'s streams.

    I deal with those by remembering that fputs() can have any number
    of arguments, so we might as well get the file pointer out there first.
    On the other hand, putc() only has one argument, so fputc() adds the
    file pointer at the end. Then I just have to remember how the arguments
    go with fgets() - and I've replaced it with getline(), which is
    quite similar. I always read strings and parse them myself, so
    that about covers I/O for me.
    --
    /~\ Charlie Gibbs | Growth for the sake of
    \ / <cgibbs@kltpzyxm.invalid> | growth is the ideology
    X I'm really at ac.dekanfrus | of the cancer cell.
    / \ if you read it the right way. | -- Edward Abbey
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.linux.misc on Sat Feb 7 22:00:18 2026
    From Newsgroup: comp.os.linux.misc

    On Sat, 07 Feb 2026 21:26:55 GMT, Charlie Gibbs wrote:

    I deal with those by remembering that fputs() can have any number
    of arguments, so we might as well get the file pointer out there first.

    Er, no, it doesnrCOt.
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From rbowman@bowman@montana.com to comp.os.linux.misc on Sun Feb 8 01:55:27 2026
    From Newsgroup: comp.os.linux.misc

    On Sat, 07 Feb 2026 21:26:55 GMT, Charlie Gibbs wrote:

    On 2026-02-07, rbowman <bowman@montana.com> wrote:

    On Sat, 07 Feb 2026 15:36:18 +0000, Richard Kettlewell wrote:

    ItrCOs not like Java has a monopoly on being arbitrary and weird!

    int fputs(const char *s, FILE *stream);
    int fprintf(FILE *stream, const char *format, ...);

    Whether the stream argument is first or last depends which function
    yourCOre using.

    After all these years I use 'man fputs' more than I should. Then you
    throw in the similar functions that take an int file descriptor rather
    than a FILE*.

    I'd still rather deal with that arbitrariness than C++'s streams.

    I deal with those by remembering that fputs() can have any number of arguments, so we might as well get the file pointer out there first. On
    the other hand, putc() only has one argument, so fputc() adds the file pointer at the end. Then I just have to remember how the arguments go
    with fgets() - and I've replaced it with getline(), which is quite
    similar. I always read strings and parse them myself, so that about
    covers I/O for me.

    man fputs

    SYNOPSIS
    #include <stdio.h>

    int fputc(int c, FILE *stream);
    int putc(int c, FILE *stream);
    int putchar(int c);

    int fputs(const char *restrict s, FILE *restrict stream);
    int puts(const char *s);



    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From Nuno Silva@nunojsilva@invalid.invalid to comp.os.linux.misc on Sun Feb 8 08:30:31 2026
    From Newsgroup: comp.os.linux.misc

    On 2026-02-08, rbowman wrote:

    On Sat, 07 Feb 2026 21:26:55 GMT, Charlie Gibbs wrote:

    On 2026-02-07, rbowman <bowman@montana.com> wrote:

    On Sat, 07 Feb 2026 15:36:18 +0000, Richard Kettlewell wrote:

    ItrCOs not like Java has a monopoly on being arbitrary and weird!

    int fputs(const char *s, FILE *stream);
    int fprintf(FILE *stream, const char *format, ...);

    Whether the stream argument is first or last depends which function
    yourCOre using.

    After all these years I use 'man fputs' more than I should. Then you
    throw in the similar functions that take an int file descriptor rather
    than a FILE*.

    I'd still rather deal with that arbitrariness than C++'s streams.

    I deal with those by remembering that fputs() can have any number of
    arguments, so we might as well get the file pointer out there first. On
    the other hand, putc() only has one argument, so fputc() adds the file
    pointer at the end. Then I just have to remember how the arguments go
    with fgets() - and I've replaced it with getline(), which is quite
    similar. I always read strings and parse them myself, so that about
    covers I/O for me.

    man fputs

    (It looks to me, albeit still undercaffeinated, that Charlie simply mixed/mistyped that function name. Could it perhaps be meant to be
    fprintf()?)

    SYNOPSIS
    #include <stdio.h>

    int fputc(int c, FILE *stream);
    int putc(int c, FILE *stream);
    int putchar(int c);

    int fputs(const char *restrict s, FILE *restrict stream);
    int puts(const char *s);



    --
    Nuno Silva
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From Richard Kettlewell@invalid@invalid.invalid to comp.os.linux.misc on Sun Feb 8 11:04:48 2026
    From Newsgroup: comp.os.linux.misc

    rbowman <bowman@montana.com> writes:
    On Sat, 07 Feb 2026 15:36:18 +0000, Richard Kettlewell wrote:
    ItrCOs not like Java has a monopoly on being arbitrary and weird!

    int fputs(const char *s, FILE *stream);
    int fprintf(FILE *stream, const char *format, ...);

    Whether the stream argument is first or last depends which function
    yourCOre using.

    After all these years I use 'man fputs' more than I should. Then you
    throw in the similar functions that take an int file descriptor rather
    than a FILE*.

    The latter isnrCOt a problem; thererCOs two IO APIs, one being implemented
    on top of the other. If a programmer canrCOt remember which theyrCOre using right now then itrCOs time to step away from the keyboard and have more
    coffee (or less coffee, as the case may be).

    I'd still rather deal with that arbitrariness than C++'s streams.

    iostreams was an amazing multi-faceted blunder, for sure.
    --
    https://www.greenend.org.uk/rjk/
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From Charlie Gibbs@cgibbs@kltpzyxm.invalid to comp.os.linux.misc on Mon Feb 9 06:53:53 2026
    From Newsgroup: comp.os.linux.misc

    On 2026-02-08, Nuno Silva <nunojsilva@invalid.invalid> wrote:

    On 2026-02-08, rbowman wrote:

    On Sat, 07 Feb 2026 21:26:55 GMT, Charlie Gibbs wrote:

    I deal with those by remembering that fputs() can have any number of
    arguments, so we might as well get the file pointer out there first. On
    the other hand, putc() only has one argument, so fputc() adds the file
    pointer at the end. Then I just have to remember how the arguments go
    with fgets() - and I've replaced it with getline(), which is quite
    similar. I always read strings and parse them myself, so that about
    covers I/O for me.

    man fputs

    (It looks to me, albeit still undercaffeinated, that Charlie simply mixed/mistyped that function name. Could it perhaps be meant to be fprintf()?)

    Oops. Right you are. See my previous reply.
    --
    /~\ Charlie Gibbs | Growth for the sake of
    \ / <cgibbs@kltpzyxm.invalid> | growth is the ideology
    X I'm really at ac.dekanfrus | of the cancer cell.
    / \ if you read it the right way. | -- Edward Abbey
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From Charlie Gibbs@cgibbs@kltpzyxm.invalid to comp.os.linux.misc on Mon Feb 9 06:53:54 2026
    From Newsgroup: comp.os.linux.misc

    On 2026-02-07, Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:

    On Sat, 07 Feb 2026 21:26:55 GMT, Charlie Gibbs wrote:

    I deal with those by remembering that fputs() can have any number
    of arguments, so we might as well get the file pointer out there first.

    Er, no, it doesnrCOt.

    Oops, I was thinking of fprintf(). As for [f]puts(), it's
    like [f]putc(); the first or only argument is the data,
    so if there's a file pointer it has to come second.
    --
    /~\ Charlie Gibbs | Growth for the sake of
    \ / <cgibbs@kltpzyxm.invalid> | growth is the ideology
    X I'm really at ac.dekanfrus | of the cancer cell.
    / \ if you read it the right way. | -- Edward Abbey
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From John Ames@commodorejohn@gmail.com to comp.os.linux.misc on Mon Feb 9 09:21:25 2026
    From Newsgroup: comp.os.linux.misc

    On Sat, 7 Feb 2026 11:53:29 +0000
    The Natural Philosopher <tnp@invalid.invalid> wrote:

    Java is just arbitrary and confusing for no reason.

    So is the real world

    Yes, and I get quite enough of *that* from running in meatspace, thankyouverymuch. Don't need *more* of it in environments where I
    actually have a choice.

    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From John Ames@commodorejohn@gmail.com to comp.os.linux.misc on Fri Feb 13 11:30:12 2026
    From Newsgroup: comp.os.linux.misc

    On Sat, 07 Feb 2026 15:36:18 +0000
    Richard Kettlewell <invalid@invalid.invalid> wrote:
    It's just arbitrary and weird.

    ItrCOs not like Java has a monopoly on being arbitrary and weird!

    [...]

    IrCOd suggest that any language that doesnrCOt start out with odd corners like this will grow them over time as it responds to new thinking, new requirements, etc.
    True enough, and it is to some degree a question of taste - but Java
    does, to my mind, strike a particular balance of vices that remind me
    of the main thrust of Kernighan's criticism of Pascal: not only does it
    suffer from misfeatures and frustrations, but it provides no real way
    to work around them from within itself.
    To a lesser extent, at least; the core language *does* allow the
    programmer to define new constructs that can be used (to some extent)
    in place of existing ones, whereas vanilla Pascal didn't. If I don't
    like the organization of the Math class, f'rexample, I'm free create my
    own. But there are practical limits to this - I can't snap my fingers
    and make everything *else* in the standard library recognize MyMath's
    way of doing things. The deeper some annoyance lies within the system,
    the more you'd have to uproot in order to fix it.
    And other things *can't* be solved by roll-your-own means. You can't
    make it less logorrheic or work around the lack of global functions by:
    #define print System.out.println
    ...or somesuch, because Gosling & co. didn't see fit to provide a pre- processor. You could use an external preprocessor, but you'd have to
    figure out how to fit it into the toolchain yourself.
    All languages are to some extent a reflection of their designers' pre- conceptions about programming (except for the occasional committe-born elephantine monstrosity that tries to encompass every paradigm & please everyone, and is inevitably used by noone,) but the better ones show at
    least some awareness of the fact that different people will do things differently. Java isn't as blinkered as Pascal was back in the day, but
    it still strikes me as something that's really only designed for people
    who think like its designers.
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From Richard Kettlewell@invalid@invalid.invalid to comp.os.linux.misc on Fri Feb 13 21:40:04 2026
    From Newsgroup: comp.os.linux.misc

    John Ames <commodorejohn@gmail.com> writes:
    Richard Kettlewell <invalid@invalid.invalid> wrote:
    IrCOd suggest that any language that doesnrCOt start out with odd corners
    like this will grow them over time as it responds to new thinking, new
    requirements, etc.

    True enough, and it is to some degree a question of taste - but Java
    does, to my mind, strike a particular balance of vices that remind me
    of the main thrust of Kernighan's criticism of Pascal: not only does it suffer from misfeatures and frustrations, but it provides no real way
    to work around them from within itself.

    To a lesser extent, at least; the core language *does* allow the
    programmer to define new constructs that can be used (to some extent)
    in place of existing ones, whereas vanilla Pascal didn't. If I don't
    like the organization of the Math class, f'rexample, I'm free create my
    own. But there are practical limits to this - I can't snap my fingers
    and make everything *else* in the standard library recognize MyMath's
    way of doing things. The deeper some annoyance lies within the system,
    the more you'd have to uproot in order to fix it.

    Actually you can do that in Java, in at least a couple of ways.

    https://stackoverflow.com/questions/33631419/replace-a-class-within-the-java-class-library-with-a-custom-version
    --
    https://www.greenend.org.uk/rjk/
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.linux.misc on Fri Feb 13 21:48:03 2026
    From Newsgroup: comp.os.linux.misc

    On Fri, 13 Feb 2026 11:30:12 -0800, John Ames wrote:

    #define print System.out.println

    ...or somesuch, because Gosling & co. didn't see fit to provide a pre- processor.

    Or typedefs.
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From rbowman@bowman@montana.com to comp.os.linux.misc on Sat Feb 14 00:41:21 2026
    From Newsgroup: comp.os.linux.misc

    On Fri, 13 Feb 2026 11:30:12 -0800, John Ames wrote:

    True enough, and it is to some degree a question of taste - but Java
    does, to my mind, strike a particular balance of vices that remind me of
    the main thrust of Kernighan's criticism of Pascal: not only does it
    suffer from misfeatures and frustrations, but it provides no real way to
    work around them from within itself.

    I had hopes for Java in the late '90s. 'Java in a Nutshell', 2nd edition
    iirc, was fairly concise. You'd need a damn big nut for the 7th edition. I
    was working with the AVR processors so my 'hello world' project was a
    simple emulator. Not happening in Java.

    AWT wasn't bad but then they introduced Swing. The mantra at the time if
    you were upset at the glacial performance was to get a newer, faster
    machine, Right.

    I did like Visual J++, but its relationship to Sun Java was loose, leading
    to Sun shutting it down. It took a while but Microsoft eventually came up
    with C#, which is what Java (and Visual C++) should have been.

    We had one Java application that suffered from extensive mission creep
    over the years. I seldom worked on the code and always did with my fingers crossed.
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From Chris Ahlstrom@OFeem1987@teleworm.us to comp.os.linux.misc on Sat Feb 14 07:06:17 2026
    From Newsgroup: comp.os.linux.misc

    Lawrence DrCOOliveiro wrote this post by blinking in Morse code:

    On Fri, 13 Feb 2026 11:30:12 -0800, John Ames wrote:

    #define print System.out.println

    ...or somesuch, because Gosling & co. didn't see fit to provide a pre-
    processor.

    Or typedefs.

    using block = std::vector<std::array<std::vector<unsigned char>>>

    Heh heh.

    But this is a Linux group.
    --
    FORTUNE'S RANDOM QUOTES FROM MATCH GAME 75, NO. 1:

    Gene Rayburn: We'd like to close with a thought for the day, friends ---
    something ...
    Someone: (interrupting) Uh-oh
    Gene Rayburn: ...pithy, full of wisdom --- and we call on the Poet
    Laureate, Nipsey Russell
    Nipsey Russell: The young people are very different today, and there is
    one sure way to know: Kids used to ask where they came
    from, now they'll tell you where you can go.
    All: (laughter)
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From Chris Ahlstrom@OFeem1987@teleworm.us to comp.os.linux.misc on Sat Feb 14 07:16:54 2026
    From Newsgroup: comp.os.linux.misc

    rbowman wrote this post by blinking in Morse code:

    On Fri, 13 Feb 2026 11:30:12 -0800, John Ames wrote:

    True enough, and it is to some degree a question of taste - but Java
    does, to my mind, strike a particular balance of vices that remind me of
    the main thrust of Kernighan's criticism of Pascal: not only does it
    suffer from misfeatures and frustrations, but it provides no real way to
    work around them from within itself.

    I had hopes for Java in the late '90s. 'Java in a Nutshell', 2nd edition iirc, was fairly concise. You'd need a damn big nut for the 7th edition. I was working with the AVR processors so my 'hello world' project was a
    simple emulator. Not happening in Java.

    AWT wasn't bad but then they introduced Swing. The mantra at the time if
    you were upset at the glacial performance was to get a newer, faster machine, Right.

    I did like Visual J++, but its relationship to Sun Java was loose, leading to Sun shutting it down. It took a while but Microsoft eventually came up with C#, which is what Java (and Visual C++) should have been.

    We had one Java application that suffered from extensive mission creep
    over the years. I seldom worked on the code and always did with my fingers crossed.

    Our project manager had trouble getting C++ coders, so they
    decided to add Java to the mix. They hired a whizbang Java guy.
    For some reason he had a complex about "linkers". We added a
    couple more Java guys. Once things got going, the whizbang Java
    guy got an inheritance and quit (iirc).

    Then we lost the contract to a lower bid. From what I heard, the
    new group didn't like our way and went some other way.

    I never got into Java, but got into Maven and used it to build
    both the Java and C++ code under control of Hudson (or was it
    Jenkins?)

    com.company.myapp.myfrigginclass

    Now that I'm retired I forgot all that shit.

    I can't imagine how the .mil contractor world is these days, it
    was chaotic enough back then. I'm afraid to ask.
    --
    Where's th' DAFFY DUCK EXHIBIT??
    --- Synchronet 3.21b-Linux NewsLink 1.2