Settings

Theme

Learning Rust in 3 Attempts

shreyb.dev

46 points by milkbikis 2 years ago · 15 comments

Reader

huqedato 2 years ago

My experience with Haskell was somehow similar. Initially, it piqued my curiosity, then it became a hobby, and the third time, I pursued it for financial gain. Every time, after each experience, I abandoned it for years.

Regrettably, due to boredom and laziness, I gave it up completely since 2020. :(

andrewstuart 2 years ago

A programming language should not be so hard it takes multiple attempts.

Rust is ultimately doomed to stay small for this reason.

In programming, anything that can be done more simply WILL be done more simply by some competitor. This will be the fate of Rust.

  • tyleo 2 years ago

    And yet Rust was the fastest growing language on GitHub last year according to the 2023 review.

    Ideally it would be easy to learn a language… but the claim that it’s ‘doomed’ if not does not appear to align with data.

    https://github.blog/2023-11-08-the-state-of-open-source-and-...

    • hu3 2 years ago

      It's easy to grow a small adoption in terms of percentage.

      I grew my boiled eggs consumption by 100% yesterday.

      Java/C#/C++ could never grow 40% in a year even if their absolute growth surpassed Rust by a wide margin.

  • ephemeral-life 2 years ago

    There is necessary complexity in the domain rust is trying to cater to and rust is the simpler way to approach those problems compared to its competitors. Just because you don't work in those domains doesn't mean they don't exists.

  • jayasdfw 2 years ago

    Rust is just enforcing at compile time what you had to keep track in your mind with C/C++

    • lionkor 2 years ago

      Not really, no. If it was that, it would be another C++ compiler for a subset of C++, not an entirely new language with a new ecosystem, new community, and plenty of new issues and growing pains.

      There are real reasons to use Rust, but there are also real pain points and issues with trying to reinvent everything from scratch.

  • peterashford 2 years ago

    I've had two serious attempts at learning Rust. Amusingly, I also chose a ray tracer for my last attempt. I was pretty happy with the resulting code but attempting a moderate refactor made me toss the whole project - I felt like I was fighting the language too much. Not sure if I'll try again

tracker1 2 years ago

This is definitely my experience with Rust so far... Though I need far more practice. My interests lay far more into communicate than Ray tracing and math though.

I've read through the same two books and build a few web services and websocket bits... Getting ready for a second pass at a multi channel chat server. I've used them for years, but never built one, closest was an irc web client in the mid 00s.

In any case, hoping the language gains more traction.

Dkuku 2 years ago

For me it clicked with this book. Lots of hands on examples where you build clones of basic unix tools. https://www.oreilly.com/library/view/command-line-rust/97810...

cchance 2 years ago

Coming from C#/Typescript i don't get why people find rust so difficult, i mean its got its rought edges that take some getting used to but the few times i've used it it didn't seem all too difficult, and a shit ton easier than looking at C/C++

financltravsty 2 years ago

> I was equally disheartened and delighted to later learn that the simple mental model I had for the cpu and memory were yet further from reality. Compiler optimizations, pipelining, branch prediction, out of order execution etc. were all fascinating and slightly terrifying things to learn about.

If you don’t understand the low-level/computer architecture, you will have a hard time learning Rust. It’s not a general purpose programming language like Ruby, JS, Python, etc. It’s a systems programming language meant to make the best use of the underlying hardware, like C++.

Learn CS first.

  • lkirkwood 2 years ago

    I really don't agree with this. You don't have to pay any attention to low level concepts (unless you want to) except maybe the borrow checker? Which barely counts IMO. Scope and mutability are concepts every programmer should be familiar with. Ownership is a simple principle. You definitely can use it as a systems language. But you can use it for lots of other things effectively - and that fits my definition of a general purpose language.

  • okamiueru 2 years ago

    Learning sole CS first is probably a good idea, but I don't agree with the reasoning. C++ exposes the underlying hardware to a large degree, and if you don't understand it, you'll be allowed to break stuff easily and before you know it. This is much harder to do in Rust. You don't need to know anything about function pointers, interrupts, registries, virtual tables, and what not, in order to follow the memory model. The unsafe parts, is a different story, so I suppose there is a limit. But Rust and C++ are fairly far apart imo.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection