HNHacker News
TopNewBestAskShowJobs

atiedebee

336 karma · joined May 20, 2024

submissionscomments
atiedebee··on Google's AI buildout drove 37% increase in electricity use in 2025
> But the tech giant says it kept operational carbon emissions down by continuing to purchase massive amounts of clean energy.

I never got this line of reasoning. If you are using 37% energy and you buy it from providers of clean energy, doesn't that mean that someone else won't be able to use that energy and will have to use fossil fuels anyways? It's the equivalent of "reducing" a country's emissions by forcing companies to move to a country where they ARE allowed to pollute and just importing the produce from there.

atiedebee··on FFmpeg 9.1's new AAC encoder
They have hardware decoders for JPEG? I have never heard of this and it seems overkill considering how simple it is to decode.
atiedebee··on Professor denounces mass AI fraud on an exam at Brown
By cheating you gain a certificate that says you can do things which you cannot. The difference between cheating in university and forging a degree is the time it takes.

When going to a doctor, you wouldn't want them to have cheated for their exams during training. You expect them to be well equipped to practice medicine and to ensure you get correct diagnoses and care. When hiring a programmer or software engineer, you should expect them to be able to provide you a proper, well architected application given the requirements.

atiedebee··on Hellishly Slow Level 13 Deflate Compression
Except that brotli uses Huffman coding. It's main claim to fame is using higher order statistics to select a Huffman table and its built-in dictionary.

This class of compression programs sees larger differences due to the way the data is modelled instead of the specific entropy coder used.

atiedebee··on Overfitted a 900KB Transformer to Compress a 100MB CSV into 7MB
Which slice? The large text compression benchmark uses enwik8 for a "smaller" input that is easily reproducible. The predictability of enwik9 can vary significantly depending on where in the file you are, as shown by Matt Mahoney https://www.mattmahoney.net/dc/textdata.html
atiedebee··on PivCo-Huffman “merge” operations
It depends on the format. Brotli switches the Huffman codes used based on the previously decoded bytes, but gzip and bzip2 for example use the same Huffman codes for a bigger block of data. But even then, there might be some more details that you'd need to work out, like the decoding of LZ offsets.
atiedebee··on The Green Side of the Lua
I imagine you would want to test "idiomatic" code for these comparisons. It doesn't make much sense to compile with C++ and write everything in C.
atiedebee··on Bytecode VMs in surprising places (2024)
Another interesting one is the ZPAQ compression program[1]. It is one of the top performers on the large text compression benchmark[2] and uses the bytecode to specify how to model the data.

[1]: https://en.wikipedia.org/wiki/ZPAQ

[2]: https://mattmahoney.net/dc/text.html

atiedebee··on Rars: a Rust RAR implementation, mostly written by LLMs
I hope the brakes in my car don't need developers
atiedebee··on Claude Code refuses requests or charges extra if your commits mention "OpenClaw"
Does HN randomly charge you money for using these phrases?
atiedebee··on Show HN: I built a Cargo-like build tool for C/C++
I made a program with some inline assembly and tried O3 with clang once. Because the assembly was in a loop, the compiler probably didn't have enough information on the actual code and decided to fully unroll all 16 iterations, making performance drop by 25% because the cache locality was completely destroyed. What I'm trying to say, is that loop unrolling is definitely not a guarantee for faster code in exchange for binary size
atiedebee··on What 81,000 people want from AI
> I don't know about survival bias. LLMs are well suited to this task of taking in this cloud of soft data like a description of symptoms and spitting out a potential diagnosis.

And it will do so confidently and incorrectly. A single description of symptoms from a patient is very unlikely to be enough. This is why doctors are there to ask follow-up questions and do examinations. Symptoms alone can describe a dozen different illnesses.

atiedebee··on JPEG Compression
A lot of them are better in many areas. JPEG is just good enough (tm)
atiedebee··on An ode to bzip
bzip3 is very different from bzip2. It is not even made by the same person and is not nearly as ubiquitous.
atiedebee··on TUI Studio – visual terminal UI design tool
> I know this position is wrong, but it feels hard to spend my time on something that someone else might not have spent the time to create

I don't think that position is wrong. I felt similarly when tutoring a high-school student recently. They didn't do any work themselves, they were forced by their parent to come to me two days before a test. I offered to help, but when I realized that the student didn't care enough to study by themselves, I basically lost all motivation to help them.

It feels the same with AI-generated content. If the "creator" didn't care to spend time on it, why should I spend mine?

atiedebee··on What every compiler writer should know about programmers (2015) [pdf]
ISO C99 actually defines multiple types of deviating behaviour. What you're describing is closer to implementation-defined behaviour than anything else.

The three behaviours relevant in this discussion, from section 3.4:

  3.4.1 implementation-defined behavior
  unspecified behavior where each implementation documents how the choice is made
  EXAMPLE An example of implementation-defined behavior is the propagation of the high-order bit when a signed integer is shifted right.

  3.4.3 undefined behavior
  behavior, upon use of a nonportable or erroneous program construct or of erroneous data, for which this International Standard imposes no requirements
  Possible undefined behavior ranges from ignoring the situation completely with unpredictable results, to behaving during translation or program execution in a documented manner characteristic of the environment (with or without the issuance of a diagnostic message), to terminating a translation or execution (with the issuance of a diagnostic message).
  An example of undefined behavior is the behavior on integer overflow.

  3.4.4 unspecified behavior
  behavior where this International Standard provides two or more possibilities and imposes no further requirements on which is chosen in any instance
  An example of unspecified behavior is the order in which the arguments to a function are evaluated.
K&R seems to also mention "undefined" and "implementation-defined" behaviour on several occasions. It doesn't specify what is meant by undefined behaviour, but it does indeed seem to be "whatever happens, happens" instead of "you can do whatever you want." But ISO C99 seems to be a lot looser with their definition.

Using integer overflow, as in your example, for optimization has been shown to be beneficial by Charles Carruth in a talk he did at CppCon in 2016.[1] I think it would be best to have something similar to Zig's wrapping and saturating addition operators instead, but for that I think it is better to just use Zig (which I personally am very willing to do once they reach 1.0 and other compiler implementations are available).[2]

[1] https://youtu.be/yG1OZ69H_-o?si=x-9ALB8JGn5Qdjx_&t=2357 [2] https://ziglang.org/documentation/0.15.2/#Operators

atiedebee··on A header-only C vector database library
Recompiling the dependencies should only really happen if you change the file with the implementation include (usually done by defining <library>_IMPLEMENTATION or something like that.
atiedebee··on Guix for Development
I checked the spec and Scheme R5RS does have lazy evaluation in the form of promises using "delay" and "force", but I can see why explicitly having to put those everywhere isn't a good solution.
atiedebee··on Guix for Development
Im very familiar with Nix or the language, but why would interpreting guile scheme for package management be expensive? What are guix and nix doing that would require evaluating everything lazily for good enough performance?
atiedebee··on ISO PDF spec is getting Brotli – ~20 % smaller documents with no quality loss
Ran the tests again with some more files, this time decompressing the pdf in advance. I picked some widely available PDFs to make the experiment reproducable.

  file            | raw         | zstd       (%)      | brotli     (%)     |
  gawk.pdf        | 8.068.092   | 1.437.529  (17.8%)  | 1.376.106  (17.1%) |
  shannon.pdf     | 335.009     | 68.739     (20.5%)  | 65.978     (19.6%) |
  attention.pdf   | 24.742.418  | 367.367    (1.4%)   | 362.578    (1.4%)  |
  learnopengl.pdf | 253.041.425 | 37.756.229 (14.9%)  | 35.223.532 (13.9%) |
For learnopengl.pdf I also tested the decompression performance, since it is such a large file, and got the following (less surprising) results using 'perf stat -r 5':

  zstd:   0.4532 +- 0.0216 seconds time elapsed  ( +-  4.77% )
  brotli: 0.7641 +- 0.0242 seconds time elapsed  ( +-  3.17% )
The conclusion seems to be consistent with what brotli's authors have said: brotli achieves slightly better compression, at the cost of a little over half the decompression speed.
atiedebee··on ISO PDF spec is getting Brotli – ~20 % smaller documents with no quality loss
I wasn't sure. I just went in with the (probably faulty) assumption that if it compresses to less than 90% of the original size that it had enough "non-randomness" to compare compression performance.
atiedebee··on ISO PDF spec is getting Brotli – ~20 % smaller documents with no quality loss
I thought the same, so I ran brotli and zstd on some PDFs I had laying around.

  brotli 1.0.7 args: -q 11 -w 24
  zstd v1.5.0  args: --ultra -22 --long=31 
                 | Original | zstd    | brotli
  RandomBook.pdf | 15M      | 4.6M    | 4.5M
  Invoice.pdf    | 19.3K    | 16.3K   | 16.1K
I made a table because I wanted to test more files, but almost all PDFs I downloaded/had stored locally were already compressed and I couldn't quickly find a way to decompress them.

Brotli seemed to have a very slight edge over zstd, even on the larger pdf, which I did not expect.

atiedebee··on King – man + woman is queen; but why? (2017)
> There is no common word for Queen in Germanic languages

Correct me if I am misunderstanding what you meant, but Dutch has koningin and German has Königin? They are basically a feminized version of king.

atiedebee··on Every country should set 16 as the minimum age for social media accounts
Wait, how is that different from WhatsApp?
atiedebee··on Package managers keep using Git as a database, it never works out
I think they meant the gameplay side of things instead of the engine
atiedebee··on Programmers and software developers lost the plot on naming their tools
Its interesting how early programming languages are mentioned as having proper names. In the 60s we went from BCPL to B to C. B and C are not descriptive at all. Should they have been named "operating systems language" or "portable Unix language" instead? I also fail to see how AWK is a well named tool according to these metrics. The initials of the creators dont tell you anything about what it actually is or does.
atiedebee··on Giving C a superpower: custom header file (safe_c.h)
Does it support C99 with VLAs yet?
atiedebee··on From VS Code to Helix
I used vim for about one year before switching to kakoune.

Using vim motions in Intellij or just vim hasn't been a problem for me at all. I don't use very advanced shortcuts (the most complicated motions I ever use are ciw and the likes). Even though they are quite different (ciw is <alt>iwc in kakoune) I adjust to them quite easily. Kakoune has also helped me get better at using vim because there is quite some overlaps that are more discoverable in kakoune (<alt>i summons a clippy that shows all the different objects you can select)

atiedebee··on Generalized K-Means Clustering
It's used for vector quantization which can be used for color quantization
atiedebee··on Scripts I wrote that I use all the time
In C I've personally always just done 'a' + x, no table needed
← PreviousPage 2 of 6Next →