![](/static/253f0d9/assets/icons/icon-96x96.png)
![](https://programming.dev/pictrs/image/8140dda6-9512-4297-ac17-d303638c90a6.png)
Oh right, duh. Thanks.
Oh right, duh. Thanks.
They should have aimed at the non-stainless steel portion. Pretty sure you could wipe this up easy with some acetone or gasoline as a solvent.
Something something book by its title.
I believe the optimization came because the denominator was a power of two. In my memory, the function counted up all of the bytes being sent and checked to see that the sum was a power of 16 (I think 16 bytes made a single USB endpoint or something; I still don’t fully understand USB).
For starters, you can split up a larger modulo into smaller ones:
X = (A + B); X % n = (A % n + B % n) % n
So our 16 bit number X can be split into an upper and lower byte:
X = (X & 0xFF) + (X >> 8)
so
X % 16 = ((X & 0xFF) % 16 + (X >>8) % 16) % 16
This is probably what the compiler was doing in the background anyway, but the real magic came from this neat trick:
x % 2^n = x & (2^n - 1).
so
x % 16 = x & 15
So a 16 bit modulo just became three bitwise ANDs.
Edit: and before anybody thinks I’m good a math, I’m pretty sure I found a forum post where someone was solving exactly my problem, and I just copy/pasted it in.
Edit2: I’m pretty sure I left it here, but I think you can further optimize by just ignoring the upper byte entirely. Again, only because 16 is a power of 2 and works nicely with bitwise arithmatic.
Lol, no, but in the summers we were allowed to wear t-shirts on Friday.
Thanks!
And it was. They told me to take the rest of the day off which at the age of 22 was unheard of.
Thank you! But this was 12 years ago lol. Think they’ve moved on.
Good guess, but no. This was a one-off style thing from a creator who doesn’t normally react. And the “reactions” were extremely low effort. Like they said virtually the same thing for every video.
They were so certain that it wasn’t going to work that part of the stunt was finding a sponsor who would actually sponsor the video. Ended up with some vpn.
I might be mixing up this last part with another video though.
Whoops. Formatting got lost in the transfer. Fixed now.
Choo choo!
Oh man! I didn’t know this game was on PC! Has been on my must-play list for years, but it was a PlayStation exclusive.
If you are really super deep into the ecosystem and the AR pass through is that good, then I can see it working. On Oculus, I often find myself peering through the gap by my nose to see whatever notification or whatnot on my phone. Apple Vision can fix that.
Though you still have to contend with the comfort factor. It’s a lot to wear on your face when you’re supposed to be casually enjoying content for hours at a time. Heaven forbid you care about how your hair looks.
Color scheme and layout reminds me of Machinarium.
Wasn’t there a bounty out like 10 years ago for writing an open source alternative to the video drivers? I remember reading about that.
Took a looong time, but I eventually got mine. I think it might have even been more than a month. They are certainly in no rush.
Issue is that if I remember correctly the vive was an outside-in concept that required base stations to be setup
But that wasn’t the complaint levied. They were literally complaining about needing to walk around.
And for many of that it is just fine to sit on a couch and still have a benefit from the technology.
But everyone knows the people watching at home on traditional 2D TV get the best view. Zooms on the players/performers, slow-mo recap, etc. I can’t imagine the nausea of having your entire field of view warped across the court to see every special angle. Not to mention, until whatever VR app has a plug in for every thing you’d want to do on your phone while you’re watching the game, you’re stuck paying 100% of your attention to the sport.
Hell, even the people at the concert or sporting event spend half their time on their phone.
When the HTC Vive and Oculus Rift first came out, the rift didn’t yet have full-room support. You had to sit facing the base station and use a video game controller. Meanwhile, on Vive, you could stand up, walk around, and manipulate the world with two tracked remotes.
One pro-con comparison I read at the time actually listed needing to walk around the room as a con against HTC. That is the whole point of VR.
I think the core issue is that every piece of new technology so far has helped us get lazier. People used to walk around an office, then they sat at a computer, now they carry their computer with them and do things from the couch.
Nobody wants to get up to do things if they can avoid it, and that’s the only real benefit VR/AR provides.
You can also request all of your posts on Reddit in a neat little csv. Takes about a month to get though.
I think getting people to turn down free pizza is a lot more difficult than getting them to join a union.