Darkassassin07 ,
@Darkassassin07@lemmy.ca avatar

Huh, usually they ask 'jump where?'

bamfic ,

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

crispy_kilt ,

What made you dislike it?

bamfic ,

the syntax.

trxxruraxvr ,

Height should be a float

ParanoiaComplex , (edited )

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

trxxruraxvr ,

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.

RustyNova ,

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

fossphi ,

Chad quantised rust

Klaymore OP ,
@Klaymore@sh.itjust.works avatar

It's height in centimeters

crispy_kilt ,

Never use floats.

embed_me ,
@embed_me@programming.dev avatar

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

xlash123 ,
@xlash123@sh.itjust.works avatar

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

Gork ,

WRONG, PRIVATE!

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

tempest ,

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

Shameless ,

I'm trying to learn rust and so far this has definitely made it so much more accessible.

Not to mention their super useful "rustlings" training which has these nice little challenges to get you used to language and syntax

30p87 ,

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

PlexSheep ,

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

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • kbinchat
  • All magazines