Top posts

Every blog post that took off on Hacker News, ranked by the votes of its best submission. 21,820 posts.

Software Engineering
Any year
4247

A Branchless UTF-8 Decoder

This week I took a crack at writing a branchless UTF-8 decoder: a function that decodes a single UTF-8 code point from a byte stream without any if statements, loops, short-circuit operators, or other sorts of conditional jumps. You can find the source code here along with a test suite and benchmark:

4248

Broken Links

I’ve been getting madder and madder about the increasing use of dorky web links; for example, twitter.com/timbray has become twitter.com/#!/timbray . Others have too; see Breaking the Web with hash-bangs and Going Postel . It dawns on me that a word of explanation might be in order for those who normally don’t worry…

4255

The string type is broken

My previous article, “We don’t need a string type“, caused a bit of stir. Though the feedback is mixed, there is a common theme of a string being a useful feature. After doing a bit more research I can determine only one thing: most current string types are broken! Many of us believe our strings […]

4257

Clang-11.0.0 Miscompiled SQLite

It appears that the clang-11.0.0 compiler mis-compiles sqlite3.c version 3.32.1. I have checked in a change to SQLite that appears to work around the problem. But there might be other bugs. Therefore, use clang-11.0.0 with caution and test your applications carefully!