summaryrefslogtreecommitdiff
path: root/desk/mar
diff options
context:
space:
mode:
authorpolwex <polwex@sortug.com>2025-06-27 22:53:52 +0700
committerpolwex <polwex@sortug.com>2025-06-27 22:53:52 +0700
commit328ebe85135912678bdacd3381126ffd66ef2761 (patch)
tree365962bf45302f2a440f766a4f3c9e0a962dbe47 /desk/mar
init
Diffstat (limited to 'desk/mar')
-rw-r--r--desk/mar/bill.hoon34
-rw-r--r--desk/mar/css.hoon25
-rw-r--r--desk/mar/greg-event.hoon14
-rw-r--r--desk/mar/hoon.hoon36
-rw-r--r--desk/mar/ico.hoon12
-rw-r--r--desk/mar/jam.hoon17
-rw-r--r--desk/mar/js.hoon25
-rw-r--r--desk/mar/json.hoon26
-rw-r--r--desk/mar/kaji.hoon56
-rw-r--r--desk/mar/kelvin.hoon28
-rw-r--r--desk/mar/mime.hoon32
-rw-r--r--desk/mar/noun.hoon22
-rw-r--r--desk/mar/sh.hoon25
-rw-r--r--desk/mar/ship.hoon20
-rw-r--r--desk/mar/svg.hoon12
-rw-r--r--desk/mar/ttf.hoon25
-rw-r--r--desk/mar/txt.hoon274
-rw-r--r--desk/mar/udon.hoon29
18 files changed, 712 insertions, 0 deletions
diff --git a/desk/mar/bill.hoon b/desk/mar/bill.hoon
new file mode 100644
index 0000000..76cef34
--- /dev/null
+++ b/desk/mar/bill.hoon
@@ -0,0 +1,34 @@
+|_ bil=(list dude:gall)
+++ grow
+ |%
+ ++ mime `^mime`[/text/x-bill (as-octs:mimes:html hoon)]
+ ++ noun bil
+ ++ hoon
+ ^- @t
+ |^ (crip (of-wall:format (wrap-lines (spit-duz bil))))
+ ::
+ ++ wrap-lines
+ |= taz=wall
+ ^- wall
+ ?~ taz ["~"]~
+ :- (weld ":~ " i.taz)
+ %- snoc :_ "=="
+ (turn t.taz |=(t=tape (weld " " t)))
+ ::
+ ++ spit-duz
+ |= duz=(list dude:gall)
+ ^- wall
+ (turn duz |=(=dude:gall ['%' (trip dude)]))
+ --
+ ++ txt (to-wain:format hoon)
+ --
+++ grab
+ |%
+ ++ noun (list dude:gall)
+ ++ mime
+ |= [=mite len=@ud tex=@]
+ ~_ tex
+ !<((list dude:gall) (slap !>(~) (ream tex)))
+ --
+++ grad %noun
+--
diff --git a/desk/mar/css.hoon b/desk/mar/css.hoon
new file mode 100644
index 0000000..1a87081
--- /dev/null
+++ b/desk/mar/css.hoon
@@ -0,0 +1,25 @@
+::
+:::: /hoon/css/mar
+ ::
+/? 310
+=, eyre
+=, mimes:html
+|_ mud=@t
+++ grow :: convert to
+ |%
+ ++ mime [/text/css (as-octs mud)] :: convert to %mime
+ ++ hymn :: convert to %hymn
+ |^ html
+ ++ style ;style
+ ;- (trip mud)
+ ==
+ ++ html ;html:(head:"{style}" body)
+ --
+ --
+++ grab
+ |% :: convert from
+ ++ mime |=([p=mite q=octs] (@t q.q))
+ ++ noun @t :: clam from %noun
+ --
+++ grad %mime
+--
diff --git a/desk/mar/greg-event.hoon b/desk/mar/greg-event.hoon
new file mode 100644
index 0000000..47b9d9d
--- /dev/null
+++ b/desk/mar/greg-event.hoon
@@ -0,0 +1,14 @@
+/- b=boke
+::
+|_ e=radio-event:b
+++ grad %noun
+++ grow
+ |%
+ ++ noun e
+ --
+::
+++ grab
+ |%
+ ++ noun radio-event:b
+ --
+--
diff --git a/desk/mar/hoon.hoon b/desk/mar/hoon.hoon
new file mode 100644
index 0000000..428e105
--- /dev/null
+++ b/desk/mar/hoon.hoon
@@ -0,0 +1,36 @@
+:::: /hoon/hoon/mar
+ ::
+/? 310
+::
+=, eyre
+|_ own=@t
+::
+++ grow :: convert to
+ |%
+ ++ mime `^mime`[/text/x-hoon (as-octs:mimes:html own)] :: convert to %mime
+ ++ hymn
+ ;html
+ ;head
+ ;title:"Source"
+ ;script@"//cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/codemirror.js";
+ ;script@"/lib/syntax/hoon.js";
+ ;link(rel "stylesheet", href "//cdnjs.cloudflare.com/ajax/libs/".
+ "codemirror/4.3.0/codemirror.min.css");
+ ;link/"/lib/syntax/codemirror.css"(rel "stylesheet");
+ ==
+ ;body
+ ;textarea#src:"{(trip own)}"
+ ;script:'CodeMirror.fromTextArea(src, {lineNumbers:true, readOnly:true})'
+ ==
+ ==
+ ++ txt
+ (to-wain:format own)
+ --
+++ grab
+ |% :: convert from
+ ++ mime |=([p=mite q=octs] q.q)
+ ++ noun @t :: clam from %noun
+ ++ txt of-wain:format
+ --
+++ grad %txt
+--
diff --git a/desk/mar/ico.hoon b/desk/mar/ico.hoon
new file mode 100644
index 0000000..e862b9b
--- /dev/null
+++ b/desk/mar/ico.hoon
@@ -0,0 +1,12 @@
+|_ dat=@
+++ grow
+ |%
+ ++ mime [/image/x-icon (as-octs:mimes:html dat)]
+ --
+++ grab
+ |%
+ ++ mime |=([p=mite q=octs] q.q)
+ ++ noun @
+ --
+++ grad %mime
+--
diff --git a/desk/mar/jam.hoon b/desk/mar/jam.hoon
new file mode 100644
index 0000000..cbbd524
--- /dev/null
+++ b/desk/mar/jam.hoon
@@ -0,0 +1,17 @@
+::
+:::: /hoon/jam/mar
+ ::
+/? 310
+::
+=, mimes:html
+|_ mud=@
+++ grow
+ |%
+ ++ mime [/application/x-urb-jam (as-octs mud)]
+ --
+++ grab
+ |% :: convert from
+ ++ noun @ :: clam from %noun
+ --
+++ grad %mime
+--
diff --git a/desk/mar/js.hoon b/desk/mar/js.hoon
new file mode 100644
index 0000000..fe010d9
--- /dev/null
+++ b/desk/mar/js.hoon
@@ -0,0 +1,25 @@
+::
+:::: /hoon/js/mar
+ ::
+/? 310
+::
+=, eyre
+|_ mud=@
+++ grow
+ |%
+ ++ mime [/application/javascript (as-octs:mimes:html (@t mud))]
+ ++ hymn :: convert to %hymn
+ |^ html
+ ++ script ;script
+ ;- (trip (@t mud))
+ ==
+ ++ html ;html:(head:"{script}" body)
+ --
+ --
+++ grab
+ |% :: convert from
+ ++ mime |=([p=mite q=octs] (@t q.q))
+ ++ noun cord :: clam from %noun
+ --
+++ grad %mime
+--
diff --git a/desk/mar/json.hoon b/desk/mar/json.hoon
new file mode 100644
index 0000000..7d6fcbf
--- /dev/null
+++ b/desk/mar/json.hoon
@@ -0,0 +1,26 @@
+::
+:::: /hoon/json/mar
+ ::
+/? 310
+ ::
+:::: compute
+ ::
+=, eyre
+=, format
+=, html
+|_ jon=^json
+::
+++ grow :: convert to
+ |%
+ ++ mime [/application/json (as-octs:mimes -:txt)] :: convert to %mime
+ ++ txt [(en:json jon)]~
+ --
+++ grab
+ |% :: convert from
+ ++ mime |=([p=mite q=octs] (fall (de:json (@t q.q)) *^json))
+ ++ noun ^json :: clam from %noun
+ ++ numb numb:enjs
+ ++ time time:enjs
+ --
+++ grad %mime
+--
diff --git a/desk/mar/kaji.hoon b/desk/mar/kaji.hoon
new file mode 100644
index 0000000..4061b49
--- /dev/null
+++ b/desk/mar/kaji.hoon
@@ -0,0 +1,56 @@
+::
+:::: /hoon/kaji/mar
+ ::
+/? 310
+/+ kaji
+:::: A kaji html string mark
+|_ efs=(list effect:kaji) :: this only affects +grow
+++ grab |%
+ ++ noun @
+ ++ json |= jon=^json
+ =/ mp ((om:dejs:format so:dejs:format) jon)
+ =/ action ~| 'action not set by web input' (~(got by mp) 'action')
+ :- action (~(del by mp) 'action')
+ --
+++ grow |%
+ ++ noun efs
+ :: for scries
+ :: ++ mime [/application/x-urb-jam (as-octs:mimes:html (crip (en-xml:html *manx)))]
+ :: for facts
+ ++ json =, enjs:format
+ |^ :- %a %+ turn efs |= e=effect:kaji %+ frond -.e
+ ?- -.e
+ %refresh ~
+ %redi [%s url.e]
+ %focus [%s sel.e]
+ %scroll [%s sel.e]
+ %url [%s url.e]
+ %custom %- pairs
+ :~ [%manx %s (crip (en-xml:html manx.e))]
+ [%event data.e]
+ ==
+ %modal %+ frond %manx [%s (crip (en-xml:html manx.e))]
+ %alert %- pairs
+ :~ [%manx %s (crip (en-xml:html manx.e))]
+ [%duration (numb dur.e)]
+ ==
+ %swap %- pairs
+ :~ [%manx %s (crip (en-xml:html manx.e))]
+ [%sel %s sel.e]
+ [%inner %b inner.e]
+ ==
+ %add %- pairs
+ :~ [%manx %s (crip (en-xml:html manx.e))]
+ [%container %s container.e]
+ [%where (en-where where.e)]
+ ==
+ ==
+ ++ en-where |= w=where.kaji %+ frond -.w
+ ?- -.w
+ %top ~
+ %bottom ~
+ %before [%s sibling.w]
+ ==
+ --
+ --
+--
diff --git a/desk/mar/kelvin.hoon b/desk/mar/kelvin.hoon
new file mode 100644
index 0000000..7f1b409
--- /dev/null
+++ b/desk/mar/kelvin.hoon
@@ -0,0 +1,28 @@
+|_ kal=waft:clay
+++ grow
+ |%
+ ++ mime `^mime`[/text/x-kelvin (as-octs:mimes:html hoon)]
+ ++ noun kal
+ ++ hoon
+ %+ rap 3
+ %+ turn
+ %+ sort
+ ~(tap in (waft-to-wefts:clay kal))
+ |= [a=weft b=weft]
+ ?: =(lal.a lal.b)
+ (gte num.a num.b)
+ (gte lal.a lal.b)
+ |= =weft
+ (rap 3 '[%' (scot %tas lal.weft) ' ' (scot %ud num.weft) ']\0a' ~)
+ ::
+ ++ txt (to-wain:format hoon)
+ --
+++ grab
+ |%
+ ++ noun waft:clay
+ ++ mime
+ |= [=mite len=@ud tex=@]
+ (cord-to-waft:clay tex)
+ --
+++ grad %noun
+--
diff --git a/desk/mar/mime.hoon b/desk/mar/mime.hoon
new file mode 100644
index 0000000..83b4dae
--- /dev/null
+++ b/desk/mar/mime.hoon
@@ -0,0 +1,32 @@
+::
+:::: /hoon/mime/mar
+ ::
+/? 310
+::
+|_ own=mime
+++ grow
+ ^?
+ |%
+ ++ jam `@`q.q.own
+ --
+::
+++ grab :: convert from
+ ^?
+ |%
+ ++ noun mime :: clam from %noun
+ ++ tape
+ |=(a=_"" [/application/x-urb-unknown (as-octt:mimes:html a)])
+ --
+++ grad
+ ^?
+ |%
+ ++ form %mime
+ ++ diff |=(mime +<)
+ ++ pact |=(mime +<)
+ ++ join |=([mime mime] `(unit mime)`~)
+ ++ mash
+ |= [[ship desk mime] [ship desk mime]]
+ ^- mime
+ ~|(%mime-mash !!)
+ --
+--
diff --git a/desk/mar/noun.hoon b/desk/mar/noun.hoon
new file mode 100644
index 0000000..ff5443e
--- /dev/null
+++ b/desk/mar/noun.hoon
@@ -0,0 +1,22 @@
+::
+:::: /hoon/noun/mar
+ ::
+/? 310
+!:
+:::: A minimal noun mark
+|_ non=*
+++ grab |%
+ ++ noun *
+ --
+++ grow |%
+ ++ mime [/application/x-urb-jam (as-octs:mimes:html (jam non))]
+ --
+++ grad
+ |%
+ ++ form %noun
+ ++ diff |=(* +<)
+ ++ pact |=(* +<)
+ ++ join |=([* *] *(unit *))
+ ++ mash |=([[ship desk *] [ship desk *]] `*`~|(%noun-mash !!))
+ --
+--
diff --git a/desk/mar/sh.hoon b/desk/mar/sh.hoon
new file mode 100644
index 0000000..fe010d9
--- /dev/null
+++ b/desk/mar/sh.hoon
@@ -0,0 +1,25 @@
+::
+:::: /hoon/js/mar
+ ::
+/? 310
+::
+=, eyre
+|_ mud=@
+++ grow
+ |%
+ ++ mime [/application/javascript (as-octs:mimes:html (@t mud))]
+ ++ hymn :: convert to %hymn
+ |^ html
+ ++ script ;script
+ ;- (trip (@t mud))
+ ==
+ ++ html ;html:(head:"{script}" body)
+ --
+ --
+++ grab
+ |% :: convert from
+ ++ mime |=([p=mite q=octs] (@t q.q))
+ ++ noun cord :: clam from %noun
+ --
+++ grad %mime
+--
diff --git a/desk/mar/ship.hoon b/desk/mar/ship.hoon
new file mode 100644
index 0000000..176bcad
--- /dev/null
+++ b/desk/mar/ship.hoon
@@ -0,0 +1,20 @@
+|_ s=ship
+++ grad %noun
+++ grow
+ |%
+ ++ noun s
+ ++ json s+(scot %p s)
+ ++ mime
+ ^- ^mime
+ [/text/x-ship (as-octt:mimes:html (scow %p s))]
+
+ --
+++ grab
+ |%
+ ++ noun ship
+ ++ json (su:dejs:format ;~(pfix sig fed:ag))
+ ++ mime
+ |= [=mite len=@ tex=@]
+ (slav %p (snag 0 (to-wain:format tex)))
+ --
+--
diff --git a/desk/mar/svg.hoon b/desk/mar/svg.hoon
new file mode 100644
index 0000000..2911e49
--- /dev/null
+++ b/desk/mar/svg.hoon
@@ -0,0 +1,12 @@
+|_ dat=@
+++ grow
+ |%
+ ++ mime [/image/'svg+xml' (as-octs:mimes:html dat)]
+ --
+++ grab
+ |%
+ ++ mime |=([p=mite q=octs] q.q)
+ ++ noun @
+ --
+++ grad %mime
+--
diff --git a/desk/mar/ttf.hoon b/desk/mar/ttf.hoon
new file mode 100644
index 0000000..fe010d9
--- /dev/null
+++ b/desk/mar/ttf.hoon
@@ -0,0 +1,25 @@
+::
+:::: /hoon/js/mar
+ ::
+/? 310
+::
+=, eyre
+|_ mud=@
+++ grow
+ |%
+ ++ mime [/application/javascript (as-octs:mimes:html (@t mud))]
+ ++ hymn :: convert to %hymn
+ |^ html
+ ++ script ;script
+ ;- (trip (@t mud))
+ ==
+ ++ html ;html:(head:"{script}" body)
+ --
+ --
+++ grab
+ |% :: convert from
+ ++ mime |=([p=mite q=octs] (@t q.q))
+ ++ noun cord :: clam from %noun
+ --
+++ grad %mime
+--
diff --git a/desk/mar/txt.hoon b/desk/mar/txt.hoon
new file mode 100644
index 0000000..982dce9
--- /dev/null
+++ b/desk/mar/txt.hoon
@@ -0,0 +1,274 @@
+::
+:::: /hoon/txt/mar
+ ::
+/? 310
+::
+=, clay
+=, differ
+=, format
+=, mimes:html
+|_ txt=wain
+::
+++ grab :: convert from
+ |%
+ ++ mime |=((pair mite octs) (to-wain q.q))
+ ++ noun wain :: clam from %noun
+ --
+++ grow
+ => v=.
+ |%
+ ++ mime => v [/text/plain (as-octs (of-wain txt))]
+ --
+++ grad
+ |%
+ ++ form %txt-diff
+ ++ diff
+ |= tyt=wain
+ ^- (urge cord)
+ (lusk txt tyt (loss txt tyt))
+ ::
+ ++ pact
+ |= dif=(urge cord)
+ ~| [%pacting dif]
+ ^- wain
+ (lurk txt dif)
+ ::
+ ++ join
+ |= [ali=(urge cord) bob=(urge cord)]
+ ^- (unit (urge cord))
+ |^
+ =. ali (clean ali)
+ =. bob (clean bob)
+ |- ^- (unit (urge cord))
+ ?~ ali `bob
+ ?~ bob `ali
+ ?- -.i.ali
+ %&
+ ?- -.i.bob
+ %&
+ ?: =(p.i.ali p.i.bob)
+ %+ bind $(ali t.ali, bob t.bob)
+ |=(cud=(urge cord) [i.ali cud])
+ ?: (gth p.i.ali p.i.bob)
+ %+ bind $(p.i.ali (sub p.i.ali p.i.bob), bob t.bob)
+ |=(cud=(urge cord) [i.bob cud])
+ %+ bind $(ali t.ali, p.i.bob (sub p.i.bob p.i.ali))
+ |=(cud=(urge cord) [i.ali cud])
+ ::
+ %|
+ ?: =(p.i.ali (lent p.i.bob))
+ %+ bind $(ali t.ali, bob t.bob)
+ |=(cud=(urge cord) [i.bob cud])
+ ?: (gth p.i.ali (lent p.i.bob))
+ %+ bind $(p.i.ali (sub p.i.ali (lent p.i.bob)), bob t.bob)
+ |=(cud=(urge cord) [i.bob cud])
+ ~
+ ==
+ ::
+ %|
+ ?- -.i.bob
+ %|
+ ?. =(i.ali i.bob)
+ ~
+ %+ bind $(ali t.ali, bob t.bob)
+ |=(cud=(urge cord) [i.ali cud])
+ ::
+ %&
+ ?: =(p.i.bob (lent p.i.ali))
+ %+ bind $(ali t.ali, bob t.bob)
+ |=(cud=(urge cord) [i.ali cud])
+ ?: (gth p.i.bob (lent p.i.ali))
+ %+ bind $(ali t.ali, p.i.bob (sub p.i.bob (lent p.i.ali)))
+ |=(cud=(urge cord) [i.ali cud])
+ ~
+ ==
+ ==
+ ++ clean :: clean
+ |= wig=(urge cord)
+ ^- (urge cord)
+ ?~ wig ~
+ ?~ t.wig wig
+ ?: ?=(%& -.i.wig)
+ ?: ?=(%& -.i.t.wig)
+ $(wig [[%& (add p.i.wig p.i.t.wig)] t.t.wig])
+ [i.wig $(wig t.wig)]
+ ?: ?=(%| -.i.t.wig)
+ $(wig [[%| (welp p.i.wig p.i.t.wig) (welp q.i.wig q.i.t.wig)] t.t.wig])
+ [i.wig $(wig t.wig)]
+ --
+ ::
+ ++ mash
+ |= $: [als=ship ald=desk ali=(urge cord)]
+ [bos=ship bod=desk bob=(urge cord)]
+ ==
+ ^- (urge cord)
+ |^
+ =. ali (clean ali)
+ =. bob (clean bob)
+ |- ^- (urge cord)
+ ?~ ali bob
+ ?~ bob ali
+ ?- -.i.ali
+ %&
+ ?- -.i.bob
+ %&
+ ?: =(p.i.ali p.i.bob)
+ [i.ali $(ali t.ali, bob t.bob)]
+ ?: (gth p.i.ali p.i.bob)
+ [i.bob $(p.i.ali (sub p.i.ali p.i.bob), bob t.bob)]
+ [i.ali $(ali t.ali, p.i.bob (sub p.i.bob p.i.ali))]
+ ::
+ %|
+ ?: =(p.i.ali (lent p.i.bob))
+ [i.bob $(ali t.ali, bob t.bob)]
+ ?: (gth p.i.ali (lent p.i.bob))
+ [i.bob $(p.i.ali (sub p.i.ali (lent p.i.bob)), bob t.bob)]
+ =/ [fic=(unce cord) ali=(urge cord) bob=(urge cord)]
+ (resolve ali bob)
+ [fic $(ali ali, bob bob)]
+ :: ~ :: here, alice is good for a while, but not for the whole
+ == :: length of bob's changes
+ ::
+ %|
+ ?- -.i.bob
+ %|
+ =/ [fic=(unce cord) ali=(urge cord) bob=(urge cord)]
+ (resolve ali bob)
+ [fic $(ali ali, bob bob)]
+ ::
+ %&
+ ?: =(p.i.bob (lent p.i.ali))
+ [i.ali $(ali t.ali, bob t.bob)]
+ ?: (gth p.i.bob (lent p.i.ali))
+ [i.ali $(ali t.ali, p.i.bob (sub p.i.bob (lent p.i.ali)))]
+ =/ [fic=(unce cord) ali=(urge cord) bob=(urge cord)]
+ (resolve ali bob)
+ [fic $(ali ali, bob bob)]
+ ==
+ ==
+ ::
+ ++ annotate :: annotate conflict
+ |= $: ali=(list @t)
+ bob=(list @t)
+ bas=(list @t)
+ ==
+ ^- (list @t)
+ %- zing
+ ^- (list (list @t))
+ %- flop
+ ^- (list (list @t))
+ :- :_ ~
+ %^ cat 3 '<<<<<<<<<<<<'
+ %^ cat 3 ' '
+ %^ cat 3 `@t`(scot %p bos)
+ %^ cat 3 '/'
+ bod
+
+ :- bob
+ :- ~['------------']
+ :- bas
+ :- ~['++++++++++++']
+ :- ali
+ :- :_ ~
+ %^ cat 3 '>>>>>>>>>>>>'
+ %^ cat 3 ' '
+ %^ cat 3 `@t`(scot %p als)
+ %^ cat 3 '/'
+ ald
+ ~
+ ::
+ ++ clean :: clean
+ |= wig=(urge cord)
+ ^- (urge cord)
+ ?~ wig ~
+ ?~ t.wig wig
+ ?: ?=(%& -.i.wig)
+ ?: ?=(%& -.i.t.wig)
+ $(wig [[%& (add p.i.wig p.i.t.wig)] t.t.wig])
+ [i.wig $(wig t.wig)]
+ ?: ?=(%| -.i.t.wig)
+ $(wig [[%| (welp p.i.wig p.i.t.wig) (welp q.i.wig q.i.t.wig)] t.t.wig])
+ [i.wig $(wig t.wig)]
+ ::
+ ++ resolve
+ |= [ali=(urge cord) bob=(urge cord)]
+ ^- [fic=[%| p=(list cord) q=(list cord)] ali=(urge cord) bob=(urge cord)]
+ =- [[%| bac (annotate alc boc bac)] ali bob]
+ |- ^- $: $: bac=(list cord)
+ alc=(list cord)
+ boc=(list cord)
+ ==
+ ali=(urge cord)
+ bob=(urge cord)
+ ==
+ ?~ ali [[~ ~ ~] ali bob]
+ ?~ bob [[~ ~ ~] ali bob]
+ ?- -.i.ali
+ %&
+ ?- -.i.bob
+ %& [[~ ~ ~] ali bob] :: no conflict
+ %|
+ =+ lob=(lent p.i.bob)
+ ?: =(lob p.i.ali)
+ [[p.i.bob p.i.bob q.i.bob] t.ali t.bob]
+ ?: (lth lob p.i.ali)
+ [[p.i.bob p.i.bob q.i.bob] [[%& (sub p.i.ali lob)] t.ali] t.bob]
+ =+ wat=(scag (sub lob p.i.ali) p.i.bob)
+ =+ ^= res
+ %= $
+ ali t.ali
+ bob [[%| (scag (sub lob p.i.ali) p.i.bob) ~] t.bob]
+ ==
+ :* :* (welp bac.res wat)
+ (welp alc.res wat)
+ (welp boc.res q.i.bob)
+ ==
+ ali.res
+ bob.res
+ ==
+ ==
+ ::
+ %|
+ ?- -.i.bob
+ %&
+ =+ loa=(lent p.i.ali)
+ ?: =(loa p.i.bob)
+ [[p.i.ali q.i.ali p.i.ali] t.ali t.bob]
+ ?: (lth loa p.i.bob)
+ [[p.i.ali q.i.ali p.i.ali] t.ali [[%& (sub p.i.bob loa)] t.bob]]
+ =+ wat=(slag (sub loa p.i.bob) p.i.ali)
+ =+ ^= res
+ %= $
+ ali [[%| (scag (sub loa p.i.bob) p.i.ali) ~] t.ali]
+ bob t.bob
+ ==
+ :* :* (welp bac.res wat)
+ (welp alc.res q.i.ali)
+ (welp boc.res wat)
+ ==
+ ali.res
+ bob.res
+ ==
+ ::
+ %|
+ =+ loa=(lent p.i.ali)
+ =+ lob=(lent p.i.bob)
+ ?: =(loa lob)
+ [[p.i.ali q.i.ali q.i.bob] t.ali t.bob]
+ =+ ^= res
+ ?: (gth loa lob)
+ $(ali [[%| (scag (sub loa lob) p.i.ali) ~] t.ali], bob t.bob)
+ ~& [%scagging loa=loa pibob=p.i.bob slag=(scag loa p.i.bob)]
+ $(ali t.ali, bob [[%| (scag (sub lob loa) p.i.bob) ~] t.bob])
+ :* :* (welp bac.res ?:((gth loa lob) p.i.bob p.i.ali))
+ (welp alc.res q.i.ali)
+ (welp boc.res q.i.bob)
+ ==
+ ali.res
+ bob.res
+ ==
+ ==
+ ==
+ --
+ --
+--
diff --git a/desk/mar/udon.hoon b/desk/mar/udon.hoon
new file mode 100644
index 0000000..61782c4
--- /dev/null
+++ b/desk/mar/udon.hoon
@@ -0,0 +1,29 @@
+::
+:::: /hoon/udon/mar
+ ::
+/+ cram
+::
+|_ mud=@t
+++ grow
+ |%
+ ++ mime [/text/x-unmark (as-octs:mimes:html mud)]
+ ++ txt
+ (to-wain:format mud)
+ ++ front :: XX performance, types
+ ^- (map term knot)
+ =/ reamed (ream mud)
+ ~& >> reamed=reamed
+ %- ~(run by inf:(static:cram reamed))
+ |= a=dime ^- cord
+ ?+ (end 3 p.a) (scot a)
+ %t q.a
+ ==
+ --
+++ grab
+ |%
+ ++ mime |=((pair mite octs) q.q)
+ ++ noun @t
+ ++ txt of-wain:format
+ --
+++ grad %txt
+--