Sounds boring, I know, but honestly the thing I love most out of my 280 monitor is how nice and snappy the mouse moves around. It's neat.
919 karma · joined July 18, 2014
Sounds boring, I know, but honestly the thing I love most out of my 280 monitor is how nice and snappy the mouse moves around. It's neat.
Surprising they call out the 2 space indent level that esbuild is hardcoded[1] to use as a benefit. Why not save even more bytes and re-format the output to single tab indentation? I wrote a simple script to replace the indentation with tabs. 2 indent size: 29.2MB, tabbed size: 27.3MB. 2MB more of indentation saved! Not significant after compression, but parsing time over billions of starts? Definitely worth it.
Makes them have a little more character.
Better lossy compression than JPG, similar compression to AVIF. AVIF ekes out a little more quality at the very low end, and JXL excels at the very high end.
Better lossless compression than PNG.
Supports alpha channels.
Supports parallel decoding.
Significantly faster encoding than other formats like AVIF.
Supports multiple colour spaces and formats, allowing for HDR images.
The colour in JXL is stored in the XYB colour space. A dev states that this colour space gives more bits to darker colours, leading to better encoded dark skin at similar filesizes to other codecs [1].
Supports up to 4096 channels. A practical use of this is in 3D workflows with Physically Based Rendering textures, where a texture has channels for albedo, normal map, reflection, roughness, metalness, and others. They could be compressed into one JXL, much smaller than an EXR with the same channels.
Supports losslessly recompressing existing JPGs into JXL to save space. Those files can also be losslessly (ie byte exact) converted back to JPGs.
Supports progressive decoding. AVIF crucially does _not_ have this.
Progressive decoding also allows for Responsive Images. No longer would you have to encode two images, like 1x or 2x. Encode the 2x image once – you can serve the 1x image _from the 2x image_. Huge feature if browsers were on board.
Supports rudimentary animation (similar to MJPEG, ie only i-frames). Use AVIF for animations.
Has frames/layers. This is a pretty cool feature for an image format. I can see two main uses of this:
1. Non-destructive editing. If you want to add an overlay to a JPG, you have to re-encode the image. JXL allows you to add another frame on-top of the other image, without touching the original.
2. Hybrid lossless/lossy images. For example, a screenshot of a UI that contains a photograph. The UI could be losslessly compressed, and the photo could be lossy-ly compressed. There is already an experimental program within the JXL source that does this.
[1] https://mobile.twitter.com/jonsneyers/status/155021585930558...
edit: If I limit Firefox to 60fps (down from my display's 280hz) then it seems to work fine.
Similar changes were made in newer versions of ES so that the for loop in this article works out of the box, like C#.
Slightly off-topic to this article: I wish "do while" loops had the "while" condition in the inner scope, not the outer scope. So many times I have wished that I could access the inner scope... I end up using a while(true) with an if { break; } at the end instead in 99% of cases where a do while could've been the perfect thing...
Dayjs has the familiar momentjs API.
Both libraries have the greatest differentiating feature from moment: immutable objects. Being able to compose dayjs objects together without fear of modifying them afterwards makes everything a breeze.
In JXL the quality setting has been tuned especially well to give predictable speed/visual quality output. See Jon Sneyers's posts on twitter showing how quality variance is kept minimal: https://twitter.com/jonsneyers/status/1542560897306185729
The trending page otoh is nice and fresh, though I wish they'd change it to prevent already popular repos like typescript from "trending" (why are people starring this? ridiculous.)
When one of my (quite obscure) repos get stars, I feel joy. I like to think starring someone else's repo has that same reaction for them, too.
There are also some sites that popup a small box above your selection with a share box. Straight to hell with those. Compulsive selectors go mad on those sites. That's you, medium.com.
But then: what's to stop websites from detecting you've selected text, unselecting it, and copying the bad text in, and then reselecting it...
There are so many loopholes I can imagine to get around these restrictions :(
So instead of changing their new tab page to require a gesture like all other sites... they decided to allow any website to copy text into the clipboard. Nice.
I think copying into the clipboard needs an overhaul—even with a gesture. Don't you hate when news sites add a "- from XYZ" to your clipboard? That shouldn't be possible. I'm not sure how you'd fix this, but it should be fixed.
[0] crbug.com/1334203
Have it run on a schedule to keep it updated, if necessary. Alternatively, GH Actions allows you to set a manual trigger so you can rebuild whenever.
I think email (and by extension, mail) is traditionally static because the medium never allowed for dynamic updates. I don't see the harm in trying to improve upon that. If a solution is found that allows for full transparency of those updates with sufficient privacy, why not?
Should email stay the same as it has been for another 50 years? I don't think it will.
Not applicable to GitHub etc though.
I'm also not seeing any speed differences when using -y/yarn lockfile. Why not make it the default?
If I install a simple nextjs app, then remove node_modules, the lockfile, and the ~/.bun/install/cache/*.npm files (i.e. keep the contents, remove the manifests) and then install, bun takes around ~3-4s. PNPM is consistently faster for me at around ~2-3s.
I'm not familiar with bun's internals so I may be doing something wrong.
One piece of feedback, having the lockfile be binary is a HUGE turn off for me. Impossible to diff. Is there another format?
* I will mention that even in the best case scenario with PNPM (i.e. lockfile and node_modules) it still takes 400ms to start up, which, yes, is quite slow. So every action APART from the initial install is much MUCH faster with bun. I still feel 400ms is good enough for a package manager which is invoked sporadically. Compare that to esbuild which is something you invoke constantly, and having that be fast is such a godsend.