mirror of
https://github.com/urbit/shrub.git
synced 2024-12-04 14:58:10 +03:00
Scry interface fixes.
This commit is contained in:
parent
26be7c0871
commit
32295555c5
@ -1428,7 +1428,7 @@
|
||||
::
|
||||
=| $: fox=furt :: kernel state
|
||||
== ::
|
||||
|= [now=@da eny=@ ska=$+(* (unit (unit)))] :: current invocation
|
||||
|= [now=@da eny=@ ski=sled] :: current invocation
|
||||
^? :: opaque core
|
||||
=<
|
||||
|% :: vane interface
|
||||
@ -1460,10 +1460,9 @@
|
||||
(hunt doz rtn.sop.bah)
|
||||
::
|
||||
++ load
|
||||
|= new=vase
|
||||
|= old=furt
|
||||
^+ ..^$
|
||||
?. (~(nest ut -:!>(fox)) | p.new) ~&(%ames-reset ..^$)
|
||||
..^$(fox ~(boot am [now (furt q.new)]))
|
||||
..^$(fox old)
|
||||
::
|
||||
++ scry
|
||||
|= [fur=(unit (set monk)) ren=@tas who=ship syd=desk lot=coin tyl=path]
|
||||
@ -1484,7 +1483,7 @@
|
||||
(temp who u.hun [syd t.tyl])
|
||||
==
|
||||
::
|
||||
++ stay `vase`!>(fox)
|
||||
++ stay fox
|
||||
--
|
||||
|%
|
||||
++ claw |=(our=ship ^-(duct hen:(need (~(get by zac.fox) our))))
|
||||
|
@ -1148,13 +1148,14 @@
|
||||
big=(unit ,@p) :: major ship
|
||||
dez=(map duct brim) :: state by ship
|
||||
== ::
|
||||
|= [now=@da eny=@ ska=$+(* (unit (unit)))] :: current invocation
|
||||
|= [now=@da eny=@ ski=sled] :: current invocation
|
||||
^? :: opaque core
|
||||
|% :: poke/peek pattern
|
||||
++ take :: process move
|
||||
|= [tea=wire hen=duct typ=type fav=card]
|
||||
^- [p=(list move) q=_..^$]
|
||||
:: ~& [%batz-take -.fav [%tea tea] [%hen hen]]
|
||||
=+ ska=(slod ski)
|
||||
=+ sky=|=(* `(unit)`=+(a=(ska +<) ?~(a ~ ?~(u.a ~ [~ u.u.a]))))
|
||||
?: ?=([%crud *] fav)
|
||||
[[[hen [%slip %d %flog fav]] ~] ..^$]
|
||||
@ -1272,15 +1273,14 @@
|
||||
==
|
||||
::
|
||||
++ load
|
||||
|= old=vase
|
||||
|= old=[%0 big=(unit ,@p) dez=(map duct brim)]
|
||||
^+ ..^$
|
||||
~? !(~(nest ut -:!>(dez)) | p.old) %batz-reset
|
||||
..^$(dez ((map duct brim) q.old))
|
||||
..^$(big big.old, dez dez.old)
|
||||
::
|
||||
++ scry
|
||||
|= [fur=(unit (set monk)) ren=@tas his=ship syd=desk lot=coin tyl=path]
|
||||
^- (unit (unit))
|
||||
~
|
||||
::
|
||||
++ stay `vase`!>(dez)
|
||||
++ stay [%0 big dez]
|
||||
--
|
||||
|
@ -327,7 +327,7 @@
|
||||
$: %0 :: vane version
|
||||
ruf=raft :: revision tree
|
||||
== ::
|
||||
|= [now=@da eny=@ ska=$+(* (unit (unit)))] :: activate
|
||||
|= [now=@da eny=@ ski=sled] :: activate
|
||||
^? :: opaque core
|
||||
|% ::
|
||||
++ take :: update
|
||||
@ -431,12 +431,9 @@
|
||||
$(dal t.dal, nex (hunt nex doze:(un i.dal now ruf)))
|
||||
::
|
||||
++ load
|
||||
|= old=vase
|
||||
|= old=[%0 ruf=raft]
|
||||
^+ ..^$
|
||||
?. (~(nest ut -:!>(ruf)) & p.old)
|
||||
~& %clay-reset
|
||||
..^$
|
||||
..^$(ruf (raft q.old))
|
||||
..^$(ruf ruf.old)
|
||||
::
|
||||
++ scry :: inspect
|
||||
|= [fur=(unit (set monk)) ren=@tas his=ship syd=desk lot=coin tyl=path]
|
||||
@ -453,5 +450,5 @@
|
||||
=+ dud=?.(got (do now [his his] syd ruf) (di:une syd))
|
||||
aver:dud
|
||||
::
|
||||
++ stay `vase`!>(ruf)
|
||||
++ stay [%0 ruf]
|
||||
--
|
||||
|
@ -5,7 +5,7 @@
|
||||
=| $: %0 ::
|
||||
dug=(map duct yard) ::
|
||||
== ::
|
||||
|= [now=@da eny=@ ska=$+(* (unit (unit)))] :: current invocation
|
||||
|= [now=@da eny=@ ski=sled] :: current invocation
|
||||
^? :: opaque core
|
||||
|% :: poke/peek pattern
|
||||
++ take :: process move
|
||||
@ -445,18 +445,14 @@
|
||||
~
|
||||
::
|
||||
++ load
|
||||
|= new=vase
|
||||
|= old=[%0 dug=(map duct yard)]
|
||||
^+ ..^$
|
||||
?. (~(nest ut -:!>(dug)) & p.new)
|
||||
~|(%load-type-fail !!)
|
||||
%_ ..^$
|
||||
dug ((map duct yard) q.new)
|
||||
==
|
||||
..^$(dug dug.old)
|
||||
::
|
||||
++ scry
|
||||
|= [fur=(unit (set monk)) ren=@tas his=ship syd=desk lot=coin tyl=path]
|
||||
^- (unit (unit))
|
||||
~
|
||||
::
|
||||
++ stay `vase`!>(dug)
|
||||
++ stay [%0 dug]
|
||||
--
|
||||
|
@ -2,7 +2,6 @@
|
||||
!? 164
|
||||
::::
|
||||
|= pit=vase
|
||||
^- vane :: kernel instrument
|
||||
=> =~
|
||||
|% :: structures
|
||||
++ ju :: jug engine
|
||||
@ -1832,19 +1831,20 @@
|
||||
. ==
|
||||
=| bolo
|
||||
=* bol -
|
||||
|= [now=@da eny=@ ska=$+(* (unit (unit)))] :: activate
|
||||
|= [now=@da eny=@ ski=sled] :: activate
|
||||
^? :: opaque core
|
||||
|% ::
|
||||
++ take :: process move
|
||||
|= [tea=wire hen=duct typ=type fav=card]
|
||||
^- [p=(list move) q=vane]
|
||||
^- [p=(list move) q=_..^$]
|
||||
=+ ska=(slod ski)
|
||||
=+ sky=|=(* `(unit)`=+(a=(ska +<) ?~(a ~ ?~(u.a ~ [~ u.u.a]))))
|
||||
=. ney (shax :(mix (shax now) +(eny) ney)) :: XX!! shd not need
|
||||
?: ?=(%crud -.fav)
|
||||
[[[hen %slip %d %flog fav] ~] ..^$]
|
||||
?: ?=(%soft -.fav)
|
||||
$(fav ((hard card) p.fav))
|
||||
^- [p=(list move) q=vane]
|
||||
^- [p=(list move) q=_..^$]
|
||||
=. gub ?.(=(0 gub) gub (cat 3 (rsh 3 1 (scot %p (end 6 1 eny))) '-'))
|
||||
=^ mos bol
|
||||
abet:apex:~(adit ye [[tea hen fav] [now eny sky] ~] bol)
|
||||
@ -1860,18 +1860,14 @@
|
||||
~
|
||||
::
|
||||
++ load
|
||||
|= old=vase
|
||||
^- vane
|
||||
?. (~(nest ut -:!>(`bolo`+>-.^$)) | p.old)
|
||||
~& %eyre-reset
|
||||
..^$
|
||||
..^$(+>- (bolo q.old))
|
||||
|= old=bolo
|
||||
^+ ..^$
|
||||
..^$(+>- old)
|
||||
::
|
||||
++ scry
|
||||
|= [our=(unit (set monk)) ren=@tas who=ship syd=desk lot=coin tyl=path]
|
||||
^- (unit (unit))
|
||||
~
|
||||
::
|
||||
++ stay
|
||||
`vase`!>((colt `bolo`+>-.$))
|
||||
++ stay `bolo`+>-.$
|
||||
--
|
||||
|
@ -615,12 +615,13 @@
|
||||
. ==
|
||||
=| axle
|
||||
=* lex -
|
||||
|= [now=@da eny=@ ska=$+(* (unit (unit)))] :: activate
|
||||
|= [now=@da eny=@ ski=sled] :: activate
|
||||
^? :: opaque core
|
||||
|% ::
|
||||
++ take :: process move
|
||||
|= [tea=wire hen=duct typ=type fav=card]
|
||||
^- [p=(list move) q=_..^$]
|
||||
=+ ska=(slod ski)
|
||||
?: ?=(%soft -.fav)
|
||||
$(fav ((hard card) p.fav))
|
||||
=+ ^= our ^- @p
|
||||
@ -644,18 +645,14 @@
|
||||
~
|
||||
::
|
||||
++ load
|
||||
|= old=vase
|
||||
|= old=axle
|
||||
^+ ..^$
|
||||
?. (~(nest ut -:!>(`axle`+>-.^$)) | p.old)
|
||||
~& %ford-reset
|
||||
..^$
|
||||
..^$(+>- (axle q.old))
|
||||
..^$(+>- old)
|
||||
::
|
||||
++ scry
|
||||
|= [fur=(unit (set monk)) ren=@tas who=ship syd=desk lot=coin tyl=path]
|
||||
^- (unit (unit))
|
||||
~
|
||||
::
|
||||
++ stay
|
||||
`vase`!>((colt `axle`+>-.$))
|
||||
++ stay `axle`+>-.$
|
||||
--
|
||||
|
@ -128,12 +128,8 @@
|
||||
=| all=axle :: all vane state
|
||||
|= $: now=@da :: urban time
|
||||
eny=@ :: entropy
|
||||
ska=$+(* (unit (unit))) :: activate
|
||||
ska=sled :: activate
|
||||
== :: opaque core
|
||||
:: $= ski :: namespace
|
||||
:: $+ $: (unit (set monk)) :: rights
|
||||
:: path :: name
|
||||
:: == (unit (unit (disk))) :: known/any/value
|
||||
=< ^?
|
||||
|% :: vane interface
|
||||
++ call :: handle request
|
||||
@ -192,14 +188,11 @@
|
||||
~
|
||||
::
|
||||
++ load
|
||||
|= old=vase
|
||||
|= old=axle
|
||||
^+ ..^$
|
||||
?. (~(nest ut -:!>(`axle`+>-.^$)) | p.old)
|
||||
~& %gall-reset
|
||||
..^$
|
||||
..^$(all (axle q.old))
|
||||
..^$(all old)
|
||||
::
|
||||
++ stay `vase`!>((colt `axle`+>-.$))
|
||||
++ stay `axle`+>-.$
|
||||
--
|
||||
|% :: inner core
|
||||
++ gaur :: take and go
|
||||
|
107
arvo/hoon.hoon
107
arvo/hoon.hoon
@ -8806,6 +8806,7 @@
|
||||
|%
|
||||
++ arch ,[p=@uvI q=(unit ,@uvI) r=(map ,@ta ,~)] :: fundamental node
|
||||
++ bead ,[[p=ship q=desk r=case] s=path] :: global name
|
||||
++ care ?(%$ %u %v %w %x %y %z) :: namespace mode
|
||||
++ case :: version
|
||||
$% [%da p=@da] :: date
|
||||
[%tas p=@tas] :: label
|
||||
@ -8867,14 +8868,56 @@
|
||||
++ pane (list ,[p=@tas q=vase]) :: kernel modules
|
||||
++ pone (list ,[p=@tas q=vise]) :: kernel modules, old
|
||||
++ ship ,@p :: network identity
|
||||
++ sled $+ [(unit (set monk)) bead] :: namespace function
|
||||
++ sled $+ [(unit (set monk)) term bead] :: namespace function
|
||||
(unit (unit cage)) ::
|
||||
++ slut $+(* (unit (unit))) :: old namespace
|
||||
++ vile :: reflexive constants
|
||||
$: typ=type :: -:!>(*type)
|
||||
mev=type :: -:!>([%meta *vase])
|
||||
moh=type :: -:!>(*(list mosh))
|
||||
== ::
|
||||
++ wire path :: event pretext
|
||||
::::: hacks
|
||||
++ slod !:
|
||||
|= sed=sled
|
||||
^- slut
|
||||
|= raw=*
|
||||
=+ pux=((soft path) raw)
|
||||
?~ pux ~
|
||||
?. ?=([@ @ @ @ *] u.pux) ~
|
||||
=+ :* hyr=(slay i.u.pux)
|
||||
fal=(slay i.t.u.pux)
|
||||
dyc=(slay i.t.t.u.pux)
|
||||
ved=(slay i.t.t.t.u.pux)
|
||||
tyl=t.t.t.t.u.pux
|
||||
==
|
||||
?. ?=([~ %$ %tas @] hyr) ~
|
||||
?. ?=([~ %$ %p @] fal) ~
|
||||
?. ?=([~ %$ %tas @] dyc) ~
|
||||
?. ?=(^ ved) ~
|
||||
=+ ron=q.p.u.hyr
|
||||
=+ bed=[[q.p.u.fal q.p.u.dyc (case p.u.ved)] (flop tyl)]
|
||||
=+ bop=(sed ~ ron bed)
|
||||
?~ bop ~
|
||||
?~ u.bop [~ ~]
|
||||
[~ ~ q.q.u.u.bop]
|
||||
::
|
||||
++ slub !:
|
||||
|= sul=slut
|
||||
^- sled
|
||||
|= [fur=(unit (set monk)) ron=term bed=bead]
|
||||
^- (unit (unit cage))
|
||||
=+ ^= pax ^- path
|
||||
:* ron
|
||||
(scot %p p.bed)
|
||||
q.bed
|
||||
(scot r.bed)
|
||||
(flop s.bed)
|
||||
==
|
||||
=+ bop=(sul pax)
|
||||
?~ bop ~
|
||||
?~ u.bop [~ ~]
|
||||
[~ ~ [%$ %noun u.u.bop]]
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
:: section 3bE, Arvo core ::
|
||||
::
|
||||
@ -8891,7 +8934,8 @@
|
||||
+>.$(ves (slam (slap syg [%cnzy %load]) (slap rig [%cnzy %stay])))
|
||||
::
|
||||
++ wink :: deploy
|
||||
|= [now=@da eny=@ sky=$+(* (unit (unit)))]
|
||||
|= [now=@da eny=@ ski=sled]
|
||||
:: =+ rig=(slym ves [now eny (slub sky)]) :: activate vane
|
||||
=+ rig=(slym ves +<) :: activate vane
|
||||
|%
|
||||
++ doze
|
||||
@ -8972,14 +9016,20 @@
|
||||
::
|
||||
++ scry
|
||||
|= $: fur=(unit (set monk))
|
||||
ren=@tas
|
||||
his=ship
|
||||
syd=@tas
|
||||
lot=coin
|
||||
tyl=path
|
||||
ren=care
|
||||
bed=bead
|
||||
==
|
||||
^- (unit (unit))
|
||||
=+ pro=(slym (slap rig [%cnzy %scry]) +<)
|
||||
=+ ^= old
|
||||
:* fur
|
||||
ren
|
||||
p.bed
|
||||
q.bed
|
||||
`coin`[%$ r.bed]
|
||||
(flop s.bed)
|
||||
==
|
||||
^- (unit (unit))
|
||||
=+ pro=(slym (slap rig [%cnzy %scry]) old)
|
||||
((hard (unit (unit))) q.pro)
|
||||
::
|
||||
++ soar :: postprocess vane
|
||||
@ -9021,30 +9071,21 @@
|
||||
|= [vil=vile eny=@ bud=vase fan=(list ,[p=@tas q=vase])]
|
||||
|_ now=@da
|
||||
++ beck
|
||||
|= fur=(unit (set monk))
|
||||
|+ hap=*
|
||||
^- (unit (unit))
|
||||
=> .(hap ((hard path) hap))
|
||||
?. ?=([@ @ @ @ *] hap) ~
|
||||
=+ :* hyr=(slay i.hap)
|
||||
fal=(slay i.t.hap)
|
||||
dyc=(slay i.t.t.hap)
|
||||
ved=(slay i.t.t.t.hap)
|
||||
tyl=t.t.t.t.hap
|
||||
==
|
||||
?. ?=([~ %$ %tas @] hyr) ~
|
||||
?. ?=([~ %$ %p @] fal) ~
|
||||
?. ?=([~ %$ %tas @] dyc) ~
|
||||
?. ?=(^ ved) ~
|
||||
=+ his=`@p`q.p.u.fal
|
||||
=> .(fur ?^(fur fur `[[%& his] ~ ~])) :: XX heinous
|
||||
=+ dis=(end 3 1 q.p.u.hyr)
|
||||
=+ rem=(rsh 3 1 q.p.u.hyr)
|
||||
|- ^- (unit (unit))
|
||||
^- sled
|
||||
|= [fur=(unit (set monk)) ron=term bed=bead]
|
||||
^- (unit (unit cage))
|
||||
=> .(fur ?^(fur fur `[[%& p.bed] ~ ~])) :: XX heinous
|
||||
=+ dis=(end 3 1 ron)
|
||||
=+ ren=(care (rsh 3 1 ron))
|
||||
|- ^- (unit (unit cage))
|
||||
?~ fan ~
|
||||
?. =(dis p.i.fan) $(fan t.fan)
|
||||
%- scry:(wink:(vent vil bud q.i.fan) now (shax now) ..^$)
|
||||
[fur rem his q.p.u.dyc u.ved tyl]
|
||||
=+ ^= bop
|
||||
%- scry:(wink:(vent vil bud q.i.fan) now (shax now) ..^$)
|
||||
[fur ren bed]
|
||||
?~ bop ~
|
||||
?~ u.bop [~ ~]
|
||||
[~ ~ [%$ %noun u.u.bop]]
|
||||
::
|
||||
++ dink :: vase by char
|
||||
|= din=@tas ^- vase
|
||||
@ -9063,7 +9104,7 @@
|
||||
::
|
||||
++ doos :: sleep until
|
||||
|= hap=path ^- (unit ,@da)
|
||||
(doze:(wink:(vent vil bud (dink (dint hap))) now 0 (beck ~)) now [hap ~])
|
||||
(doze:(wink:(vent vil bud (dink (dint hap))) now 0 beck) now [hap ~])
|
||||
::
|
||||
++ hurl :: start loop
|
||||
|= ovo=ovum
|
||||
@ -9075,7 +9116,7 @@
|
||||
|= [pux=(unit wire) hen=duct hil=mill ves=vase]
|
||||
^- [p=(list move) q=vase]
|
||||
=+ ven=(vent vil bud ves)
|
||||
=+ win=(wink:ven now (shax now) (beck ~))
|
||||
=+ win=(wink:ven now (shax now) beck)
|
||||
(swim:win pux hen hil)
|
||||
::
|
||||
++ fire :: execute
|
||||
@ -9195,7 +9236,7 @@
|
||||
|= [now=@da hap=path]
|
||||
^- (unit)
|
||||
?~ hap [~ stub]
|
||||
=+ rob=((~(beck (is vil eny bud fan) now) ~) hap)
|
||||
=+ rob=((slod ~(beck (is vil eny bud fan) now)) hap)
|
||||
?~ rob ~
|
||||
?~ u.rob ~
|
||||
[~ u.u.rob]
|
||||
|
Loading…
Reference in New Issue
Block a user