wisp

get interweb fluff
Log | Files | Refs

commit 49f674933eb63fda89a262a4678f07f854cb4fc7
parent d6ada43cacdd28cd0eecfa1bdeb67941e05738ba
Author: rsiddharth <s@ricketyspace.net>
Date:   Tue, 18 Jun 2019 19:46:45 -0400

hn/g: Add fmt.

* hn/g (fmt): New function.

Diffstat:
hn/g | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/hn/g b/hn/g @@ -9,6 +9,7 @@ (require racket/list) (require racket/port) +(require racket/format) (require net/http-client) (require openssl) @@ -20,6 +21,9 @@ (define HOST "news.ycombinator.com") + +(define (fmt n w) (~a n #:width w #:align 'right #:pad-string "0")) + (define (fp) "Fetch HN Front Page." (let ((hc (http-conn-open HOST #:ssl? (ssl-make-client-context 'secure)