mirror of
https://github.com/urbit/shrub.git
synced 2024-12-01 06:35:32 +03:00
7. trivially single-home the vanes
This commit is contained in:
parent
b8e9268208
commit
e0bce20c26
@ -125,7 +125,7 @@
|
||||
?.(&(?=(@ a) ((sane %tas) a)) %$ a)
|
||||
::
|
||||
++ vent :: vane core
|
||||
|= [lal=@tas vil=vile bud=vase =vane]
|
||||
|= [who=ship lal=@tas vil=vile bud=vase =vane]
|
||||
~% %vent +>+ ~
|
||||
|%
|
||||
++ ruck :: update vase
|
||||
@ -164,7 +164,7 @@
|
||||
:: reset cache and add in vane activation entry
|
||||
::
|
||||
=^ rig worm.vane
|
||||
(~(slym wa *worm) vase.vane *[@da @ slyd])
|
||||
(~(slym wa *worm) vase.vane *[@p @da @ slyd])
|
||||
:: cache the access of the %scry arm
|
||||
::
|
||||
=^ fun worm.vane (~(slap wa worm.vane) rig [%limb %scry])
|
||||
@ -175,7 +175,7 @@
|
||||
::
|
||||
++ wink :: deploy
|
||||
|= {now/@da eny/@ ski/slyd}
|
||||
=^ rig worm.vane (~(slym wa worm.vane) vase.vane +<) :: activate vane
|
||||
=^ rig worm.vane (~(slym wa worm.vane) vase.vane [who +<]) :: activate vane
|
||||
~% %wink +>+> ~
|
||||
|%
|
||||
++ slid
|
||||
@ -337,7 +337,7 @@
|
||||
^- vase
|
||||
?: &(=(-.q.vase.vane -.q.sev) =(+>.q.vase.vane +>.q.sev))
|
||||
vase.vane :: unchanged, use old
|
||||
sev(+<.q [*@da *@ =>(~ |~(* ~))]) :: clear to stop leak
|
||||
sev(+<.q [*@p *@da *@ =>(~ |~(* ~))]) :: clear to stop leak
|
||||
::
|
||||
++ swim
|
||||
~/ %swim
|
||||
@ -374,12 +374,18 @@
|
||||
--
|
||||
::
|
||||
++ vint :: create vane
|
||||
|= {lal/@tas vil/vile bud/vase pax/path txt/@ta} ::
|
||||
|= $: who=ship
|
||||
lal=@tas
|
||||
vil=vile
|
||||
bud=vase
|
||||
pax=path
|
||||
txt=@ta
|
||||
==
|
||||
=- ?:(?=(%| -.res) ((slog p.res) ~) (some p.res))
|
||||
^= res %- mule |.
|
||||
=+ gen=(rain pax txt)
|
||||
~& [%vane-parsed `@p`(mug gen)]
|
||||
=+ pro=(vent lal vil bud [(slym (slap bud gen) bud) *worm])
|
||||
=+ pro=(vent who lal vil bud [(slym (slap bud gen) bud) *worm])
|
||||
~& [%vane-compiled `@p`(mug pro)]
|
||||
prime:pro
|
||||
::
|
||||
@ -394,7 +400,7 @@
|
||||
==
|
||||
::
|
||||
++ is :: operate in time
|
||||
|= {vil/vile eny/@ bud/vase vanes=(list [label=@tas =vane])}
|
||||
|= [who=ship vil=vile eny=@ bud=vase vanes=(list [label=@tas =vane])]
|
||||
|_ now/@da
|
||||
++ beck
|
||||
^- slyd
|
||||
@ -406,7 +412,7 @@
|
||||
|- ^- (unit (unit (cask)))
|
||||
?~ vanes ~
|
||||
?. =(lal label.i.vanes) $(vanes t.vanes)
|
||||
%- scry:(wink:(vent lal vil bud vane.i.vanes) now (shax now) ..^$)
|
||||
%- scry:(wink:(vent who lal vil bud vane.i.vanes) now (shax now) ..^$)
|
||||
[fur ren bed]
|
||||
::
|
||||
++ dink :: vase by char
|
||||
@ -445,7 +451,7 @@
|
||||
++ race :: take
|
||||
|= {org/@tas lal/@tas pux/(unit wire) hen/duct hil/mill =vane}
|
||||
^- [p=(list move) q=_vane]
|
||||
=+ ven=(vent lal vil bud vane)
|
||||
=+ ven=(vent who lal vil bud vane)
|
||||
=+ win=(wink:ven now (shax now) beck)
|
||||
(swim:win org pux hen hil)
|
||||
::
|
||||
@ -583,7 +589,9 @@
|
||||
|= {now/@da hap/path}
|
||||
^- (unit)
|
||||
?~ hap [~ hoon-version]
|
||||
=+ rob=((sloy ~(beck (is vil eny mast vanes) now)) [151 %noun] hap)
|
||||
=/ who=ship
|
||||
?^(urb u.urb (dec (bex 128)))
|
||||
=+ rob=((sloy ~(beck (is who vil eny mast vanes) now)) [151 %noun] hap)
|
||||
?~ rob ~
|
||||
?~ u.rob ~
|
||||
[~ u.u.rob]
|
||||
@ -602,8 +610,10 @@
|
||||
?: ?=(?(%veer %vega %verb %wack %whom) -.q.ovo)
|
||||
[[ovo ~] +>.$]
|
||||
::
|
||||
=/ who=ship
|
||||
?^(urb u.urb (dec (bex 128)))
|
||||
=^ zef vanes
|
||||
(~(hurl (is vil eny mast vanes) now) lac ovo)
|
||||
(~(hurl (is who vil eny mast vanes) now) lac ovo)
|
||||
[zef +>.$]
|
||||
:: +feck: handle an arvo effect
|
||||
::
|
||||
@ -789,6 +799,8 @@
|
||||
=> .(fav ((hard {$veer lal/@ta pax/path txt/@t}) fav))
|
||||
=- ?:(?=(%| -.res) ((slog p.res) +>.$) p.res)
|
||||
^= res %- mule |.
|
||||
=/ who=ship
|
||||
?^(urb u.urb (dec (bex 128)))
|
||||
?: =(%$ lal.fav)
|
||||
~& [%tang pax.fav `@p`(mug txt.fav)]
|
||||
=+ gen=(rain pax.fav txt.fav)
|
||||
@ -799,7 +811,7 @@
|
||||
|- ^+ vanes
|
||||
?~ vanes
|
||||
~& [%vane `@tas`lal.fav pax.fav `@p`(mug txt.fav)]
|
||||
=+ vin=(vint lal.fav vil mast pax.fav txt.fav)
|
||||
=+ vin=(vint who lal.fav vil mast pax.fav txt.fav)
|
||||
?~ vin
|
||||
vanes
|
||||
[[lal.fav vane:u.vin] vanes]
|
||||
@ -808,7 +820,7 @@
|
||||
~& [%vane `@tas`lal.fav pax.fav `@p`(mug txt.fav)]
|
||||
:_ t.vanes
|
||||
:- label.i.vanes
|
||||
vane:(ruck:(vent lal.fav vil mast [vase.vane.i.vanes *worm]) pax.fav txt.fav)
|
||||
vane:(ruck:(vent who lal.fav vil mast [vase.vane.i.vanes *worm]) pax.fav txt.fav)
|
||||
==
|
||||
::
|
||||
++ wish :: external compute
|
||||
|
@ -1221,7 +1221,7 @@
|
||||
::
|
||||
=| $: fox=fort :: kernel state
|
||||
== ::
|
||||
|= [now=@da eny=@ ski=sley] :: current invocation
|
||||
|= [our=ship now=@da eny=@uvJ ski=sley] :: current invocation
|
||||
^? :: opaque core
|
||||
=<
|
||||
|% :: vane interface
|
||||
|
@ -147,7 +147,7 @@
|
||||
. ==
|
||||
=| coke :: persistent state
|
||||
=* state - ::
|
||||
|= {now/@da eny/@ ski/sley} :: current invocation
|
||||
|= [our=ship now=@da eny=@uvJ ski=sley] :: current invocation
|
||||
^?
|
||||
|% :: poke+peek pattern
|
||||
++ call :: handle request
|
||||
|
@ -3698,7 +3698,7 @@
|
||||
$: $1 :: vane version
|
||||
ruf/raft :: revision tree
|
||||
== ::
|
||||
|= {now/@da eny/@ ski/sley} :: activate
|
||||
|= [our=ship now=@da eny=@uvJ ski=sley] :: current invocation
|
||||
^? :: opaque core
|
||||
|% ::
|
||||
++ call :: handle request
|
||||
|
@ -136,7 +136,7 @@
|
||||
:::::::: :: dill tiles
|
||||
--
|
||||
=| all/axle
|
||||
|= {now/@da eny/@ ski/sley} :: current invocation
|
||||
|= [our=ship now=@da eny=@uvJ ski=sley] :: current invocation
|
||||
=> |%
|
||||
++ as :: per cause
|
||||
=| moz/(list move)
|
||||
|
@ -2241,7 +2241,7 @@
|
||||
. ==
|
||||
=| bolo
|
||||
=* bol -
|
||||
|= {now/@da eny/@ ski/sley} :: activate
|
||||
|= [our=ship now=@da eny=@uvJ ski=sley] :: current invocation
|
||||
^? :: opaque core
|
||||
|% ::
|
||||
++ call :: handle request
|
||||
|
@ -6070,9 +6070,10 @@
|
||||
:: begin with a default +axle as a blank slate
|
||||
::
|
||||
=| ax=axle
|
||||
:: a vane is activated with current date, entropy, and a namespace function
|
||||
:: a vane is activated with identity, the current date, entropy,
|
||||
:: and a namespace function
|
||||
::
|
||||
|= [now=@da eny=@ scry-gate=sley]
|
||||
|= [our=ship now=@da eny=@uvJ scry-gate=sley]
|
||||
:: allow jets to be registered within this core
|
||||
::
|
||||
~% %ford ..is ~
|
||||
|
@ -97,9 +97,10 @@
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
. ==
|
||||
=| all/axle :: all vane state
|
||||
|= $: now/@da :: urban time
|
||||
eny/@uvJ :: entropy
|
||||
ska/sley :: activate
|
||||
|= $: our=ship :: identity
|
||||
now=@da :: urban time
|
||||
eny=@uvJ :: entropy
|
||||
ska=sley :: activate
|
||||
== :: opaque core
|
||||
~% %gall-top ..is ~
|
||||
|% :::::::::::::::::::::::::::::::::::::::::::::::::::::: state machine
|
||||
|
@ -608,8 +608,8 @@
|
||||
$: :: now: current time
|
||||
:: eny: unique entropy
|
||||
::
|
||||
now/@da
|
||||
eny/@e
|
||||
now=@da
|
||||
eny=@uvJ
|
||||
==
|
||||
:: all vane state
|
||||
::
|
||||
@ -2183,13 +2183,15 @@
|
||||
::
|
||||
=| lex/state
|
||||
|= $: ::
|
||||
:: our: identity
|
||||
:: now: current time
|
||||
:: eny: unique entropy
|
||||
:: ski: namespace resolver
|
||||
::
|
||||
now/@da
|
||||
eny/@e
|
||||
ski/sley
|
||||
our=ship
|
||||
now=@da
|
||||
eny=@uvJ
|
||||
ski=sley
|
||||
==
|
||||
|%
|
||||
:: :: ++call
|
||||
|
@ -33,7 +33,7 @@
|
||||
==
|
||||
^- [tang _ames-gate]
|
||||
::
|
||||
=/ ames (ames-gate now=now eny=`@e`0xdead.beef scry=*sley)
|
||||
=/ ames (ames-gate our=~zod now=now eny=`@`0xdead.beef scry=*sley)
|
||||
::
|
||||
=^ moves ames-gate
|
||||
%- call:ames call-args
|
||||
|
@ -463,7 +463,7 @@
|
||||
==
|
||||
^- [tang _clay-gate]
|
||||
::
|
||||
=/ clay-core (clay-gate now=now eny=0xdead.beef scry=scry)
|
||||
=/ clay-core (clay-gate our=~zod now=now eny=`@`0xdead.beef scry=scry)
|
||||
::
|
||||
=^ moves clay-gate (call:clay-core call-args)
|
||||
::
|
||||
@ -484,7 +484,7 @@
|
||||
==
|
||||
^- [tang _clay-gate]
|
||||
::
|
||||
=/ clay-core (clay-gate now=now eny=0xdead.beef scry=scry)
|
||||
=/ clay-core (clay-gate our=~zod now=now eny=`@`0xdead.beef scry=scry)
|
||||
::
|
||||
=^ moves clay-gate (call:clay-core call-args)
|
||||
::
|
||||
@ -502,7 +502,7 @@
|
||||
==
|
||||
^- [tang _clay-gate]
|
||||
::
|
||||
=/ clay-core (clay-gate now=now eny=0xdead.beef scry=scry)
|
||||
=/ clay-core (clay-gate our=~zod now=now eny=`@`0xdead.beef scry=scry)
|
||||
::
|
||||
=^ moves clay-gate (take:clay-core take-args)
|
||||
::
|
||||
@ -523,7 +523,7 @@
|
||||
==
|
||||
^- [tang _clay-gate]
|
||||
::
|
||||
=/ clay-core (clay-gate now=now eny=0xdead.beef scry=scry)
|
||||
=/ clay-core (clay-gate our=~zod now=now eny=`@`0xdead.beef scry=scry)
|
||||
::
|
||||
=^ moves clay-gate (take:clay-core take-args)
|
||||
::
|
||||
|
@ -14,6 +14,7 @@
|
||||
::
|
||||
=/ test-pit=vase !>(..zuse)
|
||||
=/ ford-gate (ford-vane test-pit)
|
||||
~! +6.ford-gate
|
||||
::
|
||||
|%
|
||||
++ test-tear ^- tang
|
||||
@ -7260,7 +7261,7 @@
|
||||
==
|
||||
^- [tang _ford-gate]
|
||||
::
|
||||
=/ ford (ford-gate now=now eny=0xdead.beef scry=scry)
|
||||
=/ ford (ford-gate our=~zod now=now eny=`@`0xdead.beef scry=scry)
|
||||
::
|
||||
=^ moves ford-gate
|
||||
%- call:ford call-args
|
||||
@ -7281,7 +7282,7 @@
|
||||
==
|
||||
^- [tang _ford-gate]
|
||||
::
|
||||
=/ ford (ford-gate now=now eny=0xdead.beef scry=scry)
|
||||
=/ ford (ford-gate our=~zod now=now eny=`@`0xdead.beef scry=scry)
|
||||
::
|
||||
=^ moves ford-gate
|
||||
%- take:ford take-args
|
||||
@ -7306,7 +7307,7 @@
|
||||
==
|
||||
^- [tang _ford-gate]
|
||||
::
|
||||
=/ ford (ford-gate now=now eny=0xdead.beef scry=scry)
|
||||
=/ ford (ford-gate our=~zod now=now eny=`@`0xdead.beef scry=scry)
|
||||
::
|
||||
=^ moves ford-gate
|
||||
%- call:ford call-args
|
||||
@ -7325,7 +7326,7 @@
|
||||
==
|
||||
^- [tang _ford-gate]
|
||||
::
|
||||
=/ ford (ford-gate now=now eny=0xdead.beef scry=scry)
|
||||
=/ ford (ford-gate our=~zod now=now eny=`@`0xdead.beef scry=scry)
|
||||
::
|
||||
=^ moves ford-gate
|
||||
%- take:ford take-args
|
||||
|
@ -89,7 +89,7 @@
|
||||
==
|
||||
^- [tang _jael-gate]
|
||||
::
|
||||
=/ jael (jael-gate now=now eny=`@e`0xdead.beef scry=*sley)
|
||||
=/ jael (jael-gate our=~zod now=now eny=`@`0xdead.beef scry=*sley)
|
||||
::
|
||||
=^ moves jael-gate
|
||||
%- call:jael call-args
|
||||
@ -109,7 +109,7 @@
|
||||
==
|
||||
^- [tang _jael-gate]
|
||||
::
|
||||
=/ jael (jael-gate now=now eny=`@e`0xdead.beef scry=*sley)
|
||||
=/ jael (jael-gate our=~zod now=now eny=`@`0xdead.beef scry=*sley)
|
||||
::
|
||||
=^ moves jael-gate
|
||||
%- call:jael call-args
|
||||
@ -126,7 +126,7 @@
|
||||
==
|
||||
^- [tang _jael-gate]
|
||||
::
|
||||
=/ jael (jael-gate now=now eny=`@e`0xdead.beef scry=*sley)
|
||||
=/ jael (jael-gate our=~zod now=now eny=`@`0xdead.beef scry=*sley)
|
||||
::
|
||||
=^ moves jael-gate
|
||||
%- take:jael take-args
|
||||
@ -146,7 +146,7 @@
|
||||
==
|
||||
^- [tang _jael-gate]
|
||||
::
|
||||
=/ jael (jael-gate now=now eny=`@e`0xdead.beef scry=*sley)
|
||||
=/ jael (jael-gate our=~zod now=now eny=`@`0xdead.beef scry=*sley)
|
||||
::
|
||||
=^ moves jael-gate
|
||||
%- take:jael take-args
|
||||
|
Loading…
Reference in New Issue
Block a user