Booting without any constant blocks.

This commit is contained in:
C. Guy Yarvin 2018-01-22 17:15:34 -08:00
parent 7d3334d6dd
commit 7404bb0a1e
6 changed files with 58 additions and 56 deletions

View File

@ -1,4 +1,4 @@
:: :: ::
:: :: ::
:::: /hoon/dojo/app :: ::::
:: :: ::
/? 309 :: arvo kelvin

View File

@ -1,4 +1,4 @@
:: :: ::
:: :: ::
:::: /hoon/hood/app :: ::
:: :: ::
/? 310 :: zuse version
@ -44,28 +44,32 @@
++ hood-1 :: unified state
{$1 lac/(map @tas hood-part)} ::
++ hood-good :: extract specific
|* hed/hood-head ::
|= paw/hood-part ::
?- hed ::
$drum ?>(?=($drum -.paw) `part:hood-drum`paw) ::
$helm ?>(?=($helm -.paw) `part:hood-helm`paw) ::
$kiln ?>(?=($kiln -.paw) `part:hood-kiln`paw) ::
$womb ?>(?=($womb -.paw) `part:hood-womb`paw) ::
$write ?>(?=($write -.paw) `part:hood-write`paw) ::
== :: module name
++ hood-head _-:*hood-part :: initialize state
=+ hed=$:hood-head
|% +- $
|: paw=$:hood-part
?- hed
$drum ?>(?=($drum -.paw) `part:hood-drum`paw)
$helm ?>(?=($helm -.paw) `part:hood-helm`paw)
$kiln ?>(?=($kiln -.paw) `part:hood-kiln`paw)
$womb ?>(?=($womb -.paw) `part:hood-womb`paw)
$write ?>(?=($write -.paw) `part:hood-write`paw)
==
--
++ hood-head _-:$:hood-part :: initialize state
++ hood-make ::
|* {our/@p hed/hood-head} ::
?- hed ::
$drum (make:hood-drum our) ::
$helm *part:hood-helm ::
$kiln *part:hood-kiln ::
$womb *part:hood-womb ::
$write *part:hood-write ::
== ::
=+ $:{our/@p hed/hood-head} ::
|% +- $
?- hed
$drum (make:hood-drum our)
$helm *part:hood-helm
$kiln *part:hood-kiln
$womb *part:hood-womb
$write *part:hood-write
==
--
++ hood-part-old hood-part :: old state for ++prep
++ hood-port :: state transition
|= paw/hood-part-old ^- hood-part ::
|: paw=$:hood-part-old ^- hood-part ::
paw ::
:: ::
++ hood-part :: current module state
@ -84,14 +88,18 @@
hood-1 :: module states
== ::
++ able :: find+make part
|* hed/hood-head
=+ rep=(~(get by lac) hed)
=+ par=?^(rep u.rep `hood-part`(hood-make our.hid hed))
((hood-good hed) par)
=+ hed=$:hood-head
|% +- $
=+ rep=(~(get by lac) hed)
=+ par=?^(rep u.rep `hood-part`(hood-make our.hid hed))
((hood-good hed) par)
--
::
++ ably :: save part
|* {(list) hood-part}
[(flop +<-) %_(+> lac (~(put by lac) +<+< +<+))]
=+ $:{(list) hood-part}
|% +- $
[(flop +<-) %_(+> lac (~(put by lac) +<+< +<+))]
--
:: :: ::
:::: :: :: generic handling
:: :: ::
@ -109,13 +117,16 @@
::
::
++ from-module :: create wrapper
|* _[%module ..$ _abet]:(hood-module)
=> .(+< [identity start finish]=+<)
=- [wrap=- *start] :: usage (wrap handle-arm):from-foo
|* handle/_finish
|= _+<.handle
=. +>.handle (start hid (able identity))
(ably (handle +<))
=+ [%module ..$ _abet]:(hood-module)
|% +- $
=> .(+< [identity start finish]=+<)
=- [wrap=- $:start] :: usage (wrap handle-arm):from-foo
=+ handle=finish
|% +- $
|: +<.handle
=. +>.handle (start hid (able identity))
(ably (handle +<))
-- --
::
:: per-module interface wrappers
++ from-drum (from-module %drum [..$ _se-abet]:(hood-drum))

View File

@ -1,8 +0,0 @@
::
::::
::
:- %say
|= $: {now/@da * bec/beak}
*
==
!!

View File

@ -1,4 +1,4 @@
:: :: ::
:: :: ::
:::: /hoon/helm/hood/lib :: ::
:: :: ::
/? 310 :: version
@ -149,8 +149,7 @@
=+ top=`path`/(scot %p our)/[syd]/(scot %da now)
=/ van/(list {term $~})
:- zus=[%zuse ~]
=+ arc=.^(arch %cy (welp top /sys/vane))
~(tap by dir:arc)
~(tap by dir:.^(arch %cy (welp top /sys/vane)))
|= nam/@tas
=. nam
?. =(1 (met 3 nam))

View File

@ -247,7 +247,7 @@
::
++ load-vane
=< %_(. con ..load-vane)
|= {syd/@tas con/_.}
|: $:{syd/@tas con/_.}
=. +>.$ con
=/ new-vane q:(hash-vane syd)
?: =(`new-vane (~(get by cur-vanes) syd))

View File

@ -8281,25 +8281,25 @@
:: ~| mask.bus
=+ jon=(apex:musk bus q.pro)
?~ jon
?: fab
[p.pro [%10 [%live %1 %constant-stop] q.pro]]
[p.pro [%10 [%live %1 %constant-stop-fab] q.pro]]
:: ?: fab
:: [p.pro [%10 [%live %1 %constant-stop] q.pro]]
:: [p.pro [%10 [%live %1 %constant-stop-fab] q.pro]]
:: ~_ (dunk '%constant-blocked-type')
:: ~| [%constant-stopped-gene gen]
:: ~| [%constant-stopped-mask mask.bus]
:: ~| [%constant-stopped-formula `@p`(mug q.pro) q.pro]
:: ~| %constant-folding-stopped
:: !!
~| %constant-folding-stopped
!!
?: ?=($| -.u.jon)
?: fab
[p.pro [%10 [%live %1 %constant-block] q.pro]]
[p.pro [%10 [%live %1 %constant-block-fab] q.pro]]
:: ?: fab
:: [p.pro [%10 [%live %1 %constant-block] q.pro]]
:: [p.pro [%10 [%live %1 %constant-block-fab] q.pro]]
:: ~_ (dunk '%constant-blocked-type')
:: ~| [%constant-blocked-gene gen]
:: ~| [%constant-blocked-mask mask.bus]
:: ~| [%constant-blocked-formula `@p`(mug q.pro) q.pro]
:: ~| %constant-folding-blocked
:: !!
~| %constant-folding-blocked
!!
:: [p.pro [%10 [%live %1 %constant-nonblocked] %1 p.u.jon]]
[p.pro %1 p.u.jon]
::