+slum to call raw nock gate; some associated cleanup (#923)

This commit is contained in:
Ted Blackman 2018-12-08 18:42:36 -08:00 committed by GitHub
parent 946204edd9
commit 7ed3a02a92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 28 additions and 24 deletions

View File

@ -1 +1 @@
https://ci-piers.urbit.org/zod-6a1f32bb1984fa9329c072de09ba67b212c8dbed.tgz https://ci-piers.urbit.org/zod-946204edd92019777a68e3a8034cbee74154fbda.tgz

View File

@ -74,7 +74,7 @@
state-gate state-gate
%= $ %= $
main-sequence +.main-sequence main-sequence +.main-sequence
state-gate .*(state-gate(+< -.main-sequence) -.state-gate) state-gate .*(state-gate [%9 2 %10 [6 %1 -.main-sequence] %0 1])
== ==
:: ::
:: boot-two: startup formula :: boot-two: startup formula
@ -119,7 +119,7 @@
:: ::
~> %slog.[0 leaf+"1-c (compiling compiler, wait a few minutes)"] ~> %slog.[0 leaf+"1-c (compiling compiler, wait a few minutes)"]
=+ ^= compiler-tool =+ ^= compiler-tool
.*(compiler-gate(+< [%noun compiler-source]) -.compiler-gate) .*(compiler-gate [%9 2 %10 [6 %1 [%noun compiler-source]] %0 1])
:: ::
:: switch to the second-generation compiler. we want to be :: switch to the second-generation compiler. we want to be
:: able to generate matching reflection nouns even if the :: able to generate matching reflection nouns even if the
@ -137,13 +137,13 @@
:: ::
~> %slog.[0 leaf+"1-e"] ~> %slog.[0 leaf+"1-e"]
=+ ^= kernel-span =+ ^= kernel-span
-:.*(compiler-gate(+< [-.compiler-tool '+>']) -.compiler-gate) -:.*(compiler-gate [%9 2 %10 [6 %1 [-.compiler-tool '+>']] %0 1])
:: ::
:: compile the arvo source against the kernel core. :: compile the arvo source against the kernel core.
:: ::
~> %slog.[0 leaf+"1-f"] ~> %slog.[0 leaf+"1-f"]
=+ ^= kernel-tool =+ ^= kernel-tool
.*(compiler-gate(+< [kernel-span arvo-source]) -.compiler-gate) .*(compiler-gate [%9 2 %10 [6 %1 [kernel-span arvo-source]] %0 1])
:: ::
:: create the arvo kernel, whose subject is the kernel core. :: create the arvo kernel, whose subject is the kernel core.
:: ::

View File

@ -73,7 +73,7 @@
state-gate state-gate
%= $ %= $
main-sequence +.main-sequence main-sequence +.main-sequence
state-gate .*(state-gate(+< -.main-sequence) -.state-gate) state-gate .*(state-gate [%9 2 %10 [6 %1 -.main-sequence] %0 1])
== ==
:: ::
:: boot-two: startup formula :: boot-two: startup formula
@ -118,7 +118,7 @@
:: ::
~> %slog.[0 leaf+"1-c"] ~> %slog.[0 leaf+"1-c"]
=+ ^= compiler-tool =+ ^= compiler-tool
.*(compiler-gate(+< [%noun compiler-source]) -.compiler-gate) .*(compiler-gate [%9 2 %10 [6 %1 [%noun compiler-source]] %0 1])
:: ::
:: switch to the second-generation compiler. we want to be :: switch to the second-generation compiler. we want to be
:: able to generate matching reflection nouns even if the :: able to generate matching reflection nouns even if the
@ -136,13 +136,13 @@
:: ::
~> %slog.[0 leaf+"1-e"] ~> %slog.[0 leaf+"1-e"]
=+ ^= kernel-span =+ ^= kernel-span
-:.*(compiler-gate(+< [-.compiler-tool '+>']) -.compiler-gate) -:.*(compiler-gate [%9 2 %10 [6 %1 [-.compiler-tool '+>']] %0 1])
:: ::
:: compile the arvo source against the kernel core. :: compile the arvo source against the kernel core.
:: ::
~> %slog.[0 leaf+"1-f"] ~> %slog.[0 leaf+"1-f"]
=+ ^= kernel-tool =+ ^= kernel-tool
.*(compiler-gate(+< [kernel-span arvo-source]) -.compiler-gate) .*(compiler-gate [%9 2 %10 [6 %1 [kernel-span arvo-source]] %0 1])
:: ::
:: create the arvo kernel, whose subject is the kernel core. :: create the arvo kernel, whose subject is the kernel core.
:: ::

View File

@ -795,21 +795,19 @@
=> ?: =(nex hoon-version) => ?: =(nex hoon-version)
[hot=`*`raw .] [hot=`*`raw .]
~& [%hoon-compile-upgrade nex] ~& [%hoon-compile-upgrade nex]
=/ hot =/ hot (slum cop [%noun hun])
.*(cop [%9 2 %10 [6 %1 [%noun hun]] %0 1])
.(cop .*(0 +.hot)) .(cop .*(0 +.hot))
:: extract the hoon core from the outer gate (+ride) :: extract the hoon core from the outer gate (+ride)
:: ::
=/ hoc .*(cop [%0 7]) =/ hoc .*(cop [%0 7])
:: compute the type of the hoon.hoon core :: compute the type of the hoon.hoon core
:: ::
=/ hyp =/ hyp -:(slum cop [-.hot '+>'])
-:.*(cop [%9 2 %10 [6 %1 [-.hot '+>']] %0 1])
:: compile arvo :: compile arvo
:: ::
=/ rav =/ rav
~& [%arvo-compile `@p`(mug hyp) `@p`(mug van)] ~& [%arvo-compile `@p`(mug hyp) `@p`(mug van)]
.*(cop [%9 2 %10 [6 %1 [hyp van]] %0 1]) (slum cop [hyp van])
:: activate arvo, and extract the arvo core from the outer gate :: activate arvo, and extract the arvo core from the outer gate
:: ::
=/ voc .*(hoc [%7 +.rav %0 7]) =/ voc .*(hoc [%7 +.rav %0 7])
@ -819,10 +817,10 @@
=/ arm ?:(=(nex hoon-version) 'load' 'come') =/ arm ?:(=(nex hoon-version) 'load' 'come')
:: compute the type of the arvo.hoon core :: compute the type of the arvo.hoon core
:: ::
=/ vip -:.*(cop [%9 2 %10 [6 %1 [-.rav '+>']] %0 1]) =/ vip -:(slum cop [-.rav '+>'])
:: compute the formula for the upgrade gate :: compute the formula for the upgrade gate
:: ::
=/ fol +:.*(cop [%9 2 %10 [6 %1 [vip arm]] %0 1]) =/ fol +:(slum cop [vip arm])
:: produce the upgrade gate :: produce the upgrade gate
:: ::
.*(voc fol) .*(voc fol)
@ -838,8 +836,7 @@
== ==
:: call into the new kernel :: call into the new kernel
:: ::
=/ out =/ out (slum gat sam)
.*(gat [%9 2 %10 [6 %1 sam] %0 1])
:: tack a reset notification onto the product :: tack a reset notification onto the product
:: ::
[[[/ %vega ~] ((list ovum) -.out)] +.out] [[[/ %vega ~] ((list ovum) -.out)] +.out]

View File

@ -6174,7 +6174,7 @@
^- toon ^- toon
?. &(?=(^ gat) ?=(^ +.gat)) ?. &(?=(^ gat) ?=(^ +.gat))
[%2 ~] [%2 ~]
(mock [[-.gat [sam +>.gat]] -.gat] gul) (mock [gat(+< sam) %9 2 %0 1] gul)
:: ::
++ mule :: typed virtual ++ mule :: typed virtual
~/ %mule ~/ %mule
@ -6190,12 +6190,19 @@
++ 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] |=({* *} ~))
?- -.ton ?- -.ton
$0 [%& p.ton] $0 [%& p.ton]
$1 [%| (turn p.ton |=(a/* (smyt (path a))))] $1 [%| (turn p.ton |=(a/* (smyt (path a))))]
$2 [%| p.ton] $2 [%| p.ton]
== ==
:: +slum: slam a gate on a sample using raw nock, untyped
::
++ slum
~/ %slum
|= [gat=* sam=*]
^- *
.*(gat [%9 2 %10 [6 %1 sam] %0 1])
:: ::
++ soft :: maybe remold ++ soft :: maybe remold
|* han/$-(* *) |* han/$-(* *)
@ -11328,7 +11335,7 @@
$type $type
=+ tyr=|.((dial dole)) =+ tyr=|.((dial dole))
=+ vol=tyr(sut lum) =+ vol=tyr(sut lum)
=+ cis=((hard tank) .*(vol -:vol)) =+ cis=((hard tank) .*(vol [%9 2 %0 1]))
:^ ~ %palm :^ ~ %palm
[~ ~ ~ ~] [~ ~ ~ ~]
[[%leaf '#' 't' '/' ~] cis ~] [[%leaf '#' 't' '/' ~] cis ~]
@ -14001,11 +14008,11 @@
^- {? worm} ^- {? worm}
?: (~(has in nes) [sut ref]) [& +>+<] ?: (~(has in nes) [sut ref]) [& +>+<]
=+ gat=|=({a/type b/type} (~(nest ut a) | b)) =+ gat=|=({a/type b/type} (~(nest ut a) | b))
?. (? .*(gat(+< [sut ref]) -.gat)) ?. (? (slum gat [sut ref]))
~& %nets-failed ~& %nets-failed
=+ tag=`*`skol =+ tag=`*`skol
=+ foo=(tank .*(tag(+< ref) -.tag)) =+ foo=(tank (slum tag ref))
=+ bar=(tank .*(tag(+< sut) -.tag)) =+ bar=(tank (slum tag sut))
~& %nets-need ~& %nets-need
~> %slog.[0 bar] ~> %slog.[0 bar]
~& %nets-have ~& %nets-have