3 ms·
Racket (arc's host language) keeps continuations on the filesystem, or you can write your own "stuffer" to do what you want with them (store them in a database
by gcr 14y ago
Racket (arc's host language) keeps continuations on the filesystem, or you can write your own "stuffer" to do what you want with them (store them in a database or whatever). But you have to keep them somewhere or else (assuming the server uses continuations) you can't keep track of the user's path through your code as they click through links and such.
Racket does have an option to serialize the continuations, gzip them, sign them with HMAC, and then send all of that to the client so the server doesn't have to keep track of anything, but HN doesn't use it.
See http://docs.racket-lang.org/continue/#(part._.Advanced_.Control_.Flow) http://docs.racket-lang.org/continue/#(part._.Advanced_.Cont... for a quick introduction.
- epochwolf 14y agoHN doesn't use racket. It's a custom lisp based on scheme.
- gcr 14y agoSure it does. HN is written in "Arc": https://github.com/wting/hackernews https://github.com/wting/hackernews Arc runs on Racket: http://en.wikipedia.org/wiki/Arc_(programming_language) http://en.wikipedia.org/wiki/Arc_(programming_language) See the "OS" section where it says "runs on the Racket compiler" See also the Arc source code, https://github.com/Pauan/ar/blob/arc/nu/arc https://github.com/Pauan/ar/blob/arc/nu/arc Note the "#lang racket" at the top.