Various fixes and improvements.

This commit is contained in:
C. Guy Yarvin 2015-04-07 12:05:21 -07:00
parent 2113be07d8
commit 982467e95f
3 changed files with 109 additions and 59 deletions

View File

@ -101,11 +101,11 @@
++ nail ,[p=hair q=tape] :: parsing input ++ nail ,[p=hair q=tape] :: parsing input
++ numb ,@ :: just a number ++ numb ,@ :: just a number
++ pair |*([a=$+(* *) b=$+(* *)] ,[p=a q=b]) :: just a pair ++ pair |*([a=$+(* *) b=$+(* *)] ,[p=a q=b]) :: just a pair
++ wand |* a=(list $+(* *)) :: hetero list ++ wand |* a=(pole $+(* *)) :: hetero list
|= b=* :: |= b=* ::
?~ a ~ :: ?~ a ~ ::
?@ b ~ :: ?@ b ~ ::
[i=(i.a -.b) t=$(a t.a, b +.b)] :: [i=(-.a -.b) t=$(a +.a, b +.b)] ::
++ pass ,@ :: public key ++ pass ,@ :: public key
++ path (list span) :: filesys location ++ path (list span) :: filesys location
++ pint ,[p=[p=@ q=@] q=[p=@ q=@]] :: line/column range ++ pint ,[p=[p=@ q=@] q=[p=@ q=@]] :: line/column range

View File

@ -105,7 +105,7 @@
:: :: :: ::
++ work :: interface action ++ work :: interface action
$% [%number p=? q=@ud] :: activate by number $% [%number p=? q=@ud] :: activate by number
[%listen p=(set partner)] :: [%join p=(set partner)] ::
[%say p=speech] :: [%say p=speech] ::
[%invite p=span q=(list partner)] :: [%invite p=span q=(list partner)] ::
[%banish p=span q=(list partner)] :: [%banish p=span q=(list partner)] ::
@ -215,8 +215,8 @@
== ==
== ==
:: ::
%+ stag %listen %+ stag %join
;~(pfix (jest %listen) ;~(pfix ace parq)) ;~(pfix (jest %join) ;~(pfix ace parq))
:: ::
(stag %number nump) (stag %number nump)
(stag %target parz) (stag %target parz)
@ -293,17 +293,29 @@
(~(has in sources.shape:(~(got by stories) man.she)) `partner`n.paz) (~(has in sources.shape:(~(got by stories) man.she)) `partner`n.paz)
== ==
:: ::
++ sh-pass :: update passive aud ++ sh-pass :: passive from aud
|= aud=audience |= aud=audience
^+ +> %- sh-poss
=+ ^= sap %- ~(gas in *(set partner))
%- sh-pare (turn (~(tap by aud)) |=([a=partner *] a))
%- ~(gas in *(set partner)) ::
(turn (~(tap by aud)) |=([a=partner *] a)) ::
++ sh-poss :: passive update
|= lix=(set partner)
=+ sap=(sh-pare lix)
?: =(sap passive.she) ?: =(sap passive.she)
+>.$ +>.$
sh-prod(passive.she sap) sh-prod(passive.she sap)
:: ::
++ sh-pest :: report listen
|= tay=partner
^+ +>
?. ?=(%& -.tay) +>
=+ sib=(~(get by ham.system.she) `station`p.tay)
?. |(?=(~ sib) !?=(%white p.cordon.u.sib))
+>.$
(sh-poss [tay ~ ~])
::
++ sh-rend :: print on one line ++ sh-rend :: print on one line
|= gam=telegram |= gam=telegram
(sh-pass:(sh-fact %txt ~(tr-line tr man.she gam)) q.q.gam) (sh-pass:(sh-fact %txt ~(tr-line tr man.she gam)) q.q.gam)
@ -311,13 +323,17 @@
++ sh-numb :: print msg number ++ sh-numb :: print msg number
|= num=@ud |= num=@ud
^+ +> ^+ +>
(sh-fact %txt " [{(scow %ud num)}]") =+ bun=(scow %ud num)
=+ pad=(sub 36 (lent bun))
=+ now=`@da`(dis lat.hid 0xffff.ffff.ffff.ffff.0000.0000.0000.0000)
%+ sh-fact %txt
"----------------| [{bun}] {(runt [pad ' '] (scow %da now))}"
:: ::
++ sh-repo-house-diff ++ sh-repo-house-diff
|= [one=shelf two=shelf] |= [one=shelf two=shelf]
=| $= ret =| $= ret
$: new=(list (pair span (pair posture cord))) $: old=(list (pair span (pair posture cord)))
old=(list (pair span (pair posture cord))) new=(list (pair span (pair posture cord)))
cha=(list (pair span (pair posture cord))) cha=(list (pair span (pair posture cord)))
== ==
^+ ret ^+ ret
@ -344,8 +360,8 @@
++ sh-repo-atlas-diff ++ sh-repo-atlas-diff
|= [one=atlas two=atlas] |= [one=atlas two=atlas]
=| $= ret =| $= ret
$: new=(list (pair ship status)) $: old=(list (pair ship status))
old=(list (pair ship status)) new=(list (pair ship status))
cha=(list (pair ship status)) cha=(list (pair ship status))
== ==
^+ ret ^+ ret
@ -372,8 +388,8 @@
++ sh-repo-cabal-diff ++ sh-repo-cabal-diff
|= [one=(map station config) two=(map station config)] |= [one=(map station config) two=(map station config)]
=| $= ret =| $= ret
$: new=(list (pair station config)) $: old=(list (pair station config))
old=(list (pair station config)) new=(list (pair station config))
cha=(list (pair station config)) cha=(list (pair station config))
== ==
^+ ret ^+ ret
@ -400,8 +416,8 @@
++ sh-repo-rogue-diff ++ sh-repo-rogue-diff
|= [one=(map partner atlas) two=(map partner atlas)] |= [one=(map partner atlas) two=(map partner atlas)]
=| $= ret =| $= ret
$: new=(list (pair partner atlas)) $: old=(list (pair partner atlas))
old=(list (pair partner atlas)) new=(list (pair partner atlas))
cha=(list (pair partner atlas)) cha=(list (pair partner atlas))
== ==
^+ ret ^+ ret
@ -428,8 +444,8 @@
++ sh-repo-whom-diff ++ sh-repo-whom-diff
|= [one=(set partner) two=(set partner)] |= [one=(set partner) two=(set partner)]
=| $= ret =| $= ret
$: new=(list partner) $: old=(list partner)
old=(list partner) new=(list partner)
== ==
^+ ret ^+ ret
=. ret =. ret
@ -453,8 +469,8 @@
++ sh-repo-ship-diff ++ sh-repo-ship-diff
|= [one=(set ship) two=(set ship)] |= [one=(set ship) two=(set ship)]
=| $= ret =| $= ret
$: new=(list ship) $: old=(list ship)
old=(list ship) new=(list ship)
== ==
^+ ret ^+ ret
=. ret =. ret
@ -538,14 +554,15 @@
:: ::
++ sh-repo-cabal-changes ++ sh-repo-cabal-changes
|= $: laz=(map station config) |= $: laz=(map station config)
new=(list (pair station config))
old=(list (pair station config)) old=(list (pair station config))
new=(list (pair station config))
cha=(list (pair station config)) cha=(list (pair station config))
== ==
=. +>.$ =. +>.$
|- ^+ +>.^$ |- ^+ +>.^$
?~ new +>.^$ ?~ new +>.^$
=. +>.^$ $(new t.new) =. +>.^$ $(new t.new)
=. +>.^$ (sh-pest [%& p.i.new])
%+ sh-repo-config-show %+ sh-repo-config-show
(weld ~(sn-phat sn man.she p.i.new) ": ") (weld ~(sn-phat sn man.she p.i.new) ": ")
[*config q.i.new] [*config q.i.new]
@ -561,13 +578,12 @@
++ sh-repo-cabal ++ sh-repo-cabal
|= bal=cabal |= bal=cabal
^+ +> ^+ +>
=+ laz=loc.system.she =+ laz=system.she
=. loc.system.she loc.bal =. system.she bal
=. +>.$ (sh-repo-config-show "" laz loc.bal) =. +>.$
=+ laz=ham.system.she %+ sh-repo-cabal-changes ham.laz
=. ham.system.she ham.bal (sh-repo-cabal-diff ham.laz ham.bal)
%+ sh-repo-cabal-changes laz (sh-repo-config-show "" loc.laz loc.bal)
(sh-repo-cabal-diff laz ham.bal)
:: ::
++ sh-repo-house ++ sh-repo-house
|= awl=(map span (pair posture cord)) |= awl=(map span (pair posture cord))
@ -601,7 +617,8 @@
:: ::
++ sh-note :: shell message ++ sh-note :: shell message
|= txt=tape |= txt=tape
(sh-fact %txt (runt [16 '-'] `tape`[':' ' ' txt])) ^+ +>
(sh-fact %txt (runt [16 '-'] `tape`['|' ' ' (scag 62 txt)]))
:: ::
++ sh-spaz :: print status ++ sh-spaz :: print status
|= saz=status |= saz=status
@ -696,6 +713,7 @@
++ sh-repo :: apply report ++ sh-repo :: apply report
|= rad=report |= rad=report
^+ +> ^+ +>
:: ~& [%sh-repo rad]
?- -.rad ?- -.rad
%cabal (sh-repo-cabal +.rad) %cabal (sh-repo-cabal +.rad)
%grams (sh-repo-grams +.rad) %grams (sh-repo-grams +.rad)
@ -780,7 +798,7 @@
:: ::
++ sh-tell :: add command ++ sh-tell :: add command
|= cod=command |= cod=command
%_(+> coz [cod coz]) %_(+> coz [cod coz])
:: ::
++ sh-work :: do work ++ sh-work :: do work
|= job=work |= job=work
@ -791,7 +809,7 @@
++ work ++ work
?- -.job ?- -.job
%number (number +.job) %number (number +.job)
%listen (listen +.job) %join (join +.job)
%invite (invite +.job) %invite (invite +.job)
%banish (banish +.job) %banish (banish +.job)
%create (create +.job) %create (create +.job)
@ -806,19 +824,20 @@
~& [%activate gam] ~& [%activate gam]
sh-prod(active.she `~(tr-pals tr man.she gam)) sh-prod(active.she `~(tr-pals tr man.she gam))
:: ::
++ listen :: %listen ++ join :: %join
|= lix=(set partner) |= lix=(set partner)
^+ +>+>+> ^+ +>+>+>
=+ loc=loc.system.she
%^ sh-tell %design man.she %^ sh-tell %design man.she
:- ~ :- ~
=+ tal=(~(tap in lix)) =+ tal=(~(tap in lix))
%_ shape.roy %_ loc
sources sources
|- ^- (set partner) |- ^- (set partner)
?~ tal sources.shape.roy ?~ tal sources.loc
?: (~(has in sources.shape.roy) i.tal) ?: (~(has in sources.loc) i.tal)
$(tal t.tal, sources.shape.roy (~(del in sources.shape.roy) i.tal)) $(tal t.tal, sources.loc (~(del in sources.loc) i.tal))
$(tal t.tal, sources.shape.roy (~(put in sources.shape.roy) i.tal)) $(tal t.tal, sources.loc (~(put in sources.loc) i.tal))
== ==
:: ::
++ invite :: %invite ++ invite :: %invite
@ -836,11 +855,13 @@
^+ +>+>+> ^+ +>+>+>
?: (~(has in stories) nom) ?: (~(has in stories) nom)
(sh-lame "{(trip nom)}: already exists") (sh-lame "{(trip nom)}: already exists")
%^ sh-tell %design nom =. +>+>+>
:- ~ %^ sh-tell %design nom
:+ *(set partner) :- ~
(end 3 62 txt) :+ *(set partner)
[por ~] (end 3 62 txt)
[por ~]
(join [[%& our.hid nom] ~ ~])
:: ::
++ target :: %target ++ target :: %target
|= lix=(set partner) |= lix=(set partner)
@ -881,8 +902,16 @@
=+ jub=sh-pork =+ jub=sh-pork
?~ jub (sh-fact %bel ~) ?~ jub (sh-fact %bel ~)
=. +> (sh-work u.jub) =. +> (sh-work u.jub)
=+ buf=buf.say.she
=^ cal say.she (~(transmit cs say.she) [%set ~]) =^ cal say.she (~(transmit cs say.she) [%set ~])
(sh-fact %mor [%nex ~] [%det cal] ~) %- sh-fact
:* %mor
[%nex ~]
[%det cal]
?. ?=([%';' *] buf) ~
:_ ~
[%txt (weld "----------------| " (tufa buf))]
==
:: ::
++ sh-sole :: apply edit ++ sh-sole :: apply edit
|= act=sole-action |= act=sole-action
@ -898,7 +927,22 @@
-- --
++ ra-abed :: resolve core ++ ra-abed :: resolve core
^- [(list move) _+>] ^- [(list move) _+>]
[(flop moves) +>] :_ +>
=+ ^= yop
|- ^- (pair (list move) (list sole-effect))
?~ moves [~ ~]
=+ mor=$(moves t.moves)
?: ?& =(ost p.i.moves)
?=([%give %rush %sole-effect *] q.i.moves)
==
[p.mor [+>+.q.i.moves q.mor]]
[[i.moves p.mor] q.mor]
=+ :* moz=(flop p.yop)
^= foc ^- (unit sole-effect)
?~ q.yop ~
?~(t.q.yop `i.q.yop `[%mor (flop `(list sole-effect)`q.yop)])
==
?~(foc moz [[ost %give %rush %sole-effect u.foc] moz])
:: ::
++ ra-abet :: complete core ++ ra-abet :: complete core
ra-abed:ra-axel ra-abed:ra-axel
@ -917,6 +961,7 @@
[p.mor [[p.i.moves +>+.q.i.moves] q.mor]] [p.mor [[p.i.moves +>+.q.i.moves] q.mor]]
=. moves p.rey =. moves p.rey
?: =(q.rey ~) + ?: =(q.rey ~) +
=. q.rey (flop q.rey)
|- ^+ +> |- ^+ +>
?~ q.rey ra-axel ?~ q.rey ra-axel
$(q.rey t.q.rey, +> (ra-back(ost p.i.q.rey) q.i.q.rey)) $(q.rey t.q.rey, +> (ra-back(ost p.i.q.rey) q.i.q.rey))
@ -929,6 +974,10 @@
++ ra-sole ++ ra-sole
|= act=sole-action |= act=sole-action
^+ +> ^+ +>
=+ shu=(~(get by shells) ost)
?~ shu
~& [%ra-console-broken ost]
+>.$
sh-abet:(~(sh-sole sh ~ (~(got by shells) ost)) act) sh-abet:(~(sh-sole sh ~ (~(got by shells) ost)) act)
:: ::
++ ra-emil :: ra-emit move list ++ ra-emil :: ra-emit move list
@ -1036,6 +1085,7 @@
++ ra-cancel :: drop a bone ++ ra-cancel :: drop a bone
^+ . ^+ .
=+ hep=(~(get by sup.hid) ost) =+ hep=(~(get by sup.hid) ost)
~& [%ra-cancel hep]
?~ hep + ?~ hep +
?. ?=([@ @ *] q.u.hep) ?. ?=([@ @ *] q.u.hep)
+(general (~(del in general) ost)) +(general (~(del in general) ost))
@ -1232,8 +1282,8 @@
:: ::
[%g %mean *] [%g %mean *]
?~ +>.sih ?~ +>.sih
?. (~(has in sources.shape) tay) +>.$ :: XX hack for odd mean
(pa-acquire [tay ~]) (pa-acquire [tay ~])
~& [%pa-friend-mean +>.sih]
pa-monitor(sources.shape (~(del in sources.shape) tay)) pa-monitor(sources.shape (~(del in sources.shape) tay))
:: ::
[%g %rush %twit-feed *] [%g %rush %twit-feed *]
@ -1290,7 +1340,7 @@
:: == :: ==
:: ::
%& ~& [%pa-abjure [our.hid man] [p.p.tay q.p.tay]] %& ~& [%pa-abjure [our.hid man] [p.p.tay q.p.tay]]
:~ :- /friend/nuke/[man]/(scot %p p.p.tay)/[q.p.tay] :~ :- /friend/show/[man]/(scot %p p.p.tay)/[q.p.tay]
[%g %nuke [p.p.tay /talk] our.hid] [%g %nuke [p.p.tay /talk] our.hid]
== ==
== ==
@ -1311,7 +1361,7 @@
:: ::
%& :: ~& [%pa-acquire [our.hid man] [p.p.tay q.p.tay]] %& :: ~& [%pa-acquire [our.hid man] [p.p.tay q.p.tay]]
:~ :- /friend/show/[man]/(scot %p p.p.tay)/[q.p.tay] :~ :- /friend/show/[man]/(scot %p p.p.tay)/[q.p.tay]
[%g %show [p.p.tay /talk] our.hid /af/[q.p.tay]/(scot %ud num)] [%g %show [p.p.tay /talk] our.hid /afx/[q.p.tay]/(scot %ud num)]
== ==
== ==
:: ::
@ -1644,7 +1694,7 @@
=+ oug==(who our.hid) =+ oug==(who our.hid)
=+ txt=(tr-text oug) =+ txt=(tr-text oug)
?: =(~ txt) "" ?: =(~ txt) ""
=+ eck=?:((~(has by aud) [%& our.hid man]) '#' '-') =+ eck=?:((~(has by aud) [%& our.hid man]) '*' '-')
=+ heb=?:(oug '>' '<') =+ heb=?:(oug '>' '<')
=+ ^= baw =+ ^= baw
?: oug ?: oug
@ -1667,7 +1717,7 @@
(weld ": " txt) (weld ": " txt)
?: oug ?: oug
(weld "@ " txt) (weld "@ " txt)
(weld " " txt) (weld " " txt)
== ==
-- --
:: ::
@ -1730,8 +1780,8 @@
|= ost=bone |= ost=bone
^- [(list move) _+>] ^- [(list move) _+>]
:: ~& [%talk-pull `*`ost] :: ~& [%talk-pull `*`ost]
=. shells (~(del by shells) ost) =^ moz +>.$ ra-abet:ra-ever:~(ra-cancel ra ost ~)
ra-abet:ra-ever:~(ra-cancel ra ost ~) [moz +>.$(shells (~(del by shells) ost))]
:: ::
++ poke-bit ++ poke-bit
|= [ost=bone you=ship ~] |= [ost=bone you=ship ~]

View File

@ -37,10 +37,10 @@
$% [%twitter p=@t] :: twitter $% [%twitter p=@t] :: twitter
== :: == ::
++ posture :: security posture ++ posture :: security posture
$? %black :: public $? %black :: channel
%white :: private %white :: village
%green :: readonly %green :: journal
%brown :: writeonly %brown :: mailbox
== :: == ::
++ presence ?(%gone %hear %talk) :: status type ++ presence ?(%gone %hear %talk) :: status type
++ register (pair atlas (map partner atlas)) :: ping me, ping srcs ++ register (pair atlas (map partner atlas)) :: ping me, ping srcs