From 03fd56e8ccc5f9603397214343258cdcba9d2296 Mon Sep 17 00:00:00 2001 From: fang Date: Tue, 1 Dec 2020 23:38:02 +0100 Subject: [PATCH] various: start threads with unit of tuple args Instead of a list of arguments, with trailing ~. --- pkg/arvo/app/dojo.hoon | 12 +++++++++++- pkg/arvo/app/glob.hoon | 2 +- pkg/arvo/app/observe-hook.hoon | 2 +- pkg/arvo/app/spider.hoon | 2 +- pkg/arvo/ted/build-cast.hoon | 2 +- pkg/arvo/ted/build-file.hoon | 2 +- pkg/arvo/ted/build-mark.hoon | 2 +- pkg/arvo/ted/diff.hoon | 2 +- pkg/arvo/ted/dns/address.hoon | 2 +- pkg/arvo/ted/glob.hoon | 2 +- pkg/arvo/ted/graph/create.hoon | 2 +- pkg/arvo/ted/graph/delete.hoon | 2 +- pkg/arvo/ted/graph/groupify.hoon | 2 +- pkg/arvo/ted/graph/join.hoon | 2 +- pkg/arvo/ted/graph/leave.hoon | 2 +- pkg/arvo/ted/graph/restore.hoon | 2 +- pkg/arvo/ted/hi.hoon | 5 +++-- pkg/arvo/ted/invite/accepted-graph.hoon | 9 ++++----- pkg/arvo/ted/migrate-channels.hoon | 2 +- pkg/arvo/ted/read.hoon | 2 +- pkg/arvo/ted/test.hoon | 4 +++- pkg/arvo/ted/time.hoon | 2 +- pkg/arvo/ted/tree.hoon | 2 +- 23 files changed, 40 insertions(+), 28 deletions(-) diff --git a/pkg/arvo/app/dojo.hoon b/pkg/arvo/app/dojo.hoon index c34dd8ea89..c2bc08f3b3 100644 --- a/pkg/arvo/app/dojo.hoon +++ b/pkg/arvo/app/dojo.hoon @@ -728,6 +728,16 @@ :: ++ dy-cage |=(num=@ud (~(got by rez) num)) :: known cage ++ dy-vase |=(num=@ud q:(dy-cage num)) :: known vase + :: + ++ dy-some + |= src=(list dojo-source) + ^- vase + ?~ src !>(~) + %+ slop !>(~) + |- + ?~ t.src (dy-vase p.i.src) + (slop (dy-vase p.i.src) $(src t.src)) + :: ++ dy-sore |= src=(list dojo-source) ^- vase @@ -850,7 +860,7 @@ [%pass /wool %agent [our.hid %spider] %watch /thread-result/[tid]] %- he-card =/ =cage :: also sub - [%spider-start !>([~ `tid fil (dy-sore src)])] + [%spider-start !>([~ `tid fil (dy-some src)])] [%pass /wool %agent [our.hid %spider] %poke cage] :: ++ dy-make :: build step diff --git a/pkg/arvo/app/glob.hoon b/pkg/arvo/app/glob.hoon index 472f938331..23d18118ab 100644 --- a/pkg/arvo/app/glob.hoon +++ b/pkg/arvo/app/glob.hoon @@ -183,7 +183,7 @@ ^- (quip card _this) ?: ?=([%start ~] wire) =/ new-tid=@ta (cat 3 'glob--' (scot %uv eny.bowl)) - =/ args [~ `new-tid %glob !>([hash.state ~])] + =/ args [~ `new-tid %glob !>([~ hash.state])] =/ action !>([%unserve-dir serve-path]) :_ this(glob.state `[%| new-tid]) :~ (poke-file-server our.bowl %file-server-action action) diff --git a/pkg/arvo/app/observe-hook.hoon b/pkg/arvo/app/observe-hook.hoon index 174b90b13c..71b9e08f3f 100644 --- a/pkg/arvo/app/observe-hook.hoon +++ b/pkg/arvo/app/observe-hook.hoon @@ -148,7 +148,7 @@ [our.bowl %spider] %poke %spider-start - !>([~ `tid thread.observer (slop q.cage.sign !>(~))]) + !>([~ `tid thread.observer (slop !>(~) q.cage.sign)]) == == == :: diff --git a/pkg/arvo/app/spider.hoon b/pkg/arvo/app/spider.hoon index a328e0d476..bb3c360e66 100644 --- a/pkg/arvo/app/spider.hoon +++ b/pkg/arvo/app/spider.hoon @@ -290,7 +290,7 @@ =/ body=json (need (de-json:html q.u.body.request.inbound-request)) =/ input=vase - (slop (tube !>(body)) !>(~)) + (slop !>(~) (tube !>(body))) =/ =start-args [~ `tid thread input] =^ cards state diff --git a/pkg/arvo/ted/build-cast.hoon b/pkg/arvo/ted/build-cast.hoon index cf0a1c508d..fe85b0a180 100644 --- a/pkg/arvo/ted/build-cast.hoon +++ b/pkg/arvo/ted/build-cast.hoon @@ -5,7 +5,7 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<([pax=path ~] arg) +=+ !<([~ pax=path] arg) ?~ bem=(de-beam:format pax) (strand-fail:strand %path-not-beam >pax< ~) =/ =mars:clay [i i.t]:?>(?=([@ @ ~] s.u.bem) s.u.bem) diff --git a/pkg/arvo/ted/build-file.hoon b/pkg/arvo/ted/build-file.hoon index 8b3bda350a..55f231db76 100644 --- a/pkg/arvo/ted/build-file.hoon +++ b/pkg/arvo/ted/build-file.hoon @@ -5,7 +5,7 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<([pax=path ~] arg) +=+ !<([~ pax=path] arg) ?^ bem=(de-beam:format pax) (build-file:strandio u.bem) (strand-fail:strand %path-not-beam >pax< ~) diff --git a/pkg/arvo/ted/build-mark.hoon b/pkg/arvo/ted/build-mark.hoon index a134c896fe..72b4ffe9e3 100644 --- a/pkg/arvo/ted/build-mark.hoon +++ b/pkg/arvo/ted/build-mark.hoon @@ -5,7 +5,7 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<([pax=path ~] arg) +=+ !<([~ pax=path] arg) ?~ bem=(de-beam:format pax) (strand-fail:strand %path-not-beam >pax< ~) =/ =mark (rear s.u.bem) diff --git a/pkg/arvo/ted/diff.hoon b/pkg/arvo/ted/diff.hoon index 580416a4a7..6a4ff6cfd7 100644 --- a/pkg/arvo/ted/diff.hoon +++ b/pkg/arvo/ted/diff.hoon @@ -6,7 +6,7 @@ =/ m (strand ,vase) ^- form:m |^ -=+ !<([=a=path =b=path ~] arg) +=+ !<([~ =a=path =b=path] arg) =/ a-mark=mark -:(flop a-path) =/ b-mark=mark -:(flop b-path) ?. =(a-mark b-mark) diff --git a/pkg/arvo/ted/dns/address.hoon b/pkg/arvo/ted/dns/address.hoon index a5f5fb4b04..faf5b902c8 100644 --- a/pkg/arvo/ted/dns/address.hoon +++ b/pkg/arvo/ted/dns/address.hoon @@ -6,7 +6,7 @@ |^ =/ m (strand ,vase) ^- form:m -=+ !< [adr=address:dns ~] arg +=+ !< [~ adr=address:dns] arg :: ;< our=ship bind:m get-our:strandio =/ rac (clan:title our) diff --git a/pkg/arvo/ted/glob.hoon b/pkg/arvo/ted/glob.hoon index d50e7a114a..c207b7a1c8 100644 --- a/pkg/arvo/ted/glob.hoon +++ b/pkg/arvo/ted/glob.hoon @@ -5,7 +5,7 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<([hash=@uv ~] arg) +=+ !<([~ hash=@uv] arg) =/ url "https://bootstrap.urbit.org/glob-{(scow %uv hash)}.glob" ;< =cord bind:m (fetch-cord:strandio url) =+ ;;(=glob:glob (cue cord)) diff --git a/pkg/arvo/ted/graph/create.hoon b/pkg/arvo/ted/graph/create.hoon index e0c5448186..6e81e6636e 100644 --- a/pkg/arvo/ted/graph/create.hoon +++ b/pkg/arvo/ted/graph/create.hoon @@ -29,7 +29,7 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<([=action:graph-view ~] arg) +=+ !<([~ =action:graph-view] arg) ?> ?=(%create -.action) ;< =bowl:spider bind:m get-bowl:strandio :: diff --git a/pkg/arvo/ted/graph/delete.hoon b/pkg/arvo/ted/graph/delete.hoon index 1ffcdd97dc..8a3ea1b780 100644 --- a/pkg/arvo/ted/graph/delete.hoon +++ b/pkg/arvo/ted/graph/delete.hoon @@ -57,7 +57,7 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<([=action:graph-view ~] arg) +=+ !<([~ =action:graph-view] arg) ?> ?=(%delete -.action) ;< =bowl:spider bind:m get-bowl:strandio ?. =(our.bowl entity.rid.action) diff --git a/pkg/arvo/ted/graph/groupify.hoon b/pkg/arvo/ted/graph/groupify.hoon index 58a9ec4a90..7117f01e64 100644 --- a/pkg/arvo/ted/graph/groupify.hoon +++ b/pkg/arvo/ted/graph/groupify.hoon @@ -43,7 +43,7 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<([=action:graph-view ~] arg) +=+ !<([~ =action:graph-view] arg) ?> ?=(%groupify -.action) ;< =group bind:m (scry-group rid.action) ?. hidden.group diff --git a/pkg/arvo/ted/graph/join.hoon b/pkg/arvo/ted/graph/join.hoon index b4ebffff88..2e46fd9090 100644 --- a/pkg/arvo/ted/graph/join.hoon +++ b/pkg/arvo/ted/graph/join.hoon @@ -28,7 +28,7 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<([=action:graph-view ~] arg) +=+ !<([~ =action:graph-view] arg) ?> ?=(%join -.action) ;< =bowl:spider bind:m get-bowl:strandio ?: =(our.bowl entity.rid.action) diff --git a/pkg/arvo/ted/graph/leave.hoon b/pkg/arvo/ted/graph/leave.hoon index 9d0bc6797e..382841a7f7 100644 --- a/pkg/arvo/ted/graph/leave.hoon +++ b/pkg/arvo/ted/graph/leave.hoon @@ -49,7 +49,7 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<([=action:graph-view ~] arg) +=+ !<([~ =action:graph-view] arg) ?> ?=(%leave -.action) ;< =bowl:spider bind:m get-bowl:strandio ?: =(our.bowl entity.rid.action) diff --git a/pkg/arvo/ted/graph/restore.hoon b/pkg/arvo/ted/graph/restore.hoon index 5ed59534fd..ae03aa15e3 100644 --- a/pkg/arvo/ted/graph/restore.hoon +++ b/pkg/arvo/ted/graph/restore.hoon @@ -12,7 +12,7 @@ =/ m (strand ,vase) ^- form:m =+ !< - [[rid=resource title=@t description=@t group=resource module=@t ~] ~] + [~ rid=resource title=@t description=@t group=resource module=@t ~] arg ;< =bowl:spider bind:m get-bowl:strandio :: unarchive graph and share it diff --git a/pkg/arvo/ted/hi.hoon b/pkg/arvo/ted/hi.hoon index 2410c02110..5e02680a21 100644 --- a/pkg/arvo/ted/hi.hoon +++ b/pkg/arvo/ted/hi.hoon @@ -5,7 +5,8 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<([who=ship mez=$@(~ [=tape ~])] arg) -=/ message ?~(mez '' (crip tape.mez)) +=+ !<([~ arg=$@(who=ship [who=ship mez=tape])] arg) +=/ [who=ship message=@t] + ?@(arg [who.arg ''] [who.arg (crip mez.arg)]) ;< ~ bind:m (poke:strandio [who %hood] %helm-hi !>(message)) (pure:m !>("hi {} successful")) diff --git a/pkg/arvo/ted/invite/accepted-graph.hoon b/pkg/arvo/ted/invite/accepted-graph.hoon index bb1227082d..23aa836d27 100644 --- a/pkg/arvo/ted/invite/accepted-graph.hoon +++ b/pkg/arvo/ted/invite/accepted-graph.hoon @@ -10,7 +10,7 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<([=update:inv ~] arg) +=+ !<([~ =update:inv] arg) ?. ?=(%accepted -.update) (pure:m !>(~)) ;< =bowl:spider bind:m get-bowl:strandio @@ -21,8 +21,7 @@ ;< ~ bind:m %+ poke-our %spider =- spider-start+!>([`tid.bowl ~ %graph-join -]) - %+ slop - !> ^- action:graph-view - [%join resource.invite ship.invite] - !>(~) + %+ slop !>(~) + !> ^- action:graph-view + [%join resource.invite ship.invite] (pure:m !>(~)) diff --git a/pkg/arvo/ted/migrate-channels.hoon b/pkg/arvo/ted/migrate-channels.hoon index 4abc4b3f44..8334ccae47 100644 --- a/pkg/arvo/ted/migrate-channels.hoon +++ b/pkg/arvo/ted/migrate-channels.hoon @@ -5,7 +5,7 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=/ [og-path=path ng-path=path ~] !<([path path ~] arg) +=/ [~ og-path=path ng-path=path] !<([~ path path] arg) ;< bol=bowl:spider bind:m get-bowl:strandio |^ :: diff --git a/pkg/arvo/ted/read.hoon b/pkg/arvo/ted/read.hoon index 12816e9850..6d313c2ed4 100644 --- a/pkg/arvo/ted/read.hoon +++ b/pkg/arvo/ted/read.hoon @@ -7,7 +7,7 @@ ^- form:m :: Parse arguments as ship, desk, and path :: -=+ !<([=care:clay =ship =desk =case =target=path ~] arg) +=+ !<([~ =care:clay =ship =desk =case =target=path] arg) :: Read the file, possibly asyncrhonously :: ;< =bowl:spider bind:m get-bowl:strandio diff --git a/pkg/arvo/ted/test.hoon b/pkg/arvo/ted/test.hoon index f327adb926..755efd3529 100644 --- a/pkg/arvo/ted/test.hoon +++ b/pkg/arvo/ted/test.hoon @@ -104,8 +104,10 @@ |= arg=vase =/ m (strand ,vase) ^- form:m +=/ paz=(list path) + (tail !<([~ (list path)] arg)) =/ bez=(list beam) - (turn !<((list path) arg) |=(p=path (need (de-beam:format p)))) + (turn paz |=(p=path (need (de-beam:format p)))) ;< fiz=(set [=beam test=(unit term)]) bind:m (find-test-files bez) => .(fiz (sort ~(tap in fiz) aor)) =| test-arms=(map path (list test-arm)) diff --git a/pkg/arvo/ted/time.hoon b/pkg/arvo/ted/time.hoon index 02ba813c15..be3ff6dd0c 100644 --- a/pkg/arvo/ted/time.hoon +++ b/pkg/arvo/ted/time.hoon @@ -5,7 +5,7 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<([arg=@dr ~] arg) +=+ !<([~ arg=@dr] arg) ;< now-1=@da bind:m get-time:strandio ;< ~ bind:m (sleep:strandio arg) ;< now-2=@da bind:m get-time:strandio diff --git a/pkg/arvo/ted/tree.hoon b/pkg/arvo/ted/tree.hoon index 63dec6e08b..682cf8015c 100644 --- a/pkg/arvo/ted/tree.hoon +++ b/pkg/arvo/ted/tree.hoon @@ -5,7 +5,7 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<([pax=path ~] arg) +=+ !<([~ pax=path] arg) ;< bek=beak bind:m get-beak:strandio ;< paz=(list path) bind:m (list-tree:strandio bek (flop pax)) (pure:m !>(paz))