3 ms·
I created a video with ScreenFlow. https://www.dropbox.com/s/vuax1ocki846llu/rust_example.mp4?dl=0 https://www.dropbox.com/s/vuax1ocki846llu/rust_example.mp4?d
by akulbe 12y ago
I created a video with ScreenFlow.
https://www.dropbox.com/s/vuax1ocki846llu/rust_example.mp4?dl=0 https://www.dropbox.com/s/vuax1ocki846llu/rust_example.mp4?d...
Downloading and installing Rust, no problem. Then I tried doing the "Hello, World!" example. Pretty sure I had it typed right in vim. It didn't work.
Then, I typed it in Sublime Text, it still didn't work. Then I thought, I forgot to set +x on the file, and I remember I hadn't set anything on the shebang line in the file, so I went on in the docs.
As you can see... I got to the "Learn Rust" page, and it wasn't ready yet.
- steveklabnik 12y agoThanks for making this! It was _very_ instructive. First of all, I submitted a patch to remove that link to the old intro this morning, so that should go away. Second, the issue was that you compiled the program, which worked just fine, but you never ran it! on http://doc.rust-lang.org/nightly/book/hello-world.html http://doc.rust-lang.org/nightly/book/hello-world.html , the example shows: $ rustc main.rs $ ./main # or main.exe on Windows Hello, world! You did the rustc, but not the ./! As for "Learn Rust", that's one of two paths through the documentation, as the first page of the book mentions. I've been focused on the "Syntax and Semantics" section, which is the other path. "Learn Rust" is coming over the next two weeks.
- akulbe 12y agoNow I see that there was an "hw" file, now. I ran it and got the desired results. Should have paid better attention. Hopefully, the instruction was more than, "Wow, this guy is a bonehead." :D I think some mindset changes are needed here, in that I'm used to dealing with interpreted languages, rather than compiled ones.
- steveklabnik 12y agoIt's all good! Seriously, I've taught tons of people to program, and the beginning is the hardest part. Yeah, the two-step process is different. In the next setup section, when Cargo is introduced, you end up with a 'cargo run' command that does the build and runs your code in one step.