• 0 Posts
  • 175 Comments
Joined 2 years ago
cake
Cake day: June 12th, 2023

help-circle
  • If you write cross-platform software, the easiest solution is usually to pretend everything’s Unix. You’ll hit some problems (e.g. assuming all filesystem APIs always use UTF-8 will bite you on Windows, which switched to UCS2 before UTF-8 or UTF-16 were invented, so now uses UTF-16 for Unicode-aware functions as that’s the one that’s ABI compatible with UCS2, and passing UTF-8 to the eight-bit-char functions requires you to opt into that mode explicitly), but mostly everything will just work. There’s no XDG_CONFIG telling you to put these files anywhere in particular, as Windows is Windows, so most things use ~ as a fallback, which Windows knows to treat as %USERPROFILE%.






  • There are already slats so the only hole you can get a fork into is the earth, unless you’ve already got something convincingly shaped like an earth pin in the earth hole to open the slats over the live and neutral. If you’re going to that much effort to zap yourself, the switch isn’t going to be much of a hurdle.

    I’d suspect that it’s largely because it’s more convenient to have a switch than to unplug things and plug them back in again, especially as our plugs are a nightmare to step on to the point that Americans complaining about stepping on lego seems comical to anyone who’s stepped on lego and a plug.


  • You can jam the Windows UI by spawning loads of processes with equivalent or higher priority to explorer.exe, which runs the desktop as they’ll compete for CPU time. The same will happen if you do the equivalent under Linux. However if you have one process that does lots of small allocations, under Windows, once the memory and page file are exhausted, eventually an allocation will fail, and if the application’s not set up to handle that, it’ll die and you’ll have free memory again. Doing the same under every desktop Linux distro I’ve tried (which have mostly been Ubuntu-based, so others may handle it better) will just freeze the whole machine. I don’t know the details, but I’d guess it’s that the process gets suspended until its request can be fulfilled, so as long as there’s memory, it gets it eventually, but it never gets told to stop or murdered, so there’s no memory for things like the desktop environment to use.


  • Even by crypto standards, Bitcoin Cash is dodgy. Its origins were a temporary hiccup in the Bitcoin network which forked the blockchain into two branches. As blockchains are designed to tolerate this, the network quickly decided that one branch was worse than the other, so everything switched to the good branch and Bitcoin continued chugging away and consuming enough power for a small country. However, a few people were cross about this because they had more Bitcoin on the dead branch, so manually configured their wallets and mining hardware to use that branch, and tried encouraging other people to do the same. That didn’t work. They then decided to provide a preconfigured wallet and mining software that would prefer the dead branch but claimed it was its own new cryptocurrency and everyone who had Bitcoin already would get some of the new one for free, and that was enough to get some people to sign up.




  • Unless your local cinema got a good deal on a projector from a 1980s theme park 3D movie, it’s definitely using circularly polarised filters. If you’ve tried tests like putting the lenses from two pairs of the glasses or one pair of the glasses and one pair of regular polaroid sunglasses next to each other and rotating them, that’ll still make them get brighter and dimmer like with linear polarised filters, as passing through the filter can change the polarisation to elliptical, and that means it’ll be affected by rotation when it gets to the second filter.


  • Anaglyph 3D (with the red/cyan, or lower-quality red/blue filters) has been around since the 1800s (3D films predate talkies by decades), but was much more of a gimmick and wasn’t used for big-budget serious films as it ruined the colour quality, mainly being used for 1950s B movies. There were a bunch of other methods used between the 50s and 2010-ish like regular Polaroid filters (which did stop working when you tilted your head like in the comic and were a hassle for other reasons) and active shutter (which relied on expensive and heavy glasses with electronics in). The newer kind that relies on circular polarisation became available since the turn of the millennium, with Avatar in 2009 being the film that made most cinemas buy new projectors. Those glasses made 3D films viable as the standard for a few years, before people generally decided that most of the time, being 3D didn’t add enough to the viewing experience to be worth paying extra for and studios decided it wasn’t elevating their art enough to justify the extra production costs if people weren’t going to pay a premium.


  • It can make it look a bit weird (and be one of the things that makes people nauseous), but most people’s brains are good enough at figuring it out that it’s not a major problem. It wouldn’t make a difference to the situation in the comic, though, as in that frame, they’re talking about making both lenses match to pick between two 2D movies, so there’d be no offset anyway.


  • Tilting your head shouldn’t make a difference as ‘modern’ (as in the ones that cinemas started using fifteen years ago) 3D glasses use clockwise and anticlockwise circular polarisation filters, and obviously, turning something 90° doesn’t change whether it’s clockwise or anticlockwise. Other kinds of polarisation filters do care about being rotated, which is probably where the artist got the impression it applied to 3D glasses, but it would be dumb to try and use that kind as obviously, people tilt their heads.




  • Most of the problems can be totally avoided by telling the YAML loader what type you’re expecting instead of forcing it to guess (e.g. provide a schema or use typed getter functions). If it has to guess, it’s no surprise that some things don’t survive the string to inferred type to desired type journey, and this is something that isn’t seen as a dealbreaker in other contexts, e.g. the multitude of languages where the string "false" evaluates to true when converted to a boolean because it’s non-empty.