this post was submitted on 04 May 2024
8 points (100.0% liked)

Programmer Humor

32497 readers
495 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
top 5 comments
sorted by: hot top controversial new old
[–] palordrolap@kbin.social 3 points 6 months ago (1 children)

Wow. I totally forgot that Commodore BASIC ignores spaces in variable names. I do remember that it ignores anything after the first two letters though. That said, there's a bit more going on here than meets the eye.

PRINT HELLO WORLD is actually parsed as PRINT HELLOW OR LD, that is: grab the values of the variables HELLOW (which is actually just HE) and LD, bitwise OR them together and then print.

Since it's very likely both HE and LD were undefined, they were quietly created then initialised to 0 before their bitwise-OR was calculated for the 0 that appeared.

Back in the day, people generally didn't put many spaces in their Commodore BASIC programs because those spaces each took up a byte of valuable memory. That PET2001, if unexpanded, only has 8KB in it.

</old man rant>

[–] rain_worl@lemmy.world 0 points 1 month ago

dijkstra was right

[–] cupcakezealot@lemmy.blahaj.zone 1 points 6 months ago

if you flip it over it spells 80085

[–] gregorum@lemm.ee 1 points 6 months ago* (last edited 6 months ago)

some people just want to see the world

BOOBS
BOOBS
BOOBS
BOOBS
BOOBS
BOOBS
BOOBS
BOOBS
BOOBS
BOOBS
BOOBS
BOOBS
BOOBS

[–] lefaucet@slrpnk.net 0 points 6 months ago

Everyone's heard of the "Hello world" being people's first program, but just as popular among teenaged boys is their second, more advanced program: Boobs! :)