Recent submissions

Comment · 7 days ago
You seem to reason in terms of trying at all costs to block the other players, not to maximize your gain. I agree the ultimate goal is to do better than all the others, but the tactics to get there may involve temporarily favoring other players in win-win exchanges to grow quicker, or to block a third player already far ahead, etc.
Comment · 8 days ago
Nice article!

What surprises me is that the original VLC filter does not use SIMD. Sometimes I wonder why I spent my money on a "modern" CPU with a lot of new features that stay completely ignored by most software I run every day.

Comment · 12 days ago
> you don't even mention the existence of Apple silicon at all?

Given the reasons she lists for not wanting Windows, I can't imagine her entering Apple's closed garden.

Comment · 12 days ago
To be fair, TFA lists more reasons to avoid Windows:

> Mine include the privacy concessions during setup, the years spent waiting for Microsoft to let people put the taskbar on the side of the screen again, and the advertising.

Of course you don't have to agree on all of them, but please don't assume everyone acts only because they can't find a tutorial on the net!

Comment · 12 days ago
> Cheaper, faster, smoother, quieter, wake up every day to a full "tank", less things to go wrong

I agree to everything except waking up every day to a full "tank". That's only if you have your own house. If not, you'll depend on public chargers, so you'll buy "fuel" at premium prices, possibly higher than petrol, and you'll have to move your car at the end of the recharge in the middle of the night to avoid the parking fee.

Comment · 13 days ago
Doing non-trivial anything you slow down compilation, make debugging harder and increase fragility and complexity. Sometimes that's a mistake, sometimes not.

Getting rid of something because someone sometimes abuses it, is short-sighted.

Comment · 13 days ago
I'm sure this research has some higher motivations behind, but I can't help foreseeing an ignobel coming soon!
Comment · 13 days ago
There are a couple of constructs that you end up re-creating as soon as you need non-trivial preprocessing.

One of those is the two-stage CAT, another one is the NARG the article talks about.

__COUNTER__ is going to be added to C29, the next version of the standard, maybe there's hope for __VA_COUNT__ and __CAT__ too!

Comment · 17 days ago
> unless you assume something not-strictly-portable about `(uintptr_t)p`

What's not strictly portable about it?

  padding = -(uintptr_t)p & (align - 1)
The only assumption here is that align is a power of 2, which is guaranteed if it's the result of an alignof().
Comment · 19 days ago
Please be aware that pointer arithmetic is not defined on void * pointers, although many compilers allow it. You had better use char * for "data".

Also, your code is prone to overflow when you add data, used, alignment and size.

And finally, the realloc function could be reworked to do nothing if new_size is <= old_size.

Comment · 20 days ago
To be fair, the article contains 3 methods. The first one is original, the second one is the same algorithm you linked, and the third one is an evolution of it.
Comment · 20 days ago
> zero-initialization via `= {0};` will still leave padding and any data not covered by the smallest elements of unions uninitialized

You really should move to C23 and use ={}.

Comment · 20 days ago
If C was not supposed to be changed to correct its past mistakes, we would still increment with a=+1 instead of a+=1, or we would use something called nunununuC.

> C11 is last C as far as I'm concerned.

Are you sure? I think C23 brought so many enhancements it's a pity to ignore it.

Comment · 20 days ago
If the author is taken aback by '->' vs. '.' and by true and false being 1 and 0, I'm surprised they haven't mentioned digraphs and trigraphs, or the alien <name> syntax for #include!
Comment · 25 days ago
Why do you need an app at all? Can't you just manually set a private VPN in the settings?

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton