From 3251e471b4c75bd6e5ff6a11d0feb773b787c69e Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Thu, 10 Sep 2015 16:01:43 -0700 Subject: [PATCH 01/11] POST/PUT dojo sink --- ape/dojo.hoon | 158 +++++++++++++++++++++++++------------------------- mar/atom.hoon | 2 +- 2 files changed, 81 insertions(+), 79 deletions(-) diff --git a/ape/dojo.hoon b/ape/dojo.hoon index 104053947..1073f7b05 100644 --- a/ape/dojo.hoon +++ b/ape/dojo.hoon @@ -27,6 +27,7 @@ [%pill p=path q=dojo-source] :: noun to unix pill :: [%tree p=path q=dojo-source] :: noun to unix tree [%file p=beam q=dojo-source] :: save to clay + [%http p=?(%post %put) q=purl r=dojo-source] :: http outbound [%poke p=goal q=dojo-source] :: make and poke [%show p=dojo-source] :: print [%verb p=term q=(unit dojo-source)] :: store variable @@ -87,7 +88,7 @@ ++ card :: general card $% [%diff %sole-effect sole-effect] :: [%send wire [ship term] clap] :: - [%hiss wire mark [%purl purl]] :: + [%hiss wire mark [%hiss hiss]] :: [%exec wire @p (unit ,[beak silk])] :: [%deal wire sock term club] :: [%info wire @p toro] :: @@ -108,67 +109,49 @@ |_ [[ost=bone moz=(list move)] session] :: ++ dp :: dojo parser |% + ++ dp-default-app %hood + ++ dp-generator ,[?(%ge %di %sc) [@u span p=path] dojo-config] + ++ dp-specify + |= [a=goal b=dp-generator] + ^- (pair goal dojo-source) + =. p.b [q.a p.b] + [a [0 ?-(-.b %ge [%ge +.b], %di [%di +.b], %sc [%sc +.b])]] + :: ++ dp-command-line ;~(sfix dp-command (just '\0a')) ++ dp-command :: ++dojo-command %+ knee *dojo-command |. ~+ ;~ pose - ;~ pfix bar - %+ cook - |= [a=path b=dojo-config] - ^- dojo-command - [%poke [our.hid %hood] [0 %ge [0 [%cat %hood a]] b]] - ;~(plug (most fas sym) dp-config) + ;~ plug (cold %poke bar) + %+ cook dp-specify + %+ stag [our.hid dp-default-app] + (stag %ge dp-model-cat) == :: ;~ plug (cold %poke col) %+ cook - |= [a=goal b=(each dojo-source (trel term path dojo-config))] + |= [a=goal b=(each dojo-source dp-generator)] ^- (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] - == - == + ?~ -.b [a p.b] + (dp-specify a p.b) ;~ plug dp-goal - %+ pick ;~(pfix ace dp-source) - ;~ plug - ;~ pose - (cold %di wut) - (cold %ge lus) - (cold %sc pam) - == - (most fas sym) - dp-config + ;~ pose + (stag %& ;~(pfix ace dp-source)) + (stag %| ;~(plug (cold %ge bar) dp-model-cat)) + (stag %| ;~(plug (cold %di lus) dp-model-dog)) + (stag %| ;~(plug (cold %sc pam) dp-model-pig)) == == == :: - ;~ plug (cold %verb tis) - ;~(plug sym (punt ;~(pfix ace dp-source))) - == - :: - ;~ pfix fas - %+ cook - |=(a=(list twig) `dojo-command`[%verb %dir ~ [0 %ex %clsg a]]) - dp-poor - == - :: - ;~ plug (cold %file tar) - ;~((glue ace) dp-beam dp-source) - == - :: - ;~ plug (cold %flat pat) - ;~((glue ace) (most fas sym) dp-source) - == - :: - ;~ plug (cold %pill dot) - ;~((glue ace) (most fas sym) dp-source) - == + ;~(plug (cold %file tar) dp-beam ;~(pfix ace dp-source)) + ;~(plug (cold %flat pat) (most fas sym) ;~(pfix ace dp-source)) + ;~(plug (cold %pill dot) (most fas sym) ;~(pfix ace dp-source)) + ;~(plug (cold %http lus) (easy %post) auri:epur ;~(pfix ace dp-source)) + ;~(plug (cold %http hep) (easy %put) auri:epur ;~(pfix ace dp-source)) + ;~(plug (cold %verb tis) sym (punt ;~(pfix ace dp-source))) + =< ;~(plug (cold %verb fas) (cook . dp-poor)) + |=(a=(list twig) [%dir ~ [0 %ex %clsg a]]) :: (stag %show dp-source) == @@ -187,11 +170,11 @@ %+ cook |=(a=goal a) ;~ pose ;~ plug - ;~(pfix sig fed:ag) - ;~(pfix fas sym) + ;~(pfix sig fed:ag) + ;~(pose ;~(pfix fas sym) (easy dp-default-app)) == - (cook |=(a=term `goal`[our.hid a]) sym) - (easy [our.hid %hood]) + %+ stag our.hid + ;~(pose sym (easy dp-default-app)) == ++ dp-beam :: ++beam %+ sear tome @@ -238,10 +221,10 @@ (he-card(poy `+>+<(pux `way)) %exec way our.hid `[he-beak kas]) :: ++ dy-eyre :: send work to eyre - |= [way=wire req=[%purl purl]] + |= [way=wire req=hiss] ^+ +>+> ?> ?=(~ pux) - (he-card(poy `+>+<(pux `way)) %hiss way %httr req) + (he-card(poy `+>+<(pux `way)) %hiss way %httr %hiss req) :: ++ dy-stop :: stop work ^+ +> @@ -267,12 +250,16 @@ |= mad=dojo-command ^+ [mad +>] ?- -.mad - %file =^(src +>.$ (dy-init-source q.mad) [[%file p.mad src] +>.$]) - %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-unit q.mad) [[%verb p.mad src] +>.$]) + %file =^(src +>.$ (dy-init-source q.mad) [mad(q src) +>.$]) + %flat =^(src +>.$ (dy-init-source q.mad) [mad(q src) +>.$]) + %pill =^(src +>.$ (dy-init-source q.mad) [mad(q src) +>.$]) + %poke =^(src +>.$ (dy-init-source q.mad) [mad(q src) +>.$]) + %show =^(src +>.$ (dy-init-source p.mad) [mad(p src) +>.$]) + %verb =^(src +>.$ (dy-init-source-unit q.mad) [mad(q src) +>.$]) + %http + =. r.mad [0 %fi %mime r.mad] + =^ src +>.$ (dy-init-source r.mad) + [mad(r src) +>.$] == :: ++ dy-init-source-unit :: (unit dojo-source) @@ -445,20 +432,30 @@ =- +(..dy (he-diff %tan - ~)) rose/[" " `~]^~[leaf/"=%" (smyt (tope he-beak s.dir))] == + :: + %http + =+ cay=(~(got by rez) p.r.mad) + ?> ?=(%mime p.cay) + =+ mim=;;(mime q.q.cay) + =+ maf=(~(add ja *math) content-type/(moon p.mim)) + (dy-eyre /show [q.mad p.mad maf ~ q.mim]) :: %show - =+ cay=(~(got by rez) p.p.mad) - %+ dy-rash %tan - ?+ p.cay [(sell q.cay)]~ - %tang ;;(tang q.q.cay) - %httr - =+ hit=;;(httr q.q.cay) - =- (flop (turn `wall`- |=(a=tape leaf/(dash:ut a '')))) - :- "HTTP {}" - %+ weld - (turn q.hit |=([a=@t b=@t] "{(trip a)}: {(trip b)}")) - (turn `wain`?~(r.hit ~ (lore q.u.r.hit)) trip) - == + (dy-show (~(got by rez) p.p.mad)) + == + :: + ++ dy-show + |= cay=cage + %+ dy-rash %tan + ?+ p.cay [(sell q.cay)]~ + %tang ;;(tang q.q.cay) + %httr + =+ hit=;;(httr q.q.cay) + =- (flop (turn `wall`- |=(a=tape leaf/(dash:ut a '')))) + :- "HTTP {}" + %+ weld + (turn q.hit |=([a=@t b=@t] "{(trip a)}: {(trip b)}")) + (turn `wain`?~(r.hit ~ (lore q.u.r.hit)) trip) == :: ++ dy-edit :: handle edit @@ -550,7 +547,7 @@ ?> ?=(^ cud) =+ bil=q.u.cud :: XX =* ?: ?=(%ur -.bil) - (dy-eyre /hand %purl p.bil) + (dy-eyre /hand [p.bil %get ~ ~]) %- dy-ford ^- (pair path silk) ?+ -.bil !! @@ -700,12 +697,17 @@ %tabl !! == :: - ++ he-sigh :: result from ford + ++ he-sigh :: result from eyre |= [way=wire hit=httr] ^+ +> ?> ?=(^ poy) - ?> ?=([%hand ~] way) :: XX options? - he-pine:(~(dy-hand dy u.poy(pux ~)) %httr !>(hit)) + =< he-pine + %. [%httr !>(hit)] + =+ dye=~(. dy u.poy(pux ~)) + ?+ way !! + [%hand ~] dy-hand:dye + [%show ~] dy-show:dye + == :: ++ he-unto :: result from behn |= [way=wire cit=cuft] @@ -789,13 +791,13 @@ -- :: ++ prep - =+ sosh==+(*session ,[_say syd=desk * (unit) _|3.-]) + =+ session-0==+(*session ,[_say syd=desk * (unit) _|3.-]) :: ,_`..prep - |= old=(unit ?(house [%0 p=(map bone sosh)])) ^+ [~ ..prep] + |= old=(unit ?(house [%0 p=(map bone session-0)])) ^+ [~ ..prep] ?~ old `..prep ?: ?=(%1 -.u.old) `..prep(+<+ u.old) =< ^$(u.old [%1 (~(run by p.u.old) .)]) - |= sos=sosh ^- session + |= sos=session-0 ^- session =- ~! [%*(. *session poy *(unit)) -] - [-.sos [[our.hid syd.sos ud/0] /] ~ |4.sos] :: diff --git a/mar/atom.hoon b/mar/atom.hoon index 562c504e1..f68149061 100644 --- a/mar/atom.hoon +++ b/mar/atom.hoon @@ -7,7 +7,7 @@ |_ ato=@ ++ grab |% ++ noun ,@ - ++ mime |=([^ p=octs] q.p) + ++ mime |=([* p=octs] q.p) -- ++ grow |% ++ mime [/aplication/x-urb-unknown (taco ato)] From 86a423b4d4f016a632f70277020ee3fd67ffadd5 Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Fri, 11 Sep 2015 10:54:28 -0700 Subject: [PATCH 02/11] better mark type handling --- arvo/ford.hoon | 15 +++++++++------ cat/hello.hoon | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/arvo/ford.hoon b/arvo/ford.hoon index 5b35304d2..aff8b8c2d 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -993,9 +993,10 @@ (fine cof [%atom %t] u.mas) %+ cope (fang cof for) |= [cof=cafe tux=vase] - =+ bob=(slot 6 tux) - ?: (~(nest ut p.bob) | p.sam) - (fine cof sam) + =+ typ=p:(slot 6 tux) + =. typ ?+(-.typ typ %face q.typ) :: XX vulcanization + ?: (~(nest ut typ) | p.sam) + (fine cof typ q.sam) ?. (slob %grab p.tux) (flaw cof [%leaf "ford: no grab: {<[for bek]>}"]~) =+ gab=(slap tux [%cnzy %grab]) @@ -1003,9 +1004,9 @@ (flaw cof [%leaf "ford: no noun: {<[for bek]>}"]~) %+ cope (maul cof (slap gab [%cnzy %noun]) [%noun q.sam]) |= [cof=cafe pro=vase] - ?> (~(nest ut p.bob) | p.pro) + ?> (~(nest ut typ) | p.pro) ?: =(q.pro q.sam) - (fine cof p.bob q.pro) + (fine cof typ q.pro) (flaw cof [%leaf "ford: invalid content: {<[for bek]>}"]~) :: ++ lamp :: normalize version @@ -1285,7 +1286,9 @@ (fine cof %& p.kas [%atom %t] '') %+ cope (fang cof p.kas) |= [cof=cafe tux=vase] - (fine cof [%& p.kas (slot 6 tux)]) + =+ [typ=p val=q]:(slot 6 tux) + =. typ ?+(-.typ typ %face q.typ) :: XX vulcanization + (fine cof [%& p.kas [typ val]]) :: %call :: %+ cool |.(leaf/"ford: call {<`@p`(mug kas)>}") diff --git a/cat/hello.hoon b/cat/hello.hoon index 9f0d990ed..2354fad43 100644 --- a/cat/hello.hoon +++ b/cat/hello.hoon @@ -5,6 +5,6 @@ :: :::: !: -|= [* [[txt=@tas ~] ~]] +|= [^ [[txt=@tas ~] ~]] :- %noun (crip (weld "hello, " (flop (trip txt)))) From 05e37b73b67012e834becb71a9d4ae6601254cc6 Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Fri, 11 Sep 2015 12:20:19 -0700 Subject: [PATCH 03/11] extensible urb.onupdate --- arvo/eyre.hoon | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arvo/eyre.hoon b/arvo/eyre.hoon index fc286b44d..8d0b4f3c1 100644 --- a/arvo/eyre.hoon +++ b/arvo/eyre.hoon @@ -355,7 +355,7 @@ if(this.status !== 205) { return urb.keep() } - document.location.reload() + urb.onupdate() }) urb.wreq.addEventListener('error', urb.keep) urb.wreq.addEventListener('abort', urb.keep) @@ -365,6 +365,7 @@ setTimeout(urb.call,1000*urb.tries) urb.tries++ } + urb.onupdate = function(){document.location.reload()} urb.call() urb.wasp = function(deh){ var old = /[^/]*$/.exec(urb.wurl)[0] From e58446f0bd8c0469fe0543e8593c5ff6306a4cd4 Mon Sep 17 00:00:00 2001 From: Raymond Pasco Date: Fri, 11 Sep 2015 16:47:53 -0400 Subject: [PATCH 04/11] Update rune doc ford page to use lib namespace --- pub/doc/hoon/runes/index.hook | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pub/doc/hoon/runes/index.hook b/pub/doc/hoon/runes/index.hook index 0ec0f598d..a009b83ba 100644 --- a/pub/doc/hoon/runes/index.hook +++ b/pub/doc/hoon/runes/index.hook @@ -1,8 +1,8 @@ /+ tree /: /%%/ /% /^ [tip=marl sub=(map span marl) ~] - /. /; (getall %h1 ~) /elem/ - /_ /; (getall %h1 ~) /elem/ + /. /; (getall:tree %h1 ~) /elem/ + /_ /; (getall:tree %h1 ~) /elem/ == !: :::: From 0964b3fd6d70f11e950a4e6726a9b6fedb8b9821 Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Fri, 11 Sep 2015 14:15:25 -0700 Subject: [PATCH 05/11] cat/dog to gen collapse --- ape/dojo.hoon | 131 +++++++++++------------- {cat => gen}/bit/act.hoon | 0 {cat => gen}/bit/address-contact.hoon | 1 + {cat => gen}/bit/auth.hoon | 1 + {cat => gen}/bit/buy.hoon | 1 + {cat => gen}/bit/contact-address.hoon | 1 + {cat => gen}/bit/list.hoon | 1 + {cat => gen}/bit/sell.hoon | 1 + {cat => gen}/bit/send.hoon | 1 + {cat => gen}/cat.hoon | 3 +- {cat => gen}/cat/pretty.hoon | 0 {cat => gen}/coin/keys.hoon | 1 + {cat => gen}/curl/url.hoon | 1 + {cat => gen}/hello.hoon | 3 +- {dog => gen}/hood/begin.hoon | 1 + {cat => gen}/hood/breload.hoon | 3 +- {cat => gen}/hood/cp.hoon | 1 + {cat => gen}/hood/hi.hoon | 1 + {cat => gen}/hood/init.hoon | 3 +- {cat => gen}/hood/invite.hoon | 3 +- {cat => gen}/hood/label.hoon | 3 +- {cat => gen}/hood/link.hoon | 3 +- {cat => gen}/hood/mass.hoon | 3 +- {cat => gen}/hood/merge.hoon | 3 +- {cat => gen}/hood/mount.hoon | 3 +- {cat => gen}/hood/mv.hoon | 1 + {cat => gen}/hood/rc.hoon | 3 +- {cat => gen}/hood/reboot.hoon | 3 +- {cat => gen}/hood/reload-desk.hoon | 3 +- {cat => gen}/hood/reload.hoon | 3 +- {cat => gen}/hood/reset.hoon | 3 +- {cat => gen}/hood/rf.hoon | 3 +- {cat => gen}/hood/rm.hoon | 1 + {cat => gen}/hood/schedule.hoon | 1 + {cat => gen}/hood/start.hoon | 3 +- {cat => gen}/hood/sync.hoon | 3 +- {cat => gen}/hood/unix.hoon | 3 +- {cat => gen}/hood/unmount.hoon | 3 +- {cat => gen}/hood/unsync.hoon | 3 +- {cat => gen}/hood/verb.hoon | 1 + {cat => gen}/ls.hoon | 3 +- {cat => gen}/ls/subdir.hoon | 0 gen/make.hoon | 2 + gen/pope.hoon | 24 +++++ {cat => gen}/solid.hoon | 3 +- {cat => gen}/ticket.hoon | 3 +- {cat => gen}/tree.hoon | 3 +- {cat => gen}/twit/as.hoon | 1 + {dog => gen}/twit/auth.hoon | 1 + {dog => gen}/twit/auth/hoontap-keys.txt | 0 {cat => gen}/twit/tweet.hoon | 0 {cat => gen}/twit/twitter-feed.hoon | 1 + sur/sole.hoon | 103 ++++++++++++------- 53 files changed, 217 insertions(+), 137 deletions(-) rename {cat => gen}/bit/act.hoon (100%) rename {cat => gen}/bit/address-contact.hoon (93%) rename {cat => gen}/bit/auth.hoon (92%) rename {cat => gen}/bit/buy.hoon (91%) rename {cat => gen}/bit/contact-address.hoon (93%) rename {cat => gen}/bit/list.hoon (87%) rename {cat => gen}/bit/sell.hoon (91%) rename {cat => gen}/bit/send.hoon (90%) rename {cat => gen}/cat.hoon (95%) rename {cat => gen}/cat/pretty.hoon (100%) rename {cat => gen}/coin/keys.hoon (89%) rename {cat => gen}/curl/url.hoon (90%) rename {cat => gen}/hello.hoon (77%) rename {dog => gen}/hood/begin.hoon (99%) rename {cat => gen}/hood/breload.hoon (78%) rename {cat => gen}/hood/cp.hoon (86%) rename {cat => gen}/hood/hi.hoon (89%) rename {cat => gen}/hood/init.hoon (74%) rename {cat => gen}/hood/invite.hoon (77%) rename {cat => gen}/hood/label.hoon (79%) rename {cat => gen}/hood/link.hoon (84%) rename {cat => gen}/hood/mass.hoon (75%) rename {cat => gen}/hood/merge.hoon (95%) rename {cat => gen}/hood/mount.hoon (85%) rename {cat => gen}/hood/mv.hoon (86%) rename {cat => gen}/hood/rc.hoon (75%) rename {cat => gen}/hood/reboot.hoon (78%) rename {cat => gen}/hood/reload-desk.hoon (78%) rename {cat => gen}/hood/reload.hoon (76%) rename {cat => gen}/hood/reset.hoon (74%) rename {cat => gen}/hood/rf.hoon (75%) rename {cat => gen}/hood/rm.hoon (81%) rename {cat => gen}/hood/schedule.hoon (88%) rename {cat => gen}/hood/start.hoon (85%) rename {cat => gen}/hood/sync.hoon (81%) rename {cat => gen}/hood/unix.hoon (81%) rename {cat => gen}/hood/unmount.hoon (78%) rename {cat => gen}/hood/unsync.hoon (80%) rename {cat => gen}/hood/verb.hoon (94%) rename {cat => gen}/ls.hoon (85%) rename {cat => gen}/ls/subdir.hoon (100%) create mode 100644 gen/make.hoon create mode 100644 gen/pope.hoon rename {cat => gen}/solid.hoon (96%) rename {cat => gen}/ticket.hoon (84%) rename {cat => gen}/tree.hoon (92%) rename {cat => gen}/twit/as.hoon (94%) rename {dog => gen}/twit/auth.hoon (98%) rename {dog => gen}/twit/auth/hoontap-keys.txt (100%) rename {cat => gen}/twit/tweet.hoon (100%) rename {cat => gen}/twit/twitter-feed.hoon (98%) diff --git a/ape/dojo.hoon b/ape/dojo.hoon index 1073f7b05..1cb2660aa 100644 --- a/ape/dojo.hoon +++ b/ape/dojo.hoon @@ -10,7 +10,7 @@ !: :: :: => |% :: external structures ++ house :: all state - $: %1 + $: %2 hoc=(map bone session) :: conversations == :: ++ session :: per conversation @@ -37,13 +37,10 @@ q=dojo-build :: general build == :: ++ dojo-build :: one ford step - $% [%ec p=mark q=twig] :: caged expression - [%ex p=twig] :: hoon expression - [%di p=dojo-model] :: dialog + $% [%ex p=twig] :: hoon expression [%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 [%ur p=purl] :: http GET request == :: @@ -110,12 +107,10 @@ ++ dp :: dojo parser |% ++ dp-default-app %hood - ++ dp-generator ,[?(%ge %di %sc) [@u span p=path] dojo-config] ++ dp-specify - |= [a=goal b=dp-generator] + |= [gol=goal mod=dojo-model] ^- (pair goal dojo-source) - =. p.b [q.a p.b] - [a [0 ?-(-.b %ge [%ge +.b], %di [%di +.b], %sc [%sc +.b])]] + [gol [0 [%ge mod(q.p [q.gol q.p.mod])]]] :: ++ dp-command-line ;~(sfix dp-command (just '\0a')) ++ dp-command :: ++dojo-command @@ -123,23 +118,20 @@ ;~ pose ;~ plug (cold %poke bar) %+ cook dp-specify - %+ stag [our.hid dp-default-app] - (stag %ge dp-model-cat) + (stag [our.hid dp-default-app] dp-model) == :: ;~ plug (cold %poke col) %+ cook - |= [a=goal b=(each dojo-source dp-generator)] + |= [a=goal b=$&(dojo-model dojo-source)] ^- (pair goal dojo-source) - ?~ -.b [a p.b] - (dp-specify a p.b) + ?@ -.b [a b] + (dp-specify a b) ;~ plug dp-goal ;~ pose - (stag %& ;~(pfix ace dp-source)) - (stag %| ;~(plug (cold %ge bar) dp-model-cat)) - (stag %| ;~(plug (cold %di lus) dp-model-dog)) - (stag %| ;~(plug (cold %sc pam) dp-model-pig)) + ;~(pfix bar dp-model) + ;~(pfix ace dp-source) == == == @@ -159,8 +151,8 @@ ++ dp-build :: ++dojo-build %+ knee *dojo-build |. ~+ ;~ pose - ;~(pfix lus ;~(pose (stag %ur auri:epur) (stag %ge dp-model-cat))) - ;~(plug (cold %di wut) dp-model-dog) + ;~(plug (cold %ge lus) dp-model) + ;~(plug (cold %ur lus) auri:epur) ;~(plug (cold %fi cab) ;~((glue ace) dp-filter dp-source)) dp-value == @@ -181,16 +173,11 @@ =+ vez=(vang & dp-path) (sear plex:vez (stag %clsg poor:vez)) :: - ++ 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-path (tope he-beam) :: ++path - ++ 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 tall:(vang & dp-path) :: ++twig - ++ dp-poor poor:(vang & (tope dir)) :: (list ++twig) - ++ dp-device (most fas sym) :: ++dojo-device + ++ dp-model ;~(plug dp-server dp-config) :: ++dojo-model + ++ dp-path (tope he-beam) :: ++path + ++ dp-server (stag 0 (most fas sym)) :: ++dojo-server + ++ dp-twig tall:(vang & dp-path) :: ++twig + ++ dp-poor poor:(vang & (tope dir)) :: (list ++twig) ++ dp-value :: ++dojo-source ;~ pose (stag %tu (ifix [kel ker] (most ace dp-source))) @@ -282,14 +269,11 @@ |= bul=dojo-build ^+ [bul +>] ?- -.bul - %ec [bul +>.$] %ex [bul +>.$] - %di =^(mod +>.$ (dy-init-model p.bul) [[%di mod] +>.$]) %dv [bul +>.$] %fi =^ mor +>.$ (dy-init-source q.bul) [bul(q mor) +>.$] %ge =^(mod +>.$ (dy-init-model p.bul) [[%ge mod] +>.$]) - %sc !! %ur [bul +>.$] %tu =^ dof +>.$ |- ^+ [p.bul +>.^$] @@ -310,7 +294,7 @@ ++ dy-init-server :: ++dojo-server |= srv=dojo-server =. p.srv num - [srv +>.$(num +(num), job (~(put by job) num [%dv q.srv]))] + [srv +>.$(num +(num), job (~(put by job) num [%dv [%gen q.srv]]))] :: ++ dy-init-config :: prepare config |= cig=dojo-config @@ -477,34 +461,33 @@ :: ++ 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 [%$ %noun vax]) :: vase to silk - ++ dy-silk-config :: configure - |= [cag=cage cig=dojo-config] - ^- silk - :+ %ride [%cnzy %$] - :+ %mute [%$ cag] - ^- (list (pair wing silk)) - :* :- [[~ 12] ~] - (dy-silk-vase !>([now=now.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-vase |=(vax=vase [%$ %noun vax]) :: vase to silk + ++ dy-silk-sources :: sources to silk + |= src=(list dojo-source) ^- silk + %- dy-silk-vase + |- + ?~ src !>(~) + (slop (dy-vase p.i.src) $(src t.src)) :: - ++ dy-silk-init-modo :: init and config - |= [cag=cage cig=dojo-config] - ^- silk - (dy-silk-config cag cig) + ++ dy-silk-config :: configure + |= [cay=cage cig=dojo-config] + ^- [wire silk] + :- ?+ -.q.q.cay ~|(%bad-gen ~_((sell (slot 2 q.cay)) !!)) + %cat /gent + %dog /dial + %pig /scar + == + =+ gat=(slot 3 q.cay) + :+ %call (dy-silk-vase gat) + :+ (dy-silk-vase !>([now=now.hid eny=eny.hid bec=he-beak])) + (dy-silk-sources p.cig) + :+ %mute (dy-silk-vase (slot 27 gat)) + %+ turn (~(tap by q.cig)) + |= [a=term b=(unit dojo-source)] + ^- (pair wing silk) + :- [a ~] + %- dy-silk-vase + ?~(b !>([~ ~]) (dy-vase p.u.b)) :: ++ dy-twig-head :: dynamic state ^- cage @@ -514,7 +497,7 @@ %- ~(rep by var) |= [[a=term @ b=vase] c=vase] ^- vase (sloop b(p face/[a p.b]) c) - !>(`[our=@p now=@da eny=@uvI]`[our now eny]:hid) + !>([our=our now=now eny=eny]:hid) :: ++ dy-made-dial :: dialog product |= cag=cage @@ -550,11 +533,9 @@ (dy-eyre /hand [p.bil %get ~ ~]) %- dy-ford ^- (pair path silk) - ?+ -.bil !! - %di [/dial (dy-silk-init-modo (dy-cage p.p.p.bil) q.p.bil)] - %ge [/gent (dy-silk-init-modo (dy-cage p.p.p.bil) q.p.bil)] + ?- -.bil + %ge (dy-silk-config (dy-cage p.p.p.bil) q.p.bil) %dv [/hand [%core he-beak (flop p.bil)]] - %ec [/hand [%cast p.bil (dy-mare q.bil)]] %ex [/hand (dy-mare p.bil)] %fi =+ dat=[%$ (dy-cage p.q.bil)] [/hand ?@(p.bil [%cast p.bil dat] [%call (dy-mare p.bil) dat])] @@ -791,15 +772,19 @@ -- :: ++ prep - =+ session-0==+(*session ,[_say syd=desk * (unit) _|3.-]) + =+ session-1==+(*session ,_-(poy *(unit))) + =+ session-0==+(*session-1 ,[_say syd=desk * _|2.-]) :: ,_`..prep - |= old=(unit ?(house [%0 p=(map bone session-0)])) ^+ [~ ..prep] + =+ hoze=$%([%0 p=(map bone session-0)] [%1 p=(map bone session-1)]) + |= old=(unit ?(house hoze)) ^+ [~ ..prep] ?~ old `..prep - ?: ?=(%1 -.u.old) `..prep(+<+ u.old) - =< ^$(u.old [%1 (~(run by p.u.old) .)]) - |= sos=session-0 ^- session - =- ~! [%*(. *session poy *(unit)) -] - - [-.sos [[our.hid syd.sos ud/0] /] ~ |4.sos] + ?- -.u.old + %2 `..prep(+<+ u.old) + %1 `..prep(+<+ [%2 (~(run by p.u.old) |=(session-0 +<(poy ~)))]) + %0 =< ^$(u.old [%1 (~(run by p.u.old) .)]) + |= sos=session-0 ^- session + [-.sos [[our.hid syd.sos ud/0] /] |3.sos] + == :: :: pattern: ++ foo |=(data he-abet:(~(he-foo he (~(got by hoc) ost)) data)) ++ arm (arm-session (~(got by hoc) ost.hid)) diff --git a/cat/bit/act.hoon b/gen/bit/act.hoon similarity index 100% rename from cat/bit/act.hoon rename to gen/bit/act.hoon diff --git a/cat/bit/address-contact.hoon b/gen/bit/address-contact.hoon similarity index 93% rename from cat/bit/address-contact.hoon rename to gen/bit/address-contact.hoon index fb9a98124..f97e94f76 100644 --- a/cat/bit/address-contact.hoon +++ b/gen/bit/address-contact.hoon @@ -6,6 +6,7 @@ :: ::::::: !: +:- %cat |= [^ arg=[address=@t contact=@t ~] ~] :- %address-contact [address.arg contact.arg] diff --git a/cat/bit/auth.hoon b/gen/bit/auth.hoon similarity index 92% rename from cat/bit/auth.hoon rename to gen/bit/auth.hoon index 58cf449a8..b3994bb8a 100644 --- a/cat/bit/auth.hoon +++ b/gen/bit/auth.hoon @@ -5,6 +5,7 @@ :: ::::: !: +:- %cat |= [^ [arg1=cord arg2=cord ~] ~] ::[arg=[cord cord ~] ~]] :- %auth [arg1 arg2] diff --git a/cat/bit/buy.hoon b/gen/bit/buy.hoon similarity index 91% rename from cat/bit/buy.hoon rename to gen/bit/buy.hoon index e351b6908..a9c3a0135 100644 --- a/cat/bit/buy.hoon +++ b/gen/bit/buy.hoon @@ -5,6 +5,7 @@ :: ::::::: !: +:- %cat |= [^ [amount=@t currency=@t ~] ~] :- %buy [amount currency] diff --git a/cat/bit/contact-address.hoon b/gen/bit/contact-address.hoon similarity index 93% rename from cat/bit/contact-address.hoon rename to gen/bit/contact-address.hoon index 31fac5b0a..fbf799b15 100644 --- a/cat/bit/contact-address.hoon +++ b/gen/bit/contact-address.hoon @@ -6,6 +6,7 @@ :: ::::::: !: +:- %cat |= [^ arg=[contact=@t address=@t ~] ~] :- %bit-contact [contact.arg address.arg] diff --git a/cat/bit/list.hoon b/gen/bit/list.hoon similarity index 87% rename from cat/bit/list.hoon rename to gen/bit/list.hoon index 04242a2b1..ee742c50b 100644 --- a/cat/bit/list.hoon +++ b/gen/bit/list.hoon @@ -5,6 +5,7 @@ :: ::::::: !: +:- %cat |= [^ ~ ~] :- %list ~ diff --git a/cat/bit/sell.hoon b/gen/bit/sell.hoon similarity index 91% rename from cat/bit/sell.hoon rename to gen/bit/sell.hoon index 097cc1e7f..8f142de9c 100644 --- a/cat/bit/sell.hoon +++ b/gen/bit/sell.hoon @@ -5,6 +5,7 @@ :: ::::::: !: +:- %cat |= [^ [amount=@t currency=@t ~] ~] :- %sell [amount currency] diff --git a/cat/bit/send.hoon b/gen/bit/send.hoon similarity index 90% rename from cat/bit/send.hoon rename to gen/bit/send.hoon index a2f951c59..ff80f4e40 100644 --- a/cat/bit/send.hoon +++ b/gen/bit/send.hoon @@ -5,6 +5,7 @@ :: ::::::: !: +:- %cat |= [^ [to=@uc amo=@t ~] ~] [%bit-send to amo] diff --git a/cat/cat.hoon b/gen/cat.hoon similarity index 95% rename from cat/cat.hoon rename to gen/cat.hoon index 1ea4c417d..e14182160 100644 --- a/cat/cat.hoon +++ b/gen/cat.hoon @@ -1,12 +1,13 @@ :: ConCATenate file listings :: -:::: /hoon/cat/cat +:::: /hoon/gen/cat :: // /%%/ls/subdir // /%/pretty !: :::: :: +:- %cat |= [^ [arg=(list path)] ~] =- tang/(flop `tang`(zing -)) %+ turn arg diff --git a/cat/cat/pretty.hoon b/gen/cat/pretty.hoon similarity index 100% rename from cat/cat/pretty.hoon rename to gen/cat/pretty.hoon diff --git a/cat/coin/keys.hoon b/gen/coin/keys.hoon similarity index 89% rename from cat/coin/keys.hoon rename to gen/coin/keys.hoon index f88d34c75..a2e81e3b6 100644 --- a/cat/coin/keys.hoon +++ b/gen/coin/keys.hoon @@ -5,6 +5,7 @@ :: :::: !: +:- %cat |= [^ [arg=(list cord) ~]] :- %keys arg diff --git a/cat/curl/url.hoon b/gen/curl/url.hoon similarity index 90% rename from cat/curl/url.hoon rename to gen/curl/url.hoon index f3435f011..51ebcd204 100644 --- a/cat/curl/url.hoon +++ b/gen/curl/url.hoon @@ -5,5 +5,6 @@ :: ::::: !: +:- %cat |= [^ [arg=tape ~] ~] purl/(scan arg auri:epur) diff --git a/cat/hello.hoon b/gen/hello.hoon similarity index 77% rename from cat/hello.hoon rename to gen/hello.hoon index 2354fad43..be63a0eaa 100644 --- a/cat/hello.hoon +++ b/gen/hello.hoon @@ -1,10 +1,11 @@ :: -:::: /hoon/hello/cat +:::: /hoon/hello/gen :: /? 314 :: :::: !: +:- %cat |= [^ [[txt=@tas ~] ~]] :- %noun (crip (weld "hello, " (flop (trip txt)))) diff --git a/dog/hood/begin.hoon b/gen/hood/begin.hoon similarity index 99% rename from dog/hood/begin.hoon rename to gen/hood/begin.hoon index 4a1c1f5fc..999ff4113 100644 --- a/dog/hood/begin.hoon +++ b/gen/hood/begin.hoon @@ -11,6 +11,7 @@ ++ scug |*([a=@ b=(pole)] ?~(b ~ ?~(a ~ [-.b $(b +.b, a (dec a))]))) -- [sole .] +:- %dog |= $: [now=@da eny=@uvI bec=beak] [arg=_(scug *@ ~[his=*@p tic=*@p]) ~] == diff --git a/cat/hood/breload.hoon b/gen/hood/breload.hoon similarity index 78% rename from cat/hood/breload.hoon rename to gen/hood/breload.hoon index fe532c236..824527049 100644 --- a/cat/hood/breload.hoon +++ b/gen/hood/breload.hoon @@ -1,10 +1,11 @@ :: -:::: /hoon/reload/hood/cat +:::: /hoon/reload/hood/gen :: /? 314 :: :::: !: +:- %cat |= $: [now=@da eny=@uvI bec=beak] [arg=(list term) ~] == diff --git a/cat/hood/cp.hoon b/gen/hood/cp.hoon similarity index 86% rename from cat/hood/cp.hoon rename to gen/hood/cp.hoon index 4dd6cc488..7e523c7d3 100644 --- a/cat/hood/cp.hoon +++ b/gen/hood/cp.hoon @@ -1 +1,2 @@ +:- %cat |=([^ [input=path output=path ~] ~] kiln-cp/[input output]) diff --git a/cat/hood/hi.hoon b/gen/hood/hi.hoon similarity index 89% rename from cat/hood/hi.hoon rename to gen/hood/hi.hoon index fb27f299d..048c2756b 100644 --- a/cat/hood/hi.hoon +++ b/gen/hood/hi.hoon @@ -1 +1,2 @@ +:- %cat |=([^ [who=ship mez=$|(~ [a=tape ~])] ~] helm-send-hi/[who ?~(mez ~ `a.mez)]) diff --git a/cat/hood/init.hoon b/gen/hood/init.hoon similarity index 74% rename from cat/hood/init.hoon rename to gen/hood/init.hoon index 5fc9060c1..23b63708c 100644 --- a/cat/hood/init.hoon +++ b/gen/hood/init.hoon @@ -1,10 +1,11 @@ :: -:::: /hoon/reload/hood/cat +:::: /hoon/reload/hood/gen :: /? 314 :: :::: !: +:- %cat |= $: [now=@da eny=@uvI bec=beak] [~ ~] == diff --git a/cat/hood/invite.hoon b/gen/hood/invite.hoon similarity index 77% rename from cat/hood/invite.hoon rename to gen/hood/invite.hoon index 156cdab21..5c992a59c 100644 --- a/cat/hood/invite.hoon +++ b/gen/hood/invite.hoon @@ -1,10 +1,11 @@ :: -:::: /hoon/invite/hood/cat +:::: /hoon/invite/hood/gen :: /? 314 :: :::: !: +:- %cat |= $: [now=@da eny=@uvI bec=beak] [[who=@p myl=@t ~] ~] == diff --git a/cat/hood/label.hoon b/gen/hood/label.hoon similarity index 79% rename from cat/hood/label.hoon rename to gen/hood/label.hoon index 9b4113620..ec414c06a 100644 --- a/cat/hood/label.hoon +++ b/gen/hood/label.hoon @@ -1,10 +1,11 @@ :: -:::: /hoon/label/hood/cat +:::: /hoon/label/hood/gen :: /? 314 :: :::: !: +:- %cat |= $: [now=@da eny=@uvI bec=beak] [arg=[syd=desk lab=@tas ~] ~] == diff --git a/cat/hood/link.hoon b/gen/hood/link.hoon similarity index 84% rename from cat/hood/link.hoon rename to gen/hood/link.hoon index dc70d442b..87cb6b9a9 100644 --- a/cat/hood/link.hoon +++ b/gen/hood/link.hoon @@ -1,10 +1,11 @@ :: -:::: /hoon/link/hood/cat +:::: /hoon/link/hood/gen :: /? 314 :: :::: !: +:- %cat |= $: [now=@da eny=@uvI byk=beak] [arg=$?([dap=term ~] [who=ship dap=term ~]) ~] == diff --git a/cat/hood/mass.hoon b/gen/hood/mass.hoon similarity index 75% rename from cat/hood/mass.hoon rename to gen/hood/mass.hoon index 30deb428d..e2f2e5b74 100644 --- a/cat/hood/mass.hoon +++ b/gen/hood/mass.hoon @@ -1,10 +1,11 @@ :: -:::: /hoon/mass/hood/cat +:::: /hoon/mass/hood/gen :: /? 314 :: :::: !: +:- %cat |= $: [now=@da eny=@uvI bec=beak] [arg=~ ~] == diff --git a/cat/hood/merge.hoon b/gen/hood/merge.hoon similarity index 95% rename from cat/hood/merge.hoon rename to gen/hood/merge.hoon index 49fe271c8..382f7d358 100644 --- a/cat/hood/merge.hoon +++ b/gen/hood/merge.hoon @@ -1,5 +1,5 @@ :: -:::: /hoon/merge/hood/cat +:::: /hoon/merge/hood/gen :: /? 314 !: @@ -10,6 +10,7 @@ :: :::: !: +:- %cat |= $: [now=@da eny=@uvI bek=beak] [arg=[?(sorc [syd=$|(desk beaky) sorc])] gem=?(%auto germ)] == diff --git a/cat/hood/mount.hoon b/gen/hood/mount.hoon similarity index 85% rename from cat/hood/mount.hoon rename to gen/hood/mount.hoon index 0ec2b8328..f8d5eb3a3 100644 --- a/cat/hood/mount.hoon +++ b/gen/hood/mount.hoon @@ -1,10 +1,11 @@ :: -:::: /hoon/mount/hood/cat +:::: /hoon/mount/hood/gen :: /? 314 :: :::: !: +:- %cat |= $: [now=@da eny=@uvI bec=beak] [[pax=path pot=$|(~ [v=@tas ~])] ~] == diff --git a/cat/hood/mv.hoon b/gen/hood/mv.hoon similarity index 86% rename from cat/hood/mv.hoon rename to gen/hood/mv.hoon index 72e380578..c0071d246 100644 --- a/cat/hood/mv.hoon +++ b/gen/hood/mv.hoon @@ -1 +1,2 @@ +:- %cat |=([^ [input=path output=path ~] ~] kiln-mv/[input output]) diff --git a/cat/hood/rc.hoon b/gen/hood/rc.hoon similarity index 75% rename from cat/hood/rc.hoon rename to gen/hood/rc.hoon index 7116db3eb..891eb6bf9 100644 --- a/cat/hood/rc.hoon +++ b/gen/hood/rc.hoon @@ -1,10 +1,11 @@ :: -:::: /hoon/reload/hood/cat +:::: /hoon/reload/hood/gen :: /? 314 :: :::: !: +:- %cat |= $: [now=@da eny=@uvI bec=beak] [arg=~ ~] == diff --git a/cat/hood/reboot.hoon b/gen/hood/reboot.hoon similarity index 78% rename from cat/hood/reboot.hoon rename to gen/hood/reboot.hoon index a463f8d0c..9373033b2 100644 --- a/cat/hood/reboot.hoon +++ b/gen/hood/reboot.hoon @@ -1,10 +1,11 @@ :: -:::: /hoon/reload/hood/cat +:::: /hoon/reload/hood/gen :: /? 314 :: :::: !: +:- %cat |= $: [now=@da eny=@uvI bec=beak] [arg=~ ~] == diff --git a/cat/hood/reload-desk.hoon b/gen/hood/reload-desk.hoon similarity index 78% rename from cat/hood/reload-desk.hoon rename to gen/hood/reload-desk.hoon index 71e60de30..8ead15099 100644 --- a/cat/hood/reload-desk.hoon +++ b/gen/hood/reload-desk.hoon @@ -1,10 +1,11 @@ :: -:::: /hoon/reload/hood/cat +:::: /hoon/reload/hood/gen :: /? 314 :: :::: !: +:- %cat |= $: [now=@da eny=@uvI bec=beak] [arg=[desk (list term)] ~] == diff --git a/cat/hood/reload.hoon b/gen/hood/reload.hoon similarity index 76% rename from cat/hood/reload.hoon rename to gen/hood/reload.hoon index 99d74a06e..d619bad32 100644 --- a/cat/hood/reload.hoon +++ b/gen/hood/reload.hoon @@ -1,10 +1,11 @@ :: -:::: /hoon/reload/hood/cat +:::: /hoon/reload/hood/gen :: /? 314 :: :::: !: +:- %cat |= $: [now=@da eny=@uvI bec=beak] [arg=(list term) ~] == diff --git a/cat/hood/reset.hoon b/gen/hood/reset.hoon similarity index 74% rename from cat/hood/reset.hoon rename to gen/hood/reset.hoon index 6974c7ae6..31415365d 100644 --- a/cat/hood/reset.hoon +++ b/gen/hood/reset.hoon @@ -1,10 +1,11 @@ :: -:::: /hoon/reset/hood/cat +:::: /hoon/reset/hood/gen :: /? 314 :: :::: !: +:- %cat |= $: [now=@da eny=@uvI bec=beak] [arg=~ ~] == diff --git a/cat/hood/rf.hoon b/gen/hood/rf.hoon similarity index 75% rename from cat/hood/rf.hoon rename to gen/hood/rf.hoon index a43111479..c7d2f581a 100644 --- a/cat/hood/rf.hoon +++ b/gen/hood/rf.hoon @@ -1,10 +1,11 @@ :: -:::: /hoon/reload/hood/cat +:::: /hoon/reload/hood/gen :: /? 314 :: :::: !: +:- %cat |= $: [now=@da eny=@uvI bec=beak] [arg=~ ~] == diff --git a/cat/hood/rm.hoon b/gen/hood/rm.hoon similarity index 81% rename from cat/hood/rm.hoon rename to gen/hood/rm.hoon index 04af9e024..9360dbd17 100644 --- a/cat/hood/rm.hoon +++ b/gen/hood/rm.hoon @@ -1 +1,2 @@ +:- %cat |=([^ [input=path ~] ~] kiln-rm/input) diff --git a/cat/hood/schedule.hoon b/gen/hood/schedule.hoon similarity index 88% rename from cat/hood/schedule.hoon rename to gen/hood/schedule.hoon index 8e94d034c..bd33a2d4f 100644 --- a/cat/hood/schedule.hoon +++ b/gen/hood/schedule.hoon @@ -1 +1,2 @@ +:- %cat |=([^ [where=path tym=@da eve=@t ~] ~] kiln-schedule/[where tym eve]) diff --git a/cat/hood/start.hoon b/gen/hood/start.hoon similarity index 85% rename from cat/hood/start.hoon rename to gen/hood/start.hoon index 077c92e92..ee5549464 100644 --- a/cat/hood/start.hoon +++ b/gen/hood/start.hoon @@ -1,10 +1,11 @@ :: -:::: /hoon/start/hood/cat +:::: /hoon/start/hood/gen :: /? 314 :: :::: !: +:- %cat |= $: [now=@da eny=@uvI bec=beak] [arg=[@ $|(~ [@ ~])] ~] == diff --git a/cat/hood/sync.hoon b/gen/hood/sync.hoon similarity index 81% rename from cat/hood/sync.hoon rename to gen/hood/sync.hoon index 97ac1bbc4..368d1f729 100644 --- a/cat/hood/sync.hoon +++ b/gen/hood/sync.hoon @@ -1,10 +1,11 @@ :: -:::: /hoon/sync/hood/cat +:::: /hoon/sync/hood/gen :: /? 314 :: :::: !: +:- %cat |= $: [now=@da eny=@uvI bec=beak] [arg=[syd=@tas her=@p sud=@tas ~] ~] == diff --git a/cat/hood/unix.hoon b/gen/hood/unix.hoon similarity index 81% rename from cat/hood/unix.hoon rename to gen/hood/unix.hoon index 421d85617..7d119e885 100644 --- a/cat/hood/unix.hoon +++ b/gen/hood/unix.hoon @@ -1,10 +1,11 @@ :: -:::: /hoon/unix/hood/cat +:::: /hoon/unix/hood/gen :: /? 314 :: :::: !: +:- %cat |= $: [now=@da eny=@uvI bec=beak] [[syd=@tas syn=?(~ [? ~])] ~] == diff --git a/cat/hood/unmount.hoon b/gen/hood/unmount.hoon similarity index 78% rename from cat/hood/unmount.hoon rename to gen/hood/unmount.hoon index 73806b55c..f6a382c0b 100644 --- a/cat/hood/unmount.hoon +++ b/gen/hood/unmount.hoon @@ -1,10 +1,11 @@ :: -:::: /hoon/mount/hood/cat +:::: /hoon/mount/hood/gen :: /? 314 :: :::: !: +:- %cat |= $: [now=@da eny=@uvI bec=beak] [[mon=$|(term [span path]) ~] ~] == diff --git a/cat/hood/unsync.hoon b/gen/hood/unsync.hoon similarity index 80% rename from cat/hood/unsync.hoon rename to gen/hood/unsync.hoon index 655ba2828..540f94e5b 100644 --- a/cat/hood/unsync.hoon +++ b/gen/hood/unsync.hoon @@ -1,10 +1,11 @@ :: -:::: /hoon/unsync/hood/cat +:::: /hoon/unsync/hood/gen :: /? 314 :: :::: !: +:- %cat |= $: [now=@da eny=@uvI bec=beak] [arg=[syd=@tas her=@p sud=@tas ~] ~] == diff --git a/cat/hood/verb.hoon b/gen/hood/verb.hoon similarity index 94% rename from cat/hood/verb.hoon rename to gen/hood/verb.hoon index 68f941efe..2d0c6894a 100644 --- a/cat/hood/verb.hoon +++ b/gen/hood/verb.hoon @@ -7,6 +7,7 @@ :::: !: [sole .] +:- %cat |= $: [now=@da eny=@ bec=beak] [~ ~] == diff --git a/cat/ls.hoon b/gen/ls.hoon similarity index 85% rename from cat/ls.hoon rename to gen/ls.hoon index 1846bf6a8..f2d29e7d4 100644 --- a/cat/ls.hoon +++ b/gen/ls.hoon @@ -1,11 +1,12 @@ :: LiSt directory subnodes :: -:::: /hoon/ls/cat +:::: /hoon/ls/gen :: // /%/subdir !: :::: :: +:- %cat |= [^ [arg=path ~] ~] =+ lon=((hard arch) .^(%cy arg)) tang/[?~(dir.lon leaf/"~" (subdir arg dir.lon))]~ diff --git a/cat/ls/subdir.hoon b/gen/ls/subdir.hoon similarity index 100% rename from cat/ls/subdir.hoon rename to gen/ls/subdir.hoon diff --git a/gen/make.hoon b/gen/make.hoon new file mode 100644 index 000000000..944ac08e0 --- /dev/null +++ b/gen/make.hoon @@ -0,0 +1,2 @@ +:- %cat +|=([^ arg=(list ,@) foo=_`@`1 bar=_`@`2] noun/[arg foo bar]) \ No newline at end of file diff --git a/gen/pope.hoon b/gen/pope.hoon new file mode 100644 index 000000000..be64c3d64 --- /dev/null +++ b/gen/pope.hoon @@ -0,0 +1,24 @@ +:: Input twitter keys +/- sole +!: +=+ cryp=bruw :: XX change to ec2 ++brew eventually +=+ [sole] +:- %dog +|= $: [now=@da eny=@uvI bec=beak] + [[who=ship ~] ~] + == +^- (sole-result (cask tang)) +%+ sole-yo leaf/"generating carrier {(scow %p who)} (#{(scow %ud who)})" +%+ sole-lo [%| %pope-pass "passphrase: "] +%+ sole-go (boss 256 (star prn)) +|= fra=@t +%+ sole-lo [%| %pope-none "[press enter to compute]"] :: XX oy +%+ sole-go (easy ~) +|= ~ +=+ bur=(shax (add who (shax fra))) +~& %computing-fingerprint +=+ arc=(cryp 2.048 bur) +%+ sole-so %tang +:~ leaf/"generator: {(scow %uw bur)}" + leaf/"fingerprint: {(scow %uw fig:ex:arc)}" +== diff --git a/cat/solid.hoon b/gen/solid.hoon similarity index 96% rename from cat/solid.hoon rename to gen/solid.hoon index bfc641385..a5b9e0e0b 100644 --- a/cat/solid.hoon +++ b/gen/solid.hoon @@ -1,10 +1,11 @@ :: -:::: /hoon/solid/cat +:::: /hoon/solid/gen :: /? 314 :: :::: !: +:- %cat |= $: [now=@da eny=@uvI bec=beak] [~ ~] == diff --git a/cat/ticket.hoon b/gen/ticket.hoon similarity index 84% rename from cat/ticket.hoon rename to gen/ticket.hoon index a87115321..c49161948 100644 --- a/cat/ticket.hoon +++ b/gen/ticket.hoon @@ -1,10 +1,11 @@ :: -:::: /hoon/ticket/cat +:::: /hoon/ticket/gen :: /? 314 :: :::: !: +:- %cat |= $: [now=@da eny=@uvI bec=beak] [[her=@p ~] ~] == diff --git a/cat/tree.hoon b/gen/tree.hoon similarity index 92% rename from cat/tree.hoon rename to gen/tree.hoon index 0a9bc9102..3feee2847 100644 --- a/cat/tree.hoon +++ b/gen/tree.hoon @@ -1,10 +1,11 @@ :: Tree view recursive directory contents :: -:::: /hoon/tree/cat +:::: /hoon/tree/gen :: !: :::: :: +:- %cat |= [^ [pax=path fla=$|(~ [%full ~])] ~] =+ len=(lent pax) =+ rend=?^(fla dank:ut |=(a=path (dank:ut (slag len a)))) diff --git a/cat/twit/as.hoon b/gen/twit/as.hoon similarity index 94% rename from cat/twit/as.hoon rename to gen/twit/as.hoon index e08db6b12..5bcd603b6 100644 --- a/cat/twit/as.hoon +++ b/gen/twit/as.hoon @@ -3,6 +3,7 @@ :::: :: [twitter .] +:- %cat |= $: [now=@da eny=@uvI bec=beak] [[who=span msg=cord ~] ~] == diff --git a/dog/twit/auth.hoon b/gen/twit/auth.hoon similarity index 98% rename from dog/twit/auth.hoon rename to gen/twit/auth.hoon index 8fe5ab5e9..e25f48724 100644 --- a/dog/twit/auth.hoon +++ b/gen/twit/auth.hoon @@ -6,6 +6,7 @@ ++ baz64 (cook crip (star alp)) -- !: +:- %dog |= $: [now=@da eny=@uvI bec=beak] [~ ~] == diff --git a/dog/twit/auth/hoontap-keys.txt b/gen/twit/auth/hoontap-keys.txt similarity index 100% rename from dog/twit/auth/hoontap-keys.txt rename to gen/twit/auth/hoontap-keys.txt diff --git a/cat/twit/tweet.hoon b/gen/twit/tweet.hoon similarity index 100% rename from cat/twit/tweet.hoon rename to gen/twit/tweet.hoon diff --git a/cat/twit/twitter-feed.hoon b/gen/twit/twitter-feed.hoon similarity index 98% rename from cat/twit/twitter-feed.hoon rename to gen/twit/twitter-feed.hoon index 85d72c16f..9712e76aa 100644 --- a/cat/twit/twitter-feed.hoon +++ b/gen/twit/twitter-feed.hoon @@ -10,6 +10,7 @@ |_ [hide ~] ++ stat ,[id=@u who=@ta now=@da txt=@t] ++ rens +:- %cat |=(stat rose/[": " `~]^~[leaf/"{} @{(trip who)}" leaf/(trip txt)]) ++ peer ,_`. ++ poke--args diff --git a/sur/sole.hoon b/sur/sole.hoon index a377083f7..075e8ce58 100644 --- a/sur/sole.hoon +++ b/sur/sole.hoon @@ -13,44 +13,6 @@ haw=@uvH :: source hash ted=sole-edit :: state change == :: -++ sole-dialog :: standard dialog - |* out=$+(* *) :: output structure - $+(sole-input (sole-result out)) :: output function -:: :: -++ sole-result :: conditional result - |* out=$+(* *) :: output structure - $|(@ud (sole-product out)) :: error position -:: :: -++ sole-product :: success result - |* out=$+(* *) :: - %+ pair (list tank) :: - %+ each (unit out) :: ~ is abort - (pair sole-prompt (sole-dialog out)) :: ask and continue -:: :: -++ sole-so :: construct result - |* pro=* :: - [p=*(list tank) q=[%& p=[~ u=pro]]] :: -:: :: -++ sole-yo :: add output tank - |* [tan=tank res=(sole-result)] :: - ?@ res res :: - [p=[i=tan t=p.res] q=q.res] :: -:: :: -++ sole-lo :: construct prompt - |* [pom=sole-prompt mor=(sole-dialog)] :: - [p=*(list tank) q=[%| p=pom q=mor]] :: -:: :: -++ sole-no :: empty result - [p=*(list tank) q=~] :: -:: :: -++ sole-go :: parse by rule - |* [sef=_rule fun=$+(* *)] :: - |= txt=sole-input :: - =+ vex=(sef [0 0] txt) :: - ?: |(!=((lent txt) q.p.vex) ?=(~ q.vex)) :: - q.p.vex :: - (fun p.u.q.vex) :: -:: :: ++ sole-clock ,[own=@ud his=@ud] :: vector clock ++ sole-edit :: shared state change $% [%del p=@ud] :: delete one at @@ -83,10 +45,73 @@ tag=term :: history mode cad=tape :: caption == :: -++ sole-input tape :: prompt input ++ sole-share :: symmetric state $: ven=sole-clock :: our vector clock leg=(list sole-edit) :: unmerged edits buf=sole-buffer :: sole state == :: +:: :: +:: :: +++ sole-dialog :: standard dialog + |* out=$+(* *) :: output structure + $+(sole-input (sole-result out)) :: output function +:: :: +++ sole-input tape :: prompt input +++ sole-result :: conditional result + |* out=$+(* *) :: output structure + $|(@ud (sole-product out)) :: error position +:: :: +++ sole-product :: success result + |* out=$+(* *) :: + %+ pair (list tank) :: + %+ each (unit out) :: ~ is abort + (pair sole-prompt (sole-dialog out)) :: ask and continue +:: :: +++ sole-request :: scraper result + |* out=$+(* *) :: output structure + %+ pair (list tank) :: + %+ each (unit out) :: ~ is abort + %+ pair (list hiss) :: ask + $+((list httr) (sole-request out)) :: and continue +:: :: +++ sole-gen :: XX virtual type + $% [%cat $+((sole-args) (cask))] :: direct noun + [%dog $+((sole-args) (sole-product (cask)))] :: dialog + [%pig $+((sole-args) (sole-request (cask)))] :: scraper + == :: +++ sole-args :: generator arguments + |* _[lit=,* opt=,*] :: + ,[[now=@da eny=@uvI bek=beak] [lit opt]] :: +:: :: +:: :: +++ sole-so :: construct result + |* pro=* :: + [p=*(list tank) q=[%& p=[~ u=pro]]] :: +:: :: +++ sole-yo :: add output tank + |* [tan=tank res=(sole-result)] :: + ?@ res res :: + [p=[i=tan t=p.res] q=q.res] :: +:: :: +++ sole-lo :: construct prompt + |* [pom=sole-prompt mor=(sole-dialog)] :: + [p=*(list tank) q=[%| p=pom q=mor]] :: +:: :: +++ sole-at :: fetch url + |* [pul=_purl fun=$+(httr *)] :: + =< [p=*(list tank) q=[%| p=[pul %get ~ ~] q=.]] :: + |= rez=(list httr) :: + ?> ?=([^ ~] rez) :: + (fun i.rez) :: +:: :: +++ sole-no :: empty result + [p=*(list tank) q=~] :: +:: :: +++ sole-go :: parse by rule + |* [sef=_rule fun=$+(* *)] :: + |= txt=sole-input :: + =+ vex=(sef [0 0] txt) :: + ?: |(!=((lent txt) q.p.vex) ?=(~ q.vex)) :: + q.p.vex :: + (fun p.u.q.vex) :: -- From d291d0b59e1bddce1f675f3911c92e33a0cd1d85 Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Fri, 11 Sep 2015 14:36:16 -0700 Subject: [PATCH 06/11] separate mark `%as` and gate-application `%do` --- ape/dojo.hoon | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/ape/dojo.hoon b/ape/dojo.hoon index 1cb2660aa..608d4ae65 100644 --- a/ape/dojo.hoon +++ b/ape/dojo.hoon @@ -37,17 +37,14 @@ q=dojo-build :: general build == :: ++ dojo-build :: one ford step - $% [%ex p=twig] :: hoon expression - [%dv p=path] :: gate from source - [%fi p=dojo-filter q=dojo-source] :: filter + $% [%ur p=purl] :: http GET request [%ge p=dojo-model] :: generator + [%dv p=path] :: core from source + [%ex p=twig] :: hoon expression + [%as p=mark q=dojo-source] :: simple transmute + [%do p=twig q=dojo-source] :: gate apply [%tu p=(list dojo-source)] :: tuple - [%ur p=purl] :: http GET request == :: - ++ dojo-filter :: pipeline filter - $| mark :: simple transmute - twig :: function gate - :: ++ dojo-model :: data construction $: p=dojo-server :: core source q=dojo-config :: configuration @@ -153,11 +150,11 @@ ;~ pose ;~(plug (cold %ge lus) dp-model) ;~(plug (cold %ur lus) auri:epur) - ;~(plug (cold %fi cab) ;~((glue ace) dp-filter dp-source)) + ;~(plug (cold %as pam) sym ;~(pfix ace dp-source)) + ;~(plug (cold %do cab) dp-twig ;~(pfix ace dp-source)) dp-value == :: - ++ dp-filter ;~(pose ;~(sfix sym cab) dp-twig) :: ++dojo-filter ++ dp-goal :: ++goal %+ cook |=(a=goal a) ;~ pose @@ -244,7 +241,7 @@ %show =^(src +>.$ (dy-init-source p.mad) [mad(p src) +>.$]) %verb =^(src +>.$ (dy-init-source-unit q.mad) [mad(q src) +>.$]) %http - =. r.mad [0 %fi %mime r.mad] + =. r.mad [0 %as %mime r.mad] =^ src +>.$ (dy-init-source r.mad) [mad(r src) +>.$] == @@ -271,8 +268,8 @@ ?- -.bul %ex [bul +>.$] %dv [bul +>.$] - %fi =^ mor +>.$ (dy-init-source q.bul) - [bul(q mor) +>.$] + %as =^(mor +>.$ (dy-init-source q.bul) [bul(q mor) +>.$]) + %do =^(mor +>.$ (dy-init-source q.bul) [bul(q mor) +>.$]) %ge =^(mod +>.$ (dy-init-model p.bul) [[%ge mod] +>.$]) %ur [bul +>.$] %tu =^ dof +>.$ @@ -537,8 +534,8 @@ %ge (dy-silk-config (dy-cage p.p.p.bil) q.p.bil) %dv [/hand [%core he-beak (flop p.bil)]] %ex [/hand (dy-mare p.bil)] - %fi =+ dat=[%$ (dy-cage p.q.bil)] - [/hand ?@(p.bil [%cast p.bil dat] [%call (dy-mare p.bil) dat])] + %as [/hand [%cast p.bil [%$ (dy-cage p.q.bil)]]] + %do [/hand [%call (dy-mare p.bil) [%$ (dy-cage p.q.bil)]]] %tu :- /hand :- %$ :- %noun @@ -780,9 +777,9 @@ ?~ old `..prep ?- -.u.old %2 `..prep(+<+ u.old) - %1 `..prep(+<+ [%2 (~(run by p.u.old) |=(session-0 +<(poy ~)))]) + %1 `..prep(+<+ [%2 (~(run by p.u.old) |=(session-1 +<(poy ~)))]) %0 =< ^$(u.old [%1 (~(run by p.u.old) .)]) - |= sos=session-0 ^- session + |= sos=session-0 ^- session-1 [-.sos [[our.hid syd.sos ud/0] /] |3.sos] == :: From 56bbfa7eea0030cde0393fbbff7cd1de6fd79de7 Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Fri, 11 Sep 2015 15:46:16 -0700 Subject: [PATCH 07/11] support %pig scrapers --- ape/dojo.hoon | 31 +++++++++++++++++++++++++++++++ sur/sole.hoon | 8 ++------ 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/ape/dojo.hoon b/ape/dojo.hoon index 608d4ae65..0130422c1 100644 --- a/ape/dojo.hoon +++ b/ape/dojo.hoon @@ -518,6 +518,35 @@ [%pro pom(cad [':' ' ' cad.pom])] == :: + ++ dy-made-scar :: scraper product + |= cag=cage + ^+ +>+> + ?. ?=(^ q.q.cag) + (dy-diff %err q.q.cag) + =+ tan=((list tank) +2.q.q.cag) + =. +>+>.$ (he-diff %tan tan) + =+ vax=(spec (slot 3 q.cag)) + ~_ (sell q.cag) + ?+ -.q.vax !! + %& + ?~ +.q.vax + ~& %dy-made-scar-abort + (dy-rash %bel ~) + (dy-meal (slot 7 vax)) + :: + %| + =+ hiz=;;(hiss +<.q.vax) + %- (slog leaf/"< {(earn p.hiz)}" ~) + (dy-eyre(pro `(slap (slot 7 vax) cnzy/%q)) /scar hiz) + == + :: + ++ dy-sigh-scar :: scraper result + |= dat=cage + ?~ pro + ~& %dy-no-scraper + (dy-show dat) + (dy-slam(pux ~) /scar u.pro q.dat) + :: ++ dy-made-gent :: generator product |= cag=cage (dy-meal q.cag) @@ -669,6 +698,7 @@ [%hand ~] dy-hand:dye [%dial ~] dy-made-dial:dye [%gent ~] dy-made-gent:dye + [%scar ~] dy-made-scar:dye [%edit ~] dy-made-edit:dye == %| (he-diff(poy ~) %tan p.reg) @@ -685,6 +715,7 @@ ?+ way !! [%hand ~] dy-hand:dye [%show ~] dy-show:dye + [%scar ~] dy-sigh-scar:dye == :: ++ he-unto :: result from behn diff --git a/sur/sole.hoon b/sur/sole.hoon index 075e8ce58..a3bbd86b4 100644 --- a/sur/sole.hoon +++ b/sur/sole.hoon @@ -71,8 +71,7 @@ |* out=$+(* *) :: output structure %+ pair (list tank) :: %+ each (unit out) :: ~ is abort - %+ pair (list hiss) :: ask - $+((list httr) (sole-request out)) :: and continue + (pair hiss $+(httr (sole-request out))) :: fetch and continue :: :: ++ sole-gen :: XX virtual type $% [%cat $+((sole-args) (cask))] :: direct noun @@ -99,10 +98,7 @@ :: :: ++ sole-at :: fetch url |* [pul=_purl fun=$+(httr *)] :: - =< [p=*(list tank) q=[%| p=[pul %get ~ ~] q=.]] :: - |= rez=(list httr) :: - ?> ?=([^ ~] rez) :: - (fun i.rez) :: + [p=*(list tank) q=[%| p=[pul %get ~ ~] q=fun]] :: :: :: ++ sole-no :: empty result [p=*(list tank) q=~] :: From ecfefc1a9a1cc4a364e513312a6cef53273f657d Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Fri, 11 Sep 2015 15:52:37 -0700 Subject: [PATCH 08/11] more conservative dy-no-prompt --- ape/dojo.hoon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ape/dojo.hoon b/ape/dojo.hoon index 0130422c1..5f5df8a69 100644 --- a/ape/dojo.hoon +++ b/ape/dojo.hoon @@ -348,7 +348,7 @@ :: ++ dy-done :: dialog submit |= txt=tape - ?. ?=(^ pro) + ?: |(?=(^ per) ?=(^ pux) ?=(~ pro)) ~& %dy-no-prompt (dy-diff %bel ~) (dy-slam /dial u.pro !>(txt)) From 81eeb6714e88781185bfdfb3a75f3f1314120200 Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Fri, 11 Sep 2015 17:07:50 -0700 Subject: [PATCH 09/11] fix url grab --- ape/dojo.hoon | 4 ++-- ape/hood.hoon | 1 + lib/drum.hoon | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ape/dojo.hoon b/ape/dojo.hoon index 5f5df8a69..b84586a06 100644 --- a/ape/dojo.hoon +++ b/ape/dojo.hoon @@ -71,7 +71,7 @@ ++ goal ,[p=ship q=term] :: flat application ++ clap :: action, user $% [%peer p=path] :: subscribe - [%poke p=term q=*] :: apply + [%poke p=(cask)] :: apply [%pull ~] :: unsubscribe == :: ++ club :: action, system @@ -148,8 +148,8 @@ ++ dp-build :: ++dojo-build %+ knee *dojo-build |. ~+ ;~ pose - ;~(plug (cold %ge lus) dp-model) ;~(plug (cold %ur lus) auri:epur) + ;~(plug (cold %ge lus) dp-model) ;~(plug (cold %as pam) sym ;~(pfix ace dp-source)) ;~(plug (cold %do cab) dp-twig ;~(pfix ace dp-source)) dp-value diff --git a/ape/hood.hoon b/ape/hood.hoon index 794fea603..89e218f94 100644 --- a/ape/hood.hoon +++ b/ape/hood.hoon @@ -81,6 +81,7 @@ ++ peer-drum (wrap peer):from-drum ++ poke-dill-belt (wrap poke-dill-belt):from-drum ++ poke-drum-link (wrap poke-link):from-drum +::++ poke-drum-exit (wrap poke-exit):from-drum ++ poke-drum-start (wrap poke-start):from-drum ++ poke-helm-hi (wrap poke-hi):from-helm ++ poke-helm-init (wrap poke-init):from-helm diff --git a/lib/drum.hoon b/lib/drum.hoon index aeb36f9b8..0b5423803 100644 --- a/lib/drum.hoon +++ b/lib/drum.hoon @@ -215,6 +215,9 @@ =< se-abet =< se-view (se-link gyl) :: +:: ++ poke-exit :: +:: |=(~ se-abet:(se-blit `dill-blit`[%qit ~])) :: XX find bone +:: :: ++ reap-phat :: |= [way=wire saw=(unit tang)] =< se-abet =< se-view From 1755179ce3accf74737f9049e9adf29a0e1c8ff7 Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Fri, 11 Sep 2015 17:24:51 -0700 Subject: [PATCH 10/11] rename generators to %say, %ask, %get --- ape/dojo.hoon | 10 +++++----- gen/bit/address-contact.hoon | 2 +- gen/bit/auth.hoon | 2 +- gen/bit/buy.hoon | 2 +- gen/bit/contact-address.hoon | 2 +- gen/bit/list.hoon | 2 +- gen/bit/sell.hoon | 2 +- gen/bit/send.hoon | 2 +- gen/cat.hoon | 2 +- gen/coin/keys.hoon | 2 +- gen/curl/url.hoon | 2 +- gen/hello.hoon | 2 +- gen/hood/begin.hoon | 2 +- gen/hood/breload.hoon | 2 +- gen/hood/cp.hoon | 2 +- gen/hood/hi.hoon | 2 +- gen/hood/init.hoon | 2 +- gen/hood/invite.hoon | 2 +- gen/hood/label.hoon | 2 +- gen/hood/link.hoon | 2 +- gen/hood/mass.hoon | 2 +- gen/hood/merge.hoon | 2 +- gen/hood/mount.hoon | 2 +- gen/hood/mv.hoon | 2 +- gen/hood/rc.hoon | 2 +- gen/hood/reboot.hoon | 2 +- gen/hood/reload-desk.hoon | 2 +- gen/hood/reload.hoon | 2 +- gen/hood/reset.hoon | 2 +- gen/hood/rf.hoon | 2 +- gen/hood/rm.hoon | 2 +- gen/hood/schedule.hoon | 2 +- gen/hood/start.hoon | 2 +- gen/hood/sync.hoon | 2 +- gen/hood/unix.hoon | 2 +- gen/hood/unmount.hoon | 2 +- gen/hood/unsync.hoon | 2 +- gen/hood/verb.hoon | 2 +- gen/ls.hoon | 2 +- gen/make.hoon | 2 +- gen/pope.hoon | 2 +- gen/solid.hoon | 2 +- gen/ticket.hoon | 2 +- gen/tree.hoon | 2 +- gen/twit/as.hoon | 2 +- gen/twit/auth.hoon | 2 +- gen/twit/twitter-feed.hoon | 2 +- sur/sole.hoon | 6 +++--- 48 files changed, 54 insertions(+), 54 deletions(-) diff --git a/ape/dojo.hoon b/ape/dojo.hoon index b84586a06..beba41db4 100644 --- a/ape/dojo.hoon +++ b/ape/dojo.hoon @@ -470,15 +470,15 @@ |= [cay=cage cig=dojo-config] ^- [wire silk] :- ?+ -.q.q.cay ~|(%bad-gen ~_((sell (slot 2 q.cay)) !!)) - %cat /gent - %dog /dial - %pig /scar + %say /gent + %ask /dial + %get /scar == =+ gat=(slot 3 q.cay) :+ %call (dy-silk-vase gat) :+ (dy-silk-vase !>([now=now.hid eny=eny.hid bec=he-beak])) (dy-silk-sources p.cig) - :+ %mute (dy-silk-vase (slot 27 gat)) + :+ %mute (dy-silk-vase (fall (slew 27 gat) !>(~))) %+ turn (~(tap by q.cig)) |= [a=term b=(unit dojo-source)] ^- (pair wing silk) @@ -536,7 +536,7 @@ :: %| =+ hiz=;;(hiss +<.q.vax) - %- (slog leaf/"< {(earn p.hiz)}" ~) + =. ..dy (he-diff %tan leaf/"< {(earn p.hiz)}" ~) (dy-eyre(pro `(slap (slot 7 vax) cnzy/%q)) /scar hiz) == :: diff --git a/gen/bit/address-contact.hoon b/gen/bit/address-contact.hoon index f97e94f76..c468b96a8 100644 --- a/gen/bit/address-contact.hoon +++ b/gen/bit/address-contact.hoon @@ -6,7 +6,7 @@ :: ::::::: !: -:- %cat +:- %say |= [^ arg=[address=@t contact=@t ~] ~] :- %address-contact [address.arg contact.arg] diff --git a/gen/bit/auth.hoon b/gen/bit/auth.hoon index b3994bb8a..56f267404 100644 --- a/gen/bit/auth.hoon +++ b/gen/bit/auth.hoon @@ -5,7 +5,7 @@ :: ::::: !: -:- %cat +:- %say |= [^ [arg1=cord arg2=cord ~] ~] ::[arg=[cord cord ~] ~]] :- %auth [arg1 arg2] diff --git a/gen/bit/buy.hoon b/gen/bit/buy.hoon index a9c3a0135..4b1423c9d 100644 --- a/gen/bit/buy.hoon +++ b/gen/bit/buy.hoon @@ -5,7 +5,7 @@ :: ::::::: !: -:- %cat +:- %say |= [^ [amount=@t currency=@t ~] ~] :- %buy [amount currency] diff --git a/gen/bit/contact-address.hoon b/gen/bit/contact-address.hoon index fbf799b15..16770fb84 100644 --- a/gen/bit/contact-address.hoon +++ b/gen/bit/contact-address.hoon @@ -6,7 +6,7 @@ :: ::::::: !: -:- %cat +:- %say |= [^ arg=[contact=@t address=@t ~] ~] :- %bit-contact [contact.arg address.arg] diff --git a/gen/bit/list.hoon b/gen/bit/list.hoon index ee742c50b..9393e2bb5 100644 --- a/gen/bit/list.hoon +++ b/gen/bit/list.hoon @@ -5,7 +5,7 @@ :: ::::::: !: -:- %cat +:- %say |= [^ ~ ~] :- %list ~ diff --git a/gen/bit/sell.hoon b/gen/bit/sell.hoon index 8f142de9c..deb4fde69 100644 --- a/gen/bit/sell.hoon +++ b/gen/bit/sell.hoon @@ -5,7 +5,7 @@ :: ::::::: !: -:- %cat +:- %say |= [^ [amount=@t currency=@t ~] ~] :- %sell [amount currency] diff --git a/gen/bit/send.hoon b/gen/bit/send.hoon index ff80f4e40..c7dcb06ed 100644 --- a/gen/bit/send.hoon +++ b/gen/bit/send.hoon @@ -5,7 +5,7 @@ :: ::::::: !: -:- %cat +:- %say |= [^ [to=@uc amo=@t ~] ~] [%bit-send to amo] diff --git a/gen/cat.hoon b/gen/cat.hoon index e14182160..b59e13c51 100644 --- a/gen/cat.hoon +++ b/gen/cat.hoon @@ -7,7 +7,7 @@ !: :::: :: -:- %cat +:- %say |= [^ [arg=(list path)] ~] =- tang/(flop `tang`(zing -)) %+ turn arg diff --git a/gen/coin/keys.hoon b/gen/coin/keys.hoon index a2e81e3b6..7cdbd3935 100644 --- a/gen/coin/keys.hoon +++ b/gen/coin/keys.hoon @@ -5,7 +5,7 @@ :: :::: !: -:- %cat +:- %say |= [^ [arg=(list cord) ~]] :- %keys arg diff --git a/gen/curl/url.hoon b/gen/curl/url.hoon index 51ebcd204..5fc8ec339 100644 --- a/gen/curl/url.hoon +++ b/gen/curl/url.hoon @@ -5,6 +5,6 @@ :: ::::: !: -:- %cat +:- %say |= [^ [arg=tape ~] ~] purl/(scan arg auri:epur) diff --git a/gen/hello.hoon b/gen/hello.hoon index be63a0eaa..2fd84bf2c 100644 --- a/gen/hello.hoon +++ b/gen/hello.hoon @@ -5,7 +5,7 @@ :: :::: !: -:- %cat +:- %say |= [^ [[txt=@tas ~] ~]] :- %noun (crip (weld "hello, " (flop (trip txt)))) diff --git a/gen/hood/begin.hoon b/gen/hood/begin.hoon index 999ff4113..efc0ae5fb 100644 --- a/gen/hood/begin.hoon +++ b/gen/hood/begin.hoon @@ -11,7 +11,7 @@ ++ scug |*([a=@ b=(pole)] ?~(b ~ ?~(a ~ [-.b $(b +.b, a (dec a))]))) -- [sole .] -:- %dog +:- %ask |= $: [now=@da eny=@uvI bec=beak] [arg=_(scug *@ ~[his=*@p tic=*@p]) ~] == diff --git a/gen/hood/breload.hoon b/gen/hood/breload.hoon index 824527049..5bf49573e 100644 --- a/gen/hood/breload.hoon +++ b/gen/hood/breload.hoon @@ -5,7 +5,7 @@ :: :::: !: -:- %cat +:- %say |= $: [now=@da eny=@uvI bec=beak] [arg=(list term) ~] == diff --git a/gen/hood/cp.hoon b/gen/hood/cp.hoon index 7e523c7d3..a4dfce141 100644 --- a/gen/hood/cp.hoon +++ b/gen/hood/cp.hoon @@ -1,2 +1,2 @@ -:- %cat +:- %say |=([^ [input=path output=path ~] ~] kiln-cp/[input output]) diff --git a/gen/hood/hi.hoon b/gen/hood/hi.hoon index 048c2756b..fd4e96142 100644 --- a/gen/hood/hi.hoon +++ b/gen/hood/hi.hoon @@ -1,2 +1,2 @@ -:- %cat +:- %say |=([^ [who=ship mez=$|(~ [a=tape ~])] ~] helm-send-hi/[who ?~(mez ~ `a.mez)]) diff --git a/gen/hood/init.hoon b/gen/hood/init.hoon index 23b63708c..cf0beacc9 100644 --- a/gen/hood/init.hoon +++ b/gen/hood/init.hoon @@ -5,7 +5,7 @@ :: :::: !: -:- %cat +:- %say |= $: [now=@da eny=@uvI bec=beak] [~ ~] == diff --git a/gen/hood/invite.hoon b/gen/hood/invite.hoon index 5c992a59c..3792629d2 100644 --- a/gen/hood/invite.hoon +++ b/gen/hood/invite.hoon @@ -5,7 +5,7 @@ :: :::: !: -:- %cat +:- %say |= $: [now=@da eny=@uvI bec=beak] [[who=@p myl=@t ~] ~] == diff --git a/gen/hood/label.hoon b/gen/hood/label.hoon index ec414c06a..6f81d1bd3 100644 --- a/gen/hood/label.hoon +++ b/gen/hood/label.hoon @@ -5,7 +5,7 @@ :: :::: !: -:- %cat +:- %say |= $: [now=@da eny=@uvI bec=beak] [arg=[syd=desk lab=@tas ~] ~] == diff --git a/gen/hood/link.hoon b/gen/hood/link.hoon index 87cb6b9a9..0437ff949 100644 --- a/gen/hood/link.hoon +++ b/gen/hood/link.hoon @@ -5,7 +5,7 @@ :: :::: !: -:- %cat +:- %say |= $: [now=@da eny=@uvI byk=beak] [arg=$?([dap=term ~] [who=ship dap=term ~]) ~] == diff --git a/gen/hood/mass.hoon b/gen/hood/mass.hoon index e2f2e5b74..70bba8c89 100644 --- a/gen/hood/mass.hoon +++ b/gen/hood/mass.hoon @@ -5,7 +5,7 @@ :: :::: !: -:- %cat +:- %say |= $: [now=@da eny=@uvI bec=beak] [arg=~ ~] == diff --git a/gen/hood/merge.hoon b/gen/hood/merge.hoon index 382f7d358..a7620ba64 100644 --- a/gen/hood/merge.hoon +++ b/gen/hood/merge.hoon @@ -10,7 +10,7 @@ :: :::: !: -:- %cat +:- %say |= $: [now=@da eny=@uvI bek=beak] [arg=[?(sorc [syd=$|(desk beaky) sorc])] gem=?(%auto germ)] == diff --git a/gen/hood/mount.hoon b/gen/hood/mount.hoon index f8d5eb3a3..f060ca71d 100644 --- a/gen/hood/mount.hoon +++ b/gen/hood/mount.hoon @@ -5,7 +5,7 @@ :: :::: !: -:- %cat +:- %say |= $: [now=@da eny=@uvI bec=beak] [[pax=path pot=$|(~ [v=@tas ~])] ~] == diff --git a/gen/hood/mv.hoon b/gen/hood/mv.hoon index c0071d246..84ca6ad66 100644 --- a/gen/hood/mv.hoon +++ b/gen/hood/mv.hoon @@ -1,2 +1,2 @@ -:- %cat +:- %say |=([^ [input=path output=path ~] ~] kiln-mv/[input output]) diff --git a/gen/hood/rc.hoon b/gen/hood/rc.hoon index 891eb6bf9..109d587dc 100644 --- a/gen/hood/rc.hoon +++ b/gen/hood/rc.hoon @@ -5,7 +5,7 @@ :: :::: !: -:- %cat +:- %say |= $: [now=@da eny=@uvI bec=beak] [arg=~ ~] == diff --git a/gen/hood/reboot.hoon b/gen/hood/reboot.hoon index 9373033b2..15eb0d660 100644 --- a/gen/hood/reboot.hoon +++ b/gen/hood/reboot.hoon @@ -5,7 +5,7 @@ :: :::: !: -:- %cat +:- %say |= $: [now=@da eny=@uvI bec=beak] [arg=~ ~] == diff --git a/gen/hood/reload-desk.hoon b/gen/hood/reload-desk.hoon index 8ead15099..bac2b4195 100644 --- a/gen/hood/reload-desk.hoon +++ b/gen/hood/reload-desk.hoon @@ -5,7 +5,7 @@ :: :::: !: -:- %cat +:- %say |= $: [now=@da eny=@uvI bec=beak] [arg=[desk (list term)] ~] == diff --git a/gen/hood/reload.hoon b/gen/hood/reload.hoon index d619bad32..aadec03c1 100644 --- a/gen/hood/reload.hoon +++ b/gen/hood/reload.hoon @@ -5,7 +5,7 @@ :: :::: !: -:- %cat +:- %say |= $: [now=@da eny=@uvI bec=beak] [arg=(list term) ~] == diff --git a/gen/hood/reset.hoon b/gen/hood/reset.hoon index 31415365d..77115e8ad 100644 --- a/gen/hood/reset.hoon +++ b/gen/hood/reset.hoon @@ -5,7 +5,7 @@ :: :::: !: -:- %cat +:- %say |= $: [now=@da eny=@uvI bec=beak] [arg=~ ~] == diff --git a/gen/hood/rf.hoon b/gen/hood/rf.hoon index c7d2f581a..0bdfef13b 100644 --- a/gen/hood/rf.hoon +++ b/gen/hood/rf.hoon @@ -5,7 +5,7 @@ :: :::: !: -:- %cat +:- %say |= $: [now=@da eny=@uvI bec=beak] [arg=~ ~] == diff --git a/gen/hood/rm.hoon b/gen/hood/rm.hoon index 9360dbd17..7b7d3b449 100644 --- a/gen/hood/rm.hoon +++ b/gen/hood/rm.hoon @@ -1,2 +1,2 @@ -:- %cat +:- %say |=([^ [input=path ~] ~] kiln-rm/input) diff --git a/gen/hood/schedule.hoon b/gen/hood/schedule.hoon index bd33a2d4f..9cc675085 100644 --- a/gen/hood/schedule.hoon +++ b/gen/hood/schedule.hoon @@ -1,2 +1,2 @@ -:- %cat +:- %say |=([^ [where=path tym=@da eve=@t ~] ~] kiln-schedule/[where tym eve]) diff --git a/gen/hood/start.hoon b/gen/hood/start.hoon index ee5549464..8bc6aa8fb 100644 --- a/gen/hood/start.hoon +++ b/gen/hood/start.hoon @@ -5,7 +5,7 @@ :: :::: !: -:- %cat +:- %say |= $: [now=@da eny=@uvI bec=beak] [arg=[@ $|(~ [@ ~])] ~] == diff --git a/gen/hood/sync.hoon b/gen/hood/sync.hoon index 368d1f729..492a25a9d 100644 --- a/gen/hood/sync.hoon +++ b/gen/hood/sync.hoon @@ -5,7 +5,7 @@ :: :::: !: -:- %cat +:- %say |= $: [now=@da eny=@uvI bec=beak] [arg=[syd=@tas her=@p sud=@tas ~] ~] == diff --git a/gen/hood/unix.hoon b/gen/hood/unix.hoon index 7d119e885..b564ae7bc 100644 --- a/gen/hood/unix.hoon +++ b/gen/hood/unix.hoon @@ -5,7 +5,7 @@ :: :::: !: -:- %cat +:- %say |= $: [now=@da eny=@uvI bec=beak] [[syd=@tas syn=?(~ [? ~])] ~] == diff --git a/gen/hood/unmount.hoon b/gen/hood/unmount.hoon index f6a382c0b..63f77ce7f 100644 --- a/gen/hood/unmount.hoon +++ b/gen/hood/unmount.hoon @@ -5,7 +5,7 @@ :: :::: !: -:- %cat +:- %say |= $: [now=@da eny=@uvI bec=beak] [[mon=$|(term [span path]) ~] ~] == diff --git a/gen/hood/unsync.hoon b/gen/hood/unsync.hoon index 540f94e5b..873821bd1 100644 --- a/gen/hood/unsync.hoon +++ b/gen/hood/unsync.hoon @@ -5,7 +5,7 @@ :: :::: !: -:- %cat +:- %say |= $: [now=@da eny=@uvI bec=beak] [arg=[syd=@tas her=@p sud=@tas ~] ~] == diff --git a/gen/hood/verb.hoon b/gen/hood/verb.hoon index 2d0c6894a..2752ee691 100644 --- a/gen/hood/verb.hoon +++ b/gen/hood/verb.hoon @@ -7,7 +7,7 @@ :::: !: [sole .] -:- %cat +:- %say |= $: [now=@da eny=@ bec=beak] [~ ~] == diff --git a/gen/ls.hoon b/gen/ls.hoon index f2d29e7d4..f5e57f2b1 100644 --- a/gen/ls.hoon +++ b/gen/ls.hoon @@ -6,7 +6,7 @@ !: :::: :: -:- %cat +:- %say |= [^ [arg=path ~] ~] =+ lon=((hard arch) .^(%cy arg)) tang/[?~(dir.lon leaf/"~" (subdir arg dir.lon))]~ diff --git a/gen/make.hoon b/gen/make.hoon index 944ac08e0..0c7da0f69 100644 --- a/gen/make.hoon +++ b/gen/make.hoon @@ -1,2 +1,2 @@ -:- %cat +:- %say |=([^ arg=(list ,@) foo=_`@`1 bar=_`@`2] noun/[arg foo bar]) \ No newline at end of file diff --git a/gen/pope.hoon b/gen/pope.hoon index be64c3d64..073802899 100644 --- a/gen/pope.hoon +++ b/gen/pope.hoon @@ -3,7 +3,7 @@ !: =+ cryp=bruw :: XX change to ec2 ++brew eventually =+ [sole] -:- %dog +:- %ask |= $: [now=@da eny=@uvI bec=beak] [[who=ship ~] ~] == diff --git a/gen/solid.hoon b/gen/solid.hoon index a5b9e0e0b..382958b2c 100644 --- a/gen/solid.hoon +++ b/gen/solid.hoon @@ -5,7 +5,7 @@ :: :::: !: -:- %cat +:- %say |= $: [now=@da eny=@uvI bec=beak] [~ ~] == diff --git a/gen/ticket.hoon b/gen/ticket.hoon index c49161948..3358a916a 100644 --- a/gen/ticket.hoon +++ b/gen/ticket.hoon @@ -5,7 +5,7 @@ :: :::: !: -:- %cat +:- %say |= $: [now=@da eny=@uvI bec=beak] [[her=@p ~] ~] == diff --git a/gen/tree.hoon b/gen/tree.hoon index 3feee2847..5dadf46b0 100644 --- a/gen/tree.hoon +++ b/gen/tree.hoon @@ -5,7 +5,7 @@ !: :::: :: -:- %cat +:- %say |= [^ [pax=path fla=$|(~ [%full ~])] ~] =+ len=(lent pax) =+ rend=?^(fla dank:ut |=(a=path (dank:ut (slag len a)))) diff --git a/gen/twit/as.hoon b/gen/twit/as.hoon index 5bcd603b6..c61f56d64 100644 --- a/gen/twit/as.hoon +++ b/gen/twit/as.hoon @@ -3,7 +3,7 @@ :::: :: [twitter .] -:- %cat +:- %say |= $: [now=@da eny=@uvI bec=beak] [[who=span msg=cord ~] ~] == diff --git a/gen/twit/auth.hoon b/gen/twit/auth.hoon index e25f48724..dee562fe0 100644 --- a/gen/twit/auth.hoon +++ b/gen/twit/auth.hoon @@ -6,7 +6,7 @@ ++ baz64 (cook crip (star alp)) -- !: -:- %dog +:- %ask |= $: [now=@da eny=@uvI bec=beak] [~ ~] == diff --git a/gen/twit/twitter-feed.hoon b/gen/twit/twitter-feed.hoon index 9712e76aa..3b7de8970 100644 --- a/gen/twit/twitter-feed.hoon +++ b/gen/twit/twitter-feed.hoon @@ -10,7 +10,7 @@ |_ [hide ~] ++ stat ,[id=@u who=@ta now=@da txt=@t] ++ rens -:- %cat +:- %say |=(stat rose/[": " `~]^~[leaf/"{} @{(trip who)}" leaf/(trip txt)]) ++ peer ,_`. ++ poke--args diff --git a/sur/sole.hoon b/sur/sole.hoon index a3bbd86b4..1ebeb960c 100644 --- a/sur/sole.hoon +++ b/sur/sole.hoon @@ -74,9 +74,9 @@ (pair hiss $+(httr (sole-request out))) :: fetch and continue :: :: ++ sole-gen :: XX virtual type - $% [%cat $+((sole-args) (cask))] :: direct noun - [%dog $+((sole-args) (sole-product (cask)))] :: dialog - [%pig $+((sole-args) (sole-request (cask)))] :: scraper + $% [%say $+((sole-args) (cask))] :: direct noun + [%ask $+((sole-args) (sole-product (cask)))] :: dialog + [%get $+((sole-args) (sole-request (cask)))] :: scraper == :: ++ sole-args :: generator arguments |* _[lit=,* opt=,*] :: From e22d13c6a6b6678aa4aca9a17253ed64bce90bbf Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Fri, 11 Sep 2015 17:36:52 -0700 Subject: [PATCH 11/11] curl generator example --- gen/curl.hoon | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 gen/curl.hoon diff --git a/gen/curl.hoon b/gen/curl.hoon new file mode 100644 index 000000000..8c446c307 --- /dev/null +++ b/gen/curl.hoon @@ -0,0 +1,6 @@ +/- sole +[sole] +:- %get |= [^ [a=tape ~] ~] +%+ sole-at (scan a auri:epur) +|= hit=httr +(sole-so %httr hit)