Minimize +slay usage in +sloy

+sloy is practically how we perform most scrying. It parses wires
using the full +slay when several of the elements. Replaces all
usages we can with +slaw.

The long term fix is to move to not parsing wires, but that won't
happen before current release-candidate is released.
This commit is contained in:
Elliot Glaysher 2018-12-07 14:43:07 -08:00
parent 245dafcc2e
commit 07d55d6277

View File

@ -103,25 +103,31 @@
:: section 3bE, Arvo core :: :: section 3bE, Arvo core ::
:: ::
++ sloy ++ sloy
:: +sloy: adapter from old style scrys to new style scrys
::
:: This does path parsing which shows up hot, but removing the last +slay
:: here requires deeper interface changes.
::
!: !:
~/ %sloy
|= sod/slyd |= sod/slyd
^- slyt ^- slyt
|= {ref/* raw/*} |= {ref/* raw/*}
=+ pux=((soft path) raw) =+ pux=((soft path) raw)
?~ pux ~ ?~ pux ~
?. ?=({@ @ @ @ *} u.pux) ~ ?. ?=({@ @ @ @ *} u.pux) ~
=+ :* hyr=(slay i.u.pux) =+ :* hyr=(slaw %tas i.u.pux)
fal=(slay i.t.u.pux) fal=(slaw %p i.t.u.pux)
dyc=(slay i.t.t.u.pux) dyc=(slaw %tas i.t.t.u.pux)
ved=(slay i.t.t.t.u.pux) ved=(slay i.t.t.t.u.pux)
tyl=t.t.t.t.u.pux tyl=t.t.t.t.u.pux
== ==
?. ?=({$~ $$ $tas @} hyr) ~ ?~ hyr ~
?. ?=({$~ $$ $p @} fal) ~ ?~ fal ~
?. ?=({$~ $$ $tas @} dyc) ~ ?~ dyc ~
?. ?=(^ ved) ~ ?. ?=(^ ved) ~
=+ ron=q.p.u.hyr =/ ron=@tas u.hyr
=+ bed=[[q.p.u.fal q.p.u.dyc (case p.u.ved)] (flop tyl)] =+ bed=[[u.fal u.dyc (case p.u.ved)] (flop tyl)]
=+ bop=(sod ref ~ ron bed) =+ bop=(sod ref ~ ron bed)
?~ bop ~ ?~ bop ~
?~ u.bop [~ ~] ?~ u.bop [~ ~]