You're a great educator. Your videos remind me a lot about Ben Eater's, who I'd call the Bob Ross of Electronic Engineering. Your videos really helped introduce me to what I think is Intermediate Rust... though I'm not entirely sure, since I keep finding that Rust is deeper than I previously thought and finding out I'm still a beginner.
Thanks for the upload. 10:57. That property of operators is called it being an involutory operator: P^2=I (identity operator). Also if P^2=P then the operator is idempotent (e.g. a projection operator is idempotent: applying it more than once has no effect).
a couple neat tricks: +1 on writing wrappers on a type for certain cases. e.g. you have a function that takes i32's, but there's a property that's only true when passed positive numbers, you can do: struct PositiveI32(i32); fn my_prop(PositiveI32(n): PositiveI32) { ... } oracle testing (mentioned at the end) is very good if you're doing a rewrite, and need to maintain the behaviour of the old version
Could we in theory write a property check function that returns a function that returns a bool? In the code for the Testable trait, the quickcheck library seems to call the prop function and check for success by running .result on the result of the prop function. Normally the result would just be bool, but since we have defined .result for Fn -> bool or something similar, could this work?
Hi Jon, your content is extremely superb for noobs. Could you please make a video of the latest Secrecy package. I see lots of improvements has been made to make Secret not cloneable and exposed in the memory, unlike previous versions. I ask this because perhaps a lot of people are going to be using it in their projects at work and hobby and might need help getting their head around.
What kind of setup do you have on your work laptop? I assume like most of the industry you need to use a Mac or Windows machine and so have to adjust your setup :)
1:21:00 For "why do I need to impl Arbitrary for my types", I'm thinking: you don't! If your type doesn't have specific invariants, then define the prop with primitive arguments, and construct your type inside the property function.
I'm so glad you keep on decrusting crates!
Babe, wake up. New Jonhoo video dropped and it's awesome
Every time I watch a jonhoo video I learn about some amazingly new and useful library
You're a great educator. Your videos remind me a lot about Ben Eater's, who I'd call the Bob Ross of Electronic Engineering. Your videos really helped introduce me to what I think is Intermediate Rust... though I'm not entirely sure, since I keep finding that Rust is deeper than I previously thought and finding out I'm still a beginner.
Woohoo! Thank you Jon. Insightful as always 🙌
Thanks for the upload.
10:57. That property of operators is called it being an involutory operator: P^2=I (identity operator). Also if P^2=P then the operator is idempotent (e.g. a projection operator is idempotent: applying it more than once has no effect).
Great. TIL that an involute is not an involution.
a couple neat tricks:
+1 on writing wrappers on a type for certain cases. e.g. you have a function that takes i32's, but there's a property that's only true when passed positive numbers, you can do:
struct PositiveI32(i32);
fn my_prop(PositiveI32(n): PositiveI32) { ... }
oracle testing (mentioned at the end) is very good if you're doing a rewrite, and need to maintain the behaviour of the old version
Thanks! (And I'm reading your book in paperback.)
I think the mathematical term you're looking for is bijective. f is bijective when f⁻¹(f(x)) = x.
Could we in theory write a property check function that returns a function that returns a bool?
In the code for the Testable trait, the quickcheck library seems to call the prop function and check for success by running .result on the result of the prop function. Normally the result would just be bool, but since we have defined .result for Fn -> bool or something similar, could this work?
I... think so!
Thank you man
Hi Jon, your content is extremely superb for noobs. Could you please make a video of the latest Secrecy package. I see lots of improvements has been made to make Secret not cloneable and exposed in the memory, unlike previous versions. I ask this because perhaps a lot of people are going to be using it in their projects at work and hobby and might need help getting their head around.
What kind of setup do you have on your work laptop? I assume like most of the industry you need to use a Mac or Windows machine and so have to adjust your setup :)
the inverse is the function itself, so the function has order two and it is, indeed, an inversion
missed the stream, so sad
1:21:00 For "why do I need to impl Arbitrary for my types", I'm thinking: you don't! If your type doesn't have specific invariants, then define the prop with primitive arguments, and construct your type inside the property function.
Let’s goooo
Quick rust VOD. Check it out 😉
proptest has its own Arbitrary trait and doesn't use the arbitrary crate's Arbitrary trait.
Nice haircut. Looks good