mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-17 11:51:32 +03:00
237 lines
6.8 KiB
Plaintext
237 lines
6.8 KiB
Plaintext
:: Shell
|
|
::
|
|
:::: /hook/core/shell/app
|
|
::
|
|
/? 314
|
|
/- term-line
|
|
/= seeb /~ !>(.)
|
|
::
|
|
:::: structures
|
|
::
|
|
|% ::
|
|
++ gift ::
|
|
$% [%rush p=%txt q=cord] ::
|
|
[%mean p=ares] ::
|
|
[%nice ~] ::
|
|
[%meta p=vase] ::
|
|
== ::
|
|
++ hapt ,[p=ship q=path] ::
|
|
++ move ,[p=bone q=(mold note gift)] ::
|
|
++ note ::
|
|
$% $: %g ::
|
|
$% [%cide p=span] ::
|
|
[%show p=hapt q=ship r=path] ::
|
|
[%sire p=term q=span] ::
|
|
[%mess p=hapt q=ship r=cage] ::
|
|
[%meta p=vase] ::
|
|
== == == ::
|
|
++ coma ::
|
|
$% [%start p=term q=(list twig)] ::
|
|
[%end p=cord] ::
|
|
[%path p=path] ::
|
|
[%hoon p=twig] ::
|
|
[%pipe p=term q=(list twig) r=term s=(list twig)] ::
|
|
== ::
|
|
++ sign ::
|
|
$% $: %g ::
|
|
$% [%gone p=hapt] ::
|
|
[%mean p=ares] ::
|
|
[%nice ~] ::
|
|
[%rush p=mark q=*] ::
|
|
[%rust p=mark q=*] ::
|
|
== == == ::
|
|
--
|
|
!:
|
|
:::: program
|
|
::
|
|
|_ $: hid=hide
|
|
pid=@u
|
|
pax=_`path`/=try=
|
|
act=(unit span)
|
|
pip=(map span span)
|
|
pop=(map span span)
|
|
==
|
|
++ maybe
|
|
|* fel=_rule
|
|
;~ pose
|
|
(stag ~ fel)
|
|
(easy ~)
|
|
==
|
|
::
|
|
++ args
|
|
(more ace wide:(vang | pax))
|
|
::
|
|
++ pipe
|
|
;~ plug
|
|
;~(pfix bar sym)
|
|
(ifix [sel ser] args)
|
|
;~(pfix bar ;~(plug sym args))
|
|
==
|
|
::
|
|
++ parse
|
|
^- $+(nail (like coma))
|
|
=+ paf=?.(=('0' &3.pax) pax pax(&3 (scot da/lat.hid)))
|
|
;~ pose
|
|
(stag %start ;~(pfix col ;~(plug sym args(pax paf))))
|
|
(stag %end ;~(pfix sem sym))
|
|
(stag %path (sear plex rood):(vang | pax))
|
|
(stag %pipe pipe(pax paf))
|
|
(stag %hoon tall:(vang | paf))
|
|
==
|
|
::
|
|
++ peer
|
|
|= [ost=bone you=ship pax=path]
|
|
^- [(list move) _+>]
|
|
?~ pax `+>.$
|
|
?+ i.pax `+>.$
|
|
%in
|
|
?~ t.pax `+>.$
|
|
?. (~(has by cub.hid) i.t.pax) `+>.$
|
|
?: (~(has by pop) i.t.pax) `+>.$
|
|
:_ +>.$(act `i.t.pax)
|
|
[(print ost you ~) ~]
|
|
==
|
|
::
|
|
++ poke-txt
|
|
|= [ost=bone you=ship txt=cord]
|
|
^- [(list move) _+>]
|
|
?: =('\\' (end 3 1 txt))
|
|
?+ (rsh 3 1 txt)
|
|
:_ +>.$
|
|
:~ (print ost you leaf/"no command" ~)
|
|
[ost %give %nice ~]
|
|
==
|
|
%c =. act ~
|
|
:_ +>.$
|
|
:~ (print ost you ~)
|
|
[ost %give %nice ~]
|
|
==
|
|
==
|
|
?^ act
|
|
:_ +>.$
|
|
:- [ost %give %nice ~]
|
|
(spam /in/[u.act] %rush %txt txt)
|
|
=+ com=(rush txt parse)
|
|
?~ com
|
|
:_ +>.$
|
|
:~ [ost %give %nice ~]
|
|
(print ost you leaf/"Clarify {(trip txt)}" ~)
|
|
==
|
|
?- -.u.com
|
|
%path
|
|
=. pax p.u.com
|
|
:_ +>.$
|
|
:~ [ost %give %nice ~]
|
|
(print ost you leaf/"=% {(spud p.u.com)}" ~)
|
|
==
|
|
::
|
|
%start
|
|
=+ cil=(scot %ud pid)
|
|
=. pid +(pid)
|
|
:_ +>.$
|
|
:~ :^ ost %pass /child/[cil]/main
|
|
:+ %g %meta !>
|
|
:* %mess [our.hid cil imp.hid] you
|
|
(cat 3 p.u.com '-args') (slap seeb [%clsg q.u.com])
|
|
==
|
|
[ost %pass /child/[cil]/out %g %show [our.hid cil imp.hid] you /out]
|
|
[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)}" ~)
|
|
%+ murn (~(tap by cub.hid)) |= [a=span b=term]
|
|
?. =(b cil) ~
|
|
%- some
|
|
[ost %pass /child/[a] %g %cide a]
|
|
==
|
|
::
|
|
%pipe
|
|
=+ cia=(scot %ud pid)
|
|
=+ cib=(scot %ud +(pid))
|
|
=. pid +(+(pid))
|
|
=. pip (~(put by pip) cia cib)
|
|
=. pop (~(put by pop) cib cia)
|
|
:_ +>.$
|
|
:~ :^ ost %pass /child/[cia]/main
|
|
:+ %g %meta !>
|
|
:* %mess [our.hid cia imp.hid] you
|
|
(cat 3 p.u.com '-args') (slap seeb [%clsg q.u.com])
|
|
==
|
|
:^ ost %pass /child/[cib]/main
|
|
:+ %g %meta !>
|
|
:* %mess [our.hid cib imp.hid] you
|
|
(cat 3 r.u.com '-args') (slap seeb [%clsg s.u.com])
|
|
==
|
|
[ost %pass /child/[cia]/out %g %show [our.hid cia imp.hid] you /out]
|
|
[ost %pass /child/[cia] %g %sire p.u.com cia] :: XX strange order?
|
|
[ost %pass /child/[cib]/out %g %show [our.hid cib imp.hid] you /out]
|
|
[ost %pass /child/[cib] %g %sire r.u.com cib] :: XX strange order?
|
|
(print ost you leaf/"running {(trip p.u.com)} into {(trip r.u.com)}" ~)
|
|
==
|
|
::
|
|
%hoon
|
|
:_ +>.$
|
|
:~ (print ost you (sell (slap seeb p.u.com)) ~)
|
|
[ost %give %nice ~]
|
|
==
|
|
==
|
|
::
|
|
++ purr
|
|
|= [ost=bone pax=path typ=type sih=sign]
|
|
^- [(list move) _+>]
|
|
:: ~& [%shell-pour -.sih (,@ta +<.sih)]
|
|
::=+ sih=((hard sign) sih)
|
|
?~ pax ~& %no-path !!
|
|
?+ &1.pax ~& %strange-path !!
|
|
%print
|
|
`+>.$
|
|
::
|
|
%child
|
|
?~ |1.pax ~& %no-child !!
|
|
?~ |2.pax
|
|
?> ?=(%gone +<.sih)
|
|
:- [ost %give %nice ~]~
|
|
+>.$(act ?:(=(act [~ &2.pax]) ~ act))
|
|
:_ +>.$
|
|
?+ &3.pax ~& %strange-child-path !!
|
|
%main
|
|
?> ?=(?(%nice %mean) +<.sih)
|
|
[ost %give +.sih]~
|
|
%out
|
|
?. ?=(?(%rust %rush) +<.sih) ~
|
|
?: (~(has by pip) &2.pax)
|
|
(spam /in/(~(got by pip) &2.pax) %meta (slot 3 typ sih))
|
|
:_ ~
|
|
%^ print ost our.hid
|
|
?+ p.sih
|
|
[(sell (slot 15 [typ sih]))]~
|
|
%tang
|
|
;;((list tank) q.sih)
|
|
==
|
|
== ==
|
|
::
|
|
++ print
|
|
|= [ost=bone you=ship tan=(list tank)]
|
|
=+ ^= pro
|
|
?^ act
|
|
(rap 3 (~(got by cub.hid) u.act) '(' u.act ') ' ~)
|
|
?. =('0' &3.pax)
|
|
(spat pax)
|
|
(rap 3 '/' &1.pax '/' &2.pax '=' ?~(|3.pax ~ [(spat |3.pax)]~))
|
|
:* ost %pass /print %g %mess
|
|
[our.hid +.imp.hid] you
|
|
%term-line !>(`term-line`[pro tan])
|
|
==
|
|
::
|
|
++ spam
|
|
|= [pax=path gip=gift]
|
|
^- (list move)
|
|
%+ turn
|
|
(~(tap in (~(get ju pus.hid) pax)))
|
|
|=(a=bone [a %give gip])
|
|
--
|