mirror of
https://github.com/urbit/shrub.git
synced 2024-12-14 01:08:54 +03:00
refactored terminal
This commit is contained in:
parent
7231bd8310
commit
9b627c6db1
@ -9,6 +9,14 @@
|
|||||||
:::: structures
|
:::: structures
|
||||||
::
|
::
|
||||||
|% ::
|
|% ::
|
||||||
|
++ axle ::
|
||||||
|
$: pid=@u ::
|
||||||
|
pax=_`path`/=try= ::
|
||||||
|
act=(unit span) ::
|
||||||
|
pip=(map span span) ::
|
||||||
|
pop=(map span span) ::
|
||||||
|
var=(map term vase) ::
|
||||||
|
== ::
|
||||||
++ gift ::
|
++ gift ::
|
||||||
$% [%rush p=gilt] ::
|
$% [%rush p=gilt] ::
|
||||||
[%mean p=ares] ::
|
[%mean p=ares] ::
|
||||||
@ -23,6 +31,7 @@
|
|||||||
$% [%term-line p=term-line] ::
|
$% [%term-line p=term-line] ::
|
||||||
[%txt p=cord] ::
|
[%txt p=cord] ::
|
||||||
== ::
|
== ::
|
||||||
|
++ glas $|(%out [%in p=cord]) ::
|
||||||
++ hapt ,[p=ship q=path] ::
|
++ hapt ,[p=ship q=path] ::
|
||||||
++ move ,[p=bone q=(mold note gift)] ::
|
++ move ,[p=bone q=(mold note gift)] ::
|
||||||
++ note ::
|
++ note ::
|
||||||
@ -119,184 +128,315 @@
|
|||||||
--
|
--
|
||||||
--
|
--
|
||||||
!:
|
!:
|
||||||
:::: program
|
:::: per event
|
||||||
::
|
::
|
||||||
|_ $: hid=hide
|
|%
|
||||||
pid=@u
|
++ ve
|
||||||
pax=_`path`/=try=
|
|= [hid=hide ost=bone axle]
|
||||||
act=(unit span)
|
=* vat +<+>
|
||||||
pip=(map span span)
|
=| mow=(list move)
|
||||||
pop=(map span span)
|
|%
|
||||||
var=(map term vase)
|
++ abet
|
||||||
==
|
^- [(list move) axle]
|
||||||
::
|
[(flop mow) vat]
|
||||||
++ peer :: handle subscription
|
|
||||||
|= [ost=bone you=ship pax=path]
|
|
||||||
^- [(list move) _+>]
|
|
||||||
?~ pax `+>.$
|
|
||||||
?+ i.pax `+>.$
|
|
||||||
%in :: to app
|
|
||||||
?~ t.pax `+>.$
|
|
||||||
?. (~(has by cub.hid) i.t.pax) `+>.$
|
|
||||||
?: (~(has by pop) i.t.pax) `+>.$
|
|
||||||
:_ +>.$(act `i.t.pax)
|
|
||||||
(print ost you ~)
|
|
||||||
%out :: to terminal
|
|
||||||
?> ?=(~ t.pax)
|
|
||||||
:_ +>.$
|
|
||||||
[ost %give %rush %term-line `term-line`[prompt ~ ~]]~
|
|
||||||
==
|
|
||||||
::
|
|
||||||
++ cubs :: tasks with open /in
|
|
||||||
%- sort :_ |=([a=span b=span] (lth (slav %ud a) (slav %ud b)))
|
|
||||||
^- (list span)
|
|
||||||
%+ murn (~(tap by sup.hid))
|
|
||||||
|= [@ @ a=path]
|
|
||||||
?. ?& ?=([%in cord ~] a)
|
|
||||||
(~(has by cub.hid) i.t.a)
|
|
||||||
!(~(has by pop) i.t.a)
|
|
||||||
==
|
|
||||||
~
|
|
||||||
(some i.t.a)
|
|
||||||
::
|
|
||||||
++ next-act :: rotate active task
|
|
||||||
=+ opt=[i=`(unit span)`~ t=(turn cubs |=(a=span `(unit span)`[~ a]))]
|
|
||||||
|-
|
|
||||||
?~ t.opt ~
|
|
||||||
?: =(act i.opt)
|
|
||||||
i.t.opt
|
|
||||||
$(opt t.opt)
|
|
||||||
::
|
|
||||||
++ poke-kyev :: handle key event
|
|
||||||
|= [ost=bone you=ship key=kyev]
|
|
||||||
^- [(list move) _+>]
|
|
||||||
?: ?=([~ @] key) (poke-txt ost you q.key) :: simple keypress
|
|
||||||
?> ?=([[%ctrl ~ ~] @t] key)
|
|
||||||
?+ q.key
|
|
||||||
:_ +>.$
|
|
||||||
:- [ost %give %nice ~]
|
|
||||||
(print ost you leaf/"no command \\{(trip q.key)}" ~)
|
|
||||||
%x =. act next-act
|
|
||||||
:_ +>.$
|
|
||||||
:- [ost %give %nice ~]
|
|
||||||
(print ost you ~)
|
|
||||||
%l =+ =- tak=rose/[" " "[" "]"]^(turn cubs -)
|
|
||||||
|= a=span
|
|
||||||
leaf/(trip (rap 3 (~(got by cub.hid) a) '(' a ')' ~))
|
|
||||||
[[[ost give/nice/~] (print ost you tak ~)] +>.$]
|
|
||||||
==
|
|
||||||
::
|
|
||||||
++ poke-txt :: handle command
|
|
||||||
|= [ost=bone you=ship txt=cord]
|
|
||||||
^- [(list move) _+>]
|
|
||||||
?: =('\\' (end 3 1 txt)) :: escaped ctrl-key
|
|
||||||
(poke-kyev ost you [%ctrl ~ ~] (rsh 3 1 txt))
|
|
||||||
?^ act :: pipe to child
|
|
||||||
:_ +>.$
|
|
||||||
:- [ost %give %nice ~]
|
|
||||||
(spam /in/[u.act] %rush %txt txt)
|
|
||||||
::
|
::
|
||||||
=- :_ con
|
++ blab
|
||||||
%+ welp (stash:con ost you txt)
|
|= mof=(list move)
|
||||||
?~ tak
|
+>.$(mow (welp mof mow))
|
||||||
mof
|
|
||||||
%+ welp
|
|
||||||
(print:con ost you tak ~)
|
|
||||||
[[ost %give %nice ~] mof]
|
|
||||||
^- [con=_+>.$ tak=$|(~ tank) mof=(list move)]
|
|
||||||
=+ pas=((full ~(parse from pax lat.hid)) [1 1] (trip txt))
|
|
||||||
?~ q.pas
|
|
||||||
[+>.$ leaf/"<syntax error at {<`[@ @]`p.pas>}>" ~]
|
|
||||||
=+ com=(wonk pas)
|
|
||||||
^- [con=_+>.$ tak=$|(~ tank) mof=(list move)]
|
|
||||||
?- -.com
|
|
||||||
%path
|
|
||||||
=. pax p.com
|
|
||||||
[+>.$ leaf/"=% {(spud p.com)}" ~]
|
|
||||||
::
|
::
|
||||||
?(%ins %mut %del)
|
++ chew-file
|
||||||
:- +>.$
|
|= [paf=path msg=tape tor=(unit toro)]
|
||||||
=+ paf=[.(&3 '=')]:?+(-.com p.com %del p.com)
|
^- (list move)
|
||||||
=- :- palm/[" " ~ ~ ~]^~[leaf/msg (dank:ut paf)]
|
%+ welp
|
||||||
(turn (drop tor) |=(a=toro [ost %pass writ/paf %c %info our.hid a]))
|
(print palm/[" " ~ ~ ~]^~[leaf/msg (dank:ut paf)])
|
||||||
^- [msg=tape tor=(unit toro)]
|
%+ turn (drop tor)
|
||||||
|-
|
|=(a=toro [ost %pass writ/paf %c %info our.hid a])
|
||||||
?- -.com
|
::
|
||||||
%ins
|
++ cubs :: tasks with open /in
|
||||||
?^ (file p.com) ["! exists" ~]
|
%- sort :_ |=([a=span b=span] (lth (slav %ud a) (slav %ud b)))
|
||||||
["written" `(foal p.com q:(exec (fall q.com [%bczp atom/%t])))]
|
^- (list span)
|
||||||
%mut
|
%+ murn (~(tap by sup.hid))
|
||||||
?~ (file p.com) $(com [%del p.com])
|
|= [@ @ a=path]
|
||||||
["changed" `(foal p.com q:(exec q.com))]
|
?. ?& ?=([%in cord ~] a)
|
||||||
%del
|
(~(has by cub.hid) i.t.a)
|
||||||
?~ (file p.com) ["! none" ~]
|
!(~(has by pop) i.t.a)
|
||||||
["written" `(fray p.com)]
|
==
|
||||||
|
~
|
||||||
|
(some i.t.a)
|
||||||
|
::
|
||||||
|
++ eat
|
||||||
|
|= [you=ship com=coma]
|
||||||
|
?- -.com
|
||||||
|
%path (eat-path +.com)
|
||||||
|
%ins (eat-ins +.com)
|
||||||
|
%mut (eat-mut +.com)
|
||||||
|
%del (eat-del +.com)
|
||||||
|
%run (eat-run you +.com)
|
||||||
|
%end (eat-end +.com)
|
||||||
|
%var (eat-var +.com)
|
||||||
|
%rvar (eat-rvar +.com)
|
||||||
|
%hoon (eat-hoon +.com)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
%run
|
++ eat-del
|
||||||
=+ mof=(print ost you leaf/"+ :{(trip p.q.com)}" ~)
|
|= paf=path
|
||||||
|
^+ +>
|
||||||
|
=. &3.paf '='
|
||||||
|
%- blab
|
||||||
|
%+ chew-file paf
|
||||||
|
?^ (file paf) ["! none" ~]
|
||||||
|
["deleted" `(fray paf)]
|
||||||
|
::
|
||||||
|
++ eat-end
|
||||||
|
|= poc=(each ,@u cord)
|
||||||
|
^+ +>
|
||||||
|
?- -.poc
|
||||||
|
%&
|
||||||
|
=+ cil=(scot %ud p.poc)
|
||||||
|
=+ cin=(trip (~(got by cub.hid) cil))
|
||||||
|
%+ blab
|
||||||
|
[ost %pass /child/[cil]/fork %g %cide cil]
|
||||||
|
(print leaf/"- :{cin}({(trip cil)})")
|
||||||
|
::
|
||||||
|
%|
|
||||||
|
=+ ^- moz=(list move)
|
||||||
|
%+ murn (~(tap by cub.hid))
|
||||||
|
|= [a=span b=term]
|
||||||
|
?. =(b p.poc) ~
|
||||||
|
%- some
|
||||||
|
[ost %pass /child/[a]/fork %g %cide a]
|
||||||
|
%- blab %+ welp moz
|
||||||
|
(print leaf/"-{<(lent moz)>} :{(trip p.poc)}")
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ eat-hoon
|
||||||
|
|= gen=twig
|
||||||
|
^+ +>
|
||||||
|
(blab (print (sell (exec gen))))
|
||||||
|
::
|
||||||
|
++ eat-ins
|
||||||
|
|= [paf=path gen=(unit twig)]
|
||||||
|
^+ +>
|
||||||
|
=. &3.paf '='
|
||||||
|
%- blab
|
||||||
|
%+ chew-file paf
|
||||||
|
?^ (file paf) ["! exists" ~]
|
||||||
|
:- "written"
|
||||||
|
`(foal paf q:(exec (fall gen [%bczp atom/%t])))
|
||||||
|
::
|
||||||
|
++ eat-mut
|
||||||
|
|= [paf=path gen=twig]
|
||||||
|
^+ +>
|
||||||
|
=. &3.paf '='
|
||||||
|
%- blab
|
||||||
|
%+ chew-file paf
|
||||||
|
?^ (file paf) ["! none" ~]
|
||||||
|
["changed" `(foal paf q:(exec gen))]
|
||||||
|
::
|
||||||
|
++ eat-path
|
||||||
|
|= paf=path
|
||||||
|
^+ +>
|
||||||
|
=. pax paf
|
||||||
|
(blab (print leaf/"=% {(spud paf)}"))
|
||||||
|
::
|
||||||
|
++ eat-run
|
||||||
|
|= [you=ship mud=(list mand) mad=mand]
|
||||||
|
^+ +>
|
||||||
|
=. +>.$ (blab (print leaf/"+ :{(trip p.mad)}"))
|
||||||
=| inp=(unit span)
|
=| inp=(unit span)
|
||||||
=< [+>.$ ~ mof]
|
=< +>.$
|
||||||
%+ reel
|
%+ reel
|
||||||
`(list mand)`(welp p.com q.com ~)
|
`(list mand)`(welp mud mad ~)
|
||||||
=+ a=[app=*mand .]
|
=+ a=[app=*mand .]
|
||||||
|.
|
|.
|
||||||
=> a
|
=> a
|
||||||
=+ cil=(scot %ud pid)
|
=+ cil=(scot %ud pid)
|
||||||
::~& [%pipsqueak <inp> <app>]
|
%_ +>
|
||||||
%_ +>
|
|
||||||
pid +(pid)
|
pid +(pid)
|
||||||
pip ?~ inp pip (~(put by pip) cil u.inp)
|
pip ?~ inp pip (~(put by pip) cil u.inp)
|
||||||
pop ?~ inp pop (~(put by pop) u.inp cil)
|
pop ?~ inp pop (~(put by pop) u.inp cil)
|
||||||
inp `cil
|
inp `cil
|
||||||
mof
|
mow
|
||||||
=+ yon=[our.hid cil imp.hid]
|
=+ yon=[our.hid cil imp.hid]
|
||||||
=+ mez=[(cat 3 p.app '-args') (exec [%clsg q.app])]
|
=+ mez=[(cat 3 p.app '-args') (exec [%clsg q.app])]
|
||||||
=- (weld (flop -) mof) :: XX strange order
|
%- welp :_ mow
|
||||||
^- (list move)
|
^- (list move)
|
||||||
:~ [ost %pass /child/[cil] %g %sire p.app cil]
|
:~ [ost %pass /child/[cil]/fork %g %sire p.app cil]
|
||||||
[ost %pass /child/[cil]/out %g %show yon you /out]
|
[ost %pass /child/[cil]/out %g %show yon you /out]
|
||||||
[ost %pass /child/[cil]/main %g %meta !>([%mess yon you mez])]
|
[ost %pass /child/[cil]/main %g %meta !>([%mess yon you mez])]
|
||||||
==
|
==
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
%end
|
++ eat-rvar
|
||||||
?: ?=(%& -.p.com)
|
|= vor=term
|
||||||
=+ cil=(scot %ud p.p.com)
|
^+ +>
|
||||||
=+ cin=(trip (~(got by cub.hid) cil))
|
=+ mod=(~(has by var) vor)
|
||||||
:- +>.$ :- ~
|
=. var (~(del by var) vor)
|
||||||
:_ (print ost you leaf/"- :{cin}({(trip cil)})" ~)
|
(blab (print leaf/"{?:(mod "var gone" "no var")} {<vor>}"))
|
||||||
[ost %pass /child/[cil] %g %cide cil]
|
|
||||||
=* cil p.p.com
|
|
||||||
=- [+>.$ leaf/"-{<(lent moz)>} :{(trip cil)}" moz]
|
|
||||||
^= moz
|
|
||||||
%+ murn (~(tap by cub.hid)) |= [a=span b=term]
|
|
||||||
?. =(b cil) ~
|
|
||||||
%- some
|
|
||||||
[ost %pass /child/[a] %g %cide a]
|
|
||||||
::
|
::
|
||||||
%var
|
++ eat-var
|
||||||
=+ old=(~(get by var) p.com)
|
|= [vor=term gen=twig]
|
||||||
=+ new=(exec q.com)
|
^+ +>
|
||||||
|
=+ old=(~(get by var) vor)
|
||||||
|
=+ new=(exec gen)
|
||||||
=+ mod=?~(old "new var" ?:(=(new u.old) "same var" "changed"))
|
=+ mod=?~(old "new var" ?:(=(new u.old) "same var" "changed"))
|
||||||
=. var (~(put by var) p.com new)
|
=. var (~(put by var) vor new)
|
||||||
[+>.$ leaf/"{mod} {<p.com>}" ~]
|
(blab (print leaf/"{mod} {<vor>}"))
|
||||||
::
|
::
|
||||||
%rvar
|
++ exec
|
||||||
=+ mod=(~(has by var) p.com)
|
|= gen=twig
|
||||||
=. var (~(del by var) p.com)
|
%- slap :_ gen
|
||||||
[+>.$ leaf/"{?:(mod "var gone" "no var")} {<p.com>}" ~]
|
%+ roll (~(tap by var))
|
||||||
|
=< .(q pit)
|
||||||
|
|= [[n=term v=vase] q=vase]
|
||||||
|
(slop [[%face n p.v] q.v] q)
|
||||||
::
|
::
|
||||||
%hoon
|
++ next-act :: rotate active task
|
||||||
[+>.$ (sell (exec p.com)) ~]
|
=+ opt=[i=`(unit span)`~ t=(turn cubs |=(a=span `(unit span)`[~ a]))]
|
||||||
==
|
|-
|
||||||
|
?~ t.opt ~
|
||||||
|
?: =(act i.opt)
|
||||||
|
i.t.opt
|
||||||
|
$(opt t.opt)
|
||||||
|
::
|
||||||
|
++ peer
|
||||||
|
|= [you=ship gal=glas]
|
||||||
|
^+ +>
|
||||||
|
?@ gal
|
||||||
|
%_ +>.$
|
||||||
|
mow :_(mow [ost %give %rush %term-line prompt ~ ~])
|
||||||
|
==
|
||||||
|
?. (~(has by cub.hid) p.gal) +>.$
|
||||||
|
?: (~(has by pop) p.gal) +>.$
|
||||||
|
=. act `p.gal
|
||||||
|
(blab ping)
|
||||||
|
::
|
||||||
|
++ ping (print-vase !>(*(list tank)))
|
||||||
|
++ poke-kyev
|
||||||
|
|= [you=ship key=kyev]
|
||||||
|
^+ +>
|
||||||
|
?: ?=([~ @] key) (poke-txt you q.key) :: simple keypress ?
|
||||||
|
?> ?=([[%ctrl ~ ~] @t] key)
|
||||||
|
?+ q.key
|
||||||
|
%+ blab
|
||||||
|
[ost %give %nice ~]
|
||||||
|
(print leaf/"no command \\{(trip q.key)}")
|
||||||
|
%x =. act next-act
|
||||||
|
(blab [ost %give %nice ~] ping)
|
||||||
|
%l =+ =- tak=rose/[" " "[" "]"]^(turn cubs -)
|
||||||
|
|= a=span
|
||||||
|
leaf/(trip (rap 3 (~(got by cub.hid) a) '(' a ')' ~))
|
||||||
|
(blab [ost give/nice/~] (print tak))
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ poke-txt :: handle command
|
||||||
|
|= [you=ship txt=cord]
|
||||||
|
^+ +>
|
||||||
|
?: =('\\' (end 3 1 txt)) :: escaped ctrl-key
|
||||||
|
(poke-kyev you [%ctrl ~ ~] (rsh 3 1 txt))
|
||||||
|
?^ act :: pipe to child
|
||||||
|
%+ blab
|
||||||
|
[ost %give %nice ~]
|
||||||
|
(spam /in/[u.act] %rush %txt txt)
|
||||||
|
=+ pas=((full ~(parse from pax lat.hid)) [1 1] (trip txt))
|
||||||
|
?~ q.pas
|
||||||
|
(blab (print leaf/"<syntax error at {<`[@ @]`p.pas>}>"))
|
||||||
|
=+ com=(wonk pas)
|
||||||
|
=> .(+>.$ (eat you com))
|
||||||
|
=. +>.$ (blab (stash txt))
|
||||||
|
+>.$(mow :_(mow [ost %give %nice ~]))
|
||||||
|
::
|
||||||
|
++ print |=(a=tank (print-vase !>(`(list tank)`[a ~])))
|
||||||
|
++ print-vase
|
||||||
|
|= tan=vase :: [p=p:!>(*(list tank)) q=*]
|
||||||
|
^- (list move)
|
||||||
|
%^ spam /out %meta
|
||||||
|
:(slop !>(%rush) !>(%term-line) !>(prompt) !>(~) tan)
|
||||||
|
::
|
||||||
|
++ prompt
|
||||||
|
^- @t
|
||||||
|
?^ act
|
||||||
|
(rap 3 (~(got by cub.hid) u.act) '(' u.act ') ' ~)
|
||||||
|
?. &(?=([@ @ @ *] pax) =('0' &3.pax))
|
||||||
|
(rsh 3 1 (spat pax))
|
||||||
|
(rap 3 &1.pax '/' &2.pax '=' ?~(|3.pax ~ [(spat |3.pax)]~))
|
||||||
|
::
|
||||||
|
++ purr
|
||||||
|
|= [cil=span fom=?(%fork %out %main) typ=type sih=sign]
|
||||||
|
^+ +>
|
||||||
|
?< ?=(?(%sage %verb %veer %vega) +<.sih)
|
||||||
|
?- fom
|
||||||
|
%fork
|
||||||
|
?> ?=(%gone +<.sih)
|
||||||
|
%_ +>.$
|
||||||
|
mow :_(mow [ost %give %nice ~])
|
||||||
|
act ?:(=(act [~ cil]) ~ act)
|
||||||
|
==
|
||||||
|
::
|
||||||
|
%main
|
||||||
|
?> ?=(?(%nice %mean) +<.sih)
|
||||||
|
(blab [ost %give +.sih] ping)
|
||||||
|
::
|
||||||
|
%out
|
||||||
|
?. ?=(?(%rust %rush) +<.sih) +>.$
|
||||||
|
%- blab
|
||||||
|
?: (~(has by pip) cil)
|
||||||
|
(spam /in/(~(got by pip) cil) %meta (slot 3 typ sih))
|
||||||
|
%- print-vase
|
||||||
|
?+ p.sih
|
||||||
|
!>([(sell (slot 15 [typ sih]))]~)
|
||||||
|
%tang
|
||||||
|
(slot 15 [typ sih])
|
||||||
|
%txt
|
||||||
|
?^ q.sih !! :: move to vase space?
|
||||||
|
!>([leaf/(trip q.sih)]~)
|
||||||
|
==
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ spam
|
||||||
|
|= [pax=path gip=gift]
|
||||||
|
^- (list move)
|
||||||
|
%+ turn
|
||||||
|
(~(tap in (~(get ju pus.hid) pax)))
|
||||||
|
|=(a=bone [a %give gip])
|
||||||
|
::
|
||||||
|
++ stash
|
||||||
|
|= a=cord
|
||||||
|
%^ spam /out %meta
|
||||||
|
!>([%rush %term-line `term-line`[prompt [a]~ ~]])
|
||||||
|
--
|
||||||
|
--
|
||||||
|
!:
|
||||||
|
:::: formal interface
|
||||||
|
::
|
||||||
|
|_ [hid=hide vat=axle]
|
||||||
|
::
|
||||||
|
++ peer :: handle subscription
|
||||||
|
|= [ost=bone you=ship pax=path]
|
||||||
|
^- [(list move) _+>]
|
||||||
|
?~ pax `+>.$
|
||||||
|
?. ?=(?(%in %out) i.pax) `+>.$
|
||||||
|
=+ ^= gal
|
||||||
|
?: ?=(%out i.pax) %out
|
||||||
|
[%in ?<(?=(~ t.pax) i.pax)]
|
||||||
|
=+ abet:(peer:(ve hid ost vat) you gal)
|
||||||
|
[-< +>.$(vat ->)]
|
||||||
|
::
|
||||||
|
++ poke-kyev :: handle key event
|
||||||
|
|= [ost=bone you=ship key=kyev]
|
||||||
|
^- [(list move) _+>]
|
||||||
|
=+ abet:(poke-kyev:(ve hid ost vat) you key)
|
||||||
|
[-< +>.$(vat ->)]
|
||||||
|
::
|
||||||
|
++ poke-txt :: handle command
|
||||||
|
|= [ost=bone you=ship txt=cord]
|
||||||
|
^- [(list move) _+>]
|
||||||
|
=+ abet:(poke-txt:(ve hid ost vat) you txt)
|
||||||
|
[-< +>.$(vat ->)]
|
||||||
::
|
::
|
||||||
++ purr
|
++ purr
|
||||||
|= [ost=bone pax=path typ=type sih=sign]
|
|= [ost=bone pax=path typ=type sih=sign]
|
||||||
^- [(list move) _+>]
|
^- [(list move) _+>]
|
||||||
::~& shel-purr/pax
|
|
||||||
:: ~& [%shell-pour -.sih (,@ta +<.sih)]
|
|
||||||
::=+ sih=((hard sign) sih)
|
|
||||||
?: ?=(%sage +<.sih) :: vomit
|
?: ?=(%sage +<.sih) :: vomit
|
||||||
[[ost %give +.sih]~ +>.$]
|
[[ost %give +.sih]~ +>.$]
|
||||||
?: ?=(%verb +<.sih) :: vomit
|
?: ?=(%verb +<.sih) :: vomit
|
||||||
@ -306,74 +446,7 @@
|
|||||||
?: ?=(%vega +<.sih) :: vomit
|
?: ?=(%vega +<.sih) :: vomit
|
||||||
[[ost %give +.sih]~ +>.$]
|
[[ost %give +.sih]~ +>.$]
|
||||||
?~ pax ~& %no-path !!
|
?~ pax ~& %no-path !!
|
||||||
?+ &1.pax ~& %strange-path !!
|
?> ?=([%child span ?(%fork %out %main) ~] pax)
|
||||||
%print
|
=+ abet:(purr:(ve hid ost vat) i.t.pax i.t.t.pax typ sih)
|
||||||
`+>.$
|
[-< +>.$(vat ->)]
|
||||||
::
|
|
||||||
%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]
|
|
||||||
::~& act
|
|
||||||
(print ost our.hid ~)
|
|
||||||
%out
|
|
||||||
?. ?=(?(%rust %rush) +<.sih) ~
|
|
||||||
?: (~(has by pip) &2.pax)
|
|
||||||
:: ~& [%yay &2.pax <pip> <pop>]
|
|
||||||
:: ~& [%spamming-to /in/(~(got by pip) &2.pax) (~(get ju pus.hid) /in/(~(got by pip) &2.pax))]
|
|
||||||
(spam /in/(~(got by pip) &2.pax) %meta (slot 3 typ sih))
|
|
||||||
:: ~& [%nay &2.pax <pip> <pop>]
|
|
||||||
%^ print-vase ost our.hid
|
|
||||||
?+ p.sih
|
|
||||||
!>([(sell (slot 15 [typ sih]))]~)
|
|
||||||
%tang
|
|
||||||
(slot 15 [typ sih])
|
|
||||||
%txt
|
|
||||||
?^ q.sih !! :: move to vase space?
|
|
||||||
!>([leaf/(trip q.sih)]~)
|
|
||||||
==
|
|
||||||
== ==
|
|
||||||
::
|
|
||||||
++ stash
|
|
||||||
|= [a=bone b=ship c=cord]
|
|
||||||
::~& shel-stash/[prompt c]
|
|
||||||
%^ spam /out %meta
|
|
||||||
!>([%rush %term-line `term-line`[prompt [c]~ ~]])
|
|
||||||
::
|
|
||||||
++ print |=([a=bone b=ship c=(list tank)] (print-vase a b !>(c)))
|
|
||||||
++ print-vase
|
|
||||||
|= [ost=bone you=ship tan=vase] :: [p=p:!>(*(list tank)) q=*]
|
|
||||||
^- (list move)
|
|
||||||
::~& shel-print/prompt
|
|
||||||
%^ spam /out %meta
|
|
||||||
:(slop !>(%rush) !>(%term-line) !>(prompt) !>(~) tan)
|
|
||||||
::
|
|
||||||
++ prompt
|
|
||||||
^- @t
|
|
||||||
?^ act
|
|
||||||
(rap 3 (~(got by cub.hid) u.act) '(' u.act ') ' ~)
|
|
||||||
?. &(?=([@ @ @ *] pax) =('0' &3.pax))
|
|
||||||
(rsh 3 1 (spat pax))
|
|
||||||
(rap 3 &1.pax '/' &2.pax '=' ?~(|3.pax ~ [(spat |3.pax)]~))
|
|
||||||
++ exec
|
|
||||||
|= gen=twig
|
|
||||||
%- slap :_ gen
|
|
||||||
%+ roll (~(tap by var))
|
|
||||||
=< .(q pit)
|
|
||||||
|= [[n=term v=vase] q=vase]
|
|
||||||
(slop [[%face n p.v] q.v] q)
|
|
||||||
::
|
|
||||||
++ spam
|
|
||||||
|= [pax=path gip=gift]
|
|
||||||
^- (list move)
|
|
||||||
%+ turn
|
|
||||||
(~(tap in (~(get ju pus.hid) pax)))
|
|
||||||
|=(a=bone [a %give gip])
|
|
||||||
--
|
--
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
[ost %pass [%resp pax] %g %show [our [auc imp]] you /out]~
|
[ost %pass [%resp pax] %g %show [our [auc imp]] you /out]~
|
||||||
--
|
--
|
||||||
!:
|
!:
|
||||||
:::: per-shell
|
:::: per shell
|
||||||
::
|
::
|
||||||
|%
|
|%
|
||||||
++ se
|
++ se
|
||||||
@ -216,7 +216,7 @@
|
|||||||
--
|
--
|
||||||
--
|
--
|
||||||
!:
|
!:
|
||||||
:::: public interface
|
:::: formal interface
|
||||||
::
|
::
|
||||||
|_ [hid=hide axle]
|
|_ [hid=hide axle]
|
||||||
++ peer
|
++ peer
|
||||||
|
Loading…
Reference in New Issue
Block a user