wizard zines

wizard zines
definitely going to take out the "it's not the 90s, use 64 bits” line out of this one. I was already unsure about it (because it's obviously not true, you should use whatever size is appropriate for your use case) and from the responses I don't think it's adding much

@b0rk Yes, I would say that 32-bit integer is most appropriate in most cases... Some exceptions are pointers/large indices into memory/data/files/etc, and timestamps.

For floats, 32-bit floats effectively only have 24-bit precision because of the mantissa, which makes you run into problems quickly if you don't know what you're doing.
32-bit is fine for realtime graphics, image processing, audio etc, but limited for most other stuff.

@b0rk And 32-bit floats (or even smaller) or perfect for neural networks I've heard…

@doekman @b0rk 16-bits has been standard for a while now for ML. They even created a new type, BF-16, "brain" float 16-bits, which is just a truncated 32-bit float.

Latest trends are to use 8 bits or 4 bits, even.

@b0rk Specifically, where you need 64 (or more) bits is for "count of things" type data where the nature of what's being counted doesn't preclude numbers that large. (In C, for things that live in memory, appropriate use of *_t types handles that for you.)

@b0rk And there are still quite a few 32 bit platforms that one may encounter in one’s dev life:

Eg. The RPi Pico / RP2040 is 32 bit: https://en.wikipedia.org/wiki/RP2040

As is ESP32, even it’s new RISC-V based one’s: https://en.wikipedia.org/wiki/ESP32

Also, the currently most available @[email protected] is the Zero W, and it is 32 bit: https://www.ourpcb.com/bcm2835.html And the Zero W will be in production until at least January 2026s https://www.raspberrypi.com/products/raspberry-pi-zero-w/

RP2040 - Wikipedia

@b0rk and in the 90s I already had a 64-bit computer (Alpha processor)
@b0rk We've always had CPUs and languages that could handle multiple sizes, so a 32-bit chip isn't prevented from doing 64-bit or 16-bit or 8-bit work as needed. We need programmers to be thoughtful about the size required for each data type. Address-bus width is the other consideration, with 32-bit addresses being best before you hit 4 GB.
@b0rk FWIW we used 64 bits in the 90s.
@b0rk I dunno, Julia. My BBS runs way faster since upgrading to 64-bit.
@b0rk Sorry to see it go, alas you’re right to remove it.
True story, in 1986 or so we decided to switch to using 64 bits for all counters, even on PDP11s. So it’s not the 70s, use 64 bits.
@b0rk I think there's still something useful to say here though. In the 1990s I worked on a system that used 32-bit unsigned as a millisecond timestamp. It would roll over after about 50 days. Our attitude was, "The system will never stay up that long." No longer! Maybe the line should be, "It's not the 90s, make sure you account for 32-bit overflow."
@stuartmarks @b0rk 10ms signed 32bit is about 250 days or about 9months. I know because one of the old SunOS 4 versions would hang up when the clock tick went negative.
@adrianco @b0rk Yeah I was talking about the X Window server. In the early days that thing wouldn't even stay up for a day, so talk of it staying up 50 days was "Inconceivable!" (to quote Vizzini).

@stuartmarks @b0rk

That sounds a lot like the Boeing 787 which needs (needed?) a reboot every 51 days :)

https://www.theregister.com/2020/04/02/boeing_787_power_cycle_51_days_stale_data/

Boeing 787s must be turned off and on every 51 days to prevent 'misleading data' being shown to pilots

: US air safety bods call it 'potentially catastrophic' if reboot directive not implemented

The Register
@pilhuhn @b0rk Yeah a disturbing number of things need to be rebooted regularly. I have to reboot my desktop and even my phone every couple weeks otherwise things start behaving wonky. I was once on a plane waiting for pushback from the gate and the pilot announced a brief delay while they worked out some issue. They eventually rebooted the plane! It got really quiet for about 30 seconds. But that fixed it. We were all looking at each other thinking, "I hope we don't need to do that in the air."
@b0rk I'd instead do "most languages silently fail on overflow", so you may not immediately KNOW when you've hit a problem.