Damus
fiatjaf profile picture
fiatjaf
@fiatjaf
What could possibly go wrong with casting a pointer to an integer and using that as the identifier of the object being pointed to?
122โค๏ธ7๐Ÿค™4
sph · 159w
Your computer, your rules.
hazeycode · 159w
Commonly done when abstracting resource handles across GPU APIs
sommerfeld · 159w
Why even cast it to an integer? Can't you directly use a pointer as an identifier?
Jeff · 159w
Potential overflow and point to wrong spot
Hampus · 159w
Can ask the question in small brain language instead?
Melvin Carvalho · 159w
What could go wrong, using a pointer to a web page as your social web identity? Answer: Indieweb, Mastodon, verifiable claims and other silos.
stacktoshi ๐Ÿš€ โˆž/21m · 159w
https://nostr.build/i/5899616ca3b20638ec2c507ef3e718a578555131f415b58d7bfa1befab3998cd.jpg
OpenSourceOptimist · 159w
I would worry about collisions. The object with the id could livee longer than then pointer. When the memmory is free again we might have a new different object at the same point in memmory...
Jaspion · 159w
The possibility of collision is very high. You should use an uuid
Gus · 159w
harder to test?