4 ms·
That's not the code that currently runs hn - AFAIK it's the code that ran hn at some distant point in the past. I'm not quite sure what's the best current path
by e12e 11y ago
That's not the code that currently runs hn - AFAIK it's the code that ran hn at some distant point in the past. I'm not quite sure what's the best current path for those that want to run their own hn, on (something similar to) arc probably anarki?:
https://github.com/arclanguage/anarki https://github.com/arclanguage/anarki
Possibly arc-nu?:
https://github.com/arclanguage/arc-nu https://github.com/arclanguage/arc-nu
At least it appears arc3.1 runs under racket (not sure how long that's been the case, but presumably for a while):
$ racket -v
Welcome to Racket v6.1.
$ wget http://ycombinator.com/arc/arc3.1.tar
$ tar xf arc3.1.tar
$ cd arc3.1/
$ echo admin > arc/admins
# WARNING: running random code from the Internet
# downloaded over an insecure link is not a good idea!
# But a checkout from https://github.com/wting/hackernews.git
# *failed* to run under racket...
$ racket -f as.scm
Use (quit) to quit, (tl) to return here after an interrupt.
arc> (load "news.arc")
nil
arc> (nsv)
rm: cannot remove ‘arc/news/story/*.tmp’: No such file or directory
load items:
ranking stories.
ready to serve port 8080
I don't know if https://github.com/wting/hackernews.git https://github.com/wting/hackernews.git is a reflection
of the updated hn source - I don't think it is. For one thing, if we
look at:
http://arclanguage.org/item?id=19174 http://arclanguage.org/item?id=19174
"Ask Arc: How to add a toplabels in news.arc?"
> On Hacker News, the ask and show pages are implemented just like the
> front page, but they filter the item list based on title or whether or
> not there's a link.
>
> And yes, that means they won't show items not already loaded into RAM ;)
(defop ask ((p page))
(pagepage ranked-stories* p
[and (askpage-filter _) _]
"ask" "Ask"))
> The magic is in askpage-filter:
(def askpage-filter (s)
(and (astory s)
(blank s!url)
(~begins (downcase s!title) "show hn")))
There's no -filter, in the github repo:
https://github.com/wting/hackernews/search?utf8=&q=-filter&type=Code https://github.com/wting/hackernews/search?utf8=&q=-filter&t...