shrub/main/app/shell/core.hook

147 lines
4.2 KiB
Plaintext
Raw Normal View History

2014-09-26 04:10:17 +04:00
:: Shell
2014-09-12 06:11:03 +04:00
::
2014-09-26 04:10:17 +04:00
:::: /hook/core/shell/app
2014-09-12 06:11:03 +04:00
::
/? 314
/- term-line
2014-09-26 04:10:17 +04:00
/= seeb /~ !>(.)
2014-09-12 06:11:03 +04:00
::
:::: structures
::
|% ::
++ gift ::
$% [%mean p=ares] ::
[%nice ~] ::
== ::
++ hapt ,[p=ship q=path] ::
++ move ,[p=bone q=(mold note gift)] ::
++ note ::
$% $: %g ::
2014-09-23 02:20:47 +04:00
$% [%cide p=span] ::
[%show p=hapt q=ship r=path] ::
[%sire p=term q=span] ::
2014-09-23 05:00:25 +04:00
[%mess p=hapt q=ship r=cage] ::
2014-09-25 04:37:29 +04:00
[%meta p=vase] ::
2014-09-12 06:11:03 +04:00
== == == ::
2014-09-23 05:00:25 +04:00
++ coma ::
2014-09-26 04:10:17 +04:00
$% [%start p=term q=(list twig)] ::
2014-09-23 05:00:25 +04:00
[%end p=cord] ::
[%path p=path] ::
2014-09-25 04:37:29 +04:00
[%hoon p=twig] ::
2014-09-23 05:00:25 +04:00
== ::
2014-09-12 06:11:03 +04:00
++ sign ::
$% $: %g ::
2014-09-23 02:20:47 +04:00
$% [%gone p=hapt] ::
2014-09-12 06:11:03 +04:00
[%mean p=ares] ::
2014-09-23 02:20:47 +04:00
[%nice ~] ::
2014-09-25 04:37:29 +04:00
[%rush p=%tang q=(list tank)] ::
[%rust p=%tang q=(list tank)] ::
2014-09-12 06:11:03 +04:00
== == == ::
--
!:
:::: program
::
2014-09-26 04:10:17 +04:00
|_ [hid=hide pid=@u pax=_`path`/=try=]
2014-09-23 05:00:25 +04:00
++ maybe
|* fel=_rule
;~ pose
(stag ~ fel)
(easy ~)
==
::
++ args
2014-09-26 04:10:17 +04:00
(star ;~(pfix ace wide:(vang | pax)))
2014-09-23 05:00:25 +04:00
::
2014-09-23 02:20:47 +04:00
++ parse
2014-09-23 05:00:25 +04:00
^- $+(nail (like coma))
2014-09-25 04:37:29 +04:00
=+ paf=?.(=('0' &3.pax) pax pax(&3 (scot da/lat.hid)))
2014-09-23 02:20:47 +04:00
;~ pose
2014-09-25 04:37:29 +04:00
(stag %start ;~(pfix col ;~(plug sym args(pax paf))))
2014-09-23 05:00:25 +04:00
(stag %end ;~(pfix sem sym))
2014-09-23 02:20:47 +04:00
(stag %path (sear plex rood):(vang | pax))
2014-09-25 04:37:29 +04:00
(stag %hoon wide:(vang | paf))
2014-09-23 02:20:47 +04:00
==
::
2014-09-12 06:11:03 +04:00
++ poke-txt
|= [ost=bone you=ship txt=cord]
^- [(list move) _+>]
2014-09-25 04:37:29 +04:00
=+ com=(rush txt parse)
?~ com
2014-09-23 05:00:25 +04:00
:_ +>.$
:~ [ost %give %nice ~]
2014-09-25 04:37:29 +04:00
(print ost you leaf/"Clarify {(trip txt)}" ~)
2014-09-23 05:00:25 +04:00
==
2014-09-25 04:37:29 +04:00
?- -.u.com
2014-09-23 02:20:47 +04:00
%path
2014-09-25 04:37:29 +04:00
=. pax p.u.com
2014-09-23 05:00:25 +04:00
:_ +>.$
:~ [ost %give %nice ~]
2014-09-25 04:37:29 +04:00
(print ost you leaf/"=% {(spud p.u.com)}" ~)
2014-09-23 05:00:25 +04:00
==
2014-09-23 02:20:47 +04:00
::
%start
2014-09-26 04:10:17 +04:00
=+ cil=(scot %ud pid)
=. pid +(pid)
2014-09-23 02:20:47 +04:00
:_ +>.$
2014-09-25 04:37:29 +04:00
:~ :^ ost %pass /child/[cil]/main
:+ %g %meta !>
:* %mess [our.hid cil imp.hid] you
2014-09-26 04:10:17 +04:00
(cat 3 p.u.com '-args') (slap seeb [%clsg q.u.com])
2014-09-25 04:37:29 +04:00
==
2014-09-23 05:00:25 +04:00
[ost %pass /child/[cil]/lines %g %show [our.hid cil imp.hid] you /lines]
2014-09-26 04:10:17 +04:00
[ost %pass /child/[cil] %g %sire p.u.com cil] :: XX strange order?
2014-09-25 04:37:29 +04:00
(print ost you leaf/"running {(trip p.u.com)}" ~)
2014-09-23 02:20:47 +04:00
==
::
%end
:_ +>.$
2014-09-25 04:37:29 +04:00
=* cil p.u.com
2014-09-26 04:10:17 +04:00
:* (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]
2014-09-23 02:20:47 +04:00
==
2014-09-25 04:37:29 +04:00
::
%hoon
:_ +>.$
2014-09-26 04:10:17 +04:00
:~ (print ost you (sell (slap seeb p.u.com)) ~)
2014-09-25 04:37:29 +04:00
[ost %give %nice ~]
==
2014-09-12 06:11:03 +04:00
==
::
++ pour
2014-09-23 03:06:55 +04:00
|= [ost=bone pax=path sih=*]
2014-09-12 06:11:03 +04:00
^- [(list move) _+>]
2014-09-25 04:37:29 +04:00
:: ~& [%shell-pour -.sih (,@ta +<.sih)]
2014-09-23 03:06:55 +04:00
=+ sih=((hard sign) sih)
2014-09-12 06:11:03 +04:00
:_ +>.$
2014-09-23 03:06:55 +04:00
?~ pax ~& %no-path !!
2014-09-23 02:20:47 +04:00
?+ &1.pax ~& %strange-path !!
2014-09-23 03:06:55 +04:00
%print
2014-09-23 05:00:25 +04:00
~
2014-09-23 03:06:55 +04:00
::
2014-09-23 02:20:47 +04:00
%child
2014-09-23 03:06:55 +04:00
?~ |1.pax ~& %no-child !!
?~ |2.pax
2014-09-23 02:20:47 +04:00
?> ?=(%gone +<.sih)
2014-09-23 05:00:25 +04:00
[ost %give %nice ~]~
2014-09-23 03:06:55 +04:00
?+ &3.pax ~& %strange-child-path !!
2014-09-23 05:00:25 +04:00
%main
?> ?=(?(%nice %mean) +<.sih)
[ost %give +.sih]~
2014-09-23 03:06:55 +04:00
%lines
?. ?=(?(%rust %rush) +<.sih) ~
2014-09-25 04:37:29 +04:00
:_ ~ (print ost our.hid q.sih)
2014-09-23 02:20:47 +04:00
==
==
::
++ print
2014-09-25 04:37:29 +04:00
|= [ost=bone you=ship tan=(list tank)]
=. &3.pax ?.(=('0' &3.pax) &3.pax '=')
2014-09-23 03:06:55 +04:00
:* ost %pass /print %g %mess
2014-09-23 02:20:47 +04:00
[our.hid +.imp.hid] you
2014-09-25 04:37:29 +04:00
%term-line !>(`term-line`[(spat pax) tan])
2014-09-23 02:20:47 +04:00
==
2014-09-12 06:11:03 +04:00
--