4 ms·
Ask PG: How many lines of Arc code is Hacker News?
Just curious.
- pg 19y ago2421, but a lot of that is back-end stuff no one can see.
- drm237 19y agoDoes that include the webserver code or is that separate?
- pg 19y agoThat's separate. But it doesn't need anything that wasn't in arc0.
- bfioca 19y agoAnd some of it is for the AI who is learning by reading the articles and will soon be self-aware.
- ivankirigin 19y agoIt's training to compete with VallyWag. Snarky comments auto-generated to tear apart the day's news. It should be too hard to write better than them. Eliza?
- deleted 19y ago[deleted]
- a-priori 19y agoHow do you know it's not already self-aware and posting here? How do you know I'm not the AI? * suspense
- jey 19y agoNeat, I think you found a bug that allows us to write literal asterisks! * test* * EDIT: OK, if you put three asterisks in a row with a whitespace or newline to the right of the asterisks, you get a literal asterisk, but six asterisks in a row does not get you two adjacent asterisks.
- henning 19y agoTell me more about "the AI?".
- a-priori 19y agoYou said earlier that tell me more about the ai.
- lyime 19y agolol
- yawn 19y agoSpeaking of back-end stuff, what is the backend of Hacker News? What are you using for persistence? Do you have any sort of model layer? Any recommendations/anecdotes?
- mynameishere 19y agoSerialized hash tables.
- pg 19y agoBy backend stuff I meant code for administration and analysis, not server infrastructure. For persistence we use hash tables written to files as s-expressions, and lazily loaded after restarts.
- wlievens 19y agoHow do you make the whole thing transactional? I don't mean file persistence (you can do that every once in a while) but the whole application. Manual thread synchronization?
- jey 19y agoYou don't need thread synchronization if you don't have threads. ;-) Threads should be avoided whenever possible and only used when you have no better alternative or if there is a really good performance benefit. Multithreaded programming is easy to screw up and hard to get right, and is usually not needed.