• 0 Posts
  • 6 Comments
Joined 2 months ago
cake
Cake day: May 9th, 2024

help-circle
  • Apparently generating “Finite Projective Planes”. For context on how I got here, I went camping with my family and brought the game Spot It. My brother was analyzing it and came up with the same type of pattern.

    When we got home he made a python script to generate these boards, but it was quite slow, so he half joked asking me to rewrite it in Rust.

    I kinda struggled a bit since I didn’t fully understand what it was doing. Near the end I even got a segfault using safe code😃! (i was spawning a thread with a large stack size, and allocating huge slices on its stack, rather than you know… boxing the slice Lol.) When I finally got it working, it ended up being in the ballpark of a 23x speedup. Not bad for changing the language choice!

    There’s lots of room for improvement left for sure. The algorithm could benefit with some running statistics about cols/rows and the algorithm itself is quite naïve and could maybe be improved too :P


  • tuna@discuss.tchncs.detoScience Memes@mander.xyzI just cited myself.
    link
    fedilink
    English
    arrow-up
    10
    arrow-down
    1
    ·
    edit-2
    3 days ago

    If they aren’t equal, there should be a number in between that separates them. Between 0.1 and 0.2 i can come up with 0.15. Between 0.1 and 0.15 is 0.125. You can keep going, but if the numbers are equal, there is nothing in between. There’s no gap between 0.1 and 0.1, so they are equal.

    What number comes between 0.999… and 1?

    (I used to think it was imprecise representations too, but this is how it made sense to me :)


  • tuna@discuss.tchncs.detoScience Memes@mander.xyzElsevier
    link
    fedilink
    English
    arrow-up
    56
    arrow-down
    1
    ·
    9 days ago

    Imagine they have an internal tool to check if the hash exists in their database, something like

    "SELECT user FROM downloads WHERE hash = '" + hash + "';"
    

    You set the pdf hash to be 1'; DROP TABLE books;-- they scan it, and it effectively deletes their entire business lmfaoo.

    Another idea might be to duplicate the PDF many times and insert bogus metadata for each. Then submit requests saying that you found an illegal distribution of the PDF. If their process isn’t automated it would waste a lot of time on their part to find the culprit Lol

    I think it’s more interesting to think of how to weaponize their own hash rather than deleting it