• 0 Posts
  • 96 Comments
Joined 2 years ago
cake
Cake day: July 8th, 2023

help-circle
  • Tsoding has created a few rules for writing Rust to make Rust “fun” to program in, and gave them the name of Crust.

    Here is the rule set (it may change over time):

    1. Every function is unsafe.
    2. No references, only pointers.
    3. No cargo, build with rustc directly.
    4. No std, but libc is allowed.
    5. Only Edition 2021.
    6. All user structs and enums #[derive(Clone, Copy)].
    7. Everything is pub by default.

    If you ever want to try this out for some ungodly reason, there’s a GitHub repository with an example Main that shows how to use libc and other libraries (in the example, it’s raylib), and with a Makefile showing how to compile your projects (remember we aren’t using cargo).



  • Wait, now I need to know why.

    * some time later *

    I went to check why the hell this happened. It looks like the pair (“(,)”) is defined as an instance of Foldable, for some reason, which is the class used by functions like foldl() and foldr(). Meanwhile, triples and other tuples of higher order (such as triples, quadruples, …) are not instances of Foldable.

    The weirdest part is that, if you try to use a pair as a Foldable, you only get the second value, for some reason… Here is an example.

    ghci> foldl (\acc x -> x:acc) [] (1,2)
    
    [2]
    

    This makes it so that the returned length is 1.















  • But when Firebase gets that network/IP change report, what information does it get? Because if it only gets the public IP address, the reported IP will still be the VPN one, not the real one, right? So, if that were the only information reported to Firebase, wouldn’t you still be protected? Does Firebase block requests when you’re using a VPN (this could be detected, for example, if certain aspects of the network have changed but the IP hasn’t)? Is that what you mean with not getting push notifications when simulating a local IP with filters?

    PS: From my research, the WiFi’s SSID can also be used to track someone’s whereabouts, but depending on where you are and how many networks have used the same SSID, it may work work well or badly. You can see that by going to https://wigle.net/ (which is a database on WiFi networks with some publicly-available information), go to the map, type in the SSID field, and click “Filter”. I’m not sure if Firebase gets that info in the network reports, but I find it likely that it does.




  • yetAnotherUser@lemmy.catolinuxmemes@lemmy.worldLinus T..... (choose wisely)
    link
    fedilink
    arrow-up
    7
    arrow-down
    10
    ·
    edit-2
    6 months ago

    EDIT: I apologize to everyone who has so far read this comment. I misunderstood what Linus Torvalds meant in the interview I mentioned. I thought he was just calling the Russian kernel contributors “Internet trolls”, be he was actually referring to Russian “troll farms” taking advantage of the controversy generated by how the Linux Foundation removed the Russian devs from kernel development without saying a word, to entice outrage and try to get the Foundation’s decision reversed. (afaik they had to do it because the US government ordered them to, and the foundation is hosted in the US.) I’m leaving the post in its original form for posterity.

    I think the way Torvalds treated the Russian kernel maintainers that got silently removed from development (a situation that, by itself, was completely mishandled) was awful to say the least. In a interview, he said they were all Internet trolls, and referenced conflicts between Finland and Russia to “explain” his disdain for Russians. Say what you want, but I usually call a person that judges others based on their country of birth alone, an asshole. Not just that, but such behaviour sounds extremely ungrateful when we are talking about people who contributed in extremely important ways to Torvalds’ biggest project of his life. I used to have a positive view of Torvalds, but this kind of ruined it for me.