Live data from Hacker News

Next Iteration of “The Rust Programming Language” Book

rust-lang.github.io

41–50 of 111 posts

Re: Next Iteration of “The Rust Programming Language” Book

#41

Sigh. Looks like it's time for round 5 of time to learn Rust(my personal failing, not meant as a slight against the language at all). Has the pace of sweeping changes to the language slowed down in the past year? I rode the Ember train from 1.4 to now and it was an extremely ehausting process to get to 2.0 with nearly every version requiring frustrating architectural rewrites. The upgrade from 2.0 to 2.8 took like 15…

As others have said; Rust is very stable now. I started trying to learn Rust at 0.7 (maybe a bit earlier, I can only find references to 0.7 in a few projects of mine). Boy howdy did that feel like an exercise in futility. I would set it aside for 3 weeks, revisit it, and find entire language constructs had been removed. I complained about this and Steve Klabnik graciously reminded me that it was a work in progress an…

<3

Re: Next Iteration of “The Rust Programming Language” Book

#42
post #33

People should know this isn't ready, and they should continue to use the current book. Chapers like this are just notes: https://rust-lang.github.io/book/ch17-00-oop.html This doesn't help anybody. Continue to use the rust book at: https://doc.rust-lang.org/doc/stable/book/

We actually had someone say that the new version is so much better than the old book, even though it's incomplete, that it's like a medical trial where the treatment is going so well it'd be unethical to keep people on the placebo. A bit hyperbolic, yes, but so is "this doesn't help anybody".

Re: Next Iteration of “The Rust Programming Language” Book

#43
post #35

Earlier quoted context omitted.

As others have said; Rust is very stable now. I started trying to learn Rust at 0.7 (maybe a bit earlier, I can only find references to 0.7 in a few projects of mine). Boy howdy did that feel like an exercise in futility. I would set it aside for 3 weeks, revisit it, and find entire language constructs had been removed. I complained about this and Steve Klabnik graciously reminded me that it was a work in progress an…

I started to write a VM in Rust and every weekend, when I managed to get some time for work it would usually no longer work and the reason for it had to be found in some mailing list or commit message. I had to stop doing that and rewrote it in C. 'Fortunately' we had some other problems as well but Im still hopeful that Rust is the language you want to use for this in the future.

I think it is. Especially if you keep your code in a public repo, any breaking changes (probably just tweaks as opposed to huge features that break stuff), will probably have a pr filed via cargo.

From what I understand, the rust team has scripts that crawls the repos and compiles everything looking for usages of some feature being used that's going to break in the next release, and they will issue a pull request to fix those.

Re: Next Iteration of “The Rust Programming Language” Book

#44
post #33

People should know this isn't ready, and they should continue to use the current book. Chapers like this are just notes: https://rust-lang.github.io/book/ch17-00-oop.html This doesn't help anybody. Continue to use the rust book at: https://doc.rust-lang.org/doc/stable/book/

We actually had someone say that the new version is so much better than the old book, even though it's incomplete, that it's like a medical trial where the treatment is going so well it'd be unethical to keep people on the placebo. A bit hyperbolic, yes, but so is "this doesn't help anybody".

This has been my experience. Just the layout alone is so much better for a programmer just diving into Rust.

Re: Next Iteration of “The Rust Programming Language” Book

#45
I'm currently starting to learn rust (previous java and go developer). But at the moment it feels like the good old times where I was developing with an editor and api doc side by side.

What is the current editor of choice for rust projects? I tried intellij-rust and atom with the racer plugin. Both seem to be in a somewhat early stage of development regarding the auto completion.

Regarding the book: I like it. Has been a long time since I had fun reading such a book. With most languages I just learn by googeling one problem after another until it clicks ;)

Re: Next Iteration of “The Rust Programming Language” Book

#46

Another excellent book is "Programming Rust"[1], especially if you already know C/C++ 1 - http://shop.oreilly.com/product/0636920040385.do

Co-author of TRPL here; Jim's book is wonderful too, and very different. I think they compliment each other nicely. I wish there were 50 books on Rust. :)

> Jim's book is wonderful too ... I think they compliment each other nicely.

Ha, well that's certainly true, as evidenced by your first sentence, I think, you meant complEment!

Re: Next Iteration of “The Rust Programming Language” Book

#47
post #45

I'm currently starting to learn rust (previous java and go developer). But at the moment it feels like the good old times where I was developing with an editor and api doc side by side. What is the current editor of choice for rust projects? I tried intellij-rust and atom with the racer plugin. Both seem to be in a somewhat early stage of development regarding the auto completion. Regarding the book: I like it. Has b…

I use Vim. With https://github.com/dan-t/rusty-tags for the occasional jump-to-definition. Ctrl+N autocomplete works well enough for me.

Re: Next Iteration of “The Rust Programming Language” Book

#48
post #30
post #21

Earlier quoted context omitted.

Lifetimes can be confusing as hell, especially declaring them correctly. It looks like section 10.3 in this new book improves things.

Here is something, that might ease things: https://rufflewind.com/2017-02-15/rust-move-copy-borrow

Okay, that's really cool and does probably the best job I've seen of an overview of &mut and &.

I feel like you could almost build a rust cheat-sheet poster out of this and few other useful syntax visualizations(traits, generic + lifetime syntax, etc).

Re: Next Iteration of “The Rust Programming Language” Book

#49
Thanks for sharing, very nice work.

Was drawn to the "An I/O Project" section. Everyone learns differently, and I like to learn by example, that's why I often scroll to the bottom of the man page to see example before reading the description of a new command.

So I'd like to see more stuff like that. Anyone know of a good Rust "Cookbook"? I found a few but there were just started with only a few examples.

Also in my case, I can breeze through the start section pretty quickly, I understand the ownership basics, traits and generics separately. But seeing structs, traits, lifetimes and generic together it feels like hitting a wall. I'd welcome a resource that sort of uses lots of examples with combinations of those things.

Re: Next Iteration of “The Rust Programming Language” Book

#50
post #35

Earlier quoted context omitted.

I started to write a VM in Rust and every weekend, when I managed to get some time for work it would usually no longer work and the reason for it had to be found in some mailing list or commit message. I had to stop doing that and rewrote it in C. 'Fortunately' we had some other problems as well but Im still hopeful that Rust is the language you want to use for this in the future.

I think it is. Especially if you keep your code in a public repo, any breaking changes (probably just tweaks as opposed to huge features that break stuff), will probably have a pr filed via cargo. From what I understand, the rust team has scripts that crawls the repos and compiles everything looking for usages of some feature being used that's going to break in the next release, and they will issue a pull request to…

It's more subtle than that. For most things, we guarantee no breakage at all, and we do runs like that (though not against github, but against crates.io) to verify we haven't accidentally broken something.

For stuff that we are allowed to change, but might cause breakage, we will try to find stuff and send PRs.

But the default and our intention is zero breakage as much as possible, not just "we'll fix it for you". We'd guarantee absolutely none but it's not actually possible in a statically typed language, so we have to go with "effectively none."

Post reply on HN