• Re: C and C++, promotion, stabilization, migrationFor embedded

    From Stephen Hoffman@21:1/5 to chrisq on Fri Aug 23 11:32:03 2024
    On 2024-08-20 12:36:43 +0000, chrisq said:

    For work here, all functions that return data have a parameter that
    limits the byte count. Usually pass a pointer to a buffer, with the
    size parameter equal to or less than the buffer size. Some C library functions are just not safe to use in that respect.

    Local spun string copy and other functions use the same sort of size limiting.

    That, or preferably not transferring the data at all.

    Whether that happens with page table modifications, or shared buffers.

    Parts of OpenVMS are just chock full of buffer copies. (q.v. previous discussions of the buffer overhead incurred with faster network
    connections. From discussions here most of a decade ago: https://lwn.net/Articles/629155/ )

    And OpenVMS and apps have not-particularly-reentrant and not-particularly-performant code that calls some system service to
    first size the data and then allocate the buffer and then calls again
    to return the data. (Which is more glue code, as compared with
    returning an object containing the data, too. OpenVMS itself doesn't particularly have that concept, however.)

    OpenVMS has ~no concept of languages, either. Yeah, the C abd C++ I18N
    giblets, Java and its own little world, maybe using the existing and
    older ICU or maybe you ported a newer ICU, and the deprecated Terminal
    Fallback Facility (TFF) and National (Replacement) Character Set (NCS) giblets, sure. All of which make things more interesting for apps that
    want or need to deal with the UTF-8 and post-ASCII world.




    --
    Pure Personal Opinion | HoffmanLabs LLC

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Stephen Hoffman on Fri Aug 23 22:55:41 2024
    On Fri, 23 Aug 2024 11:32:03 -0400, Stephen Hoffman wrote:

    And OpenVMS and apps have not-particularly-reentrant and not-particularly-performant code that calls some system service to first
    size the data and then allocate the buffer and then calls again to
    return the data.

    I can mention examples from the Linux world, too. How else would you do
    it?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Stephen Hoffman on Fri Aug 23 19:34:18 2024
    On 8/23/2024 11:32 AM, Stephen Hoffman wrote:
    OpenVMS has ~no concept of languages, either. Yeah, the C abd C++ I18N giblets, Java and its own little world, maybe using the existing and
    older ICU or maybe you ported a newer ICU, and the deprecated Terminal Fallback Facility (TFF) and National (Replacement)  Character Set (NCS) giblets, sure. All of which make things more interesting for apps that
    want or need to deal with the UTF-8 and post-ASCII world.

    Regarding UTF-8 support, then my take is that:

    UTF-8 in file names, in usernames, in logicals, in identifiers and in programs/scripts: not really needed.

    UTF-8 in file content and in databases: very much needed.

    And support for the latter fall in 3 groups:
    * JVM languages (Java, Groovy etc.) and I believe Python - does
    support unicode and can read/write using any encoding including UTF-8
    * C, C++, PHP - developer keeps track of what encoding a byte
    sequence is in but possible to explicit convert encodings
    (C/C++ has wchar_t but it is neither much used nor UTF-8 friendly
    AFAIK)
    * the traditional native languages - very little support except what
    can be done by calling C functions

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to All on Fri Aug 23 23:41:39 2024
    On Fri, 23 Aug 2024 19:34:18 -0400, Arne Vajhøj wrote:

    UTF-8 in file names, in usernames, in logicals, in identifiers and in programs/scripts: not really needed.

    I would say these are needed.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Lawrence D'Oliveiro on Fri Aug 23 19:59:26 2024
    On 8/23/2024 7:41 PM, Lawrence D'Oliveiro wrote:
    On Fri, 23 Aug 2024 19:34:18 -0400, Arne Vajhøj wrote:
    UTF-8 in file names, in usernames, in logicals, in identifiers and in
    programs/scripts: not really needed.

    I would say these are needed.

    I can live without the ability to create:

    blåbærsyltetøj.txt

    :-)

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Craig A. Berry@21:1/5 to All on Fri Aug 23 20:10:44 2024
    On 8/23/24 6:34 PM, Arne Vajhøj wrote:
    On 8/23/2024 11:32 AM, Stephen Hoffman wrote:
    OpenVMS has ~no concept of languages, either. Yeah, the C abd C++ I18N
    giblets, Java and its own little world, maybe using the existing and
    older ICU or maybe you ported a newer ICU, and the deprecated Terminal
    Fallback Facility (TFF) and National (Replacement)  Character Set
    (NCS) giblets, sure. All of which make things more interesting for
    apps that want or need to deal with the UTF-8 and post-ASCII world.

    Regarding UTF-8 support, then  my take is that:

    UTF-8 in file names, in usernames, in logicals, in identifiers and in programs/scripts: not really needed.

    UTF-8 in file content and in databases: very much needed.

    And support for the latter fall in 3 groups:
    * JVM languages (Java, Groovy etc.) and I believe Python - does
      support unicode and can read/write using any encoding including UTF-8

    Perl has excellent Unicode support. It even comes with piconv, an iconv application implemented in Perl that can do conversions.

    I'm told Unicode support in Python 2.x was pretty shaky but Python 3 is
    a lot better.

    * C, C++, PHP - developer keeps track of what encoding a byte
      sequence is in but possible to explicit convert encodings
      (C/C++ has wchar_t but it is neither much used nor UTF-8 friendly
      AFAIK)
    * the traditional native languages - very little support except what
      can be done by calling C functions

    and what can be done calling C functions is limited by the data in SYS$I18N_ICONV, which is about 20 years out of date. There have been a
    dozen major releases of the Unicode standard in that time.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Chris Townley@21:1/5 to All on Sat Aug 24 01:52:02 2024
    On 24/08/2024 00:59, Arne Vajhøj wrote:
    On 8/23/2024 7:41 PM, Lawrence D'Oliveiro wrote:
    On Fri, 23 Aug 2024 19:34:18 -0400, Arne Vajhøj wrote:
    UTF-8 in file names, in usernames, in logicals, in identifiers and in
    programs/scripts: not really needed.

    I would say these are needed.

    I can live without the ability to create:

    blåbærsyltetøj.txt

    :-)

    Arne


    Is that Norwegian, or Swedish?
    :-)

    --
    Chris

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Chris Townley on Fri Aug 23 22:09:43 2024
    On 8/23/2024 8:52 PM, Chris Townley wrote:
    On 24/08/2024 00:59, Arne Vajhøj wrote:
    On 8/23/2024 7:41 PM, Lawrence D'Oliveiro wrote:
    On Fri, 23 Aug 2024 19:34:18 -0400, Arne Vajhøj wrote:
    UTF-8 in file names, in usernames, in logicals, in identifiers and in
    programs/scripts: not really needed.

    I would say these are needed.

    I can live without the ability to create:

    blåbærsyltetøj.txt

    :-)

    Is that Norwegian, or Swedish?
    :-)

    Danish.

    :-)

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to All on Sat Aug 24 02:21:54 2024
    On Fri, 23 Aug 2024 19:59:26 -0400, Arne Vajhøj wrote:

    On 8/23/2024 7:41 PM, Lawrence D'Oliveiro wrote:

    On Fri, 23 Aug 2024 19:34:18 -0400, Arne Vajhøj wrote:

    UTF-8 in file names, in usernames, in logicals, in identifiers and in
    programs/scripts: not really needed.

    I would say these are needed.

    I can live without the ability to create:

    blåbærsyltetøj.txt

    Even restricting oneself to English, I would say this betrays a certain naïveté ...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Lawrence D'Oliveiro on Fri Aug 23 22:23:18 2024
    On 8/23/2024 10:20 PM, Lawrence D'Oliveiro wrote:
    On Fri, 23 Aug 2024 20:10:44 -0500, Craig A. Berry wrote:
    I'm told Unicode support in Python 2.x was pretty shaky but Python 3 is
    a lot better.

    That was the primary motivation behind the Python 2→3 transition.

    Unicode was also the primary motivation behind PHP 5->6. But it
    got cancelled and PHP did 5->7 without going unicode.

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to All on Sat Aug 24 03:07:45 2024
    On Fri, 23 Aug 2024 22:23:18 -0400, Arne Vajhøj wrote:

    Unicode was also the primary motivation behind PHP 5->6. But it got
    cancelled and PHP did 5->7 without going unicode.

    To be fair, that little peccadillo does get lost in the avalanche of other reasons why PHP is bloody awful ...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Craig A. Berry on Sat Aug 24 02:20:05 2024
    On Fri, 23 Aug 2024 20:10:44 -0500, Craig A. Berry wrote:

    I'm told Unicode support in Python 2.x was pretty shaky but Python 3 is
    a lot better.

    That was the primary motivation behind the Python 2→3 transition.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Single Stage to Orbit@21:1/5 to All on Sat Aug 24 11:55:13 2024
    On Fri, 2024-08-23 at 19:34 -0400, Arne Vajhøj wrote:
    UTF-8 in file names, in usernames, in logicals, in identifiers and in programs/scripts: not really needed.

    Everything needs to be utf8 aware. Not just text files. A good start
    would be to add utf8 aware functionality to VMS.
    --
    Tactical Nuclear Kittens

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Single Stage to Orbit@21:1/5 to Lawrence D'Oliveiro on Sat Aug 24 11:56:14 2024
    On Sat, 2024-08-24 at 03:07 +0000, Lawrence D'Oliveiro wrote:
    On Fri, 23 Aug 2024 22:23:18 -0400, Arne Vajhøj wrote:

    Unicode was also the primary motivation behind PHP 5->6. But it got cancelled and PHP did 5->7 without going unicode.

    To be fair, that little peccadillo does get lost in the avalanche of
    other reasons why PHP is bloody awful ...

    I'll drink to that.
    --
    Tactical Nuclear Kittens

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)