Created
June 23, 2015 11:01
-
-
Save yminsky/8773a39663332ef00a50 to your computer and use it in GitHub Desktop.
A possible bug?
This file contains hidden or 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 | |
| (require web-server/servlet | |
| web-server/servlet-env) | |
| (require pict) | |
| (require file/convertible) | |
| (require xml) | |
| (define (pict->svg pict) | |
| (define svg-b (convert pict 'svg-bytes)) | |
| (define svg-s (bytes->string/utf-8 svg-b)) | |
| (string->xexpr svg-s)) | |
| (define (start req) | |
| (response/xexpr | |
| `(html | |
| (body | |
| ,(pict->svg (text (number->string 1))) "-" | |
| ,(pict->svg (text (number->string 4))) "-" | |
| ,(pict->svg (text (number->string 5))) | |
| )))) | |
| (serve/servlet start) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment