From Shadows
  • Communities
  • Create Post
  • 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

external-link
message-square
22
link
fedilink
513
external-link

Happens all the time

sh.itjust.works

Klaymore@sh.itjust.works to Programmer Humor@programming.devEnglish · 11 months ago
message-square
22
link
fedilink
alert-triangle
You must log in or register to comment.
  • xlash123@sh.itjust.works
    link
    fedilink
    arrow-up
    131
    arrow-down
    1
    ·
    11 months ago

    Lol, it took me a while to realize it’s the compiler essentially saying “how high”.

  • tempest@lemmy.ca
    link
    fedilink
    arrow-up
    72
    ·
    11 months ago

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

    • shameless@lemmy.world
      link
      fedilink
      arrow-up
      23
      ·
      11 months ago

      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@feddit.de
      link
      fedilink
      arrow-up
      6
      arrow-down
      5
      ·
      11 months ago

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

      • PlexSheep@infosec.pub
        link
        fedilink
        arrow-up
        6
        ·
        11 months ago

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

  • embed_me@programming.dev
    link
    fedilink
    arrow-up
    48
    arrow-down
    2
    ·
    11 months ago

    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

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

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

      • embed_me@programming.dev
        link
        fedilink
        arrow-up
        5
        ·
        edit-2
        11 months ago

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

        So the size of the pointer itself doesn’t matter

      • ___qwertz___@feddit.de
        link
        fedilink
        arrow-up
        5
        ·
        11 months ago

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

  • bamfic@lemmy.world
    link
    fedilink
    English
    arrow-up
    36
    ·
    11 months ago

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

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

      What made you dislike it?

      • bamfic@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        11 months ago

        the syntax.

  • Gork@lemm.ee
    link
    fedilink
    arrow-up
    33
    ·
    11 months ago

    WRONG, PRIVATE!

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

  • trxxruraxvr@lemmy.world
    link
    fedilink
    arrow-up
    14
    arrow-down
    3
    ·
    11 months ago

    Height should be a float

    • ParanoiaComplex@lemmy.world
      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@lemmy.world
        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@lemmy.world
          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@lemmy.world
        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)?

  • Darkassassin07@lemmy.ca
    link
    fedilink
    English
    arrow-up
    3
    ·
    11 months ago

    Huh, usually they ask ‘jump where?’

  • imnnotfalll222gamer@lemmy.worldBanned
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    3 months ago

    Removed by mod

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

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

  • 718 users / day
  • 4.61K users / week
  • 9.1K users / month
  • 17.5K users / 6 months
  • 1 local subscriber
  • 23.1K subscribers
  • 1.21K Posts
  • 38.8K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.11
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org