• Re: Prioritize Performance over Correctness

    From dave_thompson_2@3:633/10 to All on Tue Sep 15 21:16:41 2026
    On Tue, 28 Jul 2026 01:18:11 GMT, scott@slp53.sl.home (Scott Lurndal)
    wrote:

    Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
    James Kuyper <jameskuyper@alumni.caltech.edu> writes:
    ...
    I asked Google Gemini "Which implementations of C implement a null
    pointer whose representation is not 0?", and it identified 5 ...

    I'll add a sixth; while we looked at doing a C compiler,
    it didn't get any traction from customers

    - Burroughs Medium Systems (hardware nulptr = 0xEEEEEE)
    The architecture featured an instruction to search linked
    lists (SLT) and the hardware recognized the base offset
    0xEEEEEE as the NIL pointer. It was a BCD architecture
    addressed to the digit (nibble).

    BCD should have been a much bigger problem than nullptr. Everything
    since C89 has required 'pure binary (magnitude)' for integer types,
    and effectively a binary fraction for FP. How could you have gotten
    bit operators (& | ^ ~ << >>) to work right?

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From James Kuyper@3:633/10 to All on Tue Sep 15 22:05:40 2026
    On 2026-09-15 21:16, dave_thompson_2@comcast.net wrote:
    On Tue, 28 Jul 2026 01:18:11 GMT, scott@slp53.sl.home (Scott Lurndal)
    wrote:

    Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
    James Kuyper <jameskuyper@alumni.caltech.edu> writes:
    ...
    I asked Google Gemini "Which implementations of C implement a null
    pointer whose representation is not 0?", and it identified 5 ...

    I'll add a sixth; while we looked at doing a C compiler,
    it didn't get any traction from customers

    - Burroughs Medium Systems (hardware nulptr = 0xEEEEEE)
    The architecture featured an instruction to search linked
    lists (SLT) and the hardware recognized the base offset
    0xEEEEEE as the NIL pointer. It was a BCD architecture
    addressed to the digit (nibble).

    BCD should have been a much bigger problem than nullptr. Everything
    since C89 has required 'pure binary (magnitude)' for integer types,
    and effectively a binary fraction for FP. How could you have gotten
    bit operators (& | ^ ~ << >>) to work right?

    Can you implement binary % and / for unsigned integers? If so, you can
    emulate bitwise operators by using those operators with right operands
    that are powers of 2.. It won't be fast, but it can be done.

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Scott Lurndal@3:633/10 to All on Wed Sep 16 14:37:25 2026
    dave_thompson_2@comcast.net writes:
    On Tue, 28 Jul 2026 01:18:11 GMT, scott@slp53.sl.home (Scott Lurndal)
    wrote:

    Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
    James Kuyper <jameskuyper@alumni.caltech.edu> writes:
    ...
    I asked Google Gemini "Which implementations of C implement a null
    pointer whose representation is not 0?", and it identified 5 ...

    I'll add a sixth; while we looked at doing a C compiler,
    it didn't get any traction from customers

    - Burroughs Medium Systems (hardware nulptr = 0xEEEEEE)
    The architecture featured an instruction to search linked
    lists (SLT) and the hardware recognized the base offset
    0xEEEEEE as the NIL pointer. It was a BCD architecture
    addressed to the digit (nibble).

    BCD should have been a much bigger problem than nullptr. Everything
    since C89 has required 'pure binary (magnitude)' for integer types,
    and effectively a binary fraction for FP. How could you have gotten
    bit operators (& | ^ ~ << >>) to work right?

    It was circa 1984/1985 that we looked into C support. The hardware
    had some support (mainly conversion instructions) for binary, but
    there were no bit shift operators (other than digit shifting, which
    worked in units of four bits).

    There were bit set and bit clear as well as and/or/not instructions
    as well as B2D and D2B instructions.

    We were updating the architecture at that point in time and
    adding additional instructions was on the table, but there was
    no customer demand for C.

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Tim Rentsch@3:633/10 to All on Fri Sep 18 08:14:25 2026
    dave_thompson_2@comcast.net writes:

    On Tue, 28 Jul 2026 01:18:11 GMT, scott@slp53.sl.home (Scott Lurndal)
    wrote:

    Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:

    James Kuyper <jameskuyper@alumni.caltech.edu> writes:

    ...

    I asked Google Gemini "Which implementations of C implement a null
    pointer whose representation is not 0?", and it identified 5 ...

    I'll add a sixth; while we looked at doing a C compiler,
    it didn't get any traction from customers

    - Burroughs Medium Systems (hardware nulptr = 0xEEEEEE)
    The architecture featured an instruction to search linked
    lists (SLT) and the hardware recognized the base offset
    0xEEEEEE as the NIL pointer. It was a BCD architecture
    addressed to the digit (nibble).

    BCD should have been a much bigger problem than nullptr. Everything
    since C89 has required 'pure binary (magnitude)' for integer types,
    and effectively a binary fraction for FP. [...]

    That's right about integer types, but the C standard admits radix 10
    (or most other bases, within reason) for floating point. So the
    floating point types could have both a decimal exponent and a
    decimal fraction in their representations.

    Of course converting such representations to an integer type would
    be a PITA, but then no sensible programmer wants their code to do
    such things anyway. ;)

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Lawrence D?Oliveiro@3:633/10 to All on Sat Sep 19 05:45:44 2026
    On Tue, 15 Sep 2026 21:16:41 -0400, dave_thompson_2 wrote:

    How could you have gotten bit operators (& | ^ ~ << >>) to work
    right?

    They can all be defined mathematically in terms of operations on
    integers, regardless of any underlying base representation.

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)