Hacker Newsnew | past | comments | ask | show | jobs | submit | hencoappel's commentslogin

Guessing they meant K&R style C?


Found this video a good explanation. https://youtu.be/xuUM84dvxcY?si=VPBEsu8wz70vWbX4


Thanks. (Why does he keep pointing at me?)


Zig uses ZeroVer so don't expect it to ever hit 1.0.

https://0ver.org/


Is that versioning site supposed to be some kind of joke? I can't really figure out if they are joking or serious - the tone comes off as joking, but it could be read as serious too.


I guess you're being Poe's lawwed but it's definitely a joke


Something like the SQL Server Management Studio execution plan view?

https://learn.microsoft.com/en-us/sql/relational-databases/p...




Agreed Chrome is good on mobile. But I can't stand browsing without uBlockOrigin or dark reader. Plus URL bar on the bottom in Firefox is brilliant.


Lol that was the hard part getting used to...thanks for suggestions I will try with uBlockOrigin.


Given it's such a hot part of their code, I'm genuinely surprised they didn't go down the state machine route for as optimal a solution, or even further and made use of vector instructions. Maybe Rust can autovectorise the code though.


> 100k lines of multithreaded C++ Just for a JPEG library. Damn!


I don't know where that line count comes from. It looks like libjxl has 38314 lines (https://app.codecov.io/gh/libjxl/libjxl/tree/main/lib%2Fjxl) at the moment.


and that 38 kloc includes the encoder, psychovisual model, etc. etc. that are not needed for the decoder

current decoder is around 20 kloc


I think Highway is a critical component for libjxl and has to be counted towards the line count. (CMS can be ignored here, and any Rust implementation should ideally use qcms [1] which is already in use in Firefox anyway.)

[1] https://github.com/FirefoxGraphics/qcms


Personally, I'm on the edge on this one. I think both viewpoints are valid.

One way to think of Highway is that it is portable multi-platform SIMD intrinsics for C++. While we developed it originally as a part of JPEG XL, it has long ago graduated into a general-purpose library that has various uses, including the recent Gemma.cpp ML launch. Other modern highway uses include: Audio, Browsers, Computational biology, Computer graphics, Cryptography, Grok JPEG 2000, JPEGenc, Jpegli, OpenHTJ2K, Image processing, Image viewers, Information retrieval, Machine learning, Numpy, and Robotics... (copied from: https://github.com/google/highway)

I derived the name from the CityHash, FarmHash, and then HighwayHash series, and considered that Highway would link this library to its roots in the HighwayHash (of course much is also based on Jan's previous work with SIMD). Notably, I resisted using the -li naming here :-D


Indeed, though Highway is approaching a system library at this point. It is also a thin wrapper over the compiler's intrinsics headers: e.g. ~16KLOC for arm_neon.h, times the number of targets. That's a lot of code, but it is not comparable with actual codec logic lines.


I'm also surprised by this number. Granted it's not just old JPEG standard, still 100k sounds like a lot for a decoder.


It's the encoder as well, plus converter code for things like JPEG reading as well, and JPEG XL supports animation...


I guess the original comment in TFA is a little bit misleading, then.

> of the reference decoder (currently behind a pref in Firefox Nightly), which weighs in at more than 100,000 lines of multithreaded C++


That number includes all the different extra tools in the repo, and all tests. And as mentioned, the encoder.


There must be a lot of edge cases that were discovered over the years.


Yeah, this is just wrong about Flutter/Dart.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: