Readit News logoReadit News
jusuhi commented on Two's complement integers with only sign bit set should be a trap representation   social.belkadan.com/@jros... · Posted by u/luu
flohofwoe · 2 years ago
...which is a bit of a weak reason when there are hardly any 32-bit CPUs around anymore though. Picking a narrower integer type makes sense in specific situations like tightly packed structs, but in that case it usually doesn't matter whether the integer range is 2^31 or 2^32, if you really need the extra bit of range it's usually ok to go to the next wider integer type.
jusuhi · 2 years ago
Feel free to generalize my argument to i31 and i15.

Also, look around you and realize that non-64-bit microprocessors outnumber 64-bit machines by orders of magnitude. There is more to the world than your laptop and smartphone. (Just within 1m of myself at this very moment I see 4 devices with a 32 bit microprocessor in them, and I'm sitting in a coffee shop reading a book. Well, and browsing HN now and then.)

jusuhi commented on Two's complement integers with only sign bit set should be a trap representation   social.belkadan.com/@jros... · Posted by u/luu
flohofwoe · 2 years ago
At that point, why not introduce special i63 and u63 types and use the hidden bit 63 as 'soft carry flag' to detect over/undeflow. 63 bits of integer range ought to be enough for anyone ;)

(as soon as bit 63 is set, the number would be in 'overflow state', but at the same time the lower 63 bits would preserve the wrap-around value in case that's useful).

On the other hand, compilers are already free to check the CPU carry flag bit and trap on it. Those flag bits are just not exposed to programming languages (which IMHO is a serious 'dissonance' between assembly and high level languages), also CPU flags can't be carried around with their associated result value and go 'viral' like NaNs (but whether that's even useful instead of trapping immediately is another question).

jusuhi · 2 years ago
Because i63 won't help with 32 bit variables.
jusuhi commented on Edit This Blog Post   shkspr.mobi/blog/2022/01/... · Posted by u/edent
wbobeirne · 2 years ago
Absolutely! The real complexity comes from conflict resolution. If someone edits the top, and someone else edits the bottom, which version do you go with? What if they're editing the same area? Entire companies exist to provide elegant solutions to this[0], so it's no simple task.

0: https://liveblocks.io/

jusuhi · 2 years ago
The keywords here are operational transform (OT) and conflict-free replicated data types (CRDT). Fun to implement, there are lots of libs.
jusuhi commented on ProofWiki: Online compendium of mathematical proofs   proofwiki.org/wiki/Main_P... · Posted by u/Tomte
ivancho · 2 years ago
What is your certainty that that statement is true? What if it was a calculation which takes decades on a supercomputer?
jusuhi · 2 years ago
At current rates, whatever is done on a supercomputer today is done by a cheap pocket-size device just decades later. So, I'm not too worried about this case.

One of the first famous examples of this is the four-coloring theorem. I don't know any serious mathematician who is not certain of that result.

jusuhi commented on ProofWiki: Online compendium of mathematical proofs   proofwiki.org/wiki/Main_P... · Posted by u/Tomte
ivancho · 2 years ago
Their "proof" that there are only 12 solutions to 8 Mutually Non-Attacking Queens on Chessboard is just "That there are only these 12 can be proved by brute force." :/
jusuhi · 2 years ago
The task proving some statement and the task of finding the shortest, or a "reasonably short" proof, are very different endeavours.

The first is about certainty that a statement is valid ("true"). The other is about simplifying the understanding of _why_ it is valid. Most of the time, you don't care much about the latter.

jusuhi commented on Why is the mouse cursor slightly tilted and not straight?   ux.stackexchange.com/ques... · Posted by u/wscourge
raverbashing · 2 years ago
Xerox Park and display reasons aside, I think that the 2nd answer, with the picture of the hand is the best answer apart from historical and technical reasons.
jusuhi · 2 years ago
The "best answer" perhaps from the POV of your own intuition. But the question is about a historical fact, and those don't work that way.
jusuhi commented on Why is the mouse cursor slightly tilted and not straight?   ux.stackexchange.com/ques... · Posted by u/wscourge
weinzierl · 2 years ago
I have no idea, but a wild guess is that with old hardware the "hot" pixel that could trigger the collision interrupt was fixed to the upper left corner of the hardware sprite.

EDIT: Another thought that crossed my mind is that with very lo-res screens a corner is the only way to get a well defined and sharp (yet fairly wide) arrowhead. The trade-off would be the shaft being pixelated, but the tip is more important.

jusuhi · 2 years ago
If you'd actually read wherever the link is going then you could get an idea instead of just speculating wildly.
jusuhi commented on Why is the mouse cursor slightly tilted and not straight?   ux.stackexchange.com/ques... · Posted by u/wscourge
simondotau · 2 years ago
The web page which that image is sourced from[0] and the reddit page it is in turn sourced from[1] makes a lot of hand-wavey analogies to optical balancing (which is a real phenomenon[2]) but doesn't make any compelling arguments for why they apply in this specific case.

An alternative explanation is that this intentional imperfection exists to match the unavoidable imperfection which occurred when the cursor graphic was originally drawn as tiny low resolution 1-bit pixel art. It looks correct because we're used to it being slightly wrong. And when viewed at a normal size, the difference is barely perceptible anyway.

[0] https://mspoweruser.com/why-windows-10s-asymmetrical-cursor-...

[1] https://old.reddit.com/r/TIHI/comments/fwnep0/thanks_i_hate_...

[2] edited, thanks jusuhi

jusuhi · 2 years ago
Phenomenon. That's the singular form.

Dead Comment

jusuhi commented on German train company are looking for a Windows 3.11 Administrator   gulp.de/gulp2/g/projekte/... · Posted by u/DyslexicAtheist
ecalifornica · 2 years ago
San Francisco Bay Area Rapid Transit (BART) scrounges around for hardware to run Windows 98: https://news.ycombinator.com/item?id=32884814

> When a BART car runs into trouble, Shawn Stange steps back in time. He pops open a circa-2000 IBM Thinkpad running Windows 98 and opens a portal into the train’s brain — the Automated Train Control system — through the DOS computer language.

> Stacks of vintage laptop carcasses are common at BART warehouses. The train software is so old it won’t work on modern computers.

Reminds me of the software archeology in Vernor Vinge's A Deepness in the Sky.

jusuhi · 2 years ago
> through the DOS computer language

Oh yes, that DOS computer language. Bill Gates was fluent in that language.

Totally makes me trust everything else in that article even more.

u/jusuhi

KarmaCake day17January 28, 2024View Original