VA-11 Hall-A Bar
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
@Klaymore@sh.itjust.works to Programmer Humor@programming.devEnglish • 1 year ago

Happens all the time

sh.itjust.works

message-square
22
523

Happens all the time

sh.itjust.works

@Klaymore@sh.itjust.works to Programmer Humor@programming.devEnglish • 1 year ago
message-square
22
  • @trxxruraxvr@lemmy.world
    link
    fedilink
    14•1 year ago

    Height should be a float

    • @ParanoiaComplex@lemmy.world
      link
      fedilink
      11•
      edit-2
      1 year ago

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

      • @trxxruraxvr@lemmy.world
        link
        fedilink
        14•1 year ago

        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@lemmy.world
          link
          fedilink
          14•1 year ago

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

    • @Klaymore@sh.itjust.worksOP
      link
      fedilink
      6•1 year ago

      It’s height in centimeters

      • @trxxruraxvr@lemmy.world
        link
        fedilink
        1•1 year ago

        deleted by creator

    • @fossphi@lemm.ee
      link
      fedilink
      English
      4•1 year ago

      Chad quantised rust

    • @crispy_kilt@feddit.de
      link
      fedilink
      2•1 year ago

      Never use floats.

    • @SatouKazuma@programming.dev
      link
      fedilink
      1•1 year ago

      But then wouldn’t it be fly(height: f64) instead of jump(height: i32)?

Programmer Humor@programming.dev

!programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

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

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
  • 2.9K users / day
  • 5.28K users / week
  • 9.99K users / month
  • 18.2K users / 6 months
  • 24.2K subscribers
  • 1.51K Posts
  • 52.7K Comments
  • Modlog
  • mods:
  • Feyter
  • adr1an
  • @BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne
  • BE: 0.19.1
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org