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 | |
(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)) |
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
Lyrics: | |
Take big steps to eval, like a nomad | |
Bind and return like a Monad | |
Got you looking so mad | |
about the signature I got you using | |
in the directory with the MLI files the compiler was choosing | |
The type checks out, I’m feeling greater | |
Defer the value now and I return a little later | |
Cuz I’m threaded, so for now I ain’t got much to say |
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
let rec lexwhile prop inp = | |
match inp with | |
| c::cs when prop c -> let tok,rest = lexwhile prop cs in c^tok,rest | |
| _ -> "",inp | |
;; | |
let rec lex inp = | |
match snd(lexwhile space inp) with | |
| [] -> [] |
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
let rec lexwhile prop inp = | |
match inp with | |
| c::cs when prop c -> | |
let (tok,rest) = lexwhile prop cs in | |
(c^tok,rest) | |
| _ -> ("",inp) | |
;; | |
let rec lex inp = |
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
let rec lexwhile prop inp = | |
match inp with | |
| c::cs when prop c -> let tok,rest = lexwhile prop cs in c^tok,rest | |
| _ -> "",inp | |
;; | |
let rec lex inp = | |
match snd(lexwhile space inp) with |
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
table server : { Temperature : float, | |
Uptime: int } | |
task initialize = fn () => | |
dml (DELETE FROM server WHERE TRUE); | |
dml (INSERT INTO server(Temperature, Uptime) VALUES({[0.0]}, {[0]})) | |
style selected | |
val main : transaction page = |
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
{ | |
"tagName": "body", | |
"properties": { | |
}, | |
"children": [ | |
{ | |
"tagName": "div", | |
"properties": { | |
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
{ | |
"tagName": "body", | |
"properties": { | |
}, | |
"children": [ | |
{ | |
"tagName": "div", | |
"properties": { | |
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
{ | |
"23": [ | |
{ | |
"type": 6, | |
"vNode": null, | |
"patch": { | |
"tagName": "tr", | |
"properties": { | |
}, |
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
{ | |
"children": [ | |
{ | |
"children": [ | |
{ | |
"text": "Search:" | |
}, | |
{ | |
"children": [ | |
{ |