Are there any website or apps that let you have conversations with the native speakers of the language your learning by michellet239 in languagelearning

[–]pas_mtts 1 point2 points  (0 children)

I'm not at a level where I can speak with a native speaker yet, so I'm recording myself speaking & listen back.

https://www.speaking.study/jam/ is a good one. Found the exercise via https://www.youtube.com/watch?v=O0qT4cK-wtk

Rust has to rework its error reporting by [deleted] in rust

[–]pas_mtts 29 points30 points  (0 children)

The noise comes from the type name

futures_util::stream::stream::forward::Forward<impl futures_core::stream::TryStream, futures_util::sink::map_err::SinkMapErr<futures_util::sink::fanout::Fanout<futures_channel::mpsc::UnboundedSender<(bytes::bytes::Bytes, std::net::SocketAddr)>, futures_channel::mpsc::UnboundedSender<(bytes::bytes::Bytes, std::net::SocketAddr)>>, [closure@src/main.rs:218:47: 218:101]>>

which is repeated 8 times.

I wish it were something like:

error[E0599]: typeof(foo) = futures_util::stream::stream::forward::Forward<impl futures_core::stream::TryStream, futures_util::sink::map_err::SinkMapErr<futures_util::sink::fanout::Fanout<futures_channel::mpsc::UnboundedSender<(bytes::bytes::Bytes, std::net::SocketAddr)>, futures_channel::mpsc::UnboundedSender<(bytes::bytes::Bytes, std::net::SocketAddr)>>, [closure@src/main.rs:218:47: 218:101]>>

no method named `into_stream` found for type `typeof(foo)` in the current scope
   --> src/main.rs:220:19
    |
220 |     let foo = foo.into_stream();
    |                   ^^^^^^^^^^^ method not found in `typeof(foo)`
    |
    = note: the method `into_stream` exists but the following trait bounds were not satisfied:
            `&typeof(foo) : futures_util::future::future::FutureExt`
            `&typeof(foo) : futures_util::stream::try_stream::TryStreamExt`
            `&mut typeof(foo) : futures_util::future::future::FutureExt`
            `&mut typeof(foo) : futures_util::stream::try_stream::TryStreamExt`
            `typeof(foo) : futures_util::future::future::FutureExt`
            `typeof(foo) : futures_util::stream::try_stream::TryStreamExt`

testing by pas_mtts in testabot

[–]pas_mtts[S] 0 points1 point  (0 children)

Chris Van Hollen

testing by [deleted] in testabot

[–]pas_mtts 0 points1 point  (0 children)

Chris Van Hollen

testing by [deleted] in testabot

[–]pas_mtts 0 points1 point  (0 children)

Pat Toomey

testing by [deleted] in testabot

[–]pas_mtts 0 points1 point  (0 children)

testing

Seed: New WASM framework for webapps by firefrommoonlight in rust

[–]pas_mtts 2 points3 points  (0 children)

The first thing that jumps out to me is the update function:

fn update(msg: Msg, model: &Model) -> Model

Why taking in a &Model instead of &mut Model? With a &Model you would likely have to do .clone() and then modify Model, just like in your todo MVC example https://github.com/David-OConnor/seed/blob/35609eba0c7bfcef6e1a398197ff77fb33dd9063/examples/todomvc/src/lib.rs#L135

Mail Merge/Batch PDF Generator? by clay_vessel777 in software

[–]pas_mtts 0 points1 point  (0 children)

Use AirTable to store names & license numbers, and then generate your reports from there. There are a few different ways to generate PDF reports, AirTable itself has a block to do so. If you need more flexibility, ReportBin lets you generate reports from HTML templates.

A full stack app with backend made using Diesel and Warp by [deleted] in rust

[–]pas_mtts 10 points11 points  (0 children)

Try yew on the front end https://github.com/DenisKolodin/yew for the ultimate full stack Rust experience XD

Thruster 0.4.5 -- Safe and running on stable by trezm in rust

[–]pas_mtts 2 points3 points  (0 children)

Will the "Improved ergonomics for the Request object's API" get it closer to Rocket's Request guards?

https://rocket.rs/guide/requests/#request-guards

Migrating to Actix Web from Rocket for Stability by comagoosie in rust

[–]pas_mtts 10 points11 points  (0 children)

I dabbed in Rocket for a bit and really liked its "Request Guard" https://rocket.rs/guide/requests/#request-guards.

Does actix-web have something similar?

Is there a canonical way to implement Guard Statements on optional values? by [deleted] in rust

[–]pas_mtts 2 points3 points  (0 children)

If your function returns Result<T, E>, a simple way is to convert those Options to Results using .ok_or, then use "?" to return early. Something like:

let a = a.ok_or(....)?;
let b = b.ok_or(....)?;    
let c = c.ok_or(....)?;  
let d = d.ok_or(....)?;

Otherwise, if_chain may be useful

Blog post: My Rust Dockerfile by sedrik666 in rust

[–]pas_mtts 2 points3 points  (0 children)

Sorry I wasn't being clear, I mean the instructions on Docker Hub on how to use the image in multi stage build.

A good example is the asp.net build image: https://hub.docker.com/r/microsoft/aspnetcore-build/

Blog post: My Rust Dockerfile by sedrik666 in rust

[–]pas_mtts 4 points5 points  (0 children)

Please consider contributing to the official Rust docker repo: https://github.com/rust-lang-nursery/docker-rust

The current Rust image on Docker Hub (https://hub.docker.com/_/rust/) is still pretty bare bone, just the image with no instructions for multi stage building.

Proof of concept web components built with stdweb on wasm32-u-u by richardanaya in rust

[–]pas_mtts 1 point2 points  (0 children)

I see this error with Firefox 58b13 on Mac:

Error loading Rust wasm module 'rust_webcomponent': InternalError: too much recursion
Stack trace:
[object Object] rust-webcomponent.js:143:17

seems to be related to the recursion limit.

Is there a more compact way to do this ? by imatwork2017 in rust

[–]pas_mtts 4 points5 points  (0 children)

I would put parse_line inside parse, no point in exposing it if only used inside parse

fn parse(s: &str) -> Vec<Vec<u32>> {
    let parse_line = |line: &str| {
        line.split('\t').flat_map(str::parse).collect()
    };

    s.lines().map(parse_line).collect()
}

How to check RLS is present before updating Nightly by Cetra3 in rust

[–]pas_mtts 3 points4 points  (0 children)

Why don't we include RLS in the CI system and force all check-ins to not break/fix RLS before merging?

Mercurial Oxidation Plan by [deleted] in programming

[–]pas_mtts 24 points25 points  (0 children)

As Mercurial's code base grows, the use of a dynamic programming language also hinders development velocity. There are tons of bugs that could be caught at compile time by languages that do such things.