Add cache to ++song, etc.

This commit is contained in:
C. Guy Yarvin 2015-01-12 17:49:31 -08:00
parent d2be7d7585
commit 4247446cc3
4 changed files with 234 additions and 174 deletions

View File

@ -114,6 +114,8 @@
== ::
++ calx :: concrete cache line
$% [%hood p=calm q=(pair beam cage) r=hood] :: compile
[%slit p=calm q=[p=type q=type] r=type] :: slam type
[%slim p=calm q=[p=type q=twig] r=(pair type nock)]:: mint
[%slap p=calm q=[p=vase q=twig] r=vase] :: compute
[%slam p=calm q=[p=vase q=vase] r=vase] :: compute
== ::
@ -131,6 +133,8 @@
%hood ?>(?=(%hood -.cax) r.cax)
%slap ?>(?=(%slap -.cax) r.cax)
%slam ?>(?=(%slam -.cax) r.cax)
%slim ?>(?=(%slim -.cax) r.cax)
%slit ?>(?=(%slit -.cax) r.cax)
==
::
++ calk :: cache lookup
@ -189,6 +193,76 @@
=+ gib=(wox p.n.r.arc)
?~(gib rac [[u.gib p.n.r.arc] rac])
::
--
. ==
=| axle
=* lex -
|= [now=@da eny=@ ski=sled] :: activate
^? :: opaque core
~% %ford-d +>+>+>+>+>+> ~
|% ::
++ call :: request
~/ %call
|= [hen=duct hic=(hypo (hobo kiss))]
^- [p=(list move) q=_..^$]
=> .(q.hic ?.(?=(%soft -.q.hic) q.hic ((hard kiss) p.q.hic)))
=+ ska=(slod ski)
=+ ^= our ^- @p
?- -.q.hic
%exec p.q.hic
==
=+ ^= bay ^- baby
=+ buy=(~(get by pol.lex) our)
?~(buy *baby u.buy)
=^ mos bay
abet:(~(apex za [[our ~ hen] [now eny ska] ~] bay) q.q.hic)
[mos ..^$(pol (~(put by pol) our bay))]
::
++ doze
|= [now=@da hen=duct]
^- (unit ,@da)
~
::
++ load :: highly forgiving
|= old=*
=. old
?. ?=([%0 *] old) old :: remove at 1
:- %1
|- ^- *
?~ +.old ~
?> ?=([n=[p=* q=[tad=* dym=* jav=*]] l=* r=*] +.old)
:- [p.n.+.old [tad.q.n.+.old dym.q.n.+.old ~]]
[$(+.old l.+.old) $(+.old r.+.old)]
=+ lox=((soft axle) old)
^+ ..^$
?~ lox
~& %ford-reset
..^$
..^$(+>- u.lox)
::
++ scry
|= [fur=(unit (set monk)) ren=@tas who=ship syd=desk lot=coin tyl=path]
^- (unit (unit (pair mark ,*)))
~
::
++ stay :: save w/o cache
`axle`+>-.$(pol (~(run by pol) |=(a=baby [tad.a dym.a ~])))
::
++ take :: response
~/ %take
|= [tea=wire hen=duct hin=(hypo sign)]
^- [p=(list move) q=_..^$]
=+ ska=(slod ski)
?> ?=([@ @ @ ~] tea)
=+ :* our=(need (slaw %p i.tea))
num=(need (slaw %ud i.t.tea))
tik=(need (slaw %ud i.t.t.tea))
==
=+ bay=(need (~(get by pol.lex) our))
=^ mos bay
abet:(~(axon za [[our tea hen] [now eny ska] ~] bay) num tik q.hin)
[mos ..^$(pol (~(put by pol) our bay))]
::
++ za :: per event
=| $: $: $: our=ship :: computation owner
tea=wire :: event place
@ -202,6 +276,7 @@
== ::
bay=baby :: all owned state
== ::
~% %za +> ~
|%
++ abet :: resolve
^- [(list move) baby]
@ -237,6 +312,7 @@
==
::
++ zo
~% %zo +> ~
|_ [num=@ud task]
++ abet %_(..zo q.tad.bay (~(put by q.tad.bay) num +<+))
++ amok
@ -581,6 +657,7 @@
--
::
++ kale :: mutate
~/ %kale
|= [cof=cafe kas=silk muy=(list (pair wing silk))]
^- (bolt cage)
%+ cope
@ -599,9 +676,10 @@
(fine cof p.cay vax)
::
++ keel :: apply mutations
~/ %keel
|= [cof=cafe suh=vase yom=(list (pair wing vase))]
^- (bolt vase)
%^ maim cof
%^ maim-a cof
%+ slop suh
|- ^- vase
?~ yom [[%atom %n] ~]
@ -666,6 +744,7 @@
((lake for [our %main [%da now]]) cof [%noun som])
::
++ lane :: type infer
~/ %lane
|= [cof=cafe typ=type gen=twig]
%+ (cowl cof) (mule |.((~(play ut typ) gen)))
|=(ref=type ref)
@ -754,7 +833,7 @@
?: &((slab %grow p.pro) (slab too p:(slap pro [%cnzy %grow])))
%+ cope (keel cof pro [[%& 6]~ vax]~)
|= [cof=cafe pox=vase]
(maim cof pox [%tsgr [%cnzy %grow] [%cnzy too]])
(maim-b cof pox [%tsgr [%cnzy %grow] [%cnzy too]])
%+ cope (fang cof too bek)
|= [cof=cafe pro=vase]
=+ ^= zat ^- (unit vase)
@ -807,19 +886,37 @@
|= [cof=cafe yed=vase]
^$(cof cof, for i.yaw, yaw t.yaw, vax yed)
::
++ maim :: slap
|= [cof=cafe vax=vase gen=twig]
^- (bolt vase)
%+ (clef %slap) (fine cof vax gen)
|= [cof=cafe vax=vase gen=twig]
=+ puz=(mule |.((~(mint ut p.vax) [%noun gen])))
++ mail :: cached mint
~/ %mail
|= [cof=cafe sut=type gen=twig]
^- (bolt (pair type nock))
%+ (clef %slim) (fine cof sut gen)
|= [cof=cafe sut=type gen=twig]
=+ puz=(mule |.((~(mint ut sut) [%noun gen])))
?- -.puz
| (flaw cof p.puz)
& %+ (coup cof) (mock [q.vax q.p.puz] (mole ska))
|= val=*
`vase`[p.p.puz val]
& (fine cof p.puz)
==
::
++ maim :: slap
~/ %maim
|= [cof=cafe vax=vase gen=twig]
^- (bolt vase)
%+ cope (mail cof p.vax gen)
|= [cof=cafe typ=type fol=nock]
%+ (coup cof) (mock [q.vax fol] (mole ska))
|=(val=* `vase`[typ val])
::
++ maim-a ~/(%maim-a |=([cof=cafe vax=vase gen=twig] (maim cof vax gen)))
++ maim-b ~/(%maim-b |=([cof=cafe vax=vase gen=twig] (maim cof vax gen)))
++ maim-c ~/(%maim-c |=([cof=cafe vax=vase gen=twig] (maim cof vax gen)))
++ maim-d ~/(%maim-d |=([cof=cafe vax=vase gen=twig] (maim cof vax gen)))
++ maim-e ~/(%maim-e |=([cof=cafe vax=vase gen=twig] (maim cof vax gen)))
++ maim-f ~/(%maim-f |=([cof=cafe vax=vase gen=twig] (maim cof vax gen)))
++ maim-g ~/(%maim-g |=([cof=cafe vax=vase gen=twig] (maim cof vax gen)))
++ maim-h ~/(%maim-h |=([cof=cafe vax=vase gen=twig] (maim cof vax gen)))
++ maim-i ~/(%maim-i |=([cof=cafe vax=vase gen=twig] (maim cof vax gen)))
::
++ make :: reduce silk
|= [cof=cafe kas=silk]
^- (bolt cage)
@ -894,7 +991,7 @@
%+ cool |.(leaf/"ford: ride {<`@p`(mug kas)>}")
%+ cope $(kas q.kas)
|= [cof=cafe cay=cage]
%+ cope (maim cof q.cay p.kas)
%+ cope (maim-c cof q.cay p.kas)
|= [cof=cafe vax=vase]
(fine cof %noun vax)
::
@ -905,19 +1002,27 @@
(fine cof `cage`[p.kas vax])
==
::
++ maul :: slam
|= [cof=cafe gat=vase sam=vase]
^- (bolt vase)
%+ (clef %slam) (fine cof gat sam)
|= [cof=cafe gat=vase sam=vase]
=+ top=(mule |.((slit p.gat p.sam)))
++ malt :: cached slit
~/ %malt
|= [cof=cafe gat=type sam=type]
^- (bolt type)
%+ (clef %slit) (fine cof gat sam)
|= [cof=cafe gat=type sam=type]
=+ top=(mule |.((slit gat sam)))
?- -.top
| (flaw cof p.top)
& %+ (coup cof) (mong [q.gat q.sam] (mole ska))
|= val=*
`vase`[p.top val]
& (fine cof p.top)
==
::
++ maul :: slam
~/ %maul
|= [cof=cafe gat=vase sam=vase]
^- (bolt vase)
%+ cope (malt cof p.gat p.sam)
|= [cof=cafe typ=type]
%+ (coup cof) (mong [q.gat q.sam] (mole ska))
|=(val=* `vase`[typ val])
::
++ meow :: assemble
|= [how=beam arg=heel]
=| $: rop=(map term (pair hoof twig)) :: structure/complex
@ -926,6 +1031,7 @@
zeg=(set term) :: library guard
boy=(list twig) :: body stack
==
~% %meow +>+> ~
|%
++ able :: assemble preamble
^- twig
@ -949,16 +1055,17 @@
[%ash [%tssg (flop boy)]]
::
++ abut :: generate
~/ %abut
|= [cof=cafe hyd=hood]
^- (bolt vase)
%+ cope (apex cof hyd)
|= [cof=cafe sel=_..abut]
=. ..abut sel
%+ cope (maim cof pit able)
%+ cope (maim-d cof pit able)
|= [cof=cafe bax=vase]
%+ cope (chap cof bax [%fan fan.hyd])
|= [cof=cafe gox=vase]
%+ cope (maim cof (slop gox bax) [%tssg (flop boy)])
%+ cope (maim-e cof (slop gox bax) [%tssg (flop boy)])
|= [cof=cafe fin=vase]
(fine cof fin)
:: ~> %slog.[0 ~(duck ut p.q.cay)]
@ -1030,12 +1137,13 @@
(slop $(doy l.doy) $(doy r.doy))
::
++ chap :: produce resources
~/ %chap
|= [cof=cafe bax=vase hon=horn]
^- (bolt vase)
?- -.hon
%ape (maim cof bax p.hon)
%ape (maim-f cof bax p.hon)
%arg
%+ cope (maim cof bax p.hon)
%+ cope (maim-g cof bax p.hon)
|= [cof=cafe gat=vase]
(maul cof gat !>([how arg]))
::
@ -1082,14 +1190,14 @@
%saw
%+ cope $(hon q.hon)
|= [cof=cafe sam=vase]
%+ cope (maim cof bax p.hon)
%+ cope (maim-h cof bax p.hon)
|= [cof=cafe gat=vase]
(maul cof gat sam)
::
%sic
%+ cope $(hon q.hon)
|= [cof=cafe vax=vase]
%+ cope (maim cof bax [%bctr p.hon])
%+ cope (maim-i cof bax [%bctr p.hon])
|= [cof=cafe tug=vase]
?. (~(nest ut p.tug) | p.vax)
(flaw cof [%leaf "type error: {<p.hon>} {<q.hon>}"]~)
@ -1207,69 +1315,3 @@
--
--
--
. ==
=| axle
=* lex -
|= [now=@da eny=@ ski=sled] :: activate
^? :: opaque core
|% ::
++ call :: request
|= [hen=duct hic=(hypo (hobo kiss))]
^- [p=(list move) q=_..^$]
=> .(q.hic ?.(?=(%soft -.q.hic) q.hic ((hard kiss) p.q.hic)))
=+ ska=(slod ski)
=+ ^= our ^- @p
?- -.q.hic
%exec p.q.hic
==
=+ ^= bay ^- baby
=+ buy=(~(get by pol.lex) our)
?~(buy *baby u.buy)
=^ mos bay
abet:(~(apex za [[our ~ hen] [now eny ska] ~] bay) q.q.hic)
[mos ..^$(pol (~(put by pol) our bay))]
::
++ doze
|= [now=@da hen=duct]
^- (unit ,@da)
~
::
++ load :: highly forgiving
|= old=*
=. old
?. ?=([%0 *] old) old :: remove at 1
:- %1
|- ^- *
?~ +.old ~
?> ?=([n=[p=* q=[tad=* dym=* jav=*]] l=* r=*] +.old)
:- [p.n.+.old [tad.q.n.+.old dym.q.n.+.old ~]]
[$(+.old l.+.old) $(+.old r.+.old)]
=+ lox=((soft axle) old)
^+ ..^$
?~ lox
~& %ford-reset
..^$
..^$(+>- u.lox)
::
++ scry
|= [fur=(unit (set monk)) ren=@tas who=ship syd=desk lot=coin tyl=path]
^- (unit (unit (pair mark ,*)))
~
::
++ stay :: save w/o cache
`axle`+>-.$(pol (~(run by pol) |=(a=baby [tad.a dym.a ~])))
::
++ take :: response
|= [tea=wire hen=duct hin=(hypo sign)]
^- [p=(list move) q=_..^$]
=+ ska=(slod ski)
?> ?=([@ @ @ ~] tea)
=+ :* our=(need (slaw %p i.tea))
num=(need (slaw %ud i.t.tea))
tik=(need (slaw %ud i.t.t.tea))
==
=+ bay=(need (~(get by pol.lex) our))
=^ mos bay
abet:(~(axon za [[our tea hen] [now eny ska] ~] bay) num tik q.hin)
[mos ..^$(pol (~(put by pol) our bay))]
--

View File

@ -9678,7 +9678,8 @@
++ sled $+ [(unit (set monk)) term beam] :: namespace function
(unit (unit cage)) ::
++ slut $+(* (unit (unit))) :: old namespace
++ vile :: reflexive constants
++ veal (set ,^) :: actually pair type
++ vile :: reflexive constants
$: typ=type :: -:!>(*type)
duc=type :: -:!>(*duct)
pah=type :: -:!>(*path)
@ -9713,21 +9714,21 @@
:: section 3bE, Arvo core ::
::
++ vent :: vane core
|= [lal=@tas vil=vile bud=vase ves=vase]
|= [lal=@tas vil=vile bud=vase sew=(pair veal vase)]
~% %vent +>+ ~
|%
++ ruck :: update vase
|= [pax=path txt=@ta]
^+ +>
=+ arg=[~2000.1.1 0 =>(~ |+(* ~))]
=+ rig=(slym ves arg)
=+ rig=(slym q.sew arg)
=+ rev=(slym (slap bud (rain pax txt)) bud)
=+ syg=(slym rev arg)
+>.$(ves (slam (slap syg [%cnzy %load]) (slap rig [%cnzy %stay])))
+>.$(q.sew (slam (slap syg [%cnzy %load]) (slap rig [%cnzy %stay])))
::
++ wink :: deploy
|= [now=@da eny=@ ski=sled]
=+ rig=(slym ves +<) :: activate vane
=+ rig=(slym q.sew +<) :: activate vane
~% %wink +>+> ~
|%
++ doze
@ -9738,10 +9739,13 @@
++ sike :: check metatype
~/ %sike
|= [sub=type ref=*]
^- ?
:: ?: =(~ ~) &
=+ gat=|=([a=type b=type] (~(nest ut a) | b))
(,? .*(gat(+< [sub ref]) -.gat))
^- (pair ,? veal)
?: (~(has in p.sew) [sub ref]) [& p.sew]
=+ ^= hip
=+ gat=|=([a=type b=type] (~(nest ut a) | b))
(,? .*(gat(+< [sub ref]) -.gat))
?. hip [| p.sew]
[& (~(put in p.sew) [sub ref])]
::
++ slid
|= [hed=mill tal=mill]
@ -9758,21 +9762,25 @@
| [%| [%cell typ.vil p.p.hil] p.hil]
==
::
++ slur
++ slur :: call gate on
|= [gat=vase hil=mill]
^- (unit vase)
^- (unit (pair vase veal))
=+ sam=(slot 6 gat)
?. ?- -.hil
& (souk p.sam p.p.hil)
| (sike p.sam p.p.hil)
== ~
`(slym gat +>.hil)
=+ ^= hig
?- -.hil
& (souk p.sam p.p.hil)
| (sike p.sam p.p.hil)
==
?.(p.hig ~ `[(slym gat +>.hil) q.hig])
::
++ souk :: check type
~/ %souk
|= [sub=type ref=type]
:: ?: =(~ ~) &
(~(nest ut sub) | ref)
^- (pair ,? veal)
?: (~(has in p.sew) [sub ref]) [& p.sew]
=+ hip=(~(nest ut sub) | ref)
?. hip [| p.sew]
[& (~(put in p.sew) [sub ref])]
::
++ sunk :: type is cell
|= ref=type
@ -9782,31 +9790,35 @@
++ song :: reduce metacard
~/ %song ::
|= mex=vase :: mex: vase of card
^- (unit mill) ::
?. (sunk p.mex) ~ :: a card is a cell
?. ?=(%meta -.q.mex) `[%& mex] :: ordinary card
^- (unit (pair mill veal)) ::
=^ hip p.sew (sunk p.mex) ::
?. hip ~ :: a card is a cell
?. ?=(%meta -.q.mex) `[[%& mex] p.sew] :: ordinary card
=+ tiv=(slot 3 mex) :: tiv: vase of vase
?. (sunk p.tiv) ~ :: a vase is a cell
?. (souk typ.vil p:(slot 2 tiv)) ~ :: vase head is type
%- biff :_ |=(a=milt `[%| a]) :: milt to mill
=^ hip p.sew (sunk p.tiv) ::
?. hip ~ :: a vase is a cell
=^ hip p.sew (souk typ.vil p:(slot 2 tiv)) ::
?. hip ~ :: vase head is type
%- biff :_ |=(a=milt `[[%| a] p.sew]) :: milt to mill
=+ mut=(milt q.tiv) :: card type, value
|- ^- (unit milt) ::
?. ?=([%meta p=* q=milt] q.mut) `mut :: ordinary metacard
?. (sike mev.vil p.mut) ~ :: meta-metacard
=^ hip p.sew (sike mev.vil p.mut) ::
?. hip ~ :: meta-metacard
$(mut +.q.mut) :: descend into meta
::
++ sump :: vase to move
~/ %sump
|= wec=vase
^- (unit move)
^- (unit (pair move veal))
%+ biff ((soft duct) -.q.wec)
|= a=duct
%- bind :_ |=(b=arvo `move`[a b])
%- bind :_ |=(b=(pair arvo veal) [`move`[a p.b] q.b])
=- ?- -.har
| ~& [%dead-card p.har] ~ :: XX properly log?
& (some p.har)
==
^= har ^- (each arvo term)
^= har ^- (each (pair arvo veal) term)
=+ caq=(spec (slot 3 wec))
?+ q.caq [%| (cat 3 %funk (,@tas q.caq))]
::
@ -9818,20 +9830,20 @@
%+ biff ((soft path) p.q.caq)
|= pax=path
%+ bind (song (spec (slot 15 caq)))
|= hil=mill
[%& %pass pax lal hil]
|= [hil=mill vel=veal]
[%& [%pass pax lal hil] vel]
::
[%give p=[p=@tas q=*]]
%- (bond |.([%| p.p.q.caq]))
%+ bind (song (spec (slot 3 caq)))
|= hil=mill
[%& %give hil]
|= [hil=mill vel=veal]
[%& [%give hil] vel]
::
[%sick p=[p=@tas q=*]]
%- (bond |.([%| p.p.q.caq]))
%+ bind (song (spec (slot 3 caq)))
|= hil=mill
[%& %sick hil]
|= [hil=mill vel=veal]
[%& [%sick hil] vel]
::
[%slip p=@tas q=[p=@tas q=*]]
%- (bond |.([%| p.q.q.caq]))
@ -9839,15 +9851,17 @@
|= lal=@tas
?. ((sane %tas) lal) ~
%+ bind (song (spec (slot 7 caq)))
|= hil=mill
[%& %slip lal hil]
|= [hil=mill vel=veal]
[%& [%slip lal hil] vel]
==
::
++ said :: vase to (list move)
|= vud=vase
|- ^- (list move)
?: =(~ q.vud) ~
[(need (sump (slot 2 vud))) $(vud (slot 3 vud))]
|- ^- (pair (list move) veal)
?: =(~ q.vud) [~ p.sew]
=^ mov p.sew (need (sump (slot 2 vud)))
=^ moz p.sew $(vud (slot 3 vud))
[[mov moz] p.sew]
::
++ scry :: read namespace
~/ %scry
@ -9861,7 +9875,7 @@
:* fur
ren
p.bed
q.bed
q.bed
`coin`[%$ r.bed]
(flop s.bed)
==
@ -9875,8 +9889,8 @@
++ soar :: scrub vane
|= sev=vase
^- vase
?: &(=(-.q.ves -.q.sev) =(+>.q.ves +>.q.sev))
ves :: unchanged, use old
?: &(=(-.q.q.sew -.q.sev) =(+>.q.q.sew +>.q.sev))
q.sew :: unchanged, use old
sev(+<.q [*@da *@ =>(~ |+(* ~))]) :: clear to stop leak
::
++ swim
@ -9886,7 +9900,7 @@
hen=duct
hil=mill
==
^- [p=(list move) q=vase]
^- [[p=(list move) q=veal] q=vase]
=+ ^= pru
?~ pux
~| [%swim-call-vane lal]
@ -9901,8 +9915,8 @@
==
?~ pru
~& [%swim-lost lal (,@tas +>-.hil)]
[~ ves]
=+ pro=(need pru)
[[~ p.sew] q.sew]
=^ pro p.sew (need pru)
:- (said (slap pro [%cnzy %p]))
(soar (slap pro [%cnzy %q]))
--
@ -9910,7 +9924,7 @@
::
++ vint :: create vane
|= [lal=@tas vil=vile bud=vase pax=path txt=@ta] ::
(vent lal vil bud (slym (slap bud (rain pax txt)) bud))
(vent lal vil bud ~ (slym (slap bud (rain pax txt)) bud))
::
++ viol :: vane tools
|= but=type
@ -9923,7 +9937,7 @@
==
::
++ is :: operate in time
|= [vil=vile eny=@ bud=vase fan=(list ,[p=@tas q=vase])]
|= [vil=vile eny=@ bud=vase niz=(pair veal (list ,[p=@tas q=vase]))]
|_ now=@da
++ beck
^- sled
@ -9933,14 +9947,14 @@
=+ lal=(end 3 1 ron)
=+ ren=(care (rsh 3 1 ron))
|- ^- (unit (unit cage))
?~ fan ~
?. =(lal p.i.fan) $(fan t.fan)
%- scry:(wink:(vent lal vil bud q.i.fan) now (shax now) ..^$)
?~ q.niz ~
?. =(lal p.i.q.niz) $(q.niz t.q.niz)
%- scry:(wink:(vent lal vil bud p.niz q.i.q.niz) now (shax now) ..^$)
[fur ren bed]
::
++ dink :: vase by char
|= din=@tas ^- vase
?~(fan !! ?:(=(din p.i.fan) q.i.fan $(fan t.fan)))
?~(q.niz !! ?:(=(din p.i.q.niz) q.i.q.niz $(q.niz t.q.niz)))
::
++ dint :: input routing
|= hap=path ^- @tas
@ -9956,7 +9970,7 @@
++ doos :: sleep until
|= hap=path ^- (unit ,@da)
=+ lal=(dint hap)
(doze:(wink:(vent lal vil bud (dink lal)) now 0 beck) now [hap ~])
(doze:(wink:(vent lal vil bud p.niz (dink lal)) now 0 beck) now [hap ~])
::
++ hurl :: start loop
|= [lac=? ovo=ovum]
@ -9976,27 +9990,27 @@
::
++ race :: take
|= [org=@tas lal=@tas pux=(unit wire) hen=duct hil=mill ves=vase]
^- [p=(list move) q=vase]
=+ ven=(vent lal vil bud ves)
^- [p=[p=(list move) q=veal] q=vase]
=+ ven=(vent lal vil bud [p.niz ves])
=+ win=(wink:ven now (shax now) beck)
(swim:win org pux hen hil)
::
++ fire :: execute
|= [org=term lal=term pux=(unit wire) hen=duct hil=mill]
?: &(?=(^ pux) ?=(~ hen))
[[[[lal u.pux] (curd +>.hil)]~ ~] fan]
=+ naf=fan
|- ^- [[p=(list ovum) q=(list muse)] _fan]
?~ naf [[~ ~] ~]
[[[[lal u.pux] (curd +>.hil)]~ ~] niz]
=+ naf=q.niz
|- ^- [[p=(list ovum) q=(list muse)] _niz]
?~ naf [[~ ~] [p.niz ~]]
?. =(lal p.i.naf)
=+ tuh=$(naf t.naf)
[-.tuh [i.naf +.tuh]]
[-.tuh [+<.tuh [i.naf +>.tuh]]]
=+ fiq=(race org lal pux hen hil q.i.naf)
[[~ (turn p.fiq |=(a=move [lal a]))] [[p.i.naf q.fiq] t.naf]]
[[~ (turn p.p.fiq |=(a=move [lal a]))] [q.p.fiq [[p.i.naf q.fiq] t.naf]]]
::
++ jack :: dispatch card
|= [lac=? gum=muse]
^- [[p=(list ovum) q=(list muse)] _fan]
^- [[p=(list ovum) q=(list muse)] _niz]
%+ fire
p.gum
?- -.r.gum
@ -10032,8 +10046,8 @@
|= [lac=? mor=(list muse)]
=| ova=(list ovum)
|- ^- [p=(list ovum) q=(list ,[p=@tas q=vase])]
?~ mor [(flop ova) fan]
=^ nyx fan (jack lac i.mor)
?~ mor [(flop ova) q.niz]
=^ nyx niz (jack lac i.mor)
$(ova (weld p.nyx ova), mor (weld q.nyx t.mor))
--
--
@ -10047,7 +10061,7 @@
=+ vil=(viol p.bud) :: cached reflexives
=| $: lac=? :: laconic bit
eny=@ :: entropy
fan=(list ,[p=@tas q=vase]) :: modules
niz=(pair veal (list ,[p=@tas q=vase])) :: modules
== ::
=< |%
++ come |= [@ (list ovum) pone] :: 11
@ -10091,13 +10105,13 @@
++ keep :: wakeup delay
|= [now=@da hap=path]
=> .(+< ((hard ,[now=@da hap=path]) +<))
(~(doos (is vil eny bud fan) now) hap)
(~(doos (is vil eny bud niz) now) hap)
::
++ load :: load compatible
|= [yen=@ ova=(list ovum) nyf=pane]
^+ [ova +>]
=: eny yen
fan nyf
q.niz nyf
==
|- ^+ [ova +>.^$]
?~ ova
@ -10112,7 +10126,7 @@
|= [now=@da hap=path]
^- (unit)
?~ hap [~ hoon]
=+ rob=((slod ~(beck (is vil eny bud fan) now)) hap)
=+ rob=((slod ~(beck (is vil eny bud niz) now)) hap)
?~ rob ~
?~ u.rob ~
[~ u.u.rob]
@ -10122,8 +10136,8 @@
=. eny (mix eny (shax now))
:: ~& [%poke -.q.ovo]
^- [(list ovum) _+>]
=^ zef fan
(~(hurl (is vil eny bud fan) now) lac ovo)
=^ zef q.niz
(~(hurl (is vil eny bud niz) now) lac ovo)
[zef +>.$]
::
++ vega :: reboot kernel
@ -10142,7 +10156,7 @@
~& [%vega-compiled hoon nex]
?> (lte nex hoon)
=+ gat=.*(ken .*(ken [0 ?:(=(nex hoon) 86 11)]))
=+ sam=[eny ova fan]
=+ sam=[eny ova q.niz]
=+ raw=.*([-.gat [sam +>.gat]] -.gat)
[[[~ %vega hap] ((list ovum) -.raw)] +.raw]
::
@ -10155,15 +10169,17 @@
=+ vax=(slap pit gen)
+>.$(bud vax)
%_ +>
fan
|- ^+ fan
?~ fan
q.niz
|- ^+ q.niz
?~ q.niz
~& [%vane `@tas`lal.fav pax.fav `@p`(mug txt.fav)]
[[lal.fav ves:(vint lal.fav vil bud pax.fav txt.fav)] fan]
?. =(lal.fav p.i.fan)
[i.fan $(fan t.fan)]
[[lal.fav q.sew:(vint lal.fav vil bud pax.fav txt.fav)] q.niz]
?. =(lal.fav p.i.q.niz)
[i.q.niz $(q.niz t.q.niz)]
~& [%vane `@tas`lal.fav pax.fav `@p`(mug txt.fav)]
[[p.i.fan ves:(ruck:(vent lal.fav vil bud q.i.fan) pax.fav txt.fav)] t.fan]
:_ t.q.niz
:- p.i.q.niz
q.sew:(ruck:(vent lal.fav vil bud [p.niz q.i.q.niz]) pax.fav txt.fav)
==
::
++ wish :: external compute

View File

@ -62,7 +62,7 @@
=+ lox=((soft axle) old)
^+ ..^$
?~ lox
~& %lunt-reset
~& %khan-reset
..^$
..^$(+>- u.lox)
::

View File

@ -27,10 +27,12 @@
++ story :: persona
$: link=(grip bridge) :: connection
count=@ud :: message counter
mike=(pair ,? (set station)) :: passive/voice
mike=voice :: current audience
quiet=? :: !verbose
past=(list station) :: past received auds
== ::
++ voice :: speaking to
(pair (unit (set station)) (set station)) :: active/passive
++ bridge :: remote state
$: xm=config :: configuration
am=register :: presence
@ -325,7 +327,7 @@
%_(+>.$ moz hy-abet:(hy-display:(hype moz) (flop tay)))
::
++ sy-prompt
|= tou=(set station)
|= [pas=? tou=(set station)]
^- tape
;: welp
(scow %p our.hid)
@ -630,7 +632,7 @@
::
%time
:_ +>.$
~& [%talk-pour-time lat.hid `@da`(add ~s12 lat.hid)]
:: ~& [%talk-pour-time lat.hid `@da`(add ~s12 lat.hid)]
:~ [0 %pass /time %t %wait (add ~s12 lat.hid)]
==
::