HN Headlines minimal added by C-Keen on Thu Oct 9 09:33:52 2014

(use http-client rest-bind medea)
(define-method (item id ".json" #!key print)
  "https://hacker-news.firebaseio.com/v0/item/"
  #f
  read-json)
(define-method (topstories #!key print)
  "https://hacker-news.firebaseio.com/v0/topstories.json"
  #f
  read-json)
(define (frontpage-stories #!optional (number-of-articles 30))
  (map item (take (vector->list (topstories)) number-of-articles)))
(for-each (lambda (s)
            (printf "~s by ~s~%" (alist-ref 'title s) (alist-ref 'by s)))
          (frontpage-stories))