2017-02-08 05:28:12 +03:00
|
|
|
!: :: /sys/arvo
|
|
|
|
:: :: !%reference/2
|
|
|
|
:: %arvo: arvo microkernel.
|
|
|
|
::
|
|
|
|
=< :: this lifecycle wrapper makes the arvo door
|
|
|
|
:: (multi-armed core) look like a gate (function
|
|
|
|
:: or single-armed core), to fit urbit's formal
|
|
|
|
:: lifecycle function. a practical interpreter
|
|
|
|
:: can ignore it.
|
|
|
|
::
|
|
|
|
|= {now/@da ovo/ovum}
|
|
|
|
^+ .
|
|
|
|
~> %slog.[0 leaf+"arvo-event"]
|
2017-02-24 05:42:58 +03:00
|
|
|
:: XX .(+> +:(poke now ovo)) REMOVE BEFORE USE
|
|
|
|
.
|
2017-02-23 06:55:30 +03:00
|
|
|
=>
|
2017-02-08 05:28:12 +03:00
|
|
|
:: :: ::
|
2017-02-09 05:19:39 +03:00
|
|
|
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: (1) public molds
|
2017-02-08 05:28:12 +03:00
|
|
|
:: :: ::
|
|
|
|
|%
|
2017-02-09 05:19:39 +03:00
|
|
|
++ arms (map chip dope) :: stated identity
|
2017-02-22 08:11:03 +03:00
|
|
|
++ bait :: analysis state
|
|
|
|
$: now/@da :: date
|
|
|
|
eny/@uvJ :: entropy
|
|
|
|
sky/roof :: namespace
|
|
|
|
== ::
|
2017-02-08 05:28:12 +03:00
|
|
|
++ card {p/@tas q/*} :: tagged event
|
2017-02-19 04:38:17 +03:00
|
|
|
++ case :: version
|
|
|
|
$% {$da p/@da} :: date
|
|
|
|
{$tas p/@tas} :: label
|
|
|
|
{$ud p/@ud} :: sequence
|
|
|
|
== ::
|
2017-02-08 05:28:12 +03:00
|
|
|
++ chip :: standard identity
|
|
|
|
$? $giv :: given name
|
2017-02-09 05:19:39 +03:00
|
|
|
$fam :: surname
|
2017-02-08 05:28:12 +03:00
|
|
|
$had :: fictitious name
|
|
|
|
$mid :: middle name
|
2017-02-09 05:19:39 +03:00
|
|
|
$gen :: generational suffix
|
2017-02-08 05:28:12 +03:00
|
|
|
== ::
|
2017-02-19 04:38:17 +03:00
|
|
|
++ desk @tas :: ship desk case spur
|
2017-02-09 05:19:39 +03:00
|
|
|
++ dope (pair @tas @t) :: term/unicode pair
|
2017-02-08 05:28:12 +03:00
|
|
|
++ duct (list wire) :: causal history
|
|
|
|
++ ovum (pair wire card) :: input or output
|
2017-02-15 07:49:48 +03:00
|
|
|
++ plum (pair term noun) :: deep file
|
2017-02-08 05:28:12 +03:00
|
|
|
++ ruby @pG :: 64-bit passcode
|
2017-02-19 04:38:17 +03:00
|
|
|
++ roof :: namespace
|
|
|
|
$- $: lyc/(unit (set ship)) :: leakset
|
|
|
|
car/term :: perspective
|
2017-02-22 08:11:03 +03:00
|
|
|
bem/beam :: path
|
2017-02-19 04:38:17 +03:00
|
|
|
== ::
|
2017-02-22 08:11:03 +03:00
|
|
|
%- unit :: ~: unknown
|
|
|
|
%- unit :: ~ ~: invalid
|
2017-02-23 06:55:30 +03:00
|
|
|
cage :: marked vase
|
2017-02-22 08:11:03 +03:00
|
|
|
:: ::
|
2017-02-19 04:38:17 +03:00
|
|
|
++ ship @p :: network identity
|
2017-02-08 05:28:12 +03:00
|
|
|
++ wire path :: cause
|
|
|
|
-- =>
|
2017-02-09 05:19:39 +03:00
|
|
|
:: :: ::
|
|
|
|
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: (2) state molds
|
|
|
|
:: :: ::
|
2017-02-08 05:28:12 +03:00
|
|
|
|%
|
2017-02-24 05:42:58 +03:00
|
|
|
++ boot (pair (unit hoof) hoof) :: hoon/arvo boot src
|
2017-02-13 09:48:33 +03:00
|
|
|
++ evil :: evolvable state
|
|
|
|
|* {span/_span twig/_twig vase/_vase} :: injected molds
|
2017-02-09 05:19:39 +03:00
|
|
|
|% ::
|
2017-02-08 05:28:12 +03:00
|
|
|
++ mall :: any arvo version
|
2017-02-11 05:03:33 +03:00
|
|
|
$? {$293 mast} :: kelvin 293, current
|
2017-02-08 05:28:12 +03:00
|
|
|
== ::
|
|
|
|
++ mast :: system state
|
2017-02-11 05:03:33 +03:00
|
|
|
$: $= gut :: abdomen
|
|
|
|
$: run/(list move) :: worklist
|
2017-02-13 09:48:33 +03:00
|
|
|
out/(list ovum) :: unix output
|
|
|
|
but/(unit boot) :: reboot
|
|
|
|
== ::
|
|
|
|
$= hax :: thorax
|
|
|
|
$: sac/worm :: compiler cache
|
|
|
|
kit/toys :: common nouns
|
2017-02-08 05:28:12 +03:00
|
|
|
== ::
|
2017-02-11 05:03:33 +03:00
|
|
|
$= bug :: insect brain
|
|
|
|
$: noc/@ta :: process nonce
|
|
|
|
ver/(qual @tas @ud @ud @ud) :: vendor/version
|
|
|
|
== ::
|
2017-02-08 05:28:12 +03:00
|
|
|
$= mal :: mammal brain
|
2017-02-12 05:44:56 +03:00
|
|
|
$: off/? :: not yet booted
|
|
|
|
lac/? :: not verbose
|
2017-02-17 04:37:36 +03:00
|
|
|
eny/@uvJ :: 512-bit entropy
|
2017-02-13 09:48:33 +03:00
|
|
|
yor/vase :: %york, vane models
|
|
|
|
zus/vase :: %zuse, user lib
|
2017-02-21 08:18:31 +03:00
|
|
|
van/(map term vase) :: vanes
|
2017-02-08 05:28:12 +03:00
|
|
|
== ::
|
|
|
|
$= rep :: reptile brain
|
|
|
|
$: orb/@p :: ship
|
|
|
|
nym/arms :: name information
|
|
|
|
roy/(map @ud ruby) :: start secrets
|
|
|
|
fat/(map path (pair term noun)) :: boot filesystem
|
|
|
|
== == ::
|
2017-02-09 05:19:39 +03:00
|
|
|
++ mill (each vase milo) :: vase or metavase
|
2017-02-08 05:28:12 +03:00
|
|
|
++ milo {p/* q/*} :: untyped metavase
|
2017-02-11 05:03:33 +03:00
|
|
|
++ move (pair duct part) :: vane move
|
2017-02-08 05:28:12 +03:00
|
|
|
++ part :: arvo vane move
|
|
|
|
$% {$give p/mill} :: vane "return"
|
2017-02-11 05:03:33 +03:00
|
|
|
{$pass p/wire q/(pair term mill)} :: vane "call"
|
2017-02-08 05:28:12 +03:00
|
|
|
== ::
|
2017-02-13 09:48:33 +03:00
|
|
|
++ toys :: reflexive constants
|
|
|
|
$: typ/span :: -:!>(*span)
|
|
|
|
duc/span :: -:!>(*duct)
|
|
|
|
pah/span :: -:!>(*path)
|
|
|
|
mev/span :: -:!>([%meta *vase])
|
|
|
|
== ::
|
2017-02-09 05:19:39 +03:00
|
|
|
++ worm :: compiler cache
|
|
|
|
$: nes/(set ^) :: ++nest
|
|
|
|
pay/(map (pair span twig) span) :: ++play
|
|
|
|
mit/(map (pair span twig) (pair span nock)) :: ++mint
|
|
|
|
== ::
|
|
|
|
-- ::
|
2017-02-24 05:42:58 +03:00
|
|
|
++ hoof @t :: hoon source file
|
2017-02-09 05:19:39 +03:00
|
|
|
++ live (evil) :: modern molds
|
2017-02-22 08:11:03 +03:00
|
|
|
++ vane :: kernel module
|
2017-02-22 07:21:27 +03:00
|
|
|
$_ ^? :: totally decorative
|
2017-02-22 08:11:03 +03:00
|
|
|
|% ::
|
|
|
|
++ load $-(* _+>) :: reload
|
|
|
|
++ stay ** :: preserve
|
2017-02-22 08:17:44 +03:00
|
|
|
++ work ::
|
2017-02-22 08:11:03 +03:00
|
|
|
|_ bait
|
|
|
|
++ doze *@da
|
|
|
|
++ scry roof
|
|
|
|
++ spin
|
|
|
|
|_ $: :: hen: cause of this
|
|
|
|
:: moz:
|
|
|
|
::
|
|
|
|
hen/duct
|
|
|
|
moz/(list move)
|
|
|
|
==
|
|
|
|
++ call
|
|
|
|
|= fav/card
|
|
|
|
^+ +>
|
|
|
|
!!
|
|
|
|
++ take
|
|
|
|
|= {tea/wire fav/card}
|
|
|
|
^+ +>
|
|
|
|
!!
|
|
|
|
--
|
|
|
|
--
|
|
|
|
--
|
2017-02-09 05:19:39 +03:00
|
|
|
++ vile (evil typo twit vise) :: old molds
|
2017-02-11 05:03:33 +03:00
|
|
|
++ wasp :: arvo effect
|
2017-02-23 08:45:54 +03:00
|
|
|
$% {$walk $~} :: finish mammal brain
|
2017-02-11 05:03:33 +03:00
|
|
|
{$what p/(list (pair path (pair term noun)))} :: put reptile files
|
|
|
|
{$whom p/@p q/arms r/(map @ud ruby)} :: put reptile identity
|
2017-02-23 08:45:54 +03:00
|
|
|
{$woke $~} :: finish booting
|
2017-02-11 05:03:33 +03:00
|
|
|
== ::
|
2017-02-23 06:55:30 +03:00
|
|
|
--
|
2017-02-08 05:28:12 +03:00
|
|
|
:: :: ::
|
|
|
|
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: (2) engines
|
|
|
|
:: :: ::
|
|
|
|
|%
|
2017-02-09 05:19:39 +03:00
|
|
|
:: :: ++le
|
|
|
|
++ le :: deep engine
|
2017-02-23 08:45:54 +03:00
|
|
|
=+ [now=*@da *mast:live]
|
2017-02-12 05:44:56 +03:00
|
|
|
=* ::
|
|
|
|
:: sys: system state
|
|
|
|
::
|
2017-02-13 09:48:33 +03:00
|
|
|
sys ->
|
2017-02-09 05:19:39 +03:00
|
|
|
|%
|
2017-02-12 05:44:56 +03:00
|
|
|
:: :: ++abet:le
|
2017-02-13 09:48:33 +03:00
|
|
|
++ abet :: complete cycle
|
2017-02-24 05:42:58 +03:00
|
|
|
^- {(pair (unit boot) (list ovum)) _sys}
|
|
|
|
:- [but.gut (flop out.gut)]
|
|
|
|
sys(out.gut ~, but.gut ~)
|
2017-02-12 05:44:56 +03:00
|
|
|
:: :: ++emit:le
|
2017-02-13 09:48:33 +03:00
|
|
|
++ emit :: emit move
|
2017-02-24 05:42:58 +03:00
|
|
|
|= mov/move:live
|
2017-02-13 09:48:33 +03:00
|
|
|
+>(run.gut [mov run.gut])
|
2017-02-11 05:03:33 +03:00
|
|
|
:: :: ++pike:le
|
2017-02-12 05:44:56 +03:00
|
|
|
++ pike :: event to %pass
|
2017-02-22 07:21:27 +03:00
|
|
|
|= $: :: way: event route
|
2017-02-09 05:19:39 +03:00
|
|
|
:: now: date
|
2017-02-13 09:48:33 +03:00
|
|
|
:: ovo: input ovum
|
2017-02-09 05:19:39 +03:00
|
|
|
::
|
2017-02-24 05:42:58 +03:00
|
|
|
way/@tas
|
2017-02-09 05:19:39 +03:00
|
|
|
now/@da
|
2017-02-13 09:48:33 +03:00
|
|
|
ovo/ovum
|
2017-02-09 05:19:39 +03:00
|
|
|
==
|
2017-02-12 05:44:56 +03:00
|
|
|
^+ +>
|
|
|
|
:: print event if in verbose mode
|
2017-02-11 05:03:33 +03:00
|
|
|
::
|
|
|
|
~? &(!lac.mal !=(%belt -.q.ovo)) [%unix -.q.ovo p.ovo]
|
|
|
|
::
|
2017-02-13 09:48:33 +03:00
|
|
|
:: vax: card as vase
|
|
|
|
::
|
|
|
|
=^ vax +> (open q.ovo)
|
|
|
|
::
|
|
|
|
:: hen: fundamental cause (unix input channel)
|
|
|
|
:: tea: local cause (unix i/o)
|
|
|
|
:: mov: action (pass into event route)
|
2017-02-11 05:03:33 +03:00
|
|
|
::
|
2017-02-13 09:48:33 +03:00
|
|
|
=* hen `duct`[p.ovo ~]
|
|
|
|
=* tea `wire`[%$ %unix ~]
|
2017-02-24 05:42:58 +03:00
|
|
|
=* mov `move:live`[hen %pass tea way %& vax]
|
2017-02-12 05:44:56 +03:00
|
|
|
::
|
2017-02-21 08:18:31 +03:00
|
|
|
:: push move on stack, and work.
|
2017-02-12 05:44:56 +03:00
|
|
|
::
|
2017-02-21 08:18:31 +03:00
|
|
|
work:(emit mov)
|
2017-02-12 05:44:56 +03:00
|
|
|
:: :: ++open:le
|
|
|
|
++ open :: input card to move
|
2017-02-13 09:48:33 +03:00
|
|
|
|= fav/card
|
2017-02-12 05:44:56 +03:00
|
|
|
^- {vase _+>}
|
|
|
|
?< off.mal
|
2017-02-13 09:48:33 +03:00
|
|
|
::
|
|
|
|
:: gat: mold for correct unix task
|
|
|
|
:: vax: molded card
|
|
|
|
::
|
2017-02-24 05:42:58 +03:00
|
|
|
=^ gat sac.hax (~(slap wa sac.hax) zus.mal [%limb %unix-task])
|
2017-02-13 09:48:33 +03:00
|
|
|
=/ vax (slam gat [%noun fav])
|
|
|
|
~| [%le-open -.fav]
|
|
|
|
?> =(fav q.vax)
|
2017-02-12 05:44:56 +03:00
|
|
|
[vax +>.$]
|
2017-02-09 05:19:39 +03:00
|
|
|
:: :: ++poke:le
|
|
|
|
++ poke :: event from unix
|
|
|
|
|= $: :: now: event date
|
|
|
|
:: ovo: event
|
|
|
|
::
|
|
|
|
now/@da
|
|
|
|
ovo/ovum
|
|
|
|
==
|
2017-02-24 05:42:58 +03:00
|
|
|
^+ +>
|
2017-02-12 05:44:56 +03:00
|
|
|
~| [%poke -.ovo]
|
2017-02-24 05:42:58 +03:00
|
|
|
?+ -.q.ovo !!
|
|
|
|
::
|
|
|
|
:: unix input, send to vane
|
|
|
|
::
|
|
|
|
$belt (pike %dill now ovo)
|
|
|
|
$blew (pike %dill now ovo)
|
|
|
|
$born (pike %eyre now ovo)
|
|
|
|
$hail (pike %dill now ovo)
|
|
|
|
$hear (pike %ames now ovo)
|
|
|
|
$hook (pike %dill now ovo)
|
|
|
|
$into (pike %clay now ovo)
|
|
|
|
$they (pike %eyre now ovo)
|
|
|
|
$this (pike %eyre now ovo)
|
|
|
|
$thus (pike %eyre now ovo)
|
|
|
|
::
|
|
|
|
?($what $whom)
|
2017-02-13 09:48:33 +03:00
|
|
|
=/ wap ((hard wasp) ovo)
|
|
|
|
=* tea `wire`[%$ %init ~]
|
|
|
|
=* hen `duct`[tea [p.ovo ~]]
|
2017-02-24 05:42:58 +03:00
|
|
|
=* mov `move:live`[hen %give %& !>(wap)]
|
2017-02-13 09:48:33 +03:00
|
|
|
(emit mov)
|
2017-02-09 05:19:39 +03:00
|
|
|
==
|
2017-02-17 04:37:36 +03:00
|
|
|
:: :: ++va:le
|
|
|
|
++ va :: vane engine
|
2017-02-22 07:21:27 +03:00
|
|
|
|_ $: :: way: vane name, eg `%ames`
|
|
|
|
:: vax: vane, or vane builder if `off.mal`
|
2017-02-17 04:37:36 +03:00
|
|
|
::
|
|
|
|
way/term
|
|
|
|
vax/vase
|
|
|
|
==
|
|
|
|
:: :: ++va-abet:va:le
|
|
|
|
++ va-abet :: resolve
|
|
|
|
^+ ..va
|
2017-02-22 07:21:27 +03:00
|
|
|
..va(van.mal (~(put by van.mal) way vax))
|
2017-02-23 06:55:30 +03:00
|
|
|
:: :: ++va-amid:va:le
|
|
|
|
++ va-amid :: load existing
|
|
|
|
|= way/term
|
|
|
|
^+ +>
|
2017-02-24 05:42:58 +03:00
|
|
|
?< off.mal
|
2017-02-23 06:55:30 +03:00
|
|
|
+>(way way, vax (~(got by van.mal) way))
|
2017-02-17 04:37:36 +03:00
|
|
|
:: :: ++va-abut:va:le
|
2017-02-23 06:55:30 +03:00
|
|
|
++ va-apex :: boot / reboot
|
2017-02-22 07:21:27 +03:00
|
|
|
|= $: way/term
|
2017-02-21 08:18:31 +03:00
|
|
|
src/hoof
|
|
|
|
==
|
2017-02-17 04:37:36 +03:00
|
|
|
^+ +>
|
2017-02-22 07:21:27 +03:00
|
|
|
=. ^way way
|
2017-02-23 06:55:30 +03:00
|
|
|
=/ bun (~(get by van.mal) way)
|
2017-02-17 04:37:36 +03:00
|
|
|
?~ bun
|
|
|
|
(va-create src)
|
|
|
|
(va-update(vax u.bun) src)
|
2017-02-18 05:10:32 +03:00
|
|
|
:: :: ++va-active:va:le
|
2017-02-24 05:42:58 +03:00
|
|
|
++ va-plow :: activated vane
|
2017-02-22 07:21:27 +03:00
|
|
|
|= bait
|
|
|
|
::
|
|
|
|
:: wok: working vase
|
|
|
|
::
|
|
|
|
=/ wok ^- vase
|
2017-02-22 20:19:29 +03:00
|
|
|
!!
|
2017-02-22 07:21:27 +03:00
|
|
|
|%
|
|
|
|
:: :: ++doze:va-work:va:le
|
|
|
|
++ doze :: request wakeup at
|
|
|
|
^- (unit @da)
|
|
|
|
!!
|
|
|
|
:: :: ++scry:va-work:va:le
|
2017-02-24 05:42:58 +03:00
|
|
|
++ scry :: internal peek
|
2017-02-22 20:19:29 +03:00
|
|
|
|= $: :: lyc: set of outputs
|
2017-02-22 07:21:27 +03:00
|
|
|
::
|
|
|
|
lyc/(unit (set ship))
|
|
|
|
car/term
|
|
|
|
bem/beam
|
|
|
|
==
|
2017-02-24 05:42:58 +03:00
|
|
|
^- (unit (unit cage))
|
2017-02-22 20:19:29 +03:00
|
|
|
!!
|
|
|
|
:: :: ++walk:va-work:va:le
|
2017-02-24 05:42:58 +03:00
|
|
|
++ walk :: causal action
|
2017-02-22 20:19:29 +03:00
|
|
|
|= hen/duct
|
|
|
|
::
|
|
|
|
:: fox: running vase
|
|
|
|
::
|
|
|
|
=/ fox ^- vase
|
|
|
|
!!
|
|
|
|
|%
|
|
|
|
:: :: ++abet:walk:va-work:
|
2017-02-24 05:42:58 +03:00
|
|
|
++ abet :: integrate
|
|
|
|
^+ ..va
|
2017-02-22 20:19:29 +03:00
|
|
|
!!
|
|
|
|
:: :: ++call:walk:va-work:
|
|
|
|
++ call ::
|
|
|
|
|= hil/mill
|
2017-02-23 06:55:30 +03:00
|
|
|
^+ +>
|
|
|
|
!!
|
|
|
|
:: :: ++take:walk:va-work:
|
|
|
|
++ take ::
|
|
|
|
|= {tea/wire hil/mill}
|
|
|
|
^+ +>
|
|
|
|
!!
|
2017-02-22 20:19:29 +03:00
|
|
|
--
|
2017-02-22 07:21:27 +03:00
|
|
|
--
|
2017-02-17 04:37:36 +03:00
|
|
|
:: :: ++va-create:va:le
|
|
|
|
++ va-create :: compile new vase
|
|
|
|
|= src/hoof
|
2017-02-18 05:10:32 +03:00
|
|
|
^+ +>
|
2017-02-17 04:37:36 +03:00
|
|
|
:: no existing vase; compile new vase
|
|
|
|
::
|
2017-02-22 20:19:29 +03:00
|
|
|
~& [%vase-compile way `@p`(mug src)]
|
2017-02-24 05:42:58 +03:00
|
|
|
=. vax (slap zus.mal (ream src))
|
|
|
|
?: off.mal
|
2017-02-18 05:10:32 +03:00
|
|
|
+>
|
2017-02-23 06:55:30 +03:00
|
|
|
:: initialize vane
|
|
|
|
::
|
2017-02-22 20:19:29 +03:00
|
|
|
va-settle
|
2017-02-18 05:10:32 +03:00
|
|
|
:: :: ++va-settle:va:le
|
2017-02-23 06:55:30 +03:00
|
|
|
++ va-settle :: initialize with ship
|
2017-02-24 05:42:58 +03:00
|
|
|
^+ .
|
2017-02-22 20:19:29 +03:00
|
|
|
.(vax (slam vax !>(orb.rep)))
|
2017-02-18 05:10:32 +03:00
|
|
|
:: :: ++va-update
|
|
|
|
++ va-update :: replace existing
|
|
|
|
|= src/hoof
|
2017-02-22 20:19:29 +03:00
|
|
|
^+ +>
|
2017-02-24 05:42:58 +03:00
|
|
|
?: off.mal
|
2017-02-22 20:19:29 +03:00
|
|
|
:: replacing unbooted, weird but ok
|
2017-02-18 05:10:32 +03:00
|
|
|
::
|
|
|
|
(va-create src)
|
2017-02-22 20:19:29 +03:00
|
|
|
::
|
|
|
|
:: out: saved state from old vane
|
|
|
|
::
|
|
|
|
=+ out=(slap vax [%limb %stay])
|
|
|
|
::
|
|
|
|
:: replace `vax` with new empty vane
|
|
|
|
::
|
|
|
|
=. +>.$ (va-create src)
|
|
|
|
::
|
|
|
|
:: initialize new vane with old state
|
|
|
|
::
|
|
|
|
+>.$(vax (slam (slap vax [%limb %come]) out))
|
2017-02-17 04:37:36 +03:00
|
|
|
--
|
2017-02-15 07:49:48 +03:00
|
|
|
:: :: ++warp:le
|
|
|
|
++ warp :: arvo effect
|
|
|
|
|= {hen/duct wap/wasp}
|
|
|
|
^+ +>
|
|
|
|
?+ -.wap !!
|
|
|
|
$what (what hen p.wap)
|
|
|
|
$whom (whom hen p.wap q.wap r.wap)
|
|
|
|
==
|
2017-02-23 06:55:30 +03:00
|
|
|
:: :: ++whom:le
|
|
|
|
++ whom :: initialize identity
|
2017-02-24 05:42:58 +03:00
|
|
|
|= {hen/duct our/@p nym/arms sec/(map @ud ruby)}
|
2017-02-23 06:55:30 +03:00
|
|
|
^+ +>
|
2017-02-24 05:42:58 +03:00
|
|
|
:: XX don't forget to keep working
|
2017-02-23 06:55:30 +03:00
|
|
|
!!
|
2017-02-21 08:18:31 +03:00
|
|
|
:: :: ++wile:le
|
|
|
|
++ wile :: mill as card
|
|
|
|
|= hil/mill
|
2017-02-24 05:42:58 +03:00
|
|
|
^- card
|
2017-02-21 08:18:31 +03:00
|
|
|
::
|
|
|
|
:: XX actually check card nature
|
|
|
|
::
|
|
|
|
?- -.hil
|
|
|
|
$| ((hard card) q.p.hil)
|
|
|
|
$& ((hard card) q.p.hil)
|
|
|
|
==
|
2017-02-15 07:49:48 +03:00
|
|
|
:: :: ++wilt:le
|
|
|
|
++ wilt :: deep file as source
|
|
|
|
|= pet/plum
|
|
|
|
^- hoof
|
|
|
|
?>(?=({$hoon @tas} pet) +.pet)
|
|
|
|
:: :: ++wise:le
|
|
|
|
++ wise :: load/reload vane
|
2017-02-23 06:55:30 +03:00
|
|
|
|= {way/term src/hoof}
|
2017-02-15 07:49:48 +03:00
|
|
|
^+ +>
|
2017-02-23 06:55:30 +03:00
|
|
|
va-abet:(va-apex:va way src)
|
2017-02-15 07:49:48 +03:00
|
|
|
:: :: ++what:le
|
|
|
|
++ what :: write deep storage
|
|
|
|
|= {hen/duct fal/(list (pair path plum))}
|
|
|
|
^+ +>
|
|
|
|
:: dev: collated `fal`
|
|
|
|
::
|
2017-02-23 06:55:30 +03:00
|
|
|
=/ dev
|
|
|
|
=| $= dev
|
2017-02-15 07:49:48 +03:00
|
|
|
$: :: use: non-system files
|
|
|
|
:: new: system installs
|
|
|
|
:: rep: system replacements
|
|
|
|
::
|
|
|
|
use/(map path plum)
|
|
|
|
new/(map path plum)
|
|
|
|
rez/(map path plum)
|
|
|
|
==
|
2017-02-23 06:55:30 +03:00
|
|
|
|- ^+ dev
|
|
|
|
?~ fal dev
|
|
|
|
::
|
|
|
|
:: pax: path of this file
|
|
|
|
:: pet: value of this file
|
|
|
|
::
|
|
|
|
=+ [pax pet]=[p q]:i.fal
|
2017-02-24 05:42:58 +03:00
|
|
|
=> .(fal t.fal)
|
2017-02-23 06:55:30 +03:00
|
|
|
::
|
|
|
|
:: old: current value in deep storage
|
|
|
|
::
|
|
|
|
=+ old=(~(get by fat.rep) pax)
|
|
|
|
::
|
|
|
|
:: ignore unchanged data
|
|
|
|
::
|
|
|
|
?: =(old `pet) $
|
|
|
|
::
|
|
|
|
:: classify as user, system install or replacement
|
|
|
|
::
|
|
|
|
?. ?=({$sys *} pax)
|
2017-02-24 05:42:58 +03:00
|
|
|
$(use.dev (~(put by use.dev) pax pet))
|
2017-02-23 06:55:30 +03:00
|
|
|
?~ old
|
2017-02-24 05:42:58 +03:00
|
|
|
$(new.dev (~(put by new.dev) pax pet))
|
|
|
|
$(rez.dev (~(put by rez.dev) pax pet))
|
2017-02-15 07:49:48 +03:00
|
|
|
::
|
2017-02-24 05:42:58 +03:00
|
|
|
:: just adopt user changes, which have no systems impact
|
2017-02-15 07:49:48 +03:00
|
|
|
::
|
2017-02-24 05:42:58 +03:00
|
|
|
=. fat.rep (~(uni by fat.rep) use.dev)
|
2017-02-15 07:49:48 +03:00
|
|
|
::
|
|
|
|
:: but: kernel reboot operation, if any
|
|
|
|
::
|
|
|
|
=/ but
|
2017-02-24 05:42:58 +03:00
|
|
|
^- (unit boot:live)
|
2017-02-23 06:55:30 +03:00
|
|
|
=/ hun (~(get by rez.dev) /sys/hoon)
|
|
|
|
=/ arv (~(get by rez.dev) /sys/arvo)
|
2017-02-15 07:49:48 +03:00
|
|
|
?~ hun
|
|
|
|
?~ arv ~
|
|
|
|
::
|
|
|
|
:: light reboot, arvo only
|
|
|
|
::
|
|
|
|
`[~ (wilt u.arv)]
|
|
|
|
::
|
|
|
|
:: heavy reboot, hoon and arvo
|
|
|
|
::
|
2017-02-24 05:42:58 +03:00
|
|
|
`[`(wilt u.hun) (wilt ?^(arv u.arv (~(got by fat.rep) /sys/arvo)))]
|
2017-02-15 07:49:48 +03:00
|
|
|
?^ but
|
|
|
|
:: stop working and set up reboot
|
|
|
|
::
|
|
|
|
%= +>.$
|
|
|
|
:: set boot hook for termination
|
|
|
|
::
|
|
|
|
but.gut ?>(=(~ but.gut) but)
|
|
|
|
::
|
2017-02-17 04:37:36 +03:00
|
|
|
:: execute write after reboot
|
2017-02-15 07:49:48 +03:00
|
|
|
::
|
2017-02-24 05:42:58 +03:00
|
|
|
run.gut :: syt: all systems changes
|
2017-02-17 04:37:36 +03:00
|
|
|
::
|
|
|
|
=* syt (~(tap by (~(uni by rez.dev) new.dev)))
|
2017-02-24 05:42:58 +03:00
|
|
|
:_ run.gut
|
|
|
|
`move:live`[hen %give %& !>([%what syt])]
|
2017-02-15 07:49:48 +03:00
|
|
|
::
|
|
|
|
:: delete reboot source files from deep
|
|
|
|
:: storage, so install causes vane upgrade,
|
|
|
|
:: and *does not* cause repeat kernel upgrade.
|
|
|
|
::
|
2017-02-24 05:42:58 +03:00
|
|
|
fat.rep ?~ p.u.but
|
|
|
|
fat.rep
|
|
|
|
(~(del by fat.rep) /sys/hoon)
|
2017-02-15 07:49:48 +03:00
|
|
|
==
|
2017-02-17 04:37:36 +03:00
|
|
|
:: keep working after vane upgrades
|
2017-02-15 07:49:48 +03:00
|
|
|
::
|
|
|
|
=< work
|
|
|
|
::
|
|
|
|
:: job: plan for upgrading
|
|
|
|
::
|
|
|
|
=/ job
|
|
|
|
^- $: yor/(unit hoof)
|
|
|
|
zus/(unit hoof)
|
2017-02-21 08:18:31 +03:00
|
|
|
vat/(list (pair term hoof))
|
2017-02-15 07:49:48 +03:00
|
|
|
==
|
2017-02-24 05:42:58 +03:00
|
|
|
=< [yor zus (~(tap by van))]
|
2017-02-15 07:49:48 +03:00
|
|
|
:: yor: reload shared structures
|
|
|
|
:: zus: reload shared library
|
2017-02-21 08:18:31 +03:00
|
|
|
:: vat: replacement map
|
2017-02-15 07:49:48 +03:00
|
|
|
::
|
|
|
|
=/ yor (bind (~(get by rez.dev) /sys/york) wilt)
|
|
|
|
=/ zus (bind (~(get by rez.dev) /sys/zuse) wilt)
|
|
|
|
::
|
|
|
|
:: %york is the subject of %zuse
|
|
|
|
::
|
2017-02-24 05:42:58 +03:00
|
|
|
=. zus ?^(zus zus ?~(yor ~ `(wilt (~(got by fat.rep) /sys/zuse))))
|
2017-02-15 07:49:48 +03:00
|
|
|
::
|
2017-02-21 08:18:31 +03:00
|
|
|
:: vat: all vane upgrades, as [initial name source]
|
2017-02-15 07:49:48 +03:00
|
|
|
::
|
|
|
|
=/ van
|
|
|
|
:: zyr: all system file replacements
|
2017-02-21 08:18:31 +03:00
|
|
|
:: van: accumulated upgrades
|
2017-02-15 07:49:48 +03:00
|
|
|
::
|
|
|
|
=/ zyr (~(tap by rez.dev))
|
2017-02-24 05:42:58 +03:00
|
|
|
=| van/(map @tas hoof)
|
2017-02-21 08:18:31 +03:00
|
|
|
|- ^+ van
|
2017-02-15 07:49:48 +03:00
|
|
|
?^ zyr
|
|
|
|
:: mor: process rest of `zyr`
|
|
|
|
::
|
|
|
|
=/ mor $(zyr t.zyr)
|
|
|
|
?. ?=({$sys $van @tas $~} p.i.zyr)
|
|
|
|
mor
|
|
|
|
::
|
|
|
|
:: replaced vane in `/sys/vane/*/[nam]`
|
|
|
|
::
|
|
|
|
=* nam `term`i.t.t.p.i.zyr
|
2017-02-24 05:42:58 +03:00
|
|
|
(~(put in mor) nam (wilt q.i.zyr))
|
2017-02-15 07:49:48 +03:00
|
|
|
::
|
2017-02-21 08:18:31 +03:00
|
|
|
:: reload current vanes if needed
|
2017-02-15 07:49:48 +03:00
|
|
|
::
|
2017-02-17 04:37:36 +03:00
|
|
|
?. |((~(has by new.dev) /sys/hoon) ?=(^ zus))
|
|
|
|
::
|
|
|
|
:: we didn't replace compiler, %york or %zuse
|
2017-02-21 08:18:31 +03:00
|
|
|
van
|
2017-02-15 07:49:48 +03:00
|
|
|
::
|
2017-02-21 08:18:31 +03:00
|
|
|
:: also reboot any vanes not already rebooted
|
2017-02-15 07:49:48 +03:00
|
|
|
::
|
2017-02-21 08:18:31 +03:00
|
|
|
%- ~(gas by van)
|
|
|
|
%+ skip
|
2017-02-23 06:55:30 +03:00
|
|
|
^- (list (pair term hoof))
|
2017-02-21 08:18:31 +03:00
|
|
|
%+ turn (~(tap by van.mal))
|
2017-02-23 06:55:30 +03:00
|
|
|
|= {way/term vax/vase}
|
|
|
|
[way (wilt (~(got by fat.rep) [%sys %van way ~]))]
|
2017-02-21 08:18:31 +03:00
|
|
|
|= {way/term src/hoof}
|
|
|
|
(~(has in van) way)
|
2017-02-24 05:42:58 +03:00
|
|
|
.
|
2017-02-15 07:49:48 +03:00
|
|
|
::
|
|
|
|
:: upgrade %york, vane shared structures
|
|
|
|
::
|
2017-02-24 05:42:58 +03:00
|
|
|
=> ?~ yor.job .
|
2017-02-15 07:49:48 +03:00
|
|
|
%= .
|
2017-02-17 04:37:36 +03:00
|
|
|
yor.mal ~& [%york-boot `@p`(mug u.yor.job)]
|
2017-02-15 07:49:48 +03:00
|
|
|
(slap !>(..arms) (ream u.yor.job))
|
|
|
|
==
|
|
|
|
::
|
|
|
|
:: upgrade %zuse, vane shared libraries
|
|
|
|
::
|
2017-02-24 05:42:58 +03:00
|
|
|
=> ?~ zus.job .
|
2017-02-15 07:49:48 +03:00
|
|
|
%= .
|
2017-02-17 04:37:36 +03:00
|
|
|
zus.mal ~& [%zuse-boot `@p`(mug u.zus.job)]
|
2017-02-15 07:49:48 +03:00
|
|
|
(slap yor.mal (ream u.zus.job))
|
|
|
|
==
|
|
|
|
::
|
|
|
|
:: upgrade all indicated vanes
|
|
|
|
::
|
|
|
|
|- ^+ +>.^$
|
2017-02-24 05:42:58 +03:00
|
|
|
?~ vat.job +>.^$
|
|
|
|
~& [%vane-boot p.i.vat.job `@p`(mug q.i.vat.job)]
|
|
|
|
$(vat.job t.vat.job, +>.^$ (wise i.vat.job))
|
|
|
|
:: :: ++unix:le
|
|
|
|
++ unix :: return to unix
|
|
|
|
|= {hen/duct fav/card}
|
2017-02-21 08:18:31 +03:00
|
|
|
^+ +>
|
2017-02-24 05:42:58 +03:00
|
|
|
?> ?=({* $~} hen)
|
2017-02-23 06:55:30 +03:00
|
|
|
work(out.gut [[i.hen fav] out.gut])
|
|
|
|
:: :: ++call:le
|
|
|
|
++ call :: forward to vane
|
2017-02-21 08:18:31 +03:00
|
|
|
|= {hen/duct way/term hil/mill}
|
2017-02-23 06:55:30 +03:00
|
|
|
^+ +>
|
2017-02-24 05:42:58 +03:00
|
|
|
=> (call:(walk:(va-plow:(va-amid:va way) now eny.mal peek) hen) hil)
|
|
|
|
abet
|
|
|
|
:: :: ++grow:le
|
|
|
|
++ grow :: hardcoded prefixes
|
|
|
|
|= lay/term
|
|
|
|
^- term
|
|
|
|
?+ lay !!
|
|
|
|
$a %ames
|
|
|
|
$b %behn
|
|
|
|
$c %clay
|
|
|
|
$d %dill
|
|
|
|
$e %eyre
|
|
|
|
$f %ford
|
|
|
|
$g %gall
|
|
|
|
$j %jael
|
|
|
|
==
|
|
|
|
:: :: ++peek:le
|
|
|
|
++ peek :: namespace
|
|
|
|
|= $: :: lyc: other ships result may leak to
|
|
|
|
:: cyr: general perspective, eg %cx
|
|
|
|
:: bem: name
|
|
|
|
::
|
|
|
|
lyc/(unit (set ship)) :: leakset
|
|
|
|
cyr/term :: full perspective
|
|
|
|
bem/beam :: path
|
|
|
|
==
|
|
|
|
^- (unit (unit cage))
|
|
|
|
::
|
|
|
|
:: way: vane to look in
|
|
|
|
:: car: perspective within vane
|
|
|
|
::
|
|
|
|
=+ way=(grow (end 3 1 cyr))
|
|
|
|
=+ car=(rsh 3 1 cyr)
|
|
|
|
(scry:(va-plow:(va-amid:va way) now `@`0 peek) lyc car bem)
|
2017-02-21 08:18:31 +03:00
|
|
|
::
|
2017-02-23 06:55:30 +03:00
|
|
|
++ take
|
|
|
|
|= {hen/duct way/term tea/wire hil/mill}
|
|
|
|
^+ +>
|
2017-02-24 05:42:58 +03:00
|
|
|
=> (take:(walk:(va-plow:(va-amid:va way) now eny.mal peek) hen) tea hil)
|
|
|
|
abet
|
2017-02-13 09:48:33 +03:00
|
|
|
:: :: ++work:le
|
|
|
|
++ work :: main loop
|
2017-02-21 08:18:31 +03:00
|
|
|
=* ken .
|
2017-02-13 09:48:33 +03:00
|
|
|
^+ ken
|
|
|
|
::
|
2017-02-21 08:18:31 +03:00
|
|
|
:: no-op if stack is empty
|
2017-02-13 09:48:33 +03:00
|
|
|
::
|
|
|
|
?~ run.gut ken
|
|
|
|
::
|
|
|
|
:: mov: top move on stack
|
|
|
|
:: hen: cause of move
|
|
|
|
:: act: action in move
|
|
|
|
::
|
2017-02-24 05:42:58 +03:00
|
|
|
=/ mov `move:live`i.run.gut
|
2017-02-13 09:48:33 +03:00
|
|
|
::
|
|
|
|
:: pop top move off stack
|
|
|
|
::
|
2017-02-23 08:45:54 +03:00
|
|
|
=> .(run.gut t.run.gut)
|
2017-02-13 09:48:33 +03:00
|
|
|
::
|
|
|
|
:: interpret top move
|
|
|
|
::
|
2017-02-24 05:42:58 +03:00
|
|
|
?- -.q.mov
|
2017-02-13 09:48:33 +03:00
|
|
|
::
|
2017-02-24 05:42:58 +03:00
|
|
|
:: %give: return move
|
2017-02-13 09:48:33 +03:00
|
|
|
::
|
|
|
|
$give
|
|
|
|
::
|
|
|
|
:: the duct can't be empty
|
|
|
|
::
|
|
|
|
?> ?=(^ p.mov)
|
|
|
|
::
|
|
|
|
:: tea: top wire on duct
|
2017-02-24 05:42:58 +03:00
|
|
|
:: nex: rest of duct
|
2017-02-13 09:48:33 +03:00
|
|
|
::
|
|
|
|
=/ tea i.p.mov
|
2017-02-24 05:42:58 +03:00
|
|
|
=* nex t.p.mov
|
2017-02-13 09:48:33 +03:00
|
|
|
::
|
|
|
|
:: route gift by wire
|
|
|
|
::
|
2017-02-24 05:42:58 +03:00
|
|
|
?: ?=({$$ *} tea)
|
2017-02-13 09:48:33 +03:00
|
|
|
::
|
|
|
|
:: gift returned on arvo wire
|
|
|
|
::
|
2017-02-24 05:42:58 +03:00
|
|
|
?: ?=({$unix $~} t.tea)
|
2017-02-13 09:48:33 +03:00
|
|
|
::
|
|
|
|
:: gift returned to unix i/o
|
|
|
|
::
|
2017-02-24 05:42:58 +03:00
|
|
|
(unix nex (wile p.q.mov))
|
|
|
|
?> ?=({$arvo $~} t.tea)
|
2017-02-13 09:48:33 +03:00
|
|
|
::
|
|
|
|
:: gift returned to arvo control
|
|
|
|
::
|
2017-02-24 05:42:58 +03:00
|
|
|
(warp nex ((hard wasp) (wile p.q.mov)))
|
2017-02-13 09:48:33 +03:00
|
|
|
::
|
|
|
|
:: gift returned to calling vane
|
|
|
|
::
|
|
|
|
?> ?=({@tas *} tea)
|
2017-02-24 05:42:58 +03:00
|
|
|
(take nex i.tea t.tea p.q.mov)
|
2017-02-13 09:48:33 +03:00
|
|
|
::
|
2017-02-24 05:42:58 +03:00
|
|
|
:: %pass: forward move
|
2017-02-13 09:48:33 +03:00
|
|
|
::
|
|
|
|
$pass
|
2017-02-24 05:42:58 +03:00
|
|
|
(call [p.q.mov p.mov] p.q.q.mov q.q.q.mov)
|
2017-02-13 09:48:33 +03:00
|
|
|
==
|
2017-02-09 05:19:39 +03:00
|
|
|
--
|
2017-02-08 05:28:12 +03:00
|
|
|
--
|