Live data from Hacker News

Next Iteration of “The Rust Programming Language” Book

rust-lang.github.io

101–110 of 111 posts

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

#101
post #99

I wish they had a chapter covering how to efficiently implement graph algorithms without ending up in a struggle with the borrow checker.

Have you read this one yet? http://cglab.ca/~abeinges/blah/too-many-lists/book/

It touches on the issues you are implying.

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

#102
post #99

I wish they had a chapter covering how to efficiently implement graph algorithms without ending up in a struggle with the borrow checker.

A possibility is to use a different representation for graphs, such as adjacency matrices, which are much easier to work with the borrow checker.

Or just use RefCell, deferring the borrow checking until runtime.

Another strategy could be to give every node an explicit ID, and then have a mapping ID -> node. Every else you just refer to the nodes by their IDs.

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

#103
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".

I found the new version significantly better than the old. I immediately 'got it' after reading some of the new chapters compared to the more complete old version which I sometimes struggled with for a while.

I would definitely recommend this to rust beginners, and tell them to just use the old book where the new isn't complete.

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

#104

As a technical documentation nerd, I hope we can get a rudimentary JS (or WASM) IDE and compiler worked out and A/B test everything on Khan Academy for version 3.0. One impossible task at a time : )

For the IDE part is this the sort of thing you mean? https://play.rust-lang.org/

What do you mean by A/B testing it on Khan Academy?

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

#105
post #36

Is it possible to make a PDF or an offline version? Sometimes i like to read these sort of things while i'm on the train etc. I struggled to get the current rust book working on my ipad on the train without signal.

The current rust docs should be able to be installed offline; they used to come by default but now you need to run a rustup command. Eventually we'll provide a PDF of this, but the HTML should work offline. This edition might need some tweaks first; it's a priority for me though.

Which rustup command is that? I could only find "doc" which opens the documentation in a browser, which is not much help if you've got no internet.

Ah... I see. You have to run "rustup component list" and it'll print out a whole bunch of things that you can install like cargo and rustc and 44 different versions of std and also somewhere in there the docs. And then you have to know that that the thing you have to pass to "rustup component add" is not the string you get out of "rustup component list" (something like "rust-docs-armv7-unknown-linux-gnueabihf") but in fact just "rust-docs". And none of this seems documented anywhere in the help text in rustup itself, at least not the 1.0.0 version that I have.

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

#106
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/

Thanks. Adding it to other great Rust courses and tutorials at Hackr.io: https://hackr.io/tutorials/learn-rust

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

#108

Hey carols10cents and/or steveklabnik, what project was the example code in the Performance section (13.4) taken from? I'm interested in Rust and audio and especially both of them combined.

https://ruudvanasseldonk.com/2016/11/30/zero-cost-abstractio...

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

#109

Hey carols10cents and/or steveklabnik, what project was the example code in the Performance section (13.4) taken from? I'm interested in Rust and audio and especially both of them combined.

https://ruudvanasseldonk.com/2016/11/30/zero-cost-abstractio...

Thanks! I looked through the FLAC spec a while ago and I thought it looked familiar.
Post reply on HN