Code Monkey home page Code Monkey logo

rustcamp's People

Contributors

0x07c0 avatar 50u10fca7 avatar andreyklumchyk avatar bitwunder avatar chaplias avatar danikvitek avatar dependabot[bot] avatar jujumba avatar kirarifujikawa avatar mhnap avatar namesmark avatar nyanpasu64 avatar nybachok avatar qarux avatar rwwwx avatar sakapoi avatar sokyrko avatar supperzum avatar sverdiyev avatar thebesttvarynka avatar tyranron avatar ukrustacean avatar vladislav-tkach avatar wandalen avatar wizardplatypus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rustcamp's Issues

[WIP] Invalid type signature in 1_7

Summary

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
    }
}

Steps to reproduce

What is the current bug behavior?

What is the expected correct behavior?

Relevant logs and/or screenshots

Possible fixes

inaccuracy in the task 3_10_threads

Summary

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.

PR title convention ambiguity

Caused by commit

Summary

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.

What is the expected correct behavior?

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.

How to join the course

Hi all,

I am unable to get from the bot invitation to join course. Would you like to help me please?
Thanks in advance.

Mention crates that help to test CLI applications.

Problem to solve

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.

Proposal

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.

Links & references

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)

Rename files with zero padding

Problem to solve

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.

Proposal

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

Prior art

https://stackoverflow.com/questions/13522338/zero-padding-and-sorting-linux-shell-scripting

Alternatives

Looking for alternatives, but the only one I see is being careful.

Links & references

https://stackoverflow.com/questions/13522338/zero-padding-and-sorting-linux-shell-scripting

Link correction?

In section 3.10

I noticed the hypertext has its text part as TLS, but the underlying link leads to Asynchronous I/O article in wikipedia
This part is shown by arrow on the image below.

Is this right or indeed - a mistake?


Screenshot 2023-07-06 at 06 21 21

Code examples in step 2.4 do not compile

Summary

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.

Possible fixes

  • derive_more crate should be mentioned.
use derive_more::{AsMut, AsRef};
  • The use statement above should be added to both examples.
  • The 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.

Add section for idiomatic error handling using external crates

Problem to solve

I think there is a gap in learning materials for studying how to idiomatically use error handling with crates in Rust.

Proposal

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.)

Links & references

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.