HackerTrans
TopNewTrendsCommentsPastAskShowJobs

binjooou

no profile record

comments

binjooou
·3 anni fa·discuss
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)
binjooou
·3 anni fa·discuss
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);
binjooou
·3 anni fa·discuss
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.
binjooou
·3 anni fa·discuss
These days I don't get to choose - I will order from whoever has the part in stock, price don't matter.
binjooou
·3 anni fa·discuss
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.
binjooou
·3 anni fa·discuss
That is the default combobox if you enable "visual styles" (which you should do on Windows XP and above)
binjooou
·3 anni fa·discuss
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.