diff --git a/main/app/began/core.hook b/main/app/began/core.hook index cf6174e18a..3b6394a179 100644 --- a/main/app/began/core.hook +++ b/main/app/began/core.hook @@ -33,7 +33,6 @@ [ust %pass / %c %plug our.hid %try (sein our.hid) %try] [ust %give %nice ~] == - :: ++ pour |= [ost=bone pax=path sih=*] @@ -45,4 +44,15 @@ %went ~ == :: +++ poke-will + |= [ost=bone you=ship wil=(unit will)] + :_ +>.$ + ?~ wil + [ust %give %mean ~ %rejected ~]~ + :~ [ust %pass / %a %cash his mac u.wil] + [ust %pass / %c %plug our.hid %main (sein our.hid) %main] + [ust %pass / %c %plug our.hid %arvo (sein our.hid) %arvo] + [ust %pass / %c %plug our.hid %try (sein our.hid) %try] + [ust %give %nice ~] + == -- diff --git a/main/app/chat/core.hook b/main/app/chat/core.hook index 43490f1c66..fb00c9f014 100644 --- a/main/app/chat/core.hook +++ b/main/app/chat/core.hook @@ -221,12 +221,12 @@ ;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs". "/jquery/2.1.1/jquery.min.js"); ;script:'try{Typekit.load();}catch(e){}' - ;link(rel "stylesheet", type "text/css", href "/gen/main/pub/src/chat/main.css"); + ;link(rel "stylesheet", type "text/css", href "/main/pub/src/chat/main.css"); == ;body ;div#c; - ;script(type "text/javascript", src "/gen/main/lib/urb.js"); - ;script(type "text/javascript", src "/gen/main/pub/src/chat/main.js"); + ;script(type "text/javascript", src "/main/lib/urb.js"); + ;script(type "text/javascript", src "/main/pub/src/chat/main.js"); == == :: diff --git a/main/app/dojo/core.hook b/main/app/dojo/core.hook new file mode 100644 index 0000000000..f0a69a9265 --- /dev/null +++ b/main/app/dojo/core.hook @@ -0,0 +1,736 @@ +:: :: :: +:::: /hook/core/dojo/app :: :::: + :: :: :: +/? 314 :: arvo kelvin +/- *sole :: console structures +/+ sole :: console library +:: :: :: +:::: :: :::: + !: :: :: +=> |% :: external structures + ++ house :: all state + $: hoc=(map bone session) :: conversations + == :: + ++ session :: per conversation + $: say=sole-share :: command-line state + syd=desk :: active desk + luc=(unit case) :: special case + poy=(unit dojo-project) :: working + var=(map term cage) :: variable state + old=(set term) :: used TLVs + == :: + ++ dojo-command :: + $% [%flat p=path q=dojo-source] :: noun to unix atom + [%pill p=path q=dojo-source] :: noun to unix pill + :: [%tree p=path q=dojo-source] :: noun to unix tree + [%poke p=goal q=dojo-source] :: make and poke + [%show p=dojo-source] :: print + [%verb p=term q=dojo-source] :: store variable + == :: + ++ dojo-source :: construction node + $: p=@ud :: assembly index + q=dojo-build :: general build + == :: + ++ dojo-build :: one ford step + $% [%ex p=twig] :: hoon expression + [%di p=dojo-model] :: dialog + [%dv p=path] :: gate from source + [%fi p=dojo-filter q=dojo-source] :: filter + [%ge p=dojo-model] :: generator + [%sc p=dojo-model] :: script + [%tu p=(list dojo-source)] :: tuple + [%va p=term] :: dojo variable + == :: + ++ dojo-filter :: pipeline filter + $% [%a p=twig] :: function gate + [%b p=mark] :: simple transmute + [%c p=dojo-model] :: formal filter + == :: + ++ dojo-model :: data construction + $: p=dojo-server :: core source + q=dojo-config :: configuration + == :: + ++ dojo-server :: numbered device + $: p=@ud :: assembly index + q=path :: gate path + == :: + ++ dojo-config :: configuration + $: p=(list dojo-source) :: by order + q=(map term (unit dojo-source)) :: by keyword + == :: + ++ dojo-project :: construction state + $: mad=dojo-command :: operation + num=@ud :: number of tasks + cud=(unit dojo-source) :: now solving + pux=(unit path) :: ford working + pro=(unit vase) :: prompting loop + per=(unit sole-edit) :: pending reverse + job=(map ,@ud dojo-build) :: problems + rez=(map ,@ud cage) :: results + == :: + ++ bead ,[p=(set beam) q=cage] :: computed result + ++ goal ,[p=ship q=term] :: flat application + ++ gift :: out result <-$ + $% [%mean p=ares] :: error + [%nice ~] :: acknowledge + [%rush %sole-effect sole-effect] :: + == :: + ++ hapt ,[p=ship q=path] :: + ++ move ,[p=bone q=(mold note gift)] :: + ++ hood :: assembly plan + $: zus=@ud :: zuse kelvin + sur=(list hoot) :: structures + lib=(list hoof) :: libraries + fan=(list horn) :: resources + src=(list hoop) :: program + == :: + ++ hoof (pair term (unit (pair case ship))) :: resource reference + ++ hoot (pair bean hoof) :: structure gate/core + ++ hoop :: source in hood + $% [%& p=twig] :: direct twig + [%| p=beam] :: resource location + == :: + ++ horn :: resource tree + $% [%ape p=twig] :: /~ twig by hand + [%arg p=twig] :: /$ argument + [%day p=horn] :: /| list by @dr + [%dub p=term q=horn] :: /= apply face + [%fan p=(list horn)] :: /. list + [%for p=path q=horn] :: /, descend + [%hel p=@ud q=horn] :: /% propagate heel + [%hub p=horn] :: /@ list by @ud + [%man p=(map span horn)] :: /* hetero map + [%nap p=horn] :: /_ homo map + [%now p=horn] :: /& list by @da + [%saw p=twig q=horn] :: /; operate on + [%see p=beam q=horn] :: /: relative to + [%sic p=tile q=horn] :: /^ cast + [%toy p=mark] :: /mark/ static + == :: + ++ silk :: construction layer + $& [p=silk q=silk] :: cons + $% [%bake p=mark q=beam r=path] :: local synthesis + [%boil p=mark q=beam r=path] :: general synthesis + [%call p=silk q=silk] :: slam + [%cast p=mark q=silk] :: translate + [%done p=(set beam) q=cage] :: literal + [%dude p=tank q=silk] :: error wrap + [%dune p=(set beam) q=(unit cage)] :: unit literal + [%mute p=silk q=(list (pair wing silk))] :: mutant + [%plan p=beam q=spur r=hood] :: structured assembly + [%reef ~] :: kernel reef + [%ride p=twig q=silk] :: silk thru twig + [%vale p=mark q=ship r=*] :: validate [our his] + == :: + ++ note-ford :: note to ford + $% [%exec p=@p q=beak r=(unit silk)] :: make / kill + == :: + ++ note-gall :: note to %gall + $% [%mess p=[p=ship q=path] q=ship r=cage] :: + == :: + ++ sign-gall :: sign from %gall + $% [%mean p=ares] :: + [%nice ~] :: + == :: + ++ sign-ford :: sign from ford + $% [%made p=@uvH q=(each gage tang)] :: computed result + == :: + ++ note :: out request $-> + $% [%f note-ford] :: + [%g note-gall] :: + == :: + ++ sign :: in result $<- + $% [%f sign-ford] :: + [%g sign-gall] :: + == :: + -- :: +:: :: +:::: :: + :: :: +|_ $: hid=hide :: system state + house :: program state + == :: +++ he :: per session + |_ [[ost=bone moz=(list move)] session] :: + ++ dp :: dojo parser + |% + ++ dp-command :: ++dojo-command + %+ knee *dojo-command |. ~+ + ;~ pose + %+ stag %poke + ;~ pfix col + %+ cook + |= [a=goal b=(each dojo-source (trel term path dojo-config))] + ^- (pair goal dojo-source) + :- a + ?- -.b + %& p.b + %| ?+ p.p.b !! + %di [0 %di [0 [%dog q.a q.p.b]] r.p.b] + %ge [0 %ge [0 [%cat q.a q.p.b]] r.p.b] + %sc [0 %sc [0 [%pig q.a q.p.b]] r.p.b] + == + == + ;~ plug + dp-goal + ;~ pose + (stag %& ;~(pfix ace dp-source)) + %+ stag %| + ;~ plug + ;~ pose + (cold %di wut) + (cold %ge lus) + (cold %sc pam) + == + (most fas sym) + dp-config + == + == + == + == + :: + %+ stag %verb + ;~ pfix tis + ;~(plug sym ;~(pfix ace dp-source)) + == + :: + %+ stag %flat + ;~ pfix pat + ;~(plug (most fas sym) ;~(pfix ace dp-source)) + == + :: + %+ stag %pill + ;~ pfix dot + ;~(plug (most fas sym) ;~(pfix ace dp-source)) + == + :: + (stag %show dp-source) + == + ++ dp-source (stag 0 dp-build) :: ++dojo-source + ++ dp-build :: ++dojo-build + %+ knee *dojo-build |. ~+ + ;~ pose + ;~(pfix lus (stag %ge dp-model-cat)) + ;~(pfix wut (stag %di dp-model-dog)) + ;~(pfix pam (stag %sc dp-model-pig)) + ;~(pfix buc (stag %va sym)) + (stag %ex dp-twig) + (ifix [sel ser] (stag %tu (most ace dp-source))) + == + :: + ++ dp-goal :: ++goal + %+ cook |=(a=goal a) + ;~ pose + ;~ plug + ;~(pfix sig fed:ag) + ;~(pfix fas sym) + == + (cook |=(a=term `goal`[our.hid a]) sym) + == + ++ dp-model-cat ;~(plug dp-server-cat dp-config) :: ++dojo-model + ++ dp-model-dog ;~(plug dp-server-dog dp-config) :: ++dojo-model + ++ dp-model-pig ;~(plug dp-server-pig dp-config) :: ++dojo-model + ++ dp-server-cat (stag 0 (stag %cat dp-device)) :: ++dojo-server + ++ dp-server-dog (stag 0 (stag %dog dp-device)) :: ++dojo-server + ++ dp-server-pig (stag 0 (stag %pig dp-device)) :: ++dojo-server + ++ dp-twig wide:(vang | ~) :: ++twig + ++ dp-device (most fas sym) :: ++dojo-device + ++ dp-value :: ++dojo-source + %+ cook |=(a=dojo-source a) + %+ stag 0 + ;~ pose + (ifix [kel ker] (stag %tu (most ace dp-source))) + (stag %va ;~(pfix buc sym)) + (stag %ex dp-twig) + == + :: + ++ dp-config :: ++dojo-config + %+ cook |=(a=dojo-config a) + ;~ plug + (star ;~(pfix ace dp-value)) + %+ cook + ~(gas by *(map term (unit dojo-source))) + %+ more + ;~(plug com ace) + ;~ plug + ;~(pfix tis sym) + ;~ pose + ;~(pfix ace (stag ~ dp-value)) + (easy ~) + == + == + == + -- + :: + ++ dy :: project work + |_ dojo-project :: + ++ dy-abet +>(poy `+<) :: resolve + ++ dy-amok +>(poy ~) :: terminate + ++ dy-ford :: send work to ford + |= [pax=path kas=silk] + ^+ +>+> + ?> ?=(~ pux) + =+ bek=[our.hid %main %da lat.hid] + (he-pass(poy `+>+<.$(pux `pax)) pax %f %exec our.hid bek `kas) + :: + ++ dy-stop :: stop work + ^+ +> + ?~ pux +> + =+ bek=[our.hid %main %da lat.hid] + (he-pass(poy ~) u.pux %f %exec our.hid bek ~) + :: + ++ dy-slam :: call by ford + |= [pax=path gat=vase sam=vase] + ^+ +>+> + (dy-ford pax %call [%done ~ %noun gat] [%done ~ %noun sam]) + :: + ++ dy-rush :: send effects, abet + |= fec=sole-effect + ^+ +>+> + (he-rush(poy `+>+<) fec) + :: + ++ dy-rash :: send effects, amok + |= fec=sole-effect + ^+ +>+> + (he-rush(poy ~) fec) + :: + ++ dy-init-command :: ++dojo-command + |= mad=dojo-command + ^+ [mad +>] + ?- -.mad + %flat =^(src +>.$ (dy-init-source q.mad) [[%flat p.mad src] +>.$]) + %pill =^(src +>.$ (dy-init-source q.mad) [[%pill p.mad src] +>.$]) + %poke =^(src +>.$ (dy-init-source q.mad) [[%poke p.mad src] +>.$]) + %show =^(src +>.$ (dy-init-source p.mad) [[%show src] +>.$]) + %verb =^(src +>.$ (dy-init-source q.mad) [[%verb p.mad src] +>.$]) + == + :: + ++ dy-init-source-unit :: (unit dojo-source) + |= urc=(unit dojo-source) + ^+ [urc +>] + ?~ urc [~ +>] + =^ src +> (dy-init-source u.urc) + [`src +>.$] + :: + ++ dy-init-source :: ++dojo-source + |= src=dojo-source + ^+ [src +>] + =^ bul +> (dy-init-build q.src) + =: p.src num + q.src bul + == + [src +>.$(num +(num), job (~(put by job) num q.src))] + :: + ++ dy-init-build :: ++dojo-build + |= bul=dojo-build + ^+ [bul +>] + ?- -.bul + %ex [bul +>.$] + %di =^(mod +>.$ (dy-init-model p.bul) [[%di mod] +>.$]) + %dv [bul +>.$] + %fi !! + %ge =^(mod +>.$ (dy-init-model p.bul) [[%ge mod] +>.$]) + %sc !! + %tu =^ dof +>.$ + |- ^+ [p.bul +>.^$] + ?~ p.bul [~ +>.^$] + =^ dis +>.^$ (dy-init-source i.p.bul) + =^ mor +>.^$ $(p.bul t.p.bul) + [[dis mor] +>.^$] + [[%tu dof] +>.$] + %va [bul +>.$] + == + :: + ++ dy-init-model :: ++dojo-model + |= mol=dojo-model + ^+ [mol +>] + =^ one +>.$ (dy-init-server p.mol) + =^ two +>.$ (dy-init-config q.mol) + [[one two] +>.$] + :: + ++ dy-init-server :: ++dojo-server + |= srv=dojo-server + =. p.srv num + [srv +>.$(num +(num), job (~(put by job) num [%dv q.srv]))] + :: + ++ dy-init-config :: prepare config + |= cig=dojo-config + ^+ [cig +>] + =^ ord +>.$ (dy-init-ordered p.cig) + =^ key +>.$ (dy-init-named q.cig) + [[ord key] +>.$] + :: + ++ dy-init-ordered :: (list dojo-source) + |= ord=(list dojo-source) + ^+ [ord +>] + ?~ ord [~ +>.$] + =^ fir +>.$ (dy-init-source i.ord) + =^ mor +>.$ $(ord t.ord) + [[fir mor] +>.$] + :: + ++ dy-init-named :: (map @tas dojo-src) + |= key=(map term (unit dojo-source)) + ^+ [key +>.$] + ?~ key [~ +>.$] + =^ top +>.$ (dy-init-source-unit q.n.key) + =^ lef +>.$ $(key l.key) + =^ rit +>.$ $(key r.key) + [[[p.n.key top] lef rit] +>.$] + :: + ++ dy-init :: full initialize + ^+ . + =^(dam . (dy-init-command mad) +(mad dam)) + :: + ++ dy-hand :: complete step + |= cag=cage + ^+ +>+> + ?> ?=(^ cud) + (dy-step(cud ~, rez (~(put by rez) p.u.cud cag)) +(p.u.cud)) + :: + ++ dy-meal :: vase to cage + |= vax=vase + ?. &(?=(@ -.q.vax) ((sane %tas) -.q.vax)) + ~& %dy-meal-cage + (dy-rash %bel ~) + (dy-hand -.q.vax (slot 3 vax)) + :: + ++ dy-made-edit :: sole edit + |= cag=cage + ^+ +>+> + ?> ?=(^ per) + ?: ?| ?=(^ q.q.cag) + =((lent buf.say) q.q.cag) + !&(?=(%del -.u.per) =(+(p.u.per) (lent buf.say))) + == + dy-abet(per ~) + =^ lic say (~(transmit cs say) u.per) + (dy-rush(per ~) %mor [%det lic] [%err q.q.cag] ~) + :: + ++ dy-done :: dialog submit + |= txt=tape + ?> ?=(^ pro) + (dy-slam /dial u.pro !>(txt)) + :: + ++ dy-over :: finish construction + ^+ +> + ?- -.mad + %poke + %- he-pass(poy ~) + :* /poke + %g + %mess + [p.p.mad [q.p.mad ~]] + our.hid + (~(got by rez) p.q.mad) + == + :: + %flat + =+ out=q.q:(~(got by rez) p.q.mad) + ?^ out + (dy-rash %tan [%leaf "not an atom"]~) + (dy-rash %sav p.mad out) + :: + %pill + (dy-rash %sag p.mad q.q:(~(got by rez) p.q.mad)) + :: + %verb + dy-amok(var (~(put by var) p.mad (~(got by rez) p.q.mad))) + :: + %show + (dy-rash %tan (sell q:(~(got by rez) p.p.mad)) ~) + == + :: + ++ dy-edit :: handle edit + |= cal=sole-change + ^+ +>+> + =^ dat say (~(transceive cs say) cal) + ?: |(?=(^ per) ?=(^ pux) ?=(~ pro)) + ~& %dy-edit-busy + =^ lic say (~(transmit cs say) dat) + (dy-rush %mor [%det lic] [%bel ~] ~) + (dy-slam(per `dat) /edit u.pro !>((tufa buf.say))) + :: + ++ dy-type :: sole action + |= act=sole-action + ?- -.act + %det (dy-edit +.act) + %ret (dy-done (tufa buf.say)) + == + :: + ++ dy-cage |=(num=@ud (~(got by rez) num)) :: known cage + ++ dy-vase |=(num=@ud q:(dy-cage num)) :: known vase + ++ dy-silk-vase |=(vax=vase [%done ~ %noun vax]) :: vase to silk + ++ dy-silk-config :: configure + |= [cag=cage cig=dojo-config] + ^- silk + :+ %ride [%cnzy %$] + :+ %mute [%done ~ cag] + ^- (list (pair wing silk)) + :* :- [[~ 12] ~] + (dy-silk-vase !>([now=lat.hid eny=eny.hid bec=he-beak])) + :: + :- [[~ 26] ~] + %- dy-silk-vase + |- ^- vase + ?~ p.cig !>(~) + (slop (dy-vase p.i.p.cig) $(p.cig t.p.cig)) + :: + %+ turn (~(tap by q.cig)) + |= [a=term b=(unit dojo-source)] + ^- (pair wing silk) + :- [a [~ 27] ~] + %- dy-silk-vase + ?~(b !>([~ ~]) (dy-vase p.u.b)) + == + :: + ++ dy-silk-init-modo :: init and config + |= [cag=cage cig=dojo-config] + ^- silk + (dy-silk-config cag cig) + :: + ++ dy-silk-device :: device to silk + |= pax=path + ^- silk + [%boil %gate [he-beak (flop pax)] ~] + :: + ++ dy-made-dial :: dialog product + |= cag=cage + ^+ +>+> + ?. ?=(^ q.q.cag) + (dy-rush %err q.q.cag) + =+ tan=((list tank) +2.q.q.cag) + =. +>+>.$ (he-rush %tan tan) + =+ vax=(spec (slot 3 q.cag)) + ?+ -.q.vax !! + %& + ?~ +.q.vax + ~& %dy-made-dial-abort + (dy-rash %bel ~) + (dy-meal (slot 7 vax)) + :: + %| + =< he-pone + %- dy-rush(pro `(slap (slot 7 vax) [%cnzy %q])) + =+ pom=(sole-prompt +<.q.vax) + [%pro pom(cad [':' ' ' cad.pom])] + == + :: + ++ dy-made-gent :: generator product + |= cag=cage + (dy-meal q.cag) + :: + ++ dy-make :: build step + ^+ +> + ?> ?=(^ cud) + %- dy-ford + ^- (pair path silk) + ?+ -.q.u.cud !! + %di [/dial (dy-silk-init-modo (dy-cage p.p.p.q.u.cud) q.p.q.u.cud)] + %ge [/gent (dy-silk-init-modo (dy-cage p.p.p.q.u.cud) q.p.q.u.cud)] + %dv [/hand (dy-silk-device p.q.u.cud)] + %ex [/hand [%ride p.q.u.cud [%reef ~]]] + %tu :- /hand + :+ %done ~ + :- %noun + |- ^- vase + ?~ p.q.u.cud !! + =+ hed=(dy-vase p.i.p.q.u.cud) + ?~ t.p.q.u.cud hed + (slop hed $(p.q.u.cud t.p.q.u.cud)) + == + :: + ++ dy-step :: advance project + |= nex=@ud + ^+ +>+> + ?> ?=(~ cud) + ?: =(nex num) + dy-over + dy-make(cud `[nex (~(got by job) nex)]) + -- + :: + ++ he-dope :: sole user of ++dp + |= txt=tape :: + ^- (each (unit dojo-command) hair) :: prefix/result + =+ vex=(dp-command:dp [1 1] txt) :: + ?. =(+((lent txt)) q.p.vex) :: fully parsed + [%| p.p.vex (dec q.p.vex)] :: syntax error + [%& ?~(q.vex ~ `p.u.q.vex)] :: prefix/complete + :: + ++ he-duke :: ++he-dope variant + |= txt=tape + ^- (each dojo-command ,@ud) + =+ foy=(he-dope txt) + ?- -.foy + %| [%| q.p.foy] + %& ?~(p.foy [%| (lent txt)] [%& u.p.foy]) + == + :: + ++ he-abet :: resolve + [(flop moz) %_(+> hoc (~(put by hoc) ost +<+))] + :: + ++ he-beak :: logical beam + ^- beak + [our.hid syd ?^(luc u.luc [%da lat.hid])] + :: + ++ he-give :: emit gift + |= git=gift + ^+ +> + %_(+> moz [[ost %give git] moz]) + :: + ++ he-pass + |= [pax=path noy=note] + %_(+> moz [[ost %pass pax noy] moz]) + :: + ++ he-rush :: emit update + |= fec=sole-effect + ^+ +> + (he-give %rush %sole-effect fec) + :: + ++ he-stop :: abort work + ^+ . + ?~(poy . ~(dy-stop dy u.poy)) + :: + ++ he-peer :: subscribe to + he-prom + :: + ++ he-pine :: restore prompt + ^+ . + ?^ poy . + he-prom:he-pone + :: + ++ he-pone :: clear prompt + ^+ . + =^ cal say (~(transmit cs say) [%set ~]) + (he-rush %mor [%det cal] ~) + :: + ++ he-prom :: send prompt + %- he-rush + :- %pro + [& %$ "> "] + :: + ++ he-made :: result from ford + |= [pax=path dep=@uvH rey=(each gage tang)] + ^+ +> + ?> ?=(^ poy) + =< he-pine + ?- -.rey + %& ?> ?=(@ p.p.rey) + %. p.rey + =+ dye=~(. dy u.poy(pux ~)) + ?+ pax !! + [%hand ~] dy-hand:dye + [%dial ~] dy-made-dial:dye + [%gent ~] dy-made-gent:dye + [%edit ~] dy-made-edit:dye + == + %| ~& [%he-made-fail pax] + (he-rush(poy ~) %tan p.rey) + == + :: + ++ he-like :: accept line + |= buf=(list ,@c) + =(%& -:(he-dope (tufa buf))) + :: + ++ he-stir :: apply change + |= cal=sole-change + ^+ +> + :: ~& [%his-clock ler.cal] + :: ~& [%our-clock ven.say] + =^ dat say (~(transceive cs say) cal) + ?. ?& ?=(%del -.dat) + =(+(p.dat) (lent buf.say)) + == + +>.$ + =+ foy=(he-dope (tufa buf.say)) + ?: ?=(%& -.foy) +>.$ + :: ~& [%bad-change dat ted.cal] + =^ lic say (~(transmit cs say) dat) + :: ~& [%our-leg leg.say] + (he-rush %mor [%det lic] [%err q.p.foy] ~) + :: + ++ he-plan :: execute command + |= mad=dojo-command + ^+ +> + ?> ?=(~ poy) + he-pine:(dy-step:~(dy-init dy mad [0 ~ ~ ~ ~ ~ ~]) 0) + :: + ++ he-done :: parse command + |= txt=tape + ^+ +> + ?~ txt + %- he-rush + :~ %mor + [%txt "> "] + [%nex ~] + == + =+ doy=(he-duke txt) + ?- -.doy + %| (he-rush [%err p.doy]) + %& + =+ old=(weld "> " (tufa buf.say)) + =^ cal say (~(transmit cs say) [%set ~]) + %. p.doy + =< he-plan + %- he-rush + :~ %mor + [%txt old] + [%nex ~] + [%det cal] + == + == + :: + ++ he-type :: apply input + |= act=sole-action + ^+ +> + ?^ poy + he-pine:(~(dy-type dy u.poy) act) + ?- -.act + %det (he-stir +.act) + %ret (he-done (tufa buf.say)) + == + -- +:: +++ peer + |= [ost=bone her=ship pax=path] + ^- [(list move) _+>] + ~? !=(her our.hid) [%dojo-peer ost her pax] + ?< (~(has by hoc) ost) + ?> =(/sole pax) + :: ?> =(her our.hid) + =< he-abet + %~ he-peer he + :- [ost ~] + ^- session + :* *sole-share :: say=sole-share + %main :: syd=desk + ~ :: luc=(unit case) + ~ :: poy=(unit dojo-project) + ~ :: var=(map term cage) + ~ :: old=(set term) + == +:: +++ poke-sole-action + |= [ost=bone her=ship act=sole-action] + ^- [(list move) _+>] + :: ~? !=(her our.hid) [%dojo-poke ost her] + he-abet:(~(he-type he [ost [ost %give %nice ~]~] (~(got by hoc) ost)) act) +:: +++ pour + |= [ost=bone pax=path sih=sign] + ^- [(list move) _+>] + :: ~& [%dojo-pour pax] + ?- -.sih + %f + he-abet:(~(he-made he [[ost ~] (~(got by hoc) ost)]) pax +>.sih) + :: + %g + [~ +>.$] + == +:: +++ pull + |= ost=bone + ^- [(list move) _+>] + =^ moz +> + he-abet:~(he-stop he [[ost ~] (~(got by hoc) ost)]) + [moz +>.$(hoc (~(del by hoc) ost))] +-- diff --git a/main/app/helm/core.hook b/main/app/helm/core.hook new file mode 100644 index 0000000000..c3bae08e12 --- /dev/null +++ b/main/app/helm/core.hook @@ -0,0 +1,201 @@ +:: :: :: +:::: /hook/core/helm/app :: :: + :: :: :: +/? 314 :: zuse version +/- *sole :: structures +/+ sole :: libraries +:: :: :: +:::: :: :: + !: :: :: +=> |% :: principal structures + ++ helm-house :: all state + $: %0 :: state version + bur=(unit (pair ship mace)) :: requesting ticket + hoc=(map bone helm-session) :: consoles + == :: + ++ helm-session :: + $: say=sole-share :: + mud=(unit (sole-dialog ,@ud)) :: + == :: + ++ funk (pair ,@ ,@) :: + ++ begs ,[his=@p tic=@p eny=@t ges=gens] :: begin data + ++ helm-wish :: + $| $? %reset :: reset kernel + %verb :: verbose mode + == :: + $% [%reload p=(list term)] :: reload vanes + [%sync p=@tas q=@p r=@tas ~] :: + == :: + ++ dill-flog :: sent to %dill + $% [%crud p=%hax-init [%leaf p=tape] ~] :: initialize ship + [%veer p=@ta q=path r=@t] :: install vane + [%vega p=path] :: reboot by path + [%verb ~] :: verbose mode + == :: + :: :: + ++ gift :: out result <-$ + $% [%mean p=ares] :: error + [%nice ~] :: acknowledge + [%rush %sole-effect sole-effect] :: effect + == :: + ++ hapt ,[p=ship q=path] :: + ++ move ,[p=bone q=(mold note gift)] :: + ++ note-gall :: note to %gall + $% [%mess p=[p=ship q=path] q=ship r=cage] :: + [%show p=[p=ship q=path] q=ship r=path] :: + [%took p=[p=ship q=path] q=ship] :: + == :: + ++ note-dill :: system command + $% [%flog p=dill-flog] :: + == :: + ++ note-clay :: filesystem command + $% [%font p=@p q=@tas r=@p s=@tas] :: + == :: + ++ note :: out request $-> + $% [%c note-clay] :: + [%d note-dill] :: + [%g note-gall] :: + == :: + -- :: +:: :: +:::: :: + :: :: +|_ $: hid=hide :: system state + helm-house :: program state + == :: +++ he :: per session + |_ [[ost=bone moz=(list move)] helm-session] :: + ++ he-abet :: resolve + [(flop moz) %_(+> hoc (~(put by hoc) ost +<+))] :: + :: :: + ++ he-give :: emit gift + |= git=gift + %_(+> moz [[ost %give git] moz]) + :: + ++ he-wish-reset + ^+ . + =- %_(+ moz (weld zum moz)) + ^= zum %- flop ^- (list move) + =+ top=`path`/(scot %p our.hid)/main/(scot %da lat.hid)/arvo + :- [ost %pass /reset %d %flog %vega (weld top `path`/hoon)] + %+ turn + ^- (list ,[p=@tas q=@tas]) + :~ [%$ %zuse] + [%a %ames] + [%c %clay] + [%d %dill] + [%e %eyre] + [%f %ford] + [%g %gall] + [%t %time] + == + |= [p=@tas q=@tas] + =+ pax=`path`(welp top /[q]) + =+ txt=((hard ,@) .^(%cx (welp pax /hoon))) + [ost %pass /reset %d %flog %veer p pax txt] + :: + ++ he-wish-reload + |= all=(list term) + %_ +>.$ + moz + %- weld + :_ moz + %+ turn all + =+ ark=(arch .^(%cy /(scot %p our.hid)/main/(scot %da lat.hid)/arvo)) + =+ van=(~(tap by r.ark)) + |= nam=@tas + =. nam + ?. =(1 (met 3 nam)) + nam + =+ ^- zaz=(list ,[p=span ~]) + (skim van |=([a=term ~] =(nam (end 3 1 a)))) + ?> ?=([[@ ~] ~] zaz) + `term`p.i.zaz + =+ tip=(end 3 1 nam) + =+ pax=[(scot %p our.hid) %main (scot %da lat.hid) %arvo nam %hoon ~] + :* ost + %pass + /reload + %d + %flog + [%veer ?:(=('z' tip) %$ tip) pax (,@ .^(%cx pax))] + == + == + :: + ++ he-wish-sync + |= [syd=@tas her=@p sud=@tas ~] + %_ . + moz + :_ moz + [ost %pass /sync %c %font our.hid syd her sud] + == + :: + ++ he-wish-verb + %_ . + moz + :_ moz + [ost %pass /verb %d %flog %verb ~] + == + ++ he-wish-init + |= him=ship + %_ +>.$ + moz + :_ moz + [ost %pass /init %d %flog %crud %hax-init leaf/(scow %p him) ~] + == + -- +:: +++ hake :: poke core + |= [ost=bone her=ship] + ?> =(her our.hid) + ~(. he [ost [ost %give %nice ~]~] (fall (~(get by hoc) ost) *helm-session)) +:: +++ poke-helm-reset + |= [ost=bone her=ship ~] + ~& %poke-helm-reset + he-abet:he-wish-reset:(hake ost her) +:: +++ poke-helm-verb + |= [ost=bone her=ship ~] + ~& %poke-helm-verb + he-abet:he-wish-verb:(hake ost her) +:: +++ poke-helm-init + |= [ost=bone her=ship him=ship] + ~& %poke-helm-init + he-abet:(he-wish-init:(hake ost her) him) +:: +++ poke-helm-reload + |= [ost=bone her=ship all=(list term)] + ~& %poke-helm-reload + he-abet:(he-wish-reload:(hake ost her) all) +:: +++ poke-helm-sync + |= [ost=bone her=ship all=[@tas @p @tas ~]] + ~& %poke-helm-sync + he-abet:(he-wish-sync:(hake ost her) all) +:: +++ poke-helm-begin + |= [ost=bone you=ship begs] + ~& %poke-helm-begin + ?> ?=(~ bur) + =+ buz=(shax :(mix (jam ges) eny)) + =+ loy=(bruw 2.048 buz) + :_ +>.$(bur `[his [0 sec:ex:loy]~]) + :~ :* ost %pass /ticketing %a %want [our.hid (sein his)] /q/ta + his tic ges pub:ex:loy + == + [ost %give %nice ~] + == +:: +++ poke-will + |= [ost=bone you=ship wil=(unit will)] + ?> ?=(^ bur) + :_ +>.$(bur ~) + ?~ wil + [ost %give %mean ~ %rejected ~]~ + :~ [ost %pass / %a %cash p.u.bur q.u.bur u.wil] + [ost %pass / %c %plug our.hid %main (sein our.hid) %main] + [ost %give %nice ~] + == +-- diff --git a/main/app/hi/core.hook b/main/app/hi/core.hook deleted file mode 100644 index 151f120ec4..0000000000 --- a/main/app/hi/core.hook +++ /dev/null @@ -1,46 +0,0 @@ -:: Hi, send optional message to a ship -:: -:::: /hook/core/hi/bin - :: -/+ sh-utils -:: -:::: - :: -|% -++ sign :: - $% $: %g :: - $% [%nice ~] :: - [%mean p=ares] :: - == == == -++ flog :: sent to %dill - $% [%crud p=@tas q=(list tank)] :: - [%text p=tape] :: - == :: --- -!: -:::: - :: -|_ [hid=hide ~] -++ peer ,_`. -++ poke--args - |= [bone you=ship her=ship mes=?(~ [tex=tape ~])] - %. +< - %+ add-resp - =+ mez=[%txt !>(?~(mes '' (crip tex.mes)))] - [%pass /hi/(scot %p her) %g %mess [her /hi] you mez] - (add-nice ,_`+>.$) -:: -++ poke-txt - %- add-nice - |= [ost=bone him=ship cor=@t] - :_ +>.$ - [ost %pass /di %d %flog %text "< {}: {(trip cor)}"]~ -:: -++ pour - |= [ost=bone pax=path sih=sign] - ?> ?=([%hi @t ~] pax) - %. +< - =+ ack=?+(+<.sih "unsuccesful" %nice "succesful") - (add-exit (print +>.$ "hi {(trip i.t.pax)} {ack}")) -:: --- diff --git a/main/app/matrix/hymn.hook b/main/app/matrix/hymn.hook new file mode 100644 index 0000000000..317482d6b3 --- /dev/null +++ b/main/app/matrix/hymn.hook @@ -0,0 +1,165 @@ +:: Matrix GUI +:: +:::: /hook/hymn/matr/app + :: +/? 310 +|% +++ cdnj |=(a=tape ;script(src "//cdnjs.cloudflare.com/ajax/libs/{a}");) +-- +:: +:::: + :: +^- manx +;html + ;head + ;title: Matrix + ;* %- turn :_ cdnj ^- wall + :~ "jquery/2.1.1/jquery.min.js" + "mousetrap/1.4.6/mousetrap.js" + "react/0.11.0/react.js" + == + ;script(src "/~/at/main/lib/urb.js"); + ;script: urb.appl = 'sole' + ;style:''' + #term { + width: 100%; + } + #term * { + margin: 0px; + } + ''' + == + ;body + ;div#err; + ;div#term:"" + ;script(type "text/coffeescript") ;- %- trip + ''' + [DOM,recl,rend] = [React.DOM, React.createClass, React.renderComponent] + [div, pre] = [DOM.div, DOM.pre] + Matr = recl render: -> + [pro,cur] = [@props.prompt + " ", @props.cursor + 1] + prompt = "#{pro.slice(0,cur)}\u0332#{pro.slice(cur)}" + lines = [prompt, @props.rows...] + div {}, lines.slice().reverse().map (lin)-> + pre {}, lin + + $ -> + termRev = 0 + pressed = [] + deltim = null + + met = $('
').text('m').css(display: 'none').appendTo(term).width()
+        subs = ""
+        # $(window).resize -> 
+        #   window.termWif = ($(term).width() / met).toFixed()
+        #   path =  "/new/#{termWif}"
+        #   if path is subs
+        #     return
+        #   if subs
+        #     urb.unsubscribe {path:subs}
+        #   subs = path
+        #   urb.subscribe {path}, (err,dat)->
+        #       if err or dat.data.ok
+        #         return;
+        #       syncRev = dat.data.rev
+        #       unless termRev > syncRev
+        #         termRev = syncRev
+        #         matr.setProps rows: dat.data.stak
+        #         document.title = "Matrix"  # XX  debug
+        # $(window).resize()
+
+        matr = rend (Matr rows:[], prompt:"", cursor:1), term
+        flash = ($el, background)->
+          $el.css {background}
+          if background
+            setTimeout (()-> flash $el,''), 50
+        
+        peer = (ruh) ->
+          switch false
+            when !ruh.map then ruh.map peer
+            when !ruh.pro then matr.setProps prompt: ruh.pro
+            when !ruh.hop then matr.setProps cursor: ruh.hop
+            when !ruh.out 
+              matr.setProps rows: [ruh.out, matr.props.rows...]
+            when !ruh.act then switch ruh.act
+              when 'clr' then matr.setProps rows:[]
+              when 'bel' then flash ($ 'body'), 'black'
+              else throw "Unknown "+(JSON.stringify ruh)
+            else console.log ruh
+        
+        urb.bind "", (err,d)->
+          if d.data then peer d.data
+
+        #later = (data)->
+        #  if data
+        #    pressed.push data
+        #  clearTimeout deltim
+        #  setTimeout (->
+        #    if urb.reqq.length > 0 
+        #      return deltim = later()
+        #    urb.send data: pressed
+        #    pressed = []
+        #  ), 500
+
+        Mousetrap.handleKey = (char, mod, e)->
+          norm = {
+            capslock:  'caps'
+            pageup:    'pgup'
+            pagedown:  'pgdn'
+            backspace: 'baxp'
+            enter:     'entr'
+          }
+          key = 
+            if char.length is 1
+              if e.type is 'keypress'
+                str: char
+            else if e.type is 'keydown'
+              if char isnt 'space'
+                act: norm[char] ? char
+            else if e.type is 'keyup' and norm[key] is 'caps'
+              act: 'uncap'
+          if key
+            e.preventDefault()
+            urb.send mark: 'dill-belt', data: {mod,key}
+            
+            # amod = (arr)->
+            #   for i in arr
+            #     unless mod.indexOf(i) < 0
+            #       return yes
+            #   no
+            # if key.str or key.act is 'baxp' or key.act is 'entr'
+            #   termRev++
+            #   [bot, rest...] = old = matr.props.rows
+            #   matr.setProps rows:(
+            #     switch  key.act 
+            #       when 'baxp'
+            #         if amod ['ctrl', 'meta']
+            #           ['', rest...]
+            #         else if amod ['alt']
+            #           [(bot.replace /\ *[^ ]*$/, ''), rest...]
+            #         else if bot and bot.length 
+            #           [bot.slice(0, -1), rest...]
+            #         else if rest[0] and rest[0].length
+            #           res = rest.slice()
+            #           res[0] = res[0].slice(0, -1)
+            #           res
+            #         else rest
+            #       when 'entr'
+            #         ['', old...]
+            #       when undefined
+            #         if mod.length > 1 or (mod.length and !amod ['shift'])
+            #           old
+            #         else unless old and bot isnt null
+            #           [key.str]
+            #         #else if bot.length is termWif
+            #         #  [key.str, old...]
+            #         else [bot + key.str, rest...]
+            #   )
+            #   document.title = "Matri"  # XX  debug
+            # later {mod, key}
+
+
+      '''
+    ==
+    ;+  (cdnj "coffee-script/1.7.1/coffee-script.min.js")
+==  ==
diff --git a/main/app/radio/core.hook b/main/app/radio/core.hook
deleted file mode 100644
index 73673a4424..0000000000
--- a/main/app/radio/core.hook
+++ /dev/null
@@ -1,94 +0,0 @@
-/-  mess,user,users,zing,zong
-!:
-=>  |%
-    ++  axle
-      $%  [%0 p=(map path ,[p=(list zong) q=(map ship ,?)])]
-      ==
-    ++  blitz
-      $%  [%zong p=zong]
-          [%user p=user]
-      ==
-    ++  iron
-      $%  [%zongs p=(list zong)]
-          [%users p=users]
-      ==
-    ++  gift
-      $%  [%rush blitz]
-          [%rust iron]
-          [%mean ares]
-          [%nice ~]
-      ==
-    ++  move  ,[p=bone q=(mold note gift)]
-    ++  note  ,[%c %info p=@p q=@tas r=nori]            ::  internal edit
-    --
-|_  [hid=hide vat=axle]
-++  grab
-  |=  sta=path
-  (fall (~(get by p.vat) sta) *[p=(list zong) q=(map ship ,?)])
-::
-++  ident
-  |=  you=ship
-  %-  (hard ,@t)
-  .^(%a (scot %p our.hid) %name (scot %da lat.hid) (scot %p you) ~)
-::
-++  peer
-  |=  [ost=bone you=ship pax=path]
-  ^-  [(list move) _+>]
-  ?~  pax
-    [[ost %give %mean ~ %radio-bad-path ~]~ +>.$]
-  =+  ya=(grab t.pax)
-  ?+    -.pax  [~ +>.$]
-      %mensajes
-    [[ost %give %rust %zongs p.ya]~ +>.$]
-      %amigos
-    =.  q.ya  (~(put by q.ya) you %.y)
-    :_  +>.$(p.vat (~(put by p.vat) t.pax ya))
-    :_  (send pax %give %rush %user %in you (ident you))
-    :*  ost  %give  %rust  %users
-        %+  murn  (~(tap by q.ya))
-        |=  [shi=ship liv=?]
-        ?.  liv
-          ~
-        (some [shi (ident shi)])
-    ==
-  ==
-::
-++  poke-zing
-  |=  [ost=bone you=ship zig=zing]
-  ^-  [(list move) _+>]
-  =+  ya=(grab p.zig)
-  ?.  (~(has by q.ya) you)
-    [[ost %give %mean ~ %no-te-conozco ~]~ +>.$]
-  =+  zog=`zong`[%mess lat.hid you q.zig]
-  =.  p.vat  (~(put by p.vat) p.zig [[zog p.ya] q.ya])
-  :_  +>.$
-  :-  [ost %give %nice ~]
-  (send mensajes/p.zig %give %rush %zong zog)
-::
-++  poke-bit
-  |=  [ost=bone you=ship ~]
-  ^-  [(list move) _+>]
-  :_  +>.$
-  =+  paf=/(scot %p our.hid)/try/(scot %da lat.hid)/radio/backlog/jam
-  [ost %pass /jamfile %c %info our.hid (foal paf (jam +<+.+>.$))]~
-::
-++  pull
-  |=  ost=bone
-  ^-  [(list move) _+>]
-  =+  ^-  (unit ,[his=ship pax=path])
-      (~(get by sup.hid) ost)
-  ?~  -  ~&  %strange-pull  [~ +>.$]
-  ?.  ?=([%mensajes *] pax.u)
-    [~ +>.$]
-  =+  sta=(~(got by p.vat) t.pax.u)
-  =.  q.sta  %+  ~(put by q.sta)  his.u  %.n
-  =.  p.vat  %+  ~(put by p.vat)  t.pax.u  sta
-  [(send amigos/t.pax.u %give %rush %user %out his.u (ident his.u)) +>.$]
-::
-++  send
-  |=  [pax=path msg=(mold note gift)]
-  ^-  (list move)
-  ::  ~&  [%radi-sub pus.hid]
-  %+  turn  (~(tap in (~(get ju pus.hid) pax)))
-  |=(ost=bone [ost msg])
---
diff --git a/main/app/reload/core.hook b/main/app/reload/core.hook
index 0df57a087c..6ddca03418 100644
--- a/main/app/reload/core.hook
+++ b/main/app/reload/core.hook
@@ -11,7 +11,7 @@
 ++  poke--args
   %^  add-output  .
     rush/tang/[leaf/"done"]~
-  %+  args-into-resp  . 
+  %+  args-into-resp  .
   |=  all=(list ,@tas)
   %+  turn  all
   =+  ark=(arch .^(%cy /(scot %p our.hid)/main/(scot %da lat.hid)/arvo))
@@ -25,6 +25,6 @@
     ?>  ?=([[@ ~] ~] zaz)
     `term`p.i.zaz
   =+  tip=(end 3 1 nam)
-  =+  pax=[(scot %p our.hid) %main (scot %da lat.hid) %arvo nam %hoon ~]
-  [%veer ?:(=('z' tip) %$ tip) pax (,@ .^(%cx pax))]
+  =+  pax=[(scot %p our.hid) %main (scot %da lat.hid) %arvo nam ~]
+  [%veer ?:(=('z' tip) %$ tip) pax (,@ .^(%cx (welp pax /hoon)))]
 --
diff --git a/main/app/rodeo/core.hook b/main/app/rodeo/core.hook
deleted file mode 100644
index 0a7856cfff..0000000000
--- a/main/app/rodeo/core.hook
+++ /dev/null
@@ -1,763 +0,0 @@
-::
-::::  /hook/core/rodeo/app
-  ::
-/?  314
-/-  *rodeo, *twitter
-/+  rodeo
-::
-::::
-  ::
-!:
-=>  |%                                                  ::  data structures
-    ++  house  ,[%1 house-1]                            ::  full state
-    ++  house-any                                       ::  app history
-      $%  [%1 house-1]                                  ::  1: rodeo
-          [%0 house-0]                                  ::  0: initial version
-      ==                                                ::
-    ++  house-1                                         ::
-      $:  stories=(map span story)                      ::  conversations
-          general=(set bone)                            ::  meta-subscribe
-          outbox=(pair ,@ud (map ,@ud thought))         ::  urbit outbox
-          folks=(map ship human)                        ::  human identities
-      ==                                                ::
-    ++  house-0                                         ::  legacy state
-      %+  map  path                                     ::
-      ,[p=(list zong) q=(map ship ,?)]                  ::
-    ::                                                  ::
-    ++  zong                                            ::  legacy messages
-      $%  $:  %mess  p=@da  q=ship                      ::
-            $=  r                                       ::
-              $%  [%do p=@t]                            ::
-                  [%exp p=@t q=tank]                    ::
-                  [%say p=@t]                           ::
-      ==  ==  ==                                        ::
-    ++  story                                           ::  wire content
-      $:  count=@ud                                     ::  (lent grams)
-          grams=(list telegram)                         ::  all history
-          locals=(map ship (pair ,@da status))          ::  local presence
-          remotes=(map partner atlas)                   ::  remote presence
-          sequence=(map partner ,@ud)                   ::  partners heard
-          shape=config                                  ::  configuration
-          known=(map serial ,@ud)                       ::  messages heard
-          guests=(map bone river)                       ::  message followers
-          viewers=(set bone)                            ::  presence followers
-          owners=(set bone)                             ::  config followers
-      ==                                                ::
-    ++  river  (pair point point)                       ::  stream definition
-    ++  point                                           ::  stream endpoint
-      $%  [%ud p=@ud]                                   ::  by number
-          [%da p=@da]                                   ::  by date
-      ==                                                ::
-    ++  gift                                            ::  result
-      $%  [%rush %rodeo-report report]                  ::  refresh
-          [%mean ares]                                  ::  cancel
-          [%nice ~]                                     ::  accept
-      ==                                                ::
-    ++  sign                                            ::  response
-      $%  $:  %e                                        ::  from %eyre
-      $%  [%thou p=httr]                                ::  HTTP response
-          ==  ==                                        ::
-          $:  %g                                        ::  application
-      $%  [%mean p=ares]                                ::  cancel
-          [%nice ~]                                     ::  acknowledge
-          [%rush p=silt]                                ::  subs data
-          ==  ==                                        ::
-          $:  %t                                        ::
-      $%  [%wake ~]                                     ::  timer wakeup
-      ==  ==  ==                                        ::
-    ++  silt
-      $%  [%rodeo-report p=report]                      ::  refresh
-          [%twit-stat p=twit-stat]                      ::  tweet reciept
-          [%twit-feed p=(list twit-stat)]               ::  tweet reciept
-      ==
-    ++  move  ,[p=bone q=(mold note gift)]              ::  all actions
-    ++  hapt  ,[p=ship q=path]                          ::  app instance
-    ++  note                                            ::  requests
-      $%  $:  %c                                        ::
-      $%  [%info p=@p q=@tas r=nori]                    ::
-          ==  ==                                        ::
-          $:  %e                                        ::  through %eyre
-      $%  [%them p=(unit hiss)]                         ::  HTTP request
-          ==  ==                                        ::
-          $:  %g                                        ::  network
-      $%  [%mess p=hapt q=ship r=cage]                  ::  message
-          [%nuke p=hapt q=ship]                         ::  cancel
-          [%show p=hapt q=ship r=path]                  ::  subscribe
-          [%took p=hapt q=ship]                         ::  acknowledge
-          ==  ==                                        ::
-          $:  %t                                        ::
-      $%  [%wait p=@da]                                 ::
-      ==  ==  ==                                        ::
-    --
-|_  [hid=hide house]
-++  ra                                                  ::  transaction core
-  |_  [ost=bone moves=(list move)]
-  ++  ra-abet                                           ::  resolve core
-    ^-  [(list move) _+>]
-    [(flop moves) +>]
-  ::
-  ++  ra-emil                                           ::  ra-emit move list
-    |=  mol=(list move)
-    %_(+> moves (welp (flop mol) moves))
-  ::
-  ++  ra-emit                                           ::  emit a move
-    |=  mov=move
-    %_(+> moves [mov moves])
-  ::
-  ++  ra-ever                                           ::  emit success
-    (ra-emit ost %give %nice ~)
-  ::
-  ++  ra-evil                                           ::  emit error
-    |=  msg=cord
-    ~&  [%ra-evil msg]
-    (ra-emit ost %give %mean ~ msg ~)
-  ::
-  ++  ra-hiss                                           ::  emit http request
-    |=  [pax=path hiz=hiss]
-    (ra-emit ost %pass pax %e %them ~ hiz)
-  ::
-  ++  ra-house                                          ::  emit partners
-    |=  ost=bone
-    %+  ra-emit  ost
-    :^  %give  %rush  %rodeo-report
-    :-  %house
-    %-  ~(gas in *(map span (pair posture cord)))
-    %+  turn  (~(tap by stories)) 
-    |=([a=span b=story] [a p.cordon.shape.b caption.shape.b])
-  ::
-  ++  ra-homes                                          ::  update partners
-    =+  gel=general
-    |-  ^+  +>
-    ?~  gel  +>
-    =.  +>  $(gel l.gel)
-    =.  +>  $(gel r.gel)
-    (ra-house n.gel)
-  ::
-  ++  ra-init                                           ::  initialize rodeo
-    =+  sir=(sein our.hid)
-    %+  ra-apply  our.hid
-    :+  %design  (main our.hid)
-    :-  ~
-    :_  [%default ?:((gte our.hid 65.536) %brown %black) ~]
-    ?:(=(sir our.hid) ~ [[%& sir (main sir)] ~ ~])
-  ::
-  ++  ra-apply                                          ::  apply command
-    |=  [her=ship cod=command]
-    ^+  +>
-    ~&  [%ra-apply cod]
-    ?-    -.cod
-        %design
-      ?.  =(her our.hid)
-        (ra-evil %rodeo-no-owner)
-      ?~  q.cod
-        ?.  (~(has by stories) p.cod)
-          (ra-evil %rodeo-no-story)
-        =.  +>.$  (ra-config p.cod *config)
-        ra-ever(stories (~(del by stories) p.cod))
-      =.  +>.$  (ra-config p.cod u.q.cod)
-      ra-ever
-    ::
-        %review   ra-ever:(ra-think | her +.cod)
-        %publish  ra-ever:(ra-think & her +.cod)
-    ==
-  ::
-  ++  ra-config                                         ::  configure story
-    |=  [man=span con=config]
-    ^+  +>
-    =+  :-  neu=(~(has by stories) man)
-        pur=(fall (~(get by stories) man) *story)
-    =.  +>.$  pa-abet:(~(pa-reform pa man pur) con)
-    ?:(neu +>.$ ra-homes)
-  ::
-  ++  ra-friend                                         ::  %friend response
-    |=  [man=span tay=partner sih=sign]
-    ^+  +>
-    =+  pur=(~(get by stories) man)
-    ?~  pur  ~&  [%ra-friend-none man]  +>.$
-    pa-abet:(~(pa-friend pa man u.pur) tay sih)
-  ::
-  ++  ra-twitter                                        ::  %twitter response
-    |=  [[num=@ud man=span] sih=sign]
-    ^+  +>
-    ?+    sih  ~|([%rodeo-bad-twitter sih] !!)
-        [%g ?(%nice %mean) ~]
-      +>
-        [%g %mean ^]
-      (ra-repeat num [%| %twitter man] sih)
-        [%g %rush %twit-stat *]
-      (ra-repeat num [%| %twitter man] [%g %nice ~])
-    ==
-  ::
-  ++  ra-repeat                                         ::  %repeat response
-    |=  [num=@ud pan=partner sih=sign]
-    =+  oot=(~(get by q.outbox) num)
-    ?~  oot  ~&  [%ra-repeat-none num]  +>.$
-    =.  q.outbox  (~(del by q.outbox) num)
-    =.  q.u.oot
-      =+  olg=(~(got by q.u.oot) pan)
-      %+  ~(put by q.u.oot)  pan
-      :-  -.olg
-      ?+  sih  !!
-        [%g %mean *]  ~&([%rodeo-repeat-rejected num pan sih] %rejected)
-        [%g %nice ~]  %received
-      ==
-    (ra-think | our.hid u.oot ~)
-  ::
-  ++  ra-cancel                                         ::  drop a bone
-    ^+  .
-    =+  hep=(~(get by sup.hid) ost)
-    ?~  hep  +
-    ?.  ?=([@ @ *] q.u.hep)
-      +(general (~(del in general) ost))
-    =*  man  i.t.q.u.hep
-    =+  pur=(~(get by stories) man)
-    ?~  pur  +>
-    pa-abet:(pa-notify:~(pa-cancel pa man u.pur) p.u.hep %gone *human)
-  ::
-  ++  ra-human                                          ::  look up person
-    |=  her=ship
-    ^-  [human _+>]
-    =^  who  folks
-        =+  who=(~(get by folks) her)
-        ?^  who  [u.who folks]
-        =+  who=`human`[~ `(scot %p her)]               ::  XX do right
-        [who (~(put by folks) her who)]
-    [who +>.$]
-  ::
-  ++  ra-subscribe                                      ::  listen to
-    |=  [her=ship pax=path]
-    ^+  +>
-    ::  ~&  [%ra-subscribe her pax]
-    ?:  ?=(~ pax)
-      (ra-house(general (~(put in general) ost)) ost)
-    ?.  ?=([@ @ *] pax)
-      (ra-evil %rodeo-bad-path)
-    =+  ^=  vab  ^-  (set ,@tas)
-        =|  vab=(set ,@tas)
-        |-  ^+  vab
-        ?:  =(0 i.pax)  vab
-        $(i.pax (rsh 3 1 i.pax), vab (~(put in vab) (end 3 1 i.pax)))
-    =+  pur=(~(get by stories) i.t.pax)
-    ?~  pur
-      ~&  [%bad-subscribe-story-c i.t.pax]
-      (ra-evil %rodeo-no-story)
-    =+  soy=~(. pa i.t.pax u.pur)
-    =.  soy  ?.((~(has in vab) %a) soy (pa-watch:soy her))
-    =.  soy  ?.((~(has in vab) %x) soy (pa-master:soy her))
-    =.  soy  ?.((~(has in vab) %f) soy (pa-listen:soy her t.t.pax))
-    =^  who  +>.$  (ra-human her)
-    pa-abet:(pa-notify:soy her %hear who)
-  ::
-  ++  ra-think                                          ::  publish/review
-    |=  [pub=? her=ship tiz=(list thought)]
-    ^+  +>
-    ?~  tiz  +>
-    $(tiz t.tiz, +> (ra-consume pub her i.tiz))
-  ::
-  ++  ra-consume                                        ::  consume thought
-    |=  [pub=? her=ship tip=thought]
-    =+  aud=(~(tap by q.tip) ~)
-    |-  ^+  +>.^$
-    ?~  aud  +>.^$
-    $(aud t.aud, +>.^$ (ra-conduct pub her p.i.aud tip))
-  ::
-  ++  ra-conduct                                        ::  thought to partner
-    |=  [pub=? her=ship tay=partner tip=thought]
-    ^+  +>
-    ::  ~&  [%ra-conduct pub her tay]
-    ?-  -.tay
-      %&  ?:  pub
-            =.  her  our.hid                            ::  XX security!
-            ?:  =(her p.p.tay)
-              (ra-record q.p.tay p.p.tay tip)
-            (ra-transmit p.tay tip)
-          ?.  =(our.hid p.p.tay)
-            +>
-          (ra-record q.p.tay her tip)
-      %|  ?.  pub  +>
-          ?-    -.p.tay
-              %twitter
-            (ra-tweet p.p.tay tip)
-    ==    ==
-  ::
-  ++  ra-record                                         ::  add to story
-    |=  [man=span gam=telegram]
-    ^+  +>
-    =+  pur=(~(get by stories) man)
-    ?~  pur
-      ~&  [%no-story man]
-      +>.$
-    pa-abet:(~(pa-learn pa man u.pur) gam)
-  ::
-  ++  ra-transmit                                       ::  send to neighbor
-    |=  [cuz=station tip=thought]
-    ^+  +>
-    =.  +>
-        %+  ra-emit  ost
-        :*  %pass
-            /repeat/(scot %ud p.outbox)/(scot %p p.cuz)/[q.cuz]
-            %g
-            %mess
-            [p.cuz /rodeo]
-            our.hid
-            [%rodeo-command !>(`command`[%review tip ~])]
-        ==
-    +>(p.outbox +(p.outbox), q.outbox (~(put by q.outbox) p.outbox tip))
-  ::
-  ++  ra-tweet                                          ::  send to /twit
-    |=  [man=span tip=thought]
-    =*  sta  r.tip
-    ?>  ?=(%lin -.r.sta)
-    =.  q.outbox  (~(put by q.outbox) p.outbox tip)
-    %^    ra-emil(p.outbox +(p.outbox))
-        :*  ost
-            %pass  /twitter/stat/(scot %ud p.outbox)/[man]
-            %g  %mess
-            [our.hid /twit]  our.hid
-            [%twit-do !>(`twit-do`[man %post p.tip q.r.sta])]
-        ==
-      :*  ost
-          %pass  /twitter/stat/(scot %ud p.outbox)/[man]
-          [%g %show [our.hid /twit] our.hid /post/(scot %uv p.tip)]
-      ==
-    ~
-  ++  pa                                                ::  story core
-    |_  $:  man=span
-            story
-        ==
-    ++  pa-abet
-      ^+  +>
-      +>(stories (~(put by stories) man `story`+<+))
-    ::
-    ++  pa-admire                                       ::  accept from
-      |=  her=ship
-      ^-  ?
-      ::?-  -.cordon.shape
-      ::  %&  (~(has in p.cordon.shape) her)
-      ::  %|  !(~(has in p.cordon.shape) her)
-      ::==
-      &
-    ::
-    ++  pa-watch                                        ::  watch presence
-      |=  her=ship
-      ?.  (pa-admire her)
-        (pa-sauce ost [[%mean ~ %rodeo-watch-unauthorized ~] ~])
-      =.  viewers  (~(put in viewers) ost)
-      (pa-display ost ~ ~)
-    ::
-    ++  pa-master                                       ::  hear config
-      |=  her=ship
-      ?.  (pa-admire her)
-        (pa-sauce ost [[%mean ~ %rodeo-master-unauthorized ~] ~])
-      =.  owners  (~(put in owners) ost)
-      ::  ~&  [%pa-master her man shape]
-      (pa-sauce ost [[%rush %rodeo-report %config shape] ~])
-    ::
-    ++  pa-display                                      ::  update presence
-      |=  vew=(set bone)
-      =+  ^=  reg
-          :_  remotes
-          |-  ^-  atlas
-          ?~  locals  ~
-          [[p.n.locals q.q.n.locals] $(locals l.locals) $(locals r.locals)]
-      ::  ~&  [%pa-display man reg]
-      |-  ^+  +>.^$
-      ?~  vew  +>.^$
-      =.  +>.^$  $(vew l.vew)
-      =.  +>.^$  $(vew r.vew)
-      (pa-sauce n.vew [[%rush %rodeo-report %group reg] ~])
-    ::
-    ++  pa-monitor                                      ::  update config
-      =+  owe=owners
-      |-  ^+  +>
-      ?~  owe  +>
-      =.  +>  $(owe l.owe)
-      =.  +>  $(owe r.owe)
-      ::  ~&  [%pa-monitor man shape]
-      (pa-sauce n.owe [[%rush %rodeo-report %config shape] ~])
-    ::
-    ++  pa-friend                                       ::  subscribed update
-      |=  [tay=partner sih=sign]
-      ^+  +>
-      ?+    sih  ~|([%rodeo-bad-friend sih] !!)
-          [%g %nice ~]
-        +>.$
-      ::
-          [%g %mean *]
-        ?~  +>.sih
-          (pa-acquire [tay ~])
-        ~&  [%pa-friend-mean +>.sih]
-        pa-monitor(sources.shape (~(del in sources.shape) tay))
-      ::
-          [%g %rush %twit-feed *]
-        %-  pa-lesson
-        %+  turn  p.p.sih  |=  twit-stat
-        ^-  telegram
-        :^    our.hid                 ::  XX inaccurate
-            (shas %twit id)
-          `audience`[[tay [& ~ tay] %received] `~]      ::  current party?
-        ^-  statement
-        :+  now
-          ~                           ::  XX  hashtags
-        [%lin & txt]
-          [%g %rush %rodeo-report *]
-        ::  ~&  [%pa-friend-report +>+.sih]
-        ?>  ?=(& -.tay)
-        =.  +>  %+  pa-scrub  ost 
-                :_  ~
-                :-  /friend/show/[man]/(scot %p p.p.tay)/[q.p.tay]
-                [%g %took [p.p.tay /rodeo] our.hid]
-        ?+  -.p.p.sih  ~|([%rodeo-odd-friend sih] !!)
-          %config  +>.$
-          %group  (pa-remind tay +.p.p.sih)
-          %grams  (pa-lesson q.+.p.p.sih)
-        ==
-      ==
-    ::
-    ++  pa-scrub                                        ::  pass forward
-      |=  [ost=bone bub=(list (pair path note))]
-      %_    +>.$
-          moves
-        (welp (flop (turn bub |=(a=(pair path note) [ost %pass a]))) moves)
-      ==
-    ::
-    ++  pa-sauce                                        ::  send backward
-      |=  [ost=bone gub=(list gift)]
-      %_    +>.$
-          moves
-        (welp (flop (turn gub |=(a=gift [ost %give a]))) moves)
-      ==
-    ::
-    ++  pa-abjure                                       ::  unsubscribe move
-      |=  tal=(list partner)
-      %+  pa-scrub  0
-      %-  zing
-      %+  turn  tal
-      |=  tay=partner
-      ?-  -.tay
-        %|  ~&  tweet-abjure/p.p.tay
-            !!
-            ::  :~  :-  /friend/nuke/[man]/twitter/[p.p.tay]
-            ::      [%g %nuke [our.hid /twit] our.hid]
-            ::  ==
-      ::
-        %&  ::  ~&  [%pa-abjure [our.hid man] [p.p.tay q.p.tay]]
-            :~  :-  /friend/nuke/[man]/(scot %p p.p.tay)/[q.p.tay]
-                [%g %nuke [p.p.tay /rodeo] our.hid]
-            ==
-      ==
-    ::
-    ++  pa-acquire                                      ::  subscribe to
-      |=  tal=(list partner)
-      %+  pa-scrub  0
-      %-  zing
-      %+  turn  tal
-      |=  tay=partner
-      ^-  (list (pair path note))
-      =+  num=(fall (~(get by sequence) tay) 0)
-      ?-  -.tay
-        %|  ~&  tweet-acquire/p.p.tay
-            :~  :-  /friend/show/[man]/twitter/[p.p.tay]
-                [%g %show [our.hid /twit] our.hid /user/[p.p.tay]]
-            ==
-      ::
-        %&  ::  ~&  [%pa-acquire [our.hid man] [p.p.tay q.p.tay]]
-            :~  :-  /friend/show/[man]/(scot %p p.p.tay)/[q.p.tay]
-                [%g %show [p.p.tay /rodeo] our.hid /af/[q.p.tay]/(scot %ud num)]
-            ==
-      ==
-    ::
-    ++  pa-reform                                       ::  reconfigure, ugly
-      |=  cof=config
-      =+  ^=  dif  ^-  (pair (list partner) (list partner))
-          =+  old=`(list partner)`(~(tap in sources.shape) ~)
-          =+  new=`(list partner)`(~(tap in sources.cof) ~)
-          :-  (skip new |=(a=partner (~(has in sources.shape) a)))
-          (skip old |=(a=partner (~(has in sources.cof) a)))
-      =.  +>.$  (pa-acquire p.dif)
-      =.  +>.$  (pa-abjure q.dif)
-      =.  shape  cof
-      pa-monitor
-    ::
-    ++  pa-cancel                                       ::  unsubscribe from
-      ::  ~&  [%pa-cancel ost]
-      %_  .
-        guests  (~(del by guests) ost)
-        viewers  (~(del in viewers) ost)
-        owners  (~(del in owners) ost)
-      ==
-    ::
-    ++  pa-notify                                       ::  local presence
-      |=  [her=ship saz=status]
-      ^+  +>
-      =+  ^=  nol
-          ?:  =(%gone p.saz) 
-            (~(del by locals) her)
-          (~(put by locals) her lat.hid saz)
-      ?:  =(nol locals)  +>.$
-      (pa-display(locals nol) viewers)
-    ::
-    ++  pa-remind                                       ::  remote presence
-      |=  [tay=partner loc=atlas rem=(map partner atlas)]
-      =+  ^=  buk
-          =+  mer=(turn (~(tap by rem) ~) |=([* a=atlas] a))
-          |-  ^-  atlas
-          ?~  mer  loc
-          =.  loc  $(mer t.mer)
-          =+  dur=`(list (pair ship status))`(~(tap by i.mer) ~)
-          |-  ^-  atlas
-          ?~  dur  loc
-          =.  loc  $(dur t.dur)
-          =+  fuy=(~(get by loc) p.i.dur)
-          ?~  fuy  (~(put by loc) p.i.dur q.i.dur)
-          ?:  =(`presence`p.q.i.dur `presence`p.u.fuy)
-            loc
-          ?-  p.u.fuy
-            %gone  (~(del by loc) p.i.dur q.i.dur)
-            %talk  loc
-            %hear  (~(put by loc) p.i.dur q.i.dur)
-          ==
-      =+  gub=(~(get by remotes) tay)
-      ::  ~&  [%pa-remind tay gub buk]
-      ?.  |(?=(~ gub) !=(buk u.gub))
-        +>.$
-      =.  remotes  (~(put by remotes) tay buk)
-      (pa-display viewers)
-    ::
-    ++  pa-start                                        ::  start stream
-      |=  riv=river
-      ^+  +>
-      =-  ::  ~&  [%pa-start riv lab]
-          =.  +>.$  (pa-sauce ost [[%rush %rodeo-report %grams q.lab r.lab] ~])
-          ?:  p.lab
-            (pa-sauce ost [[%mean ~] ~])
-          +>.$(guests (~(put by guests) ost riv))
-      ^=  lab
-      =+  [end=count gaz=grams dun=| zeg=*(list telegram)]
-      |-  ^-  (trel ,? ,@ud (list telegram))
-      ?~  gaz  [dun end zeg]
-      ?:  ?-  -.q.riv                                   ::  after the end
-            %ud  (lte p.q.riv end)
-            %da  (lte p.q.riv p.r.q.i.gaz)
-          ==
-        $(end (dec end), gaz t.gaz)
-      ?:  ?-  -.p.riv                                   ::  before the start
-            %ud  (lth end p.p.riv)
-            %da  (lth p.r.q.i.gaz p.p.riv)
-          ==
-        [dun end zeg]
-      $(end (dec end), gaz t.gaz, zeg [i.gaz zeg])
-    ::
-    ++  pa-listen                                       ::  subscribe
-      |=  [her=ship pax=path]
-      ^+  +>
-      ?.  (pa-admire her)
-        (pa-sauce ost [[%mean ~ %rodeo-listen-unauthorized ~] ~])
-      =+  ^=  ruv  ^-  (unit river)
-          ?:  ?=(~ pax)
-            `[[%ud count] [%da (dec (bex 128))]]
-          ?:  ?=([@ ~] pax)
-            =+  say=(slay i.pax)
-            ?.  ?=([~ %$ ?(%ud %da) @] say)  ~
-            `[(point +>.say) [%da (dec (bex 128))]]
-          ?.  ?=([@ @ ~] pax)  ~
-          =+  [say=(slay i.pax) den=(slay i.t.pax)]
-          ?.  ?=([~ %$ ?(%ud %da) @] say)  ~
-          ?.  ?=([~ %$ ?(%ud %da) @] den)  ~
-          `[(point +>.say) (point +>.den)]
-      ::  ~&  [%pa-listen her pax ruv]
-      ?~  ruv
-        (pa-sauce ost [[%mean ~ %rodeo-malformed ~] ~])
-      (pa-start u.ruv)
-    ::
-    ++  pa-refresh                                      ::  update stream
-      |=  [num=@ud gam=telegram]
-      ~&  [%pa-refresh man num gam guests]
-      =+  ^=  moy
-          |-  ^-  (pair (list bone) (list move))
-          ?~  guests  [~ ~]
-          ::  ~&  [%pa-refresh num n.guests]
-          =+  lef=$(guests l.guests)
-          =+  rit=$(guests r.guests)
-          =+  old=[p=(welp p.lef p.rit) q=(welp q.lef q.rit)]
-          ?:  ?-  -.q.q.n.guests                        ::  after the end
-                %ud  (lte p.q.q.n.guests num)
-                %da  (lte p.q.q.n.guests p.r.q.gam)
-              ==
-            [[p.n.guests p.old] [[p.n.guests %give %mean ~] q.old]]
-          ?:  ?-  -.p.q.n.guests                        ::  before the start
-                %ud  (gth p.p.q.n.guests num)
-                %da  (gth p.p.q.n.guests p.r.q.gam)
-              ==
-            old
-          :-  p.old
-          [[p.n.guests %give %rush %rodeo-report %grams num gam ~] q.old]
-      =.  moves  (welp q.moy moves)
-      |-  ^+  +>.^$
-      ?~  p.moy  +>.^$
-      $(p.moy t.p.moy, guests (~(del by guests) i.p.moy))
-    ::
-    ++  pa-lesson                                       ::  learn multiple
-      |=  gaz=(list telegram)
-      ^+  +>
-      ?~  gaz  +>
-      $(gaz t.gaz, +> (pa-learn i.gaz))
-    ::
-    ++  pa-learn                                        ::  learn message
-      |=  gam=telegram
-      ^+  +>
-      ?.  (pa-admire p.gam)
-        ~&  %pa-admire-rejected
-        +>.$
-      =.  q.q.gam  
-        =+  ole=(~(get by q.q.gam) [%& our.hid man])
-        ?~  ole  q.q.gam
-        (~(put by q.q.gam) [%& our.hid man] -.u.ole %received)
-      =+  old=(~(get by known) p.q.gam)
-      ?~  old
-        (pa-append gam)
-      (pa-revise u.old gam)
-    ::
-    ++  pa-append                                       ::  append new
-      |=  gam=telegram
-      ^+  +>
-      %+  %=  pa-refresh
-            grams  [gam grams]
-            count  +(count)
-            known  (~(put by known) p.q.gam count)
-          ==
-        count
-      gam
-    ::
-    ++  pa-revise                                       ::  revise existing
-      |=  [num=@ud gam=telegram]
-      =+  way=(sub count num)
-      =.  grams  (welp (scag (dec way) grams) [gam (slag way grams)])
-      (pa-refresh num gam)
-    --
-  --
-++  peer
-  |=  [ost=bone her=ship pax=path]
-  ^-  [(list move) _+>]
-  ::  ~&  [%rodeo-peer ost her pax]
-  ra-abet:(~(ra-subscribe ra ost ~) her pax)
-::
-++  poke-rodeo-command
-  |=  [ost=bone her=ship cod=command]
-  ^-  [(list move) _+>]
-  ::  ~&  [%rodeo-poke-command her cod]
-  =^  moz  +>.$  ra-abet:(~(ra-apply ra ost ~) her cod)
-  [moz +>.$]
-::
-++  pour
-  |=  [ost=bone pax=path sih=*]
-  ^-  [(list move) _+>]
-  ::  ~&  sih=sih
-  =+  sih=((hard sign) sih)
-  ::  ~&  [%rodeo-pour ost pax sih]
-  ?+    pax  ~&  [%rodeo-strange-path pax]  !!
-  ::
-      [%twitter *]
-    =-  ra-abet:(~(ra-twitter ra ost ~) met sih)
-    ^=  met
-    ?+    t.pax  ~|  [%rodeo-twitter-strange-path pax]  !!
-      ::    [%mine @ @ ~]
-      ::  [i.t.pax i.t.t.t.pax]
-        [%stat @ @ ~]
-      [(slav %ud i.t.t.pax) i.t.t.t.pax]
-    ==
-  ::
-      [%friend *]
-    ?>  ?=([@ @ @ @ ~] t.pax)
-    ?.  =(%show i.t.pax)
-      ~&  [%pour-friend-nuke-nuke pax]
-      [~ +>.$]
-    =+  man=i.t.t.pax
-    =+  ?:  ?=(%twitter i.t.t.t.pax)
-          tay=[%| i.t.t.t.pax i.t.t.t.t.pax]
-        tay=[%& (slav %p i.t.t.t.pax) i.t.t.t.t.pax]
-    ra-abet:(~(ra-friend ra ost ~) man tay sih)
-  ::
-      [%repeat *]
-    ?>  ?=([@ @ @ ~] t.pax)
-    =+  [num her man]=[(slav %ud i.t.pax) (slav %p i.t.t.pax) i.t.t.t.pax]
-    ra-abet:(~(ra-repeat ra ost ~) num [%& her man] sih)
-  ==
-::
-++  pull
-  |=  ost=bone
-  ^-  [(list move) _+>]
-  ~&  [%rodeo-pull `*`ost]
-  ra-abet:~(ra-cancel ra ost ~)
-::
-++  poke-bit
-  |=  [ost=bone you=ship ~]
-  ^-  [(list move) _+>]
-  :_  +>.$
-  =+  paf=/(scot %p our.hid)/try/(scot %da lat.hid)/rodeo/backlog/jam
-  [ost %pass /jamfile %c %info our.hid (foal paf (jam +<+.+>.$))]~
-::
-++  prep
-  |=  old=(unit (unit house-any))
-  ^-  [(list move) _+>]
-  ?>  ?=(^ old)
-  =|  moz=(list move)
-  |-
-  ?~  u.old
-    =+  paf=/(scot %p our.hid)/try/(scot %da lat.hid)/rodeo/backlog/jam
-    ?.  ?=([%0 %0 %0] [.^(%cy paf)])
-      $(u.old (some ((hard house-any) (cue ((hard ,@) .^(%cx paf))))))
-    ~&  %rodeo-prep-new
-    ra-abet:~(ra-init ra 0 moz)
-  ~&  %rodeo-prep-old
-  :-  moz
-  |-
-  ?-  -.u.u.old
-    %1  %_(+>.^^$ +<+ u.u.old)
-    %0  $(u.u.old [%1 (house-0-to-house-1 +.u.u.old)])
-  ==
-::
-++  house-0-to-house-1
-  |=  vat=house-0
-  ^-  house-1
-  =-  :*  stories=-
-          general=~
-          outbox=[0 ~]
-          folks=~
-      ==
-  ^-  (map span story)
-  =-  %-  ~(run by -)
-      |=  grams=(list telegram)
-      ^-  story
-      :*  count=(lent grams)
-          grams=grams
-          locals=~
-          remotes=~
-          sequence=~
-          shape=[.(cordon [%black ~])]:*config
-          ^=  known  %-  mo  ^-  (list ,[serial @])  =<  +
-          (roll grams |=([telegram a=@ b=(list ,[serial @])] [+(a) [a p.q] b]))
-          guests=~
-          viewers=~
-          owners=~
-      ==
-  ^-  (map span (list telegram))
-  %-  mo  %+  turn  (~(tap by vat))
-  |=  [a=path b=(list zong) c=(map ship ,?)]
-  =+  ^=  par
-      ?:  =(/ a)  'hub'
-      =+  (turn a |=(d=span leaf/(trip d)))
-      (crip ~(ram re %rose ["_" ~ ~] -))
-  :-  par
-  =+  aud=`audience`[[[%& our.hid par] *envelope %received] `~]
-  =+  ^=  spe
-      |=  r=_r:*zong  ^-  speech
-      ?-  -.r
-        %say  [%lin %& p.r]
-        %do   [%lin %| p.r]
-        %exp  [%fat [%tank q.r ~] [%exp p.r]]
-      ==
-  %+  turn  b
-  |=  d=zong  ^-  telegram
-  [q.d (sham eny.hid d) aud p.d ~ (spe r.d)]
---
diff --git a/main/app/shell/core.hook b/main/app/shell/core.hook
index 0857b65f56..b76616e78d 100644
--- a/main/app/shell/core.hook
+++ b/main/app/shell/core.hook
@@ -4,10 +4,10 @@
   ::
 /?    314
 /-    term-line, kyev
-/=    pit  /~  !>(.)                                    ::  kernel vase
+/=    pit  /~  !>(+)                                    ::  kernel vase
 ::
 ::::  structures
-  ::
+  !:
 |%                                                      ::
 ++  axle                                                ::
   $:  %1                                                ::  version
@@ -83,9 +83,9 @@
       [%vega p=path]                                    ::
   ==  ==  ==                                            ::
 --
-!:
+::
 ::::  parsers
-  ::
+  !:
 |%
 ++  maybe  |*(fel=_rule (cook |*(a=(unit) (fall a ~)) (opts fel)))
 ++  opts                                                ::  parse unit
@@ -129,9 +129,9 @@
     ==
   ::
   ++  expg  (rais ;~(pfix ace expr(tol %1)) ;~(pfix gap expr))
-  ++  expr  (rais [wide tall]:(vang & pax))
-  ++  loca  %+  sear  ;~(biff plex:(vang & pax) vabe)   ::  path in %clay
-            [;~(pose rood ;~(simu cen scat))]:(vang & pax)
+  ++  expr  (rais [wide tall]:(vang | pax))
+  ++  loca  %+  sear  ;~(biff plex:(vang | pax) vabe)   ::  path in %clay
+            [;~(pose rood ;~(simu cen scat))]:(vang | pax)
   ++  vabe  |=(a=path ?~((tome a) ~ (some a)))          ::  check valid beam
   ++  args                                              ::  task arguments
     %^  rail
@@ -143,9 +143,9 @@
   ::
   --
 --
-!:
+::
 ::::  per event
-  ::
+  !:
 |%
 ++  ve
   |=  [hid=hide ost=bone axle]
@@ -240,13 +240,18 @@
     |=  [paf=path gen=(unit twig)]
     ^+  +>
     =+  fel=(file paf)  
-    ?~  fel
-      (chew-file paf '! none')
-    ?^  gen 
+    ?^  fel
+      ?~  gen
+        (blab (stray (crip ": {(spud paf)} {<(,@t u.fel)>}"))) 
       %+  with  u.gen  |=  new=vase
       =+  for=((hard mark) -:(flop paf))
       (chew-file paf (foal paf for new))
-    (blab (stray (crip ": {(spud paf)} {<(,@t u.fel)>}"))) 
+    =+  ark=;;(arch .^(%cy paf))
+    ?-  r.ark
+      ~        (chew-file paf '! none')
+      [^ ~ ~]  $(paf (welp paf /[p.n.r.ark]))
+      *        (chew-file paf '! many')
+    ==
   ::
   ++  eat-help
     |=  app=term
@@ -505,9 +510,9 @@
     !>([%rush %term-line `term-line`[pro(r a) ~ ~]])
   --
 --
-!:
+::
 ::::  formal interface
-  ::
+  !:
 |_  [hid=hide vat=axle]
 ::
 ++  peer                                                ::  handle subscription
diff --git a/main/app/sole/core.hook b/main/app/sole/core.hook
new file mode 100644
index 0000000000..39b6ed6223
--- /dev/null
+++ b/main/app/sole/core.hook
@@ -0,0 +1,650 @@
+::                                                      ::  ::
+::::  /hook/core/sole/app                               ::  ::
+  ::                                                    ::  ::
+/?  314                                                 ::  zuse version
+/-  *sole                                               ::  console structures
+/+  sole                                                ::  console library
+::                                                      ::  ::
+::::                                                    ::  ::
+  !:                                                    ::  ::
+=>  |%                                                  ::  data structures
+    ++  house                                           ::  all state
+      $:  bin=(map bone source)                         ::  input devices
+      ==                                                ::
+    ++  source                                          ::  input device
+      $:  edg=_79                                       ::  terminal columns
+          off=@ud                                       ::  window offset
+          kil=(unit (list ,@c))                         ::  kill buffer
+          apt=(list gill)                               ::  application ring
+          maz=master                                    ::  master window
+          feg=(map gill target)                         ::  live applications
+          mir=(pair ,@ud (list ,@c))                    ::  mirrored terminal
+      ==                                                ::
+    ++  master                                          ::  master buffer
+      $:  liv=?                                         ::  master is live
+          tar=target                                    ::  master target
+      ==                                                ::
+    ++  history                                         ::  past input
+      $:  pos=@ud                                       ::  input position
+          num=@ud                                       ::  number of entries
+          lay=(map ,@ud (list ,@c))                     ::  editing overlay
+          old=(list (list ,@c))                         ::  entries proper
+      ==                                                ::
+    ++  search                                          ::  reverse-i-search
+      $:  pos=@ud                                       ::  search position
+          str=(list ,@c)                                ::  search string
+      ==                                                ::
+    ++  target                                          ::  application target
+      $:  ris=(unit search)                             ::  reverse-i-search
+          hit=history                                   ::  all past input
+          pom=sole-prompt                               ::  static prompt
+          inp=sole-command                              ::  input state
+      ==                                                ::
+    ++  ukase                                           ::  master command
+      $%  [%add p=(list gill)]                          ::  add agents
+          [%del p=(list gill)]                          ::  delete agents
+      ==                                                ::
+    ++  gift                                            ::  out result <-$
+      $%  [%mean p=ares]                                ::  
+          [%nice ~]                                     ::
+          [%rush %dill-blit dill-blit]                  ::
+      ==                                                ::
+    ++  sign-gall                                       ::  sign from %gall
+      $%  [%mean p=ares]                                ::
+          [%nice ~]                                     ::
+          [%rush %sole-effect sole-effect]              ::
+      ==                                                ::
+    ++  sign                                            ::  in result $<-
+      $%  [%g sign-gall]                                ::
+      ==                                                ::
+    ++  move  ,[p=bone q=(mold note gift)]              ::
+    ++  note-gall                                       ::  note to %gall
+      $%  [%mess p=[p=ship q=path] q=ship r=cage]       ::
+          [%nuke p=[p=ship q=path] q=ship]              ::
+          [%show p=[p=ship q=path] q=ship r=path]       ::
+          [%took p=[p=ship q=path] q=ship]              ::
+      ==                                                ::
+    ++  note                                            ::  out request $->
+      $%  [%g note-gall]                                ::
+      ==                                                ::
+    --                                                  ::
+|_  $:  hid=hide                                        ::  system state
+        house                                           ::  program state
+    ==                                                  ::
+++  sp
+  |%  ++  sp-ukase
+        %+  knee  *ukase  |.  ~+
+        ;~  pose
+          (stag %add ;~(pfix lus sp-gills))
+          (stag %del ;~(pfix hep sp-gills))
+        ==
+      ::
+      ++  sp-gills
+        ;~  pose
+          (most ;~(plug com ace) sp-gill)
+          %+  cook
+            |=  a=ship
+            [[a %dojo] [a %talk] ~]
+          ;~(pfix sig fed:ag)
+        ==
+      ::
+      ++  sp-gill
+        ;~  pose
+          (stag our.hid sym)
+          ;~  plug
+            ;~(pfix sig fed:ag)
+            ;~(pfix fas sym)
+          ==
+        ==
+  --
+++  se                                                  ::  per source
+  |_  $:  [moz=(list move) biz=(list dill-blit)]
+          [her=ship ost=bone] 
+          source
+      ==
+  ++  se-abet                                           ::  resolve
+    :_  %_(+> bin (~(put by bin) ost +<+>))
+    %+  welp  (flop moz) 
+    ^-  (list move)
+    ?~  biz  ~
+    [ost %give %rush %dill-blit ?~(t.biz i.biz [%mor (flop biz)])]~
+  ::
+  ++  se-belt                                           ::  handle input
+    |=  bet=dill-belt
+    ^+  +>
+    ?:  ?=(%rez -.bet)
+      +>(edg (dec p.bet))
+    ?:  ?=(%yow -.bet)
+      (se-link p.bet)
+    =+  gyl=?^(apt i.apt [~zod %$])
+    =+  taz=~(. ta [& liv.maz gyl] ?:(liv.maz tar.maz (~(got by feg) gyl)))
+    =<  ta-abet
+    ?-  -.bet
+      %aro  (ta-aro:taz p.bet)
+      %bac  ta-bac:taz
+      %cru  (ta-cru:taz p.bet q.bet)
+      %ctl  (ta-ctl:taz p.bet)
+      %del  ta-del:taz
+      %met  (ta-met:taz p.bet)
+      %ret  ta-ret:taz
+      %txt  (ta-txt:taz p.bet)
+    ==
+  ::
+  ++  se-drop                                           ::  passive drop
+    |=  gyl=gill
+    ^+  +>
+    =<  se-prom
+    ?>  (~(has by feg) gyl)
+    %_  +>
+      feg      (~(del by feg) gyl)
+      apt      (skip apt |=(a=gill =(gyl a)))
+      liv.maz  ?~(apt & liv.maz)
+    ==
+  ::
+  ++  se-join                                           ::  add connection
+    |=  gyl=gill
+    ^+  +>
+    =<  se-prom
+    ?:  (~(has by feg) gyl)
+      (se-blit %bel ~)
+    +>(liv.maz |, apt [gyl apt], feg (~(put by feg) gyl *target))
+  ::
+  ++  se-nuke                                           ::  active drop
+    |=  gyl=gill
+    ^+  +>
+    (se-drop:(se-send(liv.maz |) gyl %nuke [p.gyl ~[q.gyl]] her) gyl)
+  ::
+  ++  se-like                                           ::  act in master
+    |=  kus=ukase
+    ?-    -.kus
+        %add  
+      |-  ^+  +>.^$
+      ?~  p.kus  +>.^$
+      $(p.kus t.p.kus, +>.^$ (se-link i.p.kus))
+    ::
+        %del
+      |-  ^+  +>.^$
+      ?~  p.kus  +>.^$
+      $(p.kus t.p.kus, +>.^$ (se-nuke i.p.kus))
+    ==
+  ::
+  ++  se-prom                                           ::  set master prompt
+    ^+  .
+    %_    .
+        cad.pom.tar.maz
+      ^-  tape
+      %+  welp 
+        (scow %p our.hid)
+      =+  ^=  mux  
+          |-  ^-  tape
+          ?~  apt  ~
+          =+  ^=  mor  ^-  tape
+              ?~  t.apt  ~
+              [',' ' ' $(apt t.apt)]
+          %+  welp
+            ^-  tape
+            =+  txt=(trip q.i.apt)
+            ?:  =(our.hid p.i.apt)
+              txt
+            :(welp "~" (scow %p p.i.apt) "/" txt)
+          mor
+      ?~  mux
+        "# "
+      :(welp ":" mux "# ")
+    ==
+  ::
+  ++  se-link                                           ::  connect to app
+    |=  gyl=gill
+    ^+  +>
+    %.  gyl
+    =<  se-join
+    (se-send gyl %show [p.gyl ~[q.gyl]] her /sole)
+  ::
+  ++  se-blit                                           ::  give output
+    |=  bil=dill-blit
+    +>(biz [bil biz])
+  ::
+  ++  se-show                                           ::  show buffer, raw
+    |=  lin=(pair ,@ud (list ,@c))
+    ^+  +>
+    ?:  =(mir lin)  +>
+    =.  +>  ?:(=(q.mir q.lin) +> (se-blit %pro q.lin))
+    =.  +>  ?:(=(p.mir p.lin) +> (se-blit %hop p.lin))
+    +>(mir lin)
+  ::
+  ++  se-just                                           ::  adjusted buffer 
+    |=  lin=(pair ,@ud (list ,@c))
+    ^+  +>
+    =.  off  ?:((lth p.lin edg) 0 (sub p.lin edg))
+    (se-show (sub p.lin off) (scag edg (slag off q.lin)))
+  ::
+  ++  se-view                                           ::  flush buffer
+    ?:  liv.maz
+      (se-just ~(ta-vew ta [& & ~zod %$] tar.maz))
+    ?~  apt  
+      se-view(liv.maz &)
+    %-  se-just
+    ~(ta-vew ta [& | i.apt] (~(got by feg) i.apt))
+  ::
+  ++  se-kill                                           ::  kill a source
+    =+  tup=apt
+    |-  ^+  +>
+    ?~  tup  +>(apt ~)
+    $(tup +.tup, +> (se-nuke i.tup))
+  ::
+  ++  se-emit                                           ::  emit move
+    |=  mov=move
+    %_(+> moz [mov moz])
+  ::
+  ++  se-send                                           ::  send a message
+    |=  [gyl=gill nog=note-gall]
+    (se-emit ost %pass [(scot %p her) (scot %p p.gyl) q.gyl ~] %g nog)
+  ::
+  ++  se-tame
+    |=  gyl=gill
+    ^+  ta
+    ~(. ta [& %| gyl] (~(got by feg) gyl))
+  ::
+  ++  se-pour                                           ::  receive results
+    |=  [gyl=gill sil=sign-gall]
+    ^+  +>
+    ?-    -.sil
+        %mean  
+      +>.$
+    ::  
+        %nice  
+      +>.$
+    ::
+        %rush
+      ta-abet:ta-rap:(ta-fec:(se-tame gyl) +>.sil)
+    ==
+  ::
+  ++  ta                                                ::  per target
+    |_  $:  $:  liv=?                                   ::  don't delete
+                mav=?                                   ::  showing master
+                gyl=gill                                ::  target app
+            ==                                          ::
+            target                                      ::  target state
+        ==                                              ::
+    ++  ta-abet                                         ::  resolve
+      ^+  ..ta
+      =.  liv.maz  mav
+      ?:  mav
+        ?.  liv
+          (se-blit `dill-blit`[%qit ~])
+        +>(tar.maz +<+)
+      ?.  liv  
+        =.  ..ta  (se-nuke gyl) 
+        ..ta(liv.maz =(~ apt))
+      %_(+> feg (~(put by feg) gyl +<+))
+    ::
+    ++  ta-ant                                          ::  toggle master
+      ^+  .
+      ?:  mav
+        ?~  apt  ta-bel
+        %_  .
+          mav      |
+          +<+      (~(got by feg) gyl)
+          tar.maz  +<+
+        ==
+      %_  .
+        mav  &
+        +<+  tar.maz
+        feg  (~(put by feg) gyl +<+) 
+      ==
+    ::
+    ++  ta-act                                          ::  send action
+      |=  act=sole-action
+      ^+  +>
+      ?:  mav  
+        +>.$
+      %_    +> 
+          +> 
+        (se-send gyl %mess [p.gyl ~[q.gyl]] her %sole-action !>(act))
+      ==
+    ::
+    ++  ta-aro                                          ::  hear arrow
+      |=  key=?(%d %l %r %u)
+      ^+  +>
+      ?-  key
+        %d  =.  ris  ~
+            ?.  =(num.hit pos.hit) 
+              (ta-mov +(pos.hit))
+            ?:  =(0 (lent buf.say.inp))
+              ta-bel
+            (ta-hom:ta-nex %set ~)
+        %l  ?^  ris  ta-bel
+            ?:  =(0 pos.inp)  ta-bel 
+            +>(pos.inp (dec pos.inp))
+        %r  ?^  ris  ta-bel
+            ?:  =((lent buf.say.inp) pos.inp) 
+              ta-bel
+            +>(pos.inp +(pos.inp))
+        %u  =.  ris  ~
+            ?:(=(0 pos.hit) ta-bel (ta-mov (dec pos.hit)))
+      ==
+    ::
+    ++  ta-bel  .(+> (se-blit %bel ~))                  ::  beep
+    ++  ta-cat                                          ::  mass insert
+      |=  [pos=@ud txt=(list ,@c)]
+      ^-  sole-edit
+      :-  %mor
+      |-  ^-  (list sole-edit)
+      ?~  txt  ~
+      [[%ins pos i.txt] $(pos +(pos), txt t.txt)]
+    ::
+    ++  ta-cut                                          ::  mass delete
+      |=  [pos=@ud num=@ud]
+      ^-  sole-edit
+      :-  %mor
+      |-(?:(=(0 num) ~ [[%del pos] $(num (dec num))]))
+    ::
+    ++  ta-det                                          ::  send edit
+      |=  ted=sole-edit
+      ^+  +>
+      (ta-act %det [[his.ven.say.inp own.ven.say.inp] (sham buf.say.inp) ted])
+    ::
+    ++  ta-bac                                          ::  hear backspace
+      ^+  .
+      ?^  ris
+        ?:  =(~ str.u.ris)
+          ta-bel
+        .(str.u.ris (scag (dec (lent str.u.ris)) str.u.ris))
+      ?:  =(0 pos.inp)
+        .(+> (se-blit %bel ~))
+      =+  pre=(dec pos.inp)
+      (ta-hom(pos.inp pre) %del pre)
+    ::
+    ++  ta-ctl                                          ::  hear control
+      |=  key=@c
+      ^+  +>
+      ?+    key  ta-bel
+          %a  +>(pos.inp 0)
+          %b  (ta-aro %l)
+          %c  ta-bel(ris ~)
+          %d  ?:  &(=(0 pos.inp) =(0 (lent buf.say.inp)))
+                +>(liv |)
+              ta-del
+          %e  +>(pos.inp (lent buf.say.inp))
+          %f  (ta-aro %r)
+          %g  ta-bel(ris ~)
+          %k  =+  len=(lent buf.say.inp)
+              ?:  =(pos.inp len)
+                ta-bel 
+              %-  ta-hom(kil `(slag pos.inp buf.say.inp))
+              (ta-cut pos.inp (sub len pos.inp))
+          %l  +>(+> (se-blit %clr ~))
+          %n  (ta-aro %d)
+          %p  (ta-aro %u)
+          %r  ?~  ris 
+                +>(ris `[pos.hit ~]) 
+              ?:  =(0 pos.u.ris)
+                ta-bel
+              (ta-ser ~)
+          %t  =+  len=(lent buf.say.inp)
+              ?:  |(=(0 pos.inp) (lth len 2))
+                ta-bel
+              =+  sop=?:(=(len pos.inp) (dec pos.inp) pos.inp) 
+              =.  pos.inp  +(sop)
+              %-  ta-hom
+              :~  %mor
+                  [%del sop]
+                  [%ins (dec sop) (snag sop buf.say.inp)]
+              ==
+          %u  ?:  =(0 pos.inp)
+                ta-bel
+              %-  ta-hom(pos.inp 0, kil `(scag pos.inp buf.say.inp))
+              (ta-cut 0 pos.inp)
+          %v  ta-ant
+          %x  ?:  =(~ apt)  ta-bel
+              ?:  mav  ta-bel
+              +>(apt (welp (slag 1 apt) [(snag 0 apt) ~]))
+          %y  ?~  kil  ta-bel 
+              %-  ta-hom(pos.inp (add pos.inp (lent u.kil)))
+              (ta-cat pos.inp u.kil)
+      ==
+    ::
+    ++  ta-cru                                          ::  hear crud
+      |=  [lab=@tas tac=(list tank)]
+      =.  +>+>  (se-blit %out (tuba (trip lab)))
+      (ta-tan tac)
+    ::
+    ++  ta-del                                          ::  hear delete
+      ^+  .
+      ?:  =((lent buf.say.inp) pos.inp)
+        .(+> (se-blit %bel ~))
+      (ta-hom %del pos.inp)
+    ::
+    ++  ta-erl                                          ::  hear local error
+      |=  pos=@ud 
+      ta-bel(pos.inp (min pos (lent buf.say.inp)))
+    ::
+    ++  ta-err                                          ::  hear remote error
+      |=  pos=@ud 
+      (ta-erl (~(transpose cs say.inp) pos))
+    ::
+    ++  ta-fec                                          ::  apply effect
+      |=  fec=sole-effect
+      ^+  +>
+      ?-    -.fec
+        %bel  ta-bel
+        %blk  +>
+        %clr  +>(+> (se-blit fec))
+        %det  (ta-got +.fec)
+        %err  (ta-err +.fec)
+        %mor  |-  ^+  +>.^$
+              ?~  p.fec  +>.^$
+              $(p.fec t.p.fec, +>.^$ ^$(fec i.p.fec))
+        %nex  ta-nex
+        %pro  (ta-pro +.fec)
+        %tan  (ta-tan p.fec)
+        %sag  +>(+> (se-blit fec))
+        %sav  +>(+> (se-blit fec))
+        %txt  $(fec [%tan [%leaf p.fec]~])
+      ==
+    ::
+    ++  ta-rap                                          ::  send %took
+      .(+> (se-send gyl %took [p.gyl ~[q.gyl]] her))
+    ::
+    ++  ta-dog                                          ::  change cursor
+      |=  ted=sole-edit
+      %_    +>
+          pos.inp
+        =+  len=(lent buf.say.inp)
+        %+  min  len
+        |-  ^-  @ud
+        ?-  -.ted
+          %del  ?:((gth pos.inp p.ted) (dec pos.inp) pos.inp)
+          %ins  ?:((lte pos.inp p.ted) +(pos.inp) pos.inp)
+          %mor  |-  ^-  @ud
+                ?~  p.ted  pos.inp
+                $(p.ted t.p.ted, pos.inp ^$(ted i.p.ted))
+          %nop  pos.inp
+          %set  len
+        ==
+      ==
+    ::
+    ++  ta-got                                          ::  apply change
+      |=  cal=sole-change
+      =^  ted  say.inp  (~(receive cs say.inp) cal)
+      (ta-dog ted)
+    ::
+    ++  ta-hom                                          ::  local edit
+      |=  ted=sole-edit
+      ^+  +>
+      =.  +>  (ta-det ted)
+      =.  +>  (ta-dog(say.inp (~(commit cs say.inp) ted)) ted)
+      +>
+    ::
+    ++  ta-met                                          ::  meta key
+      |=  key=@c
+      ~&  [%ta-met key]
+      +>
+    ::
+    ++  ta-mov                                          ::  move in history
+      |=  sop=@ud
+      ^+  +>
+      ?:  =(sop pos.hit)  +>
+      %+  %=  ta-hom
+            pos.hit  sop
+            lay.hit  %+  ~(put by lay.hit)  
+                       pos.hit 
+                     buf.say.inp
+          ==
+        %set
+      %-  (bond |.((snag (sub num.hit +(sop)) old.hit)))
+      (~(get by lay.hit) sop)
+    ::
+    ++  ta-nex                                          ::  advance history
+      %_  .
+        num.hit  +(num.hit)
+        pos.hit  +(num.hit)
+        ris  ~
+        lay.hit  ~
+        old.hit  [buf.say.inp old.hit]
+      ==
+    ::
+    ++  ta-pro                                          ::  set prompt
+      |=  pom=sole-prompt
+      +>(pom pom(cad :(welp (scow %p p.gyl) ":" (trip q.gyl) cad.pom)))
+    ::
+    ++  ta-ret                                          ::  hear return
+      ?.  mav
+        (ta-act %ret ~)
+      =+  txt=(tufa buf.say.inp)
+      =+  fey=(rose txt sp-ukase:sp)
+      ?-  -.fey
+        %|  (ta-erl (lent (tuba (scag p.fey txt))))
+        %&  ?~  p.fey 
+              (ta-erl (lent buf.say.inp))
+            =.  +>+>  (se-like u.p.fey)
+            =.  pom  pom.tar.maz
+            (ta-hom:ta-nex %set ~)
+      ==
+    ::
+    ++  ta-ser                                          ::  reverse search
+      |=  ext=(list ,@c)
+      ^+  +>
+      ?:  |(?=(~ ris) =(0 pos.u.ris))  ta-bel
+      =+  tot=(weld str.u.ris ext)
+      =+  dol=(slag (sub num.hit pos.u.ris) old.hit)
+      =+  sop=pos.u.ris
+      =+  ^=  ser
+          =+  ^=  beg
+              |=  [a=(list ,@c) b=(list ,@c)]  ^-  ?
+              ?~(a & ?~(b | &(=(i.a i.b) $(a t.a, b t.b))))
+          |=  [a=(list ,@c) b=(list ,@c)]  ^-  ?
+          ?~(a & ?~(b | |((beg a b) $(b t.b))))
+      =+  ^=  sup  
+          |-  ^-  (unit ,@ud)
+          ?~  dol  ~
+          ?:  (ser tot i.dol)
+            `sop
+          $(sop (dec sop), dol t.dol)
+      ?~  sup  ta-bel
+      (ta-mov(str.u.ris tot, pos.u.ris (dec u.sup)) (dec u.sup))
+    ::
+    ++  ta-tan                                          ::  print tanks
+      |=  tac=(list tank)
+      =+  wol=`wall`(zing (turn tac |=(a=tank (~(win re a) [0 edg]))))
+      |-  ^+  +>.^$
+      ?~  wol  +>.^$
+      $(wol t.wol, +>+>.^$ (se-blit %out (tuba i.wol)))
+    ::
+    ++  ta-txt                                          ::  hear text
+      |=  txt=(list ,@c)
+      ^+  +>
+      ?^  ris
+        (ta-ser txt)
+      %-  ta-hom(pos.inp (add (lent txt) pos.inp))
+      :-  %mor
+      |-  ^-  (list sole-edit)
+      ?~  txt  ~
+      [[%ins pos.inp i.txt] $(pos.inp +(pos.inp), txt t.txt)]
+    ::
+    ++  ta-vew                                          ::  computed prompt
+      |-  ^-  (pair ,@ud (list ,@c))
+      ?^  ris
+        %=    $
+            ris  ~
+            cad.pom 
+          :(welp "(reverse-i-search)'" (tufa str.u.ris) "': ")
+        ==
+      =-  [(add pos.inp (lent p.vew)) (weld (tuba p.vew) q.vew)]
+      ^=  vew  ^-  (pair tape (list ,@c))
+      ?:  vis.pom  [cad.pom buf.say.inp]
+      :-  ;:  welp
+            cad.pom
+            ?~  buf.say.inp  ~
+            ;:  welp
+              "<"
+              (scow %p (end 4 1 (sham buf.say.inp)))
+              "> "
+            ==
+          ==
+      =+  len=(lent buf.say.inp) 
+      |-  ^-  (list ,@c) 
+      ?:(=(0 len) ~ [`@c`'*' $(len (dec len))])
+    --
+  --
+++  peer
+  |=  [ost=bone her=ship pax=path]
+  ^-  [(list move) _+>]
+  ::  ~&  [%sole-peer ost her pax]
+  ?<  (~(has by bin) ost)
+  :-  [ost %give %rush %dill-blit %pro [`@c`0x23 `@c`0x20 ~]]~
+  %=    +>
+      bin
+    %+  ~(put by bin)  ost
+    ^-  source
+    :*  80
+        0
+        ~
+        ~
+        :*  %&
+            *(unit search)
+            *history
+            `sole-prompt`[%& %sole "{(scow %p our.hid)}# "]
+            *sole-command
+        ==
+        ~
+        [0 ~]
+    ==
+  ==
+::
+++  poke-dill-belt
+  |=  [ost=bone her=ship bet=dill-belt]
+  ^-  [(list move) _+>]
+  ::  ~&  [%sole-poke ost her bet]
+  =+  yog=(~(get by bin) ost)
+  ?~  yog
+    ~&  [%sole-poke-stale ost]
+    [~ +>.$]
+  =<  se-abet
+  =<  se-view
+  (~(se-belt se [[ost %give %nice ~]~ ~] [her ost] u.yog) bet)
+::
+++  pour
+  |=  [ost=bone pax=path sih=*]
+  ^-  [(list move) _+>]
+  =+  yog=(~(get by bin) ost)
+  ?~  yog
+    ~&  [%sole-pour-stale ost pax]
+    [~ +>.$] 
+  =+  sih=((hard sign) sih)
+  ?>  ?=([@ @ @ ~] pax)
+  =<  se-abet
+  =<  se-view
+  =+  gyl=[(slav %p i.t.pax) i.t.t.pax]
+  (~(se-pour se [~ ~] [(slav %p i.pax) ost] u.yog) gyl +.sih)
+::
+++  pull
+  |=  ost=bone
+  ^-  [(list move) _+>]
+  ::  ~&  [%sole-pull ost]
+  =^  moz  +>  
+    =<  se-abet
+    =<  se-view
+    ~(se-kill se [~ ~] [our.hid ost] (~(got by bin) ost))
+  [moz +>.$(bin (~(del by bin) ost))]
+--
diff --git a/main/app/talk/core.hook b/main/app/talk/core.hook
index 327fd3d1be..acddcae92c 100644
--- a/main/app/talk/core.hook
+++ b/main/app/talk/core.hook
@@ -2,157 +2,150 @@
 ::::  /hook/core/talk/app
   ::
 /?  314
-/-  *rodeo
-/+  rodeo
+/-  *talk, *twitter, *sole
+/+  talk, sole
 ::
 ::::
   ::
 !:
-=>  |%                                                  ::  structures
-    ++  town                                            ::  all client state
-      $:  live=(unit span)                              ::  present story
-          console=terminal                              ::  controlling terminal
-          stories=(map span story)                      ::  all stories
+=>  |%                                                  ::  data structures
+    ++  house  ,[%1 house-1]                            ::  full state
+    ++  house-any                                       ::  app history
+      $%  [%1 house-1]                                  ::  1: talk
+          [%0 house-0]                                  ::  0: initial version
       ==                                                ::
-    ++  grip                                            ::  subscription state
-      |*  nub=$+(* *)                                   ::  wrapped state
-      $|  $?  %warm                                     ::  activated
-              %cool                                     ::  activating
-              %dead                                     ::  inoperative
-              %cold                                     ::  inactive
-          ==  [%live p=nub]                             ::  operating
-    ++  terminal                                        ::  terminal state
-      $:  present=presence                              ::  presence state
+    ++  house-1                                         ::
+      $:  stories=(map span story)                      ::  conversations
+          general=(set bone)                            ::  meta-subscribe
+          outbox=(pair ,@ud (map ,@ud thought))         ::  urbit outbox
+          folks=(map ship human)                        ::  human identities
+          shells=(map bone shell)                       ::  interaction state
       ==                                                ::
-    ++  story                                           ::  station content
-      $:  poe=posture                                   ::  security posture
-          desc=@t                                       ::  description
-          link=(grip bridge)                            ::  connection
-          count=@ud                                     ::  message counter
-          mike=(pair ,? (set partner))                  ::  passive/voice
-          quiet=?                                       ::  !verbose
-          past=(list partner)                           ::  past received auds
+    ++  house-0                                         ::  legacy state
+      %+  map  path                                     ::
+      ,[p=(list zong) q=(map ship ,?)]                  ::
+    ::                                                  ::
+    ++  zong                                            ::  legacy messages
+      $%  $:  %mess  p=@da  q=ship                      ::
+            $=  r                                       ::
+              $%  [%do p=@t]                            ::
+                  [%exp p=@t q=tank]                    ::
+                  [%say p=@t]                           ::
+      ==  ==  ==                                        ::
+    ++  story                                           ::  wire content
+      $:  count=@ud                                     ::  (lent grams)
+          grams=(list telegram)                         ::  all history
+          locals=(map ship (pair ,@da status))          ::  local presence
+          remotes=(map partner atlas)                   ::  remote presence
+          mirrors=(map station config)                  ::  remote config
+          sequence=(map partner ,@ud)                   ::  partners heard
+          shape=config                                  ::  configuration
+          known=(map serial ,@ud)                       ::  messages heard
+          guests=(map bone river)                       ::  message followers
+          viewers=(set bone)                            ::  presence followers
+          owners=(set bone)                             ::  config followers
       ==                                                ::
-    ++  bridge                                          ::  remote state
-      $:  xm=config                                     ::  configuration
-          am=register                                   ::  presence
+    ++  shell                                           ::  console session
+      $:  her=ship                                      ::  client identity
+          man=span                                      ::  mailbox
+          count=@ud                                     ::  messages shown
+          say=sole-share                                ::  console state
+          active=(unit (set partner))                   ::  active targets
+          passive=(set partner)                         ::  passive targets
+          guests=register                               ::  presence mirror
+          harbor=(map span (pair posture cord))         ::  stations mirror
+          system=cabal                                  ::  config mirror
       ==                                                ::
-    ++  work                                            ::  general action
-      $%  [%ask (unit work)]                            ::  help (about)
-          [%exp twig]                                   ::  compute
-          [%mor (list work)]                            ::  sequence
-          [%rub work-adjust]                            ::  configure story
-          [%say speech]                                 ::  publish in voice
-          [%who (unit partner)]                         ::  show presence
-          [%wry work-construct]                         ::  configure system
+    ++  river  (pair point point)                       ::  stream definition
+    ++  point                                           ::  stream endpoint
+      $%  [%ud p=@ud]                                   ::  by number
+          [%da p=@da]                                   ::  by date
       ==                                                ::
-    ++  work-adjust                                     ::  adjust story
-      $%  [%dark p=(set ship)]                          ::  toggle blacklist
-          [%lite p=(set ship)]                          ::  toggle whitelist
-          [%love p=(set partner)]                       ::  toggle partners
-          [%whom p=? q=(set partner)]                   ::  active/voice
-          [%wind p=@dr]                                 ::  rewind by date
+    ++  gift                                            ::  result
+      $%  [%rush salt]                                  ::  refresh
+          [%mean ares]                                  ::  cancel
+          [%nice ~]                                     ::  accept
       ==                                                ::
-    ++  work-construct                                  ::  configure system
-      $%  [%make p=span]                                ::  create story
-          [%raze p=span]                                ::  destroy story
-          [%tune p=span]                                ::  switch to story
-      ==                                                ::
-    ++  iron                                            ::  terminal output
-      $%  [%prompt p=cord q=prom r=cord]                ::  prompt
-          [%tang p=(list tank)]                         ::  prettyprintable
-          [%txt p=cord]                                 ::  simple text
-      ==
-    ++  gift
-      $%  [%mean ares]
-          [%nice ~]
-          [%rush iron]
-      ==
-    ++  hapt  ,[p=ship q=path]
-    ++  move  ,[p=bone q=(mold note gift)]
-    ++  note
-      $?  $:  %g
-      $%  [%mess p=hapt q=ship r=cage]
-          [%nuke p=hapt q=ship]
-          [%show p=hapt q=ship r=path]
-          [%took p=hapt q=ship]
-          ==  ==
-          $:  %t
-      $%  [%wait p=@da]
-      ==  ==  ==
-    ++  gall-sign                                       ::  subscription result
-      $%  [%mean p=ares]
-          [%nice ~]
-          $:  %rush
-              $=  p
-              $%  [%txt p=cord]                         ::  input text
-                  [%type p=?]                           ::  typing notify
-                  [%rodeo-report p=report]
-          ==  ==
-      ==
-    ++  sign
-      $?  [%g gall-sign]                                ::  from %gall
-          $:  %t                                        ::  from %time
+    ++  sign                                            ::  response
+      $%  $:  %e                                        ::  from %eyre
+      $%  [%thou p=httr]                                ::  HTTP response
+          ==  ==                                        ::
+          $:  %g                                        ::  application
+      $%  [%mean p=ares]                                ::  cancel
+          [%nice ~]                                     ::  acknowledge
+          [%rush p=silt]                                ::  subs data
+          ==  ==                                        ::
+          $:  %t                                        ::
       $%  [%wake ~]                                     ::  timer wakeup
-      ==  ==  ==
+      ==  ==  ==                                        ::
+    ++  salt                                            ::  output rush
+      $%  [%talk-report p=report]                       ::
+          [%sole-effect p=sole-effect]                  ::
+      ==                                                ::
+    ++  silt                                            ::  input rush
+      $%  [%talk-report p=report]                       ::  refresh
+          [%twit-stat p=twit-stat]                      ::  tweet receipt
+          [%twit-feed p=(list twit-stat)]               ::  tweet receipt
+      ==                                                ::
+    ++  move  ,[p=bone q=(mold note gift)]              ::  all actions
+    ++  hapt  ,[p=ship q=path]                          ::  app instance
+    ++  note                                            ::  requests
+      $%  $:  %c                                        ::
+      $%  [%info p=@p q=@tas r=nori]                    ::
+          ==  ==                                        ::
+          $:  %g                                        ::  network
+      $%  [%mess p=hapt q=ship r=cage]                  ::  message
+          [%nuke p=hapt q=ship]                         ::  cancel
+          [%show p=hapt q=ship r=path]                  ::  subscribe
+          [%took p=hapt q=ship]                         ::  acknowledge
+          ==  ==                                        ::
+          $:  %t                                        ::
+      $%  [%wait p=@da]                                 ::
+      ==  ==  ==                                        ::
+    ::                                                  ::
+    ++  work                                            ::  interface action
+      $%  [%number p=? q=@ud]                           ::  activate by number
+          [%join p=(set partner)]                     ::  
+          [%say p=speech]                               ::
+          [%invite p=span q=(list partner)]             ::
+          [%banish p=span q=(list partner)]             ::
+          [%target p=(set partner)]                     ::  set active targets
+          ::  [%destroy p=span]                         ::
+          [%create p=posture q=span r=cord]             ::
+          [%probe p=station]                            ::
+      ==                                                ::
+    ::                                                  ::
+    ++  sigh                                            ::  assemble label
+      |=  [len=@ud pre=tape yiz=cord]
+      ^-  tape
+      =+  nez=(trip yiz)
+      =+  lez=(lent nez)
+      ?>  (gth len (lent pre))
+      =.  len  (sub len (lent pre))
+      ?.  (gth lez len)  
+        =.  nez  (welp pre nez)
+        ?.  (lth lez len)  nez
+        (runt [(sub len lez) '-'] nez)
+      :(welp pre (scag (dec len) nez) "+")  
     --
-!:
-::::
-  ::
-=>  |%                                                  ::  tools
-    ++  hy                                              ::  messenger
-      |_  [moz=(list move) hide]
-      ++  hy-abet  moz                                  ::  resolve core
-      ++  hy-transmit                                   ::  send command
-        |=  cod=command 
-        %_    +>
-            moz  :_  moz
-          [0 %pass /command %g %mess [our /rodeo] our [%rodeo-command !>(cod)]]
+|_  [hid=hide house]
+++  ra                                                  ::  transaction core
+  |_  [ost=bone moves=(list move)]
+  ++  sh                                                ::  console interface
+    |_  $:  coz=(list command)                          ::  talk actions
+            she=shell
         ==
-      ::
-      ++  hy-render                                     ::  return to console
-        |=  rod=iron
-        %_    +>
-            moz
-          =+  oss=(~(tap in (~(get ju pus) /out)))
-          |-  ^-  (list move)
-          ?~  oss  moz
-          [`move`[i.oss %give %rush rod] $(oss t.oss)]
-        ==
-      ::
-      ++  hy-subscribe                                  ::  send %show
-        |=  [way=path hoc=path]
-        %_(+> moz :_(moz [0 %pass way %g %show [our /rodeo] our hoc]))
-      ::
-      ++  hy-unsubscribe                                ::  send %nuke
-        |=  way=path
-        %_(+> moz :_(moz [0 %pass way %g %nuke [our /rodeo] our]))
-      ::
-      ++  hy-display                                    ::  print to console
-        |=(tay=(list tank) (hy-render %tang tay))
-      ::
-      ++  hy-print                                      ::  simple print
-        |=(tep=tape (hy-display [%leaf tep]~))
-      ::
-      ++  hy-accept                                     ::  set prompt
-        |=(asq=cord (hy-render [%prompt asq %text '']))
-      --
-    ::
-    ++  parse                                           ::  command parser
-      |=  our=ship
+    ++  sh-purl  (ifix [gay gay] auri:urlp)             ::  url with spaces
+    ++  sh-scad                                         ::  command parser
       =+  vag=(vang | [&1:% &2:% '0' |3:%])
+      =<  work
       |%  
-      ++  come                                          ::  keyword command
-        |*  [a=@tas b=_rule] 
-        ;~((glue (plus ace)) (cold a (jest a)) b)
-      ::
-      ++  gone                                          ::  parse unit
-        |*  a=_rule
-        ;~(pose (stag ~ a) (easy ~))
-      ::
-      ++  posh                                          ::  parse each
-        |*  [a=_rule b=_rule]
-        ;~(pose (stag %& a) (stag %| b))
+      ++  dare                                          ::  @dr
+        %+  sear
+          |=  a=coin
+          ?.  ?=([%$ %dr @] a)  ~
+          (some `@dr`+>.a)
+        nuck:so
       ::
       ++  ship  ;~(pfix sig fed:ag)                     ::  ship
       ++  shiz                                          ::  ship set
@@ -160,513 +153,1735 @@
           |=(a=(list ^ship) (~(gas in *(set ^ship)) a))
         (most ;~(plug com (star ace)) ship)
       ::
-      ++  stat                                          ::  partner
-        %+  posh
-          ;~  plug
-            ship
-            ;~(pose ;~(pfix fas urs:ab) (easy (main our)))
+      ++  pasp                                          ::  passport
+        ;~  pfix  pat
+          ;~  pose
+            (stag %twitter ;~(pfix ;~(plug (jest 't') col) urs:ab))
           ==
-        ;~  pose
-          ;~(pfix pat (stag %twitter urs:ab))
         ==
       ::
-      ++  staz                                          ::  partner set
-        %+  cook
-          |=(a=(list partner) (~(gas in *(set partner)) a))
-        (most ;~(plug com (star ace)) stat)
-      ::
-      ++  step                                          ::  rollback interval
-        %+  sear
-          |=  a=coin
-          ?.  ?=([%$ %dr @] a)  ~
-          (some `@dr`+>.a)
-        nuck:so
-      ::
-      ++  text  (boss 256 (star prn))                   ::  utf8 text
-      ++  tome
-        %+  stag  %lin
+      ++  stan                                          ::  station
         ;~  pose
-          (stag %| ;~(pfix pat text))
-          (stag %& text)
-        ==
-      ::
-      ++  work                                          ::  all commands
-        %+  knee  *^work  |.  ~+
-        ;~  pose
-          ;~  pfix  zap
-            %+  stag  %wry
-            ;~  pose 
-              (come %make urs:ab)
-              (come %raze urs:ab)
-              (come %tune urs:ab)
-            ==
-          ==
-        ::
-          ;~  pfix  cen
-            %+  stag  %rub
-            ;~  pose
-              (come %dark shiz)
-              (come %lite shiz)
-              (come %whom (stag %& staz))
-              (come %wind step)
-            ==
-          ==
-        ::
-          ;~(pfix wut (stag %ask (gone work)))
-          ;~(pfix tis (stag %who (gone stat)))
-          ;~(pfix cen (stag %exp wide:vag))
+          (cold [our.hid man.she] tis)
+          ;~(pfix cen (cook |=(a=term [our.hid a]) sym))
+          ;~(pfix fas (cook |=(a=term [(sein our.hid) a]) sym))
         ::
           %+  cook
-            |=  [a=(set partner) b=(unit ,[%lin p=? q=@t])]
-            ^-  ^work
-            =.  b  ?~(b ~ ?:(=(0 q.u.b) ~ b))
-            =+  c=[%rub %whom %& a]
-            ?~(b c [%mor c [%say u.b] ~])
+            |=  [a=@p b=(unit term)]
+            [a ?^(b u.b (main a))]
           ;~  plug
-            staz
-            (gone ;~(pfix (star ace) tome))
+            ship
+            ;~(pose (stag ~ ;~(pfix fas urs:ab)) (easy ~))
+          ==
+        ==
+      ::
+      ++  parn                                          ::  partner
+        ;~  pose
+          (stag %& stan)
+          (stag %| pasp)
+        ==
+      ++  parq                                          ::  non-empty partners
+        %+  cook
+          |=(a=(list partner) (~(gas in *(set partner)) a))
+        (most ;~(plug com (star ace)) parn)
+      ::
+      ++  parz                                          ::  partner set
+        %+  cook
+          |=(a=(list partner) (~(gas in *(set partner)) a))
+        (more ;~(plug com (star ace)) parn)
+      ::
+      ++  nump                                          ::  number reference
+        ;~  pose
+          (stag %& dem:ag)
+          (stag %| ;~(pfix (just '0') dem:ag))
+        ==
+      ::
+      ++  pore                                          ::  posture
+        ;~  pose
+          (cold %black (jest %channel))
+          (cold %white (jest %village))
+          (cold %green (jest %journal))
+          (cold %brown (jest %mailbox))
+        ==
+      ::
+      ++  work
+        %+  knee  *^work  |.  ~+
+        ;~  pose
+          %+  stag  %create
+          ;~  pfix  (jest %create)
+            ;~  plug
+              ;~(pfix ace pore)
+              ;~(pfix ;~(plug ace cen) sym)
+              ;~(pfix ace qut)
+            ==
           ==
         ::
-          (stag %say tome)
+          %+  stag  %join
+          ;~(pfix (jest %join) ;~(pfix ace parq))
+        ::
+          (stag %number nump)
+          (stag %target parz)
+        ==
+      --
+    ++  sh-abet
+      ^+  +>
+      =+  zoc=(flop coz)
+      |-  ^+  +>+>
+      ?~  zoc  +>+>.$(shells (~(put by shells) ost she))
+      $(zoc t.zoc, +>.$ (sh-deal i.zoc))
+    ::
+    ++  sh-deal                                         ::  apply from shell
+      |=  cod=command
+      ^+  +>
+      ?-    -.cod
+          %design
+        ?~  q.cod
+          =.  +>+>.$  (ra-config p.cod *config)
+          +>.$(stories (~(del by stories) p.cod))
+        +>(+> (ra-config p.cod u.q.cod))
+      ::
+          %review   +>(+> (ra-think | her.she +.cod))
+          %publish  +>(+> (ra-think & her.she +.cod))
+      ==
+    ::
+    ++  sh-fact                                         ::  send console effect
+      |=  fec=sole-effect
+      ^+  +>
+      +>(moves :_(moves [ost %give %rush %sole-effect fec]))
+    ::
+    ++  sh-peep                                         ::  peer to path
+      |=  pax=path
+      ^+  +>
+      +>(+> (~(ra-subscribe ra ost ~) her.she pax))
+    ::
+    ++  sh-peer                                         ::  subscribe shell
+      =<  sh-prod
+      %_    .
+          +>
+        %-  ra-subscribe:(~(ra-subscribe ra ost ~) her.she ~)
+        [her.she [%afx man.she ~]]
+      ==
+    ::
+    ++  sh-prod                                         ::  show prompt
+      ^+  .
+      %+  sh-fact  %pro
+      :+  &  %talk-line
+      ^-  tape
+      =+  ^=  rew  ^-  (pair (pair ,@t ,@t) (set partner))
+          ?~  active.she
+            [['(' ')'] passive.she]
+          [['[' ']'] u.active.she]
+      =+  por=~(te-prom te man.she q.rew)
+      (weld `tape`[p.p.rew por] `tape`[q.p.rew ' ' ~])
+    ::
+    ++  sh-pact                                         ::  update active aud
+      |=  lix=(set partner)
+      ^+  +>
+      =+  act=?~(lix ~ `(sh-pare lix))
+      ?:  =(active.she act)  +>.$
+      sh-prod(active.she act)
+    ::
+    ++  sh-pare                                         ::  adjust target list
+      |=  paz=(set partner)
+      ?:  (sh-pear paz)  paz
+      (~(put in paz) [%& our.hid man.she])
+    ::
+    ++  sh-pear                                         ::  hearback
+      |=  paz=(set partner)
+      ?~  paz  |
+      ?|  $(paz l.paz) 
+          $(paz r.paz)
+          (~(has in sources.shape:(~(got by stories) man.she)) `partner`n.paz)
+      ==
+    ::
+    ++  sh-pass                                         ::  passive from aud
+      |=  aud=audience
+      %-  sh-poss
+      %-  ~(gas in *(set partner))
+      (turn (~(tap by aud)) |=([a=partner *] a))
+    ::
+    ::
+    ++  sh-poss                                         ::  passive update
+      |=  lix=(set partner)
+      =+  sap=(sh-pare lix)
+      ?:  =(sap passive.she)
+        +>.$
+      sh-prod(passive.she sap)
+    ::
+    ++  sh-pest                                         ::  report listen
+      |=  tay=partner
+      ^+  +>
+      ?.  ?=(%& -.tay)  +>
+      =+  sib=(~(get by ham.system.she) `station`p.tay)
+      ?.  |(?=(~ sib) !?=(%white p.cordon.u.sib))
+        +>.$
+      (sh-poss [tay ~ ~])
+    ::
+    ++  sh-rend                                         ::  print on one line
+      |=  gam=telegram
+      (sh-pass:(sh-fact %txt ~(tr-line tr man.she gam)) q.q.gam) 
+    ::
+    ++  sh-numb                                         ::  print msg number
+      |=  num=@ud
+      ^+  +>
+      =+  bun=(scow %ud num)
+      ::  =+  pad=(sub 36 (lent bun))
+      ::  =+  now=`@da`(dis lat.hid 0xffff.ffff.ffff.ffff.0000.0000.0000.0000)
+      %+  sh-fact  %txt
+      (runt [(sub 15 (lent bun)) '-'] "[{bun}]")
+    ::
+    ++  sh-repo-house-diff
+      |=  [one=shelf two=shelf]
+      =|  $=  ret
+          $:  old=(list (pair span (pair posture cord)))
+              new=(list (pair span (pair posture cord)))
+              cha=(list (pair span (pair posture cord)))
+          ==
+      ^+  ret
+      =.  ret
+        =+  eno=(~(tap by one))
+        |-  ^+  ret
+        ?~  eno  ret
+        =.  ret  $(eno t.eno)
+        =+  unt=(~(get by two) p.i.eno)
+        ?~  unt
+          ret(old [i.eno old.ret])
+        ?:  =(q.i.eno u.unt)  ret 
+        ret(cha [[p.i.eno u.unt] cha.ret])
+      =.  ret
+        =+  owt=(~(tap by two))
+        |-  ^+  ret
+        ?~  owt  ret
+        =.  ret  $(owt t.owt)
+        ?:  (~(has by one) p.i.owt)
+          ret
+        ret(new [i.owt new.ret])
+      ret 
+    ::
+    ++  sh-repo-atlas-diff
+      |=  [one=atlas two=atlas]
+      =|  $=  ret
+          $:  old=(list (pair ship status))
+              new=(list (pair ship status))
+              cha=(list (pair ship status))
+          ==
+      ^+  ret
+      =.  ret
+        =+  eno=(~(tap by one))
+        |-  ^+  ret
+        ?~  eno  ret
+        =.  ret  $(eno t.eno)
+        =+  unt=(~(get by two) p.i.eno)
+        ?~  unt
+          ret(old [i.eno old.ret])
+        ?:  =(q.i.eno u.unt)  ret 
+        ret(cha [[p.i.eno u.unt] cha.ret])
+      =.  ret
+        =+  owt=(~(tap by two))
+        |-  ^+  ret
+        ?~  owt  ret
+        =.  ret  $(owt t.owt)
+        ?:  (~(has by one) p.i.owt)
+          ret
+        ret(new [i.owt new.ret])
+      ret 
+    ::
+    ++  sh-repo-cabal-diff
+      |=  [one=(map station config) two=(map station config)]
+      =|  $=  ret
+          $:  old=(list (pair station config))
+              new=(list (pair station config))
+              cha=(list (pair station config))
+          ==
+      ^+  ret
+      =.  ret
+        =+  eno=(~(tap by one))
+        |-  ^+  ret
+        ?~  eno  ret
+        =.  ret  $(eno t.eno)
+        =+  unt=(~(get by two) p.i.eno)
+        ?~  unt
+          ret(old [i.eno old.ret])
+        ?:  =(q.i.eno u.unt)  ret 
+        ret(cha [[p.i.eno u.unt] cha.ret])
+      =.  ret
+        =+  owt=(~(tap by two))
+        |-  ^+  ret
+        ?~  owt  ret
+        =.  ret  $(owt t.owt)
+        ?:  (~(has by one) p.i.owt)
+          ret
+        ret(new [i.owt new.ret])
+      ret
+    ::
+    ++  sh-repo-rogue-diff
+      |=  [one=(map partner atlas) two=(map partner atlas)]
+      =|  $=  ret
+          $:  old=(list (pair partner atlas))
+              new=(list (pair partner atlas))
+              cha=(list (pair partner atlas))
+          ==
+      ^+  ret
+      =.  ret
+        =+  eno=(~(tap by one))
+        |-  ^+  ret
+        ?~  eno  ret
+        =.  ret  $(eno t.eno)
+        =+  unt=(~(get by two) p.i.eno)
+        ?~  unt
+          ret(old [i.eno old.ret])
+        ?:  =(q.i.eno u.unt)  ret 
+        ret(cha [[p.i.eno u.unt] cha.ret])
+      =.  ret
+        =+  owt=(~(tap by two))
+        |-  ^+  ret
+        ?~  owt  ret
+        =.  ret  $(owt t.owt)
+        ?:  (~(has by one) p.i.owt)
+          ret
+        ret(new [i.owt new.ret])
+      ret
+    ::
+    ++  sh-repo-whom-diff
+      |=  [one=(set partner) two=(set partner)]
+      =|  $=  ret
+          $:  old=(list partner)
+              new=(list partner)
+          ==
+      ^+  ret
+      =.  ret
+        =+  eno=(~(tap by one))
+        |-  ^+  ret
+        ?~  eno  ret
+        =.  ret  $(eno t.eno)
+        ?:  (~(has in two) i.eno)
+          ret
+        ret(old [i.eno old.ret])
+      =.  ret
+        =+  owt=(~(tap by two))
+        |-  ^+  ret
+        ?~  owt  ret
+        =.  ret  $(owt t.owt)
+        ?:  (~(has in one) i.owt)
+          ret
+        ret(new [i.owt new.ret])
+      ret
+    ::
+    ++  sh-repo-ship-diff
+      |=  [one=(set ship) two=(set ship)]
+      =|  $=  ret
+          $:  old=(list ship)
+              new=(list ship)
+          ==
+      ^+  ret
+      =.  ret
+        =+  eno=(~(tap by one))
+        |-  ^+  ret
+        ?~  eno  ret
+        =.  ret  $(eno t.eno)
+        ?:  (~(has in two) i.eno)
+          ret
+        ret(old [i.eno old.ret])
+      =.  ret
+        =+  owt=(~(tap by two))
+        |-  ^+  ret
+        ?~  owt  ret
+        =.  ret  $(owt t.owt)
+        ?:  (~(has in one) i.owt)
+          ret
+        ret(new [i.owt new.ret])
+      ret 
+    ::
+    ++  sh-puss
+      |=  a=posture  ^-  tape
+      ?-  a
+        %black  "channel"
+        %brown  "mailbox"
+        %white  "village"
+        %green  "journal"
+      ==
+    ::
+    ++  sh-repo-config-exceptions
+      |=  [pre=tape por=posture old=(list ship) new=(list ship)]
+      =+  out=?:(?=(?(%black %brown) por) "try " "cut ")
+      =+  inn=?:(?=(?(%black %brown) por) "ban " "add ")
+      =.  +>.$
+          |-  ^+  +>.^$
+          ?~  old  +>.^$
+          =.  +>.^$  $(old t.old)
+          (sh-note :(weld pre out " " (scow %p i.old)))
+      =.  +>.$
+          |-  ^+  +>.^$
+          ?~  new  +>.^$
+          =.  +>.^$  $(new t.new)
+          (sh-note :(weld pre out " " (scow %p i.new)))
+      +>.$
+    ::
+    ++  sh-repo-config-sources
+      |=  [pre=tape old=(list partner) new=(list partner)]
+      ^+  +>
+      =.  +>.$
+          |-  ^+  +>.^$
+          ?~  old  +>.^$
+          =.  +>.^$  $(old t.old)
+          (sh-note (weld pre "off {~(ta-full ta man.she i.old)}"))
+      =.  +>.$
+          |-  ^+  +>.^$
+          ?~  new  +>.^$
+          =.  +>.^$  $(new t.new)
+          (sh-note (weld pre "hey {~(ta-full ta man.she i.new)}"))
+      +>.$
+    ::
+    ++  sh-repo-config-show
+      |=  [pre=tape laz=config loc=config]
+      ^+  +>
+      =.  +>.$
+        ?:  =(caption.loc caption.laz)  +>.$
+        (sh-note :(weld pre "cap " (trip caption.loc)))
+      =.  +>.$
+          %+  sh-repo-config-sources
+            (weld (trip man.she) ": ")
+          (sh-repo-whom-diff sources.laz sources.loc)
+      ?:  !=(p.cordon.loc p.cordon.laz)
+        =.  +>.$  (sh-note :(weld pre "but " (sh-puss p.cordon.loc)))
+        %^    sh-repo-config-exceptions  
+            (weld (trip man.she) ": ")  
+          p.cordon.loc
+        [~ (~(tap in q.cordon.loc))]
+      %^    sh-repo-config-exceptions  
+          (weld (trip man.she) ": ")
+        p.cordon.loc
+      (sh-repo-ship-diff q.cordon.laz q.cordon.loc)
+    ::
+    ++  sh-repo-cabal-changes
+      |=  $:  laz=(map station config)
+              old=(list (pair station config))
+              new=(list (pair station config))
+              cha=(list (pair station config))
+          ==
+      =.  +>.$
+          |-  ^+  +>.^$
+          ?~  new  +>.^$
+          =.  +>.^$  $(new t.new)
+          =.  +>.^$  (sh-pest [%& p.i.new])
+          %+  sh-repo-config-show  
+            (weld ~(sn-phat sn man.she p.i.new) ": ")
+          [*config q.i.new]
+      =.  +>.$
+          |-  ^+  +>.^$
+          ?~  cha  +>.^$
+          =.  +>.^$  $(cha t.cha)
+          %+  sh-repo-config-show  
+            (weld ~(sn-phat sn man.she p.i.cha) ": ")
+          [(~(got by laz) `station`p.i.cha) q.i.cha]
+      +>.$
+    ::
+    ++  sh-repo-cabal
+      |=  bal=cabal
+      ^+  +>
+      =+  laz=system.she
+      =.  system.she  bal
+      =.  +>.$
+          %+  sh-repo-cabal-changes  ham.laz
+          (sh-repo-cabal-diff ham.laz ham.bal)
+      (sh-repo-config-show "" loc.laz loc.bal)
+    ::
+    ++  sh-repo-house
+      |=  awl=(map span (pair posture cord))
+      ^+  +>
+      =+  dif=(sh-repo-house-diff harbor.she awl) 
+      =.  harbor.she  awl
+      =.  +>.$
+          |-  ^+  +>.^$
+          ?~  old.dif  +>.^$
+          =.  +>.^$  $(old.dif t.old.dif)
+          (sh-note "cut {(sh-puss p.q.i.old.dif)} %{(trip p.i.old.dif)}")
+      =.  +>.$
+          |-  ^+  +>.^$
+          ?~  new.dif  +>.^$
+          =.  +>.^$  $(new.dif t.new.dif)
+          =+  :*  nam=(trip p.i.new.dif)
+                  por=(sh-puss p.q.i.new.dif)
+                  des=(trip q.q.i.new.dif)
+              ==
+          (sh-note "new {por} %{nam}: {des}")
+      =.  +>.$ 
+          |-  ^+  +>.^$
+          ?~  cha.dif  +>.^$
+          =.  +>.^$  $(cha.dif t.cha.dif)
+          =+  :*  nam=(trip p.i.cha.dif)
+                  por=(sh-puss p.q.i.cha.dif)
+                  des=(trip q.q.i.cha.dif)
+              ==
+          (sh-note "mod %{nam}: {por}, {des}")
+      +>.$
+    ::
+    ++  sh-note                                         ::  shell message
+      |=  txt=tape
+      ^+  +>
+      (sh-fact %txt (runt [16 '-'] `tape`['|' ' ' (scag 62 txt)]))
+    ::
+    ++  sh-spaz                                         ::  print status
+      |=  saz=status
+      ^-  tape
+      ['%' (trip p.saz)]
+    ::
+    ++  sh-repo-group-diff-here                         ::  print atlas diff
+      |=  $:  pre=tape 
+            $=  cul
+            $:  old=(list (pair ship status))
+                new=(list (pair ship status))
+                cha=(list (pair ship status))
+            ==
+          ==
+      =.  +>.$
+          |-  ^+  +>.^$
+          ?~  old.cul  +>.^$
+          =.  +>.^$  $(old.cul t.old.cul)
+          (sh-note (weld pre "bye {(scow %p p.i.old.cul)}"))
+      =.  +>.$
+          |-  ^+  +>.^$
+          ?~  new.cul  +>.^$
+          =.  +>.^$  $(new.cul t.new.cul)
+          %-  sh-note
+          (weld pre "met {(scow %p p.i.new.cul)} {(sh-spaz q.i.new.cul)}")
+      =.  +>.$ 
+          |-  ^+  +>.^$
+          ?~  cha.cul  +>.^$
+          %-  sh-note 
+          (weld pre "set {(scow %p p.i.cha.cul)} {(sh-spaz q.i.cha.cul)}")
+      +>.$
+    ::
+    ++  sh-repo-group-here                              ::  update local
+      |=  loc=atlas
+      ^+  +>
+      =+  cul=(sh-repo-atlas-diff p.guests.she loc)
+      =.  p.guests.she  loc
+      (sh-repo-group-diff-here "" cul)
+    ::
+    ++  sh-repo-group-there                             ::  update foreign
+      |=  yid=(map partner atlas)
+      =+  day=(sh-repo-rogue-diff q.guests.she yid)
+      =+  dun=q.guests.she
+      =.  q.guests.she  yid
+      =.  +>.$
+          |-  ^+  +>.^$
+          ?~  old.day  +>.^$
+          =.  +>.^$  $(old.day t.old.day)
+          (sh-note (weld "not " (~(ta-show ta man.she p.i.old.day) ~)))
+      =.  +>.$
+          |-  ^+  +>.^$
+          ?~  new.day  +>.^$
+          =.  +>.^$  $(new.day t.new.day)
+          =.  +>.^$
+              (sh-note (weld "new " (~(ta-show ta man.she p.i.new.day) ~)))
+          (sh-repo-group-diff-here "--" ~ (~(tap by q.i.new.day)) ~)
+      =.  +>.$ 
+          |-  ^+  +>.^$
+          ?~  cha.day  +>.^$
+          =.  +>.^$  $(cha.day t.cha.day)
+          =.  +>.^$
+              (sh-note (weld "for " (~(ta-show ta man.she p.i.cha.day) ~)))
+          =+  yez=(~(got by dun) p.i.cha.day)
+          %+  sh-repo-group-diff-here  "--"
+          (sh-repo-atlas-diff yez q.i.cha.day)
+      +>.$
+    ::
+    ++  sh-repo-group
+      |=  ges=register
+      ^+  +>
+      =.  +>  (sh-repo-group-here p.ges)
+      =.  +>  (sh-repo-group-there q.ges)
+      +>
+    ::
+    ++  sh-repo-gram
+      |=  [num=@ud gam=telegram]
+      ^+  +>
+      ?:  =(num count.she)
+        =.  +>  ?:(=(0 (mod num 5)) (sh-numb num) +>)
+        (sh-rend(count.she +(num)) gam)
+      ?:  (gth num count.she)
+        =.  +>  (sh-numb num)
+        (sh-rend(count.she +(num)) gam)
+      +> 
+    ::
+    ++  sh-repo-grams                                   ::  apply telegrams
+      |=  [num=@ud gaz=(list telegram)]
+      ^+  +>
+      ?~  gaz  +>
+      $(gaz t.gaz, num +(num), +> (sh-repo-gram num i.gaz))
+    ::
+    ++  sh-repo                                         ::  apply report
+      |=  rad=report
+      ^+  +>
+      ::  ~&  [%sh-repo rad]
+      ?-  -.rad
+        %cabal   (sh-repo-cabal +.rad)
+        %grams   (sh-repo-grams +.rad)
+        %group   (sh-repo-group +.rad)
+        %house   (sh-repo-house +.rad)
+      ==
+    ::
+    ++  sh-sane-chat                                    ::  sanitize chatter
+      |=  buf=(list ,@c)
+      ^-  (list sole-edit)
+      =+  :-  inx=0
+          ^=  fix
+          |=  [inx=@ud cha=@t lit=(list sole-edit)]
+          ^+  lit
+          [[%mor [%del inx] [%ins inx `@c`cha] ~] lit]
+      |-  ^-  (list sole-edit)
+      ?:  =(62 inx)
+        |-  ^-  (list sole-edit)
+        ?~(buf ~ [[%del 62] $(buf t.buf)])
+      ?~  buf  ~
+      =+  lit=$(inx +(inx), buf t.buf)
+      ?:  |((lth i.buf 32) (gth i.buf 126))
+        (fix inx '?' lit)
+      ?:  &((gte i.buf 'A') (lte i.buf 'Z'))
+        (fix inx (add 32 i.buf) lit)
+      ?:  &(=('/' i.buf) ?=([47 *] t.buf))
+       (fix inx '\\' lit)
+      lit
+    ::
+    ++  sh-sane-rule                                    ::  sanitize by rule
+      |*  sef=_rule
+      |=  [inv=sole-edit txt=tape]
+      ^-  (list sole-edit)
+      =+  ryv=(rose txt sef)
+      ?:(-.ryv ~ [inv ~])
+    ::
+    ++  sh-sane                                         ::  sanitize input
+      |=  [inv=sole-edit buf=(list ,@c)]
+      ^-  (list sole-edit)
+      ?~  buf  ~
+      =+  txt=(tufa buf)
+      ?:  =(';' -.txt)
+        ((sh-sane-rule sh-scad) inv +.txt)
+      ?:  =('@' i.buf)
+        (sh-sane-chat +.buf)
+      =+  ryv=(rose txt sh-purl)
+      ?:  -.ryv  ~
+      (sh-sane-chat buf)
+    ::
+    ++  sh-slug                                         ::  edit to sanity
+      |=  lit=(list sole-edit)
+      ^+  +>
+      ?~  lit  +>
+      =^  lic  say.she
+          (~(transmit cs say.she) `sole-edit`?~(t.lit i.lit [%mor lit]))
+      (sh-fact [%mor [%det lic] ~])
+    ::
+    ++  sh-stir                                         ::  apply edit
+      |=  cal=sole-change
+      ^+  +>
+      =^  inv  say.she  (~(transceive cs say.she) cal)
+      =+  lit=(sh-sane inv buf.say.she)
+      ?~  lit
+        +>.$
+      (sh-slug lit)
+    ::
+    ++  sh-pork                                         ::  parse work
+      ^-  (unit work)
+      ?~  buf.say.she  ~
+      =+  txt=(tufa buf.say.she)
+      ?:  =(';' -.txt)
+        (rust +.txt sh-scad)
+      ?:  =('@' -.buf.say.she)
+        `[%say %lin | (crip (tufa +.buf.say.she))]
+      =+  rul=(rust txt sh-purl)
+      ?^  rul  `[%say %url u.rul]
+      `[%say %lin & (crip (tufa buf.say.she))]
+    ::
+    ++  sh-lame                                         ::  send error
+      |=  txt=tape
+      (sh-fact [%txt txt])
+    ::
+    ++  sh-whom                                         ::  current audience
+      ^-  audience
+      %-  ~(gas by *audience)
+      %+  turn  (~(tap in ?~(active.she passive.she u.active.she)))
+      |=(a=partner [a *envelope %pending])
+    ::
+    ++  sh-tell                                         ::  add command
+      |=  cod=command
+      %_(+> coz [cod coz])
+    ::
+    ++  sh-work                                         ::  do work
+      |=  job=work
+      ^+  +>
+      =+  roy=(~(got by stories) man.she)
+      =<  work
+      |%
+      ++  work
+        ?-  -.job
+          %number  (number +.job)
+          %join    (join +.job)
+          %invite  (invite +.job)
+          %banish  (banish +.job)
+          %create  (create +.job)
+          %target  (target +.job)
+          %probe   (probe +.job)
+          %say     (say +.job)
+        ==
+      ::
+      ++  activate                                      ::  from %number
+        |=  gam=telegram
+        ^+  +>+>+>
+        =.  +>+>+>  ?.  ?=(%url -.r.r.q.gam)  +>+>+>
+          (sh-fact %txt (earn p.r.r.q.gam))
+        sh-prod(active.she `~(tr-pals tr man.she gam))
+      ::
+      ++  join                                          ::  %join
+        |=  lix=(set partner)
+        ^+  +>+>+>
+        =+  loc=loc.system.she
+        %^  sh-tell  %design  man.she
+        :-  ~
+        =+  tal=(~(tap in lix))
+        %_    loc
+            sources
+          |-  ^-  (set partner)
+          ?~  tal  sources.loc
+          ?:  (~(has in sources.loc) i.tal)
+            $(tal t.tal, sources.loc (~(del in sources.loc) i.tal))
+          $(tal t.tal, sources.loc (~(put in sources.loc) i.tal))
+        ==
+      ::
+      ++  invite                                        ::  %invite
+        |=  [nom=span tal=(list partner)]
+        ^+  +>+>+>
+        !!
+      ::
+      ++  banish                                        ::  %banish
+        |=  [nom=span tal=(list partner)]
+        ^+  +>+>+>
+        !!
+      ::
+      ++  create                                        ::  %create
+        |=  [por=posture nom=span txt=cord]
+        ^+  +>+>+>
+        ?:  (~(has in stories) nom) 
+          (sh-lame "{(trip nom)}: already exists")
+        =.  +>+>+>
+            %^  sh-tell  %design  nom
+            :-  ~
+            :+  *(set partner)
+              (end 3 62 txt)
+            [por ~]
+        (join [[%& our.hid nom] ~ ~])
+      ::
+      ++  target                                        ::  %target
+        |=  lix=(set partner)
+        (sh-pact lix)
+      ::
+      ++  number                                        ::  %number
+        |=  [rel=? num=@ud]
+        ^+  +>+>+>
+        =+  roy=(~(got by stories) man.she)
+        =.  num
+            ?.  rel  num
+            =+  dog=|-(?:(=(0 num) 1 (mul 10 $(num (div num 10)))))
+            (add num (mul dog (div count.roy dog)))
+        ?:  (gte num count.roy)
+          (sh-lame "{(scow %ud num)}: no such telegram")
+        (activate (snag (sub count.roy +(num)) grams.roy))
+      ::
+      ++  probe                                         ::  inquire
+        |=  cuz=station
+        ^+  +>+>+>
+        ~&  [%probe cuz]
+        +>+>+>
+      ::
+      ++  say                                           ::  publish
+        |=  sep=speech
+        ^+  +>+>+>
+        =^  sir  +>+>+>  sh-uniq
+        %=    +>+>+>.$
+            coz  :_  coz
+          [%publish [[sir sh-whom [lat.hid ~ sep]] ~]]
         ==
       --
     ::
-    ++  swatch                                          ::  print partner set
-      |=  [our=ship tou=(set partner)]
-      =+  tuo=(~(tap in tou))
-      |-  ^-  tape
-      ?~  tuo  ~
-      =+  ted=$(tuo t.tuo)
-      =+  ^=  ind  ^-  tape
-          ?-  -.i.tuo
-            %&  =+  sip=(scow %p p.p.i.tuo)
-                ?:  =((main p.p.i.tuo) q.p.i.tuo)
-                  sip
-                :(welp sip "/" (trip q.p.i.tuo))
-            %|  ['@' (trip p.p.i.tuo)] 
-          ==
-      ?~  ted  ind
-      (welp ind `tape`[',' ' ' ted])
+    ++  sh-done                                         ::  apply result
+      =+  lit=(sh-sane [%nop ~] buf.say.she)
+      ?^  lit
+        (sh-slug lit)
+      =+  jub=sh-pork
+      ?~  jub  (sh-fact %bel ~)
+      =.  +>  (sh-work u.jub)
+      =+  buf=buf.say.she
+      =^  cal  say.she  (~(transmit cs say.she) [%set ~])
+      %-  sh-fact
+      :*  %mor
+          [%nex ~]
+          [%det cal]
+          ?.  ?=([%';' *] buf)  ~ 
+          :_  ~
+          [%txt (weld "----------------| " (tufa buf))]
+      ==
     ::
-    ++  stog                                            ::  toggle set
-      |*  [tog=(set) tag=(set)]
-      =+  got=(~(tap in tog))
-      |-  ^+  tag
-      ?~  got  tag
-      %=    $
-          got  t.got
-          tag  ?:  (~(has in tag) i.got)
-                 (~(del in tag) i.got)
-               (~(put in tag) i.got)
-      == 
+    ++  sh-sole                                         ::  apply edit
+      |=  act=sole-action
+      ^+  +>
+      ?-  -.act
+        %det  (sh-stir +.act)
+        %ret  sh-done
+      ==
+    ::
+    ++  sh-uniq
+      ^-  [serial _.]
+      [(shaf %serial eny.hid) .(eny.hid (shax eny.hid))]
     --
-!:
-::::
-  ::
-|_  [hid=hide town]
-++  hype  |=(moz=(list move) ~(. hy moz hid))
-++  sy
-  |_  $:  $:  man=span                                  ::  u.live
-              moz=(list move)                           ::  pending moves
-          ==                                            ::
-          story                                         ::  current story
-      ==
-  ::
-  ++  sy-abet                                           ::  resolve core
+  ++  ra-abed                                           ::  resolve core
     ^-  [(list move) _+>]
-    [(flop moz) +>(stories (~(put by stories) man +<+))]
-  ::
-  ++  sy-subscribe                                      ::  story subscribe
-    ?>  =(%cold link)
-    =+  cub=?.(=(0 count) (scot %ud count) (scot %da (sub lat.hid ~d1)))
-    =.  +  (sy-message "subscribe <{(trip cub)}>")
-    %_  +
-      link  %cool
-      moz   =<  hy-abet
-            %+  hy-subscribe:(hype moz)
-              /fm/[man]
-            :~  %afx
-                man
-                ?:  =(0 count)
-                  ::  ~&  [%story-init man `@da`(sub lat.hid ~d1)]
-                  (scot %da (sub lat.hid ~d1))
-                (scot %ud count)
+    :_  +>
+    =+  ^=  yop  
+        |-  ^-  (pair (list move) (list sole-effect))
+        ?~  moves  [~ ~]
+        =+  mor=$(moves t.moves)
+        ?:  ?&  =(ost p.i.moves) 
+                ?=([%give %rush %sole-effect *] q.i.moves)
             ==
-    ==
+          [p.mor [+>+.q.i.moves q.mor]]
+        [[i.moves p.mor] q.mor]
+    =+  :*  moz=(flop p.yop)
+            ^=  foc  ^-  (unit sole-effect)
+            ?~  q.yop  ~ 
+            ?~(t.q.yop `i.q.yop `[%mor (flop `(list sole-effect)`q.yop)])
+        ==
+    ?~(foc moz [[ost %give %rush %sole-effect u.foc] moz])
   ::
-  ++  sy-unsubscribe                                    ::  story unsubscribe
-    ?:  =(& ?=(?(%cold %dead) link))  .
-    %_  .
-      link  %cold
-      moz   hy-abet:(hy-unsubscribe:(hype moz) /fm/[man])
-    ==
+  ++  ra-abet                                           ::  complete core
+    ra-abed:ra-axel
   ::
-  ++  sy-serial                                         ::  make serial no
-    ^-  [serial _.]
-    [(shaf %serial eny.hid) .(eny.hid (shax eny.hid))]
+  ++  ra-axel                                           ::  rebound reports
+    ^+  .
+    =+  ^=  rey
+        |-  ^-  (pair (list move) (list (pair bone report)))
+        ?~  moves
+          [~ ~]
+        =+  mor=$(moves t.moves)
+        ?.  ?&  (~(has by shells) `bone`p.i.moves)
+                ?=([%give %rush %talk-report *] q.i.moves)
+            ==  
+          [[i.moves p.mor] q.mor]
+        [p.mor [[p.i.moves +>+.q.i.moves] q.mor]]
+    =.  moves  p.rey
+    ?:  =(q.rey ~)  +
+    =.  q.rey  (flop q.rey)
+    |-  ^+  +>
+    ?~  q.rey  ra-axel
+    $(q.rey t.q.rey, +> (ra-back(ost p.i.q.rey) q.i.q.rey))
   ::
-  ++  sy-audience                                       ::  speech audience
-    %-  ~(gas by *audience)
-    %+  turn  `(list partner)`[[%& our.hid man] (~(tap in q.mike))]
-    |=(a=partner [a *envelope %pending])
-  ::
-  ++  sy-message                                        ::  print message
-    |=  msg=tape
-    %_(+> moz hy-abet:(hy-print:(hype moz) ":{(trip man)}: {msg}"))
-  ::
-  ++  sy-present
-    |=  [msg=tape tay=(list tank)]
-    =.  tay  (welp tay `(list tank)`[%leaf "::"]~)
-    =.  tay  :_(tay [%leaf ":{(trip man)}: {msg}:: "])
-    %_(+>.$ moz hy-abet:(hy-display:(hype moz) tay))
-  ::
-  ++  sy-prompt
-    |=  tou=(set partner)
-    ^-  tape
-    ;:  welp
-      (scow %p our.hid)
-      ?:(=(man (main our.hid)) "" `tape`:(welp "/" (trip man)))
-      ?~  tou  "& "
-      `tape`:(welp "(" (swatch our.hid tou) ")& ")
-    ==
-  ::
-  ++  sy-voice                                          ::  set targets
-    |=  [pas=? tou=(set partner)]
-    ?:  &(!p.mike pas)  +>
-    %_  +>.$
-      mike  [pas tou]
-      moz   hy-abet:(hy-accept:(hype moz) (crip (sy-prompt tou)))
-    ==
-  ::
-  ++  sy-rollback
-    |=  lon=@dr
-    !!
-  ::
-  ++  sy-work                                           ::  run user command
-    |=  job=work
+  ++  ra-back
+    |=  rad=report
     ^+  +>
-    ?-    -.job
-        %ask  ~|(%sy-work-ask-stub !!)
-        %exp  ~|(%sy-work-exp-stub !!)
-        %mor
+    sh-abet:(~(sh-repo sh ~ (~(got by shells) ost)) rad)
+  ::
+  ++  ra-sole
+    |=  act=sole-action
+    ^+  +>
+    =+  shu=(~(get by shells) ost)
+    ?~  shu
+      ~&  [%ra-console-broken ost]
+      +>.$
+    sh-abet:(~(sh-sole sh ~ (~(got by shells) ost)) act)
+  ::  
+  ++  ra-emil                                           ::  ra-emit move list
+    |=  mol=(list move)
+    %_(+> moves (welp (flop mol) moves))
+  ::
+  ++  ra-emit                                           ::  emit a move
+    |=  mov=move
+    %_(+> moves [mov moves])
+  ::
+  ++  ra-ever                                           ::  emit success
+    (ra-emit ost %give %nice ~)
+  ::
+  ++  ra-evil                                           ::  emit error
+    |=  msg=cord
+    ~&  [%ra-evil msg]
+    (ra-emit ost %give %mean ~ msg ~)
+    ::  (ra-emit ost %give %nice ~)
+  ::
+  ++  ra-house                                          ::  emit partners
+    |=  ost=bone
+    %+  ra-emit  ost
+    :^  %give  %rush  %talk-report
+    :-  %house
+    %-  ~(gas in *(map span (pair posture cord)))
+    %+  turn  (~(tap by stories)) 
+    |=([a=span b=story] [a p.cordon.shape.b caption.shape.b])
+  ::
+  ++  ra-homes                                          ::  update partners
+    =+  gel=general
+    |-  ^+  +>
+    ?~  gel  +>
+    =.  +>  $(gel l.gel)
+    =.  +>  $(gel r.gel)
+    (ra-house n.gel)
+  ::
+  ++  ra-init                                           ::  initialize talk
+    %+  ra-apply  our.hid
+    :+  %design  (main our.hid)
+    :-  ~  :-  ~
+    :-  'default home'
+    [%brown ~] 
+  ::
+  ++  ra-apply                                          ::  apply command
+    |=  [her=ship cod=command]
+    ^+  +>
+    ?-    -.cod
+        %design
+      ?.  =(her our.hid)
+        (ra-evil %talk-no-owner)
+      ?~  q.cod
+        ?.  (~(has by stories) p.cod)
+          (ra-evil %talk-no-story)
+        =.  +>.$  (ra-config p.cod *config)
+        ra-ever(stories (~(del by stories) p.cod))
+      =.  +>.$  (ra-config p.cod u.q.cod)
+      ra-ever
+    ::
+        %review   ra-ever:(ra-think | her +.cod)
+        %publish  ra-ever:(ra-think & her +.cod)
+    ==
+  ::
+  ++  ra-config                                         ::  configure story
+    |=  [man=span con=config]
+    ^+  +>
+    =+  :-  neu=(~(has by stories) man)
+        pur=(fall (~(get by stories) man) *story)
+    =.  +>.$  pa-abet:(~(pa-reform pa man pur) con)
+    ?:(neu +>.$ ra-homes)
+  ::
+  ++  ra-friend                                         ::  %friend response
+    |=  [man=span tay=partner sih=sign]
+    ^+  +>
+    =+  pur=(~(get by stories) man)
+    ?~  pur  ~&  [%ra-friend-none man]  +>.$
+    pa-abet:(~(pa-friend pa man u.pur) tay sih)
+  ::
+  ++  ra-twitter                                        ::  %twitter response
+    |=  [[num=@ud man=span] sih=sign]
+    ^+  +>
+    ?+    sih  ~|([%talk-bad-twitter sih] !!)
+        [%g ?(%nice %mean) ~]
+      +>
+        [%g %mean ^]
+      (ra-repeat num [%| %twitter man] sih)
+        [%g %rush %twit-stat *]
+      (ra-repeat num [%| %twitter man] [%g %nice ~])
+    ==
+  ::
+  ++  ra-repeat                                         ::  %repeat response
+    |=  [num=@ud pan=partner sih=sign]
+    =+  oot=(~(get by q.outbox) num)
+    ?~  oot  ~&  [%ra-repeat-none num]  +>.$
+    =.  q.outbox  (~(del by q.outbox) num)
+    =.  q.u.oot
+      =+  olg=(~(got by q.u.oot) pan)
+      %+  ~(put by q.u.oot)  pan
+      :-  -.olg
+      ?+  sih  !!
+        [%g %mean *]  ~&([%talk-repeat-rejected num pan sih] %rejected)
+        [%g %nice ~]  %received
+      ==
+    (ra-think | our.hid u.oot ~)
+  ::
+  ++  ra-cancel                                         ::  drop a bone
+    ^+  .
+    =+  hep=(~(get by sup.hid) ost)
+    ?~  hep  +
+    ?.  ?=([@ @ *] q.u.hep)
+      +(general (~(del in general) ost))
+    =*  man  i.t.q.u.hep
+    =+  pur=(~(get by stories) man)
+    ?~  pur  +>
+    pa-abet:(pa-notify:~(pa-cancel pa man u.pur) p.u.hep %gone *human)
+  ::
+  ++  ra-human                                          ::  look up person
+    |=  her=ship
+    ^-  [human _+>]
+    =^  who  folks
+        =+  who=(~(get by folks) her)
+        ?^  who  [u.who folks]
+        =+  who=`human`[~ `(scot %p her)]               ::  XX do right
+        [who (~(put by folks) her who)]
+    [who +>.$]
+  ::
+  ++  ra-console                                        ::  console subscribe
+    |=  [her=ship pax=path]
+    ^+  +>
+    =+  man=`span`?~(pax (main her) ?>(?=(~ t.pax) i.pax))
+    =+  ^=  she  ^-  shell
+        [her man 0 *sole-share ~ [[%& our.hid man] ~ ~] [~ ~] ~ *cabal]
+    sh-abet:~(sh-peer sh ~ she)
+  ::
+  ++  ra-subscribe                                      ::  listen to
+    |=  [her=ship pax=path]
+    ^+  +>
+    ::  ~&  [%ra-subscribe ost her pax]
+    ?:  ?=(~ pax)
+      (ra-house(general (~(put in general) ost)) ost)
+    ?.  ?=([@ @ *] pax)
+      (ra-evil %talk-bad-path)
+    =+  ^=  vab  ^-  (set ,@tas)
+        =|  vab=(set ,@tas)
+        |-  ^+  vab
+        ?:  =(0 i.pax)  vab
+        $(i.pax (rsh 3 1 i.pax), vab (~(put in vab) (end 3 1 i.pax)))
+    =+  pur=(~(get by stories) i.t.pax)
+    ?~  pur
+      ~&  [%bad-subscribe-story-c i.t.pax]
+      (ra-evil %talk-no-story)
+    =+  soy=~(. pa i.t.pax u.pur)
+    =.  soy  ?.((~(has in vab) %a) soy (pa-watch:soy her))
+    =.  soy  ?.((~(has in vab) %x) soy (pa-master:soy her))
+    =.  soy  ?.((~(has in vab) %f) soy (pa-listen:soy her t.t.pax))
+    =^  who  +>.$  (ra-human her)
+    pa-abet:(pa-notify:soy her %hear who)
+  ::
+  ++  ra-think                                          ::  publish/review
+    |=  [pub=? her=ship tiz=(list thought)]
+    ^+  +>
+    ?~  tiz  +>
+    $(tiz t.tiz, +> (ra-consume pub her i.tiz))
+  ::
+  ++  ra-normal                                         ::  normalize
+    |=  tip=thought
+    ^-  thought
+    ?.  ?=([%lin *] r.r.tip)  tip
+    %_    tip
+        q.r.r
+      %-  crip
+      %+  scag  62
+      %-  tufa
+      %+  turn  (tuba (trip q.r.r.tip))
+      |=  a=@c
+      ?:  &((gte a 'A') (lte a 'Z'))
+        (add a 32)
+      ?:  |((lth a 32) (gth a 126))
+        `@`'?'
+      a
+    ==
+  ::
+  ++  ra-consume                                        ::  consume thought
+    |=  [pub=? her=ship tip=thought]
+    =.  tip  (ra-normal tip)
+    =+  aud=(~(tap by q.tip) ~)
+    |-  ^+  +>.^$
+    ?~  aud  +>.^$
+    $(aud t.aud, +>.^$ (ra-conduct pub her p.i.aud tip))
+  ::
+  ++  ra-conduct                                        ::  thought to partner
+    |=  [pub=? her=ship tay=partner tip=thought]
+    ^+  +>
+    ::  ~&  [%ra-conduct pub her tay]
+    ?-  -.tay
+      %&  ?:  pub
+            =.  her  our.hid                            ::  XX security!
+            ?:  =(her p.p.tay)
+              (ra-record q.p.tay p.p.tay tip)
+            (ra-transmit p.tay tip)
+          ?.  =(our.hid p.p.tay)
+            +>
+          (ra-record q.p.tay her tip)
+      %|  ?.  pub  +>
+          ?-    -.p.tay
+              %twitter
+            (ra-tweet p.p.tay tip)
+    ==    ==
+  ::
+  ++  ra-record                                         ::  add to story
+    |=  [man=span gam=telegram]
+    ^+  +>
+    =+  pur=(~(get by stories) man)
+    ?~  pur
+      ~&  [%no-story man]
+      +>.$
+    pa-abet:(~(pa-learn pa man u.pur) gam)
+  ::
+  ++  ra-transmit                                       ::  send to neighbor
+    |=  [cuz=station tip=thought]
+    ^+  +>
+    =.  +>
+        %+  ra-emit  ost
+        :*  %pass
+            /repeat/(scot %ud p.outbox)/(scot %p p.cuz)/[q.cuz]
+            %g
+            %mess
+            [p.cuz /talk]
+            our.hid
+            [%talk-command !>(`command`[%review tip ~])]
+        ==
+    +>(p.outbox +(p.outbox), q.outbox (~(put by q.outbox) p.outbox tip))
+  ::
+  ++  ra-tweet                                          ::  send to /twit
+    |=  [man=span tip=thought]
+    =*  sta  r.tip
+    ?>  ?=(%lin -.r.sta)
+    =.  q.outbox  (~(put by q.outbox) p.outbox tip)
+    %^    ra-emil(p.outbox +(p.outbox))
+        :*  ost
+            %pass  /twitter/stat/(scot %ud p.outbox)/[man]
+            %g  %mess
+            [our.hid /twit]  our.hid
+            [%twit-do !>(`twit-do`[man %post p.tip q.r.sta])]
+        ==
+      :*  ost
+          %pass  /twitter/stat/(scot %ud p.outbox)/[man]
+          [%g %show [our.hid /twit] our.hid /post/(scot %uv p.tip)]
+      ==
+    ~
+  ++  pa                                                ::  story core
+    |_  $:  man=span
+            story
+        ==
+    ++  pa-abet
+      ^+  +>
+      +>(stories (~(put by stories) man `story`+<+))
+    ::
+    ++  pa-admire                                       ::  accept from
+      |=  her=ship
+      ^-  ?
+      ::?-  -.cordon.shape
+      ::  %&  (~(has in p.cordon.shape) her)
+      ::  %|  !(~(has in p.cordon.shape) her)
+      ::==
+      &
+    ::
+    ++  pa-watch                                        ::  watch presence
+      |=  her=ship
+      ?.  (pa-admire her)
+        (pa-sauce ost [[%mean ~ %talk-watch-unauthorized ~] ~])
+      =.  viewers  (~(put in viewers) ost)
+      (pa-display ost ~ ~)
+    ::
+    ++  pa-master                                       ::  hear config
+      |=  her=ship
+      ?.  (pa-admire her)
+        (pa-sauce ost [[%mean ~ %talk-master-unauthorized ~] ~])
+      =.  owners  (~(put in owners) ost)
+      ::  ~&  [%pa-master her man shape]
+      (pa-sauce ost [[%rush %talk-report %cabal shape mirrors] ~])
+    ::
+    ++  pa-display                                      ::  update presence
+      |=  vew=(set bone)
+      =+  ^=  reg
+          :_  remotes
+          |-  ^-  atlas
+          ?~  locals  ~
+          [[p.n.locals q.q.n.locals] $(locals l.locals) $(locals r.locals)]
+      ::  ~&  [%pa-display man reg]
       |-  ^+  +>.^$
-      ?~  +.job  +>.^$
-      $(+.job t.+.job, +>.^$ ^$(job i.+.job))
+      ?~  vew  +>.^$
+      =.  +>.^$  $(vew l.vew)
+      =.  +>.^$  $(vew r.vew)
+      (pa-sauce n.vew [[%rush %talk-report %group reg] ~])
     ::
-        %rub
-      ?:  ?=(%whom +<.job)
-        (sy-voice +>.job)
-      ?:  ?=(%wind +<.job)
-        ~&  %rub-wind-stub
-        !!
-      =+  suz=sy-live
-      ?~  suz  (sy-message "not connected")
-      ?-  +<.job
-        %lite  sz-abet:(sz-cordon:u.suz [%white +>.job])
-        %dark  sz-abet:(sz-cordon:u.suz [%black +>.job])
-        %love  sz-abet:(sz-sources:u.suz +>.job)
-      ==
+    ++  pa-monitor                                      ::  update config
+      =+  owe=owners
+      |-  ^+  +>
+      ?~  owe  +>
+      =.  +>  $(owe l.owe)
+      =.  +>  $(owe r.owe)
+      ::  ~&  [%pa-monitor man shape]
+      (pa-sauce n.owe [[%rush %talk-report %cabal shape mirrors] ~])
     ::
-        %say
-      =^  sir  +>.$  sy-serial
-      %=    +>.$
-          moz 
-        =<  hy-abet
-        %-  ~(hy-transmit hy moz hid)
-        [%publish [[sir sy-audience [lat.hid ~ +.job]] ~]]
-      ==
+    ++  pa-cabal
+      |=  [cuz=station con=config ham=(map station config)]
+      ^+  +>
+      =+  old=mirrors
+      =.  mirrors  (~(put by mirrors) cuz con)
+      ?:  =(mirrors old)
+        +>.$
+      pa-monitor 
     ::
-        %wry  ~|(%sy-work-wry !!)
-        %who  ~|(%sy-work-who-stub !!)
-    ==
-  ::
-  ++  sy-gram                                           ::  apply telegram
-    |=  [num=@ud gam=telegram]
-    ^+  +>
-    %=    +>
-        moz
-      =<  hy-abet
-      %-  hy-render:(hype moz)
-      =*  sta  r.q.gam
-      ?+    -.r.sta  ~|([%strange-gram -.r.sta] !!)
+    ++  pa-friend                                       ::  subscribed update
+      |=  [tay=partner sih=sign]
+      ^+  +>
+      ?+    sih  ~|([%talk-bad-friend sih] !!)
+          [%g %nice ~]
+        +>.$
       ::
-          %lin  
-        :-  %txt 
-        %+  rap  3
-        :~  (scot %ud num)  ')' 
-            (scot %p p.gam)  ?:(p.r.sta ': ' ' ') 
-            q.r.sta
+          [%g %mean *]
+        ?~  +>.sih
+          ?.  (~(has in sources.shape) tay)  +>.$  ::  XX hack for odd mean
+          (pa-acquire [tay ~])
+        pa-monitor(sources.shape (~(del in sources.shape) tay))
+      ::
+          [%g %rush %twit-feed *]
+        %-  pa-lesson
+        %+  turn  p.p.sih  |=  twit-stat
+        ^-  telegram
+        :^    our.hid                 ::  XX inaccurate
+            (shas %twit id)
+          `audience`[[tay [& ~ tay] %received] `~]      ::  current party?
+        ^-  statement
+        :+  now
+          ~                           ::  XX  hashtags
+        [%lin & txt]
+    ::
+          [%g %rush %talk-report *]
+        ::  ~&  [%pa-friend-report +>+.sih]
+        ?>  ?=(%& -.tay)
+        =.  +>  %+  pa-scrub  ost 
+                :_  ~
+                :-  /friend/show/[man]/(scot %p p.p.tay)/[q.p.tay]
+                [%g %took [p.p.tay /talk] our.hid]
+        ?+  -.p.p.sih  ~|([%talk-odd-friend sih] !!)
+          %cabal  (pa-cabal `station`p.tay `cabal`+.p.p.sih)
+          %group  (pa-remind tay +.p.p.sih)
+          %grams  (pa-lesson q.+.p.p.sih)
         ==
       ==
-    ==
-  ::
-  ++  sy-grams                                          ::  apply telegrams
-    |=  [num=@ud gaz=(list telegram)]
-    ^+  +>
-    ::  ~&  [%sy-grams [num count] (lent gaz)]
-    ?:  (gth num count)
-      (sy-message(count 0) "message gap: {} at {}")
-    =.  .  
-      ?:  =(num count)  .
-      .(num count, gaz (slag (sub count num) gaz))
-    =+  las=(add count (lent gaz))
-    |-  ^+  +>.^$
-    ?~  gaz  +>.^$(count las)
-    $(gaz t.gaz, count +(count), +>.^$ (sy-gram num i.gaz))
-  ::
-  ++  sy-error                                          ::  report error
-    |=  ars=ares
-    %=    +>
-        moz
-      =<  hy-abet
-      %-  hy-print:(hype moz)
-      ?~(ars "connection error" "disaster: (trip p.u.ars)")
-    ==
-  ::
-  ++  sy-sign                                           ::  subscription sign
-    |=  res=gall-sign
-    ^+  +>
-    ::  ~&  [%sy-sign res]
-    ?-    -.res
-        %mean
-      =.  link  %dead
-      (sy-error p.res)
     ::
-        %nice                                           ::  misordered, ignore
-    ::  ?.  ?=(%cool link)
-    ::  ~&  [%sy-sign-nice-bad link]
-    ::  +>.$
-    ::+>(link %warm) 
-      +>.$
-    ::
-        %rush                                           ::  direct update
-      ?:  ?=(?(%cold %dead) link)
-        ~&  [%sy-sign-rust-bad `@tas`link]
-        +>.$
-      ?>  ?=(%rodeo-report +<.res)
-      ?:  ?=(%cool link)
-        ::  XX workaround for inverted nice
-        $(link %warm)
-      =+  suz=sy-live
-      ?~  suz  (sy-message "not connected")
-      sz-abet:(sz-apply:u.suz +>.res)
-    ==
-  ::
-  ++  sy-live                                           ::  as connected
-    ^-  (unit ,_sz)
-    ?:  ?=([%live *] link)
-      `~(. sz p.link)
-    ?.(?=(%warm link) ~ `~(. sz *bridge))
-  ::
-  ++  sz                                                ::  story, connected
-    |_  big=bridge
-    ++  sz-abet  %_(+> link [%live big])                ::  resolve to ++sy
-    ++  sz-amok
-      |=  why=?(%cold %cool %dead %warm)
-      %_(+>+> link why)
-    ::
-    ++  sz-cordon                                       ::  design cordon
-      |=  con=control
-      ^+  +>
-      =.  cordon.xm.big
-        ?:  =(p.cordon.xm.big p.con)
-          [p.con (stog q.con q.cordon.xm.big)]
-        con
-      +>.$(moz hy-abet:(hy-transmit:(hype moz) [%design man ~ xm.big]))
-    ::
-    ++  sz-sources                                      ::  design sources
-      |=  src=(set partner)
-      ^+  +>
-      =.  sources.xm.big  (stog src sources.xm.big)
-      +>.$(moz hy-abet:(hy-transmit:(hype moz) [%design man ~ xm.big]))
-    ::
-    ++  sz-config                                       ::  apply config
-      |=  cof=config
-      =.  +>+>  (sy-present "config" >cof< ~)
-      ::  ~&  [%sz-config cof]
-      %_(+> xm.big cof, +> (sy-voice %& sources.cof))
-    ::
-    ++  sz-group                                        ::  apply register
-      |=  rex=register
-      =.  +>+>  (sy-present "register" >rex< ~)
-      %_(+> am.big rex)
-    ::
-    ++  sz-apply                                        ::  apply report
-      |=  rad=report
-      ^+  +>
-      ?-  -.rad
-        %house   ~|(%sz-apply-house !!)
-        %grams   +>(+> (sy-grams +.rad))
-        %config  (sz-config +.rad)
-        %group   (sz-group +.rad)
+    ++  pa-scrub                                        ::  pass forward
+      |=  [ost=bone bub=(list (pair path note))]
+      %_    +>.$
+          moves
+        (welp (flop (turn bub |=(a=(pair path note) [ost %pass a]))) moves)
       ==
+    ::
+    ++  pa-sauce                                        ::  send backward
+      |=  [ost=bone gub=(list gift)]
+      %_    +>.$
+          moves
+        (welp (flop (turn gub |=(a=gift [ost %give a]))) moves)
+      ==
+    ::
+    ++  pa-abjure                                       ::  unsubscribe move
+      |=  tal=(list partner)
+      %+  pa-scrub  0
+      %-  zing
+      %+  turn  tal
+      |=  tay=partner
+      ?-  -.tay
+        %|  ~&  tweet-abjure/p.p.tay
+            !!
+            ::  :~  :-  /friend/nuke/[man]/twitter/[p.p.tay]
+            ::      [%g %nuke [our.hid /twit] our.hid]
+            ::  ==
+      ::
+        %&  ~&  [%pa-abjure [our.hid man] [p.p.tay q.p.tay]]
+            :~  :-  /friend/show/[man]/(scot %p p.p.tay)/[q.p.tay]
+                [%g %nuke [p.p.tay /talk] our.hid]
+            ==
+      ==
+    ::
+    ++  pa-acquire                                      ::  subscribe to
+      |=  tal=(list partner)
+      %+  pa-scrub  0
+      %-  zing
+      %+  turn  tal
+      |=  tay=partner
+      ^-  (list (pair path note))
+      =+  num=(fall (~(get by sequence) tay) 0)
+      ?-  -.tay
+        %|  ~&  tweet-acquire/p.p.tay
+            :~  :-  /friend/show/[man]/twitter/[p.p.tay]
+                [%g %show [our.hid /twit] our.hid /user/[p.p.tay]]
+            ==
+      ::
+        %&  ::  ~&  [%pa-acquire [our.hid man] [p.p.tay q.p.tay]]
+            :~  :-  /friend/show/[man]/(scot %p p.p.tay)/[q.p.tay]
+                [%g %show [p.p.tay /talk] our.hid /afx/[q.p.tay]/(scot %ud num)]
+            ==
+      ==
+    ::
+    ++  pa-reform                                       ::  reconfigure, ugly
+      |=  cof=config
+      =+  ^=  dif  ^-  (pair (list partner) (list partner))
+          =+  old=`(list partner)`(~(tap in sources.shape) ~)
+          =+  new=`(list partner)`(~(tap in sources.cof) ~)
+          :-  (skip new |=(a=partner (~(has in sources.shape) a)))
+          (skip old |=(a=partner (~(has in sources.cof) a)))
+      =.  +>.$  (pa-acquire p.dif)
+      =.  +>.$  (pa-abjure q.dif)
+      =.  shape  cof
+      pa-monitor
+    ::
+    ++  pa-cancel                                       ::  unsubscribe from
+      ::  ~&  [%pa-cancel ost]
+      %_  .
+        guests  (~(del by guests) ost)
+        viewers  (~(del in viewers) ost)
+        owners  (~(del in owners) ost)
+      ==
+    ::
+    ++  pa-notify                                       ::  local presence
+      |=  [her=ship saz=status]
+      ^+  +>
+      =+  ^=  nol
+          ?:  =(%gone p.saz) 
+            (~(del by locals) her)
+          (~(put by locals) her lat.hid saz)
+      ?:  =(nol locals)  +>.$
+      (pa-display(locals nol) viewers)
+    ::
+    ++  pa-remind                                       ::  remote presence
+      |=  [tay=partner loc=atlas rem=(map partner atlas)]
+      =+  ^=  buk
+          =+  mer=(turn (~(tap by rem) ~) |=([* a=atlas] a))
+          |-  ^-  atlas
+          ?~  mer  loc
+          =.  loc  $(mer t.mer)
+          =+  dur=`(list (pair ship status))`(~(tap by i.mer) ~)
+          |-  ^-  atlas
+          ?~  dur  loc
+          =.  loc  $(dur t.dur)
+          =+  fuy=(~(get by loc) p.i.dur)
+          ?~  fuy  (~(put by loc) p.i.dur q.i.dur)
+          ?:  =(`presence`p.q.i.dur `presence`p.u.fuy)
+            loc
+          ?-  p.u.fuy
+            %gone  (~(del by loc) p.i.dur q.i.dur)
+            %talk  loc
+            %hear  (~(put by loc) p.i.dur q.i.dur)
+          ==
+      =+  gub=(~(get by remotes) tay)
+      ::  ~&  [%pa-remind tay gub buk]
+      ?.  |(?=(~ gub) !=(buk u.gub))
+        +>.$
+      =.  remotes  (~(put by remotes) tay buk)
+      (pa-display viewers)
+    ::
+    ++  pa-start                                        ::  start stream
+      |=  riv=river
+      ^+  +>
+      =-  ::  ~&  [%pa-start riv lab]
+          =.  +>.$  (pa-sauce ost [[%rush %talk-report %grams q.lab r.lab] ~])
+          ?:  p.lab
+            (pa-sauce ost [[%mean ~] ~])
+          +>.$(guests (~(put by guests) ost riv))
+      ^=  lab
+      =+  [end=count gaz=grams dun=| zeg=*(list telegram)]
+      |-  ^-  (trel ,? ,@ud (list telegram))
+      ?~  gaz  [dun end zeg]
+      ?:  ?-  -.q.riv                                   ::  after the end
+            %ud  (lte p.q.riv end)
+            %da  (lte p.q.riv p.r.q.i.gaz)
+          ==
+        $(end (dec end), gaz t.gaz)
+      ?:  ?-  -.p.riv                                   ::  before the start
+            %ud  (lth end p.p.riv)
+            %da  (lth p.r.q.i.gaz p.p.riv)
+          ==
+        [dun end zeg]
+      $(end (dec end), gaz t.gaz, zeg [i.gaz zeg])
+    ::
+    ++  pa-listen                                       ::  subscribe
+      |=  [her=ship pax=path]
+      ^+  +>
+      ?.  (pa-admire her)
+        (pa-sauce ost [[%mean ~ %talk-listen-unauthorized ~] ~])
+      =+  ^=  ruv  ^-  (unit river)
+          ?:  ?=(~ pax)
+            `[[%ud count] [%da (dec (bex 128))]]
+          ?:  ?=([@ ~] pax)
+            =+  say=(slay i.pax)
+            ?.  ?=([~ %$ ?(%ud %da) @] say)  ~
+            `[(point +>.say) [%da (dec (bex 128))]]
+          ?.  ?=([@ @ ~] pax)  ~
+          =+  [say=(slay i.pax) den=(slay i.t.pax)]
+          ?.  ?=([~ %$ ?(%ud %da) @] say)  ~
+          ?.  ?=([~ %$ ?(%ud %da) @] den)  ~
+          `[(point +>.say) (point +>.den)]
+      ::  ~&  [%pa-listen her pax ruv]
+      ?~  ruv
+        (pa-sauce ost [[%mean ~ %talk-malformed ~] ~])
+      (pa-start u.ruv)
+    ::
+    ++  pa-refresh                                      ::  update to guests
+      |=  [num=@ud gam=telegram]
+      ^+  +>
+      =+  ^=  moy
+          |-  ^-  (pair (list bone) (list move))
+          ?~  guests  [~ ~]
+          ::  ~&  [%pa-refresh num n.guests]
+          =+  lef=$(guests l.guests)
+          =+  rit=$(guests r.guests)
+          =+  old=[p=(welp p.lef p.rit) q=(welp q.lef q.rit)]
+          ?:  ?-  -.q.q.n.guests                        ::  after the end
+                %ud  (lte p.q.q.n.guests num)
+                %da  (lte p.q.q.n.guests p.r.q.gam)
+              ==
+            [[p.n.guests p.old] [[p.n.guests %give %mean ~] q.old]]
+          ?:  ?-  -.p.q.n.guests                        ::  before the start
+                %ud  (gth p.p.q.n.guests num)
+                %da  (gth p.p.q.n.guests p.r.q.gam)
+              ==
+            old
+          :-  p.old
+          [[p.n.guests %give %rush %talk-report %grams num gam ~] q.old]
+      =.  moves  (welp q.moy moves)
+      |-  ^+  +>.^$
+      ?~  p.moy  +>.^$
+      $(p.moy t.p.moy, guests (~(del by guests) i.p.moy))
+    ::
+    ++  pa-lesson                                       ::  learn multiple
+      |=  gaz=(list telegram)
+      ^+  +>
+      ?~  gaz  +>
+      $(gaz t.gaz, +> (pa-learn i.gaz))
+    ::
+    ++  pa-learn                                        ::  learn message
+      |=  gam=telegram
+      ^+  +>
+      ?.  (pa-admire p.gam)
+        ~&  %pa-admire-rejected
+        +>.$
+      =.  q.q.gam  
+        =+  ole=(~(get by q.q.gam) [%& our.hid man])
+        ?~  ole  q.q.gam
+        (~(put by q.q.gam) [%& our.hid man] -.u.ole %received)
+      =+  old=(~(get by known) p.q.gam)
+      ?~  old
+        (pa-append gam)
+      (pa-revise u.old gam)
+    ::
+    ++  pa-append                                       ::  append new
+      |=  gam=telegram
+      ^+  +>
+      %+  %=  pa-refresh
+            grams  [gam grams]
+            count  +(count)
+            known  (~(put by known) p.q.gam count)
+          ==
+        count
+      gam
+    ::
+    ++  pa-revise                                       ::  revise existing
+      |=  [num=@ud gam=telegram]
+      =+  way=(sub count num)
+      =.  grams  (welp (scag (dec way) grams) [gam (slag way grams)])
+      (pa-refresh num gam)
     --
   --
-++  ny                                                  ::  top configuration
-  |_  moz=(list move)
-  ++  ny-abet                                           ::  resolve core
-    ^-  [(list move) _+>]
-    [(flop moz) +>]
+::
+++  sn                                                  ::  station render core
+  |_  [man=span one=station] 
+  ++  sn-best                                           ::  best to show
+    |=  two=station
+    ^-  ?
+    ?:  =(our.hid p.one)
+      ?:  =(our.hid p.two)
+        ?<  =(q.one q.two)
+        ?:  =((main p.one) q.one)  %&
+        ?:  =((main p.two) q.two)  %|
+        (lth q.one q.two)
+      %&
+    ?:  =(our.hid p.two)
+      %|
+    ?:  =(p.one p.two)
+      (lth q.one q.two)
+    (lth p.one q.one)
   ::
-  ++  ny-amid                                           ::  integrate story
-    |=  nov=_sy
-    =^  zom  +>+>  sy-abet:nov
-    +>.$(moz (flop zom))
+  ++  sn-curt                                           ::  render name in 14
+    |=  mup=?
+    ^-  tape
+    =+  ^=  syl
+        |=  [len=@ud sez=(list cord)]
+        ?>  !=(0 len)
+        |-  ^-  tape
+        ?~  sez  ~
+        =+  nez=(trip i.sez)
+        =+  nel=(lent nez)
+        ?:  (gte nel len)
+          (welp (scag (dec len) nez) ">")
+        (welp nez $(sez t.sez))
+    ::
+    ?:  =(p.one our.hid)
+      ?:  =(q.one man)
+        (sigh 14 ?:(mup "*=" "=") %$)
+      (sigh 14 ?:(mup "*%" "%") q.one)
+    ?:  =(p.one (sein our.hid))
+      (sigh 14 ?:(mup "*/" "/") q.one)
+    =+  rac=(clan p.one) 
+    =+  raw=(scow %p p.one)
+    =.  raw  ?.(mup raw ['*' (slag 2 raw)])
+    ?-    rac
+        %czar  (weld "          " raw)
+        %king  (weld "       " raw)
+        %duke  raw
+        %earl  :(welp (scag 7 raw) "^" (scag 6 (slag 22 raw)))
+        %pawn  :(welp (scag 7 raw) "_" (scag 6 (slag 51 raw)))
+    ==
   ::
-  ++  ny-tune                                           ::  connect to story
-    |=  man=span
-    ^+  +>
-    ?:  =(`man live)
-      +>(moz hy-abet:(hy-print:(hype moz) "already tuned to {(trip man)}"))
-    ?.  (~(has by stories) man)
-      +>(moz hy-abet:(hy-print:(hype moz) "no story {(trip man)}"))
-    =.  +>  ny-stop
-    =.  live  `man
-    ::  ~&  [%tune-start man]
-    (ny-amid sy-subscribe:(need (novel moz)))
-  ::
-  ++  ny-stop                                           ::  disconnect story
-    ^+  .
-    ?~  live  .
-    (ny-amid(live ~) sy-unsubscribe:(need (novel moz)))
-  ::
-  ++  ny-tell                                           ::  hear from server
-    |=  sap=(map span (pair posture cord))
-    ^+  +>
-    =.  +>  ?.(&(?=(^ live) !(~(has by sap) u.live)) +> ny-stop)
-    =.  stories
-      =+  pas=(~(tap by sap))
-      =+  ros=(skim (~(tap by stories)) |=([a=span *] (~(has by sap) a)))
-      %-  ~(gas by *(map span story))
-      |-  ^-  (list (pair span story))
-      ?~  pas  
-        %+  turn  ros
-        |=  [a=span b=story]
-        =+  hig=(~(get by sap) a)
-        [a ?~(hig b b(poe p.u.hig, desc q.u.hig))]
-      =+  sor=$(pas t.pas)
-      ?:  (~(has by stories) i.pas) 
-        sor 
-      =+  soy=*story
-      [[p.i.pas soy(poe p.q.i.pas, desc q.q.i.pas)] sor]
-    ?^  live  +>.$
-    ?~  stories  +>.$
-    ?:  (~(has by `(map span story)`stories) (main our.hid))
-      (ny-tune (main our.hid))
-    (ny-tune p.n.stories)
-  ::
-  ++  ny-work                                           ::  user command
-    |=  jaw=work-construct
-    ^+  +>
-    ?-    -.jaw
-        %raze  +>(moz hy-abet:(hy-transmit:(hype moz) [%design p.jaw ~]))
-        %tune  (ny-tune p.jaw)
-        %make  
-      %=    +>
-          moz 
-        hy-abet:(hy-transmit:(hype moz) [%design p.jaw [~ ~ %default %black ~]])
+  ++  sn-phat                                           ::  render accurately
+    ^-  tape
+    ?:  =(p.one our.hid)
+      ?:  =(q.one man)
+        "="
+      ['%' (trip q.one)]
+    ?:  =(p.one (sein our.hid))
+      ['/' (trip q.one)]
+    =+  wun=(scow %p p.one)
+    ?:  =(q.one (main p.one))
+      wun
+    :(welp wun "/" (trip q.one))
+  --
+::
+++  ta                                                  ::  partner core
+  |_  [man=span one=partner]
+  ++  ta-beat                                           ::  more relevant
+    |=  two=partner  ^-  ?
+    ?-    -.one
+        %&  
+      ?-  -.two
+        %|  %&
+        %&  (~(sn-best sn man p.one) p.two)
       ==
+    ::
+        %|
+      ?-  -.two
+        %&  %|
+        %|  ?:  =(-.p.two -.p.one)
+              (lth (mug +.p.one) (mug +.p.two))
+            (lth -.p.two -.p.one)
+      ==
+    ==
+  ++  ta-best                                           ::  most relevant 
+    |=(two=partner ?:((ta-beat two) one two))
+  ::
+  ++  ta-full  (ta-show ~)                              ::  render full width
+  ++  ta-show                                           ::  render partner
+    |=  moy=(unit ,?)
+    ^-  tape
+    ?-    -.one
+        %&  
+      ?~  moy 
+        ~(sn-phat sn man p.one)
+      (~(sn-curt sn man p.one) u.moy)
+    ::
+        %|
+      =+  ^=  pre  ^-  tape
+          ?-  -.p.one
+            %twitter  "@t:"
+          ==
+      ?~  moy
+        (weld pre (trip p.p.one))
+      =.  pre  ?.(=(& u.moy) pre ['*' pre])
+      (sigh 14 pre p.p.one)
     ==
   --
 ::
-++  novel                                               ::  live story
-  |=  moz=(list move)
-  ^-  (unit ,_sy)
-  ?~  live  ~
-  `~(. sy [u.live moz] (~(got by stories) u.live))
+++  te                                                  ::  audience renderer
+  |_  [man=span lix=(set partner)]
+  ++  te-best  ^-  (unit partner)
+    ?~  lix  ~
+    :-  ~
+    |-  ^-  partner
+    =+  lef=`(unit partner)`te-best(lix l.lix)
+    =+  rit=`(unit partner)`te-best(lix r.lix)
+    =.  n.lix  ?~(lef n.lix (~(ta-best ta man n.lix) u.lef))
+    =.  n.lix  ?~(rit n.lix (~(ta-best ta man n.lix) u.rit))
+    n.lix
+  ::
+  ++  te-deaf  ^+  .                                    ::  except for self
+    .(lix (~(del in lix) `partner`[%& our.hid man]))
+  ::
+  ++  te-maud  ^-  ?                                    ::  multiple audience
+    =.  .  te-deaf
+    ?~  lix  %|
+    |(!=(~ l.lix) !=(~ r.lix))
+  ::
+  ++  te-prom  ^-  tape                                 ::  render targets
+    =.  .  te-deaf
+    =+  ^=  all
+        %+  sort  `(list partner)`(~(tap in lix))
+        |=  [a=partner b=partner]
+        (~(ta-beat ta man a) b)
+    =+  fir=&
+    |-  ^-  tape
+    ?~  all  ~
+    ;:  welp
+      ?:(fir "" " ")
+      (~(ta-show ta man i.all) ~)
+      $(all t.all, fir |)
+    ==
+  ::
+  ++  te-whom                                           ::  render sender
+    (~(ta-show ta man (need te-best)) ~ te-maud)
+  --
+::
+++  tr                                                  ::  telegram renderer
+  |_  $:  man=span
+          who=ship
+          sen=serial
+          aud=audience
+          wen=@da
+          bou=(set flavor)
+          sep=speech
+      ==
+  ++  tr-line  ^-  tape                                 ::  one-line print
+    =+  oug==(who our.hid)
+    =+  txt=(tr-text oug)
+    ?:  =(~ txt)  ""
+    =+  eck=?:((~(has by aud) [%& our.hid man]) '*' '-')
+    =+  heb=?:(oug '>' '<')
+    =+  ^=  baw
+        ?:  oug 
+          ~(te-whom te man tr-pals)
+        (~(sn-curt sn man [who (main who)]) |)
+    [heb eck (weld baw txt)]
+  ::
+  ++  tr-pals
+    ^-  (set partner)
+    %-  ~(gas in *(set partner))
+    (turn (~(tap by aud)) |=([a=partner *] a))
+  ::
+  ++  tr-text
+    |=  oug=?
+    ^-  tape
+    ?+    -.sep  ""
+        %url  (weld ": " (scag 62 (earn p.sep)))
+        %lin
+      =+  txt=(trip q.sep)
+      ?:  p.sep
+        (weld ": " txt)
+      ?:  oug
+        (weld "@ " txt)
+      (weld " " txt)
+    ==
+  -- 
 ::
 ++  peer
-  |=  [ost=bone you=ship pax=path]
+  |=  [ost=bone her=ship pax=path]
   ^-  [(list move) _+>]
-  [~ +>.$]
+  ?:  ?=([%sole *] pax)
+    ?>  =(our.hid her)
+    ?<  (~(has by shells) ost)
+    ra-abet:(~(ra-console ra ost ~) her t.pax)
+  ::  ~&  [%talk-peer-data ost her pax]
+  ra-abet:(~(ra-subscribe ra ost ~) her pax)
 ::
-++  pour-shell
-  |=  txt=cord
+++  poke-talk-command
+  |=  [ost=bone her=ship cod=command]
   ^-  [(list move) _+>]
-  =+  jub=(rush txt work:(parse our.hid))
-  ?~  jub
-    [hy-abet:(hy-print:(hype ~) "invalid input") +>.$]
-  ?:  ?=(%wry -.u.jub)
-    ny-abet:(ny-work:ny +.u.jub)
-  =+  nuv=(novel ~)
-  ?~  nuv  [hy-abet:(hy-print:(hype ~) "not tuned to any story") +>.$]
-  sy-abet:(sy-work:u.nuv u.jub)
+  ::  ~&  [%talk-poke-command her cod]
+  ra-abet:(~(ra-apply ra ost ~) her cod)
+::
+++  poke-sole-action
+  |=  [ost=bone her=ship act=sole-action]
+  ra-abet:(~(ra-sole ra ost [ost %give %nice ~]~) act)
 ::
 ++  pour
   |=  [ost=bone pax=path sih=*]
   ^-  [(list move) _+>]
-  ~|  sign=sih
-  =>  .(sih ((hard sign) sih))
-  ::  ~&  talk-pour/sih
-  ?~  pax  ~&  talk-pour-strange-path/pax  !!
-  ?+    i.pax  ~&  talk-pour-strange-path/pax  
-               ~&  sign/sih
-               !!
-      %command
-    ?+    +<.sih  !!
-      %nice  [~ +>.$]
-      %mean  ~|([%pour-mean-cmd-in +>.sih] !!)
-    ==
-      %cmd-in
-    ?+    +<.sih  !!
-        %nice  [~ +>.$]
-        %mean  ~|([%pour-mean-cmd-in +>.sih] !!)
-        %rush
-      ?>  ?=(%txt -.p.sih)
-      =^  moz  +>.$  (pour-shell p.p.sih)
-      :_  +>.$
-      :_(moz [ost %pass pax %g %took [our.hid +.imp.hid] our.hid])
+  ::  ~&  sih=sih
+  =+  sih=((hard sign) sih)
+  ::  ~&  [%talk-pour ost pax sih]
+  ?+    pax  ~&  [%talk-strange-path pax]  !!
+  ::
+      [%twitter *]
+    =-  ra-abet:(~(ra-twitter ra ost ~) met sih)
+    ^=  met
+    ?+    t.pax  ~|  [%talk-twitter-strange-path pax]  !!
+      ::    [%mine @ @ ~]
+      ::  [i.t.pax i.t.t.t.pax]
+        [%stat @ @ ~]
+      [(slav %ud i.t.t.pax) i.t.t.t.pax]
     ==
   ::
-      %cmd-ac
-    ?+  +<.sih  !!
-        %nice  [~ +>.$]
-        %mean  ~|([%pour-mean-cmd-ac +>.sih] !!)
-        %rush
-      :_  +>.$
-      [ost %pass pax %g %took [our.hid +.imp.hid] our.hid]~
-    ==
-  ::
-      %server
-    ?+    +<.sih  !!
-        %nice  [~ +>.$]
-        %mean  ~|(%talk-server-crash !!)
-        %rush
-      ?>  ?=([%rodeo-report %house *] p.sih)
-      =^  moz  +>.$  ny-abet:(ny-tell:ny +.p.p.sih)  
-      :_  +>.$
-      :_(moz [ost %pass pax %g %took [our.hid /rodeo] our.hid])
-    ==
-  ::
-      %time
-    :_  +>.$
-    ::  ~&  [%talk-pour-time lat.hid `@da`(add ~s10 lat.hid)]
-    :~  [0 %pass /time %t %wait (add ~s10 lat.hid)]
-    ==
-  ::
-      %fm
-    ?>  ?=([@ *] t.pax)
-    ?.  =(& &(?=(^ live) =(u.live i.t.pax)))
-      ~&  [%talk-wrong-story live i.t.pax] 
+      [%friend *]
+    ?>  ?=([@ @ @ @ ~] t.pax)
+    ?.  =(%show i.t.pax)
+      ::  ~&  [%pour-friend-nuke-nuke pax]
       [~ +>.$]
-    ?>  ?=(%g -.sih)
-    =^  moz  +>.$  sy-abet:(sy-sign:(need (novel ~)) +.sih)
-    :_  +>.$
-    :_(moz `move`[ost %pass pax %g %took [our.hid /rodeo] our.hid])
+    =+  man=i.t.t.pax
+    =+  ?:  ?=(%twitter i.t.t.t.pax)
+          tay=[%| i.t.t.t.pax i.t.t.t.t.pax]
+        tay=[%& (slav %p i.t.t.t.pax) i.t.t.t.t.pax]
+    ra-abet:(~(ra-friend ra ost ~) man tay sih)
+  ::
+      [%repeat *]
+    ?>  ?=([@ @ @ ~] t.pax)
+    =+  [num her man]=[(slav %ud i.t.pax) (slav %p i.t.t.pax) i.t.t.t.pax]
+    ra-abet:(~(ra-repeat ra ost ~) num [%& her man] sih)
   ==
 ::
-++  poke-talk-args
-  |=  [ost=bone you=ship arg=~]
+++  pull
+  |=  ost=bone
   ^-  [(list move) _+>]
-  :_  +>
-  :~  [0 %pass /cmd-in %g %show [our.hid +.imp.hid] you /in/[-.imp.hid]]
-      [0 %pass /time %t %wait (add ~s10 lat.hid)]
-      [0 %pass /cmd-ac %g %show [our.hid +.imp.hid] you /active/[-.imp.hid]]
-      ^-  move
-      :*  0    %pass  /server
-          %g   %show  
-          [our.hid /rodeo]  our.hid
-          /
-      ==
+  ::  ~&  [%talk-pull `*`ost]
+  =^  moz  +>.$  ra-abet:ra-ever:~(ra-cancel ra ost ~)
+  [moz +>.$(shells (~(del by shells) ost))]
+::
+++  poke-bit
+  |=  [ost=bone you=ship ~]
+  ^-  [(list move) _+>]
+  :_  +>.$
+  =+  paf=/(scot %p our.hid)/main/(scot %da lat.hid)/talk/backlog/mime
+  :_  ~
+  :*  ost  %pass  /jamfile  %c  %info  our.hid
+      (foal paf %mime !>([/mime/jam (taco (jam +<+.+>.$))]))
   ==
+::
+++  prep
+  |=  old=(unit (unit house-any))
+  ^-  [(list move) _+>]
+  ?>  ?=(^ old)
+  =|  moz=(list move)
+  |-
+  ?~  u.old
+    =+  paf=/(scot %p our.hid)/main/(scot %da lat.hid)/talk/backlog/mime
+    ?.  ?=([%0 %0 %0] [.^(%cy paf)])
+      ~&  %talk-prep-restore
+      $(u.old (some ((hard house-any) (cue ((hard ,@) .^(%cx paf))))))
+    ra-abet:~(ra-init ra 0 moz)
+  :-  moz
+  |-
+  ?-  -.u.u.old
+    %1  %_(+>.^^$ +<+ u.u.old)
+    %0  $(u.u.old [%1 (house-0-to-house-1 +.u.u.old)])
+  ==
+::
+++  house-0-to-house-1
+  |=  vat=house-0
+  ^-  house-1
+  =-  :*  stories=-
+          general=~
+          outbox=[0 ~]
+          folks=~
+          shells=~
+      ==
+  ^-  (map span story)
+  =-  %-  ~(run by -)
+      |=  grams=(list telegram)
+      ^-  story
+      :*  count=(lent grams)
+          grams=grams
+          locals=~
+          remotes=~
+          mirrors=~
+          sequence=~
+          shape=[.(cordon [%black ~])]:*config
+          ^=  known  %-  mo  ^-  (list ,[serial @])  =<  +
+          (roll grams |=([telegram a=@ b=(list ,[serial @])] [+(a) [a p.q] b]))
+          guests=~
+          viewers=~
+          owners=~
+      ==
+  ^-  (map span (list telegram))
+  %-  mo  %+  turn  (~(tap by vat))
+  |=  [a=path b=(list zong) c=(map ship ,?)]
+  =+  ^=  par
+      ?:  =(/ a)  'hub'
+      =+  (turn a |=(d=span leaf/(trip d)))
+      (crip ~(ram re %rose ["_" ~ ~] -))
+  :-  par
+  =+  aud=`audience`[[[%& our.hid par] *envelope %received] `~]
+  =+  ^=  spe
+      |=  r=_r:*zong  ^-  speech
+      ?-  -.r
+        %say  [%lin %& p.r]
+        %do   [%lin %| p.r]
+        %exp  [%fat [%tank q.r ~] [%exp p.r]]
+      ==
+  %+  turn  b
+  |=  d=zong  ^-  telegram
+  [q.d (sham eny.hid d) aud p.d ~ (spe r.d)]
 --
diff --git a/main/app/tease/core.hook b/main/app/tease/core.hook
new file mode 100644
index 0000000000..144ef4724d
--- /dev/null
+++ b/main/app/tease/core.hook
@@ -0,0 +1,28 @@
+::                                                      ::  ::
+::::  /hook/core/tease/app                              ::  ::
+  ::                                                    ::  ::
+/?  314                                                 ::  zuse version
+/-  *console                                            ::  console structures
+/+  console                                             ::  console library
+!:                                                      ::  ::
+::::                                                    ::  ::
+  ::                                                    ::  ::
+|_  [hid=hide ~]
+++  peer  ,_`.
+++  poke--args
+  |=  [ost=bone you=ship ~]
+  ~&  %tease
+  :_  +>.$
+  :~  :*  0    %pass  ~
+          %g   %show  
+          [our.hid /seat]  our.hid
+          /
+      ==
+      :*  0    %pass  ~
+          %g   %mess  
+          [our.hid /seat]  our.hid
+          %dill-belt
+          !>(`dill-belt`[%yow %helm])
+      ==
+  ==
+--
diff --git a/main/app/terminal/core.hook b/main/app/terminal/core.hook
index 1284076d81..f3ad9c99f5 100644
--- a/main/app/terminal/core.hook
+++ b/main/app/terminal/core.hook
@@ -285,7 +285,7 @@
 ++  pour
   |=  [ost=bone pax=path sih=*]
   ^-  [(list move) _+>]
-  =+  sih=((hard sign) sih)
+  =+  sih=~|([%term-pour (,[term term ~] sih)] ((hard sign) sih))
   ?:  ?=(?(%sage %init %logo %verb %veer %vega) &2.sih) ::  vomit
     [[ost %give +.sih]~ +>.$]
   ?~  pax  !!
diff --git a/main/app/terminal/hymn.hook b/main/app/terminal/hymn.hook
index f17dc1985e..7df1fb8462 100644
--- a/main/app/terminal/hymn.hook
+++ b/main/app/terminal/hymn.hook
@@ -13,7 +13,7 @@
   ;head
     ;title: Hi
     ;script: window.urb = window.urb || \{};
-    ;script@"/gen/main/lib/urb.js";
+    ;script@"/~/at/main/lib/urb.js";
     ;script@"//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js";
     ;script@"//cdnjs.cloudflare.com/ajax/libs/mousetrap/1.4.6/mousetrap.js";
     ;script@"//use.typekit.net/fkv0sjk.js";
diff --git a/main/app/terminal/hymn/script.js b/main/app/terminal/hymn/script.js
index 817cb73f97..3aa0b4700f 100644
--- a/main/app/terminal/hymn/script.js
+++ b/main/app/terminal/hymn/script.js
@@ -1,3 +1,8 @@
+urb.appl = urb.appl ||
+  window.location.pathname.match(/.*?app\/([a-z0-9-]+)/)[1]
+urb.term = urb.term || 
+  {pax: location.pathname.replace(new RegExp(".*?app/"+urb.appl),'') || '/'}
+
 function jpok(a,b){
   var dat = {pax:urb.term.pax, act:{}}
   dat.act[a] = b
diff --git a/main/app/test/core.hook b/main/app/test/core.hook
index 3469b292c3..ce86491ea2 100644
--- a/main/app/test/core.hook
+++ b/main/app/test/core.hook
@@ -6,7 +6,7 @@
 ::::  /hook/core/test/app
   ::
 /?    314                                               ::  need urbit 314
-/=    front  /:/%%/front:/hymn/                         ::  load front page
+:: /=    front  /:/%%/front:/hymn/                         ::  load front page
 ::
 ::::  structures
   ::
@@ -297,7 +297,7 @@
   |=  [ost=bone you=ship pax=path]
   ^-  [(list move) _+>]
   ~&  [%test-peer hid]
-  ?~  pax  [[ost %give %rust %hymn front]~ +>.$]
+  ?~  pax  !! ::[[ost %give %rust %hymn front]~ +>.$]
   ?:  ?=(%tests -.pax)
     [[ost %give %rust %json tests-json:et]~ +>.$]
   :_  +>.$  :_  ~
@@ -308,7 +308,7 @@
 ++  poke-json                                           ::  browser message
   |=  [ost=bone you=ship jon=json]
   ^-  [(list move) _+>]
-  ~&  [%test-poke hid]
+  ~&  [%test-poke hid you]
   =+  tes=((of [%test so] ~):jo jon)
   ?~  tes  [[ost %give %mean ~ %strange-json ~]~ +>.$]
   =+  tst=(~(get by tests) +.u.tes)
diff --git a/main/arvo/ames.hoon b/main/arvo/ames.hoon
index 9e706cf8eb..6edff2bf86 100644
--- a/main/arvo/ames.hoon
+++ b/main/arvo/ames.hoon
@@ -35,31 +35,31 @@
 ++  move  ,[p=duct q=(mold note gift)]                  ::  local move
 ++  note                                                ::  out request $->
           $?  $:  %d                                    ::  to %dill
-                  $%  [%flog p=flog]                    ::
-              ==  ==                                    ::
+          $%  [%flog p=flog]                            ::
+          ==  ==                                        ::
               $:  %a                                    ::  to %ames
-                  $%  [%kick p=@da]                     ::
-              ==  ==                                    ::
+          $%  [%kick p=@da]                             ::
+          ==  ==                                        ::
               $:  %g                                    ::  to %gall
-                  $%  [%rote p=sack q=path r=*]         ::
-                      [%roth p=sack q=path r=*]         ::
-                      [%mess p=[@p %ye ~] q=@p r=cage]  ::
-              ==  ==                                    ::
+          $%  [%rote p=sack q=path r=*]                 ::
+              [%roth p=sack q=path r=*]                 ::
+              [%mess p=[@p %ye ~] q=@p r=cage]          ::
+          ==  ==                                        ::
               $:  @tas                                  ::  to any
-                  $%  [%init p=@p]                      ::
-                      [%want p=sock q=path r=*]         ::
-                      [%wart p=sock q=@tas r=path s=*]  ::
+          $%  [%init p=@p]                              ::
+              [%want p=sock q=path r=*]                 ::
+              [%wart p=sock q=@tas r=path s=*]          ::
           ==  ==  ==                                    ::
 ++  sign                                                ::  in result $<-
           $?  $:  %a                                    ::  from %ames
-                  $%  [%went p=ship q=cape]             ::
-              ==  ==                                    ::
+          $%  [%went p=ship q=cape]                     ::
+          ==  ==                                        ::
               $:  %g                                    ::  from %gall
-                  $%  [%mean p=ares]                    ::
-                      [%nice ~]                         ::
-              ==  ==                                    ::
+          $%  [%mean p=ares]                            ::
+              [%nice ~]                                 ::
+          ==  ==                                        ::
               $:  @tas                                  ::
-                  $%  [%crud p=@tas q=(list tank)]      ::  by any
+          $%  [%crud p=@tas q=(list tank)]              ::  by any
           ==  ==  ==                                    ::
 --
   ::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@@ -227,7 +227,7 @@
         0w0                           ::   55, ~tep, Curtis Yarvin (sator)
         0w0                           ::   56, ~bes, Curtis Yarvin (sator)
         0w0                           ::   57, ~dex, Jared Hance (aestas) 
-        0w0                           ::   58, ~sef, Curtis Yarvin (sator)
+        0w0                           ::   58, ~sef, Owen Rescher (lex)
         0w0                           ::   59, ~wyc, Curtis Yarvin (sator)
         0w0                           ::   60, ~bur, Curtis Yarvin (sator)
         0w0                           ::   61, ~der, Curtis Yarvin (sator)
@@ -370,7 +370,7 @@
         0w0                           ::  198, ~len, Tlon (gleba)
         0w0                           ::  199, ~ner, Tlon (gleba)
         0wv.aixe9.7gG2w.7cJiy.i3Mg8   ::  200, ~lex, Michael Hartl (donum)
-        0w0                           ::  201, ~rup, Tlon (gleba)
+        0w0                           ::  201, ~rup, Owen Rescher (lex)
         0w0                           ::  202, ~ned, Tlon (gleba)
         0w0                           ::  203, ~lec, Tlon (gleba)
         0w0                           ::  204, ~ryd, Tlon (gleba)
@@ -631,12 +631,12 @@
             =^  gim  ..weft  wisp
             :_  +>.$
             ^-  (list rock)
-            =+  wit=(met ?:(fak.ton 18 13) q.gim)
+            =+  wit=(met ?:(fak.ton 16 13) q.gim)
             ?<  =(0 wit)
             ?:  =(1 wit)
               =+  yup=(spit [our her] p.gim q.gim)
               [yup ~]
-            =+  ruv=(rip ?:(fak.ton 18 13) q.gim)
+            =+  ruv=(rip ?:(fak.ton 16 13) q.gim)
             =+  gom=(shaf %thug q.gim)
             =+  inx=0
             |-  ^-  (list rock)
@@ -1409,7 +1409,7 @@
             =+  [nix=0 rax=*(list ,@)]
             |-  ^-  @
             ?:  =(p.duv nix)
-              (can ?:(fak.ton.fox 18 13) (turn (flop rax) |=(a=@ [1 a])))
+              (can ?:(fak.ton.fox 16 13) (turn (flop rax) |=(a=@ [1 a])))
             $(nix +(nix), rax [(need (~(get by q.duv) nix)) rax])
           --                                            ::  --la:ho:um:am
         ::
@@ -1662,7 +1662,6 @@
     ?-    -.bon
         %beer
       :_  fox(zac (~(put by zac.fox) p.bon `corn`[hen ~ ~ ~]))
-      ::  ~&  [%ames-clop p.bon hen]
       :*  [hen [%slip %c %init p.bon]]
           [hen [%give %init p.bon]]
           [hen [%slip %a %kick now]]
@@ -1688,6 +1687,8 @@
         %milk
       ::  ~&  [%rx p.bon q.bon]
       ?>  ?=([@ *] q.q.bon)
+      ?:  ?=(%e i.q.q.bon)
+        :_(fox [hen [%slip %e %wart p.bon %$ t.q.q.bon r.bon]]~)
       ?:  ?=(%r i.q.q.bon)
         ?:  ?=([%ta *] t.q.q.bon)
           =+  wil=((hard (unit will)) r.bon)
@@ -1696,7 +1697,7 @@
               :+  (scot %p p.p.bon)
                 (scot %p q.p.bon)
               q.q.bon
-          [hen %pass pax %g %rote p.bon /began 0 %m %will wil]~
+          [hen %pass pax %g %rote p.bon /helm 0 %m %will wil]~
         ?>  ?=([@ @ *] t.q.q.bon)
         :_  fox
         =+  [cak=i.t.q.q.bon ven=i.t.t.q.q.bon]
diff --git a/main/arvo/clay.hoon b/main/arvo/clay.hoon
index aa39d010e1..f901aa9ed0 100644
--- a/main/arvo/clay.hoon
+++ b/main/arvo/clay.hoon
@@ -3,7 +3,6 @@
 ::
 |=  pit=vase
 =>  |%
-++  bead  ,[p=(set beam) q=gage]                        ::  ford result
 ++  cane                                                ::  change set
           $:  new=(map path lobe)                       ::  new files
               cal=(map path lobe)                       ::  old diffs
@@ -91,7 +90,7 @@
               [%writ p=riot]                            ::
           ==  ==                                        ::
               $:  %f                                    ::
-          $%  [%made p=(each bead (list tank))]         ::
+          $%  [%made p=@uvH q=(each gage (list tank))]  ::
           ==  ==                                        ::
               $:  %t                                    ::
           $%  [%wake ~]                                 ::  timer activate
@@ -216,15 +215,15 @@
     ?~(nao ~ (read-at-aeon:ze u.nao mun))
   ::
   ++  made-to-tage
-    |=  res=(each bead (list tank))
+    |=  res=(each gage tang)
     ^-  tage
     ?:  ?=(%| -.res)  
       ~|  %ford-fail
       ~>  %mean.|.(p.res)             ::  interpolate ford fail into stack trace
       !!
-    ?@  p.q.p.res
+    ?@  p.p.res
       ~|(%bad-marc !!)
-    q.p.res
+    p.res
   ::
   ++  tage-to-cages
     |=  tab=tage
@@ -587,7 +586,7 @@
     (checkout-ankh(lat.ran lat.ran.+.hat) u.-.hat)
   ::
   ++  take-inserting
-    |=  [wen=@da res=(each bead (list tank))]
+    |=  [wen=@da res=(each gage tang)]
     ^+  +>
     ?~  dok
       ~&  %clay-take-inserting-unexpected-made  +>.$
@@ -607,7 +606,7 @@
     [((hard path) q.q.pax) cay]
   ::
   ++  take-diffing
-    |=  [wen=@da res=(each bead (list tank))]
+    |=  [wen=@da res=(each gage tang)]
     ^+  +>
     ?~  dok
       ~&  %clay-take-diffing-unexpected-made  +>.$
@@ -629,7 +628,7 @@
     [paf (page-to-lobe:ze [p q.q]:cay) (~(got by dig.u.dok) paf)]
   ::
   ++  take-mutating
-    |=  [wen=@da res=(each bead (list tank))]
+    |=  [wen=@da res=(each gage tang)]
     ^+  +>
     ?~  dok
       ~&  %clay-take-mutating-unexpected-made  +>.$
@@ -651,40 +650,9 @@
       ~
     =+  paf=((hard path) q.q.pax)
     `[paf (~(got by muh.u.dok) paf) cay]
-    ::  |=  [wen=@da pax=path res=(each bead (list tank))]
-    ::  ^+  +>
-    ::  ?~  dok
-    ::    ~&  %clay-unexpected-made  +>.$
-    ::  ?.  (lien lon.u.dok |=(path =(+< pax)))
-    ::    ~&  %clay-strange-made  +>.$
-    ::  ?:  ?=(%| -.res)
-    ::    %_    +>.$
-    ::        dok  ~
-    ::      ::    tag
-    ::      ::  %-  welp  :_  tag
-    ::      ::  ^-  (list ,[duct path note])
-    ::      ::  %+  murn  lon.u.dok
-    ::      ::  |=  a=path
-    ::      ::  ^-  (unit ,[duct path note])
-    ::      ::  ?:  =(pax a)  ~
-    ::      ::  `[hen [%diffing (scot %p who) syd (scot %da wen) a] %f %exec who ~]
-    ::    ::
-    ::        yel
-    ::      :_  yel
-    ::      [hen %note '!' %rose [" " "" ""] leaf/"clay diff failed" >pax< p.res]
-    ::    ==
-    ::  ?.  ?=(@ p.q.p.res)  ~|  %bad-marc  !!
-    ::  =:  lon.u.dok  (skip lon.u.dok |=(path =(+< pax)))
-    ::      sot.u.dok  ?:  =(%null p.q.p.res)
-    ::                   sot.u.dok
-    ::                 [[pax %dif q.p.res] sot.u.dok]
-    ::  ==
-    ::  ?~  lon.u.dok
-    ::    (apply-edit wen)
-    ::  +>.$
   ::
   ++  take-patch
-    |=  res=(each bead (list tank))
+    |=  res=(each gage tang)
     ^+  +>
     ::  ~&  %taking-patch
     ?:  ?=(%| -.res)
@@ -728,7 +696,7 @@
         (echo now %& *cart sim)
       ==
     ?~  dok  ~&  %no-dok  +>.$
-    =+  cay=q.p.res
+    =+  cay=p.res
     ?@  p.cay  ~|  %patch-bad-marc  !!
     ::  ~&  %canning
     =+  ^=  can
@@ -782,7 +750,7 @@
     ==
   ::
   ++  take-ergo
-    |=  res=(each bead (list tank))
+    |=  res=(each gage tang)
     ^+  +>
     ?:  ?=(%| -.res)
       %_    +>.$
@@ -790,7 +758,7 @@
         [[hen %note '!' %rose [" " "" ""] leaf/"clay ergo failed" p.res] yel]
       ==
     ?~  hez  ~&  %no-sync-duct  !!
-    =+  cay=q.p.res
+    =+  cay=p.res
     ?@  p.cay  ~|  %patch-bad-marc  !!
     %=    +>.$
         reg
@@ -1002,7 +970,7 @@
     ==
   ::
   ++  take-foreign-plops
-    |=  res=(each bead (list tank))
+    |=  res=(each gage tang)
     ^+  +>
     ?>  ?=(^ ref)
     ?>  ?=(^ nak.u.ref)
@@ -1010,7 +978,7 @@
       ~|  "validate foreign plops failed"
       ~|  [%plop-fail (turn p.res |=(tank ~(ram re +<)))]
       !!
-    =+  cay=q.p.res
+    =+  cay=p.res
     ?@  p.cay  ~|  %plop-bad-marc  !!
     =+  |-  ^-  lat=(list blob)
         ?~  p.p.cay
@@ -1088,7 +1056,7 @@
       ::  ~&  %reading-at-aeon
       =+  vid=(read-at-aeon:ze u.nao p.q.i.xiq)
       ::  ~&  %red-at-aeon
-      ?~  vid  ~&  [%oh-well mood=p.q.i.xiq]  $(xiq t.xiq, xaq [i.xiq xaq])
+      ?~  vid  ~&  [%oh-well mood=p.q.i.xiq aeon=nao]  $(xiq t.xiq, xaq [i.xiq xaq])
       $(xiq t.xiq, ..wake (balk p.i.xiq u.vid p.q.i.xiq))
     ::
         %many
@@ -1472,7 +1440,7 @@
       :-  -:!>(*arch)
       ^-  arch
       :+  *@uvI
-        ?.((~(has by q.yak) pax) ~ `0vfak.ehash)
+        ?.((~(has by q.yak) pax) ~ `0vfak.ehash)        ::  XX  hash of lobes
       ^-  (map span ,~)
       %-  mo  ^-  (list (pair span ,~))
       %+  turn
@@ -1555,7 +1523,7 @@
         ..me(mer (~(del by mer) ali), reg :_(reg [hen %mere gon.dat]))
       ::
       ++  route
-        |=  [sat=term res=(each riot (each bead (list tank)))]
+        |=  [sat=term res=(each riot (each gage tang))]
         ^+  +>.$
         ?+  sat  ~|((crip <[%bad-stage sat]>) !!)
           %ali        %-  fetched-ali  ?>  ?=(%& -.res)  p.res
@@ -1799,11 +1767,11 @@
         (diff-bas %ali ali.dat ali bob.dat)
       ::
       ++  diffed-ali
-        |=  res=(each bead (list tank))
+        |=  res=(each gage tang)
         ^+  +>
         ?:  ?=(%| -.res)
           (error:he %diff-ali-bad-made leaf/"merge diff ali failed" p.res)
-        =+  cay=q.p.res
+        =+  cay=p.res
         ?@  p.cay
           (error:he %diff-ali-bad-marc >p.cay< ~)
         =|  can=(map path cage)
@@ -1859,11 +1827,11 @@
         (diff-bas %bob bob.dat bob ali.dat)
       ::
       ++  diffed-bob
-        |=  res=(each bead (list tank))
+        |=  res=(each gage tang)
         ^+  +>
         ?:  ?=(%| -.res)
           (error:he %diff-bob-bad-made leaf/"merge diff bob failed" p.res)
-        =+  cay=q.p.res
+        =+  cay=p.res
         ?@  p.cay
           (error:he %diff-bob-bad-marc >p.cay< ~)
         =|  can=(map path cage)
@@ -1938,10 +1906,10 @@
         ==
       ::
       ++  merged
-        |=  res=(each bead (list tank))
+        |=  res=(each gage tang)
         ?:  ?=(%| -.res)
           (error:he %merge-bad-made leaf/"merging failed" p.res)
-        =+  cay=q.p.res
+        =+  cay=p.res
         ?@  p.cay
           (error:he %merge-bad-marc >p.cay< ~)
         =|  bof=(map path (unit cage))
@@ -1995,11 +1963,11 @@
 
       ::
       ++  built
-        |=  res=(each bead (list tank))
+        |=  res=(each gage tang)
         ^+  +>
         ?:  ?=(%| -.res)
           (error:he %build-bad-made leaf/"delta building failed" p.res)
-        =+  cay=q.p.res
+        =+  cay=p.res
         ?@  p.cay
           (error:he %build-bad-marc >p.cay< ~)
         =|  bop=(map path cage)
@@ -2125,11 +2093,11 @@
         ==
       ::
       ++  checked-out
-        |=  res=(each bead (list tank))
+        |=  res=(each gage tang)
         ^+  +>
         ?:  ?=(%| -.res)
           (error:he %checkout-bad-made leaf/"merge checkout failed" p.res)
-        =+  cay=q.p.res
+        =+  cay=p.res
         ?@  p.cay
           (error:he %patch-bad-marc >p.cay< ~)
         =|  can=(list ,[path cage])
@@ -2183,11 +2151,11 @@
         ==
       ::
       ++  ergoed
-        |=  res=(each bead (list tank))
+        |=  res=(each gage tang)
         ^+  +>
         ?:  ?=(%| -.res)
           (error:he %ergo-bad-made leaf/"merge ergo failed" p.res)
-        =+  cay=q.p.res
+        =+  cay=p.res
         ?@  p.cay  ~|  %patch-bad-marc  !!
         =|  can=(list ,[path (unit mime)])
         =>
@@ -2519,7 +2487,7 @@
     =+  une=(un our now hen ruf)
     =+  wak=wake:une
     =+  wex=(di:wak syd)
-    =+  dat=?-(+<.q.hin %writ [%& p.q.hin], %made [%| p.q.hin])
+    =+  dat=?-(+<.q.hin %writ [%& p.q.hin], %made [%| q.q.hin])
     =+  wao=abet:(route:(me:ze:wex her sud) sat dat)
     =+  woo=abet:wao
     [(weld -.wak -.woo) ..^$(ruf abet:(pish:une syd +.woo ran.wao))]
@@ -2549,16 +2517,16 @@
     ==
   ?:  ?=([%blab care @ @ *] tea)
     ?>  ?=(%made +<.q.hin)
-    ?:  ?=(%| -.p.q.hin)  
+    ?:  ?=(%| -.q.q.hin)  
       ~|  %blab-fail
-      ~>  %mean.|.(p.p.q.hin)         ::  interpolate ford fail into stack trace
+      ~>  %mean.|.(p.q.q.hin)         ::  interpolate ford fail into stack trace
       !!
-    ?^  p.q.p.p.q.hin
+    ?^  p.p.q.q.hin
       ~|(%bad-marc !!)
     :_  ..^$  :_  ~
     :*  hen  %give  %writ  ~
         `[care case @tas]`[i.t.tea ((hard case) +>:(slay i.t.t.tea)) i.t.t.t.tea]
-        `path`t.t.t.t.tea  `cage`q.p.p.q.hin
+        `path`t.t.t.t.tea  `cage`p.q.q.hin
     ==
   ?-    -.+.q.hin
       %crud
@@ -2575,7 +2543,7 @@
       =^  mos  ruf
         =+  une=(un who now hen ruf)
         =+  ^=  zat
-            (take-inserting:(di:wake:une syd) wen p.q.hin)
+            (take-inserting:(di:wake:une syd) wen q.q.hin)
         =+  zot=abet.zat
         [-.zot abet:(pish:une syd +.zot ran.zat)]
       [mos ..^$]
@@ -2588,7 +2556,7 @@
       =^  mos  ruf
         =+  une=(un who now hen ruf)
         =+  ^=  zat
-            (take-diffing:(di:wake:une syd) wen p.q.hin)
+            (take-diffing:(di:wake:une syd) wen q.q.hin)
         =+  zot=abet.zat
         [-.zot abet:(pish:une syd +.zot ran.zat)]
       [mos ..^$]
@@ -2601,7 +2569,7 @@
       =^  mos  ruf
         =+  une=(un who now hen ruf)
         =+  ^=  zat
-            (take-mutating:(di:wake:une syd) wen p.q.hin)
+            (take-mutating:(di:wake:une syd) wen q.q.hin)
         =+  zot=abet.zat
         [-.zot abet:(pish:une syd +.zot ran.zat)]
       [mos ..^$]
@@ -2613,11 +2581,11 @@
       =^  mos  ruf
         ?:  (~(has by fat.ruf) who)
           =+  une=(un who now hen ruf)
-          =+  zat=(take-patch:(di:wake:une syd) p.q.hin)
+          =+  zat=(take-patch:(di:wake:une syd) q.q.hin)
           =+  zot=abet.zat
           [-.zot abet:(pish:une syd +.zot ran.zat)]
         =+  zax=(do now hen [who who] syd ruf)
-        =+  zat=(take-patch:zax p.q.hin)
+        =+  zat=(take-patch:zax q.q.hin)
         =+  zot=abet.zat
         [-.zot (posh who syd +.zot ruf)]
       [mos ..^$]
@@ -2629,7 +2597,7 @@
       =^  mos  ruf
         =+  une=(un who now hen ruf)
         =+  ^=  zat
-            (take-ergo:(di:wake:une syd) p.q.hin)
+            (take-ergo:(di:wake:une syd) q.q.hin)
         =+  zot=abet.zat
         [-.zot abet:(pish:une syd +.zot ran.zat)]
       [mos ..^$]
@@ -2640,7 +2608,7 @@
       =+  her=(slav %p i.t.t.tea)
       =*  syd  i.t.t.t.tea
       =+  zax=(do now hen [our her] syd ruf)
-      =+  zat=(take-foreign-plops:zax p.q.hin)
+      =+  zat=(take-foreign-plops:zax q.q.hin)
       =^  mos  ruf
         =+  zot=abet.zat
         [-.zot (posh her syd +.zot ruf)]
diff --git a/main/arvo/dill.hoon b/main/arvo/dill.hoon
index 6063e5000f..eb021e6a9d 100644
--- a/main/arvo/dill.hoon
+++ b/main/arvo/dill.hoon
@@ -3,701 +3,359 @@
 ::
 |=  pit=vase
 =>  |%                                                  ::  interface tiles
-++  gift                                                ::  out result <-$
-          $%  [%bbye ~]                                 ::  reset prompt
-              [%blit p=(list blit)]                     ::  terminal output
-              [%init p=@p]                              ::  report install
-              [%logo @]                                 ::  logout
-              [%veer p=@ta q=path r=@t]                 ::  install vane
-              [%vega p=path]                            ::  reboot by path
-              [%verb ~]                                 ::
-          ==                                            ::
-++  kiss                                                ::  in request ->$
-          $%  [%belt p=belt]                            ::  terminal input
-              [%blew p=blew]                            ::  terminal config
-              [%boot p=*]                               ::  weird %dill boot
-              [%crud p=@tas q=(list tank)]              ::  error with trace
-              [%flog p=flog]                            ::  wrapped error
-              [%hail ~]                                 ::  terminal refresh
-              [%hook ~]                                 ::  this term hung up
-              [%harm ~]                                 ::  all terms hung up
-              [%init p=ship]                            ::  after gall ready
-              [%noop ~]                                 ::  no operation
-              [%talk p=tank]                            ::
-              [%text p=tape]                            ::
-          ==                                            ::
-++  flog                                                ::  sent to %dill
-          $%  [%crud p=@tas q=(list tank)]              ::
-              [%text p=tape]                            ::
-          ==                                            ::
-++  mess                                                ::  message to terminal
-          $%  [%term-ctrl p=(hypo ,%hail)]              ::
-              [%term-in p=(hypo term-in)]               ::
-          ==                                            ::
-++  move  ,[p=duct q=(mold note gift)]                  ::  local move
-++  note                                                ::  out request $->
-          $%  $:  %a                                    ::
-          $%  [%make p=(unit ,@t) q=@ud r=@ s=?]        ::
-              [%sith p=@p q=@uw r=?]                    ::
-          ==  ==                                        ::
-              $:  %c                                    ::
-          $%  [%warp p=sock q=riff]                     ::
-          ==  ==                                        ::
-              $:  %d                                    ::
-          $%  [%crud p=@tas q=(list tank)]              ::
-              [%text p=tape]                            ::
-          ==  ==                                        ::
-              $:  %g                                    ::
-          $%  [%mess p=[p=ship q=path] q=ship r=mess]   ::
-              [%nuke p=[p=ship q=path] q=ship]          ::
-              [%show p=[p=ship q=path] q=ship r=path]   ::
-              [%took p=[p=ship q=path] q=ship]          ::
-          ==  ==                                        ::
-              $:  %t                                    ::
-          $%  [%wait p=@da]                             ::
-          ==  ==  ==                                    ::
-++  riff  ,[p=desk q=(unit rave)]                       ::  see %clay
-++  sign                                                ::  in result $<-
-          $?
-              $:  %c                                    ::
-          $%  [%writ p=riot]                            ::
-          ==  ==                                        ::
-              $:  %g                                    ::
-          $%  [%logo p=@]                               ::
-              [%mean p=ares]                            ::
-              [%nice ~]                                 ::
-              $:  %rush                                 ::
-              $%  [%term-line q=term-line]              ::
-                  [%hymn q=manx]                        ::
-              ==  ==                                    ::
-              [%verb ~]                                 ::
-              [%sage p=path q=*]                        ::
-              [%veer p=@ta q=path r=@t]                 ::
-              [%vega p=path]                            ::
-          ==  ==                                        ::
-              $:  %t                                    ::
-          $%  [%wake ~]                                 ::
-          ==  ==
-              $:  @tas                                  ::  by any
-          $%  [%crud p=@tas q=(list tank)]              ::
-              [%init p=@p]                              ::
-              [%note p=@tD q=tank]                      ::
-          ==  ==  ==                                    ::
-++  term-in                                             ::
-          $:  pax=path                                  ::
-          $=  jof                                       ::
-          $%  [%line p=cord]                            ::
-              [%res p=span]                             ::
-              [%cmd p=char]                             ::
-              [%type p=?]                               ::
-          ==  ==                                        ::
-++  term-line  ,[p=[p=cord q=prom r=cord] q=(list cord) r=(list tark)]
-++  tark  ?(tank [%stem p=@da q=tank r=tank])           ::
-::::::::                                                ::  dill tiles
-++  bein                                                ::  terminal control
-          $:  $:  bul=@ud                               ::  buffer length
-                  bus=@ud                               ::  cursor in buffer
-                  but=(list ,@c)                        ::  buffer text
-                  buy=prom                              ::  input style
-              ==                                        ::
-              $:  hiz=@ud                               ::  history depth
-                  hux=path                              ::  history path
-                  hym=(map ,@ud (list ,@c))             ::  history overlay
-                  hyt=hist                              ::  history object
-                  hyr=(unit (list ,@c))                 ::  history search
-              ==                                        ::
-              $:  pol=@ud                               ::  length of prompt
-                  pot=tape                              ::  prompt text
-              ==                                        ::
-          ==                                            ::
+++  console-action                                      ::  console to app
+  $%  [%det console-change]                             ::  edit prompt line
+      [%inn ~]                                          ::  enter session
+      [%out ~]                                          ::  exit session
+      [%ret ~]                                          ::  submit and clear
+  ==                                                    :: 
+++  console-buffer  (list ,@c)                          ::  command state
+++  console-change                                      ::  network change
+  $:  ler=console-clock                                 ::  destination clock
+      haw=@uvH                                          ::  source hash
+      ted=console-edit                                  ::  state change
+  ==                                                    ::
+++  console-clock  ,[own=@ud his=@ud]                   ::  vector clock
+++  console-edit                                        ::  shared state change
+  $%  [%del p=@ud]                                      ::  delete one at
+      [%ins p=@ud q=@c]                                 ::  insert at
+      [%mor p=(list console-edit)]                      ::  combination
+      [%nop ~]                                          ::  no-op
+      [%set p=console-buffer]                           ::  discontinuity
+  ==                                                    ::
+++  console-effect                                      ::  app to console
+  $%  [%bel ~]                                          ::  beep
+      [%blk p=@ud q=@c]                                 ::  blink/match char at
+      [%clr ~]                                          ::  clear screen
+      [%det console-change]                             ::  edit input
+      [%nex ~]                                          ::  save and clear input
+      [%tan p=(list tank)]                              ::  classic tank
+  ::  [%taq p=tanq]                                     ::  modern tank
+      [%txt p=tape]                                     ::  text line
+  ==                                                    ::
+++  dill-belt                                           ::  console input
+  $%  [%aro p=?(%d %l %r %u)]                           ::  arrow key
+      [%bac ~]                                          ::  true backspace
+      [%cru p=@tas q=(list tank)]                       ::  echo error
+      [%ctl p=@c]                                       ::  control-key
+      [%del ~]                                          ::  true delete
+      [%met p=@c]                                       ::  meta-key
+      [%ret ~]                                          ::  return
+      [%rez p=@ud q=@ud]                                ::  resize, cols, rows
+      [%txt p=(list ,@c)]                               ::  utf32 text
+      [%yow p=gill]                                     ::  connect to app
+  ==                                                    ::
+++  dill-blit                                           ::  console output
+  $%  [%bel ~]                                          ::  make a noise
+      [%clr ~]                                          ::  clear the screen
+      [%hop p=@ud]                                      ::  set cursor position
+      [%mor p=(list dill-blit)]                         ::  multiple blits
+      [%pro p=(list ,@c)]                               ::  show as cursor/line
+      [%qit ~]                                          ::  close console
+      [%out p=(list ,@c)]                               ::  send output line
+      [%sag p=path q=*]                                 ::  save to jamfile
+      [%sav p=path q=@]                                 ::  save to file
+  ==                                                    ::
+++  gill  (pair ship term)                              ::  general contact
+--                                                      ::
+=>  |%                                                  ::  console protocol
+++  axle                                                ::  all dill state
+  $:  %2                                                ::
+      ore=(unit ship)                                   ::  identity once set
+      hey=(unit duct)                                   ::  default duct
+      dug=(map duct axon)                               ::  conversations
+  ==                                                    ::  
+++  axon                                                ::  dill per duct
+  $:  ram=term                                          ::  console program
+      tem=(unit (list dill-belt))                       ::  pending, reverse
+      wid=_80                                           ::  terminal width
+      pos=@ud                                           ::  cursor position
+      see=(list ,@c)                                    ::  current line
+  ==                                                    ::
+--  =>                                                  ::
+|%                                                      ::  protocol below
 ++  blew  ,[p=@ud q=@ud]                                ::  columns rows
 ++  belt                                                ::  raw console input
-          $%  [%aro p=?(%d %l %r %u)]                   ::  arrow key
-              [%bac ~]                                  ::  true backspace
-              [%ctl p=@ud]                              ::  control-key
-              [%del ~]                                  ::  true delete
-              [%met p=@ud]                              ::  meta-key
-              [%ret ~]                                  ::  return
-              [%txt p=(list ,@c)]                       ::  utf32 text
-          ==                                            ::
+  $%  [%aro p=?(%d %l %r %u)]                           ::  arrow key
+      [%bac ~]                                          ::  true backspace
+      [%ctl p=@c]                                       ::  control-key
+      [%del ~]                                          ::  true delete
+      [%met p=@c]                                       ::  meta-key
+      [%ret ~]                                          ::  return
+      [%txt p=(list ,@c)]                               ::  utf32 text
+  ==                                                    ::
 ++  blit                                                ::  raw console output
-          $%  [%bel ~]                                  ::  make a noise
-              [%clr ~]                                  ::  clear the screen
-              [%hop p=@ud]                              ::  set cursor position
-              [%lin p=(list ,@c)]                       ::  set current line
-              [%mor ~]                                  ::  newline
-              [%sag p=path q=*]                         ::  save to jamfile
-              [%sav p=path q=@]                         ::  save to file
-          ==                                            ::
-++  blot                                                ::  kill ring
-          $:  p=@ud                                     ::  length
-              q=@ud                                     ::  depth
-              r=(list (list ,@c))                       ::  kills
-          ==                                            ::
-++  blur  ,[p=@ud q=(unit bein) r=blot]                 ::  columns, prompt
-++  kyev                                                ::
-          $:  p=(set ?(%ctrl %shift %alt %meta))        ::
-              q=$|(cord [%act speck])                   ::
-          ==                                            ::
-++  speck                                               ::
-          $?  %ctrl  %shift  %alt   %meta  %entr  %esc  ::
-              %caps  %uncap  %pgup  %pgdn  %home  %end  ::
-              %baxp  %del    %ins   %up    %down  %left ::
-              %right                                    ::
-          ==                                            ::
-++  yard                                                ::  terminal state
-          $:  p=?                                       ::  verbose
-              q=blur                                    ::  display state
-              r=(map path hist)                         ::  history
-              s=[p=? q=@da]                             ::  typing?/last typed
-          ==                                            ::
-                                                        ::  XX LEGACY 12-16-2014
-++  yord                                                ::  old terminal state
-          $:  p=?                                       ::  verbose
-              q=blur                                    ::  display state
-              r=(map path hist)                         ::  history
-          ==                                            ::
---  =>
-|%
-++  dy
-  |=  [hen=duct our=ship now=@da def=(unit duct) dug=(map duct yard)]
-  =+  ^=  yar  ^-  yard
-    =+  yur=(~(get by dug) hen)
-    ?^  yur  u.yur
-    ?^  def  (~(got by dug) u.def)
-    [& [80 ~ *blot] ~ | *@da]
-  =|  mos=(list move)
-  |%
-  ++  beep  (curb [[%bel ~] ~])                         ::  send beep
-  ++  curb                                              ::  send blits
-    |=  wab=(list blit)
-    ^+  +>
-    ?~  wab  +>
-    +>(mos [[hen [%give %blit (flop wab)]] mos])
-  ::
-  ++  wod                                               ::  word forward
-    |=  bed=bein
-    ^-  @ud
-    ?:  =(bul.bed bus.bed)
-      bus.bed
-    ?:  =(' ' (snag bus.bed but.bed))
-      $(bus.bed +(bus.bed))
-    |-
-    ^-  @ud
-    ?:  =(bul.bed bus.bed)
-      bus.bed
-    ?:  =(' ' (snag bus.bed but.bed))
-      bus.bed
-    $(bus.bed +(bus.bed))
-  ::
-  ++  wob                                               ::  word backward
-    |=  bed=bein
-    ^-  @ud
-    ?:  =(0 bus.bed)
-      bus.bed
-    ?:  =(' ' (snag (dec bus.bed) but.bed))
-      $(bus.bed (dec bus.bed))
-    |-
-    ^-  @ud
-    ?:  =(0 bus.bed)
-      bus.bed
-    ?:  =(' ' (snag (dec bus.bed) but.bed))
-      bus.bed
-    $(bus.bed (dec bus.bed))
-  ::
-  ++  edit                                              ::  change the bed
-    |=  bed=bein
-    ^+  +>
-    =.  q.q.yar  [~ bed]
-    ?>  ?=(^ q.q.yar)
-    %-  curb
-    |-  ^-  (list blit)
-    ?^  hyr.u.q.q.yar
-      =+  ris=:(weld "(reverse-i-search)'" (tufa u.hyr.u.q.q.yar) "': ")
-      %=  $
-        pot.bed        ris
-        pol.bed        (lent ris)
-        hyr.u.q.q.yar  ~
-      ==
-    :~  [%hop (add pol.bed bus.bed)]
-        :-  %lin
-        %+  weld  pot.bed
-        ?-  buy.bed
-          %none  but.bed
-          %text  but.bed
-          %pass  `(list ,@)`(runt [(lent but.bed) '*'] ~)
-        ==
-    ==
-  ::
-  ++  fume                                              ::  print tank, prefix
-    |=  [pef=@tD tac=tank]
-    ^+  +>
-    =+  wol=(~(win re tac) 2 p.q.yar)
-    %-  furl
-    %+  turn  wol
-    |=  a=tape  ^-  tape
-    ?>  ?=([@ @ *] a)
-    [pef ' ' t.t.a]
-  ::
-  ++  furl                                              ::  print wall
-    |=  wol=(list tape)
-    ^+  +>
-    =.  +>
-      %-  curb
-      %-  flop
-      |-  ^-  (list blit)
-      ?~  wol  ~
-      [[%lin (tuba i.wol)] [%mor ~] $(wol t.wol)]
-    ?~  q.q.yar  +>
-    (edit(q.q.yar ~) u.q.q.yar)
-  ::
-  ++  gore                                              ::  move in history
-    |=  hup=@ud
-    ^+  +>
-    =+  but=(goth hup)
-    =+  bul=(lent but)
-    %-  edit
-    ?>  ?=(^ q.q.yar)
-    %=  u.q.q.yar
-      hiz  hup
-      hym  %+  ~(put by hym.u.q.q.yar)
-             hiz.u.q.q.yar
-           but.u.q.q.yar
-      bus  bul
-      bul  bul
-      but  but
-    ==
-  ::
-  ++  goth                                              ::  extract history
-    |=  hup=@ud
-    ?>  ?=(^ q.q.yar)
-    =+  byt=(~(get by hym.u.q.q.yar) hup)
-    ?^  byt  u.byt
-    (tuba (rip 3 (snag hup q.hyt.u.q.q.yar)))
-  ::
-  ++  kill                                              ::  add to kill ring
-    |=  txt=(list ,@c)
-    ^+  +>
-    =>  ?.  =(16 p.r.q.yar)  .
-        .(p.r.q.yar 15, r.r.q.yar (scag 15 r.r.q.yar))
-    %=  +>
-      p.r.q.yar  +(p.r.q.yar)
-      q.r.q.yar  0
-      r.r.q.yar  [txt r.r.q.yar]
-    ==
-  ::
-  ++  look                                              :: search in history
-    |=  [hup=@ud txt=(list ,@c)]
-    ^+  +>
-    =+  ^=  beg
-        |=  [a=(list ,@c) b=(list ,@c)]  ^-  ?
-        ?~(a & ?~(b | &(=(i.a i.b) $(a t.a, b t.b))))
-    =+  ^=  mid
-        |=  [a=(list ,@c) b=(list ,@c)]  ^-  ?
-        ?~(a & ?~(b | |((beg a b) $(b t.b))))
-    ?>  ?=(^ q.q.yar)
-    ?:  =(hup p.hyt.u.q.q.yar)
-      beep
-    =+  but=(goth hup)
-    ?:  (mid txt but)
-      (gore(hyr.u.q.q.yar [~ txt]) hup)
-    $(hup +(hup))
-  ::
-  ++  leap                                              ::  accept response
-    |=  [tea=wire sih=sign]  
-    ^+  +>
-    ?-    -.+.sih
-        %crud                                           ::  error trace
-      =.  q.+.sih  [[%leaf (trip p.+.sih)] q.+.sih]
-      |-  ^+  +>.^$
-      ?~  q.+.sih  +>.^$
-      (fume:$(q.+.sih t.q.+.sih) '!' `tank`i.q.+.sih)
-    ::
-        %mean  ~&  %dill-mean  +>.$
-        %nice  +>.$
-        %note  ?.(p.yar +>.$ (fume p.+.sih q.+.sih))    ::  debug message
-        ?(%rush %rust)                                  ::  XX  reset prompt
-      =.  mos  :_(mos [hen %pass tea %g %took [our /terminal] our])
-      ?>  ?=(%term-line +>-.sih)
-      =.  +>.$
-        =+  lis=(scag 1.000 r.q.sih)
-        =-  (furl (zing (turn (flop lis) -)))
-        |=  a=tark
-        ^-  wall
-        ?+    -.a  (~(win re a) 0 p.q.yar) 
-            %stem
-          ?:  =(q.s.yar p.a)  ~
-          ~[(welp ~(ram re q.a) ~(ram re r.a))]
-        ==
-      ?.  (levy r.q.sih |=(a=tark ?=(%stem -.a)))
-        +>.$                          ::  XX separate prompt/history messages
-      %-  edit
-      =|  bed=bein
-      =+  ^=  hyt  ^-  hist
-          =+  hyt=(~(get by r.yar) /)
-          ?~(hyt *hist u.hyt)
-      ?:  &(?=(^ q.q.yar) =(/ hux.u.q.q.yar))
-        =+  bun=(rip 5 (turf r.p.q.sih))
-        %=  u.q.q.yar
-          bul  ?~  r.p.q.sih  bul.u.q.q.yar  (lent bun)
-          bus  ?~  r.p.q.sih  bus.u.q.q.yar  (lent bun)
-          but  ?~  r.p.q.sih  but.u.q.q.yar  bun
-          hyt  [+(p.hyt) [%$ q.hyt]]
-          pot  (trip p.p.q.sih)
-          pol  (met 3 p.p.q.sih)
-          buy  q.p.q.sih
-        ==
-      %_    bed
-          bul  (met 3 r.p.q.sih)
-          bus  (met 3 r.p.q.sih)
-          but  (rip 3 r.p.q.sih)
-          buy  q.p.q.sih
-          hux  /
-          hiz  0
-          hyt  [+(p.hyt) [%$ q.hyt]]
-          pot  (trip p.p.q.sih)
-          pol  (met 3 p.p.q.sih)
-      ==
-    ::
-        %sage                                           ::  write a jamfile
-      %=  +>.$
-        mos  :_(mos [hen [%give %blit [%sag p.+.sih q.+.sih] ~]])
-      ==
-        ?(%init %logo %veer %vega %verb)                ::  drop-throughs
-      +>(mos :_(mos [hen %give +.sih]))
-        %writ                                           ::  file exists
-      %_    +>.$
-          mos
-        :_  mos
-        [hen %pass /term-show/(scot %p our) %g %show [our /terminal] our /lines]
-      ==
-    ::
-        %wake
-      ?:  (lte (sub now ~s15) q.s.yar)
-        %_    +>.$
-            mos
-          :_  mos
-          [hen %pass /activity %t %wait (add q.s.yar ~s15)]
-        ==
-      %_  +>.$
-        p.s.yar  |
-        mos      :_(mos (poke %term-in -:!>(*term-in) / %type %|))
-      ==
-    ==
-  ::
-  ++  lear                                              ::  handle request
-    |=  kyz=kiss
-    ^+  +>
-    ?-    -.kyz
-        %flog  !!
-        %noop  +>
-        %belt                                           ::  terminal input
-      =.  +>.$
-        ?.  ?=(?(%bac %del %ret %txt) -.p.kyz)  +>.$
-        ?:  p.s.yar  +>.$(s.yar [& now])
-        %_    +>.$
-            s.yar  [& now]
-            mos
-          :_  :_  mos
-            [hen %pass /activity %t %wait (add ?:(p.s.yar q.s.yar now) ~s15)]
-          (poke %term-in -:!>(*term-in) / %type %&)
-        ==
-      ?~  q.q.yar
-        %^    furl
-            "Downloading files from ticketing ship, please wait until"
-          "a prompt shows up.  This could take several minutes."
-        ~
-      ?^  hyr.u.q.q.yar                                 ::  live search
-        ?+    p.kyz  $(hiz.u.q.q.yar 0, hyr.u.q.q.yar ~)
-            [%bac *]
-          ?:  =(~ u.hyr.u.q.q.yar)
-            (curb [[%bel ~] ~])
-          %-  edit
-          %=  u.q.q.yar
-            hyr  [~ (scag (dec (lent u.hyr.u.q.q.yar)) u.hyr.u.q.q.yar)]
-          ==
-        ::
-            [%txt *]   (look hiz.u.q.q.yar (weld u.hyr.u.q.q.yar p.p.kyz))
-            [%ctl %g]  (edit u.q.q.yar(bul 0, bus 0, but ~, hiz 0, hyr ~))
-            [%ctl %r]
-          ?:  =(p.hyt.u.q.q.yar hiz.u.q.q.yar)
-            beep
-          (look +(hiz.u.q.q.yar) u.hyr.u.q.q.yar)
-        ==
-      ?-    -.p.kyz
-          %aro                                          ::  arrow
-        ?-    p.p.kyz
-            %d                                          ::  down
-          ?:  =(0 hiz.u.q.q.yar)
-            beep
-          (gore (dec hiz.u.q.q.yar))
-        ::
-            %l                                          ::  left
-          ?:  =(0 bus.u.q.q.yar)
-            beep
-          (edit u.q.q.yar(bus (dec bus.u.q.q.yar)))
-        ::
-            %r                                          ::  right
-          ?:  =(bul.u.q.q.yar bus.u.q.q.yar)
-            beep
-          (edit u.q.q.yar(bus +(bus.u.q.q.yar)))
-        ::
-            %u
-          =+  hup=+(hiz.u.q.q.yar)
-          ?:  =(hup p.hyt.u.q.q.yar)
-            beep
-          (gore hup)
-        ==
-      ::
-          %bac                                          ::  backspace
-        ^+  +>.$
-        ?:  =(0 bus.u.q.q.yar)
-          (curb `(list blit)`[[%bel ~] ~])
-        %-  edit
-        %=    u.q.q.yar
-            bus  (dec bus.u.q.q.yar)
-            bul  (dec bul.u.q.q.yar)
-            but
-          %+  weld
-            (scag (dec bus.u.q.q.yar) but.u.q.q.yar)
-          (slag bus.u.q.q.yar but.u.q.q.yar)
-        ==
-      ::
-          %ctl                                          ::  control
-        ?+  p.p.kyz
-          beep
-          %a  (edit u.q.q.yar(bus 0))
-          %b  $(kyz [%belt %aro %l])
-          %d  ?:  ?&  =(0 bul.u.q.q.yar)
-                      =(0 bus.u.q.q.yar)
-                  ==
-                +>.$(mos :_(mos (poke %term-in -:!>(*term-in) / %cmd %d)))
-              $(kyz [%belt %del ~])
-          %e  (edit u.q.q.yar(bus bul.u.q.q.yar))
-          %f  $(kyz [%belt %aro %r])
-          %g  +>.$(mos :_(mos (poke %term-in -:!>(*term-in) / %cmd %g)))
-          %k  ?:  =(bul.u.q.q.yar bus.u.q.q.yar)
-                beep
-              =>  .(+>.$ (kill (slag bus.u.q.q.yar but.u.q.q.yar)))
-              %-  edit
-              ?>  ?=(^ q.q.yar)
-              %=  u.q.q.yar
-                bul  bus.u.q.q.yar
-                but  (scag bus.u.q.q.yar but.u.q.q.yar)
-              ==
-          %t  ?:  (lth bul.u.q.q.yar 2)
-                beep
-              =+  ^=  pos
-                  ?:  =(bul.u.q.q.yar bus.u.q.q.yar)
-                    (sub bus.u.q.q.yar 2)
-                  ?:  =(0 bus.u.q.q.yar)
-                    bus.u.q.q.yar
-                  (dec bus.u.q.q.yar)
-              %-  edit
-              %=  u.q.q.yar
-                bus  (add 2 pos)
-                but  %+  weld
-                       %+  weld
-                         (scag pos but.u.q.q.yar)
-                       ^-  (list ,@c)  :+
-                         (snag +(pos) but.u.q.q.yar)
-                         (snag pos but.u.q.q.yar)
-                         ~
-                      (slag (add 2 pos) but.u.q.q.yar)
-              ==
-          %l  +>.$(mos :_(mos [hen %give %blit [[%clr ~] ~]]))
-          %n  $(kyz [%belt %aro %d])
-          %o  %_    +>.$
-                  mos
-                :_  :_  mos
-                  :*  hen  %pass  /term-show/(scot %p our)
-                      %g  %nuke  [our /terminal]  our
-                  ==
-                :*  hen  %pass  /term-show/(scot %p our)
-                    %g  %show  [our /terminal]  our  /lines
-                ==
-              ==
-          %p  $(kyz [%belt %aro %u])
-          %u  ?:  =(0 bus.u.q.q.yar)
-                beep
-              =>  .(+>.$ (kill (scag bus.u.q.q.yar but.u.q.q.yar)))
-              %-  edit
-              ?>  ?=(^ q.q.yar)
-              %=  u.q.q.yar
-                bus  0
-                bul  (sub bul.u.q.q.yar bus.u.q.q.yar)
-                but  (slag bus.u.q.q.yar but.u.q.q.yar)
-              ==
-          %r  (edit u.q.q.yar(hyr [~ ~]))
-          %w  ?:  =(0 bus.u.q.q.yar)
-                beep
-              =+  bow=(wob u.q.q.yar)
-              =+  sow=(sub bus.u.q.q.yar bow)
-              =>  .(+>.$ (kill (swag [bow sow] but.u.q.q.yar)))
-              %-  edit
-              ?>  ?=(^ q.q.yar)
-              %=  u.q.q.yar
-                bus  bow
-                bul  (sub bul.u.q.q.yar sow)
-                but  %+  welp
-                       (scag bow but.u.q.q.yar)
-                     (slag bus.u.q.q.yar but.u.q.q.yar)
-              ==
-          %x  +>.$(mos :_(mos (poke %term-in -:!>(*term-in) / %cmd %x)))
-          %y  ?:  =(0 p.r.q.yar)
-                beep
-              $(kyz [%belt %txt (snag q.r.q.yar r.r.q.yar)])
-        ==
-      ::
-          %del                                          ::  delete
-        ?:  =(bul.u.q.q.yar bus.u.q.q.yar)
-          beep
-        %-  edit
-        %=    u.q.q.yar
-            bul  (dec bul.u.q.q.yar)
-            but
-          %+  weld
-            (scag bus.u.q.q.yar but.u.q.q.yar)
-          (slag +(bus.u.q.q.yar) but.u.q.q.yar)
-        ==
-      ::
-          %met                                          ::  meta
-        ?+    p.p.kyz
-            beep
-            %f
-          ?:  =(bul.u.q.q.yar bus.u.q.q.yar)
-            beep
-          (edit u.q.q.yar(bus (wod u.q.q.yar)))
-          ::
-            %b
-          ?:  =(0 bus.u.q.q.yar)
-            beep
-          (edit u.q.q.yar(bus (wob u.q.q.yar)))
-          ::
-            %y
-          ?:  =(0 p.r.q.yar)
-            beep
-          =+  dol=(snag q.r.q.yar r.r.q.yar)
-          =+  leo=(lent dol)
-          ?.  (gte bus.u.q.q.yar leo)
-            beep
-          =+  pey=(sub bus.u.q.q.yar leo)
-          ?.  =(dol (swag [pey leo] but.u.q.q.yar))
-            beep
-          =.  q.r.q.yar  ?:(=(p.r.q.yar +(q.r.q.yar)) 0 +(q.r.q.yar))
-          =+  ney=(snag q.r.q.yar r.r.q.yar)
-          =+  lye=(lent ney)
-          %-  edit
-          %=  u.q.q.yar
-            bus  (sub (add bus.u.q.q.yar lye) leo)
-            bul  (sub (add bul.u.q.q.yar lye) leo)
-            but  %+  weld
-                   (scag pey but.u.q.q.yar)
-                 %+  weld
-                   `(list ,@c)`ney                      ::  XX weird fuse-loop
-                 (slag bus.u.q.q.yar but.u.q.q.yar)
-          ==
-        ==
-      ::
-          %ret                                          ::  return
-        ?:  =(%none buy.u.q.q.yar)  beep
-        =+  jab=(rap 3 (tufa but.u.q.q.yar))
-        %=    +>.$
-            q.q.yar  ~
-            r.yar
-          ?:  |(=(%$ jab) =(%pass buy.u.q.q.yar))
-            r.yar
-          %+  ~(put by r.yar)
-            hux.u.q.q.yar
-          [p.hyt.u.q.q.yar [jab ?~(q.hyt.u.q.q.yar ~ +.q.hyt.u.q.q.yar)]]
-        ::
-            mos
-          :*  (poke %term-ctrl -:!>(%hail) %hail)
-              [hen %give [%bbye ~]]
-              (poke %term-in -:!>(*term-in) / %line jab)
-              [hen %give [%blit [[%mor ~] ~]]]
-              mos
-          ==
-        ==
-      ::
-          %txt                                          ::  text keys
-        ?:  =(%none buy.u.q.q.yar)  beep
-        =+  let=(lent p.p.kyz)
-        %-  edit
-        %=    u.q.q.yar
-            bus  (add let bus.u.q.q.yar)
-            bul  (add let bul.u.q.q.yar)
-            but
-          ;:  weld
-            (scag bus.u.q.q.yar but.u.q.q.yar)
-            p.p.kyz
-            (slag bus.u.q.q.yar but.u.q.q.yar)
-          ==
-        ==
-      ==
-    ::
-        %blew   +>.$(p.q.yar p.p.kyz)                   ::  window size
-        %boot
-      %=  +>.$
-        mos
-        :_(mos [hen %pass ~ (note %a p.kyz)])
-      ==
-    ::
-        %crud                                           ::  error trace
-      =.  q.kyz  [[%leaf (trip p.kyz)] q.kyz]
-      |-  ^+  +>.^$
-      ?~  q.kyz  +>.^$
-      (fume:$(q.kyz t.q.kyz) '!' `tank`i.q.kyz)
-    ::
-        %hail                                           ::  refresh
-      +>.$
-      ::+>.$(mos :_(mos (poke %term-ctrl -:!>(%hail) %hail)))
-    ::
-        %harm                                           ::  all terms hung up
-      =+  nug=((map duct yard) [[hen (~(get by dug) hen)] ~ ~])
-      ^+  +>.$
-      %=  +>.$
-        dug  nug
-        ::S mos  :_(mos [hen %pass ~ %b kyz])
-      ==
-    ::
-        %hook                                           ::  this term hung up
-      ~&  %dill-hook-not-implemented
-      +>.$
-      ::S +>.$(dug (~(del by dug) hen), mos :_(mos [hen %pass ~ %b kyz]))
-    ::
-        %init
-      =.  def  `(fall def +.hen)
-      %=    +>.$
-          our  p.kyz
-          mos
-        :_  mos
-        [(need def) %pass / %c %warp [p.kyz p.kyz] %main `[%sing %y [%ud 1] /]]
-      ==
-    ::
-        %talk  (furl (~(win re p.kyz) 0 p.q.yar))       ::  program output
-        %text  $(kyz [%talk %leaf p.kyz])               ::  simple message
-    ==
-  ::
-  ++  poke
-    |=  msg=mess
-    ^-  move
-    :^  hen  %pass  /term-mess
-    :^  %g  %mess  [our /terminal]
-    :-  our  msg
-  ::
-  ++  yerk                                              ::  complete core
-    ^-  [p=(list move) q=ship r=(unit duct) s=(map duct yard)]
-    :^  (flop mos)  our  def
-    (~(put by dug) hen yar)
-  --
+  $%  [%bel ~]                                          ::  make a noise
+      [%clr ~]                                          ::  clear the screen
+      [%hop p=@ud]                                      ::  set cursor position
+      [%lin p=(list ,@c)]                               ::  set current line
+      [%mor ~]                                          ::  newline
+      [%sag p=path q=*]                                 ::  save to jamfile
+      [%sav p=path q=@]                                 ::  save to file
+  ==                                                    ::
+++  flog                                                ::  sent to %dill
+  $%  [%crud p=@tas q=(list tank)]                      ::
+      [%text p=tape]                                    ::
+      [%veer p=@ta q=path r=@t]                         ::  install vane
+      [%vega p=path]                                    ::  reboot by path
+      [%verb ~]                                         ::  verbose mode
+  ==                                                    ::
+++  gift                                                ::  out result <-$
+  $%  [%bbye ~]                                         ::  reset prompt
+      [%blit p=(list blit)]                             ::  terminal output
+      [%init p=@p]                                      ::  set owner
+      [%logo ~]                                         ::  logout
+      [%veer p=@ta q=path r=@t]                         ::  install vane
+      [%vega p=path]                                    ::  reboot by path
+      [%verb ~]                                         ::  verbose mode
+  ==                                                    ::
+++  kiss                                                ::  in request ->$
+  $%  [%belt p=belt]                                    ::  terminal input
+      [%blew p=blew]                                    ::  terminal config
+      [%boot p=*]                                       ::  weird %dill boot
+      [%crud p=@tas q=(list tank)]                      ::  error with trace
+      [%flog p=flog]                                    ::  wrapped error
+      [%flow p=@tas q=(list gill)]                      ::  terminal config
+      [%hail ~]                                         ::  terminal refresh
+      [%hook ~]                                         ::  this term hung up
+      [%harm ~]                                         ::  all terms hung up
+      [%init p=ship]                                    ::  after gall ready
+      [%noop ~]                                         ::  no operation
+      [%talk p=tank]                                    ::
+      [%text p=tape]                                    ::
+      [%veer p=@ta q=path r=@t]                         ::  install vane
+      [%vega p=path]                                    ::  reboot by path
+      [%verb ~]                                         ::  verbose mode
+  ==                                                    ::
+--  =>                                                  ::
+|%                                                      ::  protocol outward
+++  mess                                                ::
+  $%  [%dill-belt p=(hypo dill-belt)]                   ::
+  ==                                                    ::
+++  move  ,[p=duct q=(mold note gift)]                  ::  local move
+++  note-ames                                           ::  weird ames move
+  $%  [%make p=(unit ,@t) q=@ud r=@ s=?]                ::
+      [%sith p=@p q=@uw r=?]                            ::
+  ==                                                    ::
+++  note-clay                                           ::  wait for clay, hack
+  $%  [%warp p=sock q=riff]                             ::
+  ==                                                    ::
+++  note-dill                                           ::  note to self, odd
+  $%  [%crud p=@tas q=(list tank)]                      ::
+      [%init p=ship]                                    ::
+      [%text p=tape]                                    ::
+      [%veer p=@ta q=path r=@t]                         ::  install vane
+      [%vega p=path]                                    ::  reboot by path
+      [%verb ~]                                         ::  verbose mode
+  ==                                                    ::
+++  note-gall                                           ::  outbound message
+  $%  [%mess p=[ship q=path] q=ship r=mess]             ::
+      [%nuke p=[p=ship q=path] q=ship]                  ::
+      [%show p=[p=ship q=path] q=ship r=path]           ::
+      [%took p=[p=ship q=path] q=ship]                  ::
+  ==                                                    ::
+++  note                                                ::
+  $%  [%a note-ames]                                    ::  out request $->
+      [%c note-clay]                                    ::
+      [%d note-dill]                                    ::
+      [%g note-gall]                                    ::
+  ==                                                    ::
+++  riff  ,[p=desk q=(unit rave)]                       ::  see %clay
+++  sign-ames                                           ::
+  $%  [%nice ~]                                         ::
+      [%init p=ship]                                    ::
+  ==                                                    ::
+++  sign-clay                                           ::
+  $%  [%note p=@tD q=tank]                              ::
+      [%writ p=riot]                                    ::
+  ==                                                    ::
+++  sign-dill                                           ::
+  $%  [%blit p=(list blit)]                             ::
+  ==                                                    ::
+++  sign-gall                                           ::
+  $%  [%crud p=@tas q=(list tank)]                      ::
+      [%mean p=ares]                                    ::
+      [%nice ~]                                         ::
+      [%rush %dill-blit dill-blit]                      ::
+  ==                                                    ::
+++  sign-time                                           ::
+  $%  [%wake ~]                                         ::
+  ==                                                    ::
+++  sign                                                ::  in result $<-
+  $%  [%a sign-ames]                                    ::
+      [%c sign-clay]                                    ::
+      [%d sign-dill]                                    ::  
+      [%g sign-gall]                                    ::
+      [%t sign-time]                                    ::
+  ==                                                    ::
+::::::::                                                ::  dill tiles
 --
-=|  $:  %1                                              ::
-        our=ship                                        ::
-        def=(unit duct)                                 ::
-        dug=(map duct yard)                             ::
-    ==                                                  ::
+=|  all=axle
 |=  [now=@da eny=@ ski=sled]                            ::  current invocation
+=>  |%
+    ++  as                                              ::  per cause
+      |_  $:  [moz=(list move) hen=duct our=ship]
+              axon
+          ==
+      ++  abet                                          ::  resolve
+        ^-  [(list move) axle]
+        [(flop moz) all(dug (~(put by dug.all) hen +<+))]
+      ::
+      ++  call                                          ::  receive input
+        |=  kyz=kiss
+        ^+  +>
+        ?+    -.kyz  ~&  [%strange-kiss -.kyz]  +>
+          %flow  +>
+          %harm  +>
+          %hail  +>
+          %belt  (send `dill-belt`p.kyz)
+          %text  (from %out (tuba p.kyz))
+          %crud  ::  (send `dill-belt`[%cru p.kyz q.kyz])
+                 (crud p.kyz q.kyz)
+          %blew  (send %rez p.p.kyz q.p.kyz)
+          %veer  (dump kyz)
+          %vega  (dump kyz)
+          %verb  (dump kyz)
+        ==
+      ::
+      ++  crud
+        |=  [err=@tas tac=(list tank)]
+        =+  ^=  wol  ^-  wall
+            :-  (trip err)
+            (zing (turn tac |=(a=tank (~(win re a) [0 wid]))))
+        |-  ^+  +>.^$
+        ?~  wol  +>.^$
+        $(wol t.wol, +>.^$ (from %out (tuba i.wol)))
+      ::
+      ++  dump                                          ::  pass down to hey
+        |=  git=gift
+        ?>  ?=(^ hey.all)
+        +>(moz [[u.hey.all %give git] moz])
+      ::
+      ++  done                                          ::  return gift
+        |=  git=gift
+        +>(moz :_(moz [hen %give git])) 
+      ::
+      ++  from                                          ::  receive belt
+        |=  bit=dill-blit
+        ^+  +>
+        ?:  ?=(%mor -.bit)
+          |-  ^+  +>.^$
+          ?~  p.bit  +>.^$
+          $(p.bit t.p.bit, +>.^$ ^$(bit i.p.bit))
+        ?:  ?=(%out -.bit)
+          %+  done  %blit
+          :~  [%lin p.bit]
+              [%mor ~]
+              [%lin see]
+              [%hop pos]
+          ==
+        ?:  ?=(%pro -.bit)
+          (done(see p.bit) %blit [[%lin p.bit] [%hop pos] ~])
+        ?:  ?=(%hop -.bit)
+          (done(pos p.bit) %blit [bit ~])
+        ?:  ?=(%qit -.bit)
+          (dump %logo ~)
+        (done %blit [bit ~])
+      ::
+      ++  init                                          ::  initialize
+        ~&  [%dill-init our]
+        =+  myt=(flop (need tem))
+        =.  tem  ~
+        =.  moz  :_(moz [hen %pass ~ %g %show [our [ram ~]] our ~])
+        |-  ^+  +>
+        ?~  myt  +>
+        $(myt t.myt, +> (send i.myt))
+      ::
+      ++  into                                          ::  preinitialize
+        |=  gyl=(list gill)
+        %_    +>
+            tem  `(turn gyl |=(a=gill [%yow a]))
+            moz
+          :_  moz
+          :*  hen
+              %pass 
+              / 
+              %c 
+              [%warp [our our] %main `[%sing %y [%ud 1] /]]
+          ==
+        ==
+      ::
+      ++  send                                          ::  send action
+        |=  bet=dill-belt
+        ?^  tem
+          +>(tem `[bet u.tem])
+        %_    +>
+            moz
+          :_  moz
+          [hen %pass ~ %g %mess [our [ram ~]] our [%dill-belt -:!>(bet) bet]]
+        ==
+      ::
+      ++  took                                          ::  send rush ack
+        %_    .
+            moz 
+          :_(moz [hen %pass ~ %g %took [our [ram ~]] our])
+        ==
+      ::
+      ++  take                                          ::  receive
+        |=  sih=sign
+        ^+  +>
+        ?-    sih
+            [%a %nice *]
+          ::  ~&  [%take-nice-ames sih]
+          +>
+        ::
+            [%a %init *]
+          +>(moz :_(moz [hen %give +.sih]))
+        ::
+            [%c %note *]
+          (from %out (tuba ~(ram re q.+.sih)))
+        ::
+            [%c %writ *]
+          init
+        ::
+            [%d %blit *]
+          (done +.sih)
+        ::
+            [%g %crud *]
+          (crud p.+.sih q.+.sih)
+        ::  (send %cru p.+.sih q.+.sih)  
+        ::
+            [%g %mean *]
+          ~&  %dill-take-mean 
+          +>
+        ::
+            [%g %nice *]
+          ::  ~&  [%take-nice sih]
+          +>
+        ::
+            [%g %rush %dill-blit *]
+          took:(from +>+.sih)
+        ::
+            [%t %wake *]
+          ::  ~&  %dill-wake 
+          +>
+        ==
+      --
+    ::
+    ++  ax                                              ::  make ++as
+      |=  [hen=duct kyz=kiss]                           ::
+      ?~  ore.all  ~
+      =+  nux=(~(get by dug.all) hen)
+      ?^  nux  
+        (some ~(. as [~ hen u.ore.all] u.nux))
+      ?.  ?=(%flow -.kyz)  ~
+      %-  some
+      %.  q.kyz
+      %~  into  as
+      :-  [~ hen u.ore.all]
+      :*  p.kyz
+          [~ ~]
+          80
+          0
+          (tuba "<{(trip p.kyz)}>")
+      ==
+    --
 |%                                                      ::  poke/peek pattern
 ++  call                                                ::  handle request
   |=  $:  hen=duct
@@ -714,44 +372,75 @@
         ~&  [%dill-call-flub (,@tas `*`-.q.hic)]
         ((hard kiss) q.hic)
       ==
+  ?:  ?=(%boot -.q.hic)
+    :_(..^$ [hen %pass ~ (note %a p.q.hic)]~)
   ?:  ?=(%flog -.q.hic)
-    :_  ..^$
-    %+  turn  (~(tap by dug) *(list ,[p=duct q=yard]))
-    |=([a=duct b=yard] [a %slip %d p.q.hic])
-  =+  res=yerk:(lear:(dy hen our now def dug) q.hic)
-  [-.res ..^$(our +<.res, dug +>+.res, def +>-.res)]
+    ::  ~&  [%dill-flog +.q.hic]
+    ?:  ?=([%crud %hax-init [%leaf *] ~] p.q.hic)
+      =+  him=(slav %p (crip p.i.q.p.q.hic))
+      :_(..^$ ?~(hey.all ~ [u.hey.all %give %init him]~))
+    :_(..^$ ?~(hey.all ~ [u.hey.all %slip %d p.q.hic]~))
+  =.  hey.all  ?^(hey.all hey.all `hen)
+  ?:  ?=(%init -.q.hic)
+    ::  ~&  [%call-init hen]
+    ?:  =(ore.all `p.q.hic)
+      [[hen %give q.hic]~ ..^$]
+    =:  ore.all  `p.q.hic
+        dug.all   ~
+      ==
+    =+  ^=  flo  ^-  (list (pair ship term))
+        =+  myr=(clan p.q.hic)
+        ?:  =(%pawn myr)
+          [[p.q.hic %dojo] ~]
+        ?:  =(%earl myr)
+          =+  fap=(sein p.q.hic)
+          [[fap %dojo] [fap %talk] ~]
+        [[p.q.hic %dojo] [p.q.hic %talk] ~]
+    =^  moz  all  abet:(need (ax (need hey.all) [%flow %sole flo]))
+    ?:  |((lth p.q.hic 256) (gte p.q.hic (bex 64)))  [moz ..^$] ::  XX HORRIBLE
+    [:_(moz [(need hey.all) %give %init p.q.hic]) ..^$]
+  =+  nus=(ax hen q.hic)
+  ?~  nus
+    ~&  [%dill-no-flow q.hic]
+    [~ ..^$]
+  =^  moz  all  abet:(call:u.nus q.hic)
+  [moz ..^$]
 ::
 ++  doze
   |=  [now=@da hen=duct]
   ^-  (unit ,@da)
   ~
 ::
-++  load                                                ::  XX LEGACY 12-16-2014
-  |=  $=  old
-      $%  [%0 our=ship def=(unit duct) dug=(map duct yord)]
-          [%1 our=ship def=(unit duct) dug=(map duct yard)]
-      ==
-  ^+  ..^$
-  ?-  -.old
-    %1  %_(..^$ our our.old, def def.old, dug dug.old)
-    %0  %=    $
-            old
-          %=  old
-            -    %1
-            dug  (~(run by dug.old) |=(yor=yord [p q r | *@da]:yor))
-          ==
-        ==
-  ==
+++  load                                                ::  trivial
+  |=  old=axle
+  ..^$(all old)
+  ::  |=  old=*   ::  diable
+  ::  ..^$(ore.all `~zod)
 ::
 ++  scry
   |=  [fur=(unit (set monk)) ren=@tas his=ship syd=desk lot=coin tyl=path]
   ^-  (unit (unit cage))
-  [~ ~ [%tank !>(>dug<)]]
+  [~ ~]
+::
+++  stay  all 
 ::
-++  stay  [%1 our def dug]
 ++  take                                                ::  process move
   |=  [tea=wire hen=duct hin=(hypo sign)]
   ^-  [p=(list move) q=_..^$]
-  =+  res=yerk:(leap:(dy hen our now def dug) tea q.hin)
-  [-.res ..^$(our +<.res, dug +>+.res, def +>-.res)]
+  ?:  =(~ ore.all)
+    ?:  ?=([%a %init *] q.hin)
+      ::  ~&  [%take-init hen]
+      =.  hey.all  ?^(hey.all hey.all `hen)
+      [[[hen %give +.q.hin] ~] ..^$]
+      ::  [~ ..^$]
+    ~&  [%take-back q.hin]
+    [~ ..^$]
+  ?.  (~(has by dug.all) hen)
+    ~&  [%take-weird-sign q.hin]
+    ~&  [%take-weird-hen hen]
+    [~ ..^$]
+  =+  our=?>(?=(^ ore.all) u.ore.all)
+  =^  moz  all  
+    abet:(~(take as [~ hen our] (~(got by dug.all) hen)) q.hin)
+  [moz ..^$]
 --
diff --git a/main/arvo/eyre.hoon b/main/arvo/eyre.hoon
index 9e252d3d91..edb42a27d0 100644
--- a/main/arvo/eyre.hoon
+++ b/main/arvo/eyre.hoon
@@ -4,14 +4,19 @@
 |=  pit=vase
 =>  =~
 |%                                                      ::  interfaces
-++  bead  ,[p=(set beam) q=gage]                        ::  computed result
-++  chop  ,[p=@ud q=@da]                                ::  see 
 ++  gift                                                ::  out result <-$
           $%  [%thou p=httr]                            ::  raw http response
               [%thus p=@ud q=(unit hiss)]               ::  http request/cancel
               [%veer p=@ta q=path r=@t]                 ::  drop-through
               [%vega p=path]                            ::  drop-through
-         ==                                             ::
+          ==                                            ::
+++  gram                                                ::  inter-ship message
+  $?  [[%lon ~] p=hole]                                 ::  login request
+      [[%aut ~] p=hole]                                 ::  login reply
+      [[%hat ~] p=hole q=hart]                          ::  login redirect
+      [[%get ~] p=@uvH q=[? clip httq]]                 ::  remote request
+      [[%got ~] p=@uvH q=httr]                          ::  remote response
+  ==                                                    ::
 ++  hasp  ,[p=ship q=term]                              ::  don't see %gall
 ++  hapt  ,[p=ship q=path]                              ::  do see %gall
 ++  kiss                                                ::  in request ->$
@@ -22,25 +27,22 @@
               [%they p=@ud q=httr]                      ::  inbound response
               [%this p=? q=clip r=httq]                 ::  inbound request
               [%thud ~]                                 ::  inbound cancel
-              [%wart p=sock q=@tas r=path s=*]          ::  urbit message
+              [%wart p=sack q=@tas r=_`[path *]`*gram]  ::  urbit message
           ==                                            ::
 ++  move  ,[p=duct q=(mold note gift)]                  ::  local move
 ++  note                                                ::  out request $->
           $%  $:  %a                                    ::  to %ames
-          $%  [%want p=sock q=path r=*]                 ::
-          ==  ==                                        ::
-              $:  %c                                    ::  to %clay
-          $%  [%warp p=sock q=riff]                     ::
+          $%  [%want p=sock q=[path *]]                 ::
           ==  ==                                        ::
               $:  %d                                    ::  to %dill
           $%  [%flog p=[%crud p=@tas q=(list tank)]]    ::
           ==  ==                                        ::
-              $:  %e                                    ::  to %eyre
-          $%  [%this p=? q=clip r=httq]                 ::
-              [%thud ~]                                 ::
+              $:  %e                                    ::  to self
+          $%  [%this p=? q=clip r=httq]                 ::  proxied request
           ==  ==                                        ::
               $:  %f                                    ::  to %ford
           $%  [%exec p=@p q=beak r=(unit silk)]         ::
+              [%wasp p=@p q=@uvH]                       ::
           ==  ==                                        ::
               $:  %g                                    ::  to %gall
           $%  [%mess p=hapt q=ship r=cage]              ::
@@ -52,7 +54,6 @@
           $%  [%wait p=@da]                             ::
               [%rest p=@da]                             ::
           ==  ==  ==                                    ::
-++  riff  ,[p=desk q=(unit rave)]                       ::  see %clay
 ++  silk                                                ::  see %ford
           $&  [p=silk q=silk]                           ::
           $%  [%boil p=mark q=beam r=path]              ::
@@ -67,24 +68,14 @@
           ==  ==  ==                                    ::
 ++  sign                                                ::  in result $<-
           $?  $:  %a                                    ::  by %ames
-          $%  [%waft p=sock q=*]                        ::
-              [%went p=ship q=cape]                     ::
+          $%  [%went p=ship q=cape]                     ::
           ==  ==                                        ::
-              $:  %b                                    ::  by %batz
-          $%  [%helo p=path q=prod]                     ::
-              [%talk p=tank]                            ::
-              [%tell p=(list ,@t)]                      ::
-              [%text p=tape]                            ::
-              [%warn p=tape]                            ::
-          ==  ==                                        ::
-              $:  %c                                    ::  by %clay
-          $%  [%writ p=riot]                            ::
-          ==  ==                                        ::
-              $:  %e                                    ::  by %eyre
-          $%  [%thou p=httr]                            ::
+              $:  %e                                    ::  by self
+          $%  [%thou p=httr]                            ::  response for proxy
           ==  ==                                        ::
               $:  %f                                    ::  by %ford
-          $%  [%made p=(each bead (list tank))]         ::
+          $%  [%made p=@uvH q=(each gage tang)]         ::
+              [%news ~]                                 ::
           ==  ==                                        ::
               $:  %g                                    ::  by %gall
           $%  [%dumb ~]                                 ::
@@ -99,6 +90,15 @@
               $:  @tas                                  ::  by any
           $%  [%crud p=@tas q=(list tank)]              ::
           ==  ==  ==                                    ::
+++  ixor  ,@t                                           ::  oryx hash
+++  whir  $|  ~                                         ::  wire subset
+          $%  [%at p=hole q=whir]                       ::  authenticated
+              [%ay p=span:ship q=span:,@uvH ~]          ::  remote duct
+              [%of p=ixor q=$|(~ whir-of)]              ::  associated view
+              [%on p=span:,@uvH ~]                      ::  dependency
+              [%to p=ixor q=span:ship r=term s=wire]    ::  associated app
+          ==                                            ::
+++  whir-of  ,[p=span:ship q=term r=wire]               ::  path in hasp
 --                                                      ::
 |%                                                      ::  models
 ++  bolo                                                ::  eyre state
@@ -106,100 +106,99 @@
       gub=@t                                            ::  random identity
       hov=(unit ship)                                   ::  master for remote
       ged=duct                                          ::  client interface
-      ney=@uvI                                          ::  rolling entropy
-      dop=(map host ship)                               ::  host aliasing
-      own=(map ship serf)                               ::  domestic servers
-      fon=(map ship rote)                               ::  foreign servers
+      pox=(map ,@uvH duct)                              ::  proxied sessions
       ask=[p=@ud q=(map ,@ud ,[p=duct q=hiss])]         ::  outgoing by number
       kes=(map duct ,@ud)                               ::  outgoing by duct
-      lor=(map duct dual)                               ::  incoming by duct
-  ==                                                    ::
-++  clue                                                ::  console
-  $:  ino=@ud                                           ::  input sequence
-      ono=@ud                                           ::  (lent out)
-      voy=(map ,@ud (list ,@ud))                        ::  waiters (q.rey)
-      out=(list json)                                   ::  output commands
+      ney=@uvI                                          ::  rolling entropy
+      dop=(map host ship)                               ::  host aliasing
+      liz=(jug ,@uvH (each duct ixor))                  ::  ford depsets
+      wup=(map hole cyst)                               ::  secure sessions
+      sop=(map hole ,[ship ?])                          ::  foreign session names
+      wix=(map ixor stem)                               ::  open views
   ==                                                    ::
+::
 ++  cyst                                                ::  client session
   $:  ced=cred                                          ::  credential
-      cow=(map ,@ud clue)                               ::  consoles
+      [him=ship aut=(set ship)]                         ::  authenticated
       cug=(list ,@t)                                    ::  unacked cookies
       lax=@da                                           ::  last used
-      sok=(map ,@ud (pair ship sink))                   ::  live apps by reqno
-      rey=[p=@ud q=(map ,@ud pimp)]                     ::  live requests
-  ==                                                    ::
-++  dual  ,[p=@ud q=(each ,[p=ship q=hole] ship)]       ::  request handle
-++  dude  ,[p=@tas q=@]                                 ::  client identity
-++  pest                                                ::  request in progress
-  $|  $?  %new                                          ::  virgin
-          %way                                          ::  waiting
-      ==                                                ::
-  $%  [%err p=@ud q=(list tank)]                        ::  error report
-      [%fin p=love]                                     ::  ready to send
-      [%fud p=(each bead (list tank))]                  ::  function finished
-      [%haz p=riot]                                     ::  clay responded
-      [%raw p=hiss]                                     ::  wild url
-      [%who p=@tas q=@ta]                               ::  awaiting auth
-  ==                                                    ::
-++  pimp                                                ::  traced request
-  $:  ful=?                                             ::  | === HEAD
-      fur=(unit mark)                                   ::  type goal
-      hen=duct                                          ::  event trace
-      som=seam                                          ::  logical request
-      pez=pest                                          ::  request state
-      sip=marl                                          ::  injected scripts
-  ==                                                    ::
-++  rote                                                ::  remote server
-  $:  cnt=@ud                                           ::  number served
-      sor=@p                                            ::  home sponsor
-      rem=[p=@ud q=(map ,@ud duct)]                     ::  active requests
-  ==                                                    ::
-++  seam                                                ::  logical request
-  $%  [%ape p=ship q=@ud r=@ud]                         ::  subscribe pull
-      [%aph p=ship q=@ud r=@ud s=json]                  ::  app heartbeat
-      [%apg p=term q=ship r=mark s=path]                ::  app get/start
-      [%apm p=ship q=@ud r=@ud s=hasp for=mark t=json]  ::  message send
-      [%app p=ship q=(unit ,@ud)]                       ::  script by port
-      [%aps p=ship q=@ud s=hasp t=path]                 ::  subscribe
-      [%apu p=ship q=@ud s=hasp t=path]                 ::  unsubscribe
-      [%cog p=@ud q=@ud]                                ::  console get
-      [%con p=@ud]                                      ::  console face
-      [%cop p=@ud q=@ud r=json]                         ::  console put
-      [%det p=desk q=moat]                              ::  load changes
-      [%fun p=term q=tube r=(list manx)]                ::  functional
-      [%lon p=seal]                                     ::  authentication flow
-      [%red p=purl]                                     ::  redirect
-      [%sil p=@ud q=silk]                               ::  status and silk
-  ==                                                    ::
-++  serf                                                ::  local server
-  $:  pef=@t                                            ::  server prefix
-      wup=(map hole cyst)                               ::  secure sessions
-      cah=(map cash vase)                               ::  compilation cache
-  ==                                                    ::
-++  sink                                                ::  page push system
-  $:  bet=[wig=swig num=@ud tim=@da hen=duct]           ::  heartbeat
-      meg=[wig=swig num=@ud]                            ::  messages
-      sub=[wig=swig num=@ud can=(map ,@ud stem)]        ::  subscriptions
-  ==                                                    ::
-++  stem                                                ::  subscription
-  $:  hap=hasp                                          ::
-      pax=path                                          ::
-      hen=duct                                          ::
-      num=(unit (each ,@ud ,@ud))                       ::
-  ==                                                    ::
-++  swig                                                ::  update channel
-  $:  cnt=@ud                                           ::  updates produced
-      toy=@ud                                           ::  updates sent
-      wan=(map ,@ud ,@ud)                               ::  upno to reqno
-      red=(map ,@ud (unit (each cage cage)))            ::  ready for pickup
+      way=(map ship ,[purl duct])                       ::  waiting auth
+      vew=(set oryx)                                    ::  open views XX expire
   ==                                                    ::
+::
+++  stem                                                ::  client view
+  $:  him=ship                                          ::  static identity
+      ude=(unit ,[p=duct q=?])                          ::  stream, long-poll?
+      era=@da                                           ::  next wake
+      eve=[p=@u q=(map ,@u even)]                       ::  queued events
+      med=(qeu duct)                                    ::  waiting /~/to/
+  ==
+::
+++  even                                                ::  client event
+  $%  [%mean p=[hasp path] q=ares]
+      [%news p=@uv]
+      [%rush p=[hasp path] q=json]
+  ==
+::
+++  perk                                                ::  parsed request
+  $%  [%auth p=perk-auth]
+      [%away ~]
+      [%bugs p=?(%as %to) ~]
+      [%beam p=beam]
+      [%deps p=?(%put %delt) q=@uvH]
+      [%mess p=hasp q=mark r=wire s=json]
+      [%poll p=@uvH]
+      [%spur p=spur]
+      [%subs p=?(%put %delt) q=[hasp %json wire path]]
+      [%view p=ixor q=[~ u=@ud]]
+  ==
+::
+++  perk-auth                                           ::  parsed auth
+  $%  [%at p=pork]                               ::  inject auth
+      [%del p=(unit ship)]
+      [%get him=ship rem=pork]
+      [%js ~]
+      [%json ~]
+      [%try him=ship cod=cord]
+      [%xen ses=hole rem=pork]
+  ==
+::
+++  pest                                                ::  result
+  $|  ~
+  $%  [%| p=whir q=note]                                ::  further request
+      [%$ p=httr]                                       ::  direct response
+      [%red ~]                                          ::  parent redirect
+  ::
+      [%js p=@t]                                        ::  script
+      [%json p=json]                                    ::  data
+      [%html p=manx]                                    ::  successful page
+      [%htme p=manx]                                    ::  authentication failure
+  ==
 --                                                      ::
 |%
-++  coss                                                ::  cookie search
-  |=  [nam=@t mah=math]
+++  eat-headers
+  |=  hed=(list ,[p=@t q=@t])  ^-  math
+  %+  roll  hed
+  |=  [a=[p=cord cord] b=math] 
+  =.  p.a  (cass (trip p.a))
+  (~(add ja b) a)
+::
+++  fcgi                                                ::  credential caboose
+  |=  [quy=quay ced=cred]  ^-  coin
+  :*  %many
+      [%$ %ta ~]
+      [%blob ced]
+      |-  ^-  (list coin)
+      ?~  quy  ~
+      [[%$ %t p.i.quy] [%$ %t q.i.quy] $(quy t.quy)]
+  ==
+::
+++  gsig  |=([a=hasp b=path] [(scot %p p.a) q.a b])
+++  session-from-cookies
+  |=  [nam=@t maf=math]
   ^-  (unit hole)
   =+  ^=  cok  ^-  (list ,@t)
-      =+  cok=(~(get by mah) 'cookie')
+      =+  cok=(~(get by maf) 'cookie')
       ?~(cok ~ u.cok)
   |-  ^-  (unit hole)
   ?~  cok  ~
@@ -207,149 +206,169 @@
   ?~  mar  $(cok t.cok)
   |-  ^-  (unit hole)
   ?~  u.mar  ^$(cok t.cok)
-  ?:(=(nam p.i.u.mar) [~ q.i.u.mar] $(u.mar t.u.mar))
+  ?:  &(=(nam p.i.u.mar) !=('~' q.i.u.mar))
+    [~ q.i.u.mar]
+  $(u.mar t.u.mar)
 ::
-++  ecca                                                ::  [hasp path]
-  |=  [orx=oryx moh=moth]
-  ^-  (unit ,[hasp path])
-  =+  jun=(ecci orx moh)
-  ::  ~&  [%ecca jun]
-  ?~  jun  ~
-  =+  ^-  (unit ,[his=ship app=term pax=term])
-      %.  u.jun
-      %-  ot:jo
-      ~[[%ship (su:jo fed:ag)] [%appl so:jo] [%path so:jo]]
-  ?~  -  ~
-  =+  ^=  pax
-      %+  rush  pax.u
-      ;~(pfix fas (more fas ;~(simu next urs:ab)))
-  ?~  pax  ~
-  `[[his.u app.u] u.pax]
+++  wush
+  |=  [wid=@u tan=tang]
+  ^-  tape
+  =+  rolt=|=(a=wall `tape`?~(a ~ :(weld i.a "\0a" $(a t.a))))
+  (rolt (turn tan |=(a=tank (rolt (wash 0^wid a)))))
 ::
-++  ecce                                                ::  JS from moth
-  |=  moh=moth
-  ^-  (unit json)
-  =+  ten=(~(get by q.moh) 'content-type')
-  ?~  ten  ~
-  ?~  u.ten  ~
-  ?.  =('text/json' (end 3 9 i.u.ten))
-    ~|  %ecce-content-type  ~
-  ?~  r.moh  ~
-  `(unit json)`(rush q.u.r.moh apex:poja)
 ::
-++  ecci                                                ::  ecce w/oryx
-  |=  [orx=oryx moh=moth]
-  ^-  (unit json)
-  =+  jun=(ecce moh)
-  ?~  jun  ~
-  ?.  ?=(%o -.u.jun)  ~
-  ::  ?.  =([~ %s orx] (~((get by p.u.jun) %oryx)) 
-  ::    ~&  [%oryx-sent ~(get by p.u.jun) %oryx)]
-  ::    ~&  [%oryx-good orx]
-  ::     ~
-  ~?  !=([~ %s orx] (~(get by p.u.jun) %oryx)) 
-    [%oryx [%sent (~(get by p.u.jun) %oryx)] [%good orx]]
-  =+  nuj=(~(get by p.u.jun) %xyro)
-  ?~(nuj [~ ~] [~ u.nuj])
+++  add-cookies
+  |=  [cug=(list ,@t) hit=httr]  ^-  httr
+  ?~  cug  hit
+  =+  cuh=(turn `(list ,@t)`cug |=(a=@t set-cookie/a))
+  hit(q (weld cuh q.hit))
 ::
-++  ecco                                                ::  eat headers
-  |=  hed=(list ,[p=@t q=@t])
-  =+  mah=*math
-  |-  ^-  math
-  ?~  hed  mah
-  =+  cus=(cass (rip 3 p.i.hed))
-  =+  zeb=(~(get by mah) cus)
-  $(hed t.hed, mah (~(put by mah) cus ?~(zeb [q.i.hed ~] [q.i.hed u.zeb])))
-::
-++  eccu                                                ::  [hasp json]
-  |=  [orx=oryx moh=moth]
-  ^-  (unit ,[hasp mark json])
-  =+  jun=(ecci orx moh)
-  ?~  jun  ~&  %no-ecci  ~
-  =+  ^-  (unit ,[his=term app=term for=mark jon=json])
-      %.  u.jun
-      %-  ot:jo
-      :~  [%ship so:jo]
-          [%appl so:jo]
-          [%mark so:jo]
-          [%data |=(json (some +<))]
-      ==
-  ?~  -  ~&  %no-json  ~
-  =+  his=(slaw %p (cat 3 '~' his.u))
-  ?~  his  ~&  %no-ship  ~
-  `[[u.his app.u] for.u jon.u]
-::
-++  lopo                                                ::  cage to love
-  |=  cay=cage
-  ^-  love
-  ?>  ?=(%mime p.cay)
-  ((hard love) [%mid q.q.cay])
-::
-++  loga                                                ::  tanks to manx
-  |=  [til=tape mog=(list manx) tac=(list tank)]
+++  add-poll                                            ::  inject dependency
+  |=  [dep=@uvH max=[[%html ~] [[%head ~] hed=marl] [[%body ~] manx marl] ~]]
   ^-  manx
-  =+  ^=  wol
-      |-  ^-  wall
-      ?~  tac  ~
-      (weld `wall`[~(ram re i.tac) ~] $(tac t.tac))
-  =+  ^=  tax
-      |-  ^-  (list manx)
-      (turn wol |=(a=tape [/p ;"{a}"]))
+  =.  hed.max  :_(hed.max ;meta(charset "utf-8", urb_injected "");)
+  ?~  dep  max
+  max(hed :_(hed.max ;script@"/~/on/{}.js"(urb_injected "");))
+::
+++  add-json                                            ::  inject window.urb
+  |=  [urb=json jaz=cord]  ^-  cord
+  (cat 3 (crip "window.urb = {(pojo urb)}\0a") jaz)
+::
+++  ares-to-json
+  |=  err=ares  ^-  json
+  =-  (jobe fail/s/typ mess/(jape mez) ~)
+  ^-  [typ=term mez=tape]
+  ?~  err  [%fail "Unknown Error"]
+  [p.u.err (wush 160 q.u.err)]
+::
+++  resp                                                ::  mimed response
+  |=  [sas=@uG mit=mite rez=@]  ^-  httr
+  ::  (weld (turn cug |=(a=@t ['set-cookie' a]))
+  [sas ~[content-type/(moon mit)] [~ (taco rez)]]
+::
+++  render-tang                                         ::  tanks to manx
+  |=  tan=tang
   ;html
     ;head
-      ;title: {til}
-    ==
-    ;body
-      ;code
-        ;*  (weld tax mog)
-      ==
+      ;meta(charset "utf-8");
+      ;link(rel "stylesheet", href "/main/lib/base.css");
+      ;title: server error
     ==
+    ;body:div#c.err:pre:code:"{(wush 80 tan)}"
   ==
 ::
-++  lofa                                                ::  scripts in head
-  |=  [mog=(list manx) luv=love]
-  ^-  love
-  ?:  =(~ mog)  luv
-  ?+    -.luv  luv
-      %mid
-    ?.  =(''))
-          ;~(plug next (knee *tape ..$))
-          (easy ~)
+++  js                                                  ::  static javascript
+  |%
+  ++  poll                                              ::  dependency long-poll
+    '''
+    urb.tries = 0
+    urb.call = function() {
+      xhr = new XMLHttpRequest()
+      xhr.open('GET', urb.poll, true)
+      xhr.addEventListener('load', function() {
+        // if(~~(this.status / 100) == 4)
+        //   return document.write(xhr.responseText)
+        if(this.status !== 205) {
+          return urb.keep()
+        }
+        document.location.reload()
+      })
+      xhr.addEventListener('error', urb.keep)
+      xhr.addEventListener('abort', urb.keep)
+      xhr.send()
+    }
+    urb.keep = function() {
+      setTimeout(urb.call,1000*urb.tries)
+      urb.tries++
+    }
+    urb.call()
+    '''
+  ::
+  ++  auth-redir
+    'document.location.pathname = "/~~"+document.location.pathname'
+  ::
+  ++  auth
+    '''
+    var req = function(url,dat,cb){
+      var xhr = new XMLHttpRequest()
+      xhr.open('POST', url, true)
+      dat.oryx = urb.oryx
+      xhr.send(JSON.stringify(dat))
+      xhr.addEventListener('load', function(ev){
+        if(this.status !== 200)
+          return err.innerHTML = ":( " + Date.now() + "\n" + xhr.responseText
+        else if(cb) return cb(xhr.responseText,ev)
+      })
+    }
+    
+    if(window.ship) ship.innerText = urb.ship
+    urb.foreign = /^\/~\/am/.test(window.location.pathname)
+    urb.submit = function(){
+      req(
+        "/~/auth.json?PUT", 
+        {ship: ship.innerText, code: pass.value},
+        function(){
+          if(urb.foreign) document.location = 
+            document.location.hash.match(/#[^?]+/)[0].slice(1) +
+            document.location.pathname.replace(
+              /^\/~\/am\/[^/]+/,
+              '/~/as/~' + urb.ship) +
+            document.location.search
+          else document.location.reload()
+      })
+    }
+    urb.away = function(){req("/~/auth.json?DELETE", {}, 
+      function(){document.getElementById("c").innerHTML = "

Goodbye.

" } + )} + ''' + -- +++ xml + |% + ++ login-page + %+ titl 'Log in' + ;= ;div#c + ;p: Please log in. + ;p.mono: ~;{span#ship(contenteditable "")} + ;input#pass(onchange "urb.submit()"); + ;pre:code#err; + ;script@"/~/at/~/auth.js"; == - =+ hop=(need q:(hed *hair (trip q.q.luv))) - ?~ q.q.hop luv - =+ rep=:(welp p.hop scr q.q.hop) - [%mid p.luv (tact rep)] - == -:: -++ loft :: love to response - |= luv=love - ^- httr - ?- -.luv - %mid [200 ~[content-type/(moon p.luv)] [~ q.luv]] - %ham [200 ~[content-type/'text/html'] [~ (tact (poxo p.luv))]] - %raw p.luv - %wan :+ 200 - ~[content-type/'text/plain'] - :- ~ - %- taco - %+ rap 3 - |- ^- (list ,@) - ?~(p.luv ~ [i.p.luv 10 $(p.luv t.p.luv)]) - %zap :+ p.luv - ~[content-type/'text/html'] - [~ (tact (poxo (loga "server error" ~ q.luv)))] - == + ;link(rel "stylesheet", href "/main/lib/base.css"); + == + :: + ++ logout-page + %+ titl 'Log out' + ;= ;div#c + ;p: Goodbye ~;{span#ship}. + ;button#act(onclick "urb.away()"): Log out + ;pre:code#err; + ;script@"/~/at/~/auth.js"; + == + ;link(rel "stylesheet", href "/main/lib/base.css"); + == + :: + ++ poke-test + %+ titl 'Poke' + ;= ;button(onclick "urb.testPoke('/~/to/hi/txt.json')"): Hi anonymous + ;button(onclick "urb.testPoke('/~/as/own/~/to/hi/txt.json')"): Hi + ;pre:code#err; + ;script@"/~/at/~/auth.js"; + ;script:''' + show = function(t){err.innerText = ":) " + Date.now() + "\n" + t} + urb.testPoke = function(url){ + req(url,{xyro:{test:true}}, show) + } + ''' + == + ++ titl |=([a=cord b=marl] ;html:(head:title:"{(trip a)}" body:"*{b}")) + -- -- |% :: functions ++ ye :: per event =| $: $: hen=duct :: event floor $: now=@da :: event date eny=@ :: unique entropy + our=ship :: current ship sky=$+(* (unit)) :: system namespace == :: mow=(list move) :: pending actions @@ -358,178 +377,45 @@ == :: =* bol -> |% - ++ abet + ++ abet :: resolve moves ^- [(list move) bolo] [(flop mow) bol] :: - ++ adit - .(ney (mix eny ney)) + ++ adit .(ney (mix eny ney)) :: flip entropy :: - ++ axon - |= [tea=wire typ=type sih=sign] - ^+ +> - ?- -.+.sih - %crud - +>.$(mow [[hen %slip %d %flog +.sih] mow]) - :: - ?(%dumb %mean %nice %rush %rust) - ?> ?=([%hoop @ @ @ ?([%mess @ @ ~] [%show @ ~])] tea) - =+ our=(slav %p i.t.tea) - =* ses i.t.t.tea - =+ nap=(slav %ud i.t.t.t.tea) - =+ ouy=(yolk:(gale our ses) nap) - ?~ ouy - +>.$ - =* mab t.t.t.t.tea - =+ woy=(yule:u.ouy ?+(i.mab !! %mess %meg, %show %sub)) - ?- -.+.sih - %dumb - abet:work:abet:dumb:woy - :: - %nice - =< abet =< work =< abet - ?. ?=(%mess i.mab) - u.ouy - (hear:woy ~ %& %json !>((joba %ok %b &))) - :: - %mean - =< abet =< work =< abet - =+ jon=(rong p.+.sih) - ?: ?=(%mess i.mab) - (hear:woy ~ %& %json !>(jon)) - =+ can=(slav %ud i.t.mab) - =+ sem=(~(get by can.sub.siq:beat:u.ouy) can) - ?~ sem :: XX shouldn't occur - u.ouy - (soon %& u.sem u.ouy can %show ?.(?=(%show i.mab) jon (wrap u.sem jon))) - :: - ?(%rust %rush) - ?> ?=(%show i.mab) - =+ can=(slav %ud i.t.mab) - =+ sem=(need (~(get by can.sub.siq:beat:u.ouy) can)) - =. mow.u.ouy - :_(mow.u.ouy [hen %pass tea [%g %took [- + ~]:hap.sem you.u.ouy]]) - ?: =(0 can) - =< abet =< work =< abet - ?~ num.sem - (hear:woy ~ %& %json !>((joba %reload %b %&))) - ?> -.u.num.sem - =+ huq=``[p.+.sih (slot 3 (spec (slot 3 [typ +.sih])))] - =+ yoo=abet:(busk:(yule:u.ouy %nil) p.u.num.sem 0 huq) - yoo(can.sub.siq (~(put by can.sub.siq.yoo) can sem(num ~))) - ?. ?=(%json p.+.sih) - %^ hooj our ses :^ nap can ?=(%rust -.+.sih) - :+ %cast %json - :+ %done ~ - [p.+.sih (slot 3 (spec (slot 3 [typ +.sih])))] - =< abet =< work =< abet - (soon ?=(%rust -.+.sih) sem u.ouy can %show (wrap sem (json q.+.sih))) - == - :: - %made - ?+ tea +>.$ - [%honk @ @ @ ~] - %- galt - [(slav %p i.t.tea) i.t.t.tea (slav %ud i.t.t.t.tea) p.+.sih] - :: - [%hooj @ @ @ @ @ ~] - =+ ^= ouy - %- yolk:(gale (slav %p i.t.tea) i.t.t.tea) - (slav %ud i.t.t.t.tea) - ?~ ouy - ~& %hooj-made-no-ouy +>.$ - =+ can=(slav %ud i.t.t.t.t.tea) - =+ ful=(slav %f i.t.t.t.t.t.tea) - =+ sem=(need (~(get by can.sub.siq:beat:u.ouy) can)) - =< abet =< work =< abet - %^ soon (,? ful) sem :^ u.ouy can %show - %+ wrap sem - ?: ?=(%& -.p.+.sih) - (json q.q.q.p.p.+.sih) - (rong ~ %to-json-fail p.p.+.sih) - :: - [%hoop @ @ @ %mess @ @ ~] - =+ ^= ouy - %- yolk:(gale (slav %p i.t.tea) i.t.t.tea) - (slav %ud i.t.t.t.tea) - ?~ ouy - ~& %hoop-made-no-ouy +>.$ - ?- -.p.+.sih - %& - =* mab t.t.t.t.tea - ?> ?=(@ p.q.p.p.sih) - %= +>.$ - mow - :_ mow - :* hen %pass tea %g - %mess [(slav %p i.t.mab) i.t.t.mab ~] - you:beat:u.ouy q.p.p.sih - == - == - :: - %| - =< abet =< work =< abet - %^ hear:(yule:u.ouy %meg) ~ %& - [%json !>((rong ~ %from-json-fail p.p.+.sih))] - == - == - :: - %thou :: remote return - ?> ?=([@ @ *] tea) - (hajj (slav %p i.tea) (slav %p i.t.tea) t.t.tea p.+.sih) - :: - %waft - ?. ?=([%hork @ ~] tea) - +>.$ - (gosh q.p.+.sih (slav %ud i.t.tea) ((hard httr) q.+.sih)) - :: - %wake - ?> ?=([%leep @ @ @ @ ~] tea) - =+ ^= ouy - %- yolk:(gale (slav %p i.t.tea) i.t.t.tea) - (slav %ud i.t.t.t.tea) - ?~ ouy - +>.$ - ?: (lth ~m2 (sub now tim.bet.siq:beat:u.ouy)) :: XX unnecessary - abet:work:amok:u.ouy - ~& %bad-timer - +>.$ - :: - %went - +>.$ - :: - %writ - ?. ?=([%hoot @ @ @ ~] tea) - +>.$ - %- gout - [(slav %p i.t.tea) i.t.t.tea (slav %ud i.t.t.t.tea) p.+.sih] - :: - ?(%helo %tell %text %talk %warn) - ?. ?=([%cons @ @ @ ~] tea) - +>.$ - %- goat - [(slav %p i.t.tea) i.t.t.tea (slav %ud i.t.t.t.tea) sih] - == - :: - ++ apex + ++ anon `@p`(add our ^~((bex 64))) :: pseudo-sub + ++ apex :: accept request |= kyz=kiss ^+ +> + =. our ?~(hov our u.hov) :: XX ?- -.kyz %born +>.$(ged hen) :: register external %crud +>.$(mow [[hen %slip %d %flog kyz] mow]) + :: %init :: register ownership - %_ +>.$ - hov ?~(hov [~ p.kyz] [~ (min u.hov p.kyz)]) - own - %+ ~(put by own) - p.kyz - ^- serf - :* (cat 3 gub (rsh 3 1 (scot %p p.kyz))) - ~ - ~ - == - == + +>.$(hov ?~(hov [~ p.kyz] [~ (min u.hov p.kyz)])) + :: + %this :: inbound request + %- emule |. ^+ ..apex + =* sec p.kyz :: ? :: https bit + =* heq r.kyz :: httq :: request content + =+ ryp=`quri`(rash q.heq zest:epur) + =+ maf=(eat-headers r.heq) + =+ ^= pul ^- purl + ?- -.ryp + & ?>(=(sec p.p.p.ryp) p.ryp) + | =+ hot=(~(get ja maf) %host) + ?> ?=([@ ~] hot) + [[sec (rash i.hot thor:epur)] p.ryp q.ryp] + == + =. p.p.pul |(p.p.pul ?=(hoke r.p.pul)) + =+ her=(host-to-ship r.p.pul) + ?: |(?=(~ her) =(our u.her)) + (handle pul q.+.kyz [p.heq maf s.heq]) + =+ han=(sham hen) + =. pox (~(put by pox) han hen) + (ames-gram u.her [%get ~] han +.kyz) :: %them :: outbound request ?~ p.kyz @@ -554,1769 +440,751 @@ mow :_(mow [p.kas [%give %thou q.kyz]]) q.ask (~(del by q.ask) p.kas) == - :: - %this :: inbound request - =* sec p.kyz :: ? :: https bit - =* heq r.kyz :: httq :: request content - =+ ryp=`quri`(rash q.heq zest:epur) - =+ mah=(ecco r.heq) - =+ ^= pul ^- purl - ?- -.ryp - & ?>(=(sec p.p.p.ryp) p.ryp) - | =+ hot=(~(get by mah) %host) - ?> ?=([~ @ ~] hot) - [[sec (rash i.u.hot thor:epur)] p.ryp q.ryp] - == - =. p.p.pul |(p.p.pul ?=(hoke r.p.pul)) - (hell pul +.kyz [p.heq mah s.heq]) :: %thud :: cancel request - =+ dul=(~(get by lor) hen) - ?~ dul +>.$ - =. lor (~(del by lor) hen) - ?- -.q.u.dul - & =+ boy=(myth p.p.q.u.dul q.p.q.u.dul) - ?~(boy +>.$ abet:(idle:u.boy p.u.dul)) - | (hops p.q.u.dul p.u.dul) - == + :: ford-kill :: XX discriminate + +>.$ :: %wart :: remote request - ?+ q.kyz + =+ mez=((soft gram) r.kyz) + ?~ mez ~& [%strange-wart p.kyz q.kyz] +>.$ + ?- -<.u.mez + %aut abet:(logon:(ses-ya p.u.mez) q.p.kyz) + %hat (foreign-hat:(ses-ya p.u.mez) q.p.kyz q.u.mez) + %get (pass-note ay/(dray p/uv/~ q.p.kyz p.u.mez) [%e %this q.u.mez]) + %got + =: hen (~(got by pox) p.u.mez) + pox (~(del by pox) p.u.mez) + == + (give-thou q.u.mez) :: - %pr (hare p.p.kyz r.kyz q.p.kyz s.kyz) - %pc (here p.p.kyz q.p.kyz s.kyz) + %lon + ~& ses-ask/[p.u.mez sop (~(run by wup) ,~)] + ?: (ses-authed p.u.mez) + (ames-gram q.p.kyz aut/~ p.u.mez) + =. sop (~(put by sop) p.u.mez q.p.kyz |) + (ames-gram q.p.kyz hat/~ p.u.mez our-host) == == :: - ++ doss :: host to ship + ++ axon :: accept response + |= [tee=whir typ=type sih=sign] + ^+ +> + :: %- emule |. ^+ ..axon + =. our ?~(hov our u.hov) :: XX + ?- &2.sih + %crud +>.$(mow [[hen %slip %d %flog +.sih] mow]) + %dumb + =. +> ?+(tee +> [%of ^] pop-duct:(ire-ix p.tee)) + (emule |.(~|(gall-dumb/tee !!))) + :: + %went +>.$ + %thou + ?> ?=([%ay ^] tee) + (ames-gram (slav %p p.tee) got/~ (slav %uv q.tee) |2.sih) + :: + ?(%rush %rust) + ?> ?=([%of @ ^] tee) + ?. ?=(%json p.sih) + =- (back tee 0v0 %json -) + `cage`[p.sih (slot 3 (spec (slot 3 [typ +.sih])))] + ~! [q.tee *whir-of] + (get-rush:(ire-ix p.tee) q.tee ((hard json) q.sih)) + :: + ?(%nice %mean) + :: ~& [tee `@tas`&2.sih] + ?+ tee !! + ~ ~& empty-ack/&2.sih + ?-(&2.sih %nice (nice-json), %mean (mean-json 500 p.sih)) + [%of @ ^] (get-ack:(ire-ix p.tee) q.tee +.sih) + == + :: + %wake + ?> ?=([%of @ ~] tee) + => wake:(ire-ix p.tee) + (give-json 200 ~ (joba %beat %b &)) + :: + %news :: dependency updated + ?. ?=([%on ^] tee) + ~&(e/lost/[tee hen] +>.$) + =+ dep=(slav %uv p.tee) + %+ roll (~(tap in (~(get ju liz) dep))) + =< .(con ..axon(liz (~(del by liz) dep))) + |= [sus=(each duct ixor) con=_..axon] + =. ..axon con + ?- -.sus + %& (give-json(hen p.sus) 205 ~ %b &) + %| (get-even:(ire-ix p.sus) [%news dep]) + == + :: + %made + ?> ?=(?([%| *] [%& @ *]) q.sih) + =. our (need hov) :: XX + |- ^+ ..axon + ?- tee + [?(%on %ay) *] ~|(e/ford/lost/-.tee !!) + [%of ^] + ?~ q.tee ~|(e/ford/lost/tee !!) + ?: ?=(%| -.q.sih) + (print-tang p.q.sih) + %+ get-rush:(ire-ix p.tee) q.tee + =* cay p.q.sih + ?> ?=(%json p.cay) :: XX others + ((hard json) q.q.cay) + :: + [%to ^] + ?: ?=(%| -.q.sih) + (mean-json 500 ~ %cast-fail p.q.sih) + ~| tee + (new-mess:(ire-ix p.tee) [(slav %p q.tee) r.tee] s.tee p.q.sih) + :: + [%at ^] + ?. ?=([%& %js ^] q.sih) + ~& e/at-lost/p.tee + $(tee q.tee) + =* cay p.q.sih + ?> ?=(@ q.q.cay) + =+ cyz=(~(got by wup) p.tee) + =^ jon ..ya ~(stat-json ya p.tee cyz) + $(tee q.tee, q.q.p.q.sih (add-json jon q.q.cay)) + :: + ~ + :: ~& e/ford/hen + ?. ?=(%& -.q.sih) + (fail 404 p.sih p.q.sih) + =* cay p.q.sih + ?. ?=(%mime p.cay) + =- (back tee p.sih %mime cay(q.q -)) + ?+ p.cay q.q.cay :: inject dependency long-poll + %urb =| urb=[[%html ~] [[%head ~] marl] [[%body ~] manx marl] ~] + .*(.(urb q.q.cay) !=((add-poll p.sih urb))) + == + ~| q.q.cay + =+ ((hard ,[mit=mite rez=octs]) q.q.cay) + (give-thou 200 [content-type/(moon mit)]~ ~ rez) + == + == + :: + ++ root-beak `beak`[our %main da/now] :: XX + ++ emule + |= a=_|?(..emule) ^+ ..emule + =+ mul=(mule a) + ?~ -.mul p.mul + (fail 500 0v0 >%exit< p.mul) + :: + ++ ire-ix |=(ire=ixor ~(. ix ire (~(got by wix) ire))) + ++ print-tang + |= a=tang ^+ +> + ?~ a +> + ~> %slog.`i.a + $(a t.a) + :: + ++ ses-authed + |= ses=hole + =+ sap=(~(get by sop) ses) + ?: ?=([~ @ %&] sap) & + =+ cyz=(~(get by wup) ses) + ?~ cyz | + (~(has in aut.u.cyz) our) + :: + ++ ses-ya |=(ses=hole ~(. ya ses (~(got by wup) ses))) + ++ our-host `hart`[& ~ `/com/urbit/(rsh 3 1 (scot %p our))] + :: [| [~ 8.445] `/localhost] :: XX testing + :: + ++ ames-gram + |=([him=ship gam=gram] (pass-note ~ %a %want [our him] [%e -.gam] +.gam)) + :: + ++ back :: %ford bounce + |= [tea=whir dep=@uvH mar=mark cay=cage] + (pass-note tea (ford-req root-beak [%cast mar %done ~ cay])) :: XX deps + :: + ++ ford-kill (pass-note ~ %f [%exec our *beak ~]) :: XX unused + ++ ford-req |=([bek=beak kas=silk] [%f [%exec our bek `kas]]) + :: + ++ fail + |= [sas=@ud dep=@uvH mez=tang] + ^+ +> + :: (back ~ dep %tang !>(mez)) :: tang->urb chain may be source of failure + (give-html sas ~ (add-poll dep (render-tang mez))) + :: + ++ give-html + |= [sas=@ud cug=(list ,@t) max=manx] + %- give-thou + %+ add-cookies cug + (resp sas text//html (crip (poxo max))) + :: + ++ give-json + |= [sas=@uG cug=(list ,@t) jon=json] + %- give-thou + %+ add-cookies cug + (resp sas application//json (crip (pojo jon))) + :: + ++ give-thou :: done request + |= hit=httr + +>(mow :_(mow [hen %give %thou hit])) + :: + ++ mean-json |=([sas=@uG err=ares] (give-json sas ~ (ares-to-json err))) + ++ nice-json |=(* (give-json 200 ~ (joba %ok %b &))) + :: + ++ pass-note |=(noe=[whir note] +>(mow :_(mow [hen %pass noe]))) + ++ host-to-ship :: host to ship |= hot=host ^- (unit ship) =+ gow=(~(get by dop) hot) ?^ gow gow - ?. &(?=(& -.hot) ?=(^ p.hot)) ~ - (rush -:(flop p.hot) fed:ag) + ?. ?=(& -.hot) ~ + =+ dom=(flop p.hot) :: domain name + ?~ dom ~ + (rush i.dom fed:ag) :: - ++ fail :: request failed - |= [sas=@ud str=tape] - ^+ +> - %- muff - :- %thou - ^- httr - [sas ~[content-type/'text/plain'] [~ (tact str)]] + ++ load-secret + ^- @ta + =+ pax=/(scot %p our)/code/(scot %da now)/(scot %p our) + %^ rsh 3 1 + (scot %p (,@ (need (sky %a pax)))) :: - ++ gale :: ya from response - |= [our=ship ses=hole] - =+ sef=(need (~(get by own) our)) - =+ cyz=(need (~(get by wup.sef) ses)) - ~(. ya [our ses] sef cyz) :: - ++ galt :: - |= [our=ship ses=hole num=@ud mez=(each bead (list tank))] - ^+ +> - =+ suf=(~(get by own) our) - ?~ suf +>.$ - =+ cuz=(~(get by wup.u.suf) ses) - ?~ cuz +>.$ - abet:work:(~(inch ya [our ses] u.suf u.cuz) num mez) - :: - ++ goat :: console response - |= [our=ship ses=hole num=@ud sih=sign] - =+ suf=(~(get by own) our) - ?~ suf +>.$ - =+ cuz=(~(get by wup.u.suf) ses) - ?~ cuz +>.$ - abet:work:(~(dodo ya [our ses] u.suf u.cuz) num sih) - :: - ++ gosh :: receive %pr response - |= [him=ship num=@ud har=httr] - ^+ +> - =+ ryt=(~(get by fon) him) - ?~ ryt +>.$ - =+ zur=(~(get by q.rem.u.ryt) num) - ?~ zur +>.$ - %_ +>.$ - mow :_(mow [u.zur [%give %thou har]]) - fon (~(put by fon) him u.ryt(q.rem (~(del by q.rem.u.ryt) num))) - == - :: - ++ gout :: receive %clay - |= [our=ship ses=hole num=@ud rot=riot] - ^+ +> - =+ suf=(~(get by own) our) - ?~ suf +>.$ - =+ cuz=(~(get by wup.u.suf) ses) - ?~ cuz +>.$ - abet:work:(~(iota ya [our ses] u.suf u.cuz) num rot) - :: - ++ haji :: send %pc login - |= [our=ship him=ship ses=hole] - ^+ +> - +>.$(mow :_(mow [hen %pass ~ %a [%want [our him] [%r %pc %e ~] ses]])) - :: - ++ hajj :: send %pr response - |= [our=ship him=ship tus=path har=httr] - ^+ +> - +>.$(mow :_(mow [hen %pass ~ %a [%want [our him] [%r %pr %e tus] har]])) - :: - ++ hare :: receive request - |= [our=ship tus=path him=ship hor=*] - ^+ +> - =+ hux=((hard (unit httx)) hor) - %_ +>.$ - mow - :_ mow - :- hen - :^ %pass [(scot %p our) (scot %p him) tus] - %e - ?~(hux [%thud ~] [%this u.hux]) - == - :: - ++ here :: receive auth - |= [our=ship him=ship hez=*] - ^+ +> - =+ boy=(myth our (need ((sand %ta) ((hard ,@) hez)))) - ?~(boy +>.$ abet:(auth:u.boy him)) - :: - ++ hell :: request, no ship - |= [pul=purl hyx=httx moh=moth] - ^+ +> - =+ hon=(horn pul q.hyx moh) - ?^ hon (muff u.hon) - :: =^ wiq q.q.pul - :: ?~ q.q.pul [~ ~] - :: =+ nam=(cat 3 '~' i.q.q.pul) - :: =+ gow=(rush i.q.q.pul fed:ag) - :: ^- [(unit ship) (list ,@t)] - :: ?~(gow [~ q.q.pul] [gow t.q.q.pul]) - :: =+ oar=`(unit ship)`?^(wiq wiq (doss r.p.pul)) - =+ oar=(fall (doss r.p.pul) (need hov)) - ?. (home oar) - (hork oar hyx) - (huff oar q.hyx pul moh) - :: - ++ home :: do we own? - |= who=ship - ^- ? - ?: (~(has by own) who) & - ?: (~(has by fon) who) | - !=(~ (sky /a/(scot %p who)/buck/(scot %da now))) - :: - ++ hoot :: clay request - |= [our=ship num=@ud ses=hole rif=riff] - %_ +> - mow - :_ mow - :+ hen %pass - [[%hoot (scot %p our) ses (scot %ud num) ~] %c [%warp [our our] rif]] - == - :: - ++ hone :: kill ford - |= [our=ship num=@ud ses=hole] - %_ +> - mow - :_ mow - =+ [%exec our [our %main %da now] ~] - [hen %pass [%honk (scot %p our) ses (scot %ud num) ~] %f -] - == - :: - ++ honk :: ford request - |= [our=ship num=@ud ses=hole kas=silk] - :: ~& [%honk our num ses -.kas] - %_ +> - mow - :_ mow - =+ [%exec our [our %main %da now] `kas] - [hen %pass [%honk (scot %p our) ses (scot %ud num) ~] %f -] - == - :: - ++ hooj :: ford json request - |= [our=ship ses=hole nap=@ud can=@ud ful=? kas=silk] - %_ +> - mow - :_ mow - :^ hen %pass - ~[%hooj (scot %p our) ses (scot %ud nap) (scot %ud can) (scot %f ful)] - [%f [%exec our [our %main %da now] `kas]] - == - :: - ++ hops :: cancel remote - |= [him=ship num=@] - ^+ +> - =+ mun=(scot %ud num) - =+ rot=(need (~(get by fon) him)) - %_ +>.$ - mow - :_ mow - :- hen - :^ %pass [%hork (scot %p sor.rot) mun ~] - %a - [%want [sor.rot him] [%q %pr %e %hork mun ~] ~] - == - :: - ++ hork :: remote request - |= [him=ship hyx=httx] - ^+ +> - =+ ^= sur ^- (unit ship) - ?^ hov hov - ?^ own [~ p.n.own] - ~ - ?~ sur (fail 500 "no vessel available to proxy {}") - ?. (gth (met 3 him) (met 3 u.sur)) :: very permissive - (fail 500 "{} cannot proxy for {}") - =+ ^= rot ^- rote - =+ rut=(~(get by fon) him) - ?^ rut u.rut - [0 u.sur [0 ~]] - =+ num=p.rem.rot - =+ mun=(scot %ud num) - %_ +>.$ - lor (~(put by lor) hen num [%| him]) - mow - :_ mow - :- hen - :^ %pass [%hork (scot %p sor.rot) mun ~] - %a - [%want [sor.rot him] [%q %pr %e %hork mun ~] [~ hyx]] - :: - fon - %+ ~(put by fon) him - %_ rot - cnt +(cnt.rot) - p.rem +(p.rem.rot) - q.rem (~(put by q.rem.rot) num hen) - == - == - :: - ++ horn :: irregular request - |= [pul=purl cip=clip moh=moth] - ^- (unit gift) - =- ?: &(=(/favicon q.q.pul) ?=([~ ?(%ico %png)] p.q.pul)) - :- ~ - :- %thou - ^- httr - [200 ~[content-type/'image/png'] [~ (taco fac)]] - ?: &(=(/robots q.q.pul) ?=([~ %txt] p.q.pul)) - :- ~ - :- %thou - ^- httr - [200 ~[content-type/'text/plain'] [~ (taco rob)]] - ~ - :* - ^= rob - %- role - :~ 'User-agent: *' - 'Disallow: /' - == - :: - ^= fac - 0w89wg.GV4jA.l9000.00dPb.YzBT6.giO00.o100d.wZcqc.a9tg-.VTG0b. - AUIvE.HBM3g.cK4SE.0aagi.l090p.I1P5g.Y-80r.y1YS9.1xE~Y.qgpFY. - vKN1V.905y0.2UwvL.43TUw.uL406.0-31h.xwoJF.Ul454.ilk00.00Yps. - BNumh.xpl9B.pS5Ji.i1BoC.ZAgg1.BsC5T.t6pLk.Thohn.gp000.0ov~P. - 7M000.0o840.00010.0001i.h4x93.g0000.Eq2wR.7jB29 - == - :: - ++ huff :: request by ship - |= [our=ship cip=clip pul=purl moh=moth] - =* sec p.p.pul - =+ ^= sef ^- serf - =+ suf=(~(get by own) our) - ?^ suf u.suf - =+ sef=*serf - sef(pef (cat 3 gub (rsh 3 1 (scot %p our)))) :: XX transitional - =+ ^= saw ^- [p=hole q=cyst] - =+ lig=(coss pef.sef q.moh) - ?^ lig - =+ cyz=(need (~(get by wup.sef) u.lig)) - [u.lig cyz(cug ~)] - =+ ses=(rsh 3 1 (scot %p (end 6 1 ney))) - :- ses - ^- cyst - :* ^- cred - :* [sec q.p.pul r.p.pul] - ~ - (rsh 3 1 (scot %p (end 6 1 (shaf %oryx ses)))) - :: - =+ lag=(~(get by q.moh) %accept-language) - ?~(lag ~ ?~(u.lag ~ [~ i.u.lag])) - :: - cip - ~ - == - :: - ~ - :: - :_ ~ - %^ cat 3 - (cat 3 (cat 3 pef.sef '=') ses) - :: (cat 3 '; HttpOnly' ?.(sec '' '; Secure')) - '; Path=/; HttpOnly' - :: - now - ~ - [1 ~] + ++ handle + |= $: [hat=hart pok=pork quy=quay] :: purl, parsed url + cip=clip :: client ip + [mef=meth maf=math bod=(unit octs)] :: method/headers/body == - abet:work:(~(into ya [our p.saw] sef q.saw) pul moh) - :: - ++ muff :: return card - |= gef=gift - +>(mow :_(mow [hen %give gef])) - :: - ++ myth :: load session - |= [our=ship ses=hole] - =+ suf=(~(get by own) our) - ?~ suf ~ - =+ cuz=(~(get by wup.u.suf) ses) - ?~ cuz ~ - [~ u=~(. ya [our ses] u.suf u.cuz)] - :: - ++ noon :: login page - |= [our=ship ses=hole whu=(unit ship) rul=tape] - ^- manx - =+ ^= sic ^- manx - ;script:''' - var seal = { - who: goal, - url: burl, - pas: null, - ses: sesh - } - var hist = [] - var hind = 0 - $( - function() { - $input = $('#input .line') - $prompt = $('#input .prompt') - $prompt.addClass('prefix') - $output = $('#output') - $input.focus() - $('body').click(function() { $input.focus() }) - ctrl = false; - - start = function(ship) { - $prompt.text('vessel: ~') - $input.attr('placeholder', 'ship-name') - if(ship) { - $input.val(ship) - } - } - - ident = function() { - seal.who = $input.val() - - if( (seal.who.length != 13) && - (seal.who.length != 6) && - (seal.who.length != 3) ) - { - $output.text('not a ship name - try again.'); - return false; - } - - if(seal.who !== host) { - var all = $.extend({}, seal, {oth:host}); - delete all.pas; - - console.log('redirect') - window.location= - "http://"+seal.who+".urbit.org/gul?" - + $.param(all); - return false; - } - - $output.text($prompt.text() + " " + seal.who) - $input.val('') - $input.attr('placeholder', 'ronber-bacnub-hanmev-labnyd') - $prompt.text('secret: ~') - - return true; - } - - login = function() { - seal.pas = $input.val() - var oth = /[&?]oth=[^&]*/.exec(location.search) - if(oth && oth.length) - seal.oth = oth[0].slice(5) - - output = $output.html() - console.log($output.html()) - $output.html(output.replace( - 'sorry. please try again.
','')) - - $.post("/pul", seal, function(data,xhr,status) { - console.log(data); - if(data.ok == true) { - document.location = data.next; - } else { - $output.prepend('sorry. please try again.
') - } - }) - } - - steps = [ident,login] - step = 0 - start(seal.who) - if(seal.who) { - ident() - step++ - } - - $input.on('keydown', function(e) { - if(e.keyCode == 17) { - ctrl = true - return; - } - - if(e.keyCode == 68 && - ctrl == true && - step == 1) { - $output.text('') - step = 0 - start(null) - return; - } - - if(e.keyCode == 13) { - if(steps[step]() && step < steps.length-1) - step++ - return; - } - }); - - $input.on('keyup', function(e) { - if(e.keyCode == 17) { - ctrl = false - } - }); - }) - ''' - =+ ^= cof - ;= - ; var host = '{(trip (rsh 3 1 (scot %p our)))}'; - ; var goal = '{?~(whu ~ (trip (rsh 3 1 (scot %p u.whu))))}'; - ; var burl = '{rul}'; - ; var sesh = '{(trip ses)}'; - == - => .(+.sic (weld `marl`cof `marl`+.sic)) - =+ jqu="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" - =+ ^= hed - ;head - ;title: urbit login - ;script(type "text/javascript", src jqu); - ;style:''' - body { - margin: 60px 120px; - font: normal 12px "Menlo" monospace; - background-color: #000; - color: #fff; - } - - #output { - - } - - #input .prompt { - display: inline-block; - margin-right: 12px; - } - - #input .line { - outline: none; - width: 80%; - border: 0; - background-color: transparent; - color: #fff; - font: normal 12px "Menlo" monospace; - } - ''' - == - =+ ^= bod ^- manx - ;body - ;div#output; - ;div#input - ;div.prompt; - ;input.line(type "text"); - == - == - =. +.bod (weld `marl`+.bod `marl`~[sic]) - ;html - ;+ hed - ;+ bod - == - :: - ++ rong - |= are=ares - %- jobe - :- [%ok %b |] - ?~ are ~ - :+ [%err %s p.u.are] - :+ %res %s - %- crip - %+ slag 2 - ^- tape - %+ roll q.u.are - |= [p=tank q=tape] - :(weld q "\\n" ~(ram re p)) - ~ - :: - ++ soon - |= [ful=? sem=stem ouy=_yo:ya can=@ud mab=?(%mess %show) jon=json] - ^+ yo:ya - =+ huq=``[%json !>(jon)] - ?~ num.sem - =+ woy=(yule:ouy ?-(mab %mess %meg, %show %sub)) - (hear:woy huq) - ?- -.u.num.sem - %& - =+ yoo=abet:(busk:(yule:ouy %nil) p.u.num.sem 0 huq) - yoo(can.sub.siq (~(put by can.sub.siq.yoo) can sem(num ~))) - %| - =+ ^= yoo - =< abet - %^ busk:(yule:(hear:(yule:ouy %sub) huq) %nil) - p.u.num.sem - 0 - `[%& %json !>((joba %ok %b &))] - yoo(can.sub.siq (~(put by can.sub.siq.yoo) can sem(num ~))) - == - :: - ++ wrap - |= [sem=stem jon=json] - %- jobe - :~ [%ship %s (rsh 3 1 (scot %p p.hap.sem))] - [%appl %s q.hap.sem] - [%path %s (crip )] - [%data `json`jon] - == - :: - ++ ya :: session engine - =| [[our=ship ses=hole] serf cyst] - =* sef ->- - =* cyz ->+ + =< apex |% - ++ abet :: resolve engine - ^+ ..ya - %= ..ya - own - (~(put by own) our sef(wup (~(put by wup) ses cyz))) - == + ++ abet ..handle + ++ done . + ++ teba |*(a=$+(* ..handle) |*(b=* %_(done ..handle (a b)))) + ++ give-html (teba ^give-html) + ++ give-thou (teba ^give-thou) + ++ give-json (teba ^give-json) + ++ nice-json (teba ^nice-json) + ++ pass-note (teba ^pass-note) :: - ++ auth :: remote authorize - |= him=ship - %_(+> aut.ced (~(put ju aut.ced) %$ (scot %p him))) - :: - ++ dodo :: console s->c - |= [con=@ud sih=sign] - ^+ +> - =+ cal=(need (~(get by cow) con)) - =+ ^= jon ^- json - ?: ?=(%helo -.+.sih) - %+ joba %helo - %- jobe - :~ [%path [%a `(list json)`(turn p.+.sih |=(a=@ta [%s a]))]] - [%prod ~[%a [%s p.q.+.sih] (jape q.q.+.sih) (jape r.q.+.sih)]] - == - %+ joba %text - :- %a ^- (list json) - ?+ -.+.sih ~|(-.+.sih !!) - %tell (turn p.+.sih |=(a=@t [%s a])) - %text [%s (crip p.+.sih)]~ - %talk (turn (~(win re p.+.sih) [0 80]) |=(a=tape [%s (crip a)])) - %warn [%s (crip '!' p.+.sih)]~ - == - =+ ^= yov ^- (list ,@ud) - =+ yov=(~(get by voy.cal) ono.cal) - ?~(yov ~ u.yov) - =: voy.cal (~(del by voy.cal) ono.cal) - ono.cal +(ono.cal) - out.cal [jon out.cal] + ++ ford-get-beam + |= [bem=beam ext=term] + =: s.bem [%web ~(rent co (fcgi quy fcgi-cred:for-client)) s.bem] + r.bem ?+(r.bem r.bem [%ud %0] da/now) == - =. cow (~(put by cow) con cal) - ?~(yov +>.$ (dove ~[%a (jone ono.cal) (jone ino.cal) jon] yov)) + (ford-req -.bem [%boil ext bem ~]) :: - ++ iota :: fun change response - |= [num=@ud rot=riot] - ^+ +> - =+ pup=(~(get by q.rey) num) - ?~ pup - ~& [%iota-lost ses num rot] - +>.$ - ?> ?=(%way pez.u.pup) - +>.$(q.rey (~(put by q.rey) num u.pup(pez [%haz rot]))) :: - ++ dove :: console waiting - |= [jon=json yov=(list ,@ud)] - ^+ +> - =+ noz=`pest`[%fin %mid /text/json (tact (pojo jon))] - |- ^+ +>.^$ - ?~ yov +>.^$ - =+ pup=(~(get by q.rey) i.yov) - ?~ pup $(yov t.yov) - ?> ?=(%way pez.u.pup) - $(yov t.yov, q.rey (~(put by q.rey) i.yov u.pup(pez noz))) + ++ apex + =< abet + ^+ done + =+ oar=(host-to-ship r.hat) + =. our ?~(oar our u.oar) :: XX + =+ pez=process + ?: ?=(%| -.pez) p.pez + (resolve ~ p.pez) :: - ++ duty |= [nap=@ud you=ship] :: interface script - ^- cord - %^ cat 3 - %- crip - =- "window.urb = {(pojo (jobe -))}\0a" - :~ - [%ship (jape |1:)] - [%port (jone nap)] - [%oryx %s orx.ced] - [%auto %b %&] - [%user (jape |1:)] - == - ''' - window.urb.seqn_u = 0 - window.urb.seqn_h = 0 - window.urb.dely = 0 - window.urb.puls = 0 - window.urb.cabs = {} - window.urb.perms = { - pol:"gie", - sub:"tis", - uns:"tiu", - mes:"tim", - heb:"tih" - } - - window.urb.req = function(method,url,params,json,cb) { - var xhr = new XMLHttpRequest() - xhr.open(method.toUpperCase(), url) - if(json) - xhr.setRequestHeader("content-type", "text/json") - - _data = {} - if(params.data) { _data.data = params.data; } - if(params.ship) { _data.ship = params.ship; } - if(params.path) { _data.path = params.path; } - if(params.appl) { _data.appl = params.appl; } - if(params.mark) { _data.mark = params.mark; } - __data = {oryx: window.urb.oryx, xyro: _data} - - if(cb) { - xhr.onload = function() { - try { - err = null - res = { - status:this.status, - data: JSON.parse(this.responseText) - } - if(res.data.reload) - res.reload = res.data.reload - } catch(e) { - err = { - message:"Failed to parse JSON", - raw:this.responseText - } - res = null - } - cb(err,res) - } - xhr.onerror = function() { - cb({ - status:this.status, - data:this.responseText - }) - } - } - xhr.send(JSON.stringify(__data)) - } - - window.urb.reqq = [] - window.urb.qreq = function(method,url,params,json,cb) { - walk = function() { - qobj = {} - qobj.oargs = window.urb.reqq[0] - qobj.nargs = [].slice.apply(qobj.oargs,[0,4]) - qobj.nargs.push(function(){ - if(this.oargs[4]) - this.oargs[4].apply(window.urb,arguments) - window.urb.reqq.shift() - if(window.urb.reqq.length > 0) - walk() - }.bind(qobj)) - window.urb.req.apply(this,qobj.nargs) - } - l = window.urb.reqq.length - window.urb.reqq.push(arguments); - if(l == 0) { walk() } - } - - window.urb.gsig = function(params) { - path = params.path - if(!path) - path = "" - return params.appl+","+ - path.replace(/[^\x00-\x7F]/g, "")+","+ - params.ship - } - - window.urb.poll = function(params,cb) { - if(!params) - throw new Error("You must supply params to urb.poll.") - - var method, perm, url, $this - method = "get" - perm = params.type ? this.perms[params.type] : "gie" - json = false - if(perm[0] == "t") { - method = "put" - json = true - } - seqn = this.seqn_u - if(params.seqn) - seqn = params.seqn() - url = [perm,this.user,this.port,seqn] - url = "/"+url.join("/") - - this.puls = 1 - - $this = this - this.req(method,url,params,json,function(err,data) { - if(data){ - if (data.reload) { - return document.location.reload() - } else { - fn = $this.gsig(data.data) - if($this.cabs[fn]) { - $this.cabs[fn].call(this,err, - {status: data.status, data: data.data.data}) - } - } - } - - dely = params.dely ? params.dely : $this.dely - - if(err) - dely = dely+Math.ceil(dely*.02) - else { - $this.dely = 0 - if(params.incs) - params.incs() - else - $this.seqn_u++ - } - - setTimeout(function() { - $this.poll(params,cb) - },dely) - }) - } - - if (window.urb.auto) { - var tries = 0 - var cnt = 0 - var param = { - type:"pol" - } - window.urb.poll(param) - } - - window.urb.heartbeat = function() { - this.poll({ - type:"heb", - ship:this.ship, - dely:30000, - seqn:function() { - return window.urb.seqn_h - }, - incs:function() { - window.urb.seqn_h = window.urb.seqn_h+1 - } - },function() { - console.log('heartbeat.') - }) - } - window.urb.heartbeat() - ''' - :: - ++ fape :: dispatch %ape - |= [fur=(unit term) you=@p paw=path] - ^- (unit seam) - ?> ?=(~ fur) - ?> ?=([@ @ ~] paw) - :- ~ - :* %ape - you - (slav %ui (cat 3 '0i' i.paw)) - (slav %ui (cat 3 '0i' i.t.paw)) + ++ resolve + |= [cug=(list ,@t) pez=pest] ^+ done + ?~ pez done + ?- -.pez + ~ (give-thou (add-cookies cug p.pez)) + | (pass-note +.pez) + %js $(pez [~ (resp 200 text//javascript p.pez)]) + %json (give-json 200 cug p.pez) + %html (give-html 200 cug p.pez) + %htme (give-html 401 cug p.pez) + %red + =+ url=(earn hat pok(p [~ %html]) quy) + ?+ p.pok ~|(bad-redirect/[p.pok url] !!) + [~ %js] + $(pez [%js auth-redir:js]) + [~ %json] + $(pez [%json (jobe ok/b/| red/(jape url) ~)]) + == == :: - ++ fapg :: dispatch %apg - |= [fur=(unit term) you=@p paw=path] - ^- (unit seam) - =+ for=?^(fur u.fur %html) - ?> ?=(^ paw) - :- ~ - :* %apg - (need ((sand %tas) i.paw)) - you - for - (turn t.paw |=(a=@ `@ta`(need ((sand %ta) a)))) - == :: - ++ faph :: dispatch %aph - |= [fur=(unit term) you=@p paw=path moh=moth] - ^- (unit seam) - ?> ?=(~ fur) - ?> ?=([@ @ ~] paw) - :- ~ - :* %aph - you - (slav %ui (cat 3 '0i' i.paw)) - (slav %ui (cat 3 '0i' i.t.paw)) - (need (ecci orx.ced moh)) - == + ++ check-oryx :: | if json with bad oryx + ^- ? + ?. &(?=([~ %json] p.pok) ?=(%post mef) ?=(^ bod)) & + =+ oxe=(grab-body to-oryx) + ?~ oxe | + ?: (~(has in vew.cyz:for-client) u.oxe) + & + ~&(bad-oryx/[u.oxe vew.cyz:for-client] &) :: XX security :: - ++ fapm :: dispatch %apm - |= [fur=(unit term) you=@p paw=path moh=moth] - ^- (unit seam) - ?> ?=(~ fur) - ?> ?=([@ @ ~] paw) - :- ~ - :* %apm - you - (slav %ui (cat 3 '0i' i.paw)) - (slav %ui (cat 3 '0i' i.t.paw)) - (need (eccu orx.ced moh)) - == - :: - ++ fapp - |= [fur=(unit term) you=@p paw=path] - ?> ?=([~ %js] fur) - ?> ?=(?([%hart ~] [@ %hart ~]) paw) - :- ~ - :* %app - you - ?~ t.paw - ~ - (some (slav %ui (cat 3 '0i' i.paw))) - == - :: - ++ faps :: dispatch %aps - |= [fur=(unit term) you=@p paw=path moh=moth] - ^- (unit seam) - ?> ?=(~ fur) - ?> ?=([@ ~] paw) - :- ~ - :* %aps - you - (slav %ui (cat 3 '0i' i.paw)) - (need (ecca orx.ced moh)) - == - :: - ++ fapu :: dispatch %apu - |= [fur=(unit term) you=@p paw=path moh=moth] - ^- (unit seam) - ?> ?=(~ fur) - ?> ?=([@ ~] paw) - :- ~ - :* %apu - you - (slav %ui (cat 3 '0i' i.paw)) - (need (ecca orx.ced moh)) - == - :: - ++ flea :: permissive decimal - |= txt=@t - ^- (unit ,@ud) - =+ zac=(slay txt) - ?: ?=([~ %$ %ud @] zac) - [~ q.p.u.zac] - =+ soc=(rush txt dim:ag) - ?~(soc ~ [~ u.soc]) - :: - ++ foal :: url from query - |= [nam=@t yaq=(map ,@t ,@t)] - ^- (unit purl) - (biff (~(get by yaq) %url) epur) - :: - ++ folk :: seal from query - |= quy=quay - ^- (unit seal) - =+ yaq=(~(gas by *(map ,@t ,@t)) quy) - =+ pyl=(foal %url yaq) - =+ wit==(%yes (fall (~(get by yaq) %wit) %no)) - =+ huw=(~(get by yaq) %who) - =+ whu=?~(huw ~ (rush u.huw fed:ag)) - =+ pus=(~(get by yaq) %pas) - =+ tuh=(~(get by yaq) %oth) - =+ thu=?~(tuh ~ (rush u.tuh fed:ag)) - =+ sus=(~(get by yaq) %ses) - =+ foy=?~(sus ~ ?~(thu ~ [~ u.thu u.sus])) - ?~ pyl ~ - ?: &(wit |(=(~ whu) =(~ ses))) ~ - :: ~& [%folk-quay whu u.pyl wit foy pus] - [~ whu u.pyl wit foy pus] - :: - ++ fool :: domestic login get - |= quy=quay - ^- (unit seam) - (bind (folk quy) |=(a=seal [%lon a])) - :: - ++ foom :: domestic login post - |= moh=moth - ^- (unit seam) - ?. ?& ?=(^ r.moh) - :: .= [~ 'application/x-www-form-urlencoded' ~] - :: (~(get by q.moh) 'content-type') - == ~ - =+ yuq=(rush q.u.r.moh yquy:epur) - ?~(yuq ~ (fool u.yuq)) - :: - ++ flub :: console request - |= [paw=(list ,@t) muh=(unit moth)] - ^- (unit seam) - ?: ?=([@ ~] paw) - ?^ muh ~ - =+ fee=(flea i.paw) - ?~ fee ~ - [~ %con u.fee] - ?. ?=([@ @ ~] paw) ~ - =+ [fee=(flea i.paw) fum=(flea i.t.paw)] - ?. &(?=(^ fee) ?=(^ fum)) ~ - ?: |(?=(~ muh) ?=(~ r.u.muh)) - [~ %cog u.fee u.fum] - ?. =([~ 'text/json' ~] (~(get by q.u.muh) 'content-type')) + ++ grab-body + |* a=fist:jo ^+ *a + ?. &(?=(^ bod) ?=(?(%post %put %delt) mef)) ~ - =+ jun=`(unit json)`(rush q.u.r.u.muh apex:poja) - ?~ jun - ~ - [~ %cop u.fee u.fum u.jun] + %.(q.u.bod ;~(biff poja a)) :: - ++ flux :: credential caboose - |= [nyp=path quy=quay] - ^- coin - :* %many - [%many (turn nyp |=(a=span [%$ %ta a]))] - [%blob ced] - |- ^- (list coin) - ?~ quy ~ - [[%$ %t p.i.quy] [%$ %t q.i.quy] $(quy t.quy)] - == + ++ need-body |*(a=fist:jo (need (grab-body a))) + ++ to-oryx (ot oryx/so ~):jo :: - ++ foin :: version request - |= [fur=(unit term) you=@p paw=(list ,@t) quy=quay] - ^- (unit seam) - =. aut.ced (~(put ju aut.ced) %$ (scot %p you)) :: XX backwards - ?. ?& ?=(~ fur) - ?=(~ quy) - ?=([@ @ ~] paw) - ((sane %tas) i.t.paw) - == ~ - %+ bind - ^- (unit moat) - =+ soy=(slay i.paw) - ?~ soy ~ - ?+ u.soy - ~ - :: - [%$ ?(%da %ud %tas) @] - [~ (case p.u.soy) (case p.u.soy) /] - :: - [%many [%$ ?(%da %ud %tas) @] [%$ ?(%da %ud %tas) @] ~] - [~ (case i.p.u.soy) (case i.t.p.u.soy) /] - == - |= mot=moat - `seam`[%det i.t.paw mot] :: - ++ funk :: functional request - |= [nep=@tas fur=(unit term) you=@p paw=(list ,@t) quy=quay] - ^- (unit seam) - =. aut.ced (~(put ju aut.ced) %$ (scot %p you)) :: XX backwards - =+ won==(%n (rsh 3 2 nep)) - %+ bind - ^- (unit ,[mark tube]) - =+ ^= zac ^- (unit ,[p=@ta q=path]) - ?: won - [~ (scot %da now) paw] - ?~ paw ~ - =+ zac=(slay i.paw) - ?. ?=([~ %$ ?(%ud %da %tas) *] zac) ~ - [~ i.paw t.paw] - ?: ?| ?=(~ zac) - ?=(~ q.u.zac) - !(levy t.q.u.zac (sane %ta)) - == ~ - :+ ~ ?~(fur %html u.fur) - ^- tube - :* (scot %p our) - i.q.u.zac - p.u.zac - t.q.u.zac - == - |= [for=mark toe=tube] - ^- seam - =+ nyp=?.(=(%i (cut 3 [1 1] nep)) /[nep] /[nep]/(rsh 3 1 (scot %p you))) - :^ %fun for - toe(s (weld s.toe `path`[~(rent co (flux nyp quy)) %web ~])) - ?. won ~ - :_ ~ - =- =+ pey="{(scag 2 (trip nep))}v" - =. pey %+ weld pey - ?. =(%i (snag 1 pey)) - "" - "/{(slag 1 (scow %p you))}" - =+ ven=+((,@ (need (sky %cw p.toe q.toe r.toe ~)))) - =+ ^= cal :/ - "path='". - "/{pey}". - "/{(scow %ud ven)}". - "/{(trip q.toe)}';" - [-.sac [cal +.sac]] - ^= sac - ;script - ; - ; tries = 0; - ; call = function() { - ; xhr = new XMLHttpRequest(); - ; xhr.open('GET', path, true); - ; xhr.addEventListener('load', function() { - ; if(this.status !== 200) { - ; return keep(); - ; } - ; document.location.reload(); - ; }); - ; xhr.addEventListener('error', keep); - ; xhr.addEventListener('abort', keep); - ; xhr.send(); - ; } - ; keep = function() { - ; setTimeout(call,1000*tries); - ; tries++; - ; } - ; call(); - == + ++ new-dependency + |= [a=@uvH b=(each duct ixor)] ^+ done + ?~ a done + =+ had=(~(has by liz) a) + =. liz (~(put ju liz) a b) + ?: had done + (pass-note on//(scot %uv a) %f [%wasp our a]) :: - ++ holt :: login redirect - |= [whu=(unit ship) pul=purl] - ^- (unit seam) - :+ ~ - %red - :: :+ [p.p.pul q.p.pul r.p.pul] - :+ [| q.p.pul r.p.pul] :: XX https - [p.q.pul /gul] :: XX js discrimination - :- [%url (crip (earn pul(p.p |)))] - ?~ whu ~ - [%who (rsh 3 1 (scot %p u.whu))]~ - :: - ++ holy :: structured request - |= [pul=purl moh=moth] - ^- (unit seam) - ?~ q.q.pul ~ - =* nep i.q.q.pul - =+ paw=t.q.q.pul - =+ [one=(end 3 1 nep) two=(cut 3 [1 1] nep) tri=(cut 3 [2 1] nep)] - ?. ?& ?- p.moh - %conn | :: connect - %delt | :: delete - %get =(%g one) :: get - %head =(%g one) :: head - %opts | :: options - %post =(%p one) :: post - %put =(%t one) :: put - %trac | :: trace - == - :: - ?+ two | - %e & :: stranger - %u p.p.pul :: guest - %i p.p.pul :: neighbor - %o p.p.pul :: identified - == - :: - ?= $? %g :: app get - %c :: console - %e :: app update - %f :: functional - %v :: functional version - %l :: local login - %m :: app message - %r :: app response - %s :: app subscribe - %h :: app heartbeat - %p :: app script by port - %n :: now - %u :: app unsubscribe - %z :: app version - == - tri - :: - !&(=(%c tri) !=(%o two)) - =(3 (met 3 nep)) - == - ?: &(=(%get p.moh) ?=([~ [@ ~]] q.pul)) :: app shortcut - =- $(q.pul [`%html -]) - =+ ato=(~(tap in (~(get ju aut.ced) %$))) - =+ att=`(list ship)`(murn ato |=(a=span (slaw %p a))) - ?~ att [%geg i.q.q.pul ~] - ?: (~(has in (sa att)) our) - [%gog i.q.q.pul ~] - :+ %gig - (rsh 3 1 (scot %p (snag 0 (sort att lth)))) - /[i.q.q.pul] - ~ - =^ yun paw - ?+ two ~ - ?(%e %u) [`@`(shaf %fake ses) paw] - %i ?~ paw ~ - [(slav %p (cat 3 '~' i.paw)) t.paw] - %o [our paw] - == - ?: &(=(%i two) !(lash yun) !=(yun (shaf %fake ses))) - (holt [~ yun] pul) - ?: &(=(%o two) !(lash our)) - (holt [~ our] pul) - ?+ one ~ - %g - ?+ tri ~ - ?(%f %n) (funk nep p.q.pul yun paw r.pul) - %v (foin p.q.pul yun paw r.pul) - %c (flub paw ~) - %l (fool r.pul) - %g (fapg p.q.pul yun paw) - %e (fape p.q.pul yun paw) - %p (fapp p.q.pul yun paw) - == + ++ parse + ^- (each perk httr) + |^ =+ hit=as-magic-filename + ?^ hit [%| u.hit] + =+ bem=as-beam + ?^ bem [%& %beam u.bem] + ?. check-oryx + ~|(%bad-oryx ~|([(grab-body to-oryx) vew.cyz:for-client] !!)) + =+ hem=as-aux-request + ?^ hem [%& u.hem] + ~|(strange-path/q.pok !!) :: - %p - ?+ tri ~ - %l (foom moh) - %m (fapm p.q.pul yun paw moh) - %s (faps p.q.pul yun paw moh) - %u (fapu p.q.pul yun paw moh) - == - :: - %t - ?+ tri ~ - %c (flub paw [~ moh]) - %h (faph p.q.pul yun paw moh) - %m (fapm p.q.pul yun paw moh) - %s (faps p.q.pul yun paw moh) - %u (fapu p.q.pul yun paw moh) - == - == - :: - ++ idle :: cancel request - |= num=@ud - ^+ +> - =+ pup=(~(get by q.rey) num) - ?~ pup +>.$ - =. q.rey (~(del by q.rey) num) - ?. ?=(%way pez.u.pup) +>.$ - ?: ?=(%det -.som.u.pup) - +>.$(..ya (hoot our num ses `riff`[p.som.u.pup ~])) - ?: ?=(%fun -.som.u.pup) - +>.$(..ya (hone our num ses)) - +>.$ - :: - ++ bush :: error response - |= [cod=@ud msg=@t num=@ud] - ^+ +> - =+ pup=(~(get by q.rey) num) - ?~ pup +>.$ - %= +>.$ - q.rey - %+ ~(put by q.rey) num - %= u.pup - pez - `pest`[%fin %raw cod ~[content-type/'text/plain'] `(taco msg)] - == - == - :: - ++ bust :: no-content response - |= [cod=@ud num=@ud] - ^+ +> - =+ pup=(~(get by q.rey) num) - ?~ pup +>.$ - :: ?> ?=(%way pez.u.pup) - %= +>.$ - q.rey - %+ ~(put by q.rey) num - u.pup(pez [%fin %raw cod *mess `*octs]) - == - :: - ++ erle :: url localize - |= [his=ship pul=purl] ^- purl - =+ pod=(mo (turn (~(tap by dop)) |=([p=host q=ship] [q p]))) - ?: (~(has by pod) his) - pul(p [& ~ (~(got by pod) his)]) - ?: ?=(hoke r.p.pul) - ~| %no-port - pul(q.p [~ ?+(his !! %~zod 8.443)]) :: XX - pul(p [& ~ [~ /org/urbit/(rsh 3 1 (scot %p his))]]) - :: - ++ inch :: function built - |= [num=@ud mez=(each bead (list tank))] - ^+ +> - =+ pup=(~(get by q.rey) num) - ?~ pup - ~& [%inch-lost ses num mez] - +>.$ - ?> ?=(%way pez.u.pup) - +>.$(q.rey (~(put by q.rey) num u.pup(pez [%fud mez]))) - :: - ++ into :: introduce - |= [pul=purl moh=moth] - ^+ +> - =+ num=p.rey - %= +>.$ - lor (~(put by lor) hen num [%& our ses]) - p.rey +(num) - q.rey - %+ ~(put by q.rey) num - ^- pimp - :* !?=(%head p.moh) - p.q.pul - hen - *seam - `pest`[%raw pul moh] - ~ - == - == - :: - ++ iota :: change response - |= [num=@ud rot=riot] - ^+ +> - =+ pup=(~(get by q.rey) num) - ?~ pup - ~& [%iota-lost ses num rot] - +>.$ - ?> ?=(%way pez.u.pup) - +>.$(q.rey (~(put by q.rey) num u.pup(pez [%haz rot]))) - :: - ++ lass :: load secret - ^- @ta - =+ pax=/(scot %p our)/code/(scot %da now)/(scot %p our) - %^ rsh 3 1 - (scot %p (,@ (need (sky %a pax)))) - :: - ++ lash :: user is authorized - |=(a=ship (~(has ju aut.ced) %$ (scot %p a))) - :: - ++ redi :: js login redirect - |= pul=purl ^- tape - "window.location = '{(earn pul)}". - "{?~(r.pul "?" "&")}url=' +". - "encodeURIComponent(window.location)" - :: - ++ step :: step in work - |- ^+ + - =^ zib +.$ - =+ yub=q.rey - |- ^- [(list ,[p=@ud q=pimp]) _+.^$] - ?~ yub [~ +.^$] - =^ sid +.^$ $(yub l.yub) - =^ dex +.^$ $(yub r.yub) - =^ top +.^$ (wink n.yub) - =+ pot=`(list ,[p=@ud q=pimp])`?~(top ~ [[p.n.yub u.top] ~]) - [:(weld pot dex sid) +.^$] - +.$(q.rey (~(gas by `_q.rey`~) zib)) - :: - ++ wink :: advance request - |= [num=@ud pip=pimp] - ^- [(unit pimp) _+>] - :: ~& wink-do/[?@(pez.pip pez.pip -.pez.pip) -.som.pip] - ?- pez.pip - %way [[~ pip] +>.$] - %new - ?- -.som.pip - %ape :: stream update - :: ~& :~ %eyre-ape - :: [%owner our] - :: [%requester num] - :: [%app p.som.pip] - :: [%user q.som.pip] - :: [%instance r.som.pip] - :: [%stream s.som.pip] - :: [%request t.som.pip] - :: == - [`(fall +< -(pez %way)) +>]:[pip (yoke num +.som.pip)] - :: - %apg :: simple get - :: ~& :~ %eyre-apg - :: [%owner our] - :: [%requester num] - :: [%app p.som.pip] - :: [%user q.som.pip] - :: [%logo r.som.pip] - :: [%path s.som.pip] - :: == - :- [~ pip(pez %way)] - (yokg num p.som.pip q.som.pip s.som.pip) - :: - %aph :: heartbeat - :: ~& [%wink-aph +.som.pip] - (yokh num +.som.pip) - :: - %apm :: message - :: ~& [%wink-apm +.som.pip] - :- [~ pip(pez %way)] - (yokm num +.som.pip) - :: - %app :: script by port - :: ~& [%wink-app +.som.pip] - (yokp num +.som.pip) - :: - %aps :: subscribe - :: ~& [%wink-aps +.som.pip] - :- [~ pip(pez %way)] - (yoks num +.som.pip) - :: - %apu :: unsubscribe - :: ~& [%wink-apu +.som.pip] - (yoku num +.som.pip) - :: - %con - !! - :: - %cog - !! - :: - %cop - !! - :: - %det - :- [~ pip(pez %way)] - +>.$(..ya (hoot our num ses [p.som.pip ~ [%many %& q.som.pip]])) - :: - %fun - :- [~ pip(pez %way)] - =+ bem=`beam`(need (tome q.som.pip)) - =+ kas=`silk`[%cast %mime `silk`[%boil p.som.pip bem ~]] - +>.$(..ya (honk our num ses kas)) - :: - %lon - ^- [(unit pimp) _+>.$] - ?~ pus.p.som.pip - :_ +>.$ - ?: ?~ whu.p.som.pip | - (lash u.whu.p.som.pip) - [~ pip(som [%red pul.p.som.pip])] - ?: wit.p.som.pip - [~ pip(pez [%who %$ (scot %p (need whu.p.som.pip))])] - =+ rul=(earn pul.p.som.pip) - =+ sus=?~(foy.p.som.pip ses q.u.foy.p.som.pip) - ~& auth-request/secret=`cord`lass - =+ ham=(noon our sus whu.p.som.pip rul) - [~ pip(pez [%fin %ham ham])] - ?. =(lass u.pus.p.som.pip) - :_ +>.$ - :- ~ - %= pip - pez - [%fin %mid /text/json (tact (pojo (jobe [%ok [%b |]]~)))] - == - =. aut.ced (~(put ju aut.ced) %$ (scot %p (need whu.p.som.pip))) - ?~ foy.p.som.pip - =+ ^= jon - %- jobe - :~ [%ok [%b &]] - [%next (jape (earn pul.p.som.pip))] - == - :_(+>.$ [~ pip(pez [%fin %mid /text/json (tact (pojo jon))])]) - =. ..ya (haji our u.foy.p.som.pip) - =+ ^= lup ^- purl - %+ erle p.u.foy.p.som.pip - :+ `hart`p.pul.p.som.pip - ^- pork - [~ /gul] - ^- quay - :~ [%who (rsh 3 1 (scot %p (need whu.p.som.pip)))] - [%url (crip (earn pul.p.som.pip))] - [%wit %yes] - == - =+ jon=(jobe ~[[%ok [%b &]] [%next (jape (earn lup))]]) - :_(+>.$ [~ pip(pez [%fin %mid /text/json (tact (pojo jon))])]) - :: - %red - :_ +>.$ + ++ as-magic-filename + ^- (unit httr) + ?+ [(fall p.pok %$) q.pok] ~ + [?(%ico %png) %favicon ~] :- ~ - %= pip - pez - :- %fin - =+ pul=p.som.pip - ?: ?=([~ %js] p.q.pul) :: XX js discrimination - [%mid /application/javascript (tact (redi pul(p.q ~)))] - =. p.q.pul ~ - :- %raw - :+ 307 - [%location (crip (earn pul))]~ - ~ + %^ resp 200 image//png + 0w89wg.GV4jA.l9000.00dPb.YzBT6.giO00.o100d.wZcqc.a9tg-.VTG0b. + AUIvE.HBM3g.cK4SE.0aagi.l090p.I1P5g.Y-80r.y1YS9.1xE~Y.qgpFY. + vKN1V.905y0.2UwvL.43TUw.uL406.0-31h.xwoJF.Ul454.ilk00.00Yps. + BNumh.xpl9B.pS5Ji.i1BoC.ZAgg1.BsC5T.t6pLk.Thohn.gp000.0ov~P. + 7M000.0o840.00010.0001i.h4x93.g0000.Eq2wR.7jB29 + :: + [%txt %robots ~] + :- ~ + %^ resp 200 text//plain + %- role + :~ 'User-agent: *' + 'Disallow: /' + == + == + :: + ++ as-beam + ^- (unit beam) + |- + ?~ q.pok + $(q.pok /index) + ?. ((sane %tas) i.q.pok) + (tome q.pok) + `[[our i.q.pok da/now] (flop t.q.pok)] + :: + ++ as-aux-request :: /~/... req parser + ^- (unit perk) + =. mef + ?. ?=(%post mef) mef + ?+ quy ~|(bad-quy/[req='"?PUT" or "?DELETE"' quy] !!) + ~ mef + [[%'DELETE' ~] ~] %delt + [[%'PUT' ~] ~] %put + == + |- + ?: ?=([%'~~' *] q.pok) :: auth shortcut + $(q.pok ['~' %as %own t.q.pok]) + ?. ?=([%'~' @ *] q.pok) ~ + :- ~ ^- perk + =* pef i.t.q.pok + =+ but=t.t.q.pok :: XX =* + ?+ pef ~|(pfix-lost/`path`/~/[pef] !!) + %debug ;;(perk [%bugs but]) + %away [%away ~] + %at [%auth %at pok(q but)] + %am ?~(but !! [%auth %xen i.but pok(q t.but)]) + %as + :+ %auth %get + ~| bad-ship/?~(but ~ i.but) + ?~ but !! + :_ pok(q t.but) + ?+ i.but (slav %p i.but) + %anon anon + %own our == :: - %sil - :- [~ pip(pez %way)] - +>.$(..ya (honk our num ses q.som.pip)) + %on [%poll (raid but %uv ~)] + %of + :+ %view ?>(?=([@ ~] but) i.but) + ?> ?=([[%poll @] ~] quy) :: XX eventsource + [~ (rash q.i.quy dem)] + :: + %to + ?> =('/' (need-body (ot wire/so ~):jo)) :: XX custom + =- :^ %mess [- +<]:dir +>.dir + (need-body (ot wire/(cu stab so) xyro/some ~):jo) + ^= dir + =+ ful=(read but %p %tas %tas ~) + ?^ ful u.ful + ~| bad-mess/but + [our (raid but %tas %tas ~)] + :: + %in + ~| expect/[%post 'application/json' /'@uv' '?PUT/DELETE'] + ?> &(?=(?(%delt %put) mef) ?=($|(~ [~ %json]) p.pok)) + [%deps mef (raid but %uv ~)] + :: + %is + ?~ but + ~|(no-app/but=but !!) + |- ^- perk + ?~ p.pok $(p.pok [~ %json]) + ?. ?=(%json u.p.pok) + ~|(is/stub/u.p.pok !!) :: XX marks + ?: ((sane %tas) i.but) + $(but [(scot %p our) but]) + ?> ?=(?(%delt %put) mef) + =+ :- hap=[(slav %p i.but) (slav %tas -.t.but)] + wir=(need-body (ot wire/(cu stab so) ~):jo) + [%subs mef hap u.p.pok wir +.t.but] + :: + %auth + :- %auth + |- ^- perk-auth + ?+ p.pok !! + ~ $(p.pok [~ %json]) + [~ %js] [%js ~] + [~ %json] + ?+ mef ~|(bad-meth/mef !!) + %get [%json ~] + %put + ~| parsing/bod + [%try (need-body (ot ship/(su fed:ag) code/so ~):jo)] + :: + %delt + ~| parsing/bod + =+ jon=(need (poja q:(need bod))) + ?> ?=(%o -.jon) + =+ sip=(~(get by p.jon) %ship) + [%del ?~(sip ~ [~ (need ((su:jo fed:ag) u.sip))])] + == == + == + -- + :: + ++ process + ^- (each pest ,_done) + =+ pet=parse + ?: ?=(%| -.pet) + [%& ~ p.pet] + (process-parsed p.pet) + :: + ++ process-parsed + |= hem=perk ^- (each pest ,_done) + ?- -.hem + %auth (process-auth p.hem) + %away [%& %html logout-page:xml] + ?(%beam %spur) + =+ ext=(fall p.pok %urb) + =+ bem=?-(-.hem %beam p.hem, %spur [root-beak p.hem]) + [%& %| ~ (ford-get-beam bem ext)] + :: + %bugs + ?- p.hem + %as (show-login-page) + %to [%& %html poke-test:xml] == :: - [%err *] - [~ +>.$(..ya (muff(hen hen.pip) [%thou (loft `love`[%zap +.pez.pip])]))] - :: - [%fin *] - =+ har=(loft p.pez.pip) - =. q.har (weld (turn cug |=(a=@t ['set-cookie' a])) q.har) - [~ +>.$(..ya (muff(hen hen.pip) [%thou har]))] - :: - [%haz *] - :_ +>.$ - [~ pip(pez [%fin %wan 'Hello, world' ~])] - :: - [%fud *] - =+ ^= mog ^- (list manx) - ?: ?=(%fun -.som.pip) - (weld r.som.pip sip.pip) - sip.pip - :_ +>.$ - :- ~ - %= pip - pez - ^- pest - ?- -.p.pez.pip - | =+ mad=(loga "server error" mog p.p.pez.pip) - :- %fin - :- %raw - ^- httr - :+ 500 - ~[content-type/'text/html'] - [~ (tact (poxo mad))] - & [%fin (lofa mog (lopo [?>(?=(@ p) .)]:q.p.p.pez.pip))] - == + %deps + =+ ire=(oryx-to-ixor (need-body to-oryx)) + ?> (~(has by wix) ire) :: XX made redundant by oryx checking + =< [%| (nice-json)] + ?- p.hem + %put (new-dependency q.hem %| ire) + %delt done(liz (~(del ju liz) q.hem %| ire)) == :: - [%raw *] - :_ +>.$ - ^- (unit pimp) - :- ~ - =+ hoy=(holy p.pez.pip) - ?~ hoy - pip(pez [%err 404 [[%leaf "invalid request"] ~]]) - pip(som u.hoy, pez %new) + %mess + =+ [him=him:for-view cay=[%json !>(`json`s.hem)]] + ?: ?=(%json q.hem) + [%| ((teba new-mess:for-view) p.hem r.hem cay)] + :^ %& %| [%to need-ixor (scot %p p.p.hem) q.p.hem r.hem] + (ford-req root-beak [%cast q.hem %done ~ cay]) :: - [%who *] - :_ +>.$ - ?.((~(has ju aut.ced) p.pez.pip q.pez.pip) [~ pip] [~ pip(pez %new)]) + %poll + ?. ?=([~ %js] p.pok) :: XX treat non-json cases? + [%| (new-dependency p.hem %& hen)] + =+ polling-url=['/' (apex:earn %| pok(u.p %json) quy)] + [%& %js (add-json (joba %poll (jape polling-url)) poll:js)] + :: + %subs + ?- p.hem + %put [%| ((teba add-subs:for-view) q.hem)] + %delt [%| ((teba del-subs:for-view) q.hem)] + == + :: + %view + ~| lost-ixor/p.hem + [%| ((teba poll:(ire-ix p.hem)) u.q.hem)] == :: - ++ work - |- ^+ + - =+ sez=step - ?: =(rey.sez rey) sez - $(+ sez) - :: - ++ yoke :: long poll - |= [num=@ud you=ship nap=@ud cnt=@ud] - ^- [(unit pimp) _+>] - =+ yon=(yolk nap) - ?~ yon `(bust 204 num) - =. +>.$ abet:(hire:(yule %sub):u.yon cnt num) - :_ +>.$ - =+ pup=(~(get by q.rey) num) - ?~ pup ~ - ?. ?=(%sil -.som.u.pup) ~ - `u.pup - :: - ++ yokg :: main call - |= [num=@ud app=term you=ship pax=path] - ^+ +> - ?< (~(has by sok) num) - abet:(~(self yo num you *sink) app pax) - :: - ++ yokh :: heartbeat - |= [num=@ud you=ship nap=@ud cnt=@ud jon=json] - ^- [(unit pimp) _+>] - =+ yon=(yolk nap) - ?~ yon [~ (bust 204 num)] - [- abet:+]:(beat:u.yon cnt num jon) - :: - ++ yokm :: message - |= [num=@ud you=ship nap=@ud cnt=@ud hap=hasp for=mark jon=json] - ^+ +> - =+ yon=(yolk nap) - ?~ yon (bust 204 num) - abet:(post:u.yon cnt num hap for jon) - :: - ++ yokp :: script by port - |= [num=@ud you=ship nup=(unit ,@ud)] - ^- [(unit pimp) _+>] - ?~ nup - $(nup [~ num], +> ~(harp yo num you *sink)) - =+ yon=(yolk u.nup) - ?~ yon - =+ err=(bust 204 num) - [`(need (~(get by q.rey.err) num)) err] - [- abet:+]:(hark:u.yon num) - :: - ++ yoks :: subscribe - |= [num=@ud you=ship nap=@ud hap=hasp pax=path] - =+ yon=(yolk nap) - ?~ yon (bust 204 num) - abet:(scud:u.yon num hap pax) - :: - ++ yoku :: unsubscribe - |= [num=@ud you=ship nap=@ud hap=hasp pax=path] - ^- [(unit pimp) _+>] - =+ yon=(yolk nap) - ?~ yon [~ (bust 204 num)] - [- abet:+]:(scad:u.yon num hap pax) - :: - ++ yolk :: yo by instance - |= nap=@ud - =+ suy=(~(get by sok) nap) - ?~ suy ~ - (some ~(. yo nap=nap you=p.u.suy siq=q.u.suy)) - :: - ++ yo :: app instance - |_ $: nap=@ud :: instance number - you=ship :: client identity - siq=sink :: instance state - == - ++ abet :: resolve - %_ ..yo - sok (~(put by sok) nap [you siq]) - == + ++ process-auth + |= ham=perk-auth ^- (each pest ,_done) + =+ yac=for-client + ?- -.ham + %js [%& %js auth:js] + %json =^ jon ..ya stat-json.yac + [%| (give-json 200 ~ jon)] + %xen (show-login-page ~ ses.ham) :: - ++ amok :: demolish - ^+ ..yo - =+ wuh=(~(tap by can.sub.siq)) - |- ^+ ..yo - ?~ wuh - %= ..yo - sok (~(del by sok) nap) - == - %= $ - wuh t.wuh - ..amok - (pass(hen hen.q.i.wuh) `p.i.wuh [%g %nuke [- + ~]:hap.q.i.wuh you]) - == - :: - ++ beat - |= [cnt=@ud num=@ud jon=json] - ^- [(unit pimp) _+>] - ?. =(cnt num.bet.siq) - [~ +>.$(..yo (bust 204 num))] - =. +>.$ hast - =. bet.siq bet.siq(num +(num.bet.siq), tim now, hen hen) - =. +>.$ hawa - =. +>.$ (hire:(yule %bet) cnt num) - =. +>.$ (hear:(yule %bet) ~ %& %json !>((joba %a-ok %b %&))) - [`(need (~(get by q.rey) num)) +>.$] - :: - ++ hark - |= num=@ud - ^- [(unit pimp) _+>] - =. +>.$ abet:(busk:(yule %nil) num *@ ~ %& %js !>((duty nap you))) - [`(need (~(get by q.rey) num)) +>.$] - :: - ++ harp - %* abet hawa - tim.bet.siq now - num.sub.siq 1 - == - :: - ++ hast - %_ . - mow - :_ mow - :- hen.bet.siq - :^ %pass - [%leep (scot %p our) ses (scot %ud nap) (scot %ud num.bet.siq) ~] - %t - :- %rest (add ~m2 tim.bet.siq) - == - :: - ++ hawa - %_ . - mow - :_ mow - ^- move - :- hen.bet.siq - :^ %pass - [%leep (scot %p our) ses (scot %ud nap) (scot %ud num.bet.siq) ~] - %t - :- %wait (add ~m2 now) - == - :: - ++ hoop :: request path - |= can=(each ,@ud hasp) - ^- path - :* %hoop - (scot %p our) - ses - (scot %ud nap) - ?- -.can - %& [%show (scot %ud p.can) ~] - %| [%mess (scot %p p.p.can) q.p.can ~] - == - == - :: - ++ pass :: pass - |= [can=(each ,@ud hasp) noh=note] - ^+ +> - +>(mow [[hen %pass (hoop can) noh] mow]) - :: - ++ post :: transmit - |= [cnt=@ud num=@ud hap=hasp for=mark jon=json] - ^+ +> - =. +>.$ - ?. =(cnt num.meg.siq) +>.$ - %+ pass(num.meg.siq +(num.meg.siq)) [%| hap] - [%f %exec our [our %main %da now] ~ %cast for %done ~ %json !>(jon)] - ?. =(+(cnt) num.meg.siq) - +>.$(..yo (bust 204 num)) - (hire:(yule %meg) cnt num) - :: - ++ scad - |= [num=@ud hap=hasp pax=path] - ^- [(unit pimp) _+>] - =. +>.$ - %- ~(rep by can.sub.siq) - =+ [*p=[p=@ud q=stem] q=+>.$] |. - ?. =([hap pax] [hap.q.p pax.q.p]) q - =. q q(can.sub.siq (~(del by can.sub.siq:q) p.p)) - ([-(hen +)]:[pass:q hen.q.p] `p.p %g %nuke [- + ~]:hap you) - =+ huq=[~ %& %json !>((joba %ok %b %&))] - =. +>.$ abet:(busk:(yule %nil) num 0 huq) - [`(need (~(get by q.rey) num)) +>.$] - :: - ++ scud :: subscribe - |= [num=@ud hap=hasp pax=path] - =. can.sub.siq - (~(put by can.sub.siq) num.sub.siq [hap pax hen `[%| num]]) - =. +>.$ (pass `num.sub.siq `note`[%g %show [- + ~]:hap you pax]) - =. num.sub.siq +(num.sub.siq) - +>.$ - :: - ++ self :: request main - |= [app=term pax=path] - ^+ +> - =. tim.bet.siq now - =. can.sub.siq - (~(put by can.sub.siq) 0 [[our app] pax hen `[%& nap]]) - =. num.sub.siq +(num.sub.siq) - =. hen.bet.siq hen - =. +>.$ hawa - (pass `0 [%g %show [our app ~] you pax]) - :: - ++ yule - |= pla=?(%bet %meg %sub %nil) - %~ . yu :- pla - =< wig - ?-(pla %bet bet.siq, %meg meg.siq, %sub sub.siq, %nil [wig=*swig ~]) - :: - ++ yu :: swig state - |_ [pla=?(%bet %meg %sub %nil) wig=swig] - ++ abet - ^+ ..yu - ?- pla - %bet %_(..yu wig.bet.siq wig) - %meg %_(..yu wig.meg.siq wig) - %sub %_(..yu wig.sub.siq wig) - %nil ..yu - == + %at + =. ..ya abet.yac + =+ pez=process(pok p.ham) + ?. ?=(%& -.pez) ~|(no-inject/p.ham !!) + ?~ p.pez pez + ?+ -.p.pez ~&(bad-inject/p.pez !!) + %red pez + %| + =. ya abet.yac + [%| (resolve ~ p.pez(p [%at ses.yac p.p.pez]))] :: - ++ busk :: seam result - |= $: num=@ud - cnt=@ud - huq=(unit (each cage cage)) - == - ^+ +> - =+ pup=(~(get by q.rey) num) - ?~ pup +>.$ :: XX a hack - =. wig ?: ?=(%nil pla) wig - ?. =(toy.wig cnt) - ?>(=(toy.wig +(cnt)) wig) - %= wig - toy +(toy.wig) - red - ?: =(0 toy.wig) red.wig - :: ~& [%busk [%sent cnt] [%lost (dec toy.wig)]] - (~(del by red.wig) (dec toy.wig)) - == - =+ pip=u.pup - =+ ^= sip - ?. ?=(%apg -.som.pip) sip.pip - =* his q.som.pip - =+ mef=?:(=(our his) "gop" "gip/{|1:}") :: e.g. "gip/zod" - =+ hat="/{mef}/{(pojo (jone nap))}/hart.js" - [;script(src hat); ;meta(charset "utf-8"); sip.pip] - ?~ huq +>.$(..yo (bust 404 num)) - %= +>.$ - q.rey - %+ ~(put by q.rey) num - ^- pimp - %= pip - pez %new - sip sip - som ^- seam - :+ %sil - ?:(-.u.huq 200 203) - =+ don=`silk`[%done ~ `cage`p.u.huq] - ^- silk - :+ %cast %mime - ?~ fur.pip don - `silk`[%cast u.fur.pip don] - == + %js + =^ jon ..ya stat-json.yac + [%| (resolve cug.yac p.pez(p (add-json jon p.p.pez)))] + == + :: + %del + =. ..ya (logoff:yac p.ham) + =+ cug=[(cat 3 cookie-prefix '=~; Path=/')]~ + [%| (give-json 200 cug (joba %ok %b &))] + :: + %get + ~| aute/ham + ?: |(=(anon him.ham) (~(has in aut.yac) him.ham)) + process(pok rem.ham, ..ya abet.yac(him him.ham)) + ?. =(our him.ham) + [%| ((teba foreign-auth.yac) him.ham hat rem.ham quy)] + (show-login-page ~) + :: + %try + ~& ses-try/ses.yac + :- %| + ?. =(our him.ham) + ~|(stub-foreign/him.ham !!) + ?. =(load-secret cod.ham) + ~|(try/`@t`load-secret !!) :: XX security + =^ jon ..ya stat-json:(logon:yac him.ham) + (give-json 200 cug.yac jon) + == + :: + ++ show-login-page + |= ses=(unit hole) ^- (each pest ,_done) + ?. ?=($|(~ [~ %html]) p.pok) + [%& %red ~] + ?~ ses + [%& %htme login-page:xml] + ?: (~(has by wup) u.ses) + [%& %htme login-page:xml] + =+ yac=(new-ya u.ses) + =. ..ya abet.yac + [%| (give-html 401 cug.yac login-page:xml)] + :: + ++ cookie-prefix (rsh 3 1 (scot %p our)) + ++ need-ixor (oryx-to-ixor (need-body to-oryx)) + ++ for-view ^+(ix (ire-ix need-ixor)) + :: + ++ for-client :: stateful per-session engine + ^+ ya + =+ pef=cookie-prefix + =+ lig=(session-from-cookies pef maf) + ?~ lig + (new-ya (rsh 3 1 (scot %p (end 6 1 ney)))) + ~| bad-cookie/u.lig + =+ cyz=(~(got by wup) u.lig) + ~(. ya u.lig cyz(cug ~)) + :: + ++ new-ya |=(ses=hole ~(. ya ses (new-cyst ses))) + ++ new-cyst + |= ses=hole + =* sec p.hat + =+ pef=cookie-prefix + ^- cyst + :* ^- cred + :* hat(p sec) + ~ + 'not-yet-implemented' ::(rsh 3 1 (scot %p (end 6 1 (shaf %oryx ses)))) + :: + =+ lag=(~(get by maf) %accept-language) + ?~(lag ~ ?~(u.lag ~ [~ i.u.lag])) + :: + cip + ~ == - :: - ++ dumb :: reset - ^+ ..yu - =+ dum=(~(tap by wan.wig) ~) - |- ^+ ..yu - ?~ dum ..yu :: XX drop stream - $(dum t.dum, ..yo (bust 404 q.i.dum)) - :: - ++ hear :: produce - |= huq=(unit (each cage cage)) - ^+ ..yu - =< abet - =+ cnt=cnt.wig - =+ dul=(~(get by wan.wig) cnt) - :: ~& :~ %yu-hear - :: [%instance nap] - :: [%produced cnt] - :: ?~(dul %unrequested [%requester u.dul]) - :: == - =: cnt.wig +(cnt.wig) - wan.wig ?~(dul wan.wig (~(del by wan.wig) cnt.wig)) - red.wig (~(put by red.wig) cnt.wig huq) - == - ?~(dul +>.$ (busk u.dul cnt huq)) - :: - ++ hire :: consume - |= [cnt=@ud num=@ud] - ^+ ..yu - =< abet - :: ~& :~ %yu-hire - :: [%instance nap] - :: [%produced cnt.wig] - :: [%request cnt] - :: [%dispatched toy.wig] - :: [%requester num] - :: == - ?: |((lth +(cnt) toy.wig) (gth cnt toy.wig)) - ~& [%hire-improper [%request cnt] [%dispatched toy.wig]] - +>.$(..yo (bust 204 num)) - ?: (gte cnt cnt.wig) - :: ~& %hire-wait - =+ old=(~(get by wan.wig) cnt) - =. wan.wig (~(put by wan.wig) cnt num) - +>.$(..yo ?~(old ..yo (bust 204 u.old))) - =+ rud=(~(get by red.wig) cnt) - ?~ rud - :: ~& %hire-bust - +>.$(..yo (bust 204 num)) - :: ~& %hire-send - (busk num cnt u.rud) - -- - -- + [anon ~] + :: + :_ ~ + %^ cat 3 + (cat 3 (cat 3 pef '=') ses) + :: (cat 3 '; HttpOnly' ?.(sec '' '; Secure')) + '; Path=/; HttpOnly' + :: + now + ~ + ~ + :: [1 ~] + == -- - -- + :: + ++ oryx-to-ixor |=(a=oryx (rsh 3 1 (scot %p (end 6 1 (shas %ire a))))) + ++ ya :: session engine + =| [ses=hole cyst] + =* cyz -> + |% + ++ abet ..ya(wup (~(put by wup) ses cyz)) + ++ abut ..ya(wup (~(del by wup) ses)) + ++ foreign-auth + |= [him=ship pul=purl] ^+ ..ya + =. way (~(put by way) him pul hen) + (ames-gram:abet him [lon/~ ses]) + :: + ++ foreign-hat + |= [him=ship hat=hart] ^+ ..ya + ~| way + =^ pul hen (~(got by way) him) + =: way (~(del by way) him) + dop (~(put by dop) r.hat him) + q.q.pul ['~' %am ses q.q.pul] + == + =+ url=(welp (earn pul(p hat)) '#' (head:earn p.pul)) + %- give-thou:abet + (add-cookies cug [307 [location/(crip url)]~ ~]) + :: + ++ logon + |= her=ship + %_ +> + him her + aut (~(put in aut) her) + ..ya + ~& logon/[our her ses] + ?. =(our her) + ..ya + =+ sap=(~(get by sop) ses) + ~& sap + ?. ?=([~ @ %|] sap) + ..ya + (ames-gram -.u.sap aut/~ ses) + == + ++ logoff + |= her=(unit ship) ^+ ..ya + ?~ her abut + =. aut (~(del in aut) u.her) + ?~ aut abut + abet(him ?.(=(her him) him n.aut)) + :: + ++ fcgi-cred %_(ced aut (~(put ju aut.ced) %$ (scot %p him))) + ++ stat-json + ^+ [*json ..ya] + =+ orx=`@t`(rsh 3 1 (scot %p (shaf %orx eny))) + =. vew (~(put in vew) orx) + =+ [ire=(oryx-to-ixor orx) sem=*stem] + =. wix (~(put by wix) ire sem(him him, era now, p.eve 1)) + :: ~& stat-ire/`@t`ire + :_ abet + %- jobe :~ + oryx/s/orx + ixor/s/ire + ship/(jape +:) + user/(jape +:) + auth/a/(turn (~(tap in aut)) |=(a=@p (jape +:))) + == + -- + :: + ++ ix + =| [ire=ixor stem] + =* sem -> + |% + ++ done . + ++ abet ..ix(wix (~(put by wix) ire sem)) + ++ teba |*(a=$+(* ..ix) |*(b=* %_(done ..ix (a b)))) + ++ give-json (teba ^give-json) + ++ hurl-note + |= [a=[hasp path] b=note] ^+ ..ix + =: med (~(put to med) hen) + hen `~ + == + :: ~& > hurl/[&2.b ire a] + (pass-note:abet [%of ire (gsig a)] b) + :: + ++ add-even + |= a=even ^+ eve + [+(p.eve) (~(put by q.eve) p.eve a)] + :: + ++ new-mess + |= [a=hasp b=wire c=cage] ^+ ..ix + (hurl-note [a b] [%g %mess [- + ~]:a him c]) + :: + ++ add-subs + |= [a=hasp %json b=wire c=path] ^+ ..ix + (hurl-note [a b] [%g %show [- + ~]:a him c]) + :: + ++ del-subs :: XX per path? + |= [a=hasp %json b=wire c=path] ^+ ..ix + (hurl-note [a b] [%g %nuke [- + ~]:a him]) + :: + ++ get-rush + |= [a=whir-of b=json] ^+ ..ix + (get-even [%rush [[(slav %p p.a) q.a] r.a] (joba %json b)]) + :: + ++ get-ack + |= [a=whir-of b=$&([%nice ~] [%mean p=ares])] ^+ ..ix + ?- -.b + %mean + ?~ p.b :: XX actually a yawn-told-full + (get-even %mean [[(slav %p p.a) q.a] r.a] p.b) + (mean-json:pop-duct 500 p.b) + :: + %nice + ?: =(~ med) ~& resp-lost/ire ..ix + (nice-json:pop-duct) + == + :: + ++ get-even + |= ven=even ^+ ..ix + =+ num=p.eve + =. eve (add-even ven) + =< abet + ?~ ude done + :: ~& got-even/ude + (give-even(hen p.u.ude, ude ~) q.u.ude num ven) + :: + ++ give-even + |= [pol=? num=@u ven=even] ^+ done + =: q.eve (~(del by q.eve) (dec num)) :: TODO ponder a-2 + mow ?.(?=(%rush -.ven) mow mow:(pass-took p.ven)) + == + ?> pol :: XX eventstream + %^ give-json 200 ~ + %^ jobe id/(jone num) type/[%s -.ven] + ?- -.ven + %news ~[from/[%s (scot %uv p.ven)]] + %rush ~[from/(subs-to-json p.ven) data/q.ven] + %mean ~[from/(subs-to-json p.ven) data/(ares-to-json q.ven)] + == + :: + ++ pass-took + |= a=[p=hasp wire] + (pass-note(hen `~) [%of ire (gsig a)] [%g %took [- + ~]:p.a him]) + :: + ++ pop-duct =^(ned med ~(get to med) abet(hen ned)) + ++ poll + |= a=@u ^+ ..ix + ?: =(a p.eve) + ?^ ude ~&(e/ix/wait/%replaced abet(u.ude [hen &])) + =. era (add ~s30 now) + (pass-note:abet(ude [~ hen &]) of//[ire] [%t %wait era]) + ?: (gth a p.eve) ~|(seq-high/cur=p.eve !!) + =+ ven=~|(seq-low/cur=p.eve (~(got by q.eve) a)) + abet:(give-even & a ven) + :: + ++ subs-to-json + |= [a=hasp b=path] + %- jobe :~ + ship/[%s (rsh 3 1 (scot %p p.a))] + appl/[%s q.a] + path/(jape (spud b)) + == + ++ wake ^+(..ix abet(ude ~)) :: XX other effects? + :: XX unused + ++ print-subs |=([a=hasp b=path] "{}/{(trip q.a)}{(spud b)}") +-- -- -- -. == +. == =| bolo =* bol - |= [now=@da eny=@ ski=sled] :: activate @@ -2336,24 +1204,25 @@ ((hard kiss) q.hic) == ^- [p=(list move) q=_..^$] + =+ our=`@p`0x100 :: XX sentinel =+ ska=(slod ski) =+ sky=|=(* `(unit)`=+(a=(ska +<) ?~(a ~ ?~(u.a ~ [~ u.u.a])))) =. ney (shax :(mix (shax now) +(eny) ney)) :: XX!! shd not need ^- [p=(list move) q=_..^$] =. gub ?.(=(0 gub) gub (cat 3 (rsh 3 1 (scot %p (end 6 1 eny))) '-')) =^ mos bol - abet:(apex:~(adit ye [hen [now eny sky] ~] bol) q.hic) + abet:(apex:~(adit ye [hen [now eny our sky] ~] bol) q.hic) [mos ..^$] :: -++ doze +++ doze :: require no timer |= [now=@da hen=duct] ^- (unit ,@da) ~ :: -++ load - |= old=bolo +++ load :: clam previous state + |= old=bolo ::_[.(wix **)]:*bolo ^+ ..^$ - ..^$(+>- old) + ..^$(+>- old) ::(wix ~)) :: ++ scry |= [our=(unit (set monk)) ren=@tas who=ship syd=desk lot=coin tyl=path] @@ -2368,14 +1237,17 @@ [[hen %give +.q.hin]~ ..^$] ?: ?=(%vega +<.q.hin) :: vomit [[hen %give +.q.hin]~ ..^$] + =+ our=`@p`0x100 :: XX sentinel =+ ska=(slod ski) =+ sky=|=(* `(unit)`=+(a=(ska +<) ?~(a ~ ?~(u.a ~ [~ u.u.a])))) =. ney (shax :(mix (shax now) +(eny) ney)) :: XX!! shd not need ^- [p=(list move) q=_..^$] =. gub ?.(=(0 gub) gub (cat 3 (rsh 3 1 (scot %p (end 6 1 eny))) '-')) + =+ tee=((soft whir) tea) + ?~ tee ~& [%e %lost -.q.hin hen] [~ ..^$] =^ mos bol =< abet - %^ axon:~(adit ye [hen [now eny sky] ~] bol) tea + %^ axon:~(adit ye [hen [now eny our sky] ~] bol) u.tee (~(peek ut p.hin) %free 3) q.hin [mos ..^$] diff --git a/main/arvo/ford.hoon b/main/arvo/ford.hoon index 5d057905d4..c1dd9002e5 100644 --- a/main/arvo/ford.hoon +++ b/main/arvo/ford.hoon @@ -9,7 +9,8 @@ :: ++ bead ,[p=(set beam) q=gage] :: computed result ++ gift :: out result <-$ - $% [%made p=(each bead (list tank))] :: computed result + $% [%made p=@uvH q=(each gage tang)] :: computed result + [%news ~] :: fresh depends == :: ++ heel path :: functional ending ++ hock :: standard label @@ -37,7 +38,7 @@ [%dub p=term q=horn] :: /= apply face [%fan p=(list horn)] :: /. list [%for p=path q=horn] :: /, descend - [%hel p=@ud q=horn] :: /% propogate heel + [%hel p=@ud q=horn] :: /% propagate heel [%hub p=horn] :: /@ list by @ud [%man p=(map span horn)] :: /* hetero map [%nap p=horn] :: /_ homo map @@ -49,6 +50,7 @@ == :: ++ kiss :: in request ->$ $% [%exec p=@p q=beak r=(unit silk)] :: make / kill + [%wasp p=@p q=@uvH] :: depends query == :: ++ milk (trel ship desk silk) :: sourced silk ++ move ,[p=duct q=(mold note gift)] :: local move @@ -93,6 +95,7 @@ ++ baby :: state by ship $: tad=[p=@ud q=(map ,@ud task)] :: tasks by number dym=(map duct ,@ud) :: duct to task number + deh=deps :: depends by hash jav=(map ,* calx) :: cache == :: ++ bolt :: gonadic edge @@ -100,8 +103,8 @@ $: p=cafe :: cache $= q :: $% [%0 p=(set beam) q=a] :: depends/product - [%1 p=(set ,[p=care q=beam r=(list tank)])] :: blocks - [%2 p=(list tank)] :: error + [%1 p=(set ,[p=care q=beam r=tang])] :: blocks + [%2 p=(set beam) q=tang] :: depends/error == :: == :: :: :: @@ -112,6 +115,7 @@ ++ cafe :: live cache $: p=(set calx) :: used q=(map ,* calx) :: cache + r=deps :: dependencies == :: :: :: ++ calm :: cache metadata @@ -126,6 +130,7 @@ [%slap p=calm q=[p=vase q=twig] r=vase] :: compute [%slam p=calm q=[p=vase q=vase] r=vase] :: compute == :: +++ deps (map ,@uvH (set beam)) :: hashed depends ++ task :: problem in progress $: nah=duct :: cause kas=silk :: problem @@ -162,16 +167,25 @@ ++ chub :: cache merge |= [a=cafe b=cafe] :: ^- cafe :: - [(grom p.a p.b) (grum q.a q.b)] :: + [(grom p.a p.b) (grum q.a q.b) (grum r.a r.b)] :: +:: :: +++ faun |=([a=cafe b=vase] (fine a `gage`noun/b)) :: vase to cage +++ feel |=([a=cafe b=gage] (fine a q.b)) :: cage to vase +++ fest :: bolt to success + |= a=beam :: + |*([b=cafe c=*] (flag a (fine b [~ u=c]))) :: :: :: -++ faun |=([a=cafe b=vase] (fine a `gage`noun/b)) :: vase to gage -++ feel |=([a=cafe b=gage] (fine a q.b)) :: gage to vase -++ fest |*([a=cafe b=*] (fine a [~ u=b])) :: bolt to unit ++ fine |* [a=cafe b=*] :: bolt from data [p=`cafe`a q=[%0 p=*(set beam) q=b]] :: -++ flaw |=([a=cafe b=(list tank)] [p=a q=[%2 p=b]]) :: bolt from error -++ clean-beak ::|=([now=@da bek=beak] [p.bek q.bek %da now]) - |=([now=@da bek=beak] bek) +++ flaw |= [a=cafe b=tang] :: bolt from error + [p=a q=[%2 p=*(set beam) q=b]] :: +++ flag :: beam into deps + |* [a=beam b=(bolt)] :: + ?: ?=(%1 -.q.b) b + =. p.q.b (~(put in p.q.b) a) + b +:: :: +++ flue |=(a=cafe (fine a ~)) :: cafe to empty ++ grom :: merge sets |* [one=(set) two=(set)] ^+ one @@ -232,12 +246,6 @@ == ~(exec zo [num `task`[hen u.kus ~ 0 ~]]) :: - ++ apel :: stateless - |= [hen=duct kus=silk] - ^- (unit gift) - =+ num=0 :: XX - ~(exit zo [num `task`[hen kus ~ 0 ~]]) - :: ++ axon :: take |= [num=@ud tik=@ud sih=sign] ^+ +> @@ -250,6 +258,31 @@ (~(resp zo [num u.tus]) tik p.+.sih) == :: + ++ axun :: take rev update + |= [dep=@uvH sih=sign] + ^+ +> + ?- -.+.sih + %writ + +>.$(mow :_(mow [hen %give %news ~])) + == + :: + ++ awap :: get next revision + ~% %ford-w ..is ~ + |= dep=@uvH + %_ +>.$ + mow + %- welp :_ mow + %+ turn ~|(dep-missed/dep (~(tap in (~(got by deh.bay) dep)))) + |= a=beam + :^ hen %pass [(scot %p our) (scot %uv dep) ~] + =- [%c [%warp [our p.a] q.a ~ [%sing %y ud/+(`@ud`-) s.a]]] + ?. ?=(%ud -.r.a) + ;;(@ q.q:(need (need (ska ~ %cw -.a /)))) + ?: =(0 p.r.a) + ;;(@ q.q:(need (need (ska ~ %cw -.a(r da/now) /)))) + p.r.a + == + :: ++ zo ~% %ford-z ..is @@ -347,19 +380,19 @@ ++ cool :: error caption |* [cyt=trap hoc=(bolt)] ?. ?=(%2 -.q.hoc) hoc - [p.hoc [%2 *cyt p.q.hoc]] + [p.hoc [%2 p.q.hoc *cyt q.q.hoc]] :: ++ cope :: bolt along |* [hoc=(bolt) fun=(burg)] ?- -.q.hoc - %2 hoc %1 hoc + %2 hoc %0 =+ nuf=(fun p.hoc q.q.hoc) :- p=p.nuf ^= q ?- -.q.nuf - %2 q.nuf %1 q.nuf + %2 [%2 p=(grom `_p.q.nuf`p.q.hoc p.q.nuf) q=q.q.nuf] %0 [%0 p=(grom `_p.q.nuf`p.q.hoc p.q.nuf) q=q.q.nuf] == == :: @@ -369,7 +402,7 @@ :- p=cof ^= q ?- -.ton - %2 [%2 p=p.ton] + %2 [%2 p=*(set beam) q=p.ton] %0 [%0 p=*(set beam) q=(fun p.ton)] %1 :: ~& [%coup-need ((list path) p.ton)] =- ?- -.faw @@ -377,23 +410,24 @@ ^= p %- sa %+ turn p.faw - |=(a=[care beam] [-.a +.a *(list tank)]) - | [%2 p=p.faw] + |=(a=[care beam] [-.a +.a *tang]) + | [%2 p=*(set beam) q=p.faw] == ^= faw - |- ^- (each (list (pair care beam)) (list tank)) + |- ^- (each (list (pair care beam)) tang) ?~ p.ton [%& ~] =+ nex=$(p.ton t.p.ton) + =+ err=|=(a=tape [%| leaf/a ?:(?=(& -.nex) ~ p.nex)]) =+ pax=(path i.p.ton) - ?~ pax [%| (smyt pax) ?:(?=(& -.nex) ~ p.nex)] + ?~ pax (err "blocking empty") ?. ?=(%c (end 3 1 i.pax)) - [%| leaf/"blocking not clay" (smyt pax) ?:(?=(& -.nex) ~ p.nex)] + (err "blocking not clay") =+ ren=((soft care) (rsh 3 1 i.pax)) ?~ ren - [%| leaf/"blocking not care" (smyt pax) ?:(?=(& -.nex) ~ p.nex)] + (err "blocking not care") =+ zis=(tome t.pax) ?~ zis - [%| leaf/"blocking not beam" (smyt pax) ?:(?=(& -.nex) ~ p.nex)] + (err "blocking not beam") ?- -.nex & [%& [u.ren u.zis] p.nex] | nex @@ -402,7 +436,7 @@ :: ++ cowl :: each to bolt |= cof=cafe - |* [tod=(each ,* (list tank)) fun=$+(* *)] + |* [tod=(each ,* tang) fun=$+(* *)] %+ (coup cof) ?- -.tod %& [%0 p=p.tod] @@ -413,7 +447,7 @@ ++ dash :: process cache |= cof=cafe ^+ +> - %_(+> jav.bay q.cof) + %_(+> jav.bay q.cof, deh.bay r.cof) :: ++ diff :: diff |= [cof=cafe kas=silk kos=silk] @@ -461,24 +495,23 @@ (fine cof u.for dif) == :: - ++ exit :: stateless exec - ^- (unit gift) - =+ bot=(make [~ jav.bay] kas) - :: =. ..exec (dash p.bot) - ?- -.q.bot - %0 `[%made %& p.q.bot q.q.bot] - %2 `[%made %| p.q.bot] - %1 ~ - == + ++ daze :: remember depends + |= dep=(set beam) + ^+ [*@uvH deh.bay] + ?~ dep [0v0 deh.bay] + =+ hap=(sham dep) + [hap (~(put by deh.bay) hap dep)] :: ++ exec :: execute app ^+ ..zo ?: !=(~ q.kig) ..zo - =+ bot=(make [~ jav.bay] kas) + =+ bot=(make [~ jav.bay deh.bay] kas) =. ..exec (dash p.bot) ?- -.q.bot - %0 amok:(expo [%made %& p.q.bot q.q.bot]) - %2 amok:(expo [%made %| p.q.bot]) + %0 =^ dep deh.bay (daze p.q.bot) + amok:(expo [%made dep %& q.q.bot]) + %2 =^ dep deh.bay (daze p.q.bot) + amok:(expo [%made dep %| q.q.bot]) %1 =+ zuk=(~(tap by p.q.bot) ~) =< abet |- ^+ ..exec @@ -500,6 +533,7 @@ %+ (clef %hood) (fine cof bem cay) ^- (burg (pair beam gage) hood) |= [cof=cafe bum=beam cay=gage] + :: ~& fade/clef-miss/bem =+ rul=(fair bem) ?. ?=(@ q.q.cay) (flaw cof ~) @@ -765,7 +799,7 @@ ^- (bolt gage) %+ cope |- ^- (bolt (list (pair wing vase))) - ?~ muy (fine cof ~) + ?~ muy (flue cof) %+ cope (make cof q.i.muy) |= [cof=cafe cay=gage] %+ cope ^$(muy t.muy) @@ -800,12 +834,13 @@ %+ cope (lend cof bem) |= [cof=cafe arc=arch] ?^ q.arc - (cope (cope (liar cof bem) (lake for)) fest) + (cope (cope (liar cof bem) (lake for)) (fest (norm bem))) ?: (~(has by r.arc) %hook) %+ cope (fade cof %hook bem) |= [cof=cafe hyd=hood] - (cope (cope (abut:(meow bem arg) cof hyd) (lake for)) fest) - (fine cof ~) + %+ cope (cope (abut:(meow bem arg) cof hyd) (lake for)) + (fest (norm bem)) + (flue cof) :: ++ lake :: check/coerce |= for=mark @@ -909,7 +944,7 @@ :: ++ lima :: load at depth |= [cof=cafe for=mark bem=beam arg=heel] - %+ (clef %bake) (fine cof for bem arg) + %+ (clef %bake) [p=cof q=[%0 p=[bem `~] q=[for bem arg]]] |= [cof=cafe for=mark bem=beam arg=heel] ^- (bolt (unit vase)) %+ cope (lend cof bem) @@ -918,16 +953,15 @@ ?: (~(has by r.arc) for) (lace cof for bem(s [for s.bem]) arg) =+ haz=(turn (~(tap by r.arc) ~) |=([a=@tas b=~] a)) - ?~ haz (fine cof ~) + ?~ haz (flue cof) %+ cope (lion cof for haz) - |= [cof=cafe wuy=(unit (list ,@tas))] - ?~ wuy (fine cof ~) - ?> ?=(^ u.wuy) - %+ cope (make cof %bake i.u.wuy bem arg) + |= [cof=cafe wuy=(list ,@tas)] + ?~ wuy (flue cof) + %+ cope (make cof %bake i.wuy bem arg) |= [cof=cafe hoc=gage] - %+ cope (lope cof i.u.wuy t.u.wuy q.hoc) + %+ cope (lope cof i.wuy t.wuy q.hoc) |= [cof=cafe vax=vase] - (fine cof ~ vax) + ((fest bem) cof vax) :: ++ lime :: load beam |= [cof=cafe for=mark bem=beam arg=heel] @@ -937,6 +971,8 @@ |= [cof=cafe vux=(unit vase)] ?^ vux (fine cof u.vux) ?~ s.mob + %+ flag + (norm mob) (flaw cof leaf/"beam unavailable" (smyt (tope bem)) ~) ^$(s.mob t.s.mob, mer [i.s.mob mer]) :: @@ -965,13 +1001,13 @@ :: ++ lion :: translation search |= [cof=cafe too=@tas fro=(list ,@tas)] - ^- (bolt (unit (list ,@tas))) + ^- (bolt (list ,@tas)) =| war=(set ,@tas) =< -:(apex (fine cof fro)) |% ++ apex |= rof=(bolt (list ,@tas)) - ^- [(bolt (unit (list ,@tas))) _+>] + ^- [(bolt (list ,@tas)) _+>] ?. ?=(%0 -.q.rof) [rof +>.$] ?~ q.q.rof [[p.rof [%0 p.q.rof ~]] +>.$] @@ -984,16 +1020,16 @@ :: ++ apse |= [cof=cafe for=@tas] - ^- [(bolt (unit (list ,@tas))) _+>] + ^- [(bolt (list ,@tas)) _+>] ?: =(for too) - [(fine cof [~ too ~]) +>.$] - ?: (~(has in war) for) [(fine cof ~) +>] + [(fine cof [too ~]) +>.$] + ?: (~(has in war) for) [(flue cof) +>] =. war (~(put in war) for) =^ hoc +>.$ (apex (lily cof for)) :_ +>.$ %+ cope hoc - |= [cof=cafe ked=(unit (list ,@tas))] - (fine cof ?~(ked ~ [~ for u.ked])) + |= [cof=cafe ked=(list ,@tas)] + (fine cof ?~(ked ~ [for ked])) -- :: ++ lope :: translation pipe @@ -1092,12 +1128,6 @@ %+ cope (link cof p.kas p.cay q.cay) |= [cof=cafe vax=vase] (fine cof [p.kas vax]) -:: %+ cope (lion cof p.kas [p.cay]~) -:: |= [cof=cafe wuy=(list ,@tas)] -:: ?~ wuy (flaw cof [%leaf "ford: no path: {<[p.cay p.kas]>}"]~) -:: %+ cope (lope cof i.wuy t.wuy q.cay) -:: |= [cof=cafe vax=vase] -:: (fine cof [p.kas vax]) :: %diff %+ cool |.(leaf/"ford: diff {<`@p`(mug p.kas)>} {<`@p`(mug q.kas)>}") @@ -1106,7 +1136,7 @@ %done [cof %0 p.kas q.kas] %dude (cool |.(p.kas) $(kas q.kas)) %dune - ?~ q.kas [cof [%2 [%leaf "no data"]~]] + ?~ q.kas [cof [%2 p.kas [%leaf "no data"]~]] $(kas [%done p.kas u.q.kas]) :: %file @@ -1220,7 +1250,7 @@ ^- twig :+ %tsgr ?:(=(~ rop) [%$ 1] [%brcn (~(run by rop) |=([* a=twig] [%ash a]))]) - [%tssg (turn (flop lot) |=(a=term q:(need (~(get by bil) a))))] + [%tssg (turn (flop lot) |=(a=term q:(~(got by bil) a)))] :: ++ ably :: naked structure |= [cof=cafe for=mark hyd=hood] :: XX unused @@ -1283,7 +1313,7 @@ |=([a=[@ *] b=[@ *]] (lth -.a -.b)) %+ cope |- ^- (bolt (list (pair ,@ vase))) - ?~ poy (fine cof ~) + ?~ poy (flue cof) %+ cope $(poy t.poy) |= [cof=cafe nex=(list (pair ,@ vase))] %+ cope (chap(s.how [q.i.poy s.how]) cof bax hon) @@ -1302,7 +1332,7 @@ |= [cof=cafe arc=arch] %+ cope |- ^- (bolt (map ,@ vase)) - ?~ r.arc (fine cof ~) + ?~ r.arc (flue cof) %+ cope $(r.arc l.r.arc) |= [cof=cafe lef=(map ,@ vase)] %+ cope `(bolt (map ,@ vase))`^$(cof cof, r.arc r.r.arc) @@ -1337,7 +1367,7 @@ %fan %+ cope |- ^- (bolt (list vase)) - ?~ p.hon (fine cof ~) + ?~ p.hon (flue cof) %+ cope ^$(hon i.p.hon) |= [cof=cafe vax=vase] %+ cope ^$(cof cof, p.hon t.p.hon) @@ -1491,6 +1521,15 @@ == -- :: + ++ norm :: normalize beam rev + |= bem=beam + %_ bem + r ?: ?=(%ud -.r.bem) r.bem + =+ num=(ska ~ %cw bem(s ~)) + ?. ?=([~ ~ * * @u] num) r.bem :: XX + [%ud q.q.u.u.num] + == + :: ++ pact :: patch |= [cof=cafe kas=silk kos=silk] ^- (bolt gage) @@ -1552,7 +1591,8 @@ ?> (~(has by q.kig) tik) =+ `[ren=care bem=beam]`(~(got by q.kig) tik) ?~ rot - amok:(expo [%made %| (smyt ren (tope bem)) ~]) + =^ dep deh.bay (daze ~) :: dependencies? + amok:(expo [%made dep %| (smyt ren (tope bem)) ~]) =+ (cat 3 'c' ren) exec(q.kig (~(del by q.kig) tik), keg (~(put by keg) [- bem] r.u.rot)) :: @@ -1582,12 +1622,15 @@ =+ ^= our ^- @p ?- -.q.hic %exec p.q.hic + %wasp p.q.hic == =+ ^= bay ^- baby =+ buy=(~(get by pol.lex) our) ?~(buy *baby u.buy) - =+ bek=(clean-beak now q.q.hic) =^ mos bay + ?: ?=(%wasp -.q.hic) + abet:(~(awap za [[our *beak hen] [now eny ski] ~] bay) q.q.hic) + =* bek q.q.hic abet:(~(apex za [[our bek hen] [now eny ski] ~] bay) r.q.hic) [mos ..^$(pol (~(put by pol) our bay))] :: @@ -1598,14 +1641,14 @@ :: ++ load :: highly forgiving |= old=* - =. old - ?. ?=([%0 *] old) old :: remove at 1 - :- %1 - |- ^- * - ?~ +.old ~ - ?> ?=([n=[p=* q=[tad=* dym=* jav=*]] l=* r=*] +.old) - :- [p.n.+.old [tad.q.n.+.old dym.q.n.+.old ~]] - [$(+.old l.+.old) $(+.old r.+.old)] + ::=. old + :: ?. ?=([%0 *] old) old :: remove at 1 + :: :- %1 + :: |- ^- * + :: ?~ +.old ~ + :: ?> ?=([n=[p=* q=[tad=* dym=* deh=* jav=*]] l=* r=*] +.old) + :: :- [p.n.+.old [tad.q.n.+.old dym.q.n.+.old deh.q.n.+.old ~]] + :: [$(+.old l.+.old) $(+.old r.+.old)] =+ lox=((soft axle) old) ^+ ..^$ ?~ lox @@ -1619,19 +1662,22 @@ [~ ~] :: ++ stay :: save w/o cache - `axle`+>-.$(pol (~(run by pol) |=(a=baby [tad.a dym.a ~]))) + `axle`+>-.$(pol (~(run by pol) |=(a=baby [tad.a dym.a deh.a ~]))) :: ++ take :: response |= [tea=wire hen=duct hin=(hypo sign)] ^- [p=(list move) q=_..^$] - ?> ?=([@ @ @ @ @ @ ~] tea) - =+ :* our=(slav %p i.tea) - num=(slav %ud i.t.tea) - tik=(slav %ud i.t.t.tea) - bek=(clean-beak now -:(need (tome t.t.t.tea))) - == + ?> ?=([@ @ *] tea) + =+ our=(need (slaw %p i.tea)) =+ bay=(~(got by pol.lex) our) =^ mos bay + ?~ t.t.tea + abet:(~(axun za [[our *beak hen] [now eny ski] ~] bay) (slav %uv i.t.tea) q.hin) + ?> ?=([@ @ @ @ ~] t.t.tea) + =+ :* num=(need (slaw %ud i.t.tea)) + tik=(need (slaw %ud i.t.t.tea)) + bek=-:(need (tome t.t.t.tea)) + == abet:(~(axon za [[our bek hen] [now eny ski] ~] bay) num tik q.hin) [mos ..^$(pol (~(put by pol) our bay))] -- diff --git a/main/arvo/gall.hoon b/main/arvo/gall.hoon index d9166d5880..c80c51d77d 100644 --- a/main/arvo/gall.hoon +++ b/main/arvo/gall.hoon @@ -19,7 +19,6 @@ [%meta p=vase] :: meta-gift [%nice ~] :: message success == :: -::++ hasp ,[p=ship q=term] :: app identity ++ hapt ,[p=ship q=path] :: app instance ++ hath ,[p=ship q=term] :: app identity ++ kiss :: in request ->$ @@ -156,7 +155,7 @@ [%vega p=path] :: == == :: $: %f :: by %ford - $% [%made p=(each bead (list tank))] :: + $% [%made p=@uvH q=(each gage tang)] :: == == == :: ++ toil (pair duct knob) :: work in progress -- :::::::::::::::::::::::::::::::::::::::::::::::::::::: @@ -359,7 +358,11 @@ :: ~& [%gape-took our imp hen] [~ ..^^$] =+ you=`ship`?-(-.kon %mess p.kon, %nuke p.kon, %show p.kon) - =+ mat=(~(got by pol.all) you) + =+ mut=(~(get by pol.all) you) + ?~ mut + ~& [%gape-lost you hen] + !! + =+ mat=u.mut =+ sad==+(sad=(~(get by sap.mat) our) ?^(sad u.sad [.(p 1)]:*scad)) =^ num sad =+ nym=(~(get by q.sad) hen) @@ -404,13 +407,13 @@ :_ ..^$ :_ ~ :- hen - ?- -.p.+.sih + ?- -.q.+.sih %| - [%give %crud %gasp-crud p.p.+.sih] + [%give %crud %gasp-crud p.q.+.sih] :: %& - =+ cay=`gage`q.p.p.+.sih - ?. ?=(@ p.cay) ~| %bad-marc !! + ?. ?=(@ p.p.q.+.sih) ~| %bad-marc !! + =+ cay=`cage`p.q.+.sih ?+ -.pax !! %d [%give (best %rush cay)] %f [%give (best %rust cay)] @@ -430,37 +433,18 @@ :_ ..^$ =+ rod=|=(ron=roon `note`[%a %wont [our you] [%q %gh imp] num ron]) ?+ -.pax !! - %m ?: ?=(%a -.sih) ~ - ?+ -.sih ~& [%gall-gave-m -.sih] !! - %f - :_ ~ :- hen - ?- -.p.+.sih - %| [%give %mean ~ %ford-fail p.p.+.sih] - %& ?. ?=(@ p.q.p.p.+.sih) ~| %bad-marc !! - [%pass [%r pax] %g %mess [our imp] you `cage`q.p.p.+.sih] - == - :: - %g - :_ ~ :- hen - ?- -.+.sih - %crud !! - %dumb !! - %gone !! - %init !! - %logo !! - %mean [%give %mean p.+.sih] - %nice [%give %nice ~] - %rush !! - %rust !! - %sage !! - %verb !! - %veer !! - %vega !! - == - == - %s ?+ -.sih !! + %z ?+ -.sih !! %a :_ ~ :- hen [%pass [%r pax] %g %took [our imp] you] + :: + %f + :_ ~ :- hen + ?- -.q.+.sih + %| [%give %mean ~ %ford-fail p.q.+.sih] + %& ?. ?=(@ p.p.q.+.sih) ~| %bad-marc !! + [%pass [%r pax] %g %mess [our imp] you `cage`p.q.+.sih] + == + :: %g :_ ~ :- hen ?- -.+.sih @@ -507,7 +491,8 @@ ^- move :- hen :+ %pass :* %r - ?-(-.rok %m %m, %s %s, %u %s) + :: ?-(-.rok %m %m, %s %s, %u %s) + %z (scot %p p.saq) (scot %p q.saq) (scot %ud num) @@ -570,8 +555,8 @@ :: ++ able :: bone to duct |= ost=bone ^- duct - ?: =(0 ost) - [(away ~) ~] + :: ?: =(0 ost) + :: hun.mat (~(got by r.zam.sat) ost) :: ++ away :: application path @@ -735,17 +720,18 @@ %_(+>.$ ped.sat pen, mow :(weld new old mow)) :: ++ drum :: raw dependencies - |= dep=(set beam) + |= dep=@uvH ^+ +> ?> ?=(^ orm.sat) %- drug =+ ped=`(set (pair ship desk))`[[our %main] ~ ~] - =+ mav=(~(tap by dep) ~) - |- ^+ ped - ?~ mav ped - ?: =(r.i.mav [%da u.orm.sat]) - $(mav t.mav, ped (~(put in ped) p.i.mav q.i.mav)) - $(mav t.mav) + ped + ::=+ mav=(~(tap by dep) ~) + ::|- ^+ ped + ::?~ mav ped + ::?: =(r.i.mav [%da u.orm.sat]) + :: $(mav t.mav, ped (~(put in ped) p.i.mav q.i.mav)) + ::$(mav t.mav) :: ++ ford :: exec to ford |= [pax=path kas=silk] @@ -790,64 +776,57 @@ |= sih=sign ?> ?=(%f -.sih) ^- [(unit (list tank)) _+>] - ?- -.p.+.sih + ?- -.q.+.sih & :- ~ - %- obey:(morn (slot 3 q.q.p.p.+.sih)) - (slot 2 q.q.p.p.+.sih) - | [`p.p.+.sih (give %crud %mack-made p.p.+.sih)] + %- obey:(morn (slot 3 q.p.q.+.sih)) + (slot 2 q.p.q.+.sih) + | [`p.q.+.sih (give %crud %mack-made p.q.+.sih)] == :: ++ meek :: apply peek |= sih=sign ^- [(unit cage) _+>] ?> ?=(%f -.sih) - ?- -.p.+.sih - & =+ vax=`vase`q.q.p.p.+.sih + ?- -.q.+.sih + & =+ vax=`vase`q.p.q.+.sih ?. &(?=(^ q.vax) ?=(@ -.q.vax)) [~ (give %crud %peek-lame *(list tank))] :: ~> %slog.[0 (skol p:(slot 3 vax))] :- `[((hard mark) -.q.vax) (slot 3 vax)] +>.$ - | [~ (give %crud %meek-made p.p.+.sih)] + | [~ (give %crud %meek-made p.q.+.sih)] == :: ++ mick :: apply w/depends |= sih=sign ?> ?=(%f -.sih) - ^- [(unit (set beam)) _+>] - ?- -.p.+.sih - & :- `p.p.p.+.sih - %- obey:(morn (slot 3 q.q.p.p.+.sih)) - (slot 2 q.q.p.p.+.sih) - | [~ (give %crud %mick-made p.p.+.sih)] + ^- [[p=? q=@uvH] _+>] + :- [-.q.+.sih p.+.sih] + ?- -.q.+.sih + & %- obey:(morn (slot 3 q.p.q.+.sih)) + (slot 2 q.p.q.+.sih) + | (give %crud %mick-made p.q.+.sih) == :: ++ muck :: apply part |= sih=sign ^- [(unit (list tank)) _+>] ?> ?=(%f -.sih) - ?- -.p.+.sih - & [~ (obey q.q.p.p.+.sih)] - | [`p.p.+.sih (give %crud %muck-made p.p.+.sih)] + ?- -.q.+.sih + & [~ (obey q.p.q.+.sih)] + | [`p.q.+.sih (give %crud %muck-made p.q.+.sih)] == :: ++ murk :: apply park |= sih=sign ^- [(unit cage) _+>] ?> ?=(%f -.sih) - ?- -.p.+.sih - & ?. ?=(@ p.q.p.p.+.sih) ~| %bad-marc !! - [`q.p.p.+.sih +>.$] - | [~ (give %crud %murk-made p.p.+.sih)] + ?- -.q.+.sih + & ?. ?=(@ p.p.q.+.sih) ~| %bad-marc !! + [`p.q.+.sih +>.$] + | [~ (give %crud %murk-made p.q.+.sih)] == :: - ++ moar :: foreign take - |= $: pax=path - sih=sign - == - ^+ +> - !! - :: ++ more :: domestic take |= $: pax=path :: internal position hin=(hypo sign) :: typed event @@ -927,8 +906,8 @@ :: %prep =^ gad +>.$ (mick q.hin) - ?~ gad (drum ~) - deal:(drum u.gad) + ?. p.gad (drum q.gad) + deal:(drum q.gad) :: %pull =^ gud +>.$ (mack q.hin) @@ -1173,10 +1152,9 @@ :: ~& [%yawn-told-has ost qol [our hen]] =+ qul=?~(qol 1 +(u.qol)) =. qel.sat (~(put by qel.sat) ost qul) - :: XX turn me back on! - :: ?: =(10 qul) - :: ~& [%yawn-told-full ost our hen] - :: +>.$(qic.sat ~, vey.sat (~(put to vey.sat) hen %nuke p.kon)) + ?: =(10 qul) + ~& [%yawn-told-full ost our hen] + +>.$(qic.sat ~, vey.sat (~(put to vey.sat) hen %nuke p.kon)) +>.$(qic.sat ~) :: %load @@ -1218,8 +1196,10 @@ (goc p.q.kon /pock) :(goc p.q.kon (rsh 3 ofs p.q.kon) /pock) =+ hyp=?=(%pock (end 3 4 cog)) + =+ ^- err=tape + ?.(?=(?(%poke %pock) cog) "{} with mark {}") ?. (warm cog) - (give(qic.sat ~) %mean ~ %poke-find-fail ~) + (give(qic.sat ~) %mean ~ %poke-find-fail leaf/err ~) ?> ?=(^ huv.sat) =+ ^= sam ;: slop @@ -1227,10 +1207,9 @@ [[%atom %p] p.kon] ?.(hyp q.q.kon (slop !>(p.q.q.kon) q.q.kon)) == - =+ err=?.(?=(?(%poke %pock) cog) "{} with mark ") :: ~& [%mess-poke cog] %+ ford /s/poke - :+ %dude leaf/"poking {err}" + :+ %dude leaf/err [%call (harm cog (conf (core u.huv.sat))) (cove %$ sam)] :: %show @@ -1244,6 +1223,7 @@ =+ sam=!>([p.kon q.kon]) ?> ?=(^ huv.sat) (yawl [%peek (scot %p p.kon) q.kon] leaf/"peeking" u.huv.sat sam) + ~& [%show-dumb app.sat imp q.kon] (give(qic.sat ~) %dumb ~) :: %sire diff --git a/main/arvo/hoon.hoon b/main/arvo/hoon.hoon index d49d48524a..1a1289aa38 100644 --- a/main/arvo/hoon.hoon +++ b/main/arvo/hoon.hoon @@ -101,6 +101,11 @@ ++ nail ,[p=hair q=tape] :: parsing input ++ numb ,@ :: just a number ++ pair |*([a=$+(* *) b=$+(* *)] ,[p=a q=b]) :: just a pair +++ wand |* a=(pole $+(* *)) :: hetero list + |= b=* :: + ?~ a ~ :: + ?@ b ~ :: + [i=(-.a -.b) t=$(a +.a, b +.b)] :: ++ pass ,@ :: public key ++ path (list span) :: filesys location ++ pint ,[p=[p=@ q=@] q=[p=@ q=@]] :: line/column range @@ -156,7 +161,12 @@ p=[p=tape q=tape r=tape] :: mid open close q=(list tank) :: == :: - == + == :: +++ tanq :: modern tank + $? [~ p=(list tanq)] :: list of printables + [~ ~ p=tape] :: simple string + (pair ,@tas tanq) :: captioned + == :: ++ tape (list char) :: like a string ++ term ,@tas :: Hoon ASCII subset ++ tiki :: test case @@ -227,8 +237,8 @@ [%cndt p=twig q=twig] :: %-(q p) [%cnhp p=twig q=tusk] :: slam p w/ sample q [%cntr p=wing q=twig r=tram] :: pull p.q w/ changes - [%cnkt p=twig q=twig r=twig s=twig] :: slam p w/ %*(q r s) - [%cnls p=twig q=twig r=twig] :: slam p w/ %*(q r) + [%cnkt p=twig q=twig r=twig s=twig] :: slam p w/ :*(q r s) + [%cnls p=twig q=twig r=twig] :: slam p w/ :*(q r) [%cnsg p=wing q=twig r=twig] :: pull p from q with r [%cnts p=wing q=tram] :: eval. p w/ q changes [%cnzy p=term] :: pulls limb p @@ -1151,6 +1161,30 @@ ++ tos ~/ %tos :: fetch suffix |=(a=@ ?>((lth a 256) (cut 3 [(mul 3 a) 3] sis))) -- +:: +++ fa :: base58check + =+ key='123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' + =+ ^- yek=@ux ~+ + =- yek:(roll (trip key) -) + |= [a=char b=@ yek=_`@ux`(fil 3 256 0xff)] + [+(b) (mix yek (lsh 3 `@u`a (~(inv fe 3) b)))] + |% + ++ cha |=(a=char `(unit ,@uF)`=+(b=(cut 3 [`@`a 1] yek) ?:(=(b 0xff) ~ `b))) + ++ tok + |= a=@ux ^- @ux + =+ b=(pad a) + =- (~(net fe 5) (end 3 4 (shay 32 -))) + (shay (add b (met 3 a)) (lsh 3 b (swap 3 a))) + :: + ++ pad |=(a=@ =+(b=(met 3 a) ?:((gte b 21) 0 (sub 21 b)))) + ++ enc |=(a=@ux `@ux`(mix (lsh 3 4 a) (tok a))) + ++ den + |= a=@ux ^- (unit ,@ux) + =+ b=(rsh 3 4 a) + ?. =((tok b) (end 3 4 a)) + ~ + `b + -- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: section 2cF, signed and modular ints :: :: @@ -2061,8 +2095,8 @@ :: +- get :: grab value by key ~/ %get - |* b=* - |- ^- ?(~ [~ u=_?>(?=(^ a) q.n.a)]) + |= b=* + ^- $|(~ [~ u=_?>(?=(^ a) q.n.a)]) ?~ a ~ ?: =(b p.n.a) @@ -2853,6 +2887,13 @@ :: section 2eI, parsing (external) :: :: ++ rash |*([naf=@ sab=_rule] (scan (trip naf) sab)) :: +++ rose |* [los=tape sab=_rule] + =+ vex=(sab [[1 1] los]) + =+ len=(lent los) + ?. =(+(len) q.p.vex) [%| p=(dec q.p.vex)] + ?~ q.vex + [%& p=~] + [%& p=[~ u=p.u.q.vex]] ++ rush |*([naf=@ sab=_rule] (rust (trip naf) sab)) ++ rust |* [los=tape sab=_rule] =+ vex=((full sab) [[1 1] los]) @@ -2956,6 +2997,7 @@ ++ teff :: length utf8 |= a=@t ^- @ =+ b=(end 3 1 a) + ~| %bad-utf8 ?: =(0 b) ?>(=(0 a) 0) ?> |((gte b 32) =(10 b)) @@ -3211,6 +3253,7 @@ ++ ab |% ++ bix (bass 16 (stun [2 2] six)) + ++ fem (sear |=(a=@ (cha:fa a)) aln) ++ hif (boss 256 ;~(plug tip tiq (easy ~))) ++ huf %+ cook |=([a=@ b=@] (wred:un ~(zug mu ~(zag mu [a b])))) @@ -3265,11 +3308,15 @@ ++ dim (ape (bass 10 ;~(plug sed:ab (star sid:ab)))) ++ dum (bass 10 (plus sid:ab)) ++ fed ;~ pose - (bass 0x1.0000.0000.0000.0000 (most doh hyf:ab)) + %+ bass 0x1.0000.0000.0000.0000 + ;~((glue doh) ;~(pose hyf:ab huf:ab) (more doh hyf:ab)) + :: + hyf:ab huf:ab hif:ab tiq:ab == + ++ fim (sear den:fa (bass 58 (plus fem:ab))) ++ hex (ape (bass 0x1.0000 ;~(plug qex:ab (star ;~(pfix dog qix:ab))))) ++ lip =+ tod=(ape ted:ab) (bass 256 ;~(plug tod (stun [3 3] ;~(pfix dog tod)))) @@ -3352,12 +3399,13 @@ (trip (tod:po (rsh 3 1 q.p.lot))) rex == - =+ [dyz=(met 5 q.p.lot) fin=|] + =+ [dyz=(met 5 q.p.lot) fin=| dub=&] |- ^- tape ?: =(0 dyz) rex %= $ fin & + dub !dub dyz (dec dyz) q.p.lot (rsh 5 1 q.p.lot) rex @@ -3369,7 +3417,7 @@ `tape`['-' ~] (trip (tos:po (end 3 1 q.cog))) (trip (tod:po (rsh 3 1 q.cog))) - `tape`?:(fin ['-' ?:(=(1 (end 0 1 dyz)) ~ ['-' ~])] ~) + `tape`?.(fin ~ ['-' ?.(dub ~ ['-' ~])]) rex == == @@ -3387,6 +3435,9 @@ == :: %u + ?: ?=(%c hay) + %+ welp ['0' 'c' (reap (pad:fa q.p.lot) '1')] + (c-co (enc:fa q.p.lot)) =- (weld p.gam ?:(=(0 q.p.lot) `tape`['0' ~] q.gam)) ^= gam ^- [p=tape q=tape] ?+ hay [~ ((ox-co [10 3] |=(a=@ ~(d ne a))) q.p.lot)] @@ -3413,6 +3464,7 @@ =+ rex=*tape =< |% ++ a-co |=(dat=@ ((d-co 1) dat)) + ++ c-co (em-co [58 1] |=([? b=@ c=tape] [~(c ne b) c])) ++ d-co |=(min=@ (em-co [10 min] |=([? b=@ c=tape] [~(d ne b) c]))) ++ r-co |= [syn=? nub=@ der=@ ign=(unit tape) ne=?] @@ -3477,6 +3529,7 @@ :: ++ ne |_ tig=@ + ++ c (cut 3 [tig 1] key:fa) ++ d (add tig '0') ++ x ?:((gte tig 10) (add tig 87) d) ++ v ?:((gte tig 10) (add tig 87) d) @@ -3498,6 +3551,7 @@ ;~ pfix (just '0') ;~ pose (stag %ub ;~(pfix (just 'b') bay:ag)) + (stag %uc ;~(pfix (just 'c') fim:ag)) (stag %ui ;~(pfix (just 'i') dim:ag)) (stag %ux ;~(pfix (just 'x') hex:ag)) (stag %uv ;~(pfix (just 'v') viz:ag)) @@ -3668,437 +3722,7 @@ :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: section 2eM, regular-expressions :: :: -++ pars - |= [a=tape] :: parse tape to rege - ^- (unit rege) - =+ foo=((full apex:rags) [[1 1] a]) - ?~ q.foo - ~ - [~ p.u.q.foo] -:: -++ rags :: rege parsers - => |% - ++ nor ;~(less (mask "^$()|*?+.[\\") (shim 1 127)) :: non-control char - ++ les ;~(less bas asp) :: not backslash - ++ lep ;~(less (mask "-^[]\\") asp) :: charset non-control - ++ asp (shim 32 126) :: printable ascii - ++ alb ;~(less ser asp) :: charset literal char - ++ mis ;~(less aln asp) :: non alphanumeric - -- - |% - ++ apex :: top level - %+ knee *rege |. ~+ - ;~ pose - ;~((bend |=(a=[rege rege] (some [%eith a]))) mall ;~(pfix bar apex)) - (stag %eith ;~(plug (easy %empt) ;~(pfix bar apex))) - (easy %empt) - == - :: - ++ mall - %+ knee *rege |. ~+ - ;~((bend |=(a=[rege rege] (some [%pair a]))) bets mall) - :: - ++ bets - %+ knee *rege |. ~+ - |= tub=nail - =+ vex=(chun tub) - ?~ q.vex - vex - =+ a=p.u.q.vex - %- ;~ pose - (cold [%eith %empt a] (jest '??')) - (cold [%manl a] (jest '*?')) - (cold [%plll a] (jest '+?')) - (cold [%eith a %empt] wut) - (cold [%mant a] tar) - (cold [%plls a] lus) - (stag %betl ;~(plug (easy a) ;~(sfix rang wut))) - (stag %betw ;~(plug (easy a) rang)) - (stag %binl ;~(plug (easy a) (ifix [kel (jest ',}?')] dim:ag))) - (stag %bant ;~(plug (easy a) (ifix [kel (jest '}?')] dim:ag))) - (stag %bant ;~(plug (easy a) (ifix [kel ker] dim:ag))) - (stag %bint ;~(plug (easy a) (ifix [kel (jest ',}')] dim:ag))) - (easy a) - == - q.u.q.vex - :: - ++ ranc - |= [a=@ b=@] - ^- @ - ?:((gth a b) 0 (con (bex a) $(a +(a)))) - :: - ++ flap |=(a=@ (mix a (dec (bex 256)))) - :: - ++ rang - %+ sear |=([a=@ b=@] ?:((lte a b) (some [a b]) ~)) - (ifix [kel ker] ;~(plug dim:ag ;~(pfix com dim:ag))) - :: - ++ chun - %+ knee *rege |. ~+ - ;~ pose - (cold %ende buc) - (cold %sart ket) - (cold %dote dot) - %+ cook |=(a=(list char) (reel a |=([p=char q=rege] [%pair [%lite p] q]))) - ;~(pfix (jest '\\Q') cape) - |= tub=nail - =+ foo=;~(plug kel dim:ag ;~(pose ker (jest ',}') ;~(plug com dim:ag ker))) - =+ bar=(foo tub) - ?~(q.bar (chad tub) (fail tub)) - (cook |=([a=rege] [%capt a 0]) (ifix [pel per] apex)) - %+ cook |=([a=rege] [%capt a 0]) - (ifix [;~(plug (jest '(?P<') (plus aln) gar) per] apex) - (ifix [(jest '(?:') per] apex) - (stag %brac ;~(pfix sel seac)) - == - :: - ++ seac - |= tub=nail - ?~ q.tub - (fail tub) - ?: =(i.q.tub '^') - (;~(pfix ket (cook flap sead)) tub) - (sead tub) - :: - ++ sead - %+ knee *@ |. ~+ - ;~ pose - |= tub=nail - ?~ q.tub - (fail tub) - ?. =(i.q.tub ']') - (fail tub) - ?~ t.q.tub - (fail tub) - ?: =(i.t.q.tub '-') - ?~ t.t.q.tub - (fail tub) - ?: =(i.t.t.q.tub ']') - (;~(pfix ser (cook |=(a=@ (con (bex ']') a)) sade)) tub) - (fail tub) - (;~(pfix ser (cook |=(a=@ (con (bex ']') a)) sade)) tub) - |= tub=nail - ?~ q.tub - (fail tub) - ?. =(i.q.tub '-') - (fail tub) - ?~ t.q.tub - (fail tub) - ?: =(i.t.q.tub '-') - ?~ t.t.q.tub - (fail tub) - ?: =(i.t.t.q.tub ']') - (;~(pfix hep (cook |=(a=@ (con (bex '-') a)) sade)) tub) - (fail tub) - (;~(pfix hep (cook |=(a=@ (con (bex '-') a)) sade)) tub) - (cook |=(a=[@ @] (con a)) ;~(plug seap sade)) - == - :: - ++ sade - %+ knee *@ |. ~+ - ;~ pose - (cold (bex '-') (jest '-]')) - (cold 0 ser) - (cook |=([p=@ q=@] `@`(con p q)) ;~(plug seap sade)) - == - :: - ++ seap - %+ knee *@ |. ~+ - ;~ pose - unid - %+ ifix (jest '[:')^(jest ':]') - ;~(pose ;~(pfix ket (cook flap chas)) chas) - %+ sear |=([a=@ b=@] ?:((gth a b) ~ (some (ranc a b)))) - ;~(plug asp ;~(pfix hep alb)) - |= tub=nail - ?~ q.tub - (fail tub) - ?~ t.q.tub - ((cook bex les) tub) - ?. =(i.t.q.tub '-') - ((cook bex les) tub) - ?~ t.t.q.tub - ((cook bex les) tub) - ?: =(i.t.t.q.tub ']') - ((cook bex les) tub) - (fail tub) - ;~(pfix bas escd) - == - :: - ++ cape - %+ knee *tape |. ~+ - ;~ pose - (cold ~ (jest '\\E')) - ;~(plug next cape) - (cook |=(a=char (tape [a ~])) next) - (full (easy ~)) - == - ++ chas :: ascii character set - =- (sear ~(get by -) sym) - %- mo ^- (list ,[@tas @I]) - :~ alnum/alnum alpha/alpha ascii/ascii blank/blank cntrl/cntrl - digit/digit graph/graph lower/lower print/print punct/punct - space/space upper/upper word/wordc xdigit/xdigit - == - :: Character sets - ++ alnum :(con lower upper digit) - ++ alpha :(con lower upper) - ++ ascii (ranc 0 127) - ++ blank (con (bex 32) (bex 9)) - ++ cntrl :(con (ranc 0 31) (bex 127)) - ++ digit (ranc '0' '9') - ++ graph (ranc 33 126) - ++ lower (ranc 'a' 'z') - ++ print (ranc 32 126) - ++ punct ;: con - (ranc '!' '/') - (ranc ':' '@') - (ranc '[' '`') - (ranc '{' '~') - == - ++ space :(con (ranc 9 13) (bex ' ')) - ++ upper (ranc 'A' 'Z') - ++ white :(con (bex ' ') (ranc 9 10) (ranc 12 13)) - ++ wordc :(con digit lower upper (bex '_')) - ++ xdigit :(con (ranc 'a' 'f') (ranc 'A' 'F') digit) - :: - ++ chad - %+ knee *rege |. ~+ - ;~(pose (stag %lite nor) (stag %brac unid) ;~(pfix bas escp)) - :: - ++ escd - %+ cook bex - ;~ pose - (cold 0 (just '0')) - (sear ~(get by (mo a/7 t/9 n/10 v/11 f/12 r/13 ~)) low) - (sear |=(a=@ ?:((lth a 256) (some a) ~)) (bass 8 (stun [2 3] cit))) - ;~(pfix (just 'x') (bass 16 (stun [2 2] hit))) - (ifix [(jest 'x{') ker] (bass 16 (stun [2 2] hit))) - mis - == - :: - ++ escp - ;~ pose - (stag %lite escd) - (sear ~(get by (mo b/%boun w/[%brac wordc] z/%ende ~)) low) - =- (sear ~(get by (mo -)) hig) - ~['A'^%sart 'B'^%bout 'C'^%dote 'Q'^%empt 'W'^[%brac (flap wordc)]] - == - :: - ++ unid - =+ cha=~(get by (mo d/digit s/white w/wordc ~)) - ;~ pfix bas - ;~ pose - (sear cha low) - (cook flap (sear |=(a=@ (cha (add a 32))) hig)) - == == - -- -:: -++ ra :: regex engine - |_ a=rege - ++ proc :: capture numbering - |= b=@ - =- -(+ +>.$(a a)) - ^- [p=@ a=rege] - ?- a - [%capt *] =+ foo=$(a p.a, b +(b)) - [p.foo [%capt a.foo b]] - [%eith *] =+ foo=$(a p.a) - =+ bar=$(a q.a, b p.foo) - [p.bar [%eith a.foo a.bar]] - [%pair *] =+ foo=$(a p.a) - =+ bar=$(a q.a, b p.foo) - [p.bar [%pair a.foo a.bar]] - [%manl *] =+ foo=$(a p.a) - [p.foo [%manl a.foo]] - [%plll *] =+ foo=$(a p.a) - [p.foo [%plll a.foo]] - [%binl *] =+ foo=$(a p.a) - [p.foo [%binl a.foo q.a]] - [%betl *] =+ foo=$(a p.a) - [p.foo [%betl a.foo q.a r.a]] - [%mant *] =+ foo=$(a p.a) - [p.foo [%mant a.foo]] - [%plls *] =+ foo=$(a p.a) - [p.foo [%plls a.foo]] - [%bant *] =+ foo=$(a p.a) - [p.foo [%bant a.foo q.a]] - [%bint *] =+ foo=$(a p.a) - [p.foo [%bint a.foo q.a]] - [%betw *] =+ foo=$(a p.a) - [p.foo [%betw a.foo q.a r.a]] - * [b a] - == - :: - ++ cont - |= [a=(map ,@u tape) b=(map ,@u tape)] - (~(gas by *(map ,@u tape)) (weld (~(tap by a)) (~(tap by b)))) - :: - ++ abor - |= [a=char b=(unit ,[tape (map ,@u tape)])] - ^- (unit ,[tape (map ,@u tape)]) - ?~ b - b - [~ [[a -.u.b] +.u.b]] - :: - ++ matc - |= [b=tape c=tape] - ^- (unit (map ,@u tape)) - =+ foo=`(unit ,[tape (map ,@u tape)])`(deep b %empt c) - (bind foo |*(a=^ (~(put by +.a) 0 -.a))) - :: - ++ chet - |= [b=(unit ,[tape (map ,@u tape)]) c=tape d=tape] - ^- (unit ,[tape (map ,@u tape)]) - ?~ b - b - ?~ -.u.b - b - =+ bar=(deep (slag (lent -.u.b) c) %empt d) - ?~ bar - bar - b - ++ blak (some ["" *(map ,@u tape)]) - ++ word |=(a=char =((dis wordc:rags (bex a)) 0)) - ++ deep - |= [b=tape c=rege d=tape] - ^- (unit ,[tape (map ,@u tape)]) - ?- a - %dote ?~(b ~ (some [[i.b ~] *(map ,@u tape)])) - %ende ?~(b blak ~) - %sart ?:(=(b d) blak ~) - %empt blak - %boun =+ ^= luc - ?: =(b d) - & - =+ foo=(slag (dec (sub (lent d) (lent b))) d) - (word -.foo) - =+ cuc=?~(b & (word -.b)) - ?:(!=(luc cuc) blak ~) - %bout =+ ^= luc - ?: =(b d) - & - =+ foo=(slag (dec (sub (lent d) (lent b))) d) - (word -.foo) - =+ cuc=?~(b & (word -.b)) - ?:(=(luc cuc) blak ~) - [%capt *] =+ foo=$(a p.a) - ?~ foo - foo - =+ ft=u.foo - =+ bar=$(a c, b (slag (lent -.ft) b), c %empt) - ?~ bar - bar - [~ [-.ft (~(put by +.ft) q.a -.ft)]] - [%lite *] ?~(b ~ ?:(=(i.b p.a) (some [[i.b ~] *(map ,@u tape)]) ~)) - [%brac *] ?~ b - ~ - ?. =((dis (bex `@`i.b) p.a) 0) - (some [[i.b ~] *(map ,@u tape)]) - ~ - [%eith *] =+ foo=(chet(a c) $(a p.a) b d) - =+ bar=(chet(a c) $(a q.a) b d) - ?~ foo - bar - ?~ bar - foo - =+ ft=u.foo - =+ bt=u.bar - ?: (gte (lent -.ft) (lent -.bt)) - foo - bar - [%pair *] =+ foo=$(a p.a, c [%pair q.a c]) - ?~ foo - foo - =+ ft=u.foo - =+ bar=$(a q.a, b (slag (lent -.ft) b)) - ?~ bar - bar - =+ bt=u.bar - [~ [(weld -.ft -.bt) (cont +.ft +.bt)]] - [%manl *] =+ foo=$(a p.a) - ?~ foo - blak - ?~ -.u.foo - blak - $(a [%eith %empt [%pair p.a [%eith %empt a]]]) - [%mant *] =+ foo=$(a p.a) - ?~ foo - blak - =+ ft=u.foo - ?~ -.ft - blak - $(a [%eith [%pair p.a [%eith a %empt]] %empt]) - [%plls *] $(a [%pair p.a [%mant p.a]]) - [%plll *] $(a [%pair p.a [%manl p.a]]) - [%binl *] =+ min=?:(=(q.a 0) 0 (dec q.a)) - ?: =(q.a 0) - $(a [%manl p.a]) - $(a [%pair p.a [%binl p.a min]]) - [%bant *] ?: =(0 q.a) - blak - $(a [%pair p.a [%bant p.a (dec q.a)]]) - [%bint *] =+ min=?:(=(q.a 0) 0 (dec q.a)) - ?: =(q.a 0) - $(a [%mant p.a]) - $(a [%pair p.a [%bint p.a min]]) - [%betw *] ?: =(0 r.a) - blak - ?: =(q.a 0) - $(a [%eith [%pair p.a [%betw p.a 0 (dec r.a)]] %empt]) - $(a [%pair p.a [%betw p.a (dec q.a) (dec r.a)]]) - [%betl *] ?: =(0 r.a) - blak - ?: =(q.a 0) - $(a [%eith %empt [%pair p.a [%betl p.a 0 (dec r.a)]]]) - $(a [%pair p.a [%betl p.a (dec q.a) (dec r.a)]]) - == - -- -:: -++ rexp :: Regex match - ~/ %rexp - |= [a=tape b=tape] - ^- (unit (unit (map ,@u tape))) - =+ ^= bar - |= [a=@ b=(map ,@u tape)] - ?: =(a 0) - b - =+ c=(~(get by b) a) - ?~ c - $(a (dec a), b (~(put by b) a "")) - $(a (dec a)) - =+ par=(pars a) - ?~ par ~ - =+ poc=(~(proc ra u.par) 1) - =+ c=b - |- - =+ foo=(matc:poc c b) - ?~ foo - ?~ c - [~ ~] - $(c t.c) - [~ [~ (bar (dec p.poc) u.foo)]] -:: -++ repg :: Global regex replace - ~/ %repg - |= [a=tape b=tape c=tape] - ^- (unit tape) - =+ par=(pars a) - ?~ par ~ - =+ poc=(~(proc ra u.par) 1) - =+ d=b - :- ~ - |- - ^- tape - =+ foo=(matc:poc d b) - ?~ foo - ?~ d - ~ - [i.d $(d t.d)] - =+ ft=(need (~(get by u.foo) 0)) - ?~ d - c - (weld c $(d `tape`(slag (lent ft) `tape`d))) + :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: section 2eN, pseudo-cryptography :: :: @@ -5332,10 +4956,16 @@ ++ shax :: sha-256 ~/ %shax |= ruz=@ ^- @ + (shay [(met 3 ruz) ruz]) +:: +++ shay :: sha-256 with length + ~/ %shay + |= [len=@u ruz=@] ^- @ ~| %sha + => .(ruz (cut 3 [0 len] ruz)) =+ [few==>(fe .(a 5)) wac=|=([a=@ b=@] (cut 5 [a 1] b))] =+ [sum=sum.few ror=ror.few net=net.few inv=inv.few] - =+ ral=(lsh 0 3 (met 3 ruz)) + =+ ral=(lsh 0 3 len) =+ ^= ful %+ can 0 :~ [ral ruz] @@ -6076,8 +5706,9 @@ :: ++ seed :: hoon/hoon core vase ^- vase - ~+ - !;(*type ..seed) + !! + :: ~+ :: trimmed + :: !;(*type ..seed) :: ++ seem |=(toy=typo `type`toy) :: promote typo ++ seer |=(vix=vise `vase`vix) :: promote vise @@ -6174,7 +5805,9 @@ |= [sut=type ref=type] ^- [? worm] ?: (~(has in nes) [sut ref]) [& +>+<] - ?. (~(nest ut sut) | ref) [| +>+<] + ?. (~(nest ut sut) | ref) + :: ~& %nest-failed + [| +>+<] [& +>+<(nes (~(put in nes) [sut ref]))] :: ++ nets :: typeless nest @@ -6183,6 +5816,14 @@ ?: (~(has in nes) [sut ref]) [& +>+<] =+ gat=|=([a=type b=type] (~(nest ut a) | b)) ?. (,? .*(gat(+< [sut ref]) -.gat)) + :: ~& %nets-failed + :: =+ tag=`*`skol + :: =+ foo=(tank .*(tag(+< ref) -.tag)) + :: =+ bar=(skol sut) + :: ~& %nets-need + :: ~> %slog.[0 bar] + :: ~& %nets-have + :: ~> %slog.[0 foo] [| +>+<.$] [& +>+<.$(nes (~(put in nes) [sut ref]))] :: @@ -6467,12 +6108,13 @@ ++ hock |- ^- toga ?- gen - [^ *] [%2 $(gen p.gen) $(gen q.gen)] [%cnts [@ ~] ~] i.p.gen [%cnzy @] p.gen [%cnzz [@ ~]] i.p.gen [%zpcb *] $(gen q.gen) - * =+(neg=open ?:(=(gen neg) [%0 ~] $(gen neg))) + [@ *] =+(neg=open ?:(=(gen neg) [%0 ~] $(gen neg))) + [^ *] =+ toe=[$(gen p.gen) $(gen q.gen)] + ?:(=(toe [[%0 ~] [%0 ~]]) [%0 ~] [%2 toe]) == :: ++ open @@ -6522,7 +6164,13 @@ [i.p.gen $(p.gen t.p.gen)] :: [%cncb *] [%ktls [%cnzz p.gen] %cnts p.gen q.gen] - [%cncl *] [%cnsg [%$ ~] p.gen q.gen] + [%cncl *] + =+ rem=[%cnsg [%$ ~] p.gen q.gen] + ?. ?=([%zpcb ^ %cnzz @ ~] p.gen) rem + => .(p.gen `[@ ^ @ p=@tas ~]`p.gen) + :+ %sgzp [[%dtzz %tas 'slam'] [%dtzz %tas p.p.gen]] + rem + :: [%cndt *] [%cnhp q.gen [p.gen ~]] [%cnkt *] [%cnhp p.gen q.gen r.gen s.gen ~] [%cnls *] [%cnhp p.gen q.gen r.gen ~] @@ -7101,9 +6749,7 @@ [[%leaf (rip 3 -.lum)] $(lum +.lum)] :: %type - =+ reb=(slap [p:!>(.) .(sut lum)] %cnzy %duck) - =+ cis=(tank q.reb) - ?. =(cis q.reb) ~ + =+ cis=((hard tank) .*(.(sut lum) !=(duck))) :: type bypass :^ ~ %palm [~ ~ ~ ~] [[%leaf '#' 't' '/' ~] cis ~] @@ -7137,7 +6783,8 @@ ~ :+ ~ %leaf - ?+ p.q.ham ~(rend co [~ p.q.ham lum]) + ?+ (rash p.q.ham ;~(sfix (cook crip (star low)) (star hig))) + ~(rend co [~ p.q.ham lum]) %$ ~(rend co [~ %ud lum]) %t (dash (rip 3 lum) '\'') %tas ['%' ?.(=(0 lum) (rip 3 lum) ['$' ~])] @@ -8540,10 +8187,12 @@ ?: (~(has in was) u.rev) ~|(%pray-loop !!) =+ ruv=`path`(weld u.rev `path`[%hoon ~]) - =+ txt=(,@ta .^(%cx ruv)) - ~| ruv - %+ rash txt - (ifix [gay gay] tall(was (~(put in was) u.rev), wer u.rev)) + ~& [%pray-disabled ruv] + !! + :: =+ txt=(,@ta .^(%cx ruv)) + :: ~| ruv + :: %+ rash txt + :: (ifix [gay gay] tall(was (~(put in was) u.rev), wer u.rev, bug |)) :: ++ prey |= gun=(list twig) ^- (unit twig) @@ -8878,7 +8527,7 @@ ;~ pose (stag %wtzp ;~(pfix zap wide)) (stag %zpzp (cold ~ ;~(plug zap zap))) - (stag %zpcn (cold ~ ;~(plug zap cen))) + :: (stag %zpcn (cold ~ ;~(plug zap cen))) == :- '$' rump @@ -8955,23 +8604,7 @@ (stag %bccm ;~(pfix com hill)) :- '^' ;~ pose - ;~ pfix ket - ;~ pose - ;~ pfix col - %+ sear - |= [a=tile b=twig] :: XX shd be static - =+ rev=(plex b) - ?~ rev ~ - %- some - :+ %smsm a - [%dtkt %dtzz %$ %cx u.rev] - ;~(plug hill rood) - == - (sear prey (most ket rood)) - == - == (stag %cnzz rope) - (stag %bczp (cold %cell ket)) == :- '`' ;~ pfix tec @@ -8984,8 +8617,6 @@ (cook |=(a=twig [[%dtzz %n ~] a]) wide) == == - :- '#' - ;~(pfix hax rupl) :- '"' %+ cook |= a=(list (list beer)) @@ -9114,10 +8745,10 @@ ;~ pfix bar %- stew ^. stet ^. limo - :~ ['_' (rune cab %brcb expu)] + :~ ['_' (rune cab %brcb expv)] ['%' (rune cen %brcn expe)] ['.' (rune dot %brdt expa)] - ['/' (rune fas %brfs expu)] + ['/' (rune fas %brfs expv)] ['-' (rune hep %brhp expa)] ['^' (rune ket %brkt expr)] ['+' (rune lus %brls expo)] @@ -9143,7 +8774,15 @@ == :- '$' ;~ pose - (rune com %bccm expv) + ;~ pfix buc + %- stew + ^. stet ^. limo + :~ + [',' (rune com %bccm expt)] + ['*' (rune tar %bctr expt)] + ['@' (rune pat %bcpt expu)] + == + == (stag %bccm (noil tol)) == :- ':' @@ -9372,9 +9011,9 @@ ++ expq |.(;~(gunk rope loaf loaf)) :: wing and two twigs ++ expr |.(;~(gunk loaf wisp)) :: twig and core tail ++ exps |.((butt hank)) :: closed gapped twigs - :: expt - ++ expu |.(;~(gunk lobe wisp)) :: tile, core tail - ++ expv |.(lobe) :: tile + ++ expt |.(lobe) :: tile + ++ expu |.(;~(gunk rope lobe)) :: wing and tile + ++ expv |.(;~(gunk lobe wisp)) :: tile, core tail ++ expw |.(;~(gunk lobe teak)) :: tile and tiki ++ expx |.((butt ;~(gunk teak race))) :: tiki, [tile twig]s ++ expy |.((butt ;~(gunk teak loaf race))) :: tiki twig [tile twig]s @@ -9440,11 +9079,12 @@ == ^- (unit twig) ?- -.vil - %tis [~ %ktts ~(hock ap ros) p.vil] %col [~ %tsgl ros p.vil] %pel [~ %cnts ~(rake ap ros) p.vil] %pat [~ %bcpt ~(rake ap ros) p.vil] %ket [~ ros p.vil] + %tis =+ tog=~(hock ap ros) + ?:(=([%0 ~] tog) ~ [~ %ktts tog p.vil]) == :: ++ long @@ -10198,13 +9838,12 @@ |- ^- [p=(list ovum) q=(pair worm (list ,[p=@tas q=vase]))] ?~ mor [(flop ova) niz] =^ nyx niz (jack lac i.mor) - $(ova (weld p.nyx ova), mor (weld q.nyx t.mor)) + $(ova (weld p.nyx ova), mor (weld t.mor q.nyx)) -- -- :::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::: :::::: Postface :::::: :::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::: -!: ~& %post-start =+ pit=`vase`!>(.) :: =+ bud=pit :: becomes tang diff --git a/main/arvo/zuse.hoon b/main/arvo/zuse.hoon index 3261e32185..3c6e225ee6 100644 --- a/main/arvo/zuse.hoon +++ b/main/arvo/zuse.hoon @@ -509,8 +509,7 @@ :: ++ moon :: mime type to text |= myn=mite - %+ rap - 3 + %- crip |- ^- tape ?~ myn ~ ?: =(~ t.myn) (trip i.myn) @@ -632,7 +631,7 @@ :: ++ poxo :: node to tape =< |=(a=manx `tape`(apex a ~)) - |_ unq=_`?`| + |_ _[unq=`?`| cot=`?`|] :: self-close all tags ++ apex :: top level |= [mex=manx rez=tape] ^- tape @@ -646,8 +645,8 @@ %+ welp tam =- ?~(att rez [' ' (attr att rez)]) ^- rez=tape - ::?~ c.mex - :: [' ' '/' '>' rez] + ?: &(?=(~ c.mex) |(cot (clot man))) + [' ' '/' '>' rez] :- '>' (many c.mex :(weld "" rez)) :: :: @@ -681,16 +680,23 @@ == == :: - ++ name :: name to tape - |= man=mane ^- tape - ?@ man (trip man) - (weld (trip -.man) `tape`[':' (trip +.man)]) - :: ++ many :: nodelist to tape |= [lix=(list manx) rez=tape] |- ^- tape ?~ lix rez (apex i.lix $(lix t.lix)) + :: + ++ name :: name to tape + |= man=mane ^- tape + ?@ man (trip man) + (weld (trip -.man) `tape`[':' (trip +.man)]) + :: + ++ clot ~+ :: self-closing tags + %~ has in + %- sa ^- (list term) :~ + %area %base %br %col %command %embed %hr %img %input %keygen + %link %meta %param %source %track %wbr + == -- :: ++ poxa :: xml parser @@ -1100,14 +1106,15 @@ ?~ rax [~ ~] ?^ t.rax - [p.pok [i.rax q.pok]]:[pok=$(rax t.rax) .] + [p.pok [ire q.pok]]:[pok=$(rax t.rax) ire=i.rax] =+ ^- raf=(like tape) %. [1^1 (flop (trip i.rax))] - ;~(sfix (plus ;~(less dot next)) dot) + ;~(sfix (star ;~(less dot next)) dot) ?~ q.raf [~ [i.rax ~]] =+ `[ext=tape [@ @] fyl=tape]`u.q.raf - [[~ (crip (flop ext))] [(crip (flop fyl)) ~]] + :- ?:(=(~ ext) ~ [~ (crip (flop ext))]) + ?:(=(~ fyl) ~ [(crip (flop fyl)) ~]) :: ++ fuel :: parse fcgi |= [bem=beam but=path] @@ -1116,17 +1123,11 @@ =+ dyb=(slay i.t.but) ?> ?& ?=([~ %many *] dyb) ?=([* * *] p.u.dyb) - :: ?=([%$ %tas *] i.p.u.dyb) - ?=([%many *] i.p.u.dyb) + ?=([%$ %ta *] i.p.u.dyb) ?=([%blob *] i.t.p.u.dyb) == =+ ced=((hard cred) p.i.t.p.u.dyb) :: =+ nep=q.p.i.p.u.dyb - =+ ^= nyp ^- path - %+ turn p.i.p.u.dyb - |= a=coin ^- @ta - ?> ?=([%$ %ta @] a) - ?>(((sane %ta) q.p.a) q.p.a) =+ ^= gut ^- (list ,@t) %+ turn t.t.p.u.dyb |= a=coin ^- @t @@ -1141,7 +1142,6 @@ ced bem t.t.but - nyp == :: ++ sifo :: 64-bit encode @@ -1157,7 +1157,57 @@ ~ =+ d=(end 0 6 pad) [(cut 3 [d 1] cha) $(pad (rsh 0 6 pad))] - (weld (flop (slag poc sif)) (trip (fil 3 poc '='))) + (weld (flop (slag poc sif)) (reap poc '=')) +:: +++ ofis :: XX broken + =- |=(a=cord (rash a fel)) + =- fel=;~(sfix (boss 64 (plus siw)) (stun 0^2 tis)) + ^= siw + ;~ pose + dit + (cook |=(a=@ (sub a (sub 'A' 10))) (shim 'A' 'Z')) + (cook |=(a=@ (sub a (sub 'a' 36))) (shim 'a' 'z')) + (cold 62 (just '+')) + (cold 63 (just '/')) + == +:: +:: .= ~[p=~.ack q=~.~sarnel r=~..y] +:: (dray ~[p=%tas q=%p r=%f] %ack ~sarnel &) +++ dray :: load tuple into path + =- |* [a=[@tas (pole ,@tas)] b=*] ^- (paf a) + => .(b `(tup a)`b) + ?~ +.a [(scot -.a b) ~] + [(scot -.a -.b) `(paf +.a)`(..$ +.a +.b)] + :- paf=|*(a=(pole) ?~(a ,~ ,[(odo:raid -.a(. %ta)) (..$ +.a)])) + tup=|*([a=@tas b=(pole ,@tas)] =+(c=(odo:raid a) ?~(b c ,[c (..$ b)]))) +:: +:: .= [p=%ack q=~sarnel r=&] +:: (raid /ack/~sarnel/.y p=%tas q=%p r=%f ~) +++ raid :: demand path odors + =- |* [a=path b=[@tas (pole ,@tas)]] + ?~ +.b `(odo -.b)`(slav -.b -.a) + [`(odo -.b)`(slav -.b -.a) (..$ +.a +.b)] + ^= odo + |* a=@tas + |= b=* + =< a(. (. b)) :: preserve face + ?+ a ,@ + %c ,@c %da ,@da %dr ,@dr %f ,@f %if ,@if %is ,@is %p ,@p + %u ,@u %uc ,@uc %ub ,@ub %ui ,@ui %ux ,@ux %uv ,@uv %uw ,@uw + %s ,@s %t ,@t %ta ,@ta %tas ,@tas + == +:: +++ read :: parse odored path + =< |*([a=path b=[@tas (pole ,@tas)]] ((+> b) a)) + |* b=[@tas (pole ,@tas)] + |= a=path + ?~ a ~ + =+ hed=(slaw -.b i.a) + ?~ +.b + ^- (unit (odo:raid -.b)) + ?^(+.a ~ hed) + ^- (unit ,[(odo:raid -.b) _(need *(..^$ +.b))]) + (both hed ((..^$ +.b) +.a)) :: ++ urle :: URL encode |= tep=tape @@ -1197,9 +1247,14 @@ pul(q.q [(rsh 3 1 (scot %p who)) q.q.pul]) :: ++ earn :: purl to tape - |^ |= pul=purl - ^- tape - :(weld (head p.pul) "/" (body q.pul) (tail r.pul)) + =< |=(pul=purl `tape`(apex ~ pul)) + |% + ++ apex + |= qur=quri + ?- -.qur + %& (weld (head p.p.qur) `tape`['/' $(qur [%| +.p.qur])]) + %| (weld (body p.qur) (tail q.qur)) + == :: ++ body |= pok=pork ^- tape @@ -1233,16 +1288,14 @@ :- '?' |- ^- tape ?~ kay ~ - ;: weld + ;: welp (urle (trip p.i.kay)) - "=" - (urle (trip q.i.kay)) + ?~(q.i.kay ~ ['=' (urle (trip q.i.kay))]) ?~(t.kay ~ `tape`['&' $(kay t.kay)]) == -- :: -++ epur :: url/header parser - =< |=(a=cord `(unit purl)`(rush a auri)) +++ urlp :: url/header parser |% ++ apat :: 2396 abs_path %+ cook deft @@ -1278,7 +1331,7 @@ ++ pesc ;~(pfix cen mes) :: 2396 escaped ++ pold (cold ' ' (just '+')) :: old space code ++ pque ;~(pose pcar fas wut) :: 3986 query char - ++ pquo ;~(pose pure pesc pold) :: normal query char + ++ pquo ;~(pose pure pesc pold fas wut) :: normal query char ++ pure ;~(pose aln hep dot cab sig) :: 2396 unreserved ++ psub ;~ pose :: 3986 sub-delims zap buc pam soq pel per @@ -1341,6 +1394,8 @@ (stag %| ;~(plug apat yque)) == -- +++ epur :: url/header parser + =>(urlp |=(a=cord `(unit purl)`(rush a auri))) :: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: section 3bH, names etc :: @@ -1646,22 +1701,22 @@ ?~ two one ?:((lth u.one u.two) one two) :: -++ mojo :: compiling load - |= [pax=path src=*] - ^- (each twig (list tank)) - ?. ?=(@ src) - [%| ~[[leaf/"musk: malformed: {}"]]] - =+ ^= mud - %- mule |. - ((full vest) [1 1] (trip src)) - ?: ?=(| -.mud) mud - ?~ q.p.mud - :~ %| - leaf/"musk: syntax error: {}" - leaf/"musk: line {}, column {}" - == - [%& p.u.q.p.mud] -:: +:: ++ mojo :: compiling load +:: |= [pax=path src=*] +:: ^- (each twig (list tank)) +:: ?. ?=(@ src) +:: [%| ~[[leaf/"musk: malformed: {}"]]] +:: =+ ^= mud +:: %- mule |. +:: ((full vest) [1 1] (trip src)) +:: ?: ?=(| -.mud) mud +:: ?~ q.p.mud +:: :~ %| +:: leaf/"musk: syntax error: {}" +:: leaf/"musk: line {}, column {}" +:: == +:: [%& p.u.q.p.mud] +:: :: ++ mole :: new to old sky |= ska=$+(* (unit (unit))) |= a=* @@ -1670,21 +1725,21 @@ ?~ b ~ ?~ u.b ~ [~ u.u.b] -:: -++ much :: constructing load - |= [pax=path src=*] - ^- gank - =+ moj=(mojo pax src) - ?: ?=(| -.moj) moj - (mule |.((slap !>(+>.$) `twig`p.moj))) -:: -++ musk :: compiling apply - |= [pax=path src=* sam=vase] - ^- gank - =+ mud=(much pax src) - ?: ?=(| -.mud) mud - (mule |.((slam p.mud sam))) -:: +:: :: +:: ++ much :: constructing load +:: |= [pax=path src=*] +:: ^- gank +:: =+ moj=(mojo pax src) +:: ?: ?=(| -.moj) moj +:: (mule |.((slap !>(+>.$) `twig`p.moj))) +:: :: +:: ++ musk :: compiling apply +:: |= [pax=path src=* sam=vase] +:: ^- gank +:: =+ mud=(much pax src) +:: ?: ?=(| -.mud) mud +:: (mule |.((slam p.mud sam))) +:: :: ++ pack :: light path encoding |= [a=term b=path] ^- span %+ rap 3 :- (wack a) @@ -1860,7 +1915,6 @@ ced=cred :: client credentials bem=beam :: original path but=path :: ending - nyp=path :: request model == :: ++ flap ,@uvH :: network packet id ++ flow :: packet connection @@ -2068,7 +2122,7 @@ $% [& p=suba] :: delta [| p=@tas] :: label == :: -++ octs ,[p=@ud q=@] :: octet-stream +++ octs ,[p=@ud q=@t] :: octet-stream ++ oryx ,@t :: CSRF secret ++ page (cask) :: untyped cage ++ pail ?(%none %warm %cold) :: connection status diff --git a/main/cat/hello/gate.hook b/main/cat/hello/gate.hook new file mode 100644 index 0000000000..ed2e2b28ef --- /dev/null +++ b/main/cat/hello/gate.hook @@ -0,0 +1,10 @@ +:: +:::: /hook/gate/hello/cat + :: +/? 314 +:: +:::: + !: +|= [* [[txt=@tas ~] ~]] +:- %noun +(crip (weld "hello, " (flop (trip txt)))) diff --git a/main/cat/helm/init/gate.hook b/main/cat/helm/init/gate.hook new file mode 100644 index 0000000000..ecc37e9502 --- /dev/null +++ b/main/cat/helm/init/gate.hook @@ -0,0 +1,12 @@ +:: +:::: /hook/gate/reload/helm/cat + :: +/? 314 +:: +:::: + !: +|= $: [now=@da eny=@uvI bec=beak] + [~ ~] + == +:- %helm-init +p.bec diff --git a/main/cat/helm/reload/.gate.hook.swp b/main/cat/helm/reload/.gate.hook.swp new file mode 100644 index 0000000000..20ba475626 Binary files /dev/null and b/main/cat/helm/reload/.gate.hook.swp differ diff --git a/main/cat/helm/reload/gate.hook b/main/cat/helm/reload/gate.hook new file mode 100644 index 0000000000..a4f018dc0d --- /dev/null +++ b/main/cat/helm/reload/gate.hook @@ -0,0 +1,12 @@ +:: +:::: /hook/gate/reload/helm/cat + :: +/? 314 +:: +:::: + !: +|= $: [now=@da eny=@uvI bec=beak] + [arg=(list term) ~] + == +:- %helm-reload +arg diff --git a/main/cat/helm/sync/gate.hook b/main/cat/helm/sync/gate.hook new file mode 100644 index 0000000000..078680fcab --- /dev/null +++ b/main/cat/helm/sync/gate.hook @@ -0,0 +1,12 @@ +:: +:::: /hook/gate/sync/helm/cat + :: +/? 314 +:: +:::: + !: +|= $: [now=@da eny=@uvI bec=beak] + [arg=[syd=@tas her=@p sud=@tas ~] ~] + == +:- %helm-sync +arg diff --git a/main/cat/ticket/gate.hook b/main/cat/ticket/gate.hook new file mode 100644 index 0000000000..37cb3af7d2 --- /dev/null +++ b/main/cat/ticket/gate.hook @@ -0,0 +1,12 @@ +:: +:::: /hook/gate/ticket/cat + :: +/? 314 +:: +:::: + !: +|= $: [now=@da eny=@uvI bec=beak] + [[her=@p ~] ~] + == +:- %noun +((hard ,@p) .^(/a/(scot %p p.bec)/tick/(scot %da now)/(scot %p her))) diff --git a/main/dog/helm/begin/gate.hook b/main/dog/helm/begin/gate.hook new file mode 100644 index 0000000000..e38102135d --- /dev/null +++ b/main/dog/helm/begin/gate.hook @@ -0,0 +1,45 @@ +:: +:::: /hook/gate/begin/helm/gun + :: +/? 314 +/- *sole +:: +:::: + !: +=> |% + ++ begs ,[his=@p tic=@p yen=@t ges=gens] + -- +|= $: [now=@da eny=@uvI bec=beak] + [~ ~] + == +^- (sole-result (cask begs)) +%+ sole-lo + [%& %helm-begin "your ship: ~"] +%+ sole-go fed:ag +|= his=@p +%+ sole-lo + [%& %helm-ticket "your ticket: ~"] +%+ sole-go fed:ag +|= tic=@p +%+ sole-lo + [%& %helm-entropy "some entropy: "] +%+ sole-go (boss 256 (more gon qit)) +|= yen=@t +=+ ney=(shax yen) +%+ sole-yo `tank`[%leaf "entropy check: {(scow %p `@p`(mug ney))}"] +%+ sole-so %helm-begin +:* his + tic + ney +:: + ^- gens + :- %en + =+ can=(clan his) + ?- can + %czar [%czar ~] + %duke [%duke %anon ~] + %earl [%earl (scot %p his)] + %king [%king ?:(=(~doznec his) 'Urban Republic' (scot %p his))] + %pawn [%pawn ~] + == +== diff --git a/main/dog/helm/reload/gate.hook b/main/dog/helm/reload/gate.hook new file mode 100644 index 0000000000..30f8d0dd2c --- /dev/null +++ b/main/dog/helm/reload/gate.hook @@ -0,0 +1,12 @@ +:: +:::: /hook/gate/reload/helm/gun + :: +/? 314 +/- *sole +:: +:::: + !: +|= $: [now=@da eny=@uvI bec=beak] + [arg=(list term) ~] + == +(sole-so %helm-reload arg) diff --git a/main/dog/helm/reset/gate.hook b/main/dog/helm/reset/gate.hook new file mode 100644 index 0000000000..3f08064950 --- /dev/null +++ b/main/dog/helm/reset/gate.hook @@ -0,0 +1,12 @@ +:: +:::: /hook/gate/reset/helm/gun + :: +/? 314 +/- *sole +:: +:::: + !: +|= $: [now=@da eny=@uvI bec=beak] + [~ ~] + == +(sole-so %helm-reset ~) diff --git a/main/dog/helm/verb/gate.hook b/main/dog/helm/verb/gate.hook new file mode 100644 index 0000000000..ec66d7cb26 --- /dev/null +++ b/main/dog/helm/verb/gate.hook @@ -0,0 +1,13 @@ +:: +:::: /hook/gate/verb/helm/gun + :: +/? 314 +/- *sole +:: +:::: + !: +|= $: [now=@da eny=@ bec=beak] + [~ ~] + == +~& %helm-verb +(sole-so %helm-verb ~) diff --git a/main/dog/solid/gate.hook b/main/dog/solid/gate.hook new file mode 100644 index 0000000000..7f4bb3d387 --- /dev/null +++ b/main/dog/solid/gate.hook @@ -0,0 +1,40 @@ +:: +:::: /hook/gate/solid/gun + :: +/? 314 +/- *sole +:: +:::: + !: +|= $: [now=@da eny=@uvI bec=beak] + [~ ~] + == +%+ sole-so %noun +=+ top=`path`/(scot %p p.bec)/main/(scot %da now)/arvo +=+ pax=`path`(weld top `path`[%hoon ~]) +~& %solid-start +=+ gen=(reck pax) +~& %solid-parsed +=+ ken=q:(~(mint ut %noun) %noun gen) +~& %solid-compiled +:- ken +=+ all=.*(0 ken) +=+ ^= vay ^- (list ,[p=@tas q=@tas]) + :~ [%$ %zuse] + [%g %gall] + [%f %ford] + [%a %ames] + [%c %clay] + [%d %dill] + [%e %eyre] + [%t %time] + == +|- ^+ all +?~ vay all +=+ pax=(weld top `path`[q.i.vay ~]) +=+ txt=((hard ,@) .^(%cx (weld pax `path`[%hoon ~]))) +=+ sam=[now `ovum`[[%gold ~] [%veer p.i.vay pax txt]]] +~& [%solid-veer i.vay] +=+ gat=.*(all .*(all [0 42])) +=+ nex=+:.*([-.gat [sam +>.gat]] -.gat) +$(vay t.vay, all nex) diff --git a/main/lib/base.css b/main/lib/base.css new file mode 100644 index 0000000000..a22b9065bd --- /dev/null +++ b/main/lib/base.css @@ -0,0 +1,147 @@ +@font-face { + font-family: "bau"; + src: url("http://storage.googleapis.com/urbit-extra/bau.woff"); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: "bau"; + src: url("http://storage.googleapis.com/urbit-extra/bau-italic.woff"); + font-weight: 400; + font-style: italic; +} +@font-face { + font-family: "bau"; + src: url("http://storage.googleapis.com/urbit-extra/bau-medium.woff"); + font-weight: 500; + font-style: normal; +} +@font-face { + font-family: "bau"; + src: url("http://storage.googleapis.com/urbit-extra/bau-mediumitalic.woff"); + font-weight: 500; + font-style: italic; +} +@font-face { + font-family: "bau"; + src: url("http://storage.googleapis.com/urbit-extra/bau-bold.woff"); + font-weight: 600; + font-style: normal; +} +@font-face { + font-family: "bau"; + src: url("http://storage.googleapis.com/urbit-extra/bau-bolditalic.woff"); + font-weight: 600; + font-style: italic; +} +@font-face { + font-family: "bau"; + src: url("http://storage.googleapis.com/urbit-extra/bau-super.woff"); + font-weight: 600; + font-style: normal; +} +@font-face { + font-family: "bau"; + src: url("http://storage.googleapis.com/urbit-extra/bau-superitalic.woff"); + font-weight: 600; + font-style: italic; +} +@font-face { + font-family: "scp"; + src: url("http://storage.googleapis.com/urbit-extra/scp-extralight.woff"); + font-weight: 200; + font-style: normal; +} +@font-face { + font-family: "scp"; + src: url("http://storage.googleapis.com/urbit-extra/scp-light.woff"); + font-weight: 300; + font-style: normal; +} +@font-face { + font-family: "scp"; + src: url("http://storage.googleapis.com/urbit-extra/scp-regular.woff"); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: "scp"; + src: url("http://storage.googleapis.com/urbit-extra/scp-medium.woff"); + font-weight: 500; + font-style: normal; +} +@font-face { + font-family: "scp"; + src: url("http://storage.googleapis.com/urbit-extra/scp-bold.woff"); + font-weight: 600; + font-style: normal; +} +@font-face { + font-family: "scp"; + src: url("http://storage.googleapis.com/urbit-extra/scp-black.woff"); + font-weight: 700; + font-style: normal; +} + +html, +body { + margin: 0; + padding: 0; +} + +html, +input, +button, +body { + font-family: "bau"; + font-size: 18px; +} + +pre, +code, +.mono { + font-family:"scp"; +} + +#c { + width: 24rem; + position: absolute; + left: 50%; + margin-left: -12rem; +} + +#c pre { + font-size: .6rem; +} + +#c.err { + width: 32rem; + margin-left: -16rem; +} + +#pass { + width: 24rem; +} + +button { + border: .3rem solid #000; + background-color: #fff; + font-size: 1rem; + padding: .3rem; + font-weight: 500; +} + +#ship, +input { + font-family: "scp"; + display: inline; + border: none; + background-color: #f5f5f5; + padding: .3rem; + outline: none; +} + +#ship:focus, +input:focus { + background-color: #eee; +} \ No newline at end of file diff --git a/main/lib/sh-utils/core.hook b/main/lib/sh-utils/core.hook index 2b9ce5a456..5f222c1f86 100644 --- a/main/lib/sh-utils/core.hook +++ b/main/lib/sh-utils/core.hook @@ -28,9 +28,7 @@ :: ++ add-subs :: add gall subscription |* [hat=[hapt ship path] ref=_,[(list) ^]] - =+ `[hapt ship path]`hat :: typecheck - %+ add-resp [%pass /show %g %show hat] - ref + (add-resp [%pass /show %g %show hat] ref) :: ++ args-into-gate :: poke--args from gate: output and exit |* [con=[* [hide *] *] gat=_,[@ *]] diff --git a/main/lib/shu/core.hook b/main/lib/shu/core.hook new file mode 100644 index 0000000000..6628088aa0 --- /dev/null +++ b/main/lib/shu/core.hook @@ -0,0 +1,3 @@ +:: Alias +/+ sh-utils +. diff --git a/main/lib/sole/core.hook b/main/lib/sole/core.hook new file mode 100644 index 0000000000..f7a54b2334 --- /dev/null +++ b/main/lib/sole/core.hook @@ -0,0 +1,142 @@ +:: +:::: /hook/core/sole/lib + :: + :: This file is in the public domain. + :: +/? 310 +/- *sole +!: +:::: + :: +|% +++ cs :: shared-state engine + |_ sole-share + ++ abet +< + ++ apply + |= ted=sole-edit + ^+ +> + ?- -.ted + %del +>.$(buf (weld (scag p.ted buf) (slag +(p.ted) buf))) + %ins +>.$(buf (weld (scag p.ted buf) `_buf`[q.ted (slag p.ted buf)])) + %mor |- ^+ +>.^$ + ?~ p.ted + +>.^$ + $(p.ted t.p.ted, +>.^$ ^$(ted i.p.ted)) + %nop +>.$ + %set +>.$(buf p.ted) + == + :: + :::: + :: ++transmute: symmetric operational transformation. + :: + :: for any sole state +>, obeys + :: + :: =+ [x=(transmute a b) y=(transmute b a)] + :: .= (apply:(apply b) x) + :: (apply:(apply a) y) + :: + ++ transmute :: dex as after sin + |= [sin=sole-edit dex=sole-edit] + ^- sole-edit + ?: ?=(%mor -.sin) + |- ^- sole-edit + ?~ p.sin dex + $(p.sin t.p.sin, dex ^$(sin i.p.sin)) + :: + ?: ?=(%mor -.dex) + :- %mor + |- ^- (list sole-edit) + ?~ p.dex ~ + [^$(dex i.p.dex) $(p.dex t.p.dex)] + :: + ?: |(?=(%nop -.sin) ?=(%nop -.dex)) dex + ?: ?=(%set -.sin) [%nop ~] + ?: ?=(%set -.dex) dex + :: + ?- -.sin + %del + ?- -.dex + %del ?: =(p.sin p.dex) [%nop ~] + ?:((lth p.sin p.dex) dex(p (dec p.dex)) dex) + %ins ?:((lte p.sin p.dex) dex(p (dec p.dex)) dex) + == + :: + %ins + ?- -.dex + %del ?:((lte p.sin p.dex) dex(p +(p.dex)) dex) + %ins ?: =(p.sin p.dex) + ?:((gth q.sin q.dex) dex dex(p +(p.dex))) + ?:((lte p.sin p.dex) dex(p +(p.dex)) dex) + == + == + :: + ++ commit :: local change + |= ted=sole-edit + ^- sole-share + abet:(apply(own.ven +(own.ven), leg [ted leg]) ted) + :: + :::: + :: ++inverse: inverse of change in context. + :: + :: for any sole state +>, obeys + :: + :: =(+> (apply:(apply a) (inverse a))) + :: + ++ inverse :: relative inverse + |= ted=sole-edit + ^- sole-edit + =. ted ?.(?=([%mor * ~] ted) ted i.p.ted) + ?- -.ted + %del [%ins p.ted (snag p.ted buf)] + %ins [%del p.ted] + %mor :- %mor + %- flop + |- ^- (list sole-edit) + ?~ p.ted ~ + :- ^$(ted i.p.ted) + $(p.ted t.p.ted, +>.^$ (apply i.p.ted)) + %nop [%nop ~] + %set [%set buf] + == + :: + ++ receive :: naturalize event + |= sole-change + ^- [sole-edit sole-share] + ?> &(=(his.ler his.ven) (lte own.ler own.ven)) + ?> &(=(his.ler his.ven) (lte own.ler own.ven)) + ?> |(!=(own.ler own.ven) =(haw (sham buf)) =(haw 0)) :: trust the clock + =. leg (scag (sub own.ven own.ler) leg) + :: ~? !=(own.ler own.ven) [%miss-leg leg] + =+ dat=(transmute [%mor leg] ted) + :: ~? !=(~ leg) [%transmute from/ted to/dat ~] + [dat abet:(apply(his.ven +(his.ven)) dat)] + :: + ++ remit :: conditional accept + |= [cal=sole-change ask=$+((list ,@c) ?)] + ^- [(unit sole-change) sole-share] + =+ old=buf + =^ dat +>+<.$ (receive cal) + ?: (ask buf) + [~ +>+<.$] + =^ lic +>+<.$ (transmit (inverse(buf old) dat)) + [`lic +>+<.$] + :: + ++ transmit :: outgoing change + |= ted=sole-edit + ^- [sole-change sole-share] + [[[his.ven own.ven] (sham buf) ted] (commit ted)] + :: + ++ transceive :: receive and invert + |= sole-change + ^- [sole-edit sole-share] + =+ old=buf + =^ dat +>+<.$ (receive +<.$) + [(inverse(buf old) dat) +>+<.$] + :: + ++ transpose :: adjust position + |= pos=@ud + =+ dat=(transmute [%mor leg] [%ins pos `@c`0]) + ?> ?=(%ins -.dat) + p.dat + -- +-- diff --git a/main/lib/rodeo/core.hook b/main/lib/talk/core.hook similarity index 86% rename from main/lib/rodeo/core.hook rename to main/lib/talk/core.hook index bd8983332c..02e5434c99 100644 --- a/main/lib/rodeo/core.hook +++ b/main/lib/talk/core.hook @@ -1,10 +1,10 @@ :: -:::: /hook/core/rodeo/lib +:::: /hook/core/talk/lib :: :: This file is in the public domain. :: /? 314 -/- *rodeo +/- *talk :: :::: :: diff --git a/main/lib/urb.js b/main/lib/urb.js index 7fbb4c7f0d..6561707d47 100644 --- a/main/lib/urb.js +++ b/main/lib/urb.js @@ -1,94 +1,272 @@ +window.urb.seqn_u = 1 +window.urb.dely = 0 +window.urb.puls = false +window.urb.cabs = {} +if(!window.urb.appl) window.urb.appl = null + +window.urb.req = function(method,url,params,json,cb) { + var xhr = new XMLHttpRequest() + method = method.toUpperCase() + if(method == "PUT" || method == "DELETE") + xhr.open("POST", url+"?"+method) + else xhr.open(method, url) + + if(json) + xhr.setRequestHeader("content-type", "text/json") + + if(!window.urb.oryx) throw "No CSRF token" // XX fetch auth.json + _data = {oryx: window.urb.oryx} + if(params.xyro) { _data.xyro = params.xyro; } + if(params.ship) { _data.ship = params.ship; } + if(params.path) { _data.path = params.path; } + if(params.appl) { _data.appl = params.appl; } + if(params.mark) { _data.mark = params.mark; } + if(params.wire) { _data.wire = params.wire; } + if(cb) { + xhr.onload = function() { + try { + err = null + res = { + status:this.status, + data: JSON.parse(this.responseText) + } + if(res.data.reload) + res.reload = res.data.reload + } catch(e) { + if(urb.wall || true) document.write(this.responseText) // XX + err = { + message:"Failed to parse JSON", + raw:this.responseText + } + res = null + } + cb(err,res) + } + xhr.onerror = function() { + cb({ + status:this.status, + data:this.responseText + }) + } + } + xhr.send(JSON.stringify(_data)) +} + +window.urb.reqq = [] +window.urb.qreq = function(method,url,params,json,cb) { + walk = function() { + qobj = {} + qobj.oargs = window.urb.reqq[0] + qobj.nargs = [].slice.apply(qobj.oargs,[0,4]) + qobj.nargs.push(function(){ + if(this.oargs[4]) + this.oargs[4].apply(window.urb,arguments) + window.urb.reqq.shift() + if(window.urb.reqq.length > 0) + walk() + }.bind(qobj)) + window.urb.req.apply(this,qobj.nargs) + } + l = window.urb.reqq.length + window.urb.reqq.push(arguments); + if(l == 0) { walk() } +} + +window.urb.gsig = function(params) { + var path = params.path + if(!path) path = "" + if(path[0] !== "/") path = "/"+path + return "~"+params.ship+"/"+ + params.appl+ + path.replace(/[^\x00-\x7F]/g, "") +} + +window.urb.poll = function(params) { + if(!params) throw new Error("You must supply params to urb.poll.") + + var url, $this + + seqn = this.seqn_u + if(params.seqn) seqn = params.seqn() + + url = "/~/of/"+this.ixor+"?poll="+seqn + + this.puls = true + + $this = this + this.req("get",url,params,true,function(err,res) { + if(res){ + if(res.data.beat) + return $this.poll(params) + switch(res.data.type){ + case "news": + return document.location.reload() // XX check autoreload + case "rush": + case "mean": + var err2 = err + if(res.data.type == "mean") + err2 = res.data.data + var fn = $this.gsig(res.data.from) + if($this.cabs[fn]) + $this.cabs[fn].call(this,err2, + {status: res.status, data: res.data.data.json}) // XX non-json + break; + default: + throw new Error("Lost event %"+res.data.type) + } + } + + dely = params.dely ? params.dely : $this.dely + + if(err) + dely = dely+Math.ceil(dely*.02) + else { + $this.dely = 0 + if(params.incs) + params.incs() + else + $this.seqn_u++ + } + + setTimeout(function() { + $this.poll(params) + },dely) + }) +} + +// if (window.urb.auto) { // need dependencies +// var tries = 0 +// var cnt = 0 +// var param = { +// type:"pol" +// } +// window.urb.poll(param) +// } + +// window.urb.heartbeat = function() { +// this.poll({ +// type:"heb", +// ship:this.ship, +// dely:30000, +// seqn:function() { +// return window.urb.seqn_h +// }, +// incs:function() { +// window.urb.seqn_h = window.urb.seqn_h+1 +// } +// },function() { +// console.log('heartbeat.') +// }) +// } +// window.urb.heartbeat() + +// // / // / // // +// end old %eyre code // +// // / // / // // + window.urb.seqn_s = 0 -window.urb.send = function(params,cb) { +// TODO urb.send(data, [params/params.appl]?, cb?) +window.urb.send = function(params,cb) { if(!params) throw new Error("You must supply params to urb.send.") - if(!params.appl) { - if(!urb.appl) - throw new Error("You must specify an appl for urb.send.") - params.appl = urb.appl + if(!params.appl && !this.appl){ + throw new Error("You must specify an appl for urb.send.") } - if(!params.data) { params.data = {}; } - var method, perm, url, $this - - type = params.type ? params.type : "mes" - perm = this.perms[type] + var url, $this params.ship = params.ship ? params.ship : this.ship + params.appl = params.appl ? params.appl : this.appl params.mark = params.mark ? params.mark : "json" + params.xyro = params.data ? params.data : {} + params.wire = params.wire ? params.wire : "/" - method = "put" - url = [perm,this.user,this.port,this.seqn_s] - url = "/"+url.join("/") + + url = ["to",params.appl,params.mark] + url = "/~/"+url.join("/") this.seqn_s++ $this = this - this.qreq(method,url,params,true,function(err,data) { + this.qreq('post',url,params,true,function(err,data) { if(err) { $this.seqn_s--; } if(cb) { cb.apply(this,arguments); } }) } -window.urb.subscribe = function(params,cb) { - if(!cb) - throw new Error("You must supply a callback to urb.subscribe.") - if(!params) - throw new Error("You must supply params to urb.subscribe.") - if(!params.appl) { - if(!urb.appl) - throw new Error("You must specify an appl for urb.subscribe.") - params.appl = urb.appl - } - if(!params.path) - throw new Error("You must specify a path for urb.subscribe.") +window.urb.subscribe = function(params,cb) { // legacy interface + if(!params) throw new Error("You must supply params to urb.subscribe") + return window.urb.bind(params.path, params, cb, cb) +} +window.urb.bind = function(path, cb){ // or bind(path, params, cb, nicecb?) + var params, nicecb + if(arguments.length > 2) + {params = cb; cb = arguments[2], nicecb = arguments[3]} + else params = {} + + params.path = path + if(params.path[0] !== "/") params.path = "/"+params.path params.ship = params.ship ? params.ship : this.ship + params.appl = params.appl ? params.appl : this.appl + params.mark = params.mark ? params.mark : "json" + params.wire = params.wire ? params.wire : params.path + if(typeof path != "string") + throw new Error("You must specify a string path for urb.bind.") + if(!params.appl) throw new Error("You must specify an appl for urb.bind.") + if(!cb) throw new Error("You must supply a callback to urb.bind.") + var method, perm, url, $this - params.type = "sub" - + if(params.mark !== "json") + throw new Error("Non-json subscriptions unimplemented.") // XX + url = "/~/is/"+this.gsig(params)+"."+params.mark + + params.path = params.wire this.cabs[this.gsig(params)] = cb - url = [this.perms["sub"],this.user,this.port] - url = "/"+url.join("/") - method = "put" - $this = this - this.qreq(method,url,params,true,function(err,data) { - if(cb) { cb.apply(this,[err,{status: data.status, data: data.data}])} - if(!err && $this.puls == 0) { - params.type = "pol" - $this.poll(params) - } + this.qreq("put",url,params,true,function(err,res) { + if(nicecb) { nicecb.apply(this,[err,{status: res.status, data: res.data}])} + // XX give raw data + // + if(!err && !$this.puls) $this.poll(params) }) } window.urb.unsubscribe = function(params,cb) { - if(!params) - throw new Error("You must supply params to urb.unsubscribe.") - if(!params.appl) { - if(!urb.appl) - throw new Error("You must specify an appl for urb.unsubscribe.") - params.appl = urb.appl - } - if(!params.path) - throw new Error("You must specify a path for urb.unsubscribe.") + if(!params) throw new Error("You must supply params to urb.unsubscribe.") + params.ship = params.ship ? params.ship : this.ship + params.appl = params.appl ? params.appl : this.appl + params.wire = params.wire ? params.wire : params.path - method = "put" - type = "uns" - url = [this.perms[type],this.user,this.port] - url = "/"+url.join("/") - - var $this = this - this.req(method,url,params,true,function(err,data) { - cb(err,data) + if(!params.path) throw new Error("You must specify a path for urb.unsubscribe.") + if(!params.appl) throw new Error("You must specify an appl for urb.unsubscribe.") + if(!cb) throw new Error("You must supply a callback to urb.unsubscribe.") + + url = "/~/is/"+this.gsig(params)+".json" + method = "delete" + this.req("delete",url,params,true,function(err,res) { + cb(err,res) }) } window.urb.util = { + isURL: function(s) { + r = new RegExp('^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$', 'i'); + return s.length < 2083 && r.test(s); + }, + numDot: function(n) { + _n = String(n) + fun = function(s){ + if(s.length <= 3) + return s + return fun(s.slice(0,-3))+"."+s.slice(-3) + } + return fun((_n)) + }, toDate: function (dat){ var mils = Math.floor((0x10000 * dat.getUTCMilliseconds()) / 1000).toString(16) function pad(num, str){ diff --git a/main/mar/console-action/door.hook b/main/mar/console-action/door.hook new file mode 100644 index 0000000000..c7679583d9 --- /dev/null +++ b/main/mar/console-action/door.hook @@ -0,0 +1,13 @@ +:: +:::: /hook/door/console-action/mar + :: +/? 314 +/- *console +!: +|_ cod=console-action +:: +++ grab :: convert from + |% + ++ noun console-action :: clam from %noun + -- +-- diff --git a/main/mar/console-effect/door.hook b/main/mar/console-effect/door.hook new file mode 100644 index 0000000000..c4ab49486c --- /dev/null +++ b/main/mar/console-effect/door.hook @@ -0,0 +1,14 @@ +:: +:::: /hook/door/console-effect/mar + :: +/? 310 +/- *console +!: +|_ cod=console-effect +:: +++ grab :: convert from + |% + ++ noun console-effect :: clam from %noun + -- +-- + diff --git a/main/mar/dill-belt/door.hook b/main/mar/dill-belt/door.hook new file mode 100644 index 0000000000..b21f81b8bc --- /dev/null +++ b/main/mar/dill-belt/door.hook @@ -0,0 +1,58 @@ +:: +:::: /hook/door/dill-belt/mar + :: +/? 314 +/- kyev,*sole +!: +:::: + :: +|_ dill-belt +:: +++ grab :: convert from + |% + ++ json + =< (cork . kyev) + |= jon=^json ^- ^kyev + %- need + %. jon => jo %- ot + :~ mod/(cu ^sa (ar (su (perk ~[%ctrl %shift %alt %meta])))) + :- %key + %+ cu |*(a=$%([%str @t] [%act @]) ?+(-.a a %str +.a)) + =- (of str/so act/(su (perk -)) ~) + :~ %ctrl %shift %alt %meta %entr %esc %caps %uncap + %pgup %pgdn %home %end %baxp %del %ins + %up %down %left %right + == == + ++ kyev + |= kev=^kyev ^- dill-belt + ~| dill-belt-incomplete/kev + ?: ?=([%act ?(%ctrl %shift %alt %meta)] q.kev) + [%txt ~] :: ignore + =+ mod=(~(del in p.kev) %shift) + ?^ mod + ?^ q.kev !! :: only accept strings + =. q.kev + ?. (~(has in p.kev) %ctrl) + q.kev + (con 96 q.kev) :: ctrl key decoding + =+ cha=(tuba (trip q.kev)) + ?> ?=([@ ~] cha) :: of a single character + ?+ mod !! :: modified by one buckykey + [%ctrl ~ ~] [%ctl i.cha] + [%alt ~ ~] [%met i.cha] + == + ?@ q.kev + [%txt (tuba (trip q.kev))] + ?+ +.q.kev !! + %del [%del ~] + %baxp [%bac ~] + %entr [%ret ~] + %up [%aro %u] + %down [%aro %d] + %left [%aro %l] + %right [%aro %r] + == :: %yow, %rez? + :: + ++ noun dill-belt :: clam from %noun + -- +-- diff --git a/main/mar/dill-blit/door.hook b/main/mar/dill-blit/door.hook new file mode 100644 index 0000000000..eecb0e505c --- /dev/null +++ b/main/mar/dill-blit/door.hook @@ -0,0 +1,23 @@ +:: +:::: /hook/door/dill-blit/mar + :: +/? 314 +/- *sole +|_ dib=dill-blit +:: +++ grab :: convert from + |% + ++ noun dill-blit :: clam from %noun + -- +++ grow + |% + ++ json + ^- ^json + ?+ -.dib ~|(unsupported-blit/-.dib !!) + %mor [%a (turn p.dib |=(a=dill-blit json(dib a)))] + %hop (joba %hop (jone p.dib)) + ?(%pro %out) (joba -.dib (jape (tufa p.dib))) + ?(%bel %clr) (joba %act %s -.dib) + == + -- +-- diff --git a/main/mar/hymn/door.hook b/main/mar/hymn/door.hook index 43153b94f4..4a7c18f657 100644 --- a/main/mar/hymn/door.hook +++ b/main/mar/hymn/door.hook @@ -9,6 +9,7 @@ ++ html (crip (poxo own)) :: convert to %html ++ mime [/text/html (taco html)] :: convert to %mime -- +++ garb [%urb ~] ++ grab |% :: convert from ++ noun manx :: clam from %noun -- -- diff --git a/main/mar/json/door.hook b/main/mar/json/door.hook index 6e157f9979..6e05be4c6a 100644 --- a/main/mar/json/door.hook +++ b/main/mar/json/door.hook @@ -9,13 +9,15 @@ :: ++ grow :: convert to |% - ++ mime :: convert to %mime - [/text/json (taco (crip (pojo jon)))] + ++ mime [/text/json (taco txt)] :: convert to %mime + ++ txt (crip (pojo jon)) -- ++ grab |% :: convert from ++ mime |=([p=mite q=octs] *json) ::(fall (rush (,@t q.q) apex:poja) *json)) ++ noun json :: clam from %noun + ++ numb jone + ++ time jode -- ++ grad |% diff --git a/main/mar/radio-command/door.hook b/main/mar/radio-command/door.hook deleted file mode 100644 index b9101b8219..0000000000 --- a/main/mar/radio-command/door.hook +++ /dev/null @@ -1,74 +0,0 @@ -:: -:::: /hook/door/radio-command/mar - :: -/? 314 -/- *radio -!: -|_ cod=command -:: -++ grab :: convert from - |% - ++ noun command :: clam from %noun - ++ json - => [jo ..command] - |= a=json ^- command - =- (need ((of -) a)) - =< :~ publish/(ar thot) - review/(ar thot) - design/(ot party/so config/(mu conf) ~) - ping/auri - == - |% - ++ as :: array as set - :: |*(a=fist (cu sa (ar a))) :: XX types - |* a=fist - %- cu :_ (ar a) - ~(gas in *(set ,_(need *a))) - :: - ++ lake |*(a=_,* $+(json (unit a))) - ++ peach - |* a=_[rule rule] - |= tub=nail - ^- (like (each ,_(wonk (-.a)) ,_(wonk (+.a)))) - %. tub - ;~(pose (stag %& -.a) (stag %| +.a)) - :: - ++ thot - ^- $+(json (unit thought)) - %- ot :~ - serial/(ci (slat %uv) so) - audience/audi - statement/stam - == - :: - ++ audi (op stati (ci (soft delivery) so)) :: audience - ++ auri (op stati (ci (soft presence) so)) - :: - ++ stati - ^- $+(nail (like station)) - %+ peach - ;~((glue fas) ;~(pfix sig fed:ag) urs:ab) - %+ sear (soft partner) - ;~((glue fas) sym urs:ab) :: XX [a-z0-9_]{1,15} - :: - ++ stam - ^- $+(json (unit statement)) - =- (ot now/di speech/(of -) ~) - :~ own/so - say/so - exp/(cu |=(a=cord [a ~]) so) - inv/(ot ship/(su fed:ag) party/(su urs:ab) ~) - == - :: - :: - ++ conf - ^- $+(json (unit config)) - %- ot :~ - sources/(as (su stati)) - :- %cordon - %+ cu |*(a=^ ?~(-.a a a)) :: XX do type stuff - (ot white/bu list/(as (su fed:ag)) ~) - == - -- --- -- - diff --git a/main/mar/radio-report/door.hook b/main/mar/radio-report/door.hook deleted file mode 100644 index ca125c5500..0000000000 --- a/main/mar/radio-report/door.hook +++ /dev/null @@ -1,92 +0,0 @@ -:: -:::: /hook/door/radio-report/mar - :: -/? 314 -/- *radio -!: -|_ rep=report -:: -++ grab :: convert from - |% - ++ noun report :: clam from %noun - -- -++ grow - |% - ++ mime [/text/json (taco (crip (pojo json)))] - ++ json - => + - |^ %+ joba -.rep - ?- -.rep - %config ~! rep (conf +.rep) - %house [%a (turn (~(tap by +.rep)) joce)] - %grams (jobe num/(jone p.rep) tele/[%a (turn q.rep gram)] ~) - ::%group (grop +.rep) - %group (jobe local/(grop p.rep) global/%.(q.rep (jome stan grop)) ~) - == - ++ joce |=(a=span [%s a]) - ++ jope |=(a=ship (jape +:)) ::[%s (crip +:(scow %p a))]) - ++ joke |=(a=tank [%s (role (turn (wash 0^80 a) crip))]) - ++ jode |=(a=time (jone (div (mul (sub a ~1970.1.1) 1.000) ~s1))) -:: ++ jase -:: |* a=,json -:: |= b=(set ,_+<.a) ^- json -:: ~! b -:: [%a (turn (~(tap in b)) a)] - :: - ++ jome :: stringify keys - |* [a=_cord b=_json] - |= c=(map ,_+<.a ,_+<.b) - (jobe (turn (~(tap by c)) (both a b))) - :: - ++ both :: cons two gates - |* [a=_,* b=_,*] - |=(c=_[+<.a +<.b] [(a -.c) (b +.c)]) - :: - :: - ++ grop (jome phon stas) :: (map ship status) - ++ phon |=(a=ship (scot %p a)) - ++ stas |=(status (jobe presence/(joce p) human/(huma q) ~)) - ++ gram |=(telegram (jobe ship/(jope p) thought/(thot q) ~)) - ++ thot - |= thought - (jobe serial/(jape

) audience/(audi q) statement/(stam r) ~) - :: - ++ audi (jome stan joce) - ++ stan - |= a=station ^- cord - %- crip - ?~ -.a "{}/{(trip q.p.a)}" - ?- -.p.a - %twitter "{(trip -.p.a)}/{(trip p.p.a)}" - == - :: - ++ stam |=(statement (jobe time/(jode p) speech/(spec q) ~)) - ++ spec - |= a=speech - %+ joba -.a - ?- -.a - ?(%own %say) [%s p.a] - %exp (jobe code/[%s p.a] done/?~(q.a ~ (joke u.q.a)) ~) - %inv (jobe ship/(jope p.a) party/[%s q.a] ~) - == - :: - ++ huma - |= human - %^ jobe - hand/?~(hand ~ [%s u.hand]) - :- %true - ?~ true ~ - =+ u.true - (jobe first/[%s p] middle/?~(q ~ [%s u.q]) last/[%s r] ~) - ~ - :: - ++ conf - |= config - %- jobe :~ - sources/[%a (turn (~(tap in sources)) |=(a=station [%s (stan a)]))] - =- cordon/(jobe white/[%b -.cordon] list/[%a -] ~) - (turn (~(tap in p.cordon)) jope) :: XX jase - == - -- --- -- - diff --git a/main/mar/snip/door.hook b/main/mar/snip/door.hook index 38bf3421b8..50f2ad1a61 100644 --- a/main/mar/snip/door.hook +++ b/main/mar/snip/door.hook @@ -50,10 +50,14 @@ :: ++ grow :: convert to |% - ++ psal own - ++ hymn ;html:(head:title:"snip" body:"+{psal}") :: convert to %hymn - ++ html (crip (poxo hymn)) :: convert to %html - ++ mime [/text/html (taco html)] :: convert to %mime + ++ mime + =< mime + |% + ++ psal own + ++ hymn ;html:(head:title:"snip" body:"+{psal}") :: convert to %hymn + ++ html (crip (poxo hymn)) :: convert to %html + ++ mime [/text/html (taco html)] :: convert to %mime + -- -- ++ garb [%react-snip ~] ++ grab |% :: convert from diff --git a/main/mar/sole-action/door.hook b/main/mar/sole-action/door.hook new file mode 100644 index 0000000000..286d33ffb1 --- /dev/null +++ b/main/mar/sole-action/door.hook @@ -0,0 +1,38 @@ +:: +:::: /hook/door/sole-action/mar + :: +/? 314 +/- *sole +!: +:::: + :: +|_ sole-action +:: +++ grab :: convert from + |% + ++ json + |= jon=^json ^- sole-action + %- need %. jon + => [jo ..sole-action] + |^ =- ~! (-) - + (fo %ret (of det/change ~)) + ++ fo + |* [a=term b=fist] + |=(c=json ?.(=([%s a] c) (b c) (some [a ~]))) + :: + ++ ra + |* [a=[p=term q=fist] b=fist] + |= c=json %. c + ?.(=(%a -.c) b (pe p.a (ar q.a))) + :: + ++ change (ot ler/(at ni ni ~) ted/(cu |*(a=* [0v0 a]) edit) ~) + ++ char (cu turf so) + ++ edit + %+ fo %nop + %+ ra mor/|=(json (edit +<)) + (of del/ni set/(cu tuba sa) ins/(ot at/ni new/char ~) ~) + -- + :: + ++ noun sole-action :: clam from %noun + -- +-- diff --git a/main/mar/sole-effect/door.hook b/main/mar/sole-effect/door.hook new file mode 100644 index 0000000000..36c7068369 --- /dev/null +++ b/main/mar/sole-effect/door.hook @@ -0,0 +1,55 @@ +:: +:::: /hook/door/sole-effect/mar + :: +/? 314 +/- *sole +!: +:::: + :: +|% +++ mar-sole-change :: XX dependency + |_ cha=sole-change + ++ grow + |% ++ json + ^- ^json + =+ cha + =< (jobe ted/(. ted) ler/a/~[(jone own.ler) (jone his.ler)] ~) + |= ted=sole-edit + ?- -.ted + %nop [%s 'nop'] + %mor [%a (turn p.ted ..$)] + %del (joba %del (jone p.ted)) + %set (joba %set (jape (tufa p.ted))) + %ins (joba %ins (jobe at/(jone p.ted) new/s/(tuft q.ted) ~)) + == + -- + -- +++ wush + |= [wid=@u tan=tang] + ^- tape + =+ rolt=|=(a=wall `tape`?~(a ~ :(weld i.a "\0a" $(a t.a)))) + (rolt (turn tan |=(a=tank (rolt (wash 0^wid a))))) +:: +-- +!: +|_ sef=sole-effect +:: +++ grab :: convert from + |% + ++ noun sole-effect :: clam from %noun + -- +++ grow + |% + ++ json + ^- ^json + ?+ -.sef ~|(unsupported-effect/-.sef !!) + %mor [%a (turn p.sef |=(a=sole-effect json(sef a)))] + %err (joba %hop (jone p.sef)) + %txt (joba %txt (jape p.sef)) + %tan (joba %tan (jape (wush 160 p.sef))) + %det json:~(grow mar-sole-change +.sef) + %pro (jobe vis/b/vis.sef tag/s/tag.sef cad/(jape cad.sef) ~) + ?(%bel %clr %nex) (joba %act %s -.sef) + == + -- +-- diff --git a/main/mar/rodeo-command/door.hook b/main/mar/talk-command/door.hook similarity index 96% rename from main/mar/rodeo-command/door.hook rename to main/mar/talk-command/door.hook index 87ee79c0da..93286437c6 100644 --- a/main/mar/rodeo-command/door.hook +++ b/main/mar/talk-command/door.hook @@ -1,8 +1,8 @@ :: -:::: /hook/door/rodeo-command/mar +:::: /hook/door/talk-command/mar :: /? 314 -/- *rodeo +/- *talk !: |_ cod=command :: @@ -72,6 +72,7 @@ ^- $+(json (unit statement)) =- (ot date/di bouquet/(as (ar so)) speech/(of -) ~) :~ lin/(ot say/bo txt/so ~) + url/(su auri:urlp) :: exp/(cu |=(a=cord [a ~]) so) :: inv/(ot ship/(su fed:ag) party/(su urs:ab) ~) == diff --git a/main/mar/rodeo-report/door.hook b/main/mar/talk-report/door.hook similarity index 85% rename from main/mar/rodeo-report/door.hook rename to main/mar/talk-report/door.hook index e6f06eace0..bc35013e52 100644 --- a/main/mar/rodeo-report/door.hook +++ b/main/mar/talk-report/door.hook @@ -1,8 +1,8 @@ :: -:::: /hook/door/rodeo-report/mar +:::: /hook/door/talk-report/mar :: /? 314 -/- *rodeo +/- *talk !: |_ rep=report :: @@ -17,7 +17,7 @@ => + |^ %+ joba -.rep ?- -.rep - %config ~! rep (conf +.rep) + %cabal (cabl +.rep) %house a/(turn (~(tap by +.rep)) jose) %grams (jobe num/(jone p.rep) tele/[%a (turn q.rep gram)] ~) %group (jobe local/(grop p.rep) global/%.(q.rep (jome parn grop)) ~) @@ -67,12 +67,18 @@ :: ++ parn |= a=partner ^- cord - %- crip - ?~ -.a "{}/{(trip q.p.a)}" - ?- -.p.a - %twitter "{(trip -.p.a)}/{(trip p.p.a)}" + ?- -.a + %& (stat p.a) + %| %- crip + ?- -.p.a + %twitter "{(trip -.p.a)}/{(trip p.p.a)}" + == == :: + ++ stat + |= a=station ^- cord + (crip "{}/{(trip q.a)}") + :: ++ stam |= statement (jobe date/(jode p) bouquet/(bouq q) speech/(spec r) ~) @@ -82,6 +88,7 @@ %+ joba -.a ?+ -.a !! %lin (jobe say/[%b p.a] txt/[%s q.a] ~) + %url (jobe url/[%s (crip (earn p.a))] ~) %exp (jobe code/[%s p.a] ~) :: %inv (jobe ship/(jope p.a) party/[%s q.a] ~) == @@ -96,6 +103,13 @@ (jobe first/[%s p] middle/?~(q ~ [%s u.q]) last/[%s r] ~) ~ :: + ++ cabl + |= cabal + %- jobe :~ + loc/(conf loc) + ham/((jome stat conf) ham) + == + :: ++ conf |= config %- jobe :~ diff --git a/main/mar/tang/door.hook b/main/mar/tang/door.hook index df4cd69b2e..157ea2c0b8 100644 --- a/main/mar/tang/door.hook +++ b/main/mar/tang/door.hook @@ -1,9 +1,17 @@ :: -:::: /hoon/core/zing/mar +:::: /hoon/core/psal/mar :: /? 314 +!: |_ tan=(list tank) :: +++ grow + |% + ++ psal + =- ;pre:code:"{(trip (role (turn - crip)))}" :: XX + ^- wall %- zing ^- (list wall) + (turn tan |=(a=tank (wash 0^160 a))) + -- ++ grab :: convert from |% ++ noun (list tank) :: clam from %noun diff --git a/main/mar/urb/door.hook b/main/mar/urb/door.hook new file mode 100644 index 0000000000..cce99ab6c4 --- /dev/null +++ b/main/mar/urb/door.hook @@ -0,0 +1,31 @@ +:: +:::: /hook/door/urb/mar + :: +/? 314 +:: /= dep /$ |=([^ but=path] `@uvH`?>(?=([%dep @ ~] but) (slav %uv i.t.but))) +!: +|_ own=manx +:: +++ grow :: convert to + |% + ++ html (crip (poxo own)) :: convert to %html + ++ mime [/text/html (taco html)] :: convert to %mime + -- +++ grab + |% :: convert from + ++ noun manx :: clam from %noun + ++ hymn :: inject into %hymn + |= old=manx old :: moved to %eyre + :: ~| hymn//mal-formed + :: :: ~| old + :: ?> ?=([[%html ~] [[%head ~] *] [[%body ~] ^] ~] old) :: XX static + :: :: =+ bek=(sa (turn (turn dep) |=(a=beam (tope a(s ~))))) + :: %_ old + :: c.i.c + :: :- ;meta(charset "utf-8", urb_injected ""); + :: ?~ dep c.i.c.old + :: :- ;script@"/~/on/{}.js"; + :: c.i.c.old + :: == + -- +-- diff --git a/main/pub/doc/arvo/clay/commentary.md b/main/pub/doc/arvo/clay/commentary.md index d0edfea2dd..daf8bc7dfb 100644 --- a/main/pub/doc/arvo/clay/commentary.md +++ b/main/pub/doc/arvo/clay/commentary.md @@ -1989,7 +1989,7 @@ try to get the aeon referred to by the starting case. If it doesn't exist yet, then we can't do anything interesting with this subscription, so we move on to the next one. -Otherwise, we try to get the aeon referrred to by the ending case. If it +Otherwise, we try to get the aeon referred to by the ending case. If it doesn't exist yet, then we produce all the information we can. We call `++lobes-at-path` at the given aeon and path to see if the requested path has actually changed. If it hasn't, then we don't produce anything; diff --git a/main/pub/doc/arvo/eyre.md b/main/pub/doc/arvo/eyre.md index 4b060e4895..2a1b9d9b39 100644 --- a/main/pub/doc/arvo/eyre.md +++ b/main/pub/doc/arvo/eyre.md @@ -56,3 +56,8 @@ Unsubscribe from stream `[stream]` on a foreign Urbit. urb.js ====== + + +


+ + diff --git a/main/pub/doc/arvo/eyre/commentary.md b/main/pub/doc/arvo/eyre/commentary.md index 5be829426c..3997127ac5 100644 --- a/main/pub/doc/arvo/eyre/commentary.md +++ b/main/pub/doc/arvo/eyre/commentary.md @@ -1,5 +1,273 @@ Eyre: Reference =============== +## State + +Stored + +- `++bolo` +- `++cyst` +- `++stem` + +Runtime + +- `perk` + + `perk-auth` +- `pest` +- `even` + +## Cores + +- `++handle` + + `++parse` + - `++as...` +- `++ya` +- `++ix` + Eyre: Commentary ================ + +Let us follow the loading of a simple cli app, as it bounces from +browser to server to browser and back. + +## Initial request[#init] + +An http request for `http://sampel-sipnym.urbit.org/cli` will be [redirected](dns) +to the `%eyre` on ~sampel-sipnym, and come in as a `%this` kiss. + +From arvo, requests enter `++call`, which after some type reification are passed +along to `++apex:ye`. In the case of a `%this` kiss, its components are +parsed(see `++zest:epur`, `++eat-headers`) and handed off to `++handle`, wrapped +in `++emule` to produce a `++fail` page in case of error. `++apex:handle` will +`++process` the request to a `pest` or a `++done` core, and in the former case +`++resolve` the pest into an outgoing card. + +XX it also seems to affect the current ship, test that serving ship name is consistently correct + +The pest is produced by `++process`, which will first further `++parse` the +request, and if this does not make the response immediately obvious, +`++process-parsed` the resulting `perk`. + +`++parse` produces the `perk`, by attempting to interpret the `pork`(url path) +[`++as-magic-filename`](#mage), `++as-beam`, and `++as-aux-request`. In this +case, `/cli` is parsed by the second case as a `%beam` query to `/=cli=`: a path +which starts with a valid ship name is expected to be a full clay(well, ford) +path, and one starting with a term implies the current serving ship and a case +of `0`, the current revision. + +XX spur: when the desks are merged, `/cli` shall point to `/=main=/pub/cli` + +The parsed `perk` generates a `%f %boil` note, `mark`ed as its extension(here +defaulting to `%urb`) and `wire`d with `~` to return unaltered to the client. It +goes on to `++resolve` by being passed to `++ford-get-beam`, which translates +the perk it into a `%boil` `++ford-req`, adding an `++fcgi` path-segment +containing query string and `++fcgi-cred:for-client` auth information. + +`%ford`s translation of `/=cli=/hymn/hook` to a self-refreshing `%urb` html page +[deserves its own commentary](../ford/commentary), but we resume in `%eyre` +when the `%made` sign arrives in `++take`, and soon after `++axon:ye`. There the +`wire`, or rather the `whir` it has been verified to be, determines that the +response should be served immediately. However, as the mark is not `%mime`, +another trip to `%ford` is required to encode it, on the same wire; afterwards, +the value of the `%mime` cage is verified to be of the correct type, and finally +delivered back up the requesting duct as a succesful `%thou` HTTP response. + +XX `%cast %mime` used to be in ford-get-beam, is there a reason it was removed? + +## Back into the breach, or: auxilary requests + +Now, it was mentioned that this result is self-refreshing: the `%urb` +translation door injects a `;script@"/~/on/{deps}.js"` into every page, `deps` +is a ford-readable hash of the set of resources that page construction depended +on. + +This triggers another `%this` request. Its handling is identical to that of +`/cli` up until `++parse`, where it is seen not `++as-beam` but +`++as-aux-request`(auxillary requests starting with `/~/` or `/~~/`). +`/on/[hash]` is a long-`%poll`, which `++process-parsed`, for a `.js` mark, +answers with a direct `%js`. Its contents are the static `++poll:js`, which +initiates the long-polling loop, run against an injected `urb.js` of +`{poll:[hash]}`. + +A `%js` `pest` is `resolve`d as a `text/javascript` success `%this`. + +When `poll.js` is recieved by the client, it opens an `XMLHttpRequest` for +`/~/on/{window.urb.poll}.json`, bringing us back to `%poll:process`. + +In the case of a non-`%js` `/~/on/`, `%poll:process-parsed` turns into a +`++new-dependency`, which stores the listening duct, and `pass-note`s a `%wasp` +with the deps-hash back to `%ford` whence it came. While this occured, the page +has loaded. + +Some indeterminate amount of time afterwards, with dropped `/~/on/{...}.json`s +being retried upon expiring and also being stored, a `%news` sign arrives in +`++axon`, and the hash in question is retrieved from the wire, and the listening +long-polls retrieved by the hash. Each receives a 205 "Reload parent view" HTTP +response, which `poll.js` dutifully executes, and a fixed typo of markdown is +rendered. + +## Authentication. + +Now, while this accurately reflects the presentation of e.g. a markdown file, +`/cli` is an application front-end, and one that permits only owner access. Its +second script is `@"/~~/~/at/main/lib/urb.js"`, semantically equivalent to +`/~/as/own/~/at/main/lib/urb.js`, and handled as follows. + +In `++as-aux-request`, `%as %own` becomes `%auth %get our` perk, which +`++process` passes to `++process-parsed` passes to `++process-auth`. There, a +`yac` "ya" core is built `++for-client`: a `++cookie-prefix`, which is just the +serving ship name, is used to get a `++session-from-cookies`, here nil as the +client has no cookie set. In lieu of a cookie, a `++new-ya` is constructed, with +a random token `hole` and a `++new-cyst` which fills out `cyst` session state +from request data. + +Returning to `++process-auth`, `%get` checks if the yac is authenticated with +the requested credentials(`anon` requests are always granted), which for the +fresh new `cyst` is not the case (more on success [later](#auth-ok)). Unless +authentiacting as a [foreign ship](#xeno), the only thing left is to +`++show-login-page`, which detects that the requested resource is not `%html`, +and produces a `%red` pest. For `%js`, `%red`irections `++resolve` to +`++auth-redir:js`, a line of javascript which prepends `/~~` to the url path. + +The owner-authenticated main page request similarly ends in `++show-login-page`, +which for the empty session is an `[%htme ++login-page:xml]`, `resolve`d to +`++give-html` with a 401 "unathorized". + +The login page shows a simple prompt, and requests `/~/at/auth.js` to handle the +submission. And so we are, once again, attempting to divine if what we're doing +makes sense `++as-aux-request`. + +To understand `/~/at`, there will first be a brief diversion to `~/auth.json`. +`auth.json`, perk `[%auth %json]`, in `++process-auth` serves `++stat-json:ya`, +containing such information as the serving ship, which identities are associated +with this session, and `oryx`, a CSRF token. An oryx must be present on all +stateful requests, in this case executing a log in. It also saves the new/old +session using `abet`. + +XX explain `ixor` here and not [later](#ixor)? + +`/~/at` is an alternate interface, which injects `auth.json` data into the +requested file. `/~/at/auth.js`, then, is a request for the built-in `auth:js` +(parsed to and processed from an `[%auth %js ~]` perk), with session data added +as `window.urb`. And indeed, ``[`%js /~/at/auth]`` is parsed to +``[%auth at [`%js /auth]``, which in `++process-auth` is re-`process`ed to +`[%js ++auth:js]`, which is `++resolve`d after an `++add-json` of +the relevant data. The yac cookies are also passed to `resolve`, which +`++add-cookies` injects into the `httr`. + +It is at this point that there is first occasion for user input, namely the password. + +The `auth:js` script sends a `PUT` request, also to `/~/auth.json`. In `parse`, +the first nontrivial `++check-oryx` occurs, `++grab-body` the request oryx and +ensuring it is recorded for the session. The request parsed with `++need-body` +to a `[%auth %try {password}]` perk. `%get:process-auth` checks it against +`++load-secret`, upon success updates the session with `++logon:ya`, and +serves a fresh `auth.json` which reflects the changed `user`. Upon recieving +this, the page is refreshed to retry the original request. + +## Post-authentication: app communication. [#auth-ok] + +Upon refresh, `/~~/cli` brings us for the third time to `%get:process-auth`, but +this time the cookie is set, and the `yac` fetched contains the serving ship as +authenticated. The `++handle` sample is updated to reflect the requesting ship, +and the `process` continues for the rest of the pork, once again serving the +ford page. + +The `/~/on/[deps].json` poll starts anew, and `/~~/~/at/main/lib/urb.js` we now +know to serve the window.urb necessary to make requests, and the `urb.js` +standard library which extends it with a number of wrappers to them and other +useful functions. + +--- + +One of those functions is `urb.bind`, which is used to subscribe to application +data. Userspace javascript sets `urb.appl` to `/tic`, and binds `lines` to a +`;pre;` text display, using a callback. + +This triggers a `PUT` to `/~/is/{ixor}/cli/lines.json`, where `ixor` is a hash +of `oryx` that identifies the connection. `++as-aux-request`, an `%is` is a +`%subs` subscription update update, which for `%put` forwards to +`++add-subs:ix`, the ix core fetched `++for-view` by hashing the request +`++oryx-to-ixor`. + +[#ixor] A view has all the state associated with a client that must be +remembered between events. In this case, this is what app/path the request duct +is associated with; but mainly, `++add-subs:ix` will `pass-note` to `%gall` so +it `%show`s the data on the path, current and future. + +This will immediately(assuming the ship is local) result in a `%nice` by the +`/cli` app, returning `{ok:true}` `++nice-json` to `urb.bind`'s second callback +as `{ok:true}`. The initial `%rush` results also arrive, and in `++axon` are +converted to json using `++back`(ford `%cast` wrapper), and when `%made` get +passed to `++get-rush:ix`. There the source application/path are decoded by +duct, and then the full event goes to `++get-even`; `++add-even` inserts it to +the queue, and as there is no long poll it simply stays there. + +Upon receipt, the client realizes the long-poll isn't actually running, so that +is started using `urb.poll`. At `/~/of/{ixor}`, perk +`[%view ixor ~ {sequence-number}]`, it is `process`ed by `++poll:ix` (the cyst +is retrieved by `++ire-ix` form global state, using the perk `ixor`): the +sequence number is in the past, so the previously recieved `%rush` is +`++give-even`. After deleting the previous message in the queue and invoking +`++pass-took` to signal `%gall` of this occurrence, the data is annotated with +the source app+path `++subs-to-json`, and returned to the polling duct. + +On the client, the user callback receives the `/cli` history, and displays it on +the page. The `/~/of` long poll is continued, this time reaching `++poll:ix` +with the "pending" sequence number, and being stored in the `cyst` for its troubles. + +--- + +Its next update proceeds idenitcally, but first it must be triggered, which +happens when the user enters "(add 2 2)\n", firing an `urb.send` from the event +handler. This sends a `POST` request to `/~/to/cli/json.json`, perk `%mess`, +`++process`ed to a `%g %mess`. Were the mark not `%json`, a `%ford` conversion +would occur first, and `%made:axon` would send the gall message proper. In +either case, eventually a `%mean` or `%nice` arrives, is encoded as json, and +sent to the client callback. + +## A path not taken: magic filenames [#mage] + +The `/robots.txt` and `/favicon.(ico|png)` files are static, and served +immediately when caught by a `++parse`. + +XX index.html? + +## A path not taken: foreign auth [#xeno] + +While this example details a login `/~/as/own`, it is possible to be +authenticated as any ship on the network. A request for such seen in +`%get:process-auth` is passed to `++foreign-auth:ya`, which sends an +`%ames /lon` message to the ship in question. The foreign ship stores the +inquiry, calculates(the local) `++our-host` and responds with a `/hat`, +containing the redirection host, which is stored by `++foreign-hat`; it is later +used to send the client to a `/~/am` url on the foreign client, which acts as a +normal login page but later sends the client back. XX expand, basically the +status quo is you're logged in and `/~/as/foo` is ignored, just setting your +`urb.user` XX + + +## A path not taken: deauthentication + +`/~/away`, perk `[%away ~]`, produces a static `++logout-page:xml`, which also +uses `/~/at/auth.js`, to send a `DELETE /~/auth.json`, perk `[%auth %del]`. This +executes `++logoff:ya` for the cookie session, resolving to `++abut` to wipe it +from memory. + +## A path not taken: unsubscription + +`DELETE /~/is/app/path/within` works much like `PUT /~/is/app/path/within`, +`++del-subs:ix` acting as reverse of `++add-subs` by deleting the duct binding +and sending `%g %nuke`. + + +XX unmentioned arms: abet, add-poll, adit, ames-gram, anon, ares-to-json, bolo, cyst, doze, even, ford-kill, get-mean, gift, give-json, give-thou, gram, hapt, hasp, host-to-ship, ix, ixor, js, kiss, load, mean-json, move, note, pass-note, perk, perk-auth, pest, poke-test, print-subs, render-tang, resp, root-beak, scry, ses-authed, ses-ya, sign, silk, sine, stay, stem, teba, titl, to-oryx, urb, wait-era, wake, whir, wush, xml, ya, ye + +## Appendix A: DNS [#dns] + +The `*.urbit.org` domain can be used to access destroyers and cruisers. In the +common case oh hosted ships, this is done by dynamic DNS directly to the hosting +instance. We do not speak of the uncommon case. When ports are blocked and +infrastructure crumbles around you, only imported martian networking can be +trusted: the `%get` and `%got` [gram]()s are used to proxy [`%this` requests]() and +[`%thou` responses]() respectively. diff --git a/main/pub/doc/guide/a-ford.md b/main/pub/doc/guide/a-ford.md index 94af2bbfd7..e91ccf8309 100644 --- a/main/pub/doc/guide/a-ford.md +++ b/main/pub/doc/guide/a-ford.md @@ -47,12 +47,12 @@ machine directly. #### Try it - http://ship-name.urbit.org/gen/main/pub/fab/guide/exercise/1/ + http://ship-name.urbit.org/main/pub/fab/guide/exercise/1/ #### What did you just do? The code you just wrote is urbit's native programming langauge, hoon. -Generating HTML with hoon is similar to writing [jade](link) or other +Generating HTML with hoon is similar to writing [jade]() or other similar HTML shorthand. In hoon, this shorthand is called [`++sail`]() and it's a native part of the hoon language. @@ -62,7 +62,7 @@ our `;h1:` above, and are closed implicitly with a new line. Nodes with no content are closed with another `;`, such as `;br;`. You can find more information about `++sail` in our [rune library -documentation](link). +documentation]().
@@ -90,7 +90,7 @@ documentation](link). #### Try it - http://ship-name.urbit.org/gen/main/pub/fab/guide/exercise/2/ + http://ship-name.urbit.org/main/pub/fab/guide/exercise/2/ ### What's going on there? @@ -98,7 +98,7 @@ Clearly, the code `(add 2 2)` is generating `4`, and it's not too hard to see why. `add` is one of the library functions that are a part of `hoon.hoon`. Try replacing `(add 2 2)` with `(sub 2 (add 2 2))`. You can find documentation for the full hoon library in the [library -reference](link). +reference](). Since the product of `(add 2 2)` is a number, we need a few extra things to have it print properly. In `++sail` we use `{` and `}` to do string @@ -140,7 +140,7 @@ we need to explicitly convert our types. #### Try it - http://ship-name.urbit.org/gen/main/pub/fab/guide/exercise/3/ + http://ship-name.urbit.org/main/pub/fab/guide/exercise/3/ #### How does that work? @@ -148,9 +148,9 @@ The first thing you should notice in this example is the `=+` at the top of our file. `=+` is a rune. hoon is a programming with no reserved words. We don't use `if` `this` or `function` at all. Instead, runes have their own pronunciation. `=+` is pronounced 'tislus'. You can find -the table of pronunciation [here](link). In hoon you construct your +the table of pronunciation [here](). In hoon you construct your programs using runes, which are two character ascii pairs. You can see -the whole set of runes in the [rune index](link). +the whole set of runes in the [rune index](). `=+` pushes an expression on to our subject. The subject in hoon is similar to `this` in other languages. hoon being a functional language @@ -168,7 +168,7 @@ Looking at the rendered page it's clear that we're assigning `a` to be we're doing this in two different ways. Runes in hoon can have irregular forms, and `^=` is one of them. The first two lines of our example are doing the same thing, where `a=2` is simply the irregular form of -`^= a 2`. You can see the full list of irregular forms [here](link). +`^= a 2`. You can see the full list of irregular forms [here](). Looking at the simple computation on the page, you can try changing the values of `a` and `b` to any integers to produce similar results. @@ -212,7 +212,7 @@ values of `a` and `b` to any integers to produce similar results. (and be sure to put two spaces between `++` and arm names) - http://ship-name.urbit.org/gen/main/pub/fab/guide/exercise/4/ + http://ship-name.urbit.org/main/pub/fab/guide/exercise/4/ ### What's happening? @@ -229,7 +229,7 @@ core. Gates only have one arm and are quite similar to a function in other languages. We use `|=` to construct our gate. Runes in hoon are generally categorized by their first character. `|` indicates a rune having to do with cores. You can find all of the `|` runes in the [rune -library](link). +library](). Our `++length` [gate]() takes two arguments, `s` and `e`. In hoon we call the data passed in to a gate the 'sample'. Every `|=` has two @@ -241,7 +241,7 @@ computes the difference between `e` and `s`. `@ud` is an odor. Odors aren't quite types, but they're similar. You'll learn the difference by example as we progress, and you can always refer -to the [odor index](link). +to the [odor index](). You probably also noticed our indentation. In general hoon has both tall and wide forms. In tall form, hoon uses two spaces for indentation and @@ -282,7 +282,7 @@ margin. In wide form we use parenthesis just like almost everyone else. #### Try it - http://ship-name.urbit.org/gen/main/pub/fab/guide/exercise/5/ + http://ship-name.urbit.org/main/pub/fab/guide/exercise/5/ #### What's the difference? @@ -301,7 +301,7 @@ At a high level you can think of hoon as being composed of two things, tiles and twigs. Twigs are the actual AST structures that get consumed by the compiler. Tiles reduce to twigs and provide major affordances for the programmer. If you're interested in learning about tiles more deeply -you can find an in-depth explanation in the [tile overview](link). +you can find an in-depth explanation in the [tile overview](). It should suffice, for now, to say that we create tiles in the same way that you would think of creating type definitions in another language. @@ -325,7 +325,7 @@ you're usually familiar with. We still separate our addressing with `.`, but do it from the inside out. Given a tuple such as `[a=1 b=[c=[d=2 e=3]]]` we can address the value of `e` with `e.c.b`. You can read more about how faces work in the commentary on `++type` -[here](link). +[here]().
@@ -362,11 +362,11 @@ You can read more about how faces work in the commentary on `++type` #### Try it - http://ship-name.urbit.org/gen/main/pub/fab/guide/exercise/6/ + http://ship-name.urbit.org/main/pub/fab/guide/exercise/6/ #### What is that doing? -We're printing a few members of the [fibonacci sequence](link) by +We're printing a few members of the [fibonacci sequence]() by calling our arm `++fib` with a few values. The fibonacci sequence is a fairly straight forward algorithm: `F(n-1) + F(n-2)` where `F(1) = 1` and `F(2) = 1`. As is obvious from the formula, generating the fibonacci @@ -375,10 +375,10 @@ the code. Our example here should look similar to the previous one. We build a core with `|%` and add the arm `++fib`. `++fib` is a gate which takes -one argument `x`, an atom. Using [`?:`](link) we test if `x` is less -than `2` with the library function [`lte`](link) to handle our seed +one argument `x`, an atom. Using [`?:`]() we test if `x` is less +than `2` with the library function [`lte`]() to handle our seed values of `F(1) = 1` and `F(2) = 1`. `?:` is a member of the [`?` -runes](link), related to true / false values, or loobeans. In hoon true +runes](), related to true / false values, or loobeans. In hoon true and false are `0` and `1` respectively and take the odor `@f`. We tend to say 'yes' and 'no' instead of 'true' and 'false' to keep track of the switch. Our built-in function `lte` produces a loobean, so we evaluate @@ -389,7 +389,7 @@ We mentioned previously that a gate is a special kind of core with only one arm, called `$`. Here we're using `$` to mimic the behavior of a loop. You can read the expression `$(x (dec x))` as 'call the gate again with `x` replaced by `(dec x)`. For more on how this works, check out -the documentation of [`%=`](link) and [`%-`](link). With that in mind it +the documentation of [`%=`]() and [`%-`](). With that in mind it should be clear how the last line of `++fib` produces the member of the sequence at a given value `x`. @@ -431,7 +431,7 @@ sequence at a given value `x`. #### Try it - http://ship-name.urbit.org/gen/main/pub/fab/guide/exercise/7/ + http://ship-name.urbit.org/main/pub/fab/guide/exercise/7/ http://ship-name.urbit.org/gin/del/main/pub/fab/guide/exercise/7/ Here we're putting our publishing framework, `%ford` to work a little @@ -447,19 +447,19 @@ They belong at the top of the file. `/?` simply checks for compatibility. In this case the line means 'need urbit 314 or below', or in hoon: `(lte zuse 314)`. `314` is the number -in the kelvin versioning system, which you can read about [here](link). +in the kelvin versioning system, which you can read about [here](). `/=` is similar to the combination of `=+ =^`, or assignment. `/$` -calls a parsing function, which we specify as [`++fuel`](link) with the -[`++beam`](link) and [`++path`](link) of our current file. +calls a parsing function, which we specify as [`++fuel`]() with the +[`++beam`]() and [`++path`]() of our current file. `/= gas /$ fuel` is a common way to open your page, since the product of `++fuel` is useful when writing pages to the web. The use of `++fuel` is not enforced — you can also write your own parser. Our page is made up of two generated parts: who requested the page, the location of the page and its revision. Both are parsed out of the `gas` -variable using some straightforward library functions, [`++ju`](link), -[`++spud`](link) and [`++scow`](link). You can follow those links to the +variable using some straightforward library functions, [`++ju`](), +[`++spud`]() and [`++scow`](). You can follow those links to the library reference to learn more about them. You'll also notice our addressing moving in the opposite direction as you may be used to. `aut.ced.gas` pulls `aut` from inside `ced` from inside `gas`. @@ -468,13 +468,13 @@ Inside of the `;code` tag we also print (for our own reference) the entire `gas`, so you can take a look at the contents. This can be a helpful trick when debugging. To fully understand what gets put in `gas`, we can take a look at `++fuel` and note that it produces a -[`++epic`](link), which also contains a [`++cred`](link). You can follow +[`++epic`](), which also contains a [`++cred`](). You can follow those links to learn more about them. -When we try changing the url from `gen/main` to `gin/del/main` we're +When we try changing the url from `main` to `gin/del/main` we're using some of the access methods from `%eyre` (the urbit webserver) to pretend to be the urbit `~del`. You can find documentation on those -access methods in the `%eyre` commentary, [here](link). +access methods in the `%eyre` commentary, [here](). Path and identity are useful, but there are some other parameters worth checking out as well. @@ -510,8 +510,8 @@ checking out as well. #### Try it - http://ship-name.urbit.org/gen/main/pub/fab/guide/exercise/8/ - http://ship-name.urbit.org/gen/main/pub/fab/guide/exercise/8/?code=yes-i-do + http://ship-name.urbit.org/main/pub/fab/guide/exercise/8/ + http://ship-name.urbit.org/main/pub/fab/guide/exercise/8/?code=yes-i-do This is a simple example, showing off another use of `/= gas /$ fuel`. In this case we're just pulling out the value of @@ -519,10 +519,10 @@ the `code` query string parameter. You should be able to change that value to any url-safe string and see it appear on the page. We're using a few simple library functions to actually pull the value -out, [`++fall`](link) and [`get:by`](link). Query string parameters are +out, [`++fall`]() and [`get:by`](). Query string parameters are stored in `qix.gas` as a `++map`, one of the main container constructs used in hoon. We'll encounter a lot of maps along the way, and you can -learn more about them in the [map section](link) of the library doc. +learn more about them in the [map section]() of the library doc.
@@ -569,7 +569,7 @@ learn more about them in the [map section](link) of the library doc. #### Try it - http://ship-name.urbit.org/gen/main/pub/fab/guide/exercise/9/ + http://ship-name.urbit.org/main/pub/fab/guide/exercise/9/ #### How are they getting combined? @@ -597,8 +597,9 @@ generating html, it's a `.hook`, and our source file is just a `.hoon`. In order to find our file one level up we need two `%%` to get to `/pub/fab/guide/exercise/9/`. Adding `lib` resolve to our neighboring file. You can read more about how `%clay` paths are parsed in the -[`%clay` overview](link). It's also pretty easy to try them out using -`:cd` and `:ls` in your `%arvo` terminal. +[`%clay` overview](link). It's also pretty easy to try them out using +`/=main=`, `/=try`, `/try/a/b/c/d`, etc. +and `:ls` in your `%arvo` terminal.
@@ -652,9 +653,9 @@ file. You can read more about how `%clay` paths are parsed in the #### Try it - http://ship-name.urbit.org/gen/main/pub/fab/guide/exercise/10/ - http://ship-name.urbit.org/gen/main/pub/fab/guide/exercise/10/?number=7 - http://ship-name.urbit.org/gen/main/pub/fab/guide/exercise/10/?number=12 + http://ship-name.urbit.org/main/pub/fab/guide/exercise/10/ + http://ship-name.urbit.org/main/pub/fab/guide/exercise/10/?number=7 + http://ship-name.urbit.org/main/pub/fab/guide/exercise/10/?number=12 As you can see by changing the URL, we're now passing our query string parameter to our `++fib` script and printing the output. It's common to @@ -670,21 +671,21 @@ remaining computation. In short, you can read the code that produces runes to write this in tall form. `%` runes are used for calling gates or evaluating changes. `%+` 'slams' or calls a gate with two arguments, and `%-` 'slams' or calls a gate with one argument. As usual, you can -find more about the `%` runes in the [`%` section](link) of the rune +find more about the `%` runes in the [`%` section]() of the rune library. To get a value out of our map of query string parameters `qix.gas` we -use a method from the [maps library](link) that produces a `++unit`. +use a method from the [maps library]() that produces a `++unit`. `++unit`s are a common type in hoon used for optional values. A -[`++unit`](link) is either `~` or `[~ p=value]`. Since we need to +[`++unit`]() is either `~` or `[~ p=value]`. Since we need to specify a value for `(fib arg)` even when someone doesn't enter the -query string we use [`++fall`](link), which produces either the value of +query string we use [`++fall`](), which produces either the value of the unit, or the second argument if the `++unit` is null. Since our `qix.gas` has string values in it we specify a string in our second argument, `'0'`. As an aside, `'0'` is different from `"0"` in hoon. You -can read about the difference in [`++cord`](link) and [`++tape`](link). +can read about the difference in [`++cord`]() and [`++tape`](). -Our outermost call, to [`++slav`](link), casts our string to a `@ud` — +Our outermost call, to [`++slav`](), casts our string to a `@ud` — which is the type expected by `++fib`. `++slav` takes the name of an odor and a value, and tries to cast the value to that odor. @@ -742,9 +743,9 @@ odor and a value, and tries to cast the value to that odor. #### Try it - http://ship-name.urbit.org/gen/main/pub/fab/guide/exercise/11/ - http://ship-name.urbit.org/gen/main/pub/fab/guide/exercise/11/lib/1/ - http://ship-name.urbit.org/gen/main/pub/fab/guide/exercise/11/lib/2/ + http://ship-name.urbit.org/main/pub/fab/guide/exercise/11/ + http://ship-name.urbit.org/main/pub/fab/guide/exercise/11/lib/1/ + http://ship-name.urbit.org/main/pub/fab/guide/exercise/11/lib/2/ #### Experiment with it @@ -764,7 +765,7 @@ If we take the next few lines and write them as pseudo code in wide form they might look something like this, `(/; [gate] (/@ /psal/))`. That being the case, let's start at the bottom and move upwards since that's how our data flows. In depth documentation on individual `++horn` runes -can be found in the [horn section of the rune library](link). +can be found in the [horn section of the rune library](). `/psal/` loads our `psal` mark. Marks are like content types, and we keep them in `/main/mar/`. You can open `/main/mar/psal/door.hook` to @@ -776,16 +777,16 @@ where `mark` exists in the `/main/mar/` directory. A `psal` is a partial `/@` loads a list of files in numerical order from the previously specified `++beam` using our mark, `psal`. `/@` has a few close relatives. `/&`, for example, reads files by `@da` or absolute date. You -can see the rest in the [horn section of the library](link). +can see the rest in the [horn section of the library](). `/;` takes the output from `/@` and `/psal/` and passes it to a twig. In -this case, a gate. Our `/@` actually produces a [`++list`](link) of +this case, a gate. Our `/@` actually produces a [`++list`]() of pairs of `[@ manx]` where the `@` is the filename, and the `manx` is the -converted contents. We use [`++turn`](link), one of our `++list` +converted contents. We use [`++turn`](), one of our `++list` operator functions, to iterate through the list and produce only a list of `++manx`. This is the output assigned to `posts`. -Then, further down, we use [`;*`](link) to write the list to the page. +Then, further down, we use [`;*`]() to write the list to the page.
@@ -800,7 +801,7 @@ Then, further down, we use [`;*`](link) to write the list to the page. #### Try it - http://ship-name.urbit.org/gen/main/pub/fab/guide/ + http://ship-name.urbit.org/main/pub/fab/guide/ #### Bring it all together diff --git a/main/pub/doc/guide/c-gall.md b/main/pub/doc/guide/c-gall.md index 53ff9c8acb..bd0b354aef 100644 --- a/main/pub/doc/guide/c-gall.md +++ b/main/pub/doc/guide/c-gall.md @@ -34,7 +34,7 @@ under the corresponding paths. You will need four files: When everything is in place, try it: - http://localhost:8080/gen/main/pub/lead/ + http://localhost:8080/main/pub/lead/ That URL should render a page and be self explanatory. Try adding names to the leaderboard and incrementing their scores. It's also fun to open @@ -63,7 +63,7 @@ Our application-specific resources are stored in `/main/pub/lead/src/`. `/main/pub/lead/src/main.js` updates the page and sends data. We also use two utility scripts: `/gop/hart.js` and -`/gen/main/lib/urb.js`. These are the standard libraries for handling +`/main/lib/urb.js`. These are the standard libraries for handling data transfer from a browser to Urbit, and are very frequently used. `hart.js` handles the page heartbeat, making regular AJAX requests so we can keep track of subscribers, and `urb.js` offers a more complete set diff --git a/main/pub/doc/hoon/runes/sm/smcn.md b/main/pub/doc/hoon/runes/sm/smcn.md index 30f2e4f799..908a608d6c 100644 --- a/main/pub/doc/hoon/runes/sm/smcn.md +++ b/main/pub/doc/hoon/runes/sm/smcn.md @@ -62,13 +62,13 @@ repeated child node `'repeat'`. [`++poxo`]() prints our result in XML. ;= ;% |=(a=marl (turn a |=(b=manx ;script(src (poxo b));))) ; /gep/hart.js - ; /gen/main/lib/urb.js + ; /main/lib/urb.js ; //cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.js == ~[ [[%script [%src "/gep/hart.js "] ~] ~] - [[%script [%src "/gen/main/lib/urb.js + [[%script [%src "/main/lib/urb.js "] ~] ~] [ [ %script [%src "//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.js @@ -83,10 +83,10 @@ repeated child node `'repeat'`. [`++poxo`]() prints our result in XML. ;= ;% |=(a=marl (turn a |=(b=manx ;script(src (poxo b));))) ; /gep/hart.js - ; /gen/main/lib/urb.js + ; /main/lib/urb.js ; //cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.js == - "" + "" Here we go through a similar example, passing a list of urls for a script tag to a gate that produces a `