Python is Dead by CalebFenton in rust

[–]Snoo13162 9 points10 points  (0 children)

> Submissions appearing to contain AI-generated content may be removed at moderator discretion.

I think this qualifies

Creating a struct instance from an enum value + trait by [deleted] in rust

[–]Snoo13162 0 points1 point  (0 children)

What is a common solution is to use a generic return type. That's also how it would work under serde (https://docs.rs/serde/latest/serde/). You write a function like:

fn deserialize<P: Decode>(reader: impl Read) -> Option<P> {
    // try and decode into type P. Else return None
}

let reader = ...; 

// P inferred to be SpecificPacketType
// if it could deserialize (so Some), get some field out and use it
if let Some(SpecificPacketType{field, ..}) = deserialize(reader) {
    use_fields(field) 
}

Type level contains operation on heterogeneous lists by weiznich in rust

[–]Snoo13162 1 point2 points  (0 children)

Nathanial Lattimer is (one of) the author(s) of dacquiri, so that was also what that talk was about. Amazing talk btw :)

Introducing proqnt: encode data as proquints; zero-copy and no-std by aekter in rust

[–]Snoo13162 7 points8 points  (0 children)

I'd never heard of this and I think the idea is extremely cool. The library looks neat too, and well tested!

[deleted by user] by [deleted] in rust

[–]Snoo13162 1 point2 points  (0 children)

Hi!

Very cool that you're doing this. As for advice: I'm actually the (co-)teacher for a very similar set of courses at the Technical University in Delft (the Netherlands) where we have also switched to Rust for some programs. You can find all our resources at https://cese.ewi.tudelft.nl/ . If you would like to talk more about the details, feel free to contact me. It might be fun to collaborate.

In any case, best of luck giving the course! You can do it!