-
Notifications
You must be signed in to change notification settings - Fork 300
User's first example is complex #346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
the purpose of the code example is just for folks to cut and paste and get something working. we can work with the crate owner @mgattozi to improve the interface, but the aim is not to teach concepts but to teach the rust "workflow". |
I'm marking this to be resolved before the Edition. I will work with @mgattozi to simplify things a bit. |
The example didn't work for me. I had to add this line at the top
|
Maybe that's also part of the Rust workflow? 'If something goes wrong, do what the compiler tells you to fix it' 🥇
|
Or we need to switch the edition? There's a little bit about it here: https://rust-lang-nursery.github.io/cli-wg/tutorial/index.html |
When the website is launched, the 2018 edition will be the default, yes.
… On Dec 3, 2018, at 7:13 AM, Jörn Zaefferer ***@***.***> wrote:
Or we need to switch the edition? There's a little bit about it here: https://rust-lang-nursery.github.io/cli-wg/tutorial/index.html
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Gotcha. Since the current website advertises the beta site ('Try out the new beta site!'), this is a bit of a trap. |
@ashleygwilliams I, too, think, that this code might confuse people who want to learn rust. Usually programmers don't like it, when they are told to execute a piece of code that they do not understand. The code sample would be perfectly ok, if it was explained. |
Same issues for me , then i had to add |
Same issue on OpenBSD 6.4. Fixed adding |
@drumbsd the example is for the latest stable version of Rust with the You can update your Rust versions on Mac & Linux using the |
I'm going to close this as #838 supersedes it. |
macOS still not work// not fixed bug ❌
extern crate ferris_says;
use ferris_says::say;
// from the previous step
use std::io::{stdout, BufWriter};
fn main() {
let stdout = stdout();
let message = String::from("Hello fellow Rustaceans!");
let width = message.chars().count();
let mut writer = BufWriter::new(stdout.lock());
say(message.as_bytes(), width, &mut writer).unwrap();
}
$ rustc --explain E0463
A plugin/crate was declared but cannot be found. Erroneous code example:
#![feature(plugin)]
|
@xgqfrms you must have to use |
Looking through the first example we show the users, I think it's great we get them comfortable with crates.io. That said, the code itself feels like the concept count may a be a bit on the high side for a first example:
Concepts covered:
If we want to keep the example largely the same, one possibility would be to allow the user to hover over parts of the code and get an explanation for each piece. This would let them have self-directed exploration of the unfamiliar parts.
The text was updated successfully, but these errors were encountered: