I wish they had a chapter covering how to efficiently implement graph algorithms without ending up in a struggle with the borrow checker.
It touches on the issues you are implying.
101–110 of 111 posts
I wish they had a chapter covering how to efficiently implement graph algorithms without ending up in a struggle with the borrow checker.
It touches on the issues you are implying.
I wish they had a chapter covering how to efficiently implement graph algorithms without ending up in a struggle 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.
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 would definitely recommend this to rust beginners, and tell them to just use the old book where the new isn't complete.
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 : )
What do you mean by A/B testing it on Khan Academy?
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.
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.
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/
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.
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...