flohofwoe

Joined 13 years ago

Karma
23,569
Submissions
6,976
Member since
Oct 15
View on Hacker News

Recent submissions

Comment · 9 hours ago
Well you check the compiler output and profile of course. But "generalized" performance advice like "use reverse loops" hasn't been relevant for a long time, it's a similar myth like "pre-increment is faster than post-increment".
Comment · 1 day ago
C doesn't have an opinion, it allows negative indexing just fine when the index is a signed type (indexing-syntax is just syntax-sugar for pointer arithmetic).
Comment · 1 day ago
> ...counting backwards in a for loop is faster...

Maybe in 1990 ;)

(it's one of many cargo cult wisdom snippets that have become mostly obsolete once C compilers got proper optimizer passes and CPUs got all sorts of pipeling tricks)

Comment · 1 day ago
Eh I don't know, the straightforward solution is still to use a signed loop counter (and signed indices) and only ever use unsigned integer types for bit twiddling. Also, enable `-Wsign-conversion` (it's not in -Wall -Wextra) to catch all the places where the compiler implicitly converts between signed and unsigned behind your back.

TL;DR: "alomost always signed!" :)

Comment · 1 day ago
> The introduction of the mouse led to developers paying less attention to keyboard shortcuts and function keys, but I don’t see anyone seriously saying computers should not have mice.

Well, a lot of devs did move back to the terminal ;)

Comment · 1 day ago
> But the safe decision would be no to enter the train.

You might just as well never leave your bed, that's even safer ;) Train travel is much safer than travelling on roads, and in the same ballpark as commercial flight.

Comment · 1 day ago
Safety systems don't help much when they fail themselves. E.g. usually there are automatic systems in place that prevent that two trains are on the same rail network section at the same time, but this system apparently has failed. Details are in the article.
Comment · 2 days ago
How early it gets dark in winter depends on how far up north you are of course. On my latitude (Germany) it gets dark around 4:30pm and 5:30pm in winter, which for me is late afternoon (6:00pm would then be early evening)
Comment · 2 days ago
Yeah same here, I don't even noticed the time switch this time. I remember it was worse as teenager, so maybe it affects young people more than old farts ;)
Comment · 2 days ago
What? No! I find it utterly depressing to get up in the morning and it's still completely dark outside. A dark late afternoon is much nicer IMHO.
Comment · 2 days ago
It's often used for more immediate 'consequences', like "Ich muß los, sonst verpass ich meinen Zug" (I need to leave, otherwise I'll miss my train).
Comment · 2 days ago
Yeah, but "wenn-dann-sonst" rolls better off the tongue ;)
Comment · 2 days ago
Hmm, to me as native speaker, 'sonst' has pretty much only one meaning which is pretty much exactly 'or else'. There's a longer and 'more archaic' version 'ansonsten'.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton