This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket/base | |
(require (only-in net/url string->url call/input-url get-pure-port) | |
(only-in racket/date date-display-format date->string) | |
(only-in racket/match match) | |
(only-in racket/pretty pretty-print)) | |
(provide packages | |
packages-by-author | |
package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env racket | |
#lang racket | |
(require lens | |
net/http-easy | |
qi | |
racket/date | |
syntax/parse/define) | |
(current-print |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(struct time-result [elapsed gc cpu] #:prefab) | |
(define (time-function func N) | |
(let loop ((n N) (results '())) | |
(cond | |
[(zero? n) (reverse results)] ; Return the results in reverse order | |
[else | |
(let-values ([(result elapsed gc-time cpu-time) (time-apply func '())]) |