• tourist@lemmy.world
    link
    fedilink
    arrow-up
    20
    arrow-down
    4
    ·
    4 days ago

    My friend from university sends me his Rust code snippets sometimes. Ngl it looks like a pretty cool language.

    There was also that tldr reimplemention in Rust that is a gatrillion times faster than the original.

    I really want to give it a try but I have executive dysfunction and don’t have any ideas of what I could use it for.

    • ScreaminOctopus@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      14
      arrow-down
      1
      ·
      4 days ago

      The main issue I have with rust is the lack of a rust abi for shared libraries, which makes big dependencies shitty to work with. Another is a lot of the big, nearly ubiquitous libraries don’t have great documentation, what’s getting put up on crates.io is insufficient to quickly get an understanding of the library. It’d also be nice if the error messages coming out of rust analyzer were as verbose as what the compiler will give you. Other than that it’s a really interesting language with a lot of great ideas. The iterator paradigm is really convenient, and the way enums work leads to really expressive code.

      • nous@programming.dev
        link
        fedilink
        English
        arrow-up
        10
        arrow-down
        1
        ·
        4 days ago

        Documentation is generally considered one of the stronger points of rust libraries. Crates.io is not a documentation site you want https://docs.rs/ for that though it is generally linked to on crates.io. A lot of bigger crates also have their own online books for more in depth stuff. It is not that common to find a larger crate with bad documentation.

        • ScreaminOctopus@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          2
          ·
          2 days ago

          One specific example I encountered was ndarray. I couldn’t figure out how to make a function take an array and an arrayslice without rewriting the function for both types. This could be because I’m novice with the language, but it didn’t seem obvious. I ended up giving up after trying to dig through the docs for a few hours and went back to C++.

    • Kacarott@aussie.zone
      link
      fedilink
      arrow-up
      11
      arrow-down
      1
      ·
      4 days ago

      Rust is definitely a really cool language (as someone who has played with it just a little) but it’s quite headache inducing, at least for me at the moment.