Saturday, December 30
Daily News Stuff 30 December 2023
Bambeezled Edition
Bambeezled Edition
Top Story
- SpaceX has rounded out the year with two orbital launches three hours apart - one carrying one of the X37B space planes, and the other 23 Starlink satellites - and a static test fire of the third Starship test vehicle. (Ars Technica)
That makes 96 commercial launches this year, of which 96 succeeded. And a couple of test flights which, uh, tested things.
Tech News
- Nvidia is going all-out to compete with AMD's Radeon 7800 XT. (Tom's Hardware)
Except on price, which is probably going to render their efforts irrelevant in the gaming market.
- Remember that program that could determine whether any unsigned 32-bit integer was even or odd? Now there's a version that works for 64-bit integers. (GitHub)
This one cheats slightly. Rather than having a separate check for each possible value, the developers pre-computed the result for every possible input and saved the results to a file.
Then they compressed that file.
Recursively.
Reducing it from around two million terabytes to 13 kilobytes.
- Don't ask why, just accept it.
- In a similar vein, here's a fully-automated Christmas checker. (XKCD)
99.73% accurate, which is even better than the prime number checker.
- Should we upgrade to M3 MacBooks? (Incident)
I don't know, let's throw a bunch of poorly-understood numbers into ChatGPT and see what it says.
ChatGPT says yes!
Also that it's an Amazon Affiliate but that in no way coloured its decision.
Disclaimer: Dad! There's another dead clown on the roof!
Posted by: Pixy Misa at
06:26 PM
| Comments (6)
| Add Comment
| Trackbacks (Suck)
Post contains 252 words, total size 3 kb.
1
Ok, I'm confused. Can't you just check the last digit? Convert to string, pull the last character, then at most 5 checks?
Posted by: Davd at Sunday, December 31 2023 04:56 AM (R7Z4D)
2
And I would assume you could do a binary check via some ror/rol calls, but would take me a bit to figure that out.
Posted by: Davd at Sunday, December 31 2023 04:57 AM (R7Z4D)
3
Ok, finish the walk to the refrigerator, and it's between 2 and 10 operations. You could probably order the checks to put 3 and 7 first to optimize if you're picking human-selected numbers first.
bool odd = false; if (a & 1 == 1) || (a & 3 == 3) || (a & 5 == 5) || (a & 7 == 7) || (a & 9 == 9) {
odd = true; }
bool odd = false; if (a & 1 == 1) || (a & 3 == 3) || (a & 5 == 5) || (a & 7 == 7) || (a & 9 == 9) {
odd = true; }
Posted by: Davd at Sunday, December 31 2023 05:07 AM (R7Z4D)
4
Couldn't you just, you know, check the low bit?
Posted by: Mauser at Sunday, December 31 2023 09:08 AM (sZ6tC)
5
Yeah, I mean, I think that's the joke here.
Posted by: normal at Sunday, December 31 2023 01:09 PM (bg2DR)
6
The canonical answer is the modulo operator, which basically amounts to, yes, checking the low bit. If you track back from the git repository Pixy linked, the original concept was "figure out even/odd without doing that." But then they went for the stupidest possible answer, and tried to optimize from there.
Posted by: Davd at Sunday, December 31 2023 07:03 PM (R7Z4D)
51kb generated in CPU 0.4209, elapsed 3.4018 seconds.
58 queries taking 3.3722 seconds, 351 records returned.
Powered by Minx 1.1.6c-pink.
58 queries taking 3.3722 seconds, 351 records returned.
Powered by Minx 1.1.6c-pink.