Add remote to :seat.

This commit is contained in:
C. Guy Yarvin 2015-03-22 15:46:42 -07:00
parent 55786d6271
commit 0ea228c360
6 changed files with 103 additions and 44 deletions

View File

@ -54,7 +54,7 @@
[%sag p=path q=*] :: save to jamfile [%sag p=path q=*] :: save to jamfile
[%sav p=path q=@] :: save to file [%sav p=path q=@] :: save to file
== :: == ::
++ gill ,@tas :: general contact ++ gill (pair ship term) :: general contact
-- :: -- ::
=> |% :: console protocol => |% :: console protocol
++ axle :: all dill state ++ axle :: all dill state
@ -374,7 +374,8 @@
=: ore.all `p.q.hic =: ore.all `p.q.hic
dug.all ~ dug.all ~
== ==
=^ moz all abet:(need (ax (need hey.all) [%flow %seat %dojo %talk ~])) =^ moz all
abet:(need (ax (need hey.all) [%flow %seat [p.q.hic %dojo] ~]))
[moz ..^$] [moz ..^$]
=+ nus=(ax hen q.hic) =+ nus=(ax hen q.hic)
?~ nus ?~ nus

View File

@ -1163,7 +1163,7 @@
?: =(10 qul) ?: =(10 qul)
~& [%yawn-told-full ost our hen] ~& [%yawn-told-full ost our hen]
+>.$(qic.sat ~, vey.sat (~(put to vey.sat) hen %nuke p.kon)) +>.$(qic.sat ~, vey.sat (~(put to vey.sat) hen %nuke p.kon))
:: +>.$(qic.sat ~) +>.$(qic.sat ~)
:: ::
%load %load
=+ [hom=(slot 2 q.p.kon) old=(slot 3 q.p.kon)] =+ [hom=(slot 2 q.p.kon) old=(slot 3 q.p.kon)]

View File

@ -2862,10 +2862,11 @@
++ rash |*([naf=@ sab=_rule] (scan (trip naf) sab)) :: ++ rash |*([naf=@ sab=_rule] (scan (trip naf) sab)) ::
++ ruse |* [los=tape sab=_rule] ++ ruse |* [los=tape sab=_rule]
=+ vex=(sab [[0 0] los]) =+ vex=(sab [[0 0] los])
?. =((lent los) q.p.vex) ~ =+ len=(lent los)
?. =(len q.p.vex) [%| p=q.p.vex]
?~ q.vex ?~ q.vex
[~ u=~] [%| p=len]
[~ u=[~ u=p.u.q.vex]] [%& p=p.u.q.vex]
++ rush |*([naf=@ sab=_rule] (rust (trip naf) sab)) ++ rush |*([naf=@ sab=_rule] (rust (trip naf) sab))
++ rust |* [los=tape sab=_rule] ++ rust |* [los=tape sab=_rule]
=+ vex=((full sab) [[1 1] los]) =+ vex=((full sab) [[1 1] los])

View File

@ -22,6 +22,7 @@
++ dojo-command :: ++ dojo-command ::
$% [%flat p=path q=dojo-source] :: noun to unix atom $% [%flat p=path q=dojo-source] :: noun to unix atom
[%pill p=path q=dojo-source] :: noun to unix pill [%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 [%poke p=goal q=dojo-source] :: make and poke
[%show p=dojo-source] :: print [%show p=dojo-source] :: print
[%verb p=term q=dojo-source] :: store variable [%verb p=term q=dojo-source] :: store variable
@ -31,19 +32,18 @@
q=dojo-build :: general build q=dojo-build :: general build
== :: == ::
++ dojo-build :: one ford step ++ 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 [%di p=dojo-model] :: dialog
[%dv p=path] :: gate from source [%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 [%sc p=dojo-model] :: script
[%tu p=(list dojo-source)] :: tuple [%tu p=(list dojo-source)] :: tuple
[%va p=term] :: dojo variable [%va p=term] :: dojo variable
== :: == ::
++ dojo-filter :: pipeline filter ++ dojo-filter :: pipeline filter
$% [%a p=twig] :: direct gate $% [%a p=twig] :: function gate
[%b p=mark] :: simple transmute [%b p=mark] :: simple transmute
[%c p=dojo-source] :: full filter [%c p=dojo-model] :: formal filter
== :: == ::
++ dojo-model :: data construction ++ dojo-model :: data construction
$: p=dojo-server :: core source $: p=dojo-server :: core source

View File

@ -15,10 +15,10 @@
$: edg=_79 :: terminal columns $: edg=_79 :: terminal columns
off=@ud :: window offset off=@ud :: window offset
kil=(unit (list ,@c)) :: kill buffer kil=(unit (list ,@c)) :: kill buffer
apt=(list term) :: application ring apt=(list gill) :: application ring
maz=(unit (list ,@c)) :: master window maz=(unit (list ,@c)) :: master window
feg=(map term target) :: live applications feg=(map gill target) :: live applications
mir=(pair ,@ud (list ,@c)) :: mirrored state mir=(pair ,@ud (list ,@c)) :: mirrored terminal
== :: == ::
++ master :: master buffer ++ master :: master buffer
$: pos=@ud :: cursor position $: pos=@ud :: cursor position
@ -30,6 +30,10 @@
lay=(map ,@ud (list ,@c)) :: editing overlay lay=(map ,@ud (list ,@c)) :: editing overlay
old=(list (list ,@c)) :: entries proper old=(list (list ,@c)) :: entries proper
== :: == ::
++ action :: user action
$% [%add p=(list gill)] :: add agents
[%del p=(list gill)] :: delete agents
== ::
++ search :: reverse-i-search ++ search :: reverse-i-search
$: pos=@ud :: search position $: pos=@ud :: search position
str=(list ,@c) :: search string str=(list ,@c) :: search string
@ -67,6 +71,33 @@
|_ $: hid=hide :: system state |_ $: hid=hide :: system state
house :: program state house :: program state
== :: == ::
++ sp
|% ++ sp-action
%+ knee *action |. ~+
;~ pose
(stag %add ;~(pfix lus sp-gills))
(stag %del ;~(pfix hep sp-gills))
==
::
++ sp-gills
;~ pose
%+ cook
|= a=ship
[[a %dojo] [a %talk] ~]
;~(pfix sig fed:ag)
::
(most ;~(plug com ace) sp-gill)
==
::
++ sp-gill
;~ pose
(stag our.hid sym)
;~ plug
;~(pfix sig fed:ag)
;~(pfix fas sym)
==
==
--
++ se :: per source ++ se :: per source
|_ [moz=(list move) [her=ship ost=bone] source] |_ [moz=(list move) [her=ship ost=bone] source]
++ se-abet :: resolve ++ se-abet :: resolve
@ -115,37 +146,59 @@
== ==
:: ::
++ se-drop :: passive drop ++ se-drop :: passive drop
|= nam=term |= gyl=gill
^+ +> ^+ +>
?> (~(has by feg) nam) ?> (~(has by feg) gyl)
=: feg (~(del by feg) nam) =: feg (~(del by feg) gyl)
apt (skip apt |=(a=term =(nam a))) apt (skip apt |=(a=gill =(gyl a)))
== ==
?^ apt +> ?^ apt +>
?^ maz +> ?^ maz +>
+>(maz `~) +>(maz `~)
:: ::
++ ruse |* [los=tape sab=_rule] :: XX
=+ vex=(sab [[0 0] los])
=+ len=(lent los)
?. =(len q.p.vex) [%| p=q.p.vex]
?~ q.vex
[%| p=len]
[%& p=p.u.q.vex]
::
++ se-join :: add connection ++ se-join :: add connection
|= nam=term |= gyl=gill
^+ +> ^+ +>
?< (~(has by feg) nam) ?< (~(has by feg) gyl)
+>(maz ~, apt [nam apt], feg (~(put by feg) nam *target)) +>(maz ~, apt [gyl apt], feg (~(put by feg) gyl *target))
:: ::
++ se-nuke :: active drop ++ se-nuke :: active drop
|= nam=term |= gyl=gill
^+ +> ^+ +>
(se-drop:(se-send nam %nuke [her ~[nam]] her) nam) (se-drop:(se-send gyl %nuke [p.gyl ~[q.gyl]] her) gyl)
:: ::
++ se-like :: act in master ++ se-like :: act in master
|= buf=(list ,@c) |= buf=(list ,@c)
(se-link (crip (tufa buf))) =+ fey=(ruse (tufa buf) sp-action:sp)
?- -.fey
%| (se-blit %bel ~)
%& ?- -.p.fey
%add
|- ^+ +>.^$
?~ p.p.fey +>.^$
$(p.p.fey t.p.p.fey, +>.^$ (se-link i.p.p.fey))
::
%del
|- ^+ +>.^$
?~ p.p.fey +>.^$
$(p.p.fey t.p.p.fey, +>.^$ (se-drop i.p.p.fey))
==
==
:: ::
++ se-link :: connect to app ++ se-link :: connect to app
|= nam=term |= gyl=gill
^+ +> ^+ +>
%. nam %. gyl
=< se-join =< se-join
(se-send nam %show [her ~[nam]] her /console) (se-send gyl %show [p.gyl ~[q.gyl]] her /console)
:: ::
++ se-blit :: give output ++ se-blit :: give output
|= bil=dill-blit |= bil=dill-blit
@ -175,7 +228,7 @@
|- ^- (list ,@c) |- ^- (list ,@c)
?~ apt [`@c`0x23 `@c`0x20 ~] ?~ apt [`@c`0x23 `@c`0x20 ~]
=+ nex=$(apt t.apt) =+ nex=$(apt t.apt)
%+ welp (tuba (trip i.apt)) %+ welp (tuba (trip q.i.apt))
?~(t.apt nex `_nex`[`@c`0x2c `@c`0x20 nex]) ?~(t.apt nex `_nex`[`@c`0x2c `@c`0x20 nex])
?~ apt ?~ apt
~&(%se-no-view [0 ~]) ~&(%se-no-view [0 ~])
@ -192,15 +245,16 @@
%_(+> moz [mov moz]) %_(+> moz [mov moz])
:: ::
++ se-send :: send a message ++ se-send :: send a message
|= [nam=term nog=note-gall] |= [gyl=gill nog=note-gall]
(se-emit ost %pass [(scot %p her) nam ~] %g nog) (se-emit ost %pass [(scot %p her) (scot %p p.gyl) q.gyl ~] %g nog)
:: ::
++ se-tame ++ se-tame
|= nam=term |= gyl=gill
~(. ta [& nam] (~(got by feg) nam)) ^+ ta
~(. ta [& gyl] (~(got by feg) gyl))
:: ::
++ se-pour :: receive results ++ se-pour :: receive results
|= [nam=term sil=sign-gall] |= [gyl=gill sil=sign-gall]
^+ +> ^+ +>
?- -.sil ?- -.sil
%mean %mean
@ -212,24 +266,27 @@
+>.$ +>.$
:: ::
%rush %rush
ta-abet:ta-rap:(ta-fec:(se-tame nam) +>.sil) ta-abet:ta-rap:(ta-fec:(se-tame gyl) +>.sil)
== ==
:: ::
++ ta :: per target ++ ta :: per target
|_ $: $: liv=? :: don't delete |_ $: $: liv=? :: don't delete
nam=term :: target app gyl=gill :: target app
== :: == ::
target :: target state target :: target state
== :: == ::
++ ta-abet :: resolve ++ ta-abet :: resolve
^+ ..ta ^+ ..ta
?. liv (se-nuke nam) ?. liv (se-nuke gyl)
%_(+> feg (~(put by feg) nam +<+)) %_(+> feg (~(put by feg) gyl +<+))
:: ::
++ ta-act :: send action ++ ta-act :: send action
|= act=console-action |= act=console-action
^+ +> ^+ +>
%_(+> +> (se-send nam %mess [her ~[nam]] her %console-action !>(act))) %_ +>
+>
(se-send gyl %mess [p.gyl ~[q.gyl]] her %console-action !>(act))
==
:: ::
++ ta-aro :: hear arrow ++ ta-aro :: hear arrow
|= key=?(%d %l %r %u) |= key=?(%d %l %r %u)
@ -369,7 +426,7 @@
== ==
:: ::
++ ta-rap :: send %took ++ ta-rap :: send %took
.(+> (se-send nam %took [her ~[nam]] her)) .(+> (se-send gyl %took [p.gyl ~[q.gyl]] her))
:: ::
++ ta-dog :: change cursor ++ ta-dog :: change cursor
|= ted=console-edit |= ted=console-edit
@ -520,7 +577,6 @@
:: ::
++ poke-dill-belt ++ poke-dill-belt
|= [ost=bone her=ship bet=dill-belt] |= [ost=bone her=ship bet=dill-belt]
:: ~& %seat-poke
^- [(list move) _+>] ^- [(list move) _+>]
=< se-abet =< se-abet
=< se-view =< se-view
@ -530,10 +586,11 @@
|= [ost=bone pax=path sih=*] |= [ost=bone pax=path sih=*]
^- [(list move) _+>] ^- [(list move) _+>]
=+ sih=((hard sign) sih) =+ sih=((hard sign) sih)
?> ?=([@ @ ~] pax) ?> ?=([@ @ @ ~] pax)
=< se-abet =< se-abet
=< se-view =< 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 ++ pull
|= ost=bone |= ost=bone

View File

@ -110,5 +110,5 @@
[%sag p=path q=*] :: save to jamfile [%sag p=path q=*] :: save to jamfile
[%sav p=path q=@] :: save to file [%sav p=path q=@] :: save to file
== :: == ::
++ gill ,@tas :: general contact ++ gill (pair ship term) :: general contact
-- --