From dd0ea9574c97df099e0f643c3a82ba4669ce73dc Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Thu, 25 Sep 2014 17:10:17 -0700 Subject: [PATCH] PIDs --- main/app/demo/core.hook | 4 +++- main/app/ls/core.hook | 7 +++++-- main/app/shell/core.hook | 27 ++++++++++++++++----------- main/mar/ls-args/door.hook | 4 ++-- main/sur/demo-args/gate.hook | 2 +- 5 files changed, 27 insertions(+), 17 deletions(-) diff --git a/main/app/demo/core.hook b/main/app/demo/core.hook index 7e3c0b410a..3a1460a2d5 100644 --- a/main/app/demo/core.hook +++ b/main/app/demo/core.hook @@ -17,7 +17,9 @@ :* [ost %give %nice ~] %+ turn (~(tap by sup.hid)) |= [ost=bone *] - [ost %give %rush %txt (cat 3 p.arg (cat 3 ' says ' (scot %ud q.arg)))] + :- ost + :^ %give %rush %tang + [rose/[" " ~ ~]^~[leaf/ leaf/"says" leaf/(scow %ud q.arg)]]~ == :: ++ peer diff --git a/main/app/ls/core.hook b/main/app/ls/core.hook index 97aed3f166..86fa54b16a 100644 --- a/main/app/ls/core.hook +++ b/main/app/ls/core.hook @@ -1,14 +1,17 @@ !: |_ [hid=hide ~] ++ poke-ls-args - |= [ost=bone you=ship arg=path] + |= [ost=bone you=ship arg=path ~] =+ lon=((hard arch) .^(%cy arg)) :_ +>.$ - :* [ost %give %nice ~] + :* ::[ost %pass / %g %cide %$] + [ost %give %nice ~] %+ turn (~(tap by sup.hid)) |= [ost=bone *] :^ ost %give %rush :- %tang + :_ ~ + :+ %rose [" " ~ ~] (turn (~(tap by r.lon) ~) |=([a=@ta b=*] leaf/(trip a))) == ++ peer diff --git a/main/app/shell/core.hook b/main/app/shell/core.hook index 74bf552c5d..738c025c9f 100644 --- a/main/app/shell/core.hook +++ b/main/app/shell/core.hook @@ -1,9 +1,10 @@ -:: Terminal +:: Shell :: -:::: /hook/core/terminal/app +:::: /hook/core/shell/app :: /? 314 /- term-line +/= seeb /~ !>(.) :: :::: structures :: @@ -23,7 +24,7 @@ [%meta p=vase] :: == == == :: ++ coma :: - $% [%start p=cord q=twig] :: + $% [%start p=term q=(list twig)] :: [%end p=cord] :: [%path p=path] :: [%hoon p=twig] :: @@ -40,7 +41,7 @@ !: :::: program :: -|_ [hid=hide pax=_`path`/=try=] +|_ [hid=hide pid=@u pax=_`path`/=try=] ++ maybe |* fel=_rule ;~ pose @@ -49,7 +50,7 @@ == :: ++ args - ;~(pfix ace wide:(vang | pax)) + (star ;~(pfix ace wide:(vang | pax))) :: ++ parse ^- $+(nail (like coma)) @@ -79,28 +80,32 @@ == :: %start + =+ cil=(scot %ud pid) + =. pid +(pid) :_ +>.$ - =* cil p.u.com :~ :^ ost %pass /child/[cil]/main :+ %g %meta !> :* %mess [our.hid cil imp.hid] you - (cat 3 cil '-args') (slap seed q.u.com) + (cat 3 p.u.com '-args') (slap seeb [%clsg q.u.com]) == [ost %pass /child/[cil]/lines %g %show [our.hid cil imp.hid] you /lines] - [ost %pass /child/[cil] %g %sire cil cil] :: XX strange order? + [ost %pass /child/[cil] %g %sire p.u.com cil] :: XX strange order? (print ost you leaf/"running {(trip p.u.com)}" ~) == :: %end :_ +>.$ =* cil p.u.com - :~ (print ost you leaf/"killing {(trip cil)}" ~) - [ost %pass /child/[cil] %g %cide cil] + :* (print ost you leaf/"killing {(trip cil)}" ~) + %+ murn (~(tap by cub.hid)) |= [a=span b=term] + ?. =(b cil) ~ + %- some + [ost %pass /child/[a] %g %cide a] == :: %hoon :_ +>.$ - :~ (print ost you (sell (slap seed p.u.com)) ~) + :~ (print ost you (sell (slap seeb p.u.com)) ~) [ost %give %nice ~] == == diff --git a/main/mar/ls-args/door.hook b/main/mar/ls-args/door.hook index dfe2d7875a..0b6ef20fbb 100644 --- a/main/mar/ls-args/door.hook +++ b/main/mar/ls-args/door.hook @@ -2,13 +2,13 @@ :::: /hoon/core/zing/pro :: /? 314 -|_ pax=path +|_ pax=[path ~] :: ++ grab :: convert from |% ++ noun :: convert from %noun |= src=* ^+ +>+ - +>+(pax (path src)) + +>+(pax (,[path ~] src)) -- -- diff --git a/main/sur/demo-args/gate.hook b/main/sur/demo-args/gate.hook index 844ac961bb..a9046c9df2 100644 --- a/main/sur/demo-args/gate.hook +++ b/main/sur/demo-args/gate.hook @@ -1 +1 @@ -,[p=@t q=@ud] +,[p=@t q=@ud ~]