11,788 karma · joined Mar 23, 2009 (17y ago) · 1,675 submissions
john@john-millikin.com
Currently semi-retired; formerly at Google (2011-2017) and Stripe (2017-2022)
comment 1w ago · link · parent
> Your post reminds me about the ongoing trend where people don't spend
> time together anymore. They prefer to sit in front of their computers
> and interact online.
This is, I think, partially a matter of social circles. The kind of people who enjoy the idea of socialization in an abstract sense but don't actually enjoy the process of socializing will spend all their time indoors on their computers. Meanwhile in the real world people are having a blast. Very few people want to spend time typing on web forums when they could be outside shopping, or dancing, or drinking. > Software brought people together because it's a team sport and it's hard
> to ship anything significant on your own, especially in a short time frame.
> But AI has changed all that. Now we can bring all the isolation that we've
> brought to the rest of society to software development as well.
While trying not to repeat myself unnecessarily, people whose social circles were formed by contributions to online open-source communities have long been viewed by the rest of society as socially impoverished (with some reason). A web forum or chat room isn't real social interaction, not in the same way that going out to a pub or concert or book club is.LLMs are finally offering us computer nerds a way out. We can have the computer write the code and debug the segfaults and babysit the benchmarks while we go outside and have fun. We are free from the keyboard now.
comment 1w ago · link · parent
> but the initial comment is still full of vitriol
If you think this comment is full of vitriol then you should try reading the kinds of emails people send to mailing lists. > It means not being mad anymore at the people and "showing them" by
> using LLMs to the degree where one feels the need to rant on about
> their perceived bad decisions on HN.
I think you're reading things into my comment that aren't there.HN is full of threads lamenting that projects are seeing a decline in community interaction and contributions because LLMs let people vibe-code whatever software they want. I hesitate to use the word "universal", but there's definitely a strong feeling that greenfield LLM-generated projects are in some sense stealing effort or attention that could be put toward an existing project.
I'm sympathetic to that claim on the surface, but the actual experience is that a lot of projects have only had that sort of interaction in the first place because the maintainers forced it as a pre-requisite to getting a patch accepted.
There's some 30 kLoC library out there that decodes an obscure audio codec, it almost works but you need to add some #ifdefs or whatever so it builds on Clang. The would-be user has to mentally prepare themselves for the next few weeks (or months!) of trying to cajole the maintainer into accepting their patch. And maybe it's never accepted, and now you're stuck, and that project goes into the shelf forever.
The article acts as if people with LLMs are the ones whose behavior needs to change to be more pro-social, but from my perspective its the maintainers' attitude that needs to change (if they want their project to continue receiving attention). There's no reason to put up with a maintainer's dictatorial control over a project any more, because the value of code itself is plummeting to epsilon.
> And maybe also see that the people probably did their best. Which may or
> may not have been very good, but they did so nonetheless.
Outcomes have never been judged by whether someone has done their best, but whether they have done well.comment 1w ago · link · parent
I think there's enough history of my contributions to various open-source projects over the past ~20 years to serve as evidence that I go pretty far out of my way to be accommodating to projects that are open to contributions.
> It also reads like a refusal of true disengagement.
I'm not sure what "refusal of true disengagement" means.
My goal is generally to accomplish something like building a piano recital scoring app, or being able to run an old game on my laptop. There's a few dozen steps needed to achieve that, which incrementally go down the stack until it encounters a library that works well enough that I don't need to debug it. Sometimes this is a very short list -- I've been amazed at how well the Vulkan ecosystem works, ditto the Go stdlib and the major Go ecosystem libraries.
But sometimes it's like falling down a ladder, hitting each rung on the way down, in which case I turn to an LLM to make the ladder go away. A lot of C projects seem to be like this -- it's a conservative choice of language in general, for people who saw the rise of C++/Java/C#/Go/Rust/etc and decided to skip them, so the attitudes and tooling are likewise conservative.
> Maybe you can now work on that, given that your profile says you're retired?
Being retired means that I want to spend more time doing fun things and less time arguing about file descriptor lifetimes on mailing lists.
comment 1w ago · link · parent
> Pick one open source tool you use. Find the most annoying thing about
> installing or running it. Spend a weekend fixing it, with the people who
> maintain it. Then tell me about it.
Flex: The most annoying thing is that it's written in C (and is therefore a pain to cross-compile), and it has a runtime dependency on GNU M4, which depends on gnulib (the GNU anti-portability library). Flex is currently being rewritten to be more complicated and worse by ESR for reasons beyond my comprehension.I had an LLM write an m4 implementation in Rust based on the POSIX specs, then fuzz-test it against GNU M4 until it was mostly the same (modulo all the regex bugs it found in GNU M4). Then I had an LLM rewrite Flex in Rust, using rust-m4 as an in-process library.
QEMU: It's written in C, has a bunch of huge dependencies, automated test coverage that rounds to zero, their main contribution path is a mailing list that sometimes swallows patches, and the maintainers might ask for a risky patch to be made more risky before they'll accept it. I went through that process once for a few relatively minor fixes and never want to do it again.
I had an LLM write a multi-architecture emulator with a JIT, high test coverage, and a device plugin system that uses WebAssembly.
Busybox: Written in C, huge pain to build. I tried switching to Toybox instead but it's incomplete, the build system involves a pile of shell scripts that require Bash, not any other POSIX-compliant shell (including its own), and the maintainer's response was basically to tell me to fuck off: https://lists.landley.net/pipermail/toybox/2024-October/0095...
I had an LLM write a replacement in Rust that has enough shell builtins to run an autoconf script from within a hermetic build environment, and its only build-time dependency is rustc.
---
You know why LLMs are so great? Because they save me from having to interact with open-source maintainers who intentionally choose to make their software baroque and their contribution process obnoxious.
You want your project to be written only in ANSI C89 and built with Meson and accept patches only via GPG-signed email to a mailing list that silently drops HTML? Fine, have fun, an ASIC somewhere in Iowa is going to spend the next 3 hours letting me forget your project exists.
5.
Retroviral insertions contributed to divergence of human and chimpanzee brains(science.org ↗)
4 points · by jmillikin · 1mo ago · discuss
comment 1mo ago · link · parent
7.
740 points · by jmillikin · 2mo ago · 199 comments
comment 4mo ago · link · parent
9.
Announcing Zstandard in Rust(trifectatech.org ↗)
63 points · by jmillikin · 5mo ago · 8 comments
comment 6mo ago · link · parent
> The mathematician and the blog author are not the same person
> (as you seem to understand). Nathanson (the mathematician) is
> the one who is the expert verifier. He is the person who has
> the higher value and won't be fired in some hypothetical.
The article's author is https://en.wikipedia.org/wiki/Timothy_Gowerscomment 10mo ago · link · parent
It's not obvious to me that per-page checksums in an archive format for comic books are useful at all, but if you really wanted them for some reason then crc32 (fast, common, should detect bad RAM or a decoder bug) or sha256 (slower, common, should detect any change to the bitstream) seem like reasonable choices and xxhash/xxh3 seems like LARPing.
comment 10mo ago · link · parent
> It seems that JPEG can be decoded on the GPU [1] [2]
Sure, but you wouldn't want to. Many algorithms can be executed on a GPU via CUDA/ROCm, but the use cases for on-GPU JPEG/PNG decoding (mostly AI model training? maybe some sort of giant megapixel texture?) are unrelated to anything you'd use CBZ for.For a comic book the performance-sensitive part is loading the current and adjoining pages, which can be done fast enough to appear instant on the CPU. If the program does bulk loading then it's for thumbnail generation which would also be on the CPU.
Loading compressed comic pages directly to the GPU would be if you needed to ... I dunno, have some sort of VR library browser? It's difficult to think of a use case.
> According to smhasher tests [3] CRC32 is not limited by memory bandwidth.
> Even if we multiply CRC32 scores x4 (to estimate 512 bit wide SIMD from 128
> bit wide results), we still don't get close to memory bandwidth.
Your link shows CRC32 at 7963.20 MiB/s (~7.77 GiB/s) which indicates it's either very old or isn't measuring pure CRC32 throughput (I see stuff about the C++ STL in the logs).Look at https://github.com/corsix/fast-crc32 for example, which measures 85 GB/s (GB, GiB, eh close enough) on the Apple M1. That's fast enough that I'm comfortable calling it limited by memory bandwidth on real-world systems. Obviously if you solder a Raspberry Pi to some GDDR then the ratio differs.
> The 32 bit hash of CRC32 is too low for file checksums. xxhash is definitely
> an improvement over CRC32.
You don't want to use xxhash (or crc32, or cityhash, ...) for checksums of archived files, that's not what they're designed for. Use them as the key function for hash tables. That's why their output is 32- or 64-bits, they're designed to fit into a machine integer.File checksums don't have the same size limit so it's fine to use 256- or 512-bit checksum algorithms, which means you're not limited to xxhash.
> Why would you need to use a cryptographic hash function to check integrity
> of archived files? Quality a non-cryptographic hash function will detect
> corruptions due to things like bit-rot, bad RAM, etc. just the same.
I have personally seen bitrot and network transmission errors that were not caught by xxhash-type hash functions, but were caught by higher-level checksums. The performance properties of hash functions used for hash table keys make those same functions less appropriate for archival. > And why is 256 bits needed here? Kopia developers, for example, think 128
> bit hashes are big enough for backup archives [4].
The checksum algorithm doesn't need to be cryptographically strong, but if you're using software written in the past decade then SHA256 is supported everywhere by everything so might as well use it by default unless there's a compelling reason not to.For archival you only need to compute the checksums on file transfer and/or periodic archive scrubbing, so the overhead of SHA256 vs SHA1/MD5 doesn't really matter.
I don't know what kopia is, but according to your link it looks like their wire protocol involves each client downloading a complete index of the repository content, including a CAS identifier for every file. The semantics would be something like Git? Their list of supported algorithms looks reasonable (blake, sha2, sha3) so I wouldn't have the same concerns as I would if they were using xxhash or cityhash.
comment 10mo ago · link · parent
---
For example they make a big deal about each archive entry being aligned to a 4 KiB boundary "allowing for DirectStorage transfers directly from disk to GPU memory", but the pages within a CBZ are going to be encoded (JPEG/PNG/etc) rather than just being bitmaps. They need to be decoded first, the GPU isn't going to let you create a texture directly from JPEG data.
Furthermore the README says "While folders allow memory mapping, individual images within them are rarely sector-aligned for optimized DirectStorage throughput" which ... what? If an image file needs to be sector-aligned (!?) then a BBF file would also need to be, else the 4 KiB alignment within the file doesn't work, so what is special about the format that causes the OS to place its files differently on disk?
Also in the official DirectStorage docs (https://github.com/microsoft/DirectStorage/blob/main/Docs/De...) it says this:
> Don't worry about 4-KiB alignment restrictions
> * Win32 has a restriction that asynchronous requests be aligned on a
> 4-KiB boundary and be a multiple of 4-KiB in size.
> * DirectStorage does not have a 4-KiB alignment or size restriction. This
> means you don't need to pad your data which just adds extra size to your
> package and internal buffers.
Where is the supposed 4 KiB alignment restriction even coming from?There are zip-based formats that align files so they can be mmap'd as executable pages, but that's not what's happening here, and I've never heard of a JPEG/PNG/etc image decoder that requires aligned buffers for the input data.
Is the entire 4 KiB alignment requirement fictitious?
---
The README also talks about using xxhash instead of CRC32 for integrity checking (the OP calls it "verification"), claiming this is more performant for large collections, but this is insane:
> ZIP/RAR use CRC32, which is aging, collision-prone, and significantly slower
> to verify than XXH3 for large archival collections.
> [...]
> On multi-core systems, the verifier splits the asset table into chunks and
> validates multiple pages simultaneously. This makes BBF verification up to
> 10x faster than ZIP/RAR CRC checks.
CRC32 is limited by memory bandwidth if you're using a normal (i.e. SIMD) implementation. Assuming 100 GiB/s throughput, a typical comic book page (a few megabytes) will take like ... a millisecond? And there's no data dependency between file content checksums in the zip format, so for a CBZ you can run the CRC32 calculations in parallel for each page just like BBF says it does.But that doesn't matter because to actually check the integrity of archived files you want to use something like sha256, not CRC32 or xxhash. Checksum each archive (not each page), store that checksum as a `.sha256` file (or whatever), and now you can (1) use normal tools to check that your archives are intact, and (2) record those checksums as metadata in the blob storage service you're using.
---
The Reddit thread has more comments from people who have noticed other sorts of discrepancies, and the author is having a really difficult time responding to them in a coherent way. The most charitable interpretation is that this whole project (supposed problems with CBZ, the readme, the code) is the output of an LLM.
comment 10mo ago · link · parent
* CNN (cnn.com): News-related photos on their front page
* Reddit (www.reddit.com): User-provided images uploaded to their internal image hosting
* Amazon (amazon.com): Product categories on the front page (product images are in WebP)
I wouldn't expect to see a lot of WebP on personal homepages or old-style forums, but if bandwidth costs were a meaningful budget line item then I would expect to see ~100% adoption of WebP or AVIF for any image that gets recompressed by a publishing pipeline.
comment 10mo ago · link · parent
Also from a security perspective the reference implementation of JPEG-XL isn't great. It's over a hundred kLoC of C++, and given the public support for memory safety by both Google and Mozilla it would be extremely embarrassing if a security vulnerability in libjxl lead to a zero-click zero-day in either Chrome or Firefox.
The timing is probably a sign that Chrome considers the Rust implementation of JPEG-XL to be mature enough (or at least heading in that direction) to start kicking the tires.
18.
First-class custom smart pointers(nadrieril.github.io ↗)
3 points · by jmillikin · 1y ago · discuss
19.
Progress update on Clang's new constant expression interpreter(developers.redhat.com ↗)
2 points · by jmillikin · 1y ago · discuss
comment 1y ago · link · parent
21.
Introduction to reverse-engineering vintage synth firmware(ajxs.me ↗)
196 points · by jmillikin · 1y ago · 27 comments
22.
The biggest semantic mess in Futhark(futhark-lang.org ↗)
63 points · by jmillikin · 1y ago · 8 comments
comment 1y ago · link · parent
Ctrl+F for "NonStop" in https://lwn.net/Articles/998115/
comment 1y ago · link · parent
By the time YAML 1.2 had been published and implementations written, greenfield projects were using either JSON5 (a true superset of JSON) or TOML.
> While JSON numbers are grammatically simple, they're almost always distinct
> from how you'd implement numbers in any language that has JSON parsers,
> syntactically, exactness and precision-wise.
For statically-typed languages the range and precision is determined by the type of the destination value passed to the parser; it's straightforward to reject (or clamp) a JSON number `12345` being parsed into a `uint8_t`.For dynamically-typed languages there's less emphasis on performance, so using an arbitrary-precision numeric type (Python's Decimal, Go's "math/big" types) provide lossless decoding.
The only language I know of that really struggles with JSON numbers is, ironically, JavaScript -- its BigInt type is relatively new and not well integrated with its JSON API[0], and it doesn't have an arbitrary-precision type.
[0] See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... for the incantation needed to encode a BigInt as a number.
25.
Tracking source locations in the Futhark compiler(futhark-lang.org ↗)
43 points · by jmillikin · 1y ago · discuss
26.
Hacking Coroutines into C(wiomoc.de ↗)
160 points · by jmillikin · 1y ago · 42 comments
27.
Bin2Wrong: A fuzzer for uncovering semantic errors in binary-to-C decompilers [pdf](futures.cs.utah.edu ↗)
3 points · by jmillikin · 1y ago · discuss
28.
Unsoundness and accidental features in the #[target_feature] attribute(predr.ag ↗)
3 points · by jmillikin · 1y ago · discuss
29.
Using the Internet without IPv4 connectivity(jamesmcm.github.io ↗)
296 points · by jmillikin · 1y ago · 130 comments