fixed typos and spelling
Compare changes
- Henrik Tjäder authored
# Conflicts: # README.md
+ 14
− 10
@@ -7,7 +7,7 @@ Disclaimer: This document is in beta state!!!!! Just to give a hint how the cour
@@ -7,7 +7,7 @@ Disclaimer: This document is in beta state!!!!! Just to give a hint how the cour
The course will be given as a self study course with a set of introductional seminars and accompanying mandatory assignments, followed by a larger assignment (project). The project can be carried out individually or in groups depending on size. Grading will be individual, based on agreed requirements between the student and the teacher, showing understanding and abilities regarding:
The course will be given as a self study course with a set of introductional seminars and accompanying mandatory assignments, followed by a larger assignment (project). The project can be carried out individually or in groups depending on size. Grading will be individual, based on agreed requirements between the student and the teacher, showing understanding and abilities regarding:
Rustup (stable vs nightly), crates and toml files, cargo, rustc, llvm, gdb/lldb (and additional tooling rls, rustfmt, racer, xargo etc.) The Rust core and standard library. Building, debugging/testing, documenting and publishing Rust applications and libraries.
@@ -75,7 +75,7 @@ Seminars
@@ -75,7 +75,7 @@ Seminars
About the course. Scheduling further seminars. Introduction to the Rust [ecosystem](doc/Ecosystem.md), and basics of Rust programming.
We will cover the Rust book [Rustbook Second Edition](https://doc.rust-lang.org/book/second-edition.html) sections
* [2 - Guessing Game Tutorial](https://doc.rust-lang.org/book/second-edition/ch02-00-guessing-game-tutorial.html), and
@@ -102,7 +102,7 @@ Seminars
@@ -102,7 +102,7 @@ Seminars
Data structures, structs, enums, String (relation to slices) etc. Containers, Vec, and HashSets/Maps. Iterators. Using the Rust module system. Handling errors.
We will cover the Rust book [Rustbook Second Edition](https://doc.rust-lang.org/book/second-edition.html) sections
* [4 - Understanding Ownership](https://doc.rust-lang.org/book/second-edition/ch04-00-understanding-ownership.html),
* [5 - Using Structs to Structure Related Data](https://doc.rust-lang.org/book/second-edition/ch05-00-structs.html),
@@ -114,16 +114,19 @@ Seminars
@@ -114,16 +114,19 @@ Seminars
a. Extend the guessing game with a tuple holding `(u32, String)`, store each input `(counter, guess)` in a vector. Iterate (`for`) to print the history at exiting.
b. Extend the guessing game with a tuple holding `(u32, String)`, store each input `(counter, guess)` in a vector. Iterate (`for`) to print the history at exiting. You may solve this in many ways (perhaps your first attempt would be a C like approach), however make use of `Iterator`s in Rust (they will do the indexing for you).
b. Instead of vector use a 'HashMap', with a key `u32` and a value `String`. Again iterate (`for`) to print the history at exiting. (Explain the result.)
c. Break out the line input into a function returning a `Result<Ok<u32>>, Err<String>>`. In case of a parsing error prepend the `Err<String>` with the text `"in parsing u32, "`.
Make three new branches (`2a, 2b, 2c`) with your code, along with a README.md for usage instructions, and expected behavior.
*During development you may want to limit the number of tries so you can test without having to bother with answering correctly (the game gets boring after a while.)*
@@ -163,7 +166,7 @@ Seminars
@@ -163,7 +166,7 @@ Seminars
@@ -172,7 +175,8 @@ Seminars
@@ -172,7 +175,8 @@ Seminars
c. Compare for the short message (`abc`), the number of cycles required for `decode` in `--dev` vs. `--release`. As a comparison, my straightforward C implementation took 2200 cycles in best optimized mode using `gcc` (-o3), while my (translation) to Rust code took 1780 cycles. (Both executed on a bluepill board at 8MHz with flash memory wait states).
c. Compare for the short message (`abc`), the number of cycles required for `decode` in debug (standard) vs. `--release`. As a comparison my straightforword C implementation took 2200 cycles in best optimized mode using `gcc` (-o3), while my (transation) to Rust code took 1780 cycles. (Both executed on a bluepill board at 8MHz without (flash) memory wait states).
Make a new git for your embedded development. Make three branches (`3a, 3b, 3c`) with updated documentation according to the above.