Topics /

Software Engineering

The most popular blog posts about software engineering on Hacker News. 14,533 posts.

Any year
2162

I sped up serde_json strings by 20%

I have recently done some performance work and realized that reading about my experience could be entertaining. Teaching to think is just as important as teaching to code, but this is seldom done; I think something I’ve done last month is a great opportunity to draw the curtain a bit. serde is the Rust framework for…

2166

The Lost Art of C Structure Packing

This page is about a technique for reducing the memory footprint of programs in compiled languages with C-like structures - manually repacking these declarations for reduced size. To read it, you will require basic knowledge of the C programming language.

2168

A Canadian payroll dependency chart

Unfortunately, like most aspects of the tax system, this steadily increases in complexity, and this year with the Canada Pension Plan including not just "base" premiums and "additional" premiums but also "second additional premiums", I needed to rewrite my spreadsheet from scratch; and also very unfortunately, the…

2176

Minimum Viable Block Chain

Block chain is agnostic of any 'currency' and it can (and will) be adapted to power many other use cases. This is a ground up explanation of why the particular pieces (digital signatures, proof-of-work, transaction blocks) are needed, and how they all come together to form the minimum viable block chain with all of…

2182

Svelte is the most beautiful web framework I've seen

I first heard about Svelte a year ago, when Rich Harris presented it at JSConf EU 2018. The demo gods were a bit harsh on him, but it didn't matter to me, because I was so impressed by his philosophy and ideas that I was already sold. I knew he'd work out the kinks, go through a few major versions, and Svelte would be…

2187

I wrote a Game Boy Advance game in Zig

The Game Boy Advance is an interesting game console. It has a modern-style CPU (32-bit ARM, lots of registers), but uses an old-fashioned tile based renderer like how the NES did it in the 80s. Don’t get me wrong, since its one of Nintendo’s last tile-based systems, they took the idea as far as it can go with fancy…

2188

How Does GPT-4o Encode Images?

Here’s a fact: GPT-4o charges 170 tokens to process each 512x512 tile used in high-res mode. At ~0.75 tokens/word, this suggests a picture is worth about 227 words—only a factor of four off from the traditional saying. (There’s also an 85 tokens charge for a low-res ‘master thumbnail’ of each picture and higher…

2189

XCurl

It is often said that Imitation is the Sincerest Form of Flattery. Also, remember libcrurl? That was the name of the thing Google once planned to do: reimplement the libcurl API on top of their Chrome networking library. Flattery or not, it never went anywhere. The other day I received an email asking me about ……