rust-lang-ua / rustcamp Goto Github PK
View Code? Open in Web Editor NEWThis project forked from instrumentisto/rust-incubator
Learning Rust step-by-step.
This project forked from instrumentisto/rust-incubator
Learning Rust step-by-step.
in task 1_7, CommandHandler::handle_command has a signature which cannot be implemented.
impl CommandHandler<CreateUser> for User {
type Context = dyn UserRepository;
type Result = Result<(), UserError>;
fn handle_command(&self, cmd: &C, ctx: &Self::Context) -> Self::Result {
// Here we operate with UserRepository
// via its trait object: &dyn UserRepository
}
}
It seems that in the table "Multiprocessing vs Multithreading", in the row "Pickling objects", the elements are mixed up.
"Multithreading avoids pickling." in the "Multiprocessing" column.
"Multiprocessing relies on pickling objects in memory to send to other processes." in the "Multithreading" column.
Caused by commit
When creating a PR the description default template suggests naming PRs as follows: Step <step-number>: <step-name>
. That seems to be an outdated convention.
According to faq.md
the relevant name for a PR is task_task_number
. So please correct the description template so that it meets the convention stated in faq.md
.
Hi all,
I am unable to get from the bot invitation to join course. Would you like to help me please?
Thanks in advance.
Broken link in Orientation guide.
404 - page not found
I don't know, but not 404 :)
Use correct link.
https://mahdi.blog/rust-box-str-vs-string link is broken. In fact, it seems the whole https://mahdi.blog isn't working anymore.
Open the link in /1_concepts/1_2_box_pin/README.md
at line 130 (Mahdi Dibaiee: What is Box<str>
and how is it different from String
in Rust?)
Cannot connect to the server at https://mahdi.blog.
Well, obviously...
There is already a lot of information in the 3_ecosystem
chapter about building robust CLI applications. However, I think there is a gap in providing information about crates that are essential for testing CLI applications. Currently, participants need to spend (waste) their time on research trying to find best practices and crates for CLI testing. It would be more productive if this incubator already mentioned some common and popular crates for CLI testing.
Add to 3_1_testing
(or 3_9_cmd_env_conf
) chapter a small section about CLI testing. It should mention common best practices and preferred crates for CLI testing.
For example:
assert_cmd
- Easy command initialization and assertions.assert_fs
- Filesystem fixtures and assertions for testing.predicates
- Composable first-order predicate functions.rexpect
- For interactive CLI testing.https://rust-cli.github.io/book/tutorial/testing.html (definitely need to add, maybe even whole book)
https://www.rustadventure.dev/building-a-digital-garden-cli/clap-v4/testing-interactive-clis-with-rexpect (very good examples)
https://out-of-cheese-error.netlify.app/the-way (again good examples)
When I look at the list of tasks in some chapters, I see the following list: 3_10, 3_11, 3_1, ...
This order is incorrect.
Rename tasks with zero padding, so that alphabetical sorting gives the right order of tasks.
For example, 3_01, 3_02, ... , 3_09 , 3_10, 3_11
https://stackoverflow.com/questions/13522338/zero-padding-and-sorting-linux-shell-scripting
Looking for alternatives, but the only one I see is being careful.
https://stackoverflow.com/questions/13522338/zero-padding-and-sorting-linux-shell-scripting
Broken link in Orientation guide.
404 - page not found
I think link should be to how_to_fork file.
Use correct link.
This code example produces compiler errors because it cannot find the AsRef
and AsMut
derive macros since they are not available in the standard library and are instead provided by the derive_more
crate.
In this code example the compiler complains about not being able to mutate immutable variable v
, the Nickname
struct definition is missing and, even with derive_more
crate in the project, the AsRef<str>
trait is not implemented on Nickname
. The AsRef
derive macro instead generates the AsRef<String>
implementation.
derive_more
crate should be mentioned.use derive_more::{AsMut, AsRef};
Nickname
struct definition should be added to the second example.add_hi
function should have a mut
keyword added to the v
argument in the second example.just_print_stringy
should have the AsRef<str>
trait bound changed to AsRef<String>
in the second example.I think there is a gap in learning materials for studying how to idiomatically use error handling with crates in Rust.
Add one more section with a task (possibly in the 3_ecosystem chapter) for learning error handling with crates (thiserror, anyhow, etc.).
It is just a brief small idea, but we also can add more related information to this section (different panic handling and maybe some other crates, etc.)
Some of the possible provided links for learning materials:
https://blog.yoshuawuyts.com/error-handling-survey/
https://www.shakacode.com/blog/thiserror-anyhow-or-how-i-handle-errors-in-rust-apps/
https://antoinerr.github.io/blog-website/2023/01/28/rust-anyhow.html
https://nick.groenen.me/posts/rust-error-handling/
https://www.shuttle.rs/blog/2022/06/30/error-handling
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.