> The problem with unsafe code is that it can do things like this:
fn main() {
let mut x = 42;
let ptr = &mut x as *mut i32;
let val = unsafe { write_both(&mut *ptr, &mut *ptr) };
println!("{val}");
}
No it can't? Using pointers to coexist multiple mutable references to the same variable is undefined behavior. Unless I'm just misunderstanding the point they're trying to make here."Unsafe code allows to express the following, which is UB:"
We now have HUGE (/s) advancements in Notepad, like tabs and uh... Copilot
I can deal with the footguns if they aren't cheekily mutating over the years. I feel like in C++ especially we barely have the time to come to terms with the unintended consequences of the previous language revision before the next one drops a whole new load of them on us.
https://en.cppreference.com/w/c/language/union
> When initializing a union, the initializer list must have only one member, which initializes the first member of the union unless a designated initializer is used(since C99).
https://en.cppreference.com/w/c/language/struct_initializati...
→ = {0} initializes the first union variant, and bytes outside of that first variant are unspecified. Seems like GCC 15.1 follows the 26 year old standard correctly. (not sure how much has changed from C89 here)
Deleted Comment
The year was 2016 but my PC at the time was a four year-old AMDFX 8120 "Bulldozer", which was notable for being one of the cheaper options for 8-core CPUs in 2012, but this bandwidth came at the expense of extremely slow throughput because it hailed from an era where AMD couldn't beat Intel's throughput so they'd try to compensate by investing in odd-ball features that only look good on paper and mark the price down a couple hundo so their "high-end" products where effectively competing with Intel's "middle-market".
But I digress, we're not here to talk shit about how bad AMD used to be in 2012.
ANYWAYS, even old "Dozie"[2] could run circles around anything that would have existed anywhere in the world when PNG was first standardized back in '96 so I was not in anyway surprised that my implementation could effortlessly load and display any image i threw at it. I didn't do performance testing or anything, it just didn't seem like there was any point in trying to compete with whatever millisecond-scale gainz libpng presumably had over my library when both of them are capable of loading the picture in less time it takes me to recognize the picture on the screen in front of me.
Anyways, I'm curious if you considered the possibility of abusing the Adam7 interlacing to declare victory early? I guess probably most people don't bother checking that box in GIMP but I'm of the opinion that as long as its possible, there's nothing in the rulebook about deferring work or showing the user a subsampled image.
[1] this somehow coincided with the news media going off nonstop about the "DeflateGate" SuperBowl scandal, but that really was a coincidence. Or maybe it planted some subconscious ideation into my psyche, IDK. But either way this is neither the first time nor the last time I have spent multiple months trying to implement something which i know is ultimately pointless to anyone but me.
[2] remember the CPU architecture was called "Bulldozer"
The gains become relevant in bulk processing.
it seems like the server part is Windows only?
Maybe I'm missing something, but for the server side it's only crates that help you build your own server, no direct integration with any system, be it Windows or otherwise.
https://stackoverflow.com/questions/13683563/whats-the-diffe...
Could you please state which are inaccurate? I am happy to correct them.
As for the rest of the comment, well, I don't know what to say. I am a beginner in databases and I am journaling the things I'm learning. Some of my posts might not have depth because I don't know much myself.
SQLite _does_ support strict column types since 3.37: https://www.sqlite.org/stricttables.html