Trimming down APIs, whee

Or maybe I'll play video games, whee

Either way, whee!

Interesting failure mode on WSL2 ... I typed in "rustup update" while the Linux kernel was booting, and it ran soon enough after boot that random numbers weren't ready yet! (Ran again after a couple seconds and it was fine.)

thread 'main' panicked at 'could not initialize thread_rng: All entropy sources failed (permanently unavailable); cause: getrandom not ready (not ready yet); cause: Resource temporarily unavailable (os error 11)

Song that pops in your head when you see a SPAM™ reference

I first wrote this a few months ago, and it's my biggest Rust project so far. Works well, runs on Windows/Mac/Linux x86/x86_64/arm64, and has a primitive C API alongside the slightly funky Rust API. (Not guaranteed stable!)

Parallelizes PNG compression at a small cost to size.

Uploaded mtpng crate 0.1.0 --

No documentation and the API's not very stable... but this reserves my project name and gives me an impulse to fix those things up proper. ;)

Want to try using it in GNOME and Firefox for large screenshots, which are slow to compress on slow CPUs but can parallelize well with mtpng.

Chromium's ARM64 codegen is MUCH better than Firefox's. ogv.js WebAssembly codecs run twice as fast... and then I get further bonuses from the SIMD implementation on my experimentally optimized AV1 decoder. :D

Hits 720p with only a few dropped frames on this test. (Of course native it does better!)

Ah, I forgot a parameter on xcopy when copying the files over to the ARM64 machine. :D

Silly me.

Finished, but something's awry, possibly because I didn't clear the build dir in between changing settings (ooops).

Tweaking again to a release build (since I want to test performance) and starting with a fresh build dir.

Now, back to video games and ice cream while that compiles. ;)

mtpng now builds for Windows ARM64 even with the libz-sys C dependency! Turns out the necessary plumbing is in cc-rs but was getting mucked up by my trying to manually set up the environment. :D

It got up to maybe 60% through the build when I realized I hadn't enabled "jumbo builds" (aka "unity builds", concatenating C++ files together to minimize header reprocessing and such).

Restarted it, it'll probably finish faster than if I'd just let it run... :)

I love the idea of a direct visualization of the LISP heap, showing as regions are allocated and freed.

It's so hard to visualize a whole system at modern levels with many gigabytes and multiple levels of indirection, but I'd love to see a good realtime animated viz of, say, how memory objects move around in your Firefox process as you're browsing. :)

Set PYTHONPATH=c:\src\depot_tools\third_party and we'll see if it fares better...

Hit the python import error again, think it was pulling in one of my local python installs over the chromium-built-tools-provided one. Just nuked em and we'll try again.

Building big projects like browsers on Windows tends to be weird, involving an install of some funky custom tooling. Hopefully they won't fight each other too badly. ;)

It died about 1/7th through the build with something missing the python 'six' module. Installed it manually and restarted from there...

Quantum computing could solve long software compile times, as long as you're in the parallel universe where the bits are already in post-compilation order at the start of the build.

Show more
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either! We adhere to an adapted version of the TootCat Code of Conduct and have documented a list of blocked instances. Ash is the admin and is supported by Fuzzface, Brian!, and Daniel Glus as moderators. Hosting costs are largely covered by our generous supporters on Patreon – thanks for all the help!