• 2 Posts
  • 69 Comments
Joined 11 months ago
cake
Cake day: July 21st, 2023

help-circle
  • I used reddit under a normal username that I used everywhere for like 10 years. I didn’t ever do anything, but did start to feel uncomfortable with the amount of data available to anyone interested. Discord was so much worse for me, I had years of chat logs with like thousands and thousands of messages. Modern governments have the potential to have so much information on people compared to before 1970. Like, there’s a very big difference between getting a subponea for 100,000 messages in chat logs for 2010-2020 and having to talk to acquaintances of the person in the ways that investigations happened before the internet.

    I don’t know, I somewhat think there should be shorter time limits for how long chat logs can be used in courts.


  • My threat model is company tracking. I feel like I stand out like a bright red target with a random letter username, but it’s just so companies using tools like Sherlock will struggle to connect my other accounts. I found it exhausting to create new usernames that I liked for every service.

    I’ve actually been wanting to create a normal fediverse account self hosted with my own domain, but I haven’t done it yet because I haven’t completely determined what I want to do yet.





  • Two of your macro rules are not used 😉 (expand to see which ones).

    The macro rules are all used. (Macros are matched from top to bottom by the declared match types. The ident/expressions can’t match until after the more text based Option matching.)

    let _foo = Span { line: 1, column: 1, file_path: None };
    let _bar = Span { line: 1, column: 1, file_path: "file.txt".upgrade() };
    let _baz = Span { line: 1, column: 1, file_path: Some("file.txt".to_string()) };
    let _baz = Span { line: 1, column: 1, file_path: None };
    let _baz = Span { line: 1, column: 1, file_path: borrowed.upgrade() };
    let _baz = Span { line: 1, column: 1, file_path: owned.upgrade() };
    

    This doesn’t support Option<&str>. If it did, we would lose literal None support 😉

    I didn’t make Option<&str> an option because the struct is for type Option<String>. It does support Option<String> though.

    impl OptionUpgrade for Option<String> {
        fn upgrade(self) -> Option<String> {
            self
        }
    }
    

    It looks like the following, and uses the last match case.

    let opt: Option<String> = Some("text".into());
    let opt = span!(1, 1, opt);
    

    With macro expansion

    let opt: Option<String> = Some("text".into());
    let opt = Span { line: 1, column: 1, file_path: opt.upgrade() };
    

    There’s not anything stopping it from supporting Option<&str> though. This would be the implementation

    impl OptionUpgrade for Option<&str> {
        fn upgrade(self) -> Option<String> {
            self.map(|v| v.into())
        }
    }