Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Learning Rust

Learning Rust

Scheduled Pinned Locked Moved The Lounge
androidlearningcsharpc++com
11 Posts 7 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • raddevusR raddevus

    I've begun the journey of Learning Rust with this book, Programming Rust: Fast, Safe Systems Development 2nd Edition[^] So far, I like: 1) builds binaries that need no additional runtime to be installed -- produces exe which runs natively. 2) Cargo packaging system is actually quite nice. 3) very C/C++-like so easy to learn, but I can already tell there is quite a bit of protection there so you don't shoot yourself in foot. 4)libraries are named similar to std c libaries so easy to find 5 Unit testing is built-in just decorate method with #[test] and you're ready to go. then run with $ cargo test --- AMAZING 6 syntax is very similar to Kotlin (which I know from Android dev) so at least there is some cross-over learning. Interesting Thing Types are like u64, u32 (unsigned), i32 (integer) f32 (float). Made me laugh because it took me back to the days of hungarian notation[^] which was beat up by C# and VisualStudio and all the people said, "stop using hungarian notation!!" and I finally gave it up. Now, in Rust, it's kind of back. πŸ˜†πŸ€“

    Greg UtasG Offline
    Greg UtasG Offline
    Greg Utas
    wrote on last edited by
    #2

    Hungarian notation is fine for low-level types. The Rust names are even shorter than their analogues in C++'s . But it's an abomination for user-defined types and data in a type-checked language.

    Robust Services Core | Software Techniques for Lemmings | Articles
    The fox knows many things, but the hedgehog knows one big thing.

    <p><a href="https://github.com/GregUtas/robust-services-core/blob/master/README.md">Robust Services Core</a>
    <em>The fox knows many things, but the hedgehog knows one big thing.</em></p>

    1 Reply Last reply
    0
    • raddevusR raddevus

      I've begun the journey of Learning Rust with this book, Programming Rust: Fast, Safe Systems Development 2nd Edition[^] So far, I like: 1) builds binaries that need no additional runtime to be installed -- produces exe which runs natively. 2) Cargo packaging system is actually quite nice. 3) very C/C++-like so easy to learn, but I can already tell there is quite a bit of protection there so you don't shoot yourself in foot. 4)libraries are named similar to std c libaries so easy to find 5 Unit testing is built-in just decorate method with #[test] and you're ready to go. then run with $ cargo test --- AMAZING 6 syntax is very similar to Kotlin (which I know from Android dev) so at least there is some cross-over learning. Interesting Thing Types are like u64, u32 (unsigned), i32 (integer) f32 (float). Made me laugh because it took me back to the days of hungarian notation[^] which was beat up by C# and VisualStudio and all the people said, "stop using hungarian notation!!" and I finally gave it up. Now, in Rust, it's kind of back. πŸ˜†πŸ€“

      Mike HankeyM Offline
      Mike HankeyM Offline
      Mike Hankey
      wrote on last edited by
      #3

      Started to learn RUST a while back then got side tracked and am about 10 levels down in the stack. When I finally do unwind I will pick it up again. A lot of promise in the language!

      The less you need, the more you have. Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load? JaxCoder.com

      M 1 Reply Last reply
      0
      • raddevusR raddevus

        I've begun the journey of Learning Rust with this book, Programming Rust: Fast, Safe Systems Development 2nd Edition[^] So far, I like: 1) builds binaries that need no additional runtime to be installed -- produces exe which runs natively. 2) Cargo packaging system is actually quite nice. 3) very C/C++-like so easy to learn, but I can already tell there is quite a bit of protection there so you don't shoot yourself in foot. 4)libraries are named similar to std c libaries so easy to find 5 Unit testing is built-in just decorate method with #[test] and you're ready to go. then run with $ cargo test --- AMAZING 6 syntax is very similar to Kotlin (which I know from Android dev) so at least there is some cross-over learning. Interesting Thing Types are like u64, u32 (unsigned), i32 (integer) f32 (float). Made me laugh because it took me back to the days of hungarian notation[^] which was beat up by C# and VisualStudio and all the people said, "stop using hungarian notation!!" and I finally gave it up. Now, in Rust, it's kind of back. πŸ˜†πŸ€“

        R Offline
        R Offline
        RickZeeland
        wrote on last edited by
        #4

        You might also be interested in: editors-ides-for-rust[^] and: web-frameworks-for-rust[^]

        1 Reply Last reply
        0
        • raddevusR raddevus

          I've begun the journey of Learning Rust with this book, Programming Rust: Fast, Safe Systems Development 2nd Edition[^] So far, I like: 1) builds binaries that need no additional runtime to be installed -- produces exe which runs natively. 2) Cargo packaging system is actually quite nice. 3) very C/C++-like so easy to learn, but I can already tell there is quite a bit of protection there so you don't shoot yourself in foot. 4)libraries are named similar to std c libaries so easy to find 5 Unit testing is built-in just decorate method with #[test] and you're ready to go. then run with $ cargo test --- AMAZING 6 syntax is very similar to Kotlin (which I know from Android dev) so at least there is some cross-over learning. Interesting Thing Types are like u64, u32 (unsigned), i32 (integer) f32 (float). Made me laugh because it took me back to the days of hungarian notation[^] which was beat up by C# and VisualStudio and all the people said, "stop using hungarian notation!!" and I finally gave it up. Now, in Rust, it's kind of back. πŸ˜†πŸ€“

          G Offline
          G Offline
          Gary R Wheeler
          wrote on last edited by
          #5

          raddevus wrote:

          Types are like u64, u32 (unsigned), i32 (integer) f32 (float). Made me laugh because it took me back to the days of hungarian notation[^]

          I don't see a connection between the type names you listed and Hungarian notation. The type names are simple, short, and yet meaningfully describe the type. Hungarian notation on the other hand attempts to encode information about the value's type in the value's name. Microsoft adopted this as a standard, which caused a fair amount of the programming community to follow suit. Personally I don't like it. The cardinal complaint is that if the type changes, then the value name should change with it. The problems with Hungarian notation are worse than an inconvenience, however. To my mind Hungarian notation violates principles like implementation hiding, since it exposes implementation details in the names. I also find that the prefixes are visual clutter and make the code harder to read. I have a body of code I maintain with hundreds of classes, all of whose names are prefixed by "cls". Utterly worthless clutter.

          Software Zen: delete this;

          raddevusR 1 Reply Last reply
          0
          • G Gary R Wheeler

            raddevus wrote:

            Types are like u64, u32 (unsigned), i32 (integer) f32 (float). Made me laugh because it took me back to the days of hungarian notation[^]

            I don't see a connection between the type names you listed and Hungarian notation. The type names are simple, short, and yet meaningfully describe the type. Hungarian notation on the other hand attempts to encode information about the value's type in the value's name. Microsoft adopted this as a standard, which caused a fair amount of the programming community to follow suit. Personally I don't like it. The cardinal complaint is that if the type changes, then the value name should change with it. The problems with Hungarian notation are worse than an inconvenience, however. To my mind Hungarian notation violates principles like implementation hiding, since it exposes implementation details in the names. I also find that the prefixes are visual clutter and make the code harder to read. I have a body of code I maintain with hundreds of classes, all of whose names are prefixed by "cls". Utterly worthless clutter.

            Software Zen: delete this;

            raddevusR Offline
            raddevusR Offline
            raddevus
            wrote on last edited by
            #6

            You mean you didn't like lpszWindowText (long ptr to null terminated string)??? :rolleyes: Man, I know how to troll on CP, just mention Hungarian Notation. :laugh: I think back in the day when people printed out code to do code reviews (hahahahaha as if anyone prints code now or does code reviews) that Hungarian was kind of nice cuz you knew the type when you looked at it. But I'm glad it's gone too. Put me down for "Happy with the present situation of variable names." Just thought it was funny that the intrinsic types are a slight throwback to Hungarian. :)

            G 1 Reply Last reply
            0
            • raddevusR raddevus

              You mean you didn't like lpszWindowText (long ptr to null terminated string)??? :rolleyes: Man, I know how to troll on CP, just mention Hungarian Notation. :laugh: I think back in the day when people printed out code to do code reviews (hahahahaha as if anyone prints code now or does code reviews) that Hungarian was kind of nice cuz you knew the type when you looked at it. But I'm glad it's gone too. Put me down for "Happy with the present situation of variable names." Just thought it was funny that the intrinsic types are a slight throwback to Hungarian. :)

              G Offline
              G Offline
              Gary R Wheeler
              wrote on last edited by
              #7

              raddevus wrote:

              Man, I know how to troll on CP, just mention Hungarian Notation

              No kidding. That's almost as much of a blitzkreig in the forums as a brace style debate.

              raddevus wrote:

              as if anyone prints code now

              I will admit to occasionally printing code fragments. Most of the time lately it's to compare struct definitions against interface specifications. I've got one interface now that has these lovely C struct's in the interface spec. The only problem is the compiler being used forces 4Β byte alignment, which isn't documented in the struct's. My corresponding definitions therefore have to insert pad bytes to make things line up. <OldFartWarStory> A few years ago the Infernal Revenue Service accused my company of padding their R&D costs, and they wanted proof of the work we'd done. Part of that proof was supposed to be a listing of all versions of all software produced over the preceding five years. Said source code, copied to CD's (this was a while ago), occupied around 120 discs. We make commercial ink-jet printing systems, so we're good at figuring out how much paper will be needed for a job. We estimated a paper listing of the contents of those discs would have required a little over 9 rolls of paper, at 40,000 feet per roll. When we asked them where they wanted the 9+ rolls delivered (each weighing several hundred pounds, and about 5 ft in diameter), they backed off. Just to be a smart ass, I did print out a directory listing of each of the discs. The directory listing alone was an entire case of office paper (2000 sheets). Oh, and not to brag, but we could have printed those 9+ rolls of paper in about 1 day. We ain't your mama's DeskJet. </OldFartWarStory>

              Software Zen: delete this;

              raddevusR 1 Reply Last reply
              0
              • G Gary R Wheeler

                raddevus wrote:

                Man, I know how to troll on CP, just mention Hungarian Notation

                No kidding. That's almost as much of a blitzkreig in the forums as a brace style debate.

                raddevus wrote:

                as if anyone prints code now

                I will admit to occasionally printing code fragments. Most of the time lately it's to compare struct definitions against interface specifications. I've got one interface now that has these lovely C struct's in the interface spec. The only problem is the compiler being used forces 4Β byte alignment, which isn't documented in the struct's. My corresponding definitions therefore have to insert pad bytes to make things line up. <OldFartWarStory> A few years ago the Infernal Revenue Service accused my company of padding their R&D costs, and they wanted proof of the work we'd done. Part of that proof was supposed to be a listing of all versions of all software produced over the preceding five years. Said source code, copied to CD's (this was a while ago), occupied around 120 discs. We make commercial ink-jet printing systems, so we're good at figuring out how much paper will be needed for a job. We estimated a paper listing of the contents of those discs would have required a little over 9 rolls of paper, at 40,000 feet per roll. When we asked them where they wanted the 9+ rolls delivered (each weighing several hundred pounds, and about 5 ft in diameter), they backed off. Just to be a smart ass, I did print out a directory listing of each of the discs. The directory listing alone was an entire case of office paper (2000 sheets). Oh, and not to brag, but we could have printed those 9+ rolls of paper in about 1 day. We ain't your mama's DeskJet. </OldFartWarStory>

                Software Zen: delete this;

                raddevusR Offline
                raddevusR Offline
                raddevus
                wrote on last edited by
                #8

                That’s a great story. :thumbsup::thumbsup::thumbsup:

                G 1 Reply Last reply
                0
                • raddevusR raddevus

                  That’s a great story. :thumbsup::thumbsup::thumbsup:

                  G Offline
                  G Offline
                  Gary R Wheeler
                  wrote on last edited by
                  #9

                  Thanks. Like the best stories, the fact that it's true just adds to the fun.

                  Software Zen: delete this;

                  1 Reply Last reply
                  0
                  • raddevusR raddevus

                    I've begun the journey of Learning Rust with this book, Programming Rust: Fast, Safe Systems Development 2nd Edition[^] So far, I like: 1) builds binaries that need no additional runtime to be installed -- produces exe which runs natively. 2) Cargo packaging system is actually quite nice. 3) very C/C++-like so easy to learn, but I can already tell there is quite a bit of protection there so you don't shoot yourself in foot. 4)libraries are named similar to std c libaries so easy to find 5 Unit testing is built-in just decorate method with #[test] and you're ready to go. then run with $ cargo test --- AMAZING 6 syntax is very similar to Kotlin (which I know from Android dev) so at least there is some cross-over learning. Interesting Thing Types are like u64, u32 (unsigned), i32 (integer) f32 (float). Made me laugh because it took me back to the days of hungarian notation[^] which was beat up by C# and VisualStudio and all the people said, "stop using hungarian notation!!" and I finally gave it up. Now, in Rust, it's kind of back. πŸ˜†πŸ€“

                    G Offline
                    G Offline
                    Garth J Lancaster
                    wrote on last edited by
                    #10

                    raddevus wrote:

                    1) builds binaries that need no additional runtime to be installed -- produces exe which runs natively.

                    not only this, but cross-compiling (for iOT for instance) is easier should you need it

                    1 Reply Last reply
                    0
                    • Mike HankeyM Mike Hankey

                      Started to learn RUST a while back then got side tracked and am about 10 levels down in the stack. When I finally do unwind I will pick it up again. A lot of promise in the language!

                      The less you need, the more you have. Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load? JaxCoder.com

                      M Offline
                      M Offline
                      Matt McGuire
                      wrote on last edited by
                      #11

                      same here, I really want to get back to learning more Rust. I just can't find the time to squeeze it in this last year.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups