Ancestors

Toot

Written by fops on 2025-01-16 at 19:41

oh my god right only today i learned that if you increment a pointer in C it actually increments the address by the type's size and not by 1 my whole life has been a lie

=> More informations about this toot | More toots from chfour@wetdry.world

Descendants

Written by fops on 2025-01-16 at 19:41

tbh i;ve only really used pointer arithmetic on char* sooo

=> More informations about this toot | More toots from chfour@wetdry.world

Written by /var/service/sudo200/run on 2025-01-16 at 19:43

@chfour

Welcome to the C elite community /jk

=> More informations about this toot | More toots from sudo200@layer8.space

Written by Amber (deilannist) on 2025-01-16 at 19:43

@chfour@wetdry.world im never using a program from you again

=> More informations about this toot | More toots from puppygirlhornypost2@transfem.social

Written by Amber (deilannist) on 2025-01-16 at 19:45

@chfour@wetdry.world a 32 bit integer is 4 bytes. if it incremented it by one... instead of pointing to the starting address you'll be in the middle of the integer... that's not very useful ​:blobcatgooglynotlikethis:​

=> More informations about this toot | More toots from puppygirlhornypost2@transfem.social

Written by fops on 2025-01-16 at 20:20

@puppygirlhornypost2 i know i just thought since it's an address naturally it'd behave like a number lol

=> More informations about this toot | More toots from chfour@wetdry.world

Written by fops on 2025-01-16 at 20:20

@puppygirlhornypost2 Good news: ive never written anything worthwhile

=> More informations about this toot | More toots from chfour@wetdry.world

Written by not good jsdev 🏳️‍⚧️ on 2025-01-16 at 19:53

@chfour 'c doesnt have memory safety features' well what about This...

=> More informations about this toot | More toots from mothcompute@vixen.zone

Written by fops on 2025-01-16 at 20:20

@mothcompute CHECKMATE w*ke "RUST" users !!!

=> More informations about this toot | More toots from chfour@wetdry.world

Written by Alexander Knochel on 2025-01-31 at 07:16

@chfour That makes sense considering integer arrays etc. work the way they do, I've never questioned it I guess, but it would explain why casting pointers is something one does....

=> More informations about this toot | More toots from quantensalat@astrodon.social

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113839732947779374
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
301.243141 milliseconds
Gemini-to-HTML Time
1.26186 milliseconds

This content has been proxied by September (3851b).