151 karma · joined June 29, 2024
Should one even want a global, general purpose heap allocator for that? Seems like a crazy idea to even consider.
Of course in this simple example it's obvious, but my assumption was that these machine generated lean proofs are millions of lines of code and who knows what they actually say..
Remember, the interrogator is allowed to be hostile, so they would obviously employ all known prompt injections and typical LLM 'gotchas' to figure out who the AI is.
I've been using C on a daily basis for 30+ years and name collisions has just never been a problem.
Granted, it might be due to lack of a package manager so micro dependencies ala import is_even is not a thing here, but still, in practice, no name collions occurs.
American film having a single white male lead = not good.
I program mostly in C, if I need 'meta' programming I just write another C program that processes C source code (I've written a simple C parser), then in my build script I build in two stages, build meta program, run it, build rest of program.
Simple, effective, debuggable (the meta program is just normal C), infinite capabilities - can nest this to arbitritary depths, need meta-meta programming? Make a program that generates a meta program.
You can structure your code to not need cleanup in every function.
The biggest problem with destructors is, how do you handle errors? close() can fail you know?
Recently had to add a new feature to and old program that was last updated in the XP era and two things to note:
1. The program did not need to be updated to run on Vista, 7, 10 and 11, shit just kept working throughout the years.
2. I loaded the project into Visual Studio 2022, it converted from VC6 and compiled without problems, added the feature, shipped a new .exe to the customer, and it just worked.
What other platform has that backwards and forwards compatibility success story?
Why should the first argument be so special? And how do you decide which struct should get method if you have a function that operates on two different types?
One of the reasons I hate constructors and destructors.
Explicit init()/deinit() functions are much better.
void foo(void *a, void *b, int n) {
assume_aligned(a, 16);
assume_stride(a, 16);
assume_distinct(a, b);
... go and vectorize!
}Your salary (well, last years taxable income), debts/credit rating, criminal history, address, phone number, which vehicles and properties you own and which company boards you're on.
One of organized criminals biggest income these days are scamming rich old folks because it's so trivial to get all details needed (and who to target) to be a pretty convincing bankman, IRS type agent/etc.
Some of it you have to kind of manually request at various places, but it's all available.
So data breaches aren't really that big of a deal when everything is already public.
extern struct uart UART0;
Then place that symbol at address X in your linker script.Looks like a logic bug to me? So rust wouldn't have helped.
Those are exactly the kind of bugs you might introduce when you do a rewrite.