better init for ph

This commit is contained in:
Philip Monk 2019-03-08 13:48:09 -08:00
parent 187aff9279
commit c2c2b04b0b
No known key found for this signature in database
GPG Key ID: B66E1F02604E44EC
3 changed files with 34 additions and 13 deletions

View File

@ -47,6 +47,8 @@
$~
--
=, gall
=/ vane-apps=(list term)
~[%aqua %aqua-ames %aqua-behn %aqua-dill %aqua-eyre]
|_ $: hid=bowl
state
==
@ -266,20 +268,37 @@
/effects/(scot %p her)
==
::
:: Start the vane drivers
::
++ init-vanes
^- (list move)
%+ murn
`(list term)`[%aqua vane-apps]
|= vane-app=term
^- (unit move)
=/ app-started
.^(? %gu /(scot %p our.hid)/[vane-app]/(scot %da now.hid))
?: app-started
~
`[ost.hid %poke /start [our.hid %hood] %drum-start %home vane-app]
::
:: Restart the vane drivers' subscriptions
::
++ subscribe-vanes
^- (list move)
%+ turn
vane-apps
|= vane-app=term
[ost.hid %poke /init [our.hid vane-app] %aqua-vane-control %subscribe]
::
:: User interface
::
++ poke-noun
|= arg=*
^- (quip move _this)
?+ arg ~|(%bad-noun-arg !!)
%init
:_ this
%- zing ^- (list (list move))
%+ turn
^- (list term)
~[%aqua %aqua-ames %aqua-behn %aqua-dill %aqua-eyre]
|= vane-app=term
:~ [ost.hid %poke /start [our.hid %hood] %drum-start %home vane-app]
[ost.hid %poke /init [our.hid vane-app] %aqua-vane-control %subscribe]
==
[init-vanes this]
::
[%run-test lab=@tas]
=/ res=[events=(list ph-event) new-state=raw-test-core]
@ -287,7 +306,7 @@
=. test-cores (~(put by test-cores) lab.arg [ships . ~]:new-state.res)
=^ moves-1 this (subscribe-to-effects lab.arg ships.new-state.res)
=^ moves-2 this (run-events lab.arg events.res)
[(weld moves-1 moves-2) this]
[:(weld init-vanes subscribe-vanes moves-1 moves-2) this]
::
[%print lab=@tas]
=/ log effect-log:(~(got by test-cores) lab.arg)
@ -304,6 +323,8 @@
`this
==
::
:: Receive effects back from aqua
::
++ diff-aqua-effects
|= [way=wire afs=aqua-effects]
^- (quip move _this)

View File

@ -337,7 +337,8 @@
=. warped (cat 3 '=> . ' .^(@t %cx pax))
:_ ..start
%- zing
:~ (dojo her "|mount /={(trip des)}=")
:~ (dojo her "|verb")
(dojo her "|mount /={(trip des)}=")
(insert-file her des pax warped)
==
::

View File

@ -1363,9 +1363,8 @@
=(~ tyl)
=([%$ %da now] lot)
=(our his)
(~(has by bum.mast.all) syd)
==
``[%null !>(~)]
``[%noun !>((~(has by bum.mast.all) syd))]
?. =(our his)
~
?. =([%$ %da now] lot)