mirror of
https://github.com/urbit/shrub.git
synced 2024-12-14 20:02:51 +03:00
Merge branch 'dillbo' into talk
This commit is contained in:
commit
c74d00f2ec
@ -1662,7 +1662,6 @@
|
||||
?- -.bon
|
||||
%beer
|
||||
:_ fox(zac (~(put by zac.fox) p.bon `corn`[hen ~ ~ ~]))
|
||||
~& [%ames-clop p.bon hen]
|
||||
:* [hen [%slip %c %init p.bon]]
|
||||
[hen [%give %init p.bon]]
|
||||
[hen [%slip %a %kick now]]
|
||||
|
@ -54,7 +54,7 @@
|
||||
[%sag p=path q=*] :: save to jamfile
|
||||
[%sav p=path q=@] :: save to file
|
||||
== ::
|
||||
++ gill ,@tas :: general contact
|
||||
++ gill (pair ship term) :: general contact
|
||||
-- ::
|
||||
=> |% :: console protocol
|
||||
++ axle :: all dill state
|
||||
@ -250,7 +250,6 @@
|
||||
(done %blit [bit ~])
|
||||
::
|
||||
++ init :: initialize
|
||||
~& [%dill-init our]
|
||||
=+ myt=(flop (need tem))
|
||||
=. tem ~
|
||||
=. moz :_(moz [hen %pass ~ %g %show [our [ram ~]] our ~])
|
||||
@ -282,6 +281,12 @@
|
||||
[hen %pass ~ %g %mess [our [ram ~]] our [%dill-belt -:!>(bet) bet]]
|
||||
==
|
||||
::
|
||||
++ took :: send rush ack
|
||||
%_ .
|
||||
moz
|
||||
:_(moz [hen %pass ~ %g %took [our [ram ~]] our])
|
||||
==
|
||||
::
|
||||
++ take :: receive
|
||||
|= sih=sign
|
||||
^+ +>
|
||||
@ -314,8 +319,7 @@
|
||||
+>
|
||||
::
|
||||
[%g %rush %dill-blit *]
|
||||
=. moz :_(moz `move`[hen %pass ~ %g %took [our [ram ~]] our])
|
||||
(from +>+.sih)
|
||||
took:(from +>+.sih)
|
||||
::
|
||||
[%t %wake *]
|
||||
:: ~& %dill-wake
|
||||
@ -369,7 +373,15 @@
|
||||
=: ore.all `p.q.hic
|
||||
dug.all ~
|
||||
==
|
||||
=^ moz all abet:(need (ax (need hey.all) [%flow %seat %dojo ~]))
|
||||
=+ ^= flo ^- (list (pair ship term))
|
||||
=+ myr=(clan p.q.hic)
|
||||
?: =(%pawn myr)
|
||||
~
|
||||
?: =(%earl myr)
|
||||
=+ fap=(sein p.q.hic)
|
||||
[[fap %dojo] [fap %talk] ~]
|
||||
[[p.q.hic %dojo] [p.q.hic %talk] ~]
|
||||
=^ moz all abet:(need (ax (need hey.all) [%flow %seat flo]))
|
||||
[moz ..^$]
|
||||
=+ nus=(ax hen q.hic)
|
||||
?~ nus
|
||||
@ -401,7 +413,6 @@
|
||||
^- [p=(list move) q=_..^$]
|
||||
?: =(~ ore.all)
|
||||
?: ?=([%a %init *] q.hin)
|
||||
~& [%dill-take-dump-init hen +.q.hin]
|
||||
=. hey.all ?^(hey.all hey.all `hen)
|
||||
[[[hen %give +.q.hin] ~] ..^$]
|
||||
~& [%take-back q.hin]
|
||||
|
@ -259,8 +259,8 @@
|
||||
|= [pax=path hen=duct hin=(hypo sign)] ::
|
||||
^- [p=(list move) q=_..^$]
|
||||
?: ?=(%crud +<.q.hin)
|
||||
:: ~& [%gall-crud-error pax hen]
|
||||
:: ~& [%gall-crud-data (,[@tas (list tank)] +>.q.hin)]
|
||||
~& [%gall-crud-error pax hen]
|
||||
~& [%gall-crud-data (,[@tas (list tank)] +>.q.hin)]
|
||||
?> ?=(%g -.q.hin)
|
||||
?~ pax ~& %strange-path [~ ..^$]
|
||||
=+ lum=(lump t.pax)
|
||||
@ -435,8 +435,10 @@
|
||||
:_ ..^$
|
||||
=+ rod=|=(ron=roon `note`[%a %wont [our you] [%q %gh imp] num ron])
|
||||
?+ -.pax !!
|
||||
%m ?: ?=(%a -.sih) ~
|
||||
?+ -.sih ~& [%gall-gave-m -.sih] !!
|
||||
%z ?+ -.sih !!
|
||||
%a :_ ~ :- hen
|
||||
[%pass [%r pax] %g %took [our imp] you]
|
||||
::
|
||||
%f
|
||||
:_ ~ :- hen
|
||||
?- -.p.+.sih
|
||||
@ -446,27 +448,6 @@
|
||||
::
|
||||
%g
|
||||
:_ ~ :- hen
|
||||
?- -.+.sih
|
||||
%crud !!
|
||||
%dumb !!
|
||||
%gone !!
|
||||
%init !!
|
||||
%logo !!
|
||||
%mean [%give %mean p.+.sih]
|
||||
%nice [%give %nice ~]
|
||||
%rush !!
|
||||
%rust !!
|
||||
%sage !!
|
||||
%verb !!
|
||||
%veer !!
|
||||
%vega !!
|
||||
==
|
||||
==
|
||||
%s ?+ -.sih !!
|
||||
%a :_ ~ :- hen
|
||||
[%pass [%r pax] %g %took [our imp] you]
|
||||
%g
|
||||
:_ ~ :- hen
|
||||
?- -.+.sih
|
||||
%crud !!
|
||||
%dumb !!
|
||||
@ -511,7 +492,8 @@
|
||||
^- move :- hen
|
||||
:+ %pass
|
||||
:* %r
|
||||
?-(-.rok %m %m, %s %s, %u %s)
|
||||
:: ?-(-.rok %m %m, %s %s, %u %s)
|
||||
%z
|
||||
(scot %p p.saq)
|
||||
(scot %p q.saq)
|
||||
(scot %ud num)
|
||||
@ -1160,10 +1142,9 @@
|
||||
:: ~& [%yawn-told-has ost qol [our hen]]
|
||||
=+ qul=?~(qol 1 +(u.qol))
|
||||
=. qel.sat (~(put by qel.sat) ost qul)
|
||||
:: XX turn me back on!
|
||||
:: ?: =(10 qul)
|
||||
:: ~& [%yawn-told-full ost our hen]
|
||||
:: +>.$(qic.sat ~, vey.sat (~(put to vey.sat) hen %nuke p.kon))
|
||||
?: =(10 qul)
|
||||
~& [%yawn-told-full ost our hen]
|
||||
+>.$(qic.sat ~, vey.sat (~(put to vey.sat) hen %nuke p.kon))
|
||||
+>.$(qic.sat ~)
|
||||
::
|
||||
%load
|
||||
|
@ -2862,10 +2862,11 @@
|
||||
++ rash |*([naf=@ sab=_rule] (scan (trip naf) sab)) ::
|
||||
++ ruse |* [los=tape sab=_rule]
|
||||
=+ vex=(sab [[0 0] los])
|
||||
?. =((lent los) q.p.vex) ~
|
||||
=+ len=(lent los)
|
||||
?. =(len q.p.vex) [%| p=q.p.vex]
|
||||
?~ q.vex
|
||||
[~ u=~]
|
||||
[~ u=[~ u=p.u.q.vex]]
|
||||
[%| p=len]
|
||||
[%& p=p.u.q.vex]
|
||||
++ rush |*([naf=@ sab=_rule] (rust (trip naf) sab))
|
||||
++ rust |* [los=tape sab=_rule]
|
||||
=+ vex=((full sab) [[1 1] los])
|
||||
|
@ -22,6 +22,7 @@
|
||||
++ dojo-command ::
|
||||
$% [%flat p=path q=dojo-source] :: noun to unix atom
|
||||
[%pill p=path q=dojo-source] :: noun to unix pill
|
||||
:: [%tree p=path q=dojo-source] :: noun to unix tree
|
||||
[%poke p=goal q=dojo-source] :: make and poke
|
||||
[%show p=dojo-source] :: print
|
||||
[%verb p=term q=dojo-source] :: store variable
|
||||
@ -31,19 +32,18 @@
|
||||
q=dojo-build :: general build
|
||||
== ::
|
||||
++ dojo-build :: one ford step
|
||||
$% :: [%ca p=mark q=dojo-build] :: cast
|
||||
[%ex p=twig] :: hoon expression
|
||||
$% [%ex p=twig] :: hoon expression
|
||||
[%di p=dojo-model] :: dialog
|
||||
[%dv p=path] :: gate from source
|
||||
[%fi p=(list dojo-filter) q=dojo-source] :: filter pipeline
|
||||
[%fi p=dojo-filter q=dojo-source] :: filter
|
||||
[%sc p=dojo-model] :: script
|
||||
[%tu p=(list dojo-source)] :: tuple
|
||||
[%va p=term] :: dojo variable
|
||||
== ::
|
||||
++ dojo-filter :: pipeline filter
|
||||
$% [%a p=twig] :: direct gate
|
||||
$% [%a p=twig] :: function gate
|
||||
[%b p=mark] :: simple transmute
|
||||
[%c p=dojo-source] :: full filter
|
||||
[%c p=dojo-model] :: formal filter
|
||||
== ::
|
||||
++ dojo-model :: data construction
|
||||
$: p=dojo-server :: core source
|
||||
@ -377,10 +377,13 @@
|
||||
|= cag=cage
|
||||
^+ +>+>
|
||||
?> ?=(^ per)
|
||||
?: |(?=(^ q.q.cag) =((lent buf.say) q.q.cag))
|
||||
?: ?| ?=(^ q.q.cag)
|
||||
=((lent buf.say) q.q.cag)
|
||||
!&(?=(%del -.u.per) =(+(p.u.per) (lent buf.say)))
|
||||
==
|
||||
dy-abet(per ~)
|
||||
=^ lic say (~(transmit cs say) u.per)
|
||||
(dy-rush(per ~) %mor [%bel ~] [%det lic] ~)
|
||||
(dy-rush(per ~) %mor [%det lic] [%err q.q.cag] ~)
|
||||
::
|
||||
++ dy-done :: dialog submit
|
||||
|= txt=tape
|
||||
@ -391,7 +394,6 @@
|
||||
^+ +>
|
||||
?- -.mad
|
||||
%poke
|
||||
~& [%dy-over-poke p.mad]
|
||||
%- he-pass(poy ~)
|
||||
:* /poke
|
||||
%g
|
||||
@ -474,8 +476,7 @@
|
||||
|= cag=cage
|
||||
^+ +>+>
|
||||
?. ?=(^ q.q.cag)
|
||||
~& %dy-made-dial-fail
|
||||
(dy-rash %bel ~)
|
||||
(dy-rush %err q.q.cag)
|
||||
=+ tan=((list tank) +2.q.q.cag)
|
||||
=. +>+>.$ (he-rush %tan tan)
|
||||
=+ vax=(spec (slot 3 q.cag))
|
||||
@ -558,6 +559,10 @@
|
||||
^+ +>
|
||||
(he-give %rush %console-effect fec)
|
||||
::
|
||||
++ he-stop :: abort work
|
||||
^+ .
|
||||
?~(poy . ~(dy-stop dy u.poy))
|
||||
::
|
||||
++ he-peer :: subscribe to
|
||||
he-prom
|
||||
::
|
||||
@ -600,14 +605,18 @@
|
||||
++ he-stir :: apply change
|
||||
|= cal=console-change
|
||||
^+ +>
|
||||
:: ~& [%his-clock ler.cal]
|
||||
:: ~& [%our-clock ven.say]
|
||||
=^ dat say (~(transceive cs say) cal)
|
||||
?. ?& ?=(%del -.dat)
|
||||
=(+(p.dat) (lent buf.say))
|
||||
:: =(+(p.dat) (lent buf.say))
|
||||
==
|
||||
+>.$
|
||||
=+ foy=(he-dope (tufa buf.say))
|
||||
?: ?=(%& -.foy) +>.$
|
||||
:: ~& [%bad-change dat ted.cal]
|
||||
=^ lic say (~(transmit cs say) dat)
|
||||
:: ~& [%our-leg leg.say]
|
||||
(he-rush %mor [%det lic] [%err q.p.foy] ~)
|
||||
::
|
||||
++ he-plan :: execute command
|
||||
@ -619,6 +628,12 @@
|
||||
++ he-done :: parse command
|
||||
|= txt=tape
|
||||
^+ +>
|
||||
?~ txt
|
||||
%- he-rush
|
||||
:~ %mor
|
||||
[%txt "> "]
|
||||
[%nex ~]
|
||||
==
|
||||
=+ doy=(he-duke txt)
|
||||
?- -.doy
|
||||
%| (he-rush [%err p.doy])
|
||||
@ -649,9 +664,10 @@
|
||||
++ peer
|
||||
|= [ost=bone her=ship pax=path]
|
||||
^- [(list move) _+>]
|
||||
~? !=(her our.hid) [%dojo-peer ost her pax]
|
||||
?< (~(has by hoc) ost)
|
||||
?> =(/console pax)
|
||||
?> =(her our.hid)
|
||||
:: ?> =(her our.hid)
|
||||
=< he-abet
|
||||
%~ he-peer he
|
||||
:- [ost ~]
|
||||
@ -667,6 +683,7 @@
|
||||
++ poke-console-action
|
||||
|= [ost=bone her=ship act=console-action]
|
||||
^- [(list move) _+>]
|
||||
:: ~? !=(her our.hid) [%dojo-poke ost her]
|
||||
he-abet:(~(he-type he [ost [ost %give %nice ~]~] (~(got by hoc) ost)) act)
|
||||
::
|
||||
++ pour
|
||||
@ -678,7 +695,13 @@
|
||||
he-abet:(~(he-made he [[ost ~] (~(got by hoc) ost)]) pax +>.sih)
|
||||
::
|
||||
%g
|
||||
~& [%dojo-pour sih]
|
||||
[~ +>.$]
|
||||
==
|
||||
::
|
||||
++ pull
|
||||
|= ost=bone
|
||||
^- [(list move) _+>]
|
||||
=^ moz +>
|
||||
he-abet:~(he-stop he [[ost ~] (~(got by hoc) ost)])
|
||||
[moz +>.$(hoc (~(del by hoc) ost))]
|
||||
--
|
||||
|
@ -15,14 +15,14 @@
|
||||
$: edg=_79 :: terminal columns
|
||||
off=@ud :: window offset
|
||||
kil=(unit (list ,@c)) :: kill buffer
|
||||
apt=(list term) :: application ring
|
||||
maz=(unit (list ,@c)) :: master window
|
||||
feg=(map term target) :: live applications
|
||||
mir=(pair ,@ud (list ,@c)) :: mirrored state
|
||||
apt=(list gill) :: application ring
|
||||
maz=master :: master window
|
||||
feg=(map gill target) :: live applications
|
||||
mir=(pair ,@ud (list ,@c)) :: mirrored terminal
|
||||
== ::
|
||||
++ master :: master buffer
|
||||
$: pos=@ud :: cursor position
|
||||
buf=(list ,@c) :: text entry
|
||||
$: liv=? :: master is live
|
||||
tar=target :: master target
|
||||
== ::
|
||||
++ history :: past input
|
||||
$: pos=@ud :: input position
|
||||
@ -40,6 +40,10 @@
|
||||
pom=console-prompt :: static prompt
|
||||
inp=console-command :: input state
|
||||
== ::
|
||||
++ ukase :: master command
|
||||
$% [%add p=(list gill)] :: add agents
|
||||
[%del p=(list gill)] :: delete agents
|
||||
== ::
|
||||
++ gift :: out result <-$
|
||||
$% [%mean p=ares] ::
|
||||
[%nice ~] ::
|
||||
@ -67,6 +71,32 @@
|
||||
|_ $: hid=hide :: system state
|
||||
house :: program state
|
||||
== ::
|
||||
++ sp
|
||||
|% ++ sp-ukase
|
||||
%+ knee *ukase |. ~+
|
||||
;~ pose
|
||||
(stag %add ;~(pfix lus sp-gills))
|
||||
(stag %del ;~(pfix hep sp-gills))
|
||||
==
|
||||
::
|
||||
++ sp-gills
|
||||
;~ pose
|
||||
(most ;~(plug com ace) sp-gill)
|
||||
%+ cook
|
||||
|= a=ship
|
||||
[[a %dojo] [a %talk] ~]
|
||||
;~(pfix sig fed:ag)
|
||||
==
|
||||
::
|
||||
++ sp-gill
|
||||
;~ pose
|
||||
(stag our.hid sym)
|
||||
;~ plug
|
||||
;~(pfix sig fed:ag)
|
||||
;~(pfix fas sym)
|
||||
==
|
||||
==
|
||||
--
|
||||
++ se :: per source
|
||||
|_ [moz=(list move) [her=ship ost=bone] source]
|
||||
++ se-abet :: resolve
|
||||
@ -79,29 +109,8 @@
|
||||
+>(edg (dec p.bet))
|
||||
?: ?=(%yow -.bet)
|
||||
(se-link p.bet)
|
||||
?^ maz
|
||||
?+ -.bet (se-blit %bel ~)
|
||||
::
|
||||
%bac
|
||||
?: =(0 (lent u.maz))
|
||||
(se-blit %bel ~)
|
||||
+>(u.maz (scag (dec (lent u.maz)) u.maz))
|
||||
::
|
||||
%ctl
|
||||
?+ p.bet (se-blit %bel ~)
|
||||
%d (se-emit ost %give %mean ~)
|
||||
%v +>.$(maz ~)
|
||||
%x $(maz ~)
|
||||
==
|
||||
::
|
||||
%ret (se-like(maz ~) u.maz)
|
||||
%txt +>(u.maz (weld u.maz p.bet))
|
||||
==
|
||||
?~ apt
|
||||
~& %console-no-terminal
|
||||
(se-blit %bel ~)
|
||||
=+ nam=i.apt
|
||||
=+ taz=~(. ta [& nam] (~(got by feg) nam))
|
||||
=+ gyl=?^(apt i.apt [~zod %$])
|
||||
=+ taz=~(. ta [& liv.maz gyl] ?:(liv.maz tar.maz (~(got by feg) gyl)))
|
||||
=< ta-abet
|
||||
?- -.bet
|
||||
%aro (ta-aro:taz p.bet)
|
||||
@ -115,37 +124,74 @@
|
||||
==
|
||||
::
|
||||
++ se-drop :: passive drop
|
||||
|= nam=term
|
||||
|= gyl=gill
|
||||
^+ +>
|
||||
?> (~(has by feg) nam)
|
||||
=: feg (~(del by feg) nam)
|
||||
apt (skip apt |=(a=term =(nam a)))
|
||||
==
|
||||
?^ apt +>
|
||||
?^ maz +>
|
||||
+>(maz `~)
|
||||
=< se-prom
|
||||
?> (~(has by feg) gyl)
|
||||
%_ +>
|
||||
feg (~(del by feg) gyl)
|
||||
apt (skip apt |=(a=gill =(gyl a)))
|
||||
liv.maz ?~(apt & liv.maz)
|
||||
==
|
||||
::
|
||||
++ se-join :: add connection
|
||||
|= nam=term
|
||||
|= gyl=gill
|
||||
^+ +>
|
||||
?< (~(has by feg) nam)
|
||||
+>(maz ~, apt [nam apt], feg (~(put by feg) nam *target))
|
||||
=< se-prom
|
||||
?: (~(has by feg) gyl)
|
||||
(se-blit %bel ~)
|
||||
+>(liv.maz |, apt [gyl apt], feg (~(put by feg) gyl *target))
|
||||
::
|
||||
++ se-nuke :: active drop
|
||||
|= nam=term
|
||||
|= gyl=gill
|
||||
^+ +>
|
||||
(se-drop:(se-send nam %nuke [her ~[nam]] her) nam)
|
||||
(se-drop:(se-send(liv.maz |) gyl %nuke [p.gyl ~[q.gyl]] her) gyl)
|
||||
::
|
||||
++ se-like :: act in master
|
||||
|= buf=(list ,@c)
|
||||
(se-link (crip (tufa buf)))
|
||||
|= kus=ukase
|
||||
?- -.kus
|
||||
%add
|
||||
|- ^+ +>.^$
|
||||
?~ p.kus +>.^$
|
||||
$(p.kus t.p.kus, +>.^$ (se-link i.p.kus))
|
||||
::
|
||||
%del
|
||||
|- ^+ +>.^$
|
||||
?~ p.kus +>.^$
|
||||
$(p.kus t.p.kus, +>.^$ (se-nuke i.p.kus))
|
||||
==
|
||||
::
|
||||
++ se-prom :: set master prompt
|
||||
^+ .
|
||||
%_ .
|
||||
cad.pom.tar.maz
|
||||
^- tape
|
||||
%+ welp
|
||||
(scow %p our.hid)
|
||||
=+ ^= mux
|
||||
|- ^- tape
|
||||
?~ apt ~
|
||||
=+ ^= mor ^- tape
|
||||
?~ t.apt ~
|
||||
[',' ' ' $(apt t.apt)]
|
||||
%+ welp
|
||||
^- tape
|
||||
=+ txt=(trip q.i.apt)
|
||||
?: =(our.hid p.i.apt)
|
||||
txt
|
||||
:(welp "~" (scow %p p.i.apt) "/" txt)
|
||||
mor
|
||||
?~ mux
|
||||
"# "
|
||||
:(welp ":" mux "# ")
|
||||
==
|
||||
::
|
||||
++ se-link :: connect to app
|
||||
|= nam=term
|
||||
|= gyl=gill
|
||||
^+ +>
|
||||
%. nam
|
||||
%. gyl
|
||||
=< se-join
|
||||
(se-send nam %show [her ~[nam]] her /console)
|
||||
(se-send gyl %show [p.gyl ~[q.gyl]] her /console)
|
||||
::
|
||||
++ se-blit :: give output
|
||||
|= bil=dill-blit
|
||||
@ -166,20 +212,12 @@
|
||||
(se-show (sub p.lin off) (scag edg (slag off q.lin)))
|
||||
::
|
||||
++ se-view :: flush buffer
|
||||
%- se-just
|
||||
?^ maz
|
||||
=- [(lent zil) zil]
|
||||
^= zil ^- (list ,@c)
|
||||
%- welp
|
||||
:_ u.maz
|
||||
|- ^- (list ,@c)
|
||||
?~ apt [`@c`0x23 `@c`0x20 ~]
|
||||
=+ nex=$(apt t.apt)
|
||||
%+ welp (tuba (trip i.apt))
|
||||
?~(t.apt nex `_nex`[`@c`0x2c `@c`0x20 nex])
|
||||
?: liv.maz
|
||||
(se-just ~(ta-vew ta [& & ~zod %$] tar.maz))
|
||||
?~ apt
|
||||
~&(%se-no-view [0 ~])
|
||||
~(ta-vew ta [& i.apt] (~(got by feg) i.apt))
|
||||
se-view(liv.maz &)
|
||||
%- se-just
|
||||
~(ta-vew ta [& | i.apt] (~(got by feg) i.apt))
|
||||
::
|
||||
++ se-kill :: kill a source
|
||||
=+ tup=apt
|
||||
@ -192,44 +230,71 @@
|
||||
%_(+> moz [mov moz])
|
||||
::
|
||||
++ se-send :: send a message
|
||||
|= [nam=term nog=note-gall]
|
||||
(se-emit ost %pass [(scot %p her) nam ~] %g nog)
|
||||
|= [gyl=gill nog=note-gall]
|
||||
(se-emit ost %pass [(scot %p her) (scot %p p.gyl) q.gyl ~] %g nog)
|
||||
::
|
||||
++ se-tame
|
||||
|= nam=term
|
||||
~(. ta [& nam] (~(got by feg) nam))
|
||||
|= gyl=gill
|
||||
^+ ta
|
||||
~(. ta [& %| gyl] (~(got by feg) gyl))
|
||||
::
|
||||
++ se-pour :: receive results
|
||||
|= [nam=term sil=sign-gall]
|
||||
|= [gyl=gill sil=sign-gall]
|
||||
^+ +>
|
||||
?- -.sil
|
||||
%mean
|
||||
:: ~& [%seat-mean sil]
|
||||
~& %seat-mean
|
||||
+>.$
|
||||
::
|
||||
%nice
|
||||
+>.$
|
||||
::
|
||||
%rush
|
||||
ta-abet:(ta-fec:(se-tame nam) +>.sil)
|
||||
ta-abet:ta-rap:(ta-fec:(se-tame gyl) +>.sil)
|
||||
==
|
||||
::
|
||||
++ ta :: per target
|
||||
|_ $: $: liv=? :: don't delete
|
||||
nam=term :: target app
|
||||
mav=? :: showing master
|
||||
gyl=gill :: target app
|
||||
== ::
|
||||
target :: target state
|
||||
== ::
|
||||
++ ta-abet :: resolve
|
||||
^+ ..ta
|
||||
?. liv (se-nuke nam)
|
||||
%_(+> feg (~(put by feg) nam +<+))
|
||||
=. liv.maz mav
|
||||
?: mav
|
||||
?. liv
|
||||
(se-emit ost %give %mean ~)
|
||||
+>(tar.maz +<+)
|
||||
?. liv
|
||||
=. ..ta (se-nuke gyl)
|
||||
..ta(liv.maz =(~ apt))
|
||||
%_(+> feg (~(put by feg) gyl +<+))
|
||||
::
|
||||
++ ta-ant :: toggle master
|
||||
^+ .
|
||||
?: mav
|
||||
?~ apt ta-bel
|
||||
%_ .
|
||||
mav |
|
||||
+<+ (~(got by feg) gyl)
|
||||
tar.maz +<+
|
||||
==
|
||||
%_ .
|
||||
mav &
|
||||
+<+ tar.maz
|
||||
feg (~(put by feg) gyl +<+)
|
||||
==
|
||||
::
|
||||
++ ta-act :: send action
|
||||
|= act=console-action
|
||||
^+ +>
|
||||
%_(+> +> (se-send nam %mess [her ~[nam]] her %console-action !>(act)))
|
||||
?: mav
|
||||
+>.$
|
||||
%_ +>
|
||||
+>
|
||||
(se-send gyl %mess [p.gyl ~[q.gyl]] her %console-action !>(act))
|
||||
==
|
||||
::
|
||||
++ ta-aro :: hear arrow
|
||||
|= key=?(%d %l %r %u)
|
||||
@ -323,9 +388,9 @@
|
||||
ta-bel
|
||||
%- ta-hom(pos.inp 0, kil `(scag pos.inp buf.say.inp))
|
||||
(ta-cut 0 pos.inp)
|
||||
%v +>(maz `~)
|
||||
%v ta-ant
|
||||
%x ?: =(~ apt) ta-bel
|
||||
?^ maz ta-bel
|
||||
?: mav ta-bel
|
||||
+>(apt (welp (slag 1 apt) [(snag 0 apt) ~]))
|
||||
%y ?~ kil ta-bel
|
||||
%- ta-hom(pos.inp (add pos.inp (lent u.kil)))
|
||||
@ -368,6 +433,9 @@
|
||||
%txt $(fec [%tan [%leaf p.fec]~])
|
||||
==
|
||||
::
|
||||
++ ta-rap :: send %took
|
||||
.(+> (se-send gyl %took [p.gyl ~[q.gyl]] her))
|
||||
::
|
||||
++ ta-dog :: change cursor
|
||||
|= ted=console-edit
|
||||
%_ +>
|
||||
@ -430,7 +498,17 @@
|
||||
|= pom=console-prompt
|
||||
+>(pom pom)
|
||||
::
|
||||
++ ta-ret (ta-act %ret ~) :: hear return
|
||||
++ ta-ret :: hear return
|
||||
?. mav
|
||||
(ta-act %ret ~)
|
||||
=+ fey=(ruse (tufa buf.say.inp) sp-ukase:sp)
|
||||
?- -.fey
|
||||
%| (ta-err p.fey)
|
||||
%& =. +>+ (se-like p.fey)
|
||||
=. pom pom.tar.maz
|
||||
(ta-hom:ta-nex %set ~)
|
||||
==
|
||||
::
|
||||
++ ta-ser :: reverse search
|
||||
|= ext=(list ,@c)
|
||||
^+ +>
|
||||
@ -509,7 +587,12 @@
|
||||
0
|
||||
~
|
||||
~
|
||||
`~
|
||||
:* %&
|
||||
*(unit search)
|
||||
*history
|
||||
`console-prompt`[%& %seat "{(scow %p our.hid)}# "]
|
||||
*console-command
|
||||
==
|
||||
~
|
||||
[0 ~]
|
||||
==
|
||||
@ -517,7 +600,6 @@
|
||||
::
|
||||
++ poke-dill-belt
|
||||
|= [ost=bone her=ship bet=dill-belt]
|
||||
:: ~& %seat-poke
|
||||
^- [(list move) _+>]
|
||||
=< se-abet
|
||||
=< se-view
|
||||
@ -527,10 +609,11 @@
|
||||
|= [ost=bone pax=path sih=*]
|
||||
^- [(list move) _+>]
|
||||
=+ sih=((hard sign) sih)
|
||||
?> ?=([@ @ ~] pax)
|
||||
?> ?=([@ @ @ ~] pax)
|
||||
=< se-abet
|
||||
=< se-view
|
||||
(~(se-pour se ~ [(slav %p i.pax) ost] (~(got by bin) ost)) i.t.pax +.sih)
|
||||
=+ gyl=[(slav %p i.t.pax) i.t.t.pax]
|
||||
(~(se-pour se ~ [(slav %p i.pax) ost] (~(got by bin) ost)) gyl +.sih)
|
||||
::
|
||||
++ pull
|
||||
|= ost=bone
|
||||
|
@ -11,11 +11,11 @@
|
||||
=> |% :: structures
|
||||
++ town :: all client state
|
||||
$: %0 :: version
|
||||
seat=console-share :: command lines
|
||||
say=console-share :: command lines
|
||||
live=(unit span) :: present story
|
||||
stories=(map span story) :: all stories
|
||||
== ::
|
||||
++ grip :: subscription state
|
||||
++ grip :: synchronized state
|
||||
|* nub=$+(* *) :: wrapped state
|
||||
$| $? %warm :: activated
|
||||
%cool :: activating
|
||||
@ -131,7 +131,7 @@
|
||||
|=(tep=tape (hy-display [%leaf tep]~))
|
||||
::
|
||||
++ hy-accept :: set prompt
|
||||
|=(asq=cord (hy-general %pro & %gar (tuba (trip asq))))
|
||||
|=(asq=cord (hy-general %pro & %gar (trip asq)))
|
||||
--
|
||||
::
|
||||
++ parse :: command parser
|
||||
@ -595,11 +595,18 @@
|
||||
++ peer
|
||||
|= [ost=bone you=ship pax=path]
|
||||
^- [(list move) _+>]
|
||||
=+ nuv=(novel ost ~)
|
||||
?~ nuv
|
||||
:_ +>.$
|
||||
[ost %give %rush %console-effect %pro & %$ (tuba "no story ")]~
|
||||
sy-abet:sy-awake:u.nuv
|
||||
~? !=(you our.hid) [%talk-peer ost you pax]
|
||||
:_ +> :_ ~
|
||||
:* ost
|
||||
%give
|
||||
%rush
|
||||
%console-effect
|
||||
%pro
|
||||
&
|
||||
%talk
|
||||
=+ nuv=(novel ost ~)
|
||||
?~(nuv "no story" (sy-prompt:u.nuv q.mike.u.nuv))
|
||||
==
|
||||
::
|
||||
++ submit
|
||||
|= [ost=bone txt=cord]
|
||||
@ -675,11 +682,11 @@
|
||||
++ poke-console-action
|
||||
|= [ost=bone her=ship act=console-action]
|
||||
=+ moz=`(list move)`[ost %give %nice ~]~
|
||||
?+ -.act [moz +>.$]
|
||||
%det [moz +>.$(seat abet:(~(receive cs seat) `console-change`+.act))]
|
||||
%ret =+ sed=buf.seat
|
||||
?- -.act
|
||||
%det [moz +>.$(say +:(~(receive cs say) `console-change`+.act))]
|
||||
%ret =+ sed=buf.say
|
||||
=^ zom +>.$ (submit ost (crip (tufa sed)))
|
||||
=^ cal seat =<([- abet:+] (~(transmit cs seat) [%set ~]))
|
||||
=^ cal say (~(transmit cs say) [%set ~])
|
||||
:_ +>.$
|
||||
:* [ost %give %rush %console-effect %nex ~]
|
||||
[ost %give %rush %console-effect %det cal]
|
||||
|
@ -73,7 +73,7 @@
|
||||
++ commit :: local change
|
||||
|= ted=console-edit
|
||||
^- console-share
|
||||
abet:(apply(own.ven +(own.ven)) ted)
|
||||
abet:(apply(own.ven +(own.ven), leg [ted leg]) ted)
|
||||
::
|
||||
::::
|
||||
:: ++inverse: inverse of change in context.
|
||||
@ -106,7 +106,9 @@
|
||||
?> &(=(his.ler his.ven) (lte own.ler own.ven))
|
||||
?> |(!=(own.ler own.ven) =(haw (sham buf)))
|
||||
=. leg (scag (sub own.ven own.ler) leg)
|
||||
:: ~? !=(own.ler own.ven) [%miss-leg leg]
|
||||
=+ dat=(transmute [%mor leg] ted)
|
||||
:: ~? !=(~ leg) [%transmute from/ted to/dat ~]
|
||||
[dat abet:(apply(his.ven +(his.ven)) dat)]
|
||||
::
|
||||
++ remit :: conditional accept
|
||||
|
13
main/mar/console-action/door.hook
Normal file
13
main/mar/console-action/door.hook
Normal file
@ -0,0 +1,13 @@
|
||||
::
|
||||
:::: /hook/door/console-action/mar
|
||||
::
|
||||
/? 314
|
||||
/- *console
|
||||
!:
|
||||
|_ cod=console-action
|
||||
::
|
||||
++ grab :: convert from
|
||||
|%
|
||||
++ noun console-action :: clam from %noun
|
||||
--
|
||||
--
|
14
main/mar/console-effect/door.hook
Normal file
14
main/mar/console-effect/door.hook
Normal file
@ -0,0 +1,14 @@
|
||||
::
|
||||
:::: /hook/door/console-effect/mar
|
||||
::
|
||||
/? 310
|
||||
/- *console
|
||||
!:
|
||||
|_ cod=console-effect
|
||||
::
|
||||
++ grab :: convert from
|
||||
|%
|
||||
++ noun console-effect :: clam from %noun
|
||||
--
|
||||
--
|
||||
|
@ -110,5 +110,5 @@
|
||||
[%sag p=path q=*] :: save to jamfile
|
||||
[%sav p=path q=@] :: save to file
|
||||
== ::
|
||||
++ gill ,@tas :: general contact
|
||||
++ gill (pair ship term) :: general contact
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user