Arc Forumnew | comments | leaders | submitlogin
4 points by kogir 3525 days ago | link | parent

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")))