Merge branch 'scry-safe-mule' (#1678)

* scry-safe-mule:
  pills: update solid, brass, ivory
  talk, chat: disables scry in hoon eval
  hoon: enable scry in +mule
  arvo, ford: add type safety to scry

Signed-off-by: Jared Tobin <jared@tlon.io>
This commit is contained in:
Jared Tobin 2019-09-09 07:59:42 -02:30
commit 785a42ce33
No known key found for this signature in database
GPG Key ID: 0E4647D58F8A69E4
8 changed files with 60 additions and 25 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:1825ad5db5c696f36b7333ca906401a505ecc3244ec19f5dcf80cf7857a79065 oid sha256:7bf18a0a70e3eb66edf08c49ee57de7551c6894cf2e04a7b93a46109e31d7c73
size 11221938 size 11254785

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:baf4d3f4c74ad190a3548232cf9caa40c1433cc29070136ceeeea5fa7b99a004 oid sha256:0b34cfea64cdaf45ef0206cbed7909d1c54979a17eeb01306b850bb8b62ecb5c
size 6212767 size 6222454

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:3595404052bad183ac0be94bf46deec4a14c16c7ed4fd8aa6159eb24ad21a8cb oid sha256:ccd7237c1f0b36490f3444f2b6a7ea9b10ae3395659c9527d3aa03b9370fabc5
size 13839902 size 13874028

View File

@ -1331,10 +1331,19 @@
:: executes {exe} and sends both its code and :: executes {exe} and sends both its code and
:: result. :: result.
:: ::
|= {txt/cord exe/hoon} |= [txt=cord exe=hoon]
=> |.([(sell (slap (slop hoon-head seed) exe))]~) :: XX revisit
=+ tan=p:(mule .) ::
(say [%exp txt tan] ~) :: this double-virtualizes and clams to disable .^
::
=; tan=(list tank)
(say [%exp txt tan] ~)
;; (list tank)
=< +>
%+ mong
:- mute
|.([(sell (slap (slop hoon-head seed) exe))]~)
|=(^ ~)
:: ::
++ target ++ target
:: %target :: %target

View File

@ -577,7 +577,17 @@
:+ ~ u.exp :+ ~ u.exp
=+ res=((ot res+(ar dank) ~) a) =+ res=((ot res+(ar dank) ~) a)
?^ res u.res ?^ res u.res
p:(mule |.([(sell (slap !>(..^zuse) (ream u.exp)))]~)) ::TODO oldz :: XX revisit
::
:: this double-virtualizes and clams to disable .^
:: the subject of the eval should include [our now eny]
::
;; (list tank)
=< +>
%+ mong
:- mute
|.([(sell (slap !>(..^zuse) (ream u.exp)))]~)
|=(^ ~)
:: ::
++ atta ::: attache ++ atta ::: attache
^- $-(json (unit attache)) ^- $-(json (unit attache))

View File

@ -64,7 +64,7 @@
++ sley $- {* (unit (set monk)) term beam} :: namespace function ++ sley $- {* (unit (set monk)) term beam} :: namespace function
(unit (unit cage)) :: (unit (unit cage)) ::
++ slyd $- {* (unit (set monk)) term beam} :: super advanced ++ slyd $- {* (unit (set monk)) term beam} :: super advanced
(unit (unit (cask))) :: (unit (unit (cask milt))) ::
++ slyt $-({* *} (unit (unit))) :: old namespace ++ slyt $-({* *} (unit (unit))) :: old namespace
+$ vane [=vase =worm] +$ vane [=vase =worm]
++ vile :: reflexive constants ++ vile :: reflexive constants
@ -112,10 +112,18 @@
?~ dyc ~ ?~ dyc ~
?. ?=(^ ved) ~ ?. ?=(^ ved) ~
=/ ron=@tas u.hyr =/ ron=@tas u.hyr
=+ bed=[[u.fal u.dyc (case p.u.ved)] (flop tyl)] =/ bed=beam
=+ bop=(sod ref ~ ron bed) [[u.fal u.dyc (case p.u.ved)] (flop tyl)]
=/ bop=(unit (unit (cask milt)))
(sod ref ~ ron bed)
?~ bop ~ ?~ bop ~
?~ u.bop [~ ~] ?~ u.bop [~ ~]
:: XX figure out wth to do about hoon-version
::
?. ?& ?=([?(%151 %141) *] ref)
-:(~(nets wa *worm) +.ref -.q.u.u.bop)
==
~>(%slog.[0 leaf+"arvo: scry-lost"] ~)
[~ ~ +.q.u.u.bop] [~ ~ +.q.u.u.bop]
:: +sloy-light: minimal parsing version of sloy :: +sloy-light: minimal parsing version of sloy
:: ::
@ -135,10 +143,18 @@
|= [ref=* ron=@tas fal=@p dyc=@tas ved=case tyl=path] |= [ref=* ron=@tas fal=@p dyc=@tas ved=case tyl=path]
:: we do not flop tyl because tyl wouldn't have been flopped by +en-beam :: we do not flop tyl because tyl wouldn't have been flopped by +en-beam
:: ::
=+ bed=[[fal dyc ved] tyl] =/ bed=beam
=+ bop=(sod ref ~ ron bed) [[fal dyc ved] tyl]
=/ bop=(unit (unit (cask milt)))
(sod ref ~ ron bed)
?~ bop ~ ?~ bop ~
?~ u.bop [~ ~] ?~ u.bop [~ ~]
:: XX figure out wth to do about hoon-version
::
?. ?& ?=([?(%151 %141) *] ref)
-:(~(nets wa *worm) +.ref -.q.u.u.bop)
==
~>(%slog.[0 leaf+"arvo: scry-dark"] ~)
[~ ~ +.q.u.u.bop] [~ ~ +.q.u.u.bop]
:: ::
++ symp :: symbol or empty ++ symp :: symbol or empty
@ -350,7 +366,7 @@
ren/@t ren/@t
bed/beam bed/beam
== ==
^- (unit (unit (cask))) ^- (unit (unit (cask milt)))
:: ~& [%arvo-scry ren bed] :: ~& [%arvo-scry ren bed]
=/ old=scry-sample =/ old=scry-sample
:* fur :* fur
@ -360,10 +376,10 @@
`coin`[%$ r.bed] `coin`[%$ r.bed]
(flop s.bed) (flop s.bed)
== ==
^- (unit (unit (cask))) ^- (unit (unit (cask milt)))
=+ fun=-:(~(slap wa worm.vane) rig [%limb %scry]) =+ fun=-:(~(slap wa worm.vane) rig [%limb %scry])
:: ::
%- (unit (unit (cask))) %- (unit (unit (cask milt)))
(slum q.fun old) (slum q.fun old)
:: ::
++ soar :: scrub vane ++ soar :: scrub vane
@ -441,12 +457,12 @@
|_ now/@da |_ now/@da
++ beck ++ beck
^- slyd ^- slyd
|= {* fur/(unit (set monk)) ron/term bed/beam} |= {typ/* fur/(unit (set monk)) ron/term bed/beam}
^- (unit (unit (cask))) ^- (unit (unit (cask milt)))
=> .(fur ?^(fur fur `[[%& p.bed] ~ ~])) :: XX heinous => .(fur ?^(fur fur `[[%& p.bed] ~ ~])) :: XX heinous
=+ lal=(end 3 1 ron) =+ lal=(end 3 1 ron)
=+ ren=(@t (rsh 3 1 ron)) =+ ren=(@t (rsh 3 1 ron))
|- ^- (unit (unit (cask))) |- ^- (unit (unit (cask milt)))
?~ vanes ~ ?~ vanes ~
?. =(lal label.i.vanes) $(vanes t.vanes) ?. =(lal label.i.vanes) $(vanes t.vanes)
~| [%failed-scry ron bed] ~| [%failed-scry ron bed]

View File

@ -6470,7 +6470,7 @@
++ mute :: untyped virtual ++ mute :: untyped virtual
|= taq/_=>(~ ^?(|.(**))) |= taq/_=>(~ ^?(|.(**)))
^- (each * (list tank)) ^- (each * (list tank))
=+ ton=(mock [taq %9 2 %0 1] |=({* *} ~)) =/ ton (mock [taq %9 2 %0 1] |=((pair) ``.*(~ [%12 1+p 1+q])))
?- -.ton ?- -.ton
$0 [%& p.ton] $0 [%& p.ton]
$1 [%| (turn p.ton |=(a/* (smyt (path a))))] $1 [%| (turn p.ton |=(a/* (smyt (path a))))]

View File

@ -5570,7 +5570,7 @@
%- sloy ^- slyd %- sloy ^- slyd
~/ %intercepted-scry ~/ %intercepted-scry
|= [ref=* (unit (set monk)) =term =beam] |= [ref=* (unit (set monk)) =term =beam]
^- (unit (unit (cask))) ^- (unit (unit (cask milt)))
:: if the actual scry produces a value, use that value; otherwise use local :: if the actual scry produces a value, use that value; otherwise use local
:: ::
=/ scry-response (scry +<.$) =/ scry-response (scry +<.$)
@ -5606,7 +5606,7 @@
?. -:(nets:wa +.ref `type`p.q.local-cage) ?. -:(nets:wa +.ref `type`p.q.local-cage)
[~ ~] [~ ~]
:: ::
[~ ~ `(cask)`local-cage] [~ ~ local-cage]
:: +unblock-clients-on-duct: unblock and produce clients blocked on :build :: +unblock-clients-on-duct: unblock and produce clients blocked on :build
:: ::
++ unblock-clients-on-duct ++ unblock-clients-on-duct