2017-09-28 03:27:08 +03:00
|
|
|
:: Compile arvo as a pill noun, without compiler changes.
|
2019-01-18 08:37:34 +03:00
|
|
|
:: usage
|
2017-09-28 03:27:08 +03:00
|
|
|
::
|
|
|
|
:: .urbit/pill +solid
|
2015-06-18 04:08:47 +03:00
|
|
|
::
|
2016-02-11 03:41:28 +03:00
|
|
|
:::: /hoon/solid/gen
|
2015-06-18 04:08:47 +03:00
|
|
|
::
|
2016-02-17 04:40:32 +03:00
|
|
|
/? 310
|
2018-12-04 21:41:04 +03:00
|
|
|
/+ pill
|
2015-06-18 04:08:47 +03:00
|
|
|
::
|
|
|
|
::::
|
2017-09-28 03:27:08 +03:00
|
|
|
!:
|
2015-09-12 03:24:51 +03:00
|
|
|
:- %say
|
2018-11-21 00:58:20 +03:00
|
|
|
|= $: [now=@da eny=@uvJ bec=beak]
|
|
|
|
arg=$@(~ [top=path ~])
|
2018-11-28 06:46:50 +03:00
|
|
|
dub=_|
|
2015-06-18 04:08:47 +03:00
|
|
|
==
|
2019-08-06 03:44:52 +03:00
|
|
|
:- %pill
|
2019-08-07 23:37:57 +03:00
|
|
|
^- pill:pill
|
2018-11-21 00:58:20 +03:00
|
|
|
:: sys: root path to boot system, `/~me/[desk]/now/sys`
|
|
|
|
::
|
|
|
|
=/ sys=path
|
|
|
|
?^ arg top.arg
|
|
|
|
/(scot %p p.bec)/[q.bec]/(scot %da now)/sys
|
|
|
|
::
|
|
|
|
=/ compiler-path (weld sys /hoon)
|
|
|
|
=/ arvo-path (weld sys /arvo)
|
2015-06-18 04:08:47 +03:00
|
|
|
~& %solid-start
|
2018-11-21 00:58:20 +03:00
|
|
|
=/ compiler-src .^(@t %cx (weld compiler-path /hoon))
|
|
|
|
=/ arvo-src .^(@t %cx (weld arvo-path /hoon))
|
|
|
|
=/ arvo-formula
|
|
|
|
~& %solid-loaded
|
|
|
|
=/ compiler-hoon (rain compiler-path compiler-src)
|
|
|
|
?. dub
|
|
|
|
:: compile arvo against hoon, with our current compiler
|
|
|
|
::
|
|
|
|
=/ whole-hoon=hoon
|
|
|
|
[%tsbn compiler-hoon [%tsbn [%$ 7] (rain arvo-path arvo-src)]]
|
2017-11-18 02:14:56 +03:00
|
|
|
~& %solid-parsed
|
2018-11-21 00:58:20 +03:00
|
|
|
=/ whole-formula q:(~(mint ut %noun) %noun whole-hoon)
|
|
|
|
~& %solid-arvo
|
|
|
|
whole-formula
|
|
|
|
:: compile arvo against hoon, with a freshly compiled hoon (via +ride)
|
|
|
|
::
|
|
|
|
~& %solid-parsed
|
|
|
|
=/ compiler-formula q:(~(mint ut %noun) %noun compiler-hoon)
|
|
|
|
~& %solid-compiled
|
|
|
|
=/ whole-src
|
|
|
|
(rap 3 ['=> ' compiler-src '=> +7 ' arvo-src ~])
|
|
|
|
~& %solid-double-loaded
|
|
|
|
=/ whole-formula
|
2018-05-11 03:35:26 +03:00
|
|
|
=< +
|
2018-11-21 00:58:20 +03:00
|
|
|
.* 0
|
|
|
|
:+ %7
|
|
|
|
compiler-formula
|
|
|
|
[%9 2 %10 [6 %1 %noun whole-src] [%0 1]]
|
|
|
|
~& %solid-double-compiled
|
|
|
|
whole-formula
|
2017-12-07 04:51:26 +03:00
|
|
|
::
|
2018-11-21 00:58:20 +03:00
|
|
|
~& [%solid-kernel `@ux`(mug arvo-formula)]
|
|
|
|
::
|
2018-11-28 06:46:50 +03:00
|
|
|
:: installed: Arvo gate (formal interface) with %zuse and vanes installed
|
2018-11-21 00:58:20 +03:00
|
|
|
::
|
|
|
|
=/ installed
|
|
|
|
=< q
|
|
|
|
%^ spin
|
2018-12-04 21:41:04 +03:00
|
|
|
(module-ova:pill sys)
|
2018-11-21 00:58:20 +03:00
|
|
|
.*(0 arvo-formula)
|
|
|
|
|= [ovo=ovum ken=*]
|
2018-12-11 04:18:05 +03:00
|
|
|
[~ (slum ken [now ovo])]
|
2018-11-28 06:46:50 +03:00
|
|
|
::
|
2020-04-24 09:25:00 +03:00
|
|
|
:: boot-one: lifecycle formula (from +brass)
|
|
|
|
::
|
|
|
|
=/ boot-one
|
|
|
|
=> [boot-formula=** full-sequence=**]
|
|
|
|
!= =+ [state-gate main-sequence]=.*(full-sequence boot-formula)
|
|
|
|
|-
|
|
|
|
?@ main-sequence
|
|
|
|
state-gate
|
|
|
|
%= $
|
|
|
|
main-sequence +.main-sequence
|
|
|
|
state-gate .*(state-gate [%9 2 %10 [6 %1 -.main-sequence] %0 1])
|
|
|
|
==
|
|
|
|
::
|
|
|
|
:: kernel-formula
|
2018-12-04 08:36:18 +03:00
|
|
|
::
|
|
|
|
:: We evaluate :arvo-formula (for jet registration),
|
2020-04-24 09:25:00 +03:00
|
|
|
:: then ignore the result and produce .installed
|
|
|
|
::
|
|
|
|
=/ kernel-formula
|
|
|
|
[%7 arvo-formula %1 installed]
|
|
|
|
::
|
|
|
|
:: boot-two: startup formula
|
|
|
|
::
|
|
|
|
=/ boot-two
|
|
|
|
=> [kernel-formula=** main-sequence=**]
|
|
|
|
!= [.*(0 kernel-formula) main-sequence]
|
|
|
|
::
|
|
|
|
:: boot-ova
|
2018-12-04 08:36:18 +03:00
|
|
|
::
|
|
|
|
=/ boot-ova=(list)
|
2020-04-24 09:25:00 +03:00
|
|
|
[boot-one boot-two kernel-formula ~]
|
2018-12-04 08:36:18 +03:00
|
|
|
::
|
|
|
|
:: a pill is a 3-tuple of event-lists: [boot kernel userspace]
|
|
|
|
::
|
|
|
|
:: Our kernel event-list is ~, as we've already installed them.
|
|
|
|
:: Our userspace event-list is a list containing a full %clay
|
|
|
|
:: filesystem sync event.
|
|
|
|
::
|
2018-12-04 21:41:04 +03:00
|
|
|
:+ boot-ova ~
|
|
|
|
=/ bas (flop (tail (flop sys)))
|
|
|
|
[(file-ovum:pill bas) ~]
|