5 ms·
this really should be as easy as a database DELETE operation, why is it so difficult? guess the design for HN site is not "user-first". recalling facebook etc
by ausjke 9y ago
this really should be as easy as a database DELETE operation, why is it so difficult? guess the design for HN site is not "user-first".
recalling facebook etc was impossible to remove your account but now it seems feasible and quick, though not sure if facebook/etc indeed flushes the deleted-account cleanly.
- krapp 9y agoHacker News doesn't use a database - data is stored in Arc Lisp closures in flat files. I'm not certain how it handles usernames, though (I've played around a bit with Anarki, but can't remember) but I suspect it would probably involve a lot of file parsing and editing, assuming each username is literally just copied into a field in each thread file.
- kazinator 9y ago> data is stored in Arc Lisp closures in flat files. Are you sure? What the word "closure" usually refers to isn't an externalizable object used for persistent storage.
- Volundr 9y agoI can't speak to this particular detail, but it's written in ARC LISP, which itself is written in Racket, which has serializable closures (https://docs.racket-lang.org/web-server-internal/closure.html https://docs.racket-lang.org/web-server-internal/closure.htm...) so it's at least possible.
- krapp 9y agoWell, It uses s-expressions printed to text files. I don't know if that should be called using closures or not, if not, fair enough.
- gkoberger 9y agoNothing is ever that easy. Should there be a soft-delete in case they change their mind, or if it's malicious? Can YC alumni delete accounts, since the login is tied to applications? Should new users be prevented from signing up with an old username, to avoid "stealing" an identity? Are old posts from the person deleted? Old submissions? Either way, will it cause errors somewhere? Are child comments deleted? Are deleted accounts still available in the API (which is hosted by a third-party)? If not, will that break the application of someone using the API? I'm not saying they should/shouldn't do it, however it's not as easy as a "database DELETE operation".