Lemmy.World
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Klaymore@sh.itjust.works to Programmer Humor@programming.devEnglish · 11 months ago

Happens all the time

sh.itjust.works

message-square
20
link
fedilink
511

Happens all the time

sh.itjust.works

Klaymore@sh.itjust.works to Programmer Humor@programming.devEnglish · 11 months ago
message-square
20
link
fedilink
  • trxxruraxvr
    link
    fedilink
    arrow-up
    14
    arrow-down
    3
    ·
    11 months ago

    Height should be a float

    • ParanoiaComplex
      link
      fedilink
      arrow-up
      11
      arrow-down
      1
      ·
      edit-2
      11 months ago

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

      • trxxruraxvr
        link
        fedilink
        arrow-up
        14
        ·
        11 months 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
          link
          fedilink
          arrow-up
          14
          ·
          11 months ago

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

    • Klaymore@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      6
      ·
      11 months ago

      It’s height in centimeters

      • trxxruraxvr
        link
        fedilink
        arrow-up
        1
        ·
        11 months ago

        deleted by creator

    • fossphi@lemm.ee
      link
      fedilink
      English
      arrow-up
      4
      ·
      11 months ago

      Chad quantised rust

    • crispy_kilt@feddit.de
      link
      fedilink
      arrow-up
      2
      ·
      11 months ago

      Never use floats.

    • SatouKazuma@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      11 months 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: [email protected]

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
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1.23K users / day
  • 4.65K users / week
  • 9.03K users / month
  • 17.5K users / 6 months
  • 7.22K local subscribers
  • 23.1K subscribers
  • 1.37K Posts
  • 49.5K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • UI: 0.19.11-10-g30f0ea6f
  • BE: 0.19.11-18-g056537026
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org