From 2d1c21425362b691fab133d9a56715d19bea4bf8 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Tue, 20 May 2014 10:33:02 -0700 Subject: [PATCH] Content types etc. --- try/sys/hoon/ref/gate.hoon | 3 + try/sys/html/ref/gate.hoon | 2 + try/sys/html/tan/mime/gate.hoon | 3 + try/sys/md/ref/gate.hoon | 1 + try/sys/md/tan/html/gate.hoon | 342 ++++++++++++++++++++++++++++++++ try/sys/md/tan/mime/gate.hoon | 3 + 6 files changed, 354 insertions(+) create mode 100644 try/sys/hoon/ref/gate.hoon create mode 100644 try/sys/html/ref/gate.hoon create mode 100644 try/sys/html/tan/mime/gate.hoon create mode 100644 try/sys/md/ref/gate.hoon create mode 100644 try/sys/md/tan/html/gate.hoon create mode 100644 try/sys/md/tan/mime/gate.hoon diff --git a/try/sys/hoon/ref/gate.hoon b/try/sys/hoon/ref/gate.hoon new file mode 100644 index 000000000..772a81e76 --- /dev/null +++ b/try/sys/hoon/ref/gate.hoon @@ -0,0 +1,3 @@ +|= rem=spur +~& [%html rem] +,@ diff --git a/try/sys/html/ref/gate.hoon b/try/sys/html/ref/gate.hoon new file mode 100644 index 000000000..353a9ccf3 --- /dev/null +++ b/try/sys/html/ref/gate.hoon @@ -0,0 +1,2 @@ +|= * +,@ diff --git a/try/sys/html/tan/mime/gate.hoon b/try/sys/html/tan/mime/gate.hoon new file mode 100644 index 000000000..730948e87 --- /dev/null +++ b/try/sys/html/tan/mime/gate.hoon @@ -0,0 +1,3 @@ +|= * +|= htm=@ +[/text/html (met 3 htm) htm] diff --git a/try/sys/md/ref/gate.hoon b/try/sys/md/ref/gate.hoon new file mode 100644 index 000000000..00f1dfa93 --- /dev/null +++ b/try/sys/md/ref/gate.hoon @@ -0,0 +1 @@ +|=(* ,@) diff --git a/try/sys/md/tan/html/gate.hoon b/try/sys/md/tan/html/gate.hoon new file mode 100644 index 000000000..8e6b4de54 --- /dev/null +++ b/try/sys/md/tan/html/gate.hoon @@ -0,0 +1,342 @@ +!: +|= * +=> %= . + + + => + + => + |% + ++ down + $& [p=down q=down] + $% [%$ p=tape] + [%code p=tape] + [%inco p=tape] + [%head p=haxe q=down] + [%link p=tape q=tape r=(unit tape)] + [%lord p=(list down)] + [%lund p=(list down)] + [%parg p=down] + [%quot p=down] + [%rong p=down] + [%emph p=down] + [%hrul ~] + [%html p=tape] + == + ++ haxe + |= a=* + ?@ a + ?:(&(!=(0 a) (lth a 6)) a 6) + 6 + -- + |% + ++ cott + ;~ pose + (shim 0 8) + (shim 11 37) + (shim 39 59) + (just `@`61) + (shim 63 95) + (shim 97 255) + == + ++ copt + ;~ pose + (shim 0 9) + (shim 11 37) + (shim 39 39) + (shim 43 59) + (just `@`61) + (shim 63 90) + (shim 94 94) + (shim 97 255) + == + ++ urlc ;~(pose (shim 0 9) (shim 11 31) (shim 33 39) (shim 42 255)) + ++ uctt ;~(pose (shim 0 9) (shim 11 91) (shim 94 255)) + ++ uctc ;~(pose (shim 0 9) (shim 11 33) (shim 35 39) (shim 42 255)) + ++ htmc ;~(pose (shim 0 9) (shim 11 255)) + ++ escp (mask "\\`*_\{}[]()#+-.!") + ++ escd ;~(pfix bas escp) + ++ whit (mask (tape 9 32 ~)) + ++ dent ;~(pose (jest ' ') (just `@`9)) + ++ blan (cold ~ ;~(plug (star whit) (just `@`10))) + ++ mcat (bend |=([a=tape b=tape] (some (weld a b)))) + ++ wcat |*(a=_rule (cook |=([a=tape b=tape] (weld a b)) a)) + ++ codt + %+ knee *tape |. ~+ + ;~ pose + (wcat ;~(plug (plus cott) codt)) + (cook |=(a=tape (weld "<" a)) ;~(pfix gal ;~(pose codt (easy ~)))) + (cook |=(a=tape (weld ">" a)) ;~(pfix gar ;~(pose codt (easy ~)))) + (cook |=(a=tape (weld "&" a)) ;~(pfix pam ;~(pose codt (easy ~)))) + (plus cott) + == + ++ inlt + %+ knee *tape |. ~+ + ;~ pose + ;~(mcat (plus copt) inlt) + ;~(mcat (plus escd) inlt) + ;~ mcat + %- wcat + ;~ plug + ;~(plug gal (cook trip inle)) + ;~(sfix (wcat ;~(plug (star copt) (easy ">"))) gar) + == + inlt + == + ;~ mcat + %- wcat + ;~ plug + ;~(plug gal fas (cook trip inle)) + ;~(sfix (wcat ;~(plug (star copt) (easy ">"))) gar) + == + inlt + == + ;~ mcat + (wcat ;~(plug ;~(plug pam hax ;~(sfix (plus nud) sem)) (easy ";"))) + inlt + == + ;~ mcat + (wcat ;~(plug ;~(plug pam ;~(sfix (plus alf) sem)) (easy ";"))) + inlt + == + (cook |=(a=tape (weld "<" a)) ;~(pfix gal ;~(pose inlt (easy ~)))) + (cook |=(a=tape (weld ">" a)) ;~(pfix gar ;~(pose inlt (easy ~)))) + (cook |=(a=tape (weld "&" a)) ;~(pfix pam ;~(pose inlt (easy ~)))) + == + ++ kite + |= bud=(list ,@t) + |= tub=nail + |- ^- (like ,@t) + ?@ bud + (fail tub) + =+ foo=((jest i.bud) tub) + ?~ q.foo + $(bud t.bud) + foo + ++ bloc + %+ knee *@t |. ~+ + %- kite + :~ '
' '
' '