|
|
Log in / Subscribe / Register

The road to Zettalinux

The road to Zettalinux

Posted Sep 16, 2022 12:41 UTC (Fri) by colejohnson66 (subscriber, #134046)
Parent article: The road to Zettalinux

Easy! Just make a `long long long` type ;)


to post comments

The road to Zettalinux

Posted Sep 16, 2022 12:54 UTC (Fri) by smoogen (subscriber, #97) [Link] (12 responses)

C2029 adds the 'short' 'medium' 'long' 'long long' 'whatevs' types

The road to Zettalinux

Posted Sep 16, 2022 13:03 UTC (Fri) by joib (subscriber, #8541) [Link] (11 responses)

Or should that be 'longer long', 'longerer long', 'longest long'? ;)

The road to Longestlongerlinux (LLL™)

Posted Sep 16, 2022 13:47 UTC (Fri) by tlamp (subscriber, #108540) [Link] (10 responses)

longest is sadly not future proof, but longer is nice, I propose (forgoing any copyright claims, if the C standard committee is reading ;-)), ordered by increasing width:
  • long
  • longer
  • long long
  • long longer
  • longer long
  • longer longer
(sorry couldn't resist)

The road to Longestlongerlinux (LLL™)

Posted Sep 16, 2022 14:30 UTC (Fri) by sjfriedl (✭ supporter ✭, #10111) [Link] (2 responses)

grande long and venti long maybe? :-)

The road to Longestlongerlinux (LLL™)

Posted Sep 16, 2022 15:00 UTC (Fri) by mathstuf (subscriber, #69389) [Link] (1 responses)

As long as we get `biggulp long` to store our AVX4096 registers as scalars too :) .

The road to Longestlongerlinux (LLL™)

Posted Sep 16, 2022 15:23 UTC (Fri) by dullfire (guest, #111432) [Link]

AVX4096? Why are you using such a small, and imprecise (and OLD) extension. Everyone now days knows that AVX4096K is the bare minimum.

/s

The road to Longestlongerlinux (LLL™)

Posted Sep 16, 2022 15:26 UTC (Fri) by Wol (subscriber, #4433) [Link] (1 responses)

can't we just have

int32
int64
int128

and, as a nod to those weird old architectures out there with 6 or 9 or whatever-bit bytes, those types are simply defined as the smallest power-of-two bytes that contain that number of bits.

Might be a bit wasteful of bits - the old ICL would need 16 6-bit bytes for an int64 (96 bits) - but then it probably doesn't have enough RAM for a program to want an int64 :-)

Move into the 21st century, guys :-), let history catch up if it wants to!

Cheers,
Wol

The road to Longestlongerlinux (LLL™)

Posted Sep 16, 2022 19:27 UTC (Fri) by Sesse (subscriber, #53779) [Link]

Aka int_least64_t and friends?

The road to Longestlongerlinux (LLL™)

Posted Sep 16, 2022 16:41 UTC (Fri) by siim@p6drad-teel.net (subscriber, #72030) [Link]

Terry Cavanagh solved the problem with future proofing longest in Super Hexagon:

long longer longest longester longestest longestester etc.

The road to Longestlongerlinux (LLL™)

Posted Sep 16, 2022 18:32 UTC (Fri) by bartoc (guest, #124262) [Link]

How about _BitInt(128)? This might even already work

The road to Longestlongerlinux (LLL™)

Posted Sep 17, 2022 7:25 UTC (Sat) by k3ninho (subscriber, #50375) [Link] (1 responses)

One of the problems with teaching rocks to think is they start counting like Discworld Trolls: One, Two, Many, Lots.

K3n.

The road to Longestlongerlinux (LLL™)

Posted Sep 18, 2022 6:13 UTC (Sun) by willy (subscriber, #9762) [Link]

The road to Longestlongerlinux (LLL™)

Posted Sep 17, 2022 12:03 UTC (Sat) by lunaryorn (guest, #111088) [Link]

How about "even longer"? ;)

And, in the opposite direction, can we also get a "rather short"? ^^

The road to Zettalinux

Posted Sep 16, 2022 13:29 UTC (Fri) by tux3 (subscriber, #101245) [Link] (2 responses)

What about entropy coding with the short and longs? =)

The Rust integer types like i64 could map to "short long long", and even LLVM integers like i48 could be "short long short long".
Since there's some encoding space left with the short keyword as a useful escape keyword, let's also map the Rust unit type () to short bool, like this actual C++ paper proposed to replace void: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/...

The road to Zettalinux

Posted Sep 16, 2022 13:36 UTC (Fri) by mathstuf (subscriber, #69389) [Link]

> short long short long

Do I apply the spiral rule to reading this type as well?

The road to Zettalinux

Posted Sep 17, 2022 19:50 UTC (Sat) by rav (guest, #89256) [Link]

> let's also map the Rust unit type () to short bool

Is short bool then going to be signed or unsigned (or something in between, like char)?

We would need unsigned short bool and signed short bool to have proper sign extension support when going from 0-bit values to e.g. 32-bit values.

And of course, don't forget the new stdint.h typedefs: uint0_t and int0_t (for unsigned short bool and signed short bool).

The road to Zettalinux

Posted Sep 16, 2022 17:36 UTC (Fri) by Cyberax (✭ supporter ✭, #52523) [Link]

Borrow the nomenclature from astronomers: "Overwhelmingly Long Type".


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds