this post was submitted on 13 Jun 2024
14 points (100.0% liked)

Programmer Humor

19154 readers
2012 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
top 18 comments
sorted by: hot top controversial new old
[–] [email protected] 7 points 3 months ago

Lol, it took me a while to realize it's the compiler essentially saying "how high".

[–] [email protected] 3 points 3 months ago (1 children)

I do enjoy the rust compiler error messages. They are nicely formatted

[–] [email protected] 1 points 3 months ago (1 children)

Yeah, but to observe such error messages you'll basically need to wait for 20 mins for it to compile.

[–] [email protected] 2 points 3 months ago

No? The steps are compiled once and afterwards your project just gets compiled. Besides, rust-analyzer exists.

[–] [email protected] 2 points 3 months ago (1 children)

That's what makes us humans different from computers. We don't ask how high, we just do it. Now, if it were a C pointer it would jump anywhere from 0 to 2^32-1. That's why C is more suited for artificial intelligence than it might initially seem. Thanks for coming to my tedx talk

[–] [email protected] 2 points 3 months ago (2 children)

Pointers are ackshully 48 bits on amd64 (which is most PCs and servers)

[–] [email protected] 2 points 3 months ago* (last edited 3 months ago)

I was mostly joking about a stray pointer of type uint32_t*

So the size of the pointer itself doesn't matter

[–] [email protected] 2 points 3 months ago

Well ackshully newer CPUs support 5-level-paging which uses 56 bits.

[–] [email protected] 2 points 3 months ago

WRONG, PRIVATE!

Now drop and give me int(ceil(19.9))!

[–] [email protected] 1 points 3 months ago (1 children)

i dislike rust, but have to give them credit for helpful error messages. not quite racket level but impressive

[–] [email protected] 1 points 3 months ago

What made you dislike it?

[–] [email protected] 1 points 3 months ago

Huh, usually they ask 'jump where?'

[–] [email protected] -1 points 3 months ago (3 children)
[–] [email protected] 2 points 3 months ago* (last edited 3 months ago) (1 children)

I don't know Rust but jump typically moves the program counter, where the height represents the number of instructions to move

[–] [email protected] 1 points 3 months ago (1 children)

Afaik rust doesn't have functions like that as they lead to unsafe code that's impossible to check variable lifetimes for. I think OP created the jump function.

[–] [email protected] 1 points 3 months ago

They created it. The compiler says the jump function is in src/main.rs

[–] [email protected] 2 points 3 months ago

Chad quantised rust

[–] [email protected] 1 points 3 months ago

It's height in centimeters