binjooou
Re:“C is quirky, flawed, and an enormous success” – Dennis Ritchie
on Sunday July 09, 2023 @10:03AM (#36654510)
Casting an integer to a pointer is implementation defined, not UB.
And every sane implementation does what everyone expects because its how memory mapped IO works (but you probably want a volatile in there and maybe a compiler or memory barrier as well depending on what the hardware guarantees about the access patterns for that particular range of addresses)
Re:“C is quirky, flawed, and an enormous success” – Dennis Ritchie
on Sunday July 09, 2023 @09:00AM (#36654132)
Generic things are rarely efficient, the most optimal code tends to be specialized and tailored to specific hardware and/or the kind of data its operating on.
std::vector (which is a really inefficient way of doing dynamic arrays btw) can be cleanly implemented with macros (see stb stretchy buf) or by splitting the element data from the housekeeping data:
int append(void *arr, size_t elemsize, size_t *capacity, size_t *size, const void *items_to_add, size_t num_items_to_add);
Re:G/O Media Incorporating AI-Generated Content
on Thursday July 06, 2023 @10:16AM (#36616157)
This why I'm skeptical of superintelligent AI.
The output of AI's is essentially lossy, so when you feed that back in as an autonomous loop you get the equivalent of a 100x re-saved jpeg, aka complete garbage.
AI's wont have any more useful data to gobble up.
Re:Why I'm done with Mouser Electronics
on Wednesday May 10, 2023 @04:05PM (#35892729)
These days I don't get to choose - I will order from whoever has the part in stock, price don't matter.
Re:sudo and su Being Rewritten in Rust for Memory Safety
on Saturday April 29, 2023 @02:56PM (#35755914)
A 1000 line long dependency file full of random literally whos code doing god knows what does not instill alot of confidence when I want to build and audit security critical programs.
Re:Lightweight SQLite Editor for Windows
on Wednesday April 19, 2023 @05:54AM (#35626281)
That is the default combobox if you enable "visual styles" (which you should do on Windows XP and above)
Re:Future Blues – Emily's Cowboy Bebop Page (1999)
on Sunday April 16, 2023 @04:43PM (#35594091)
I think this is why I'm so bored with modern video games - they all look the same - Unreal Engine, lots of same type of foliage and rubble and "background art" everywhere - take a random screenshot from a random aaa game and I couldn't tell one from the other.