Hacker Newsnew | past | comments | ask | show | jobs | submit | kd5bjo's commentslogin

I fall somewhere in the middle these days- I really like knowing in advance that I have a place to sleep each night and that I have a way to get there, but then just do whatever I feel like in the moment for everything else.


Who said anything about GDPR? If someone reveals to you that they are in some kind of protected class, then there’s a risk that anything you do they don’t like could see you tagged for discrimination even if it’s how you’d treat any customer in the same situation.


If you have evidence it's the usual approach (e.g. written policy documents, aggregate statistics), then it should be fine. If it's a situation that only comes up for certain demographics, and you handle it poorly such that members of those demographics consistently have a worse time than everyone else, then that might be a legitimate discrimination issue even if there's no malice intended.


That's also an option available to you: Mutex::new() is const, so there's no trouble putting one in a static variable. If the inner value can't be const-constructed, you'll need a way to prevent access before it's initialized; for that, you can use a OnceLock or just Box::leak() the Mutex once it's constructed and pass around a simple reference.


I happen to be just now experimenting with app states. Out of interest, you mean something like this? https://gist.github.com/Ciantic/63526ebfe65570b669eca33bf340...

What would be disadvanatages of this approach? I don't like Arc's myself either, I would like to see what is best alternative for those in multi threaded apps.


Different commenter but yes, that's exactly what they mean.

The main disadvantage is strong coupling. The shared state inside the static makes it more difficult to test your code. There are ways to reduce this coupling, the most obvious being that you push as much logic as possible into functions that accept a reference rather than use your static directly. Then you minimize the size of the code which is difficult to test, and cover it with end to end testing.

The OnceLock does impose 1 atomic operation of overhead, whereas an Arc imposes 2 (in this case, it can be more if weak references are used). However neither are likely to be important when you consider the overhead of the Mutex; the Mutex is likely to involve system calls and so will dominate the overhead. (If there's little to no contention then the Mutex is a lot like an Arc.)

Your alternative would be to use `Box::leak()` as the parent comment describes, which would force you to pass a reference around (resulting in better coupling) and eliminate overhead from OnceLock. However, it's unlikely to result in any material performance benefit, and you could reduce coupling without departing from your current approach, so I don't think either approach is clearly or overwhelmingly better.


There's some precedent for this: Back in the 40s, the movie studios were forced to sell their stake in theaters due to antitrust issues around exclusivity. Streaming services owning studios feels like the essentially the same situation.

https://en.wikipedia.org/wiki/United_States_v._Paramount_Pic....


The law says that toys have to look like this, but there's often no restriction against painting an orange tip onto an actual firearm.


`Send`, `Sync`, and `Unpin` are special because they're so-called 'auto traits': The compiler automatically implements them for all compound types whose fields also implement those traits. That turns out to be a double-edged sword: The automatic implementation makes them pervasive in a way that `Clone` or `Debug` could never be, but it also means that changes which might be otherwise private can have unintended far-reaching effects.

In your case, what happens is that async code conceptually generates an `enum` with one variant per await point which contains the locals held across that point, and it's this enum that actually gets returned from the async method/block and implements the `Future` trait.


> There’s no difference with a password, except that the sign-in process can be streamlined when everything works

There is one other major difference behind the scenes: With passkeys, the service you’re logging into never has enough information to authenticate as you, so leaks of the server-side credential info are almost (hopefully completely) useless to an attacker.


Sure, but that would mean the service is likely to be useless as well.

And, you’re likely to loose access to your service. It’s like would you rather loose your pictures forever, or have them copied by someone


It’s an attack that lets the malicious actor hijack the passkey registration flow to insert a key that they know, so that they can later log in as the victim.


If the computer where registration happens is not trusted, no authentication protocol will help. Compare this attack ("malicious computer substitutes passkey at registration time") with a password one ("malicious computer substitutes password at registration time").


But unlike a compromised password, a compromised passkey can be detected much more easily, since the "real" key will end up not working, unless the attacker also adds it to the victim's account.


Then it should be very obvious if the site displays the user's registered passkeys.


That should be very noticeable to the victim though, right?

Their own key would not work (unless the attacker persistently MITMs them and swaps their own credential in for every subsequent authentication) or they'd see multiple credentials being present in their account.

It's also a good idea to send out an email for every new credential added.


> Chrome needs to be started with remote debugging

Pretty confident that is out of scope for any reasonable threat model.


A quick read through of their anonymization process seems to indicate that they didn’t scan the message contents for PII (other than usernames).

If true, that seems like a huge oversight. I also wonder what would happen if someone finds their information in the dataset and requests it to be removed per GDPR or other privacy legislation.


I can't help but think that if you say something in a public forum you should implicitly give up the right to privacy.

E.g. if someone scraped hackernews and made a dataset containing this comment, i don't think i should have any right to complain.


I understand wanting to be careful, but didn't they only grab messages from servers that are already very public? Are Twitter message datasets anonymized?


That's not how GDPR works and in this case the data is clearly anonymised despite the authors' claims. Amongst others, there needs to be mechanisms for users to delete their data, whether it was at some point public or not.


Yeah there probably is some GDPR implication somewhere, I wasn't speaking on the legal aspects.


The authors can presumably update the dataset on the site; however, I think past versions remain. Besides that, the GDPR is at odds with the fact that public posts and data almost never goes away. I don't think that reality can be legislated away, try as politicians might.

In all honesty, it's better to reserve the effectiveness for private, personal data, for the sake of practicality.


I use Anki more as a serendipity engine than for memorization: Whenever[1] I have an interesting observation or thought, I'll write a couple of sentences about it and file two copies: One in Obsidian, with links to any adjacent/relevant notes (if any), and another in Anki as a Close deletion.

Anki is set up with a long review cycle (1 day, 1 week, 1 month, then automated) and I sit down to do my reviews about once a week. In that process, I usually end up having new ideas to make notes about based on either the randomized order the notes show up in or spotting a connection between the review note and something I've been working on lately.

[1] In practice, I let many/most of these go unrecorded - I probably average about one new note per day, but in bursts.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: