spoiler

made you look

  • 0 Posts
  • 87 Comments
Joined 1 year ago
cake
Cake day: July 27th, 2024

help-circle







  • The entire number and math system is just a straightforward implementation of IEEE 754.

    Yeah, but using doubles for everything is its own downsides e.g. it’s why JSON “can’t” store 64bit integers for starters.

    They did add the BigInt class recently, which annoyingly you can’t use with JSON because it requires specialized handling (Because of the aforementioned issue with JSON).

    (So you “can” store 64bit integers in JSON, the spec just says not to, so people just ignore the spec. You just then run into silent truncation issues with clients that do follow it, like browsers.)



  • This behavior is actually in line with what I’d expect, as Unicode support in Windows predates UTF-16, so Windows generally does not handle surrogate pairs and instead operates almost exclusively on WTF-16 code units directly.

    So it’s just straight UCS-2, and the software does enforce that, pretty much the opposite of “WTF-16”.

    Edit: Pretty sure “modern” (XP+ I think) Windows actually does enforce UTF-16 validity in the system, but there’s always legacy stuff from the NT4/2K era that might turn up.


  • Webp is a smaller file size than jpeg for the same image quality in almost all circumstances

    For lower quality images sure, for high quality ones JPEG will beat it (WebP, being an old video format, only supports a quarter of the colour resolution than JPEG does, etc.) JPEG is actually so good that it still comes out ahead in a bunch of benchmarks, it’s just it’s now starting to show it’s age technology wise (like WebP, it’s limited to 8bpc in most cases)

    It also doesn’t hurt that Google ranked sites using WebP/AVIF higher than ones that aren’t (via lighthouse).

    Edit: I should clarify, this is the lossy mode. The lossless mode gives better compression than PNG, but is still limited to 8bpc, so can’t store high bit depth, or HDR images, like PNG can.

    Edit 2: s/bpp/bpc/








  • The headline makes this sound a lot worse than the article does.

    From the article there’s basically a list of exemptions in the law that describes who doesn’t need to follow it (e.g. an online booking site for doctors visits), everybody else needs to check the rules to see if they do. And if they do, they then need to follow extra child safety rules (e.g. Roblox is opting out under-16s from open DMs by default)

    GitHub can quite rightly say they don’t fall under the restrictions of the law, and that could be the end of it. The simple fact that it doesn’t have any form of private messaging feature is probably enough.



  • JXL is two separate image formats stuck together. An improved version of JPEG that can also losslessly and reversibly recode most existing JPEG images at a smaller size, and the PNG like format (evolved from FLIF/FUIF) that can do lossless or lossy encoding.

    “VarDCT” (The improved JPEG) turns out to be good enough that the “Modular” mode (The FLIF/FUIF like one) isn’t needed much outside of lossless encoding. One neat feature of modular mode though is that it progressively encodes the image in different sizes, that is if you decode the stream as you read in bytes you start with a small version of the image and get progressively larger and larger output sizes until you get the original.

    Why is that useful? Well you can encode a single high DPI image (e.g. 2x scale), and then clients on 1x scale monitors can just stop decoding the image at a certain point, and get a half sized image out of it. You don’t need separate per-DPI variants.