5,570 karma · joined Oct 5, 2013 (13y ago) · 1,210 submissions
comment 3y ago · link · parent
Does anyone have insight in what the negative effects here are, if any? It feels like this should be problematic, but I just can't put my finger on what problems this is creating. Like e.g. extracting oil to create single-use plastics that get put in a landfill after usage: it sounds bad, but what's actually the problem (assuming the whole process is done without burning any of the oil - which afaik is possible)?
comment 3y ago · link · parent
The optimizers from GCC and Clang aren't usable just for C/C++. Both compilers have frontends for different languages that share the optimization pipeline. For example, GCC has a D frontend, and the Zig compiler has a LLVM backend.
comment 4y ago · link · parent
comment 4y ago · link · parent
So, yes, the C specification allows a standard-conforming compiler to erase your disk during compilation. It even allows it to do that if your code doesn't contain UB.
comment 4y ago · link · parent
The problem is that this is really hard to do without producing either too much or too little warnings, as undefined behaviour is usually input-triggered; and the compiler usually doesn't know all constraints on the arguments that the programmer knows about.
For example, the function f() in the article of the other discussion is perfectly well-defined for any argument x <= 0x402010, as in that case no overflow happens. The compiler doesn't know whether all callers ensure the argument is valid (e.g. this might be a library function, or the invariants might not be expressable in a way the compiler can understand). This is a lose-lose situation for the compiler: it can warn, but people will find the unnecessary warnings annoying and turn them off, while if it doesn't warn people will complain about perceivedly bad optimizations.
Of course there's a point to be made that the real problem here is that the C standard makes signed integer overflow undefined behaviour, but that's not gcc's fault and can be easily worked around with -fno-strict-overflow or -Wstrict-overflow.
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
That's not how it works. It takes time for price increases to propagate through the supply chain. Utilities usually contract their gas months ahead, so if the prices for natural gas increased in February due to the war, the increase in consumer prices wouldn't have happened until months later.
comment 4y ago · link · parent
Artists and venues receive a part of the fees that TicketMaster charges. TicketMaster's essentially being paid by artists and venues to be the bad guy.
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent