1,521 karma · joined August 14, 2022
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.
Given the reasons she lists for not wanting Windows, I can't imagine her entering Apple's closed garden.
> 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!
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.
Getting rid of something because someone sometimes abuses it, is short-sighted.
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!
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().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.
You really should move to C23 and use ={}.
> 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.
> The repository ships machine files for H100, H200, B200, A100, MI300X, Apple M4 and multi-GPU nodes
So it seems it won't work out of the box.
Every chip? For example if I target an Intel Meteor Lake (I'm not picking a niche one), does it compile for this CPU, its integrated NPU and its Arc GPU?
Because it sells well? Because it's what a significant portion of people want?
> Its pretty obvious where the future is headed for personal vehicles
"Where", yes. "When" is a big question mark. If the transition will take several years to complete, which many bet it will, it makes perfectly sense to offer a car that people is willing to buy in the meanwhile.
The Chinese brands that you mention also offer hybrids: indeed most BYDs I see in the streets have the "DMi" tag, which is BYD's codename for hybrid. And they are investing in fuel engines, too. Only short-sighted euro burocrats think that since EV are the future we should immediately stop selling and innovating fuel cars.
You surely mean that it is not recognized as plug-in hybrid vehicle.
I'm the author of the example. I wanted to keep it as simple as possible, and this is the most common form of for loop. I was sure that HN readers would be clever enough to "map" it to whatever they have in their mind that satisfy the undecidability of the condition.
But since you're nitpicking, I haven't specified the types of i and n: i is uint8_t and n is uint32_t. Does it terminate? It depends on the value of n!
Forget if "i<n" is decidable or not: the sense is that there will always be some loops that the compiler can't determine if it's finite or not.
Forget if A and B can alias or not: the sense is having two independent actions that can be executed in the same loop or in two consecutive loops.
Let's see... what about the following example, that replaces all a's with @ and all e's with & in a zero-terminated string s?
for (char *p=s; *p; p++)
if (*p=='a')
*p='@';
for (char *p=s; *p; p++)
if (*p=='e')
*p='&';
If a compiler is allowed to assume that the first loop terminates, then it may optimize it to: for (char *p=s; *p; p++) {
if (*p=='a')
*p='@';
if (*p=='e')
*p='&';
}
Is this explanation less insane?Because you explicitly mentioned details that belong in the implementation, not in the semantic:
> A halt/abort instruction that trashes [the] state would be undesirable
If you want to attach a debugger, then use a breakpoint, don't try to obtain the same effect within the code.
for (i=0;i<n;i++)
A[i]=0;
for (i=0;i<n;i++)
B[i]=0;
It can be conveniently transformed into this: for (i=0;i<n;i++)
A[i]=B[i]=0;
They are exactly equivalent except if the first loop never terminates.Now, the compiler could try to understand if the first loop does or doesn't terminate, and apply or not the optimization accordingly, but Turing tought us that is indeed a hard task!
Or it could decide to never apply it, for fear of those rare and usually pathological cases where the first loop doesn't terminate.
Or it could decide to apply it by default and accept that in those cases the program does something different than what the source code says. The latter is better known as UB.
The third option won, and that's why infinite loops are UB in the standard.
If you write a loop to zero out some memory, it can be compiled to a loop, or to a call to an optimized predefined function, or even to a sequence of single zeroing instructions, if the size is small enough.
Even a single statement as a=0 may be compiled to a "load immediate" instruction, or an "XOR with itself", or a "sub with itself", or a move from another register known to be 0.
I don't buy this. Finding collisions is pretty easy. In one repository I have these files:
rank2.cpp
rank4.cpp
rankN.cpp
The last two have the same case-insensitive Base84 encoding: mz{QkARW;1cB
mz{QkaRW;1cBReading it on my phone, I beg to differ.