Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Thomas Koehler
    @Bastacyclop
    Benjamin Z
    @benjyz
    more basic question: what is a crate?
    "The compilation model centers on artifacts called crates. "
    Thomas Koehler
    @Bastacyclop
    Have you read the Book ?
    Benjamin Z
    @benjyz
    notyet
    not yet
    Thomas Koehler
    @Bastacyclop
    you should :p
    Benjamin Z
    @benjyz
    yes, very well written
    the parts I have read so far
    any other standard docs? I've listened to some talks recently
    Thomas Koehler
    @Bastacyclop
    Benjamin Z
    @benjyz
    talks by Alex Crichton
    Thomas Koehler
    @Bastacyclop
    I think the Book is the first thing to read, there is a lot of extra stuff in rust-learning
    Benjamin Z
    @benjyz
    does rust compiler use LLVM somewhere?
    ok, thx, will go through that
    Thomas Koehler
    @Bastacyclop
    You also have the Cargo guide
    I think it does compile to LLVM which is then compiled to binary but I'm not the best person to ask
    ^ this is a nice place to get news
    @benjyz if you are interested in the compilation process: https://blog.rust-lang.org/2016/04/19/MIR.html
    Benjamin Z
    @benjyz
    ah right, I remember seeing that
    MIR.. so much to learn ;)
    finally a systems language which isn't C/++
    Thomas Koehler
    @Bastacyclop
    ahah
    I gotta say when I have to go back to C++ it hurts
    Benjamin Z
    @benjyz
    have you a lot of experience in C++? I always hated C++ with a passion and never used it
    Thomas Koehler
    @Bastacyclop
    I don't have "a lot of experience" since I'm a student but it was my main language before Rust
    Thomas Koehler
    @Bastacyclop
    personnaly I hate Java a lot more :p
    Alexander Chepurnoy
    @kushti
    @Bastacyclop probably you havent' experienced a memory leak in pretty big project yet? :)
    after searching for a memory leak in C++ in more or less big project people usually going to love Java :)
    Thomas Koehler
    @Bastacyclop
    well you can have memory leaks in Java too, so ... :p
    Alexander Chepurnoy
    @kushti
    @Bastacyclop it is usually much harder, but yes, possible
    guys, is it "idiomatic" Rust code? http://dumpz.org/2343306/
    Thomas Koehler
    @Bastacyclop
    if your code is well organised and you take care of what you do with memory it is not so frequent to leak in C++. The worse is when it comes from implicit and sneaky features.
    but I have no "industrial" experience
    I find C to be much more appealing to debug
    (your format! indentation is not right)
    Alexander Chepurnoy
    @kushti
    @Bastacyclop i dunno much about nowadays, but 10-12 years ago huge C++ projects in our company usually got a garbage collector at some point, sometimes implemented in-house. It is better to use state-of-art Java GCs then
    @Bastacyclop thanks!
    Thomas Koehler
    @Bastacyclop
    line 18
    you don't need those brackets
    line 11 could be better without too
    why do you even return x ?
    oh sorry
    the = before
    feels a bit too much of a one-liner to me
    Do you know the try!macro ?
    I think you could use it