clifflocked
Undefined behavior does not mean that a language is useless. C is quite nice to write as an abstraction over assembly, and I highly recommend writing C code and thinking about (and checking) what assembly it compiles into.
Also, it is possible to verify that the types of UB that you are referring to do not occur: see the seL4 project, which provides machine-checked proofs for an OS kernel that no execution can reach a state that is undefined by the language specification.
That's OK, you don't have to be the best at any one thing. The important thing about any hobby, be it programming, skateboarding, or playing the piano, is that you feel personal satisfaction in doing it, not in the reactions of people to your work. Your enjoyment of a hobby should never be based on whether or not people like it, or even whether or not they want to use the thing you created. If you feel that a project that you are working on could be summed up in a single prompt that can be given to an LLM, then your job is not to work on the project directly, but rather to find what makes what you are doing unique. It doesn't even have to be technically interesting or bring any new ideas to the table, just the fact that somebody has put in effort into making something (regardless of completion or quality) gives it value.
There absolutely are reasonable alternate ways to represent ordered data that don't involve templates. The way that C does it makes sense in most cases, and if you are looking at something that you cannot understand, you are looking at bad code.
> "Declaration follows use" immediately goes out the window when faced with typedeffed types being used as the base type
Typedefs are an abstraction. If you create a typedef, it is usually because you only want to handle the data as a whole, passing it to helper functions that remove the typedef. Also, declaration of use does not break down with typedefs:
typedef char *(*fn)(int, char *);
fn my_fn;
char *s = (*my_fn)(0, ""); // Proper use
> "Declaration follows use" is the type level equivalent of taking off your socks before taking off your shoes because that's the order in which you put them on.Please give me an example of some C code where this is the case.
> The 5090 is 10x faster but only 6-8x the price
I don't buy into this argument. A B580 can be bought at MSRP for 250$. A RTX 5090 from my local Microcenter is around 3250$. That puts it at around 1/13th the price.
Power costs can also be a significant factor if you choose to self-host, and I wouldn't want to risk system integrity for 3x the power draw, 13x the price, a melting connector, and Nvidia's terrible driver support.
EDIT: You can get an RTX 5090 for around 2500$. I doubt it will ever reach MSRP though.