Decrusting the quickcheck crate

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 พ.ย. 2024

ความคิดเห็น • 22

  • @leonie9248
    @leonie9248 2 หลายเดือนก่อน +25

    I'm so glad you keep on decrusting crates!

  • @samaelhelel
    @samaelhelel 2 หลายเดือนก่อน +56

    Babe, wake up. New Jonhoo video dropped and it's awesome

  • @wesleychaffin4029
    @wesleychaffin4029 2 หลายเดือนก่อน +3

    Every time I watch a jonhoo video I learn about some amazingly new and useful library

  • @reybontje2375
    @reybontje2375 2 หลายเดือนก่อน +5

    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.

  • @JaLikon65
    @JaLikon65 2 หลายเดือนก่อน +1

    Woohoo! Thank you Jon. Insightful as always 🙌

  • @itsawonderfullife4802
    @itsawonderfullife4802 2 หลายเดือนก่อน +7

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

    • @torsten_dev
      @torsten_dev 2 หลายเดือนก่อน

      Great. TIL that an involute is not an involution.

  • @erikgrundy
    @erikgrundy 2 หลายเดือนก่อน

    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

  • @AdamFiregate
    @AdamFiregate หลายเดือนก่อน

    Thanks! (And I'm reading your book in paperback.)

  • @fatherdingo4111
    @fatherdingo4111 4 วันที่ผ่านมา

    I think the mathematical term you're looking for is bijective. f is bijective when f⁻¹(f(x)) = x.

  • @weisbrja
    @weisbrja 2 หลายเดือนก่อน +1

    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?

    • @jonhoo
      @jonhoo  2 หลายเดือนก่อน +1

      I... think so!

  • @AbdulfatahMohammedSheikhMohamm
    @AbdulfatahMohammedSheikhMohamm หลายเดือนก่อน

    Thank you man

  • @pooyannajafi
    @pooyannajafi หลายเดือนก่อน

    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.

  • @Veloxzr
    @Veloxzr หลายเดือนก่อน

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

  • @LB-mf4bs
    @LB-mf4bs หลายเดือนก่อน

    the inverse is the function itself, so the function has order two and it is, indeed, an inversion

  • @gregoryedison4302
    @gregoryedison4302 หลายเดือนก่อน

    missed the stream, so sad

  • @daniellambert6207
    @daniellambert6207 2 หลายเดือนก่อน +2

    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.

  • @LtdJorge
    @LtdJorge 2 หลายเดือนก่อน

    Let’s goooo

  • @Homeworkbad
    @Homeworkbad 2 หลายเดือนก่อน

    Quick rust VOD. Check it out 😉

  • @Tyilo
    @Tyilo หลายเดือนก่อน

    proptest has its own Arbitrary trait and doesn't use the arbitrary crate's Arbitrary trait.

  • @CrapE_DM
    @CrapE_DM หลายเดือนก่อน

    Nice haircut. Looks good