burntcaramel

Joined 12 years ago

Karma
468
Submissions
170
Member since
Aug 28
View on Hacker News

Recent submissions

Comment · 6 days ago
Comment · 28 days ago
Comment · 28 days ago
I’ve compiled libwebp to WebAssembly and made a web page to use it: https://qip.dev/webp-to-png

You can also run the same wasm on the command line:

  npx @qip.dev/qipx qip.dev run \
    image/webp/webp-to-ktx2-r8g8b8a8-srgb.wasm \
    image/ktx2/ktx2-r8g8b8a8-or-b8g8r8a8-srgb-to-png.wasm \
    < input.webp > output.png
Comment · 1 month ago
Now with Mojo and WebAssembly I notice 3 different approaches for platform-independent SIMD. For examples operating on an array of floats:

- WebAssembly: 4 float32s

- Mojo: N float32s where N is a compile-time parameter

- Go simd: vector of float32s

Comment · 1 month ago
Comment · 1 month ago
I’ve been surprised how feasible static allocation has been. I thought it would be too restrictive and you’d be constantly hitting a wall. I’m writing WebAssembly in Zig/Odin/C and I’ve been able to have a linter reject the `memory.grow` wasm instruction and just use fixed-sized buffers in my code.

It me you think “ok, how big do I want the maximum image to be?” I’ve settled on 25 megapixels, which in the hundreds of megabytes. Since most images are much smaller, I believe on all mainstream hosts the memory isn’t paged in until it is first read/write so the memory footprint is much smaller.

Comment · 2 months ago
From listening to Chris Lattner in interviews my guess it’s learning from when Swift became open source. The beta versions of Swift had massive language changes in how value types worked like with Array. Mojo is trying to get this language design locked down first, which is easier to do behind closed doors.

A compiler promising source stability is a different commitment than the compiler’s code being ready for outside contributors. Which is also different to having ABI stability, which took until 5.0 for Swift to achieve (I think Mojo does not have ABI stability as a goal as it doesn’t have to link to OS frameworks).

Comment · 2 months ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton