Better HN
topnewbestaskshowjobs
Log inSign up

wojtek1942

15 karma · joined Aug 22, 2023 (3y ago) · 16 submissions

Submissions

comment 1mo ago · link · parent

Some details and benchmarks were announced but the weights didn’t get released

comment 1mo ago · link · parent

"Experimental does not mean unstable" (2023) https://determinate.systems/blog/experimental-does-not-mean-...

I know not everyone is a fan of DS, but this post has a nice, concise explanation of how to think about the state of flakes.

comment 1y ago · link · parent

The API was released in 2020. It amazes me how many of these kinds of apps are successful simultaneously, while doing nearly the exact same thing.

https://developer.apple.com/documentation/screentime

comment 1y ago · link · parent

Why build a new browser in C++ when safer and more modern languages are available? [1]

> Ladybird started as a component of the SerenityOS hobby project, which only allows C++. The choice of language was not so much a technical decision, but more one of personal convenience. Andreas was most comfortable with C++ when creating SerenityOS, and now we have almost half a million lines of modern C++ to maintain.

> However, now that Ladybird has forked and become its own independent project, all constraints previously imposed by SerenityOS are no longer in effect.

> We have evaluated a number of alternatives, and will begin incremental adoption of Swift as a successor language, once Swift version 6 is released.

[1] https://ladybird.org/#faq:~:text=Why%20build%20a%20new%20bro...?

comment 1y ago · link · parent

> However, this mode switching is expensive! Just this switch alone costs 1000-1500 CPU cycles in pure overhead, before any actual work happens.

...

> On a 3GHz processor, 1000-1500 cycles is about 500 nanoseconds. This might sound negligibly fast, but modern SSDs can handle over 1 million operations per second. If each operation requires a system call, you're burning 1.5 billion cycles per second just on mode switching.

> Package installation makes thousands of these system calls. Installing React and its dependencies might trigger 50,000+ system calls: that's seconds of CPU time lost to mode switching alone! Not even reading files or installing packages, just switching between user and kernel mode.

Am I missing something or is this incorrect. They claim 500ns per syscall with 50k syscalls. 500ns * 50000 = 25 milliseconds. So that is very far from "seconds of CPU time lost to mode switching alone!" right?

comment 1y ago · link · parent

Cool! Even though, my iPhone 15 Pro was misidentified as iPhone 16.

comment 1y ago · link · parent

Why the disappointment with Deno compile? I have not used it but from the website it seems that the end user does not need Deno to be installed. What is the shortcoming you are referring to?

comment 1y ago · link · parent

Seems like it can run on standard container runtimes so you don't specifically need macOS and the container is Linux based. So there is no need to involve macOS at all since you can develop Swift programs on Linux for example.

comment 2y ago · link · parent

It took a bit of time for me to respond because I wanted to make sure I wrote down the info in a nice detailed way. I will update the descriptions on the website to include the information I am proving here to give visitors a better understanding of the options. To be clear, I am not an expert on all this image coding stuff. I just wanted to make a simple tool to let people try out Jpegli because I thought it was interesting even though I don't know so much about the topic.

Progressive Rendering There are 3 options on the website. None, Basic and Enhanced. There correspond respectively to options 0, 1 and 2 for the JXL_ENC_FRAME_SETTING_PROGRESSIVE_DC option [1].

"Set the progressive mode using lower-resolution DC images for VarDCT. Use -1 for the encoder default, 0 to disable, 1 to have an extra 64x64 lower resolution pass, 2 to have a 512x512 and 64x64 lower resolution pass."

So "Basic" provides 1 scan and "Enhanced" provides 2 scans. Here is a detailed description on progressive loading: https://www.thewebmaster.com/progressive-jpegs/

DCT Method I can't really find documentation about DTC Method in libjxl but the options seems to be very similar to the options offered in mozjpeg [2]. They have a detailed explanation on that page I referenced which I won't all copy here. Seems like slow integer is the preferred method as the others are marked as legacy. Maybe I should just remove the options? From my testing the slow integer method has slightly worse compression but it is accurate.

XYB colorspace TBH, the library I am using only supports a few color spaces and it does not include XYB and I have not looked into it much further. Also as you can see I did not really bother to add colorspace settings in general but I might do it later.

[1] https://libjxl.readthedocs.io/en/latest/api_encoder.html#_CP...

[2] https://github.com/mozilla/mozjpeg/blob/6c9f0897afa1c2738d72...

comment 2y ago · link · parent

I'm not so great with design so I didn't really know how to do it near the headline since there is already a subtitle there.

Took me about 2 days to make everything from start to deployment.

Main thing was to get the WASM stuff working but that didn't take too long. I found this git repo [1] that already compiled the stuff I needed to WASM. UI took the most time in the end.

[1] https://github.com/gen2brain/jpegli

comment 2y ago · link · parent

It's on there now

comment 2y ago · link · parent

Thanks! I will try to find a nice place to put it on the home page.

comment 2y ago · link · parent

Hey HN,

I’m a CS student studying in Amsterdam. Usually, I like making native apps as side projects but here is a small web app for a change.

Recently, Google released Jpegli [1]. You might have seen their blog post posted here on HN ~1 month ago [2]. It’s a new JPEG coding library that can compress high-quality images 35% more than traditional JPEG codecs. When I searched for a tool to try this new technique, I was surprised to find nothing. That is why I created this website.

The encoder runs on WebAssembly making it possible to do all the image processing in the browser. This allows for fast results and optimal privacy since images are never sent to my server or anything like that.

Please let me know what you think or if you have any questions!

[1] https://opensource.googleblog.com/2024/04/introducing-jpegli...

[2] https://news.ycombinator.com/item?id=39920644

14.

Show HN: I built an image optimization tool based on Google's new Jpegli encoder(optimize.photos ↗)

11 points · by wojtek1942 · 2y ago · 10 comments