From 32295555c598ed2f95a9070792d947ebd93ea756 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sat, 31 May 2014 12:40:02 -0700 Subject: [PATCH] Scry interface fixes. --- arvo/ames.hoon | 9 ++--- arvo/batz.hoon | 10 ++--- arvo/clay.hoon | 11 ++--- arvo/dill.hoon | 12 ++---- arvo/eyre.hoon | 20 ++++----- arvo/ford.hoon | 13 +++--- arvo/gall.hoon | 15 ++----- arvo/hoon.hoon | 107 ++++++++++++++++++++++++++++++++++--------------- 8 files changed, 108 insertions(+), 89 deletions(-) diff --git a/arvo/ames.hoon b/arvo/ames.hoon index 7040555b0..314824589 100644 --- a/arvo/ames.hoon +++ b/arvo/ames.hoon @@ -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)))) diff --git a/arvo/batz.hoon b/arvo/batz.hoon index 553438782..f2a7a91db 100644 --- a/arvo/batz.hoon +++ b/arvo/batz.hoon @@ -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] -- diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 573e1738e..3c5ef2587 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -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] -- diff --git a/arvo/dill.hoon b/arvo/dill.hoon index 689fc4e95..2daa93aa1 100644 --- a/arvo/dill.hoon +++ b/arvo/dill.hoon @@ -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] -- diff --git a/arvo/eyre.hoon b/arvo/eyre.hoon index 13da13fe1..f68a27cad 100644 --- a/arvo/eyre.hoon +++ b/arvo/eyre.hoon @@ -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`+>-.$ -- diff --git a/arvo/ford.hoon b/arvo/ford.hoon index 19b20a371..664dc9b85 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -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`+>-.$ -- diff --git a/arvo/gall.hoon b/arvo/gall.hoon index 38981d10d..d38ba4e62 100644 --- a/arvo/gall.hoon +++ b/arvo/gall.hoon @@ -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 diff --git a/arvo/hoon.hoon b/arvo/hoon.hoon index 99af7cac1..06d8f60a6 100644 --- a/arvo/hoon.hoon +++ b/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]