2017-09-28 03:27:08 +03:00
|
|
|
:::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
|
|
|
:::::: :::::: Postface ::::::
|
|
|
|
:::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
2020-05-06 19:33:42 +03:00
|
|
|
~> %slog.[0 leaf+"arvo: assembly"]
|
2020-05-07 12:10:43 +03:00
|
|
|
~< %slog.[0 leaf+"arvo: assembled"]
|
2018-12-06 23:32:42 +03:00
|
|
|
=< ::
|
|
|
|
:: Arvo formal interface
|
|
|
|
::
|
|
|
|
:: 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=*]
|
|
|
|
^- *
|
2020-05-06 19:33:42 +03:00
|
|
|
~> %slog.[0 leaf+"arvo: formal event"]
|
2018-12-06 23:32:42 +03:00
|
|
|
.(+> +:(poke now ovo))
|
2017-09-28 03:27:08 +03:00
|
|
|
:::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
|
|
|
:::::: :::::: volume 3, Arvo models and skeleton ::::::
|
|
|
|
:::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
2019-01-18 08:37:34 +03:00
|
|
|
=>
|
2017-09-28 03:27:08 +03:00
|
|
|
|%
|
2020-02-07 21:33:49 +03:00
|
|
|
+| %global
|
|
|
|
::
|
|
|
|
:: $arch: fundamental node
|
|
|
|
:: $beak: global context
|
|
|
|
:: $beam: global name
|
|
|
|
:: $bone: opaque duct handle
|
|
|
|
:: $case: global version
|
2020-02-27 22:15:46 +03:00
|
|
|
:: $cage: marked vase
|
|
|
|
:: +cask: marked data builder
|
2020-02-07 21:33:49 +03:00
|
|
|
:: $desk: local workspace
|
|
|
|
:: $dock: message target
|
|
|
|
:: $mark: symbolic content type
|
|
|
|
:: $ship: network identity
|
|
|
|
:: $sink: subscription
|
|
|
|
::
|
|
|
|
+$ arch [fil=(unit @uvI) dir=(map @ta ~)]
|
|
|
|
+$ beam [beak s=path]
|
|
|
|
+$ beak (trel ship desk case)
|
|
|
|
+$ bone @ud
|
|
|
|
+$ case
|
|
|
|
$% :: %da: date
|
|
|
|
:: %tas: label
|
|
|
|
:: %ud: sequence
|
|
|
|
::
|
|
|
|
[%da p=@da]
|
|
|
|
[%tas p=@tas]
|
|
|
|
[%ud p=@ud]
|
|
|
|
==
|
|
|
|
+$ cage (cask vase)
|
|
|
|
++ cask |$ [a] (pair mark a)
|
|
|
|
+$ desk @tas
|
|
|
|
+$ dock (pair @p term)
|
|
|
|
+$ mark @tas
|
|
|
|
+$ ship @p
|
2020-02-27 22:15:46 +03:00
|
|
|
+$ sink (trel bone ship path)
|
2020-02-07 21:33:49 +03:00
|
|
|
::
|
|
|
|
+| %meta
|
|
|
|
::
|
|
|
|
:: +hypo: type-associated builder
|
|
|
|
:: $meta: meta-vase
|
|
|
|
:: $maze: vase, or meta-vase
|
|
|
|
::
|
|
|
|
++ hypo
|
|
|
|
|$ [a]
|
|
|
|
(pair type a)
|
|
|
|
+$ meta (pair)
|
|
|
|
+$ maze (each vase meta)
|
|
|
|
::
|
|
|
|
+| %interface
|
|
|
|
::
|
2020-02-11 01:02:34 +03:00
|
|
|
:: $ball: dynamic kernel action
|
2020-02-07 21:33:49 +03:00
|
|
|
:: $curd: tagged, untyped event
|
|
|
|
:: $duct: causal history
|
|
|
|
:: +hobo: %soft task builder
|
2020-02-11 01:02:34 +03:00
|
|
|
:: $goof: crash label and trace XX fail/ruin/crud/flaw/lack/miss
|
2020-02-27 22:15:46 +03:00
|
|
|
:: $mass: memory usage
|
2020-02-07 21:33:49 +03:00
|
|
|
:: $monk: general identity
|
2020-02-11 01:02:34 +03:00
|
|
|
:: $move: cause and action
|
2020-02-07 21:33:49 +03:00
|
|
|
:: $ovum: card with cause
|
|
|
|
:: $scry-sample: vane +scry argument
|
|
|
|
:: $vane-sample: vane wrapper-gate aargument
|
|
|
|
:: $sley: namespace function
|
|
|
|
:: $slyd: super advanced
|
|
|
|
:: $slyt: old namespace
|
|
|
|
:: +wind: kernel action builder
|
|
|
|
:: $wire: event pretext
|
2020-02-11 01:02:34 +03:00
|
|
|
:: +wite: kernel action/error builder
|
2020-02-07 21:33:49 +03:00
|
|
|
::
|
2020-02-11 01:02:34 +03:00
|
|
|
+$ ball (wite [vane=term task=maze] maze)
|
2020-02-07 21:33:49 +03:00
|
|
|
+$ curd (cask)
|
|
|
|
+$ duct (list wire)
|
|
|
|
++ hobo
|
|
|
|
|$ [a]
|
|
|
|
$? $% [%soft p=*]
|
|
|
|
==
|
|
|
|
a
|
|
|
|
==
|
2020-02-11 01:02:34 +03:00
|
|
|
+$ goof [mote=term =tang]
|
2020-02-27 22:15:46 +03:00
|
|
|
+$ mass $~ $+|+~
|
|
|
|
(pair cord (each * (list mass)))
|
2020-02-07 21:33:49 +03:00
|
|
|
+$ monk (each ship (pair @tas @ta))
|
2020-02-11 01:02:34 +03:00
|
|
|
+$ move [=duct =ball]
|
2020-02-07 21:33:49 +03:00
|
|
|
+$ ovum (pair wire curd)
|
|
|
|
::
|
2018-12-03 01:05:10 +03:00
|
|
|
+$ scry-sample
|
|
|
|
[fur=(unit (set monk)) ren=@tas why=shop syd=desk lot=coin tyl=path]
|
2019-01-14 02:54:47 +03:00
|
|
|
+$ vane-sample
|
|
|
|
[our=ship now=@da eny=@uvJ ski=slyd]
|
2020-02-07 21:33:49 +03:00
|
|
|
::
|
|
|
|
+$ sley
|
|
|
|
$- [* (unit (set monk)) term beam]
|
|
|
|
(unit (unit cage))
|
|
|
|
+$ slyd
|
|
|
|
$~ =>(~ |~(* ~))
|
|
|
|
$- [* (unit (set monk)) term beam]
|
|
|
|
(unit (unit (cask meta)))
|
|
|
|
+$ slyt $-(^ (unit (unit)))
|
|
|
|
::
|
|
|
|
++ wind
|
|
|
|
|$ :: a: forward
|
|
|
|
:: b: reverse
|
|
|
|
::
|
|
|
|
[a b]
|
|
|
|
$% :: %pass: advance
|
|
|
|
:: %slip: lateral
|
|
|
|
:: %give: retreat
|
|
|
|
::
|
|
|
|
[%pass p=path q=a]
|
|
|
|
[%slip p=a]
|
|
|
|
[%give p=b]
|
|
|
|
==
|
|
|
|
+$ wire path
|
2020-02-11 01:02:34 +03:00
|
|
|
++ wite
|
|
|
|
|$ :: note: a routed $task
|
|
|
|
:: gift: a reverse action
|
|
|
|
::
|
|
|
|
:: NB: task: a forward action
|
|
|
|
:: sign: a sourced $gift
|
|
|
|
::
|
|
|
|
[note gift]
|
2020-02-27 02:57:59 +03:00
|
|
|
$% :: %hurl: action failed
|
|
|
|
:: %pass: advance
|
2020-02-11 01:02:34 +03:00
|
|
|
:: %slip: lateral
|
|
|
|
:: %give: retreat
|
|
|
|
::
|
2020-02-27 02:57:59 +03:00
|
|
|
[%hurl =goof wite=$;($>(?(%pass %give) $))]
|
2020-02-11 01:02:34 +03:00
|
|
|
[%pass =wire =note]
|
|
|
|
[%slip =note]
|
|
|
|
[%give =gift]
|
|
|
|
==
|
2020-02-07 21:33:49 +03:00
|
|
|
::
|
|
|
|
+| %implementation
|
|
|
|
::
|
|
|
|
:: $pane: kernel modules
|
|
|
|
:: $pone: kernel modules old
|
|
|
|
:: $vane: kernel module
|
|
|
|
:: $vile: reflexive constants
|
|
|
|
::
|
|
|
|
+$ pane (list (pair @tas vase))
|
|
|
|
+$ pone (list (pair @tas vise))
|
2018-12-01 02:07:08 +03:00
|
|
|
+$ vane [=vase =worm]
|
2020-02-07 21:33:49 +03:00
|
|
|
+$ vile
|
|
|
|
$: typ=type :: -:!>(*type)
|
|
|
|
duc=type :: -:!>(*duct)
|
2020-02-28 09:30:29 +03:00
|
|
|
wir=type :: -:!>(*wire)
|
|
|
|
dud=type :: -:!>(*(unit goof))
|
2020-02-07 21:33:49 +03:00
|
|
|
==
|
2018-02-01 02:36:48 +03:00
|
|
|
--
|
|
|
|
=>
|
2020-05-06 19:33:42 +03:00
|
|
|
~% %hex ..ut ~
|
2018-02-01 02:36:48 +03:00
|
|
|
|%
|
|
|
|
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
|
|
|
:: section 3bE, Arvo core ::
|
|
|
|
::
|
2017-09-28 03:27:08 +03:00
|
|
|
++ sloy
|
2018-12-08 01:43:07 +03:00
|
|
|
:: +sloy: adapter from old style scrys to new style scrys
|
|
|
|
::
|
|
|
|
:: This does path parsing which shows up hot, but removing the last +slay
|
|
|
|
:: here requires deeper interface changes.
|
|
|
|
::
|
2017-09-28 03:27:08 +03:00
|
|
|
!:
|
2018-12-08 01:43:07 +03:00
|
|
|
~/ %sloy
|
2017-09-28 03:27:08 +03:00
|
|
|
|= sod/slyd
|
|
|
|
^- slyt
|
|
|
|
|= {ref/* raw/*}
|
|
|
|
=+ pux=((soft path) raw)
|
|
|
|
?~ pux ~
|
|
|
|
?. ?=({@ @ @ @ *} u.pux) ~
|
2018-12-08 01:43:07 +03:00
|
|
|
=+ :* hyr=(slaw %tas i.u.pux)
|
|
|
|
fal=(slaw %p i.t.u.pux)
|
2020-06-24 17:26:32 +03:00
|
|
|
dyc=?~(i.t.t.u.pux (some %$) (slaw %tas i.t.t.u.pux))
|
2017-09-28 03:27:08 +03:00
|
|
|
ved=(slay i.t.t.t.u.pux)
|
|
|
|
tyl=t.t.t.t.u.pux
|
|
|
|
==
|
2018-12-08 01:43:07 +03:00
|
|
|
?~ hyr ~
|
|
|
|
?~ fal ~
|
|
|
|
?~ dyc ~
|
2017-09-28 03:27:08 +03:00
|
|
|
?. ?=(^ ved) ~
|
2018-12-08 01:43:07 +03:00
|
|
|
=/ ron=@tas u.hyr
|
2019-08-29 01:39:04 +03:00
|
|
|
=/ bed=beam
|
|
|
|
[[u.fal u.dyc (case p.u.ved)] (flop tyl)]
|
2020-02-07 21:33:49 +03:00
|
|
|
=/ bop=(unit (unit (cask meta)))
|
2019-08-29 01:39:04 +03:00
|
|
|
(sod ref ~ ron bed)
|
2017-09-28 03:27:08 +03:00
|
|
|
?~ bop ~
|
|
|
|
?~ u.bop [~ ~]
|
2019-08-29 01:39:04 +03:00
|
|
|
:: XX figure out wth to do about hoon-version
|
|
|
|
::
|
|
|
|
?. ?& ?=([?(%151 %141) *] ref)
|
|
|
|
-:(~(nets wa *worm) +.ref -.q.u.u.bop)
|
|
|
|
==
|
|
|
|
~>(%slog.[0 leaf+"arvo: scry-lost"] ~)
|
2017-09-28 03:27:08 +03:00
|
|
|
[~ ~ +.q.u.u.bop]
|
2018-12-11 00:22:56 +03:00
|
|
|
:: +sloy-light: minimal parsing version of sloy
|
|
|
|
::
|
|
|
|
:: There are several places inside vanes where we manually call the scry
|
|
|
|
:: function raw, instead of passing it into +mink. In those cases, we're
|
|
|
|
:: paying the price to render the arguments as text, and then are
|
|
|
|
:: immediately parsing the passed in data. We can avoid that.
|
|
|
|
::
|
|
|
|
:: TODO: The entire scrying system needs to be cleaned up in a more
|
|
|
|
:: permanent way. This hack fixes up some print/parse costs, but doesn't
|
|
|
|
:: recover the print/parse costs of the scry itself, which we could prevent
|
|
|
|
:: if we didn't send (list @ta), but instead sent (list dime).
|
|
|
|
::
|
|
|
|
++ sloy-light
|
|
|
|
~/ %sloy-light
|
|
|
|
|= sod/slyd
|
|
|
|
|= [ref=* ron=@tas fal=@p dyc=@tas ved=case tyl=path]
|
2018-12-11 02:40:47 +03:00
|
|
|
:: we do not flop tyl because tyl wouldn't have been flopped by +en-beam
|
|
|
|
::
|
2019-08-29 01:39:04 +03:00
|
|
|
=/ bed=beam
|
|
|
|
[[fal dyc ved] tyl]
|
2020-02-07 21:33:49 +03:00
|
|
|
=/ bop=(unit (unit (cask meta)))
|
2019-08-29 01:39:04 +03:00
|
|
|
(sod ref ~ ron bed)
|
2017-09-28 03:27:08 +03:00
|
|
|
?~ bop ~
|
|
|
|
?~ u.bop [~ ~]
|
2019-08-29 01:39:04 +03:00
|
|
|
:: XX figure out wth to do about hoon-version
|
|
|
|
::
|
|
|
|
?. ?& ?=([?(%151 %141) *] ref)
|
|
|
|
-:(~(nets wa *worm) +.ref -.q.u.u.bop)
|
|
|
|
==
|
|
|
|
~>(%slog.[0 leaf+"arvo: scry-dark"] ~)
|
2017-09-28 03:27:08 +03:00
|
|
|
[~ ~ +.q.u.u.bop]
|
2020-02-05 23:48:30 +03:00
|
|
|
:: |part: arvo structures and engines
|
2020-01-24 09:04:45 +03:00
|
|
|
::
|
2020-02-05 23:48:30 +03:00
|
|
|
++ part
|
|
|
|
=> |%
|
2020-02-07 21:33:49 +03:00
|
|
|
:: $card: tagged, untyped event
|
|
|
|
:: $ovum: card with cause
|
|
|
|
::
|
|
|
|
:: XX replace top-level structures
|
|
|
|
::
|
|
|
|
+$ card (cask)
|
|
|
|
+$ ovum [=wire =card]
|
|
|
|
--
|
2020-02-05 23:48:30 +03:00
|
|
|
::
|
2020-05-06 19:33:42 +03:00
|
|
|
~% %part ..part ~
|
2020-02-05 23:48:30 +03:00
|
|
|
|%
|
|
|
|
::
|
|
|
|
+| %utilities
|
2020-02-27 04:35:12 +03:00
|
|
|
::
|
|
|
|
:: XX move into |wa?
|
|
|
|
::
|
|
|
|
:: +slur: slam a vase with a maze
|
2020-02-05 23:48:30 +03:00
|
|
|
::
|
|
|
|
++ slur
|
2020-02-27 04:35:12 +03:00
|
|
|
|= [sac=worm gat=vase sam=maze]
|
2020-02-05 23:48:30 +03:00
|
|
|
^- [vase worm]
|
|
|
|
=^ cur sac (~(slot wa sac) 6 gat)
|
|
|
|
=^ hig sac
|
|
|
|
?- -.sam
|
|
|
|
%& (~(nest wa sac) p.cur p.p.sam)
|
|
|
|
%| (~(nets wa sac) p.cur p.p.sam)
|
|
|
|
==
|
|
|
|
?> hig
|
|
|
|
(~(slym wa sac) gat q.p.sam)
|
2020-02-27 04:35:12 +03:00
|
|
|
:: +slid: cons a vase onto a maze
|
2020-02-05 23:48:30 +03:00
|
|
|
::
|
|
|
|
++ slid
|
2020-02-27 04:35:12 +03:00
|
|
|
|= [hed=vase tal=maze]
|
|
|
|
^- maze
|
2020-02-05 23:48:30 +03:00
|
|
|
?- -.tal
|
|
|
|
%& [%& (slop hed p.tal)]
|
|
|
|
%| [%| [%cell p.hed p.p.tal] [q.hed q.p.tal]]
|
|
|
|
==
|
|
|
|
::
|
|
|
|
+| %engines
|
|
|
|
::
|
|
|
|
:: |me: dynamic analysis
|
|
|
|
::
|
|
|
|
++ me
|
|
|
|
~/ %me
|
|
|
|
|_ :: sac: compiler cache
|
2020-02-07 22:18:00 +03:00
|
|
|
:: pyt: cached types
|
2020-02-05 23:48:30 +03:00
|
|
|
::
|
2020-02-07 22:18:00 +03:00
|
|
|
[sac=worm vil=vile]
|
2020-02-27 04:49:42 +03:00
|
|
|
:: +refine-moves: move list from vase
|
2020-01-24 06:45:03 +03:00
|
|
|
::
|
2020-02-05 23:48:30 +03:00
|
|
|
++ refine-moves
|
|
|
|
|= vax=vase
|
|
|
|
^- (pair (list move) worm)
|
|
|
|
?: =(~ q.vax) [~ sac]
|
|
|
|
=^ hed sac (~(slot wa sac) 2 vax)
|
|
|
|
=^ tal sac (~(slot wa sac) 3 vax)
|
|
|
|
=^ mov sac (refine-move hed)
|
|
|
|
=^ moz sac $(vax tal)
|
|
|
|
[[mov moz] sac]
|
2020-02-27 04:49:42 +03:00
|
|
|
:: +refine-move: move from vase
|
2020-01-24 06:45:03 +03:00
|
|
|
::
|
2020-02-05 23:48:30 +03:00
|
|
|
++ refine-move
|
|
|
|
|= vax=vase
|
|
|
|
^- (pair move worm)
|
|
|
|
~> %mean.'bad-move'
|
|
|
|
=^ hip sac (~(nell wa sac) p.vax)
|
|
|
|
?. hip
|
2020-03-04 00:20:34 +03:00
|
|
|
~>(%mean.'not-cell' !!)
|
2020-02-05 23:48:30 +03:00
|
|
|
=/ duc
|
|
|
|
~> %mean.'bad-duct'
|
|
|
|
;;(duct -.q.vax)
|
2020-01-24 09:04:45 +03:00
|
|
|
::
|
2020-02-05 23:48:30 +03:00
|
|
|
:: yat: specialized ball vase
|
|
|
|
::
|
|
|
|
=^ yat sac (~(spot wa sac) 3 vax)
|
|
|
|
=^ del sac (refine-ball yat)
|
|
|
|
[[duc del] sac]
|
2020-02-27 04:49:42 +03:00
|
|
|
:: +refine-ball: ball from vase
|
2020-01-24 06:45:03 +03:00
|
|
|
::
|
2020-02-05 23:48:30 +03:00
|
|
|
++ refine-ball
|
|
|
|
|= vax=vase
|
|
|
|
^- (pair ball worm)
|
|
|
|
?+ q.vax
|
|
|
|
~> %mean.'bad-ball'
|
|
|
|
~_ (sell vax)
|
|
|
|
!!
|
|
|
|
::
|
|
|
|
[%give card]
|
|
|
|
:: yed: vase containing card
|
2020-02-27 04:35:12 +03:00
|
|
|
:: hil: card as maze
|
2020-01-24 09:04:45 +03:00
|
|
|
::
|
2020-02-05 23:48:30 +03:00
|
|
|
=^ yed sac (~(spot wa sac) 3 vax)
|
|
|
|
=^ hil sac (refine-card yed)
|
|
|
|
[[%give hil] sac]
|
2020-01-24 06:45:03 +03:00
|
|
|
::
|
2020-02-05 23:48:30 +03:00
|
|
|
[%pass wire=* vane=term card]
|
|
|
|
=/ =wire
|
|
|
|
~> %mean.'bad-wire'
|
|
|
|
;;(wire wire.q.vax)
|
|
|
|
=/ vane
|
|
|
|
~> %mean.'bad-vane-label'
|
|
|
|
?> ((sane %tas) vane.q.vax)
|
|
|
|
vane.q.vax
|
|
|
|
::
|
|
|
|
:: yed: vase containing card
|
2020-02-27 04:35:12 +03:00
|
|
|
:: hil: card as maze
|
2020-02-05 23:48:30 +03:00
|
|
|
::
|
|
|
|
=^ xav sac (~(spot wa sac) 7 vax)
|
|
|
|
=^ yed sac (~(spot wa sac) 3 xav)
|
|
|
|
=^ hil sac (refine-card yed)
|
|
|
|
[[%pass wire vane hil] sac]
|
2020-01-24 06:45:03 +03:00
|
|
|
::
|
2020-02-05 23:48:30 +03:00
|
|
|
[%slip vane=term card]
|
|
|
|
=/ vane
|
|
|
|
~> %mean.'bad-vane-label'
|
|
|
|
?> ((sane %tas) vane.q.vax)
|
|
|
|
vane.q.vax
|
|
|
|
::
|
|
|
|
:: yed: vase containing card
|
2020-02-27 04:35:12 +03:00
|
|
|
:: hil: card as maze
|
2020-02-05 23:48:30 +03:00
|
|
|
::
|
|
|
|
=^ xav sac (~(spot wa sac) 3 vax)
|
|
|
|
=^ yed sac (~(spot wa sac) 3 xav)
|
|
|
|
=^ hil sac (refine-card yed)
|
|
|
|
[[%slip vane hil] sac]
|
2020-02-10 07:07:37 +03:00
|
|
|
::
|
2020-02-27 02:57:59 +03:00
|
|
|
[%hurl goof=^ ball=*]
|
2020-02-10 07:07:37 +03:00
|
|
|
=/ =goof
|
|
|
|
=/ mote -.goof.q.vax
|
|
|
|
?> ?& ?=(@ mote)
|
|
|
|
((sane %tas) mote)
|
|
|
|
==
|
|
|
|
[mote ;;(tang +.goof.q.vax)]
|
|
|
|
::
|
2020-02-27 02:57:59 +03:00
|
|
|
=^ bal sac
|
|
|
|
=^ lab sac (~(spot wa sac) 7 vax)
|
|
|
|
$(vax lab)
|
2020-02-10 07:07:37 +03:00
|
|
|
::
|
2020-02-27 02:57:59 +03:00
|
|
|
?> ?=(?(%pass %give) -.p.bal)
|
|
|
|
[[%hurl goof p.bal] sac]
|
2020-02-05 23:48:30 +03:00
|
|
|
==
|
2020-02-27 04:49:42 +03:00
|
|
|
:: +refine-card: card from vase
|
2020-01-24 06:45:03 +03:00
|
|
|
::
|
2020-02-05 23:48:30 +03:00
|
|
|
++ refine-card
|
|
|
|
|= vax=vase
|
2020-02-27 04:35:12 +03:00
|
|
|
^- (pair maze worm)
|
2020-02-05 23:48:30 +03:00
|
|
|
~> %mean.'bad-card'
|
|
|
|
=^ hip sac (~(nell wa sac) p.vax)
|
|
|
|
?> hip
|
|
|
|
?. ?=(%meta -.q.vax)
|
|
|
|
::
|
2020-02-27 04:35:12 +03:00
|
|
|
:: for a non-meta card, the maze is the vase
|
2020-02-05 23:48:30 +03:00
|
|
|
::
|
|
|
|
[[%& vax] sac]
|
|
|
|
~> %mean.'bad-meta'
|
2020-01-24 09:04:45 +03:00
|
|
|
::
|
2020-02-05 23:48:30 +03:00
|
|
|
:: tiv: vase of vase of card
|
|
|
|
:: typ: vase of span
|
2020-01-24 06:45:03 +03:00
|
|
|
::
|
2020-02-05 23:48:30 +03:00
|
|
|
=^ tiv sac (~(slot wa sac) 3 vax)
|
|
|
|
=^ hip sac (~(nell wa sac) p.tiv)
|
|
|
|
?> hip
|
|
|
|
=^ typ sac (~(slot wa sac) 2 tiv)
|
2020-02-07 22:18:00 +03:00
|
|
|
=. sac (~(neat wa sac) typ.vil [%& typ])
|
2020-01-24 06:45:03 +03:00
|
|
|
::
|
2020-02-05 23:48:30 +03:00
|
|
|
:: support for meta-meta-cards has been removed
|
|
|
|
::
|
2020-02-07 21:33:49 +03:00
|
|
|
?> ?=(meta q.tiv)
|
2020-02-05 23:48:30 +03:00
|
|
|
[[%| q.tiv] sac]
|
|
|
|
--
|
|
|
|
::
|
|
|
|
:: |va: vane engine
|
|
|
|
::
|
|
|
|
++ va
|
|
|
|
~/ %va
|
2020-02-07 22:18:00 +03:00
|
|
|
|_ [our=ship vil=vile vax=vase sac=worm]
|
2020-02-05 23:48:30 +03:00
|
|
|
::
|
|
|
|
:: |plow:va: operate in time and space
|
|
|
|
::
|
|
|
|
++ plow
|
|
|
|
|= [now=@da sky=slyd]
|
|
|
|
|%
|
|
|
|
:: +peek:plow:va: read from a local namespace
|
|
|
|
::
|
|
|
|
++ peek
|
|
|
|
|= [fur=(unit (set monk)) ren=@t bed=beam]
|
2020-02-07 21:33:49 +03:00
|
|
|
^- (unit (unit (cask meta)))
|
2020-02-06 09:33:51 +03:00
|
|
|
:: namespace reads receive no entropy
|
|
|
|
::
|
|
|
|
=/ sam=vane-sample [our now *@uvJ sky]
|
2020-02-05 23:48:30 +03:00
|
|
|
=^ rig sac
|
2020-02-06 09:33:51 +03:00
|
|
|
~> %mean.'peek: activation failed'
|
|
|
|
(~(slym wa sac) vax sam)
|
2020-02-05 23:48:30 +03:00
|
|
|
=^ gat sac
|
2020-02-06 09:33:51 +03:00
|
|
|
~> %mean.'peek: call failed'
|
2020-02-05 23:48:30 +03:00
|
|
|
(~(slap wa sac) rig [%limb %scry])
|
|
|
|
::
|
2020-02-07 21:33:49 +03:00
|
|
|
;; (unit (unit (cask meta)))
|
2020-02-05 23:48:30 +03:00
|
|
|
%+ slum q.gat
|
|
|
|
^- scry-sample
|
|
|
|
:* fur
|
|
|
|
ren
|
|
|
|
[%& p.bed]
|
|
|
|
q.bed
|
|
|
|
`coin`[%$ r.bed]
|
|
|
|
(flop s.bed)
|
|
|
|
==
|
|
|
|
::
|
|
|
|
:: |spin:plow:va: move statefully
|
|
|
|
::
|
|
|
|
++ spin
|
2020-02-10 07:01:03 +03:00
|
|
|
|= [hen=duct eny=@uvJ dud=(unit goof)]
|
2020-02-07 22:18:00 +03:00
|
|
|
=* duc [duc.vil hen]
|
2020-02-28 09:30:29 +03:00
|
|
|
=* err [dud.vil dud]
|
2020-02-06 09:33:51 +03:00
|
|
|
=/ sam=vane-sample [our now eny sky]
|
2020-02-05 23:48:30 +03:00
|
|
|
=^ rig sac
|
2020-02-06 09:33:51 +03:00
|
|
|
~> %mean.'spin: activation failed'
|
|
|
|
(~(slym wa sac) vax sam)
|
2020-02-05 23:48:30 +03:00
|
|
|
::
|
|
|
|
|%
|
2020-02-27 04:49:42 +03:00
|
|
|
:: +slix: en-hypo
|
2020-02-07 22:18:00 +03:00
|
|
|
::
|
|
|
|
++ slix
|
2020-02-27 04:35:12 +03:00
|
|
|
|= hil=maze
|
|
|
|
^- maze
|
2020-02-07 22:18:00 +03:00
|
|
|
?- -.hil
|
|
|
|
%& [%& (slop [typ.vil p.p.hil] p.hil)]
|
|
|
|
%| [%| [%cell typ.vil p.p.hil] p.hil]
|
|
|
|
==
|
2020-02-06 09:33:51 +03:00
|
|
|
:: +peel:spin:plow:va: extract products, finalize vane
|
2020-02-05 23:48:30 +03:00
|
|
|
::
|
|
|
|
++ peel
|
|
|
|
|= pro=vase
|
2020-02-06 09:33:51 +03:00
|
|
|
^- (pair [vase vase] worm)
|
2020-02-05 23:48:30 +03:00
|
|
|
=^ moz sac (~(slot wa sac) 2 pro)
|
|
|
|
=^ vem sac (~(slot wa sac) 3 pro)
|
2020-02-06 09:33:51 +03:00
|
|
|
:: replace vane sample with default to plug leak
|
|
|
|
::
|
|
|
|
=. +<.q.vem *vane-sample
|
|
|
|
[[moz vem] sac]
|
2020-02-05 23:48:30 +03:00
|
|
|
:: +call:spin:plow:va: advance statefully
|
|
|
|
::
|
|
|
|
++ call
|
2020-02-27 04:35:12 +03:00
|
|
|
|= task=maze
|
2020-02-06 09:33:51 +03:00
|
|
|
^- (pair [vase vase] worm)
|
|
|
|
~> %mean.'call: failed'
|
2020-02-05 23:48:30 +03:00
|
|
|
=^ gat sac
|
|
|
|
(~(slap wa sac) rig [%limb %call])
|
|
|
|
::
|
2020-02-11 01:03:03 +03:00
|
|
|
:: sample is [duct (unit goof) (hypo (hobo task))]
|
2020-02-05 23:48:30 +03:00
|
|
|
::
|
2020-02-27 04:35:12 +03:00
|
|
|
=/ sam=maze
|
2020-02-11 01:03:03 +03:00
|
|
|
(slid duc (slid err (slix task)))
|
2020-02-05 23:48:30 +03:00
|
|
|
=^ pro sac (slur sac gat sam)
|
|
|
|
(peel pro)
|
|
|
|
:: +take:spin:plow:va: retreat statefully
|
|
|
|
::
|
|
|
|
++ take
|
2020-02-27 04:35:12 +03:00
|
|
|
|= [=wire from=term gift=maze]
|
2020-02-06 09:33:51 +03:00
|
|
|
^- (pair [vase vase] worm)
|
|
|
|
~> %mean.'take: failed'
|
2020-02-05 23:48:30 +03:00
|
|
|
=^ gat sac
|
|
|
|
(~(slap wa sac) rig [%limb %take])
|
|
|
|
=/ src=vase
|
|
|
|
[[%atom %tas `from] from]
|
|
|
|
::
|
2020-02-11 01:03:03 +03:00
|
|
|
:: sample is [wire duct (unit goof) (hypo sign=[term gift])]
|
2020-02-05 23:48:30 +03:00
|
|
|
::
|
2020-02-27 04:35:12 +03:00
|
|
|
=/ sam=maze
|
2020-02-28 09:30:29 +03:00
|
|
|
=* tea [wir.vil wire]
|
2020-02-11 01:03:03 +03:00
|
|
|
(slid tea (slid duc (slid err (slix (slid src gift)))))
|
2020-02-05 23:48:30 +03:00
|
|
|
=^ pro sac (slur sac gat sam)
|
|
|
|
(peel pro)
|
|
|
|
--
|
|
|
|
--
|
|
|
|
--
|
|
|
|
::
|
|
|
|
:: |le: arvo event-loop engine
|
2020-01-24 09:04:45 +03:00
|
|
|
::
|
2020-02-05 23:48:30 +03:00
|
|
|
++ le
|
2020-02-07 21:33:49 +03:00
|
|
|
=> |%
|
2020-03-18 01:52:06 +03:00
|
|
|
:: $germ: worklist source and bar stack
|
2020-02-07 21:33:49 +03:00
|
|
|
:: $plan: worklist
|
2020-05-06 16:02:11 +03:00
|
|
|
:: $debt: in-progress state
|
2020-02-07 21:33:49 +03:00
|
|
|
::
|
2020-03-18 01:52:06 +03:00
|
|
|
+$ germ [vane=term bars=(list duct)]
|
2020-02-07 21:33:49 +03:00
|
|
|
+$ plan (pair germ (list move))
|
2020-05-06 16:02:11 +03:00
|
|
|
+$ debt
|
2020-05-06 19:33:42 +03:00
|
|
|
$~ [~ ~ *germ ~]
|
2020-05-06 16:02:11 +03:00
|
|
|
$: :: run: list of worklists
|
|
|
|
:: out: pending output
|
|
|
|
:: gem: worklist metadata
|
|
|
|
:: dud: propagate error
|
|
|
|
::
|
|
|
|
run=(list plan)
|
|
|
|
out=(list ovum)
|
|
|
|
gem=germ
|
|
|
|
dud=(unit goof)
|
|
|
|
==
|
2020-02-07 21:33:49 +03:00
|
|
|
--
|
|
|
|
::
|
2020-05-06 19:33:42 +03:00
|
|
|
~% %le part ~
|
2020-05-06 16:02:11 +03:00
|
|
|
=| debt
|
|
|
|
=* nub -
|
2020-02-05 23:48:30 +03:00
|
|
|
::
|
|
|
|
|_ $: our=ship
|
|
|
|
now=@da
|
|
|
|
eny=@uvJ
|
|
|
|
lac=?
|
2020-02-07 22:18:00 +03:00
|
|
|
vil=vile
|
2020-02-05 23:48:30 +03:00
|
|
|
van=(map term vane)
|
|
|
|
==
|
|
|
|
+* this .
|
2020-06-13 08:50:12 +03:00
|
|
|
++ plot run.nub
|
|
|
|
++ then |=(paz=(list plan) this(run (weld run paz)))
|
2020-05-06 16:02:11 +03:00
|
|
|
++ abed |=(nib=debt this(nub nib))
|
2020-02-05 23:48:30 +03:00
|
|
|
:: +abet: finalize loop
|
|
|
|
::
|
2020-05-06 16:02:11 +03:00
|
|
|
:: .ovo: optional effect to arvo itself
|
|
|
|
::
|
|
|
|
:: If ovo is ~, the loop is over; produce ova.
|
|
|
|
:: Else, produce u.ovo and the unfinished .nub internal state.
|
|
|
|
::
|
2020-02-05 23:48:30 +03:00
|
|
|
++ abet
|
2020-05-06 16:02:11 +03:00
|
|
|
|= ovo=(unit ovum)
|
|
|
|
^- $: %+ each (list ovum)
|
|
|
|
$: fec=ovum
|
|
|
|
nub=debt
|
|
|
|
==
|
|
|
|
van=(list (pair term vane))
|
|
|
|
==
|
|
|
|
:- ?~ ovo
|
|
|
|
&+(flop out)
|
|
|
|
|+[u.ovo nub]
|
|
|
|
::
|
|
|
|
%+ sort ~(tap by van)
|
2020-02-05 23:48:30 +03:00
|
|
|
|=([[a=@tas *] [b=@tas *]] (aor a b))
|
|
|
|
:: +emit: enqueue a worklist with source
|
|
|
|
::
|
|
|
|
++ emit
|
2020-03-18 01:52:06 +03:00
|
|
|
|= pan=plan
|
|
|
|
this(run [pan run])
|
2020-02-05 23:48:30 +03:00
|
|
|
:: +poke: prepare a worklist-of-one from outside
|
|
|
|
::
|
|
|
|
++ poke
|
|
|
|
|= [vane=term =ovum]
|
|
|
|
^+ this
|
2020-03-04 00:20:34 +03:00
|
|
|
~> %mean.'arvo: poke crashed'
|
2020-02-05 23:48:30 +03:00
|
|
|
~? !lac ["" %unix p.card.ovum wire.ovum now]
|
2020-02-27 04:35:12 +03:00
|
|
|
=/ =maze
|
2020-02-05 23:48:30 +03:00
|
|
|
=/ =type [%cell [%atom %tas `%soft] %noun]
|
|
|
|
[%& type [%soft card.ovum]]
|
|
|
|
=/ =move
|
2020-03-04 00:20:34 +03:00
|
|
|
~| [%bad-wire wire.ovum]
|
2020-02-07 01:34:01 +03:00
|
|
|
?> ?=([%$ *] wire.ovum)
|
2020-02-27 04:35:12 +03:00
|
|
|
[duct=~ %pass t.wire.ovum vane maze]
|
2020-03-18 01:52:06 +03:00
|
|
|
(emit [%$ ~] move ~)
|
2020-02-11 08:51:46 +03:00
|
|
|
:: +crud: prepare a worklist-of-one with error report from outside
|
|
|
|
::
|
|
|
|
++ crud
|
|
|
|
|= [vane=term =goof =ovum]
|
|
|
|
^+ this
|
2020-03-04 00:20:34 +03:00
|
|
|
~> %mean.'arvo: crud crashed'
|
2020-02-11 08:51:46 +03:00
|
|
|
~? !lac ["" %unix %crud p.card.ovum wire.ovum now]
|
2020-02-27 04:35:12 +03:00
|
|
|
=/ =maze
|
2020-02-11 08:51:46 +03:00
|
|
|
=/ =type [%cell [%atom %tas `%soft] %noun]
|
|
|
|
[%& type [%soft card.ovum]]
|
|
|
|
=/ =move
|
2020-03-04 00:20:34 +03:00
|
|
|
~| [%bad-wire wire.ovum]
|
2020-02-11 08:51:46 +03:00
|
|
|
?> ?=([%$ *] wire.ovum)
|
2020-02-27 04:35:12 +03:00
|
|
|
[duct=~ %hurl goof %pass t.wire.ovum vane maze]
|
2020-03-18 01:52:06 +03:00
|
|
|
(emit [%$ ~] move ~)
|
2020-02-05 23:48:30 +03:00
|
|
|
:: +spam: prepare a worklist for all targets
|
|
|
|
::
|
|
|
|
++ spam
|
|
|
|
|= =ovum
|
|
|
|
^+ this
|
2020-03-04 00:20:34 +03:00
|
|
|
~> %mean.'arvo: spam crashed'
|
2020-03-03 07:36:32 +03:00
|
|
|
:: fix up wire on %vega from previous kernel
|
|
|
|
::
|
|
|
|
=? wire.ovum =(ovum [/ %vega ~]) //arvo
|
2020-02-05 23:48:30 +03:00
|
|
|
=/ ord=(list (pair term *))
|
|
|
|
%+ sort
|
|
|
|
~(tap by van)
|
|
|
|
|=([[a=@ *] [b=@ *]] (aor b a))
|
|
|
|
|- ^+ this
|
|
|
|
?~ ord
|
|
|
|
this
|
|
|
|
=. this (poke p.i.ord ovum)
|
|
|
|
$(ord t.ord)
|
|
|
|
:: +loop: until done
|
|
|
|
::
|
|
|
|
++ loop
|
2020-05-06 16:02:11 +03:00
|
|
|
^- abet
|
2020-02-05 23:48:30 +03:00
|
|
|
?~ run
|
2020-05-06 16:02:11 +03:00
|
|
|
(abet ~)
|
2020-02-06 09:33:51 +03:00
|
|
|
?: =(~ q.i.run) :: XX TMI
|
2020-02-05 23:48:30 +03:00
|
|
|
loop(run t.run)
|
2020-02-11 23:16:03 +03:00
|
|
|
=. dud ~
|
2020-02-05 23:48:30 +03:00
|
|
|
=. gem p.i.run
|
2020-05-06 16:02:11 +03:00
|
|
|
=^ mov=move q.i.run q.i.run
|
|
|
|
=> .(run `(list plan)`run) :: XX TMI
|
|
|
|
=^ ovo=(unit ovum) this (step mov)
|
|
|
|
?~ ovo
|
|
|
|
loop
|
|
|
|
(abet `u.ovo)
|
2020-02-05 23:48:30 +03:00
|
|
|
:: +step: advance the loop one step by routing a move
|
|
|
|
::
|
|
|
|
++ step
|
|
|
|
|= =move
|
2020-05-06 16:02:11 +03:00
|
|
|
^- [(unit ovum) _this]
|
2020-02-10 07:01:03 +03:00
|
|
|
::
|
|
|
|
~? &(!lac ?=(^ dud)) %goof
|
|
|
|
::
|
2020-02-05 23:48:30 +03:00
|
|
|
?- -.ball.move
|
|
|
|
::
|
|
|
|
:: %pass: forward move
|
|
|
|
::
|
|
|
|
%pass
|
|
|
|
=* wire wire.ball.move
|
|
|
|
=* duct duct.move
|
|
|
|
=* vane vane.note.ball.move
|
|
|
|
=* task task.note.ball.move
|
|
|
|
::
|
|
|
|
~? &(!lac !=(%$ vane.gem))
|
2020-03-18 01:52:06 +03:00
|
|
|
:- (runt [(lent bars.gem) '|'] "")
|
2020-02-05 23:48:30 +03:00
|
|
|
:^ %pass [vane.gem vane]
|
|
|
|
?: ?=(?(%deal %deal-gall) +>-.task)
|
|
|
|
:- :- +>-.task
|
|
|
|
;;([[ship ship] term term] [+>+< +>+>- +>+>+<]:task)
|
|
|
|
wire
|
|
|
|
[(symp +>-.task) wire]
|
|
|
|
duct
|
|
|
|
::
|
2020-02-06 09:33:51 +03:00
|
|
|
:: cons source onto wire, and wire onto duct
|
|
|
|
::
|
2020-05-06 16:02:11 +03:00
|
|
|
`(call [[vane.gem wire] duct] vane task)
|
2020-01-24 06:45:03 +03:00
|
|
|
::
|
2020-02-05 23:48:30 +03:00
|
|
|
:: %slip: lateral move
|
2020-01-24 06:45:03 +03:00
|
|
|
::
|
2020-02-05 23:48:30 +03:00
|
|
|
%slip
|
|
|
|
=* duct duct.move
|
|
|
|
=* vane vane.note.ball.move
|
|
|
|
=* task task.note.ball.move
|
|
|
|
::
|
|
|
|
~? !lac
|
2020-03-18 01:52:06 +03:00
|
|
|
:- (runt [(lent bars.gem) '|'] "")
|
2020-02-05 23:48:30 +03:00
|
|
|
[%slip vane.gem (symp +>-.task) duct]
|
|
|
|
::
|
2020-05-06 16:02:11 +03:00
|
|
|
`(call duct vane task)
|
2020-02-05 23:48:30 +03:00
|
|
|
::
|
|
|
|
:: %give: return move
|
|
|
|
::
|
|
|
|
%give
|
|
|
|
?. ?=(^ duct.move)
|
|
|
|
~>(%mean.'give-no-duct' !!)
|
|
|
|
::
|
|
|
|
=/ wire i.duct.move
|
|
|
|
=/ duct t.duct.move
|
|
|
|
=* gift gift.ball.move
|
|
|
|
::
|
|
|
|
?~ duct
|
2020-02-07 01:34:01 +03:00
|
|
|
::
|
|
|
|
:: the caller was Outside
|
|
|
|
::
|
|
|
|
~| [%xeno wire (symp -.q.p.gift)]
|
2020-02-05 23:48:30 +03:00
|
|
|
?> ?=([%$ *] wire)
|
|
|
|
(xeno wire gift)
|
|
|
|
::
|
|
|
|
:: the caller was a vane
|
|
|
|
::
|
|
|
|
=^ vane=term wire
|
2020-02-07 01:34:01 +03:00
|
|
|
~| [%give duct.move (symp -.q.p.gift)]
|
2020-02-05 23:48:30 +03:00
|
|
|
?>(?=(^ wire) wire)
|
|
|
|
::
|
|
|
|
~? &(!lac |(!=(%blit +>-.gift) !=(%d vane.gem)))
|
2020-03-18 01:52:06 +03:00
|
|
|
:- (runt [(lent bars.gem) '|'] "")
|
2020-02-05 23:48:30 +03:00
|
|
|
:^ %give vane.gem
|
|
|
|
?: ?=(%unto +>-.gift)
|
|
|
|
[+>-.gift (symp +>+<.gift)]
|
|
|
|
(symp +>-.gift)
|
2020-03-26 06:13:24 +03:00
|
|
|
duct.move
|
2020-02-05 23:48:30 +03:00
|
|
|
::
|
2020-05-06 16:02:11 +03:00
|
|
|
`(take duct wire vane gift)
|
2020-02-10 07:01:03 +03:00
|
|
|
::
|
2020-02-27 02:57:59 +03:00
|
|
|
:: %hurl: action with error
|
2020-02-10 07:01:03 +03:00
|
|
|
::
|
|
|
|
%hurl
|
|
|
|
%= $
|
2020-02-27 02:57:59 +03:00
|
|
|
dud `goof.ball.move
|
|
|
|
ball.move wite.ball.move
|
2020-02-10 07:01:03 +03:00
|
|
|
==
|
2020-02-05 23:48:30 +03:00
|
|
|
==
|
2020-05-07 11:51:08 +03:00
|
|
|
:: +whey: measure memory usage
|
|
|
|
::
|
|
|
|
++ whey
|
|
|
|
^- (list mass)
|
|
|
|
=/ von
|
|
|
|
%+ turn
|
|
|
|
(sort ~(tap by van) |=([[a=@tas *] [b=@tas *]] (aor a b)))
|
|
|
|
|=([lal=@tas =vane] (cat 3 %vane- lal)^vane)
|
|
|
|
::
|
|
|
|
:~ :+ %reports %|
|
|
|
|
%+ turn von
|
|
|
|
=/ bem=beam [[our %home da+now] /whey]
|
|
|
|
|= [lal=@tas =vane]
|
2020-06-13 07:40:13 +03:00
|
|
|
=/ met (need (need (peek ** ~ (rsh 3 5 lal) bem)))
|
2020-05-07 11:51:08 +03:00
|
|
|
lal^|+;;((list mass) q.q.met)
|
|
|
|
::
|
|
|
|
:+ %caches %|
|
|
|
|
%+ turn von
|
|
|
|
|=([lal=@tas =vane] lal^&+worm.vane)
|
|
|
|
::
|
|
|
|
:+ %dregs %|
|
|
|
|
%+ turn von
|
|
|
|
|=([lal=@tas =vane] lal^&+vase.vane)
|
|
|
|
==
|
2020-02-05 23:48:30 +03:00
|
|
|
:: +peek: read from the entire namespace
|
|
|
|
::
|
|
|
|
++ peek
|
|
|
|
^- slyd
|
|
|
|
|= [typ=* fur=(unit (set monk)) ron=term bed=beam]
|
2020-02-07 21:33:49 +03:00
|
|
|
^- (unit (unit (cask meta)))
|
2020-02-05 23:48:30 +03:00
|
|
|
::
|
|
|
|
:: XX identity is defaulted to ship from beam
|
|
|
|
::
|
|
|
|
=> .(fur ?^(fur fur `[[%& p.bed] ~ ~]))
|
|
|
|
:: XX vane and care are concatenated
|
|
|
|
::
|
|
|
|
=/ lal (end 3 1 ron)
|
|
|
|
=/ ren ;;(@t (rsh 3 1 ron))
|
|
|
|
?. (~(has by van) lal)
|
|
|
|
~
|
|
|
|
(peek:(plow lal) fur ren bed)
|
|
|
|
:: +xeno: stash pending output
|
|
|
|
::
|
|
|
|
++ xeno
|
2020-02-27 04:35:12 +03:00
|
|
|
|= [=wire gift=maze]
|
2020-05-06 16:02:11 +03:00
|
|
|
^- [(unit ovum) _this]
|
|
|
|
=/ ovo=ovum [wire ;;(card q.p.gift)]
|
2020-05-07 11:51:08 +03:00
|
|
|
?: ?=(?(%lyra %veer %wack %verb %whey) -.card.ovo)
|
2020-05-06 16:02:11 +03:00
|
|
|
[`ovo this]
|
|
|
|
[~ this(out [ovo out])]
|
2020-02-05 23:48:30 +03:00
|
|
|
:: +call: advance to target
|
|
|
|
::
|
|
|
|
++ call
|
2020-02-27 04:35:12 +03:00
|
|
|
|= [=duct way=term task=maze]
|
2020-02-05 23:48:30 +03:00
|
|
|
^+ this
|
2020-03-18 01:52:06 +03:00
|
|
|
%+ push [way duct bars.gem]
|
|
|
|
~| bar-stack=`(list ^duct)`[duct bars.gem]
|
2020-02-10 07:01:03 +03:00
|
|
|
%. task
|
|
|
|
call:(spin:(plow way) duct eny dud)
|
2020-02-05 23:48:30 +03:00
|
|
|
:: +take: retreat along call-stack
|
|
|
|
::
|
|
|
|
++ take
|
2020-02-27 04:35:12 +03:00
|
|
|
|= [=duct =wire way=term gift=maze]
|
2020-02-05 23:48:30 +03:00
|
|
|
^+ this
|
2020-03-18 01:52:06 +03:00
|
|
|
%+ push [way duct bars.gem]
|
2020-02-06 09:33:51 +03:00
|
|
|
::
|
|
|
|
:: cons source onto .gift to make a $sign
|
|
|
|
::
|
2020-03-18 01:52:06 +03:00
|
|
|
~| wire=wire
|
|
|
|
~| bar-stack=`(list ^duct)`[duct bars.gem]
|
2020-02-10 07:01:03 +03:00
|
|
|
%. [wire [vane.gem gift]]
|
|
|
|
take:(spin:(plow way) duct eny dud)
|
2020-02-05 23:48:30 +03:00
|
|
|
:: +push: finalize an individual step
|
|
|
|
::
|
|
|
|
++ push
|
2020-03-18 01:52:06 +03:00
|
|
|
|= [gum=germ [zom=vase vax=vase] sac=worm]
|
2020-02-05 23:48:30 +03:00
|
|
|
^+ this
|
2020-02-06 09:33:51 +03:00
|
|
|
=^ moz sac
|
2020-02-07 22:18:00 +03:00
|
|
|
(~(refine-moves me sac vil) zom)
|
2020-03-18 01:52:06 +03:00
|
|
|
=. van (~(put by van) vane.gum [vax sac])
|
|
|
|
(emit `plan`[`germ`gum `(list move)`moz])
|
2020-02-05 23:48:30 +03:00
|
|
|
:: +plow: operate on a vane, in time and space
|
|
|
|
::
|
|
|
|
++ plow
|
2020-02-06 09:33:51 +03:00
|
|
|
|= way=term
|
|
|
|
~| [%plow-failed way]
|
|
|
|
=/ =vane
|
2020-02-07 01:34:01 +03:00
|
|
|
~| [%missing-vane way]
|
2020-02-06 09:33:51 +03:00
|
|
|
(~(got by van) way)
|
2020-02-07 22:18:00 +03:00
|
|
|
(~(plow va [our vil vane]) now peek)
|
2020-02-05 23:48:30 +03:00
|
|
|
--
|
2020-01-24 09:04:45 +03:00
|
|
|
--
|
2017-09-28 03:27:08 +03:00
|
|
|
::
|
2018-11-28 07:07:54 +03:00
|
|
|
++ symp :: symbol or empty
|
|
|
|
|= a=* ^- @tas
|
|
|
|
?.(&(?=(@ a) ((sane %tas) a)) %$ a)
|
|
|
|
::
|
2017-09-28 03:27:08 +03:00
|
|
|
++ vent :: vane core
|
2018-12-06 00:41:21 +03:00
|
|
|
|= [who=ship lal=@tas vil=vile bud=vase =vane]
|
2017-09-28 03:27:08 +03:00
|
|
|
~% %vent +>+ ~
|
|
|
|
|%
|
|
|
|
++ ruck :: update vase
|
|
|
|
|= {pax/path txt/@ta}
|
|
|
|
^+ +>
|
2019-01-14 02:54:47 +03:00
|
|
|
:: XX should use real entropy and the real date
|
|
|
|
::
|
|
|
|
=/ arg=vane-sample
|
|
|
|
[who ~2000.1.1 *@uvJ =>(~ |~(* ~))]
|
2018-12-01 02:07:08 +03:00
|
|
|
=+ rig=(slym vase.vane arg)
|
2018-02-14 08:36:25 +03:00
|
|
|
=+ gen=(rain pax txt)
|
|
|
|
=+ rev=(slym (slap bud gen) bud)
|
2017-09-28 03:27:08 +03:00
|
|
|
=+ syg=(slym rev arg)
|
2018-12-03 01:05:10 +03:00
|
|
|
:: update the vane itself
|
|
|
|
::
|
2019-02-09 02:03:46 +03:00
|
|
|
:: We don't cache the n+slap/+slam types because they're only used once
|
2018-12-03 01:05:10 +03:00
|
|
|
:: right here; they'll never be used again.
|
|
|
|
::
|
|
|
|
=. vase.vane
|
|
|
|
~| %load-lost
|
|
|
|
(slam (slap syg [%limb %load]) (slap rig [%limb %stay]))
|
|
|
|
:: prime the new compiler cache
|
|
|
|
::
|
|
|
|
prime
|
|
|
|
:: reset and prime the worm cache for scrys
|
|
|
|
::
|
|
|
|
:: If the +slap/+slym in scry isn't cached, we spend the majority of
|
|
|
|
:: the time in a scry in the compiler. The +scry gate cannot have side
|
|
|
|
:: effects so we can't modify the cache at access time. So we seed the
|
|
|
|
:: cache with all the things +scry will need when we install the vane
|
|
|
|
::
|
|
|
|
++ prime
|
|
|
|
^+ ..prime
|
|
|
|
::
|
|
|
|
%_ ..prime
|
|
|
|
worm.vane
|
|
|
|
:: reset cache and add in vane activation entry
|
|
|
|
::
|
|
|
|
=^ rig worm.vane
|
2019-01-14 02:54:47 +03:00
|
|
|
(~(slym wa *worm) vase.vane *vane-sample)
|
2018-12-03 01:05:10 +03:00
|
|
|
:: cache the access of the %scry arm
|
|
|
|
::
|
2019-01-18 02:31:41 +03:00
|
|
|
+:(~(slap wa worm.vane) rig [%limb %scry])
|
2018-12-03 01:05:10 +03:00
|
|
|
==
|
2017-09-28 03:27:08 +03:00
|
|
|
--
|
|
|
|
::
|
|
|
|
++ vint :: create vane
|
2018-12-06 00:41:21 +03:00
|
|
|
|= $: who=ship
|
|
|
|
lal=@tas
|
|
|
|
vil=vile
|
|
|
|
bud=vase
|
|
|
|
pax=path
|
|
|
|
txt=@ta
|
|
|
|
==
|
2020-05-09 15:09:26 +03:00
|
|
|
=; res ?-(-.res %& p.res, %| (mean leaf+"vint: {<lal>}" p.res))
|
|
|
|
%- mule |.
|
2018-02-14 08:36:25 +03:00
|
|
|
=+ gen=(rain pax txt)
|
2020-05-08 13:02:54 +03:00
|
|
|
~> %slog.[0 leaf+"vane: parsed {(scow p+(mug gen))}"]
|
2018-12-06 00:41:21 +03:00
|
|
|
=+ pro=(vent who lal vil bud [(slym (slap bud gen) bud) *worm])
|
2020-05-08 13:02:54 +03:00
|
|
|
~> %slog.[0 leaf+"vane: compiled {(scow p+(mug pro))}"]
|
2018-12-03 01:05:10 +03:00
|
|
|
prime:pro
|
2017-09-28 03:27:08 +03:00
|
|
|
::
|
|
|
|
++ viol :: vane tools
|
2017-11-16 23:44:27 +03:00
|
|
|
|= but/type
|
2017-09-28 03:27:08 +03:00
|
|
|
^- vile
|
2017-11-16 23:44:27 +03:00
|
|
|
=+ pal=|=(a/@t ^-(type (~(play ut but) (vice a))))
|
2018-02-13 06:25:46 +03:00
|
|
|
:* typ=(pal '$:type')
|
|
|
|
duc=(pal '$:duct')
|
2020-02-28 09:30:29 +03:00
|
|
|
wir=(pal '$:wire')
|
|
|
|
dud=(pal '=<($ (unit goof))') :: XX misparse
|
2017-09-28 03:27:08 +03:00
|
|
|
==
|
|
|
|
::
|
2020-02-27 06:46:13 +03:00
|
|
|
++ dint :: input routing
|
|
|
|
|= hap/path ^- @tas
|
|
|
|
?+ hap ~|([%bad-dint hap] !!)
|
|
|
|
{@ $ames *} %a
|
|
|
|
{@ $boat *} %c
|
|
|
|
{@ $newt *} %a
|
|
|
|
{@ $sync *} %c
|
|
|
|
{@ $term *} %d
|
|
|
|
{@ $http-client *} %i
|
|
|
|
{@ $http-server *} %e
|
|
|
|
{@ $behn *} %b
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ is &
|
2017-09-28 03:27:08 +03:00
|
|
|
--
|
2018-12-06 04:58:41 +03:00
|
|
|
=< :: Arvo larval stage
|
|
|
|
::
|
|
|
|
:: The true Arvo kernel knows who it is. It should not *maybe*
|
|
|
|
:: have an identity, nor should it contain multitudes. This outer
|
|
|
|
:: kernel exists to accumulate identity, entropy, and the
|
|
|
|
:: standard library. Upon having done so, it upgrades itself into
|
|
|
|
:: the true Arvo kernel. Subsequent upgrades will fall through
|
|
|
|
:: the larval stage directly into the actual kernel.
|
|
|
|
::
|
|
|
|
:: For convenience, this larval stage also supports hoon compilation
|
|
|
|
:: with +wish and vane installation with the %veer event.
|
|
|
|
::
|
2018-12-06 09:10:24 +03:00
|
|
|
=/ pit=vase !>(..is)
|
|
|
|
=| $: :: who: our identity once we know it
|
|
|
|
:: eny: entropy once we learn it
|
|
|
|
:: bod: %zuse once we receive it
|
|
|
|
::
|
|
|
|
who=(unit ship)
|
2018-12-06 04:58:41 +03:00
|
|
|
eny=(unit @)
|
2018-12-06 09:10:24 +03:00
|
|
|
bod=(unit vase)
|
2018-12-06 04:58:41 +03:00
|
|
|
==
|
|
|
|
:: larval Arvo structural interface
|
|
|
|
::
|
|
|
|
|%
|
2019-01-07 23:36:06 +03:00
|
|
|
++ come ^come :: 4
|
|
|
|
++ load ^load :: 10
|
|
|
|
++ peek |=(* ~) :: 46
|
2018-12-06 04:58:41 +03:00
|
|
|
::
|
2019-01-07 23:36:06 +03:00
|
|
|
++ poke |= * :: 47
|
2018-12-06 04:58:41 +03:00
|
|
|
^- [(list ovum) *]
|
2019-05-09 22:46:19 +03:00
|
|
|
=> .(+< ;;([now=@da ovo=ovum] +<))
|
2018-12-06 04:58:41 +03:00
|
|
|
^- [(list ovum) *]
|
|
|
|
=. +>.$
|
|
|
|
?+ -.q.ovo
|
|
|
|
:: ignore unrecognized
|
|
|
|
::
|
|
|
|
~& [%larval-ignore p.ovo -.q.ovo]
|
|
|
|
+>.$
|
|
|
|
:: install %zuse or vane
|
|
|
|
::
|
|
|
|
%veer
|
|
|
|
^+ +>.$
|
2018-12-06 09:10:24 +03:00
|
|
|
:: use the maximum comet if we don't know who we are yet
|
|
|
|
::
|
2018-12-07 01:30:57 +03:00
|
|
|
=/ our
|
|
|
|
?^ who
|
|
|
|
u.who
|
|
|
|
=/ fip=ship (dec (bex 128))
|
2020-05-06 16:02:11 +03:00
|
|
|
~> %slog.[0 leaf+"arvo: larval identity {(scow %p fip)}"]
|
|
|
|
fip
|
|
|
|
=. soul (veer our now q.ovo)
|
2018-12-06 09:10:24 +03:00
|
|
|
+>.$(bod ?^(bod bod `bud.^poke))
|
2018-12-06 04:58:41 +03:00
|
|
|
:: add entropy
|
|
|
|
::
|
|
|
|
%wack
|
|
|
|
^+ +>.$
|
|
|
|
?> ?=(@ q.q.ovo)
|
|
|
|
+>.$(eny `q.q.ovo)
|
|
|
|
:: become who you were born to be
|
|
|
|
::
|
|
|
|
%whom
|
|
|
|
^+ +>.$
|
|
|
|
?> ?=(@ q.q.ovo)
|
|
|
|
+>.$(who `q.q.ovo)
|
|
|
|
==
|
2018-12-06 09:10:24 +03:00
|
|
|
:: upgrade once we've accumulated identity, entropy, and %zuse
|
2018-12-06 04:58:41 +03:00
|
|
|
::
|
2018-12-06 09:10:24 +03:00
|
|
|
?. &(?=(^ who) ?=(^ eny) ?=(^ bod))
|
2018-12-06 04:58:41 +03:00
|
|
|
[~ +>.$]
|
|
|
|
~> %slog.[0 leaf+"arvo: metamorphosis"]
|
2020-05-07 12:10:43 +03:00
|
|
|
~< %slog.[0 leaf+"arvo: metamorphosed"]
|
2018-12-06 04:58:41 +03:00
|
|
|
=/ nyf
|
2018-12-06 09:10:24 +03:00
|
|
|
(turn vanes.^poke |=([label=@tas =vane] [label vase.vane]))
|
2020-05-06 19:33:42 +03:00
|
|
|
(load u.who now u.eny *pram u.bod nyf)
|
2018-12-06 04:58:41 +03:00
|
|
|
::
|
2019-01-07 23:36:06 +03:00
|
|
|
++ wish |= txt=* :: 22
|
2018-12-06 09:10:24 +03:00
|
|
|
?> ?=(@ txt)
|
|
|
|
q:(slap ?~(bod pit u.bod) (ream txt))
|
2018-12-06 04:58:41 +03:00
|
|
|
--
|
|
|
|
::
|
2018-12-06 02:25:12 +03:00
|
|
|
:: persistent arvo state
|
|
|
|
::
|
2018-12-06 09:10:24 +03:00
|
|
|
=/ pit=vase !>(..is) ::
|
2018-12-05 19:42:20 +03:00
|
|
|
=/ vil=vile (viol p.pit) :: cached reflexives
|
2019-03-08 08:27:07 +03:00
|
|
|
=| $: lac=_& :: laconic bit
|
2018-12-05 19:42:20 +03:00
|
|
|
eny=@ :: entropy
|
2018-12-06 04:58:41 +03:00
|
|
|
our=ship :: identity
|
2018-12-06 09:10:24 +03:00
|
|
|
bud=vase :: %zuse
|
2018-12-01 02:58:56 +03:00
|
|
|
vanes=(list [label=@tas =vane]) :: modules
|
2017-09-28 03:27:08 +03:00
|
|
|
== ::
|
2020-05-06 16:02:11 +03:00
|
|
|
:: produce an interface that vere understands
|
|
|
|
::
|
|
|
|
=< arvo
|
|
|
|
:: soul: arvo implementation core
|
2018-12-06 02:25:12 +03:00
|
|
|
::
|
2017-09-28 03:27:08 +03:00
|
|
|
|%
|
2020-05-06 16:02:11 +03:00
|
|
|
++ soul .
|
|
|
|
:: arvo: structural interface core
|
|
|
|
::
|
|
|
|
++ arvo
|
|
|
|
|%
|
|
|
|
++ come |= [@ @ @ pram vise pone] :: 4
|
|
|
|
(come:soul +<)
|
|
|
|
::
|
|
|
|
++ load |= [@ @ @ pram vase pane] :: 10
|
|
|
|
(load:soul +<)
|
|
|
|
::
|
|
|
|
++ peek |= * :: 46
|
|
|
|
=/ rob (^peek ;;([@da path] +<))
|
|
|
|
?~ rob ~
|
|
|
|
?~ u.rob ~
|
|
|
|
[~ u.u.rob]
|
|
|
|
::
|
|
|
|
++ poke |= * :: 47
|
|
|
|
=> .(+< ;;([now=@da ovo=ovum] +<))
|
|
|
|
(poke:soul now ovo)
|
|
|
|
::
|
|
|
|
++ wish |=(* (^wish ;;(@ta +<))) :: 22
|
|
|
|
--
|
|
|
|
:: $pram: upgradeable state
|
|
|
|
:: +dram: upgrade $pram, compatible
|
|
|
|
::
|
|
|
|
+$ pram
|
2020-06-28 08:13:42 +03:00
|
|
|
$~ [%~2020.6.28 nub=*debt:le:part]
|
|
|
|
$% [%~2020.6.28 nub=debt:le:part]
|
2020-05-06 16:02:11 +03:00
|
|
|
(list ovum)
|
|
|
|
==
|
|
|
|
++ dram
|
|
|
|
|= ram=pram
|
|
|
|
^- pram
|
2020-06-28 08:13:42 +03:00
|
|
|
?: ?=([%~2020.6.28 *] ram)
|
2020-05-06 16:02:11 +03:00
|
|
|
ram
|
2020-05-06 19:33:42 +03:00
|
|
|
~| ram+ram
|
2020-05-07 11:51:08 +03:00
|
|
|
=| nub=debt:le:part
|
2020-06-12 08:54:19 +03:00
|
|
|
=/ =plan:le:part
|
|
|
|
:- [%$ ~]
|
|
|
|
%+ turn ;;((list ovum) ram)
|
|
|
|
|= ovo=ovum
|
|
|
|
^- move
|
|
|
|
[[p.ovo]~ %give %& %noun q.ovo]
|
2020-06-28 08:13:42 +03:00
|
|
|
[%~2020.6.28 nub(run [plan]~)]
|
2020-05-06 16:02:11 +03:00
|
|
|
:: $prim: old $pram
|
|
|
|
:: +drum: upgrade $prim to $pram, incompatible
|
|
|
|
::
|
|
|
|
+$ prim pram
|
|
|
|
++ drum |=(prim +<)
|
|
|
|
:: +come: load incompatible
|
|
|
|
::
|
|
|
|
++ come
|
|
|
|
|= [who=ship now=@da yen=@ rim=prim dub=vise nyf=pone]
|
2020-05-06 19:33:42 +03:00
|
|
|
^- [(list ovum) *]
|
2020-05-07 11:51:08 +03:00
|
|
|
~| %come
|
2018-12-06 09:10:24 +03:00
|
|
|
=/ fyn (turn nyf |=([a=@tas b=vise] [a (slim b)]))
|
2020-05-06 16:02:11 +03:00
|
|
|
=/ rum (drum rim)
|
|
|
|
(load who now yen rum (slim dub) fyn)
|
2020-06-13 08:50:12 +03:00
|
|
|
:: +load: load compatible, notifying vanes
|
2017-09-28 03:27:08 +03:00
|
|
|
::
|
2020-05-06 16:02:11 +03:00
|
|
|
++ load
|
|
|
|
|= [who=ship now=@da yen=@ ram=pram dub=vase nyf=pane]
|
2020-05-06 19:33:42 +03:00
|
|
|
^- [(list ovum) *]
|
2020-05-07 11:51:08 +03:00
|
|
|
~| %load
|
2018-12-06 04:58:41 +03:00
|
|
|
=: our who
|
|
|
|
eny yen
|
2018-12-06 09:10:24 +03:00
|
|
|
bud dub
|
2018-12-01 02:58:56 +03:00
|
|
|
vanes (turn nyf |=({a/@tas b/vise} [a [b *worm]]))
|
2017-09-28 03:27:08 +03:00
|
|
|
==
|
2020-05-06 16:02:11 +03:00
|
|
|
=. ram (dram ram)
|
2020-06-28 08:13:42 +03:00
|
|
|
?> ?=([%~2020.6.28 *] ram)
|
2020-06-13 08:50:12 +03:00
|
|
|
=/ run plot:(spam:(lead now ~) [//arvo %vega ~])
|
|
|
|
(leap now (then:(lead now `nub.ram) run))
|
2020-05-06 16:02:11 +03:00
|
|
|
:: +peek: external inspect
|
2017-09-28 03:27:08 +03:00
|
|
|
::
|
2020-05-06 16:02:11 +03:00
|
|
|
++ peek
|
2017-09-28 03:27:08 +03:00
|
|
|
|= {now/@da hap/path}
|
2019-09-10 06:00:56 +03:00
|
|
|
^- (unit (unit))
|
|
|
|
?~ hap [~ ~ hoon-version]
|
2020-05-07 11:51:08 +03:00
|
|
|
?: =(hap /whey)
|
|
|
|
``mass+(whey now)
|
2020-05-06 16:02:11 +03:00
|
|
|
((sloy peek:(lead now ~)) [[151 %noun] hap])
|
|
|
|
:: +poke: external apply
|
2017-09-28 03:27:08 +03:00
|
|
|
::
|
2020-05-06 16:02:11 +03:00
|
|
|
++ poke
|
2018-12-05 10:34:45 +03:00
|
|
|
|= [now=@da ovo=ovum]
|
2018-12-07 03:51:52 +03:00
|
|
|
=. eny (shaz (cat 3 eny now))
|
2020-05-06 19:33:42 +03:00
|
|
|
~| poke+-.q.ovo
|
|
|
|
|- ^- [(list ovum) *]
|
2020-05-06 16:02:11 +03:00
|
|
|
?+ -.q.ovo
|
|
|
|
:: Normal events are routed to a single vane
|
|
|
|
::
|
|
|
|
(leap now (poke:(lead now ~) (dint p.ovo) ovo))
|
2020-05-07 12:00:11 +03:00
|
|
|
:: Print warning and no-op.
|
2018-12-05 10:34:45 +03:00
|
|
|
::
|
2020-05-07 12:00:11 +03:00
|
|
|
%warn
|
2020-05-17 12:01:17 +03:00
|
|
|
:_ arvo
|
|
|
|
?. ?=(^ +.q.ovo)
|
|
|
|
~
|
|
|
|
=/ msg=tape
|
|
|
|
:(weld "(for %" (trip (symp +<.q.ovo)) ") failed")
|
|
|
|
~> %slog.[0 leaf+(weld "arvo: replacement event " msg)]
|
|
|
|
?: lac
|
|
|
|
~
|
|
|
|
=/ rep
|
|
|
|
%- mule |.
|
|
|
|
((slog (tang +>.q.ovo)) ~)
|
|
|
|
~
|
2020-05-06 16:02:11 +03:00
|
|
|
:: Process these events just as if they had come from a vane
|
2018-12-05 10:34:45 +03:00
|
|
|
::
|
2020-05-07 11:51:08 +03:00
|
|
|
?(%lyra %veer %verb %wack %whey) (feck now ovo *debt:le:part)
|
2019-09-27 23:00:37 +03:00
|
|
|
:: These external events (currently only %trim) are global
|
|
|
|
:: notifications, spammed to every vane
|
|
|
|
::
|
2020-05-06 16:02:11 +03:00
|
|
|
%trim
|
2019-10-02 00:07:08 +03:00
|
|
|
=> .(ovo ;;((pair wire [%trim p=@ud]) ovo))
|
2020-05-06 16:02:11 +03:00
|
|
|
=^ zef vanes loop:(spam:(lead now ~) ovo)
|
2019-10-02 00:07:08 +03:00
|
|
|
:: clear compiler caches if high-priority
|
|
|
|
::
|
|
|
|
=? vanes =(0 p.q.ovo)
|
|
|
|
~> %slog.[0 leaf+"arvo: trim: clearing caches"]
|
|
|
|
(turn vanes |=([a=@tas =vane] [a vase.vane *worm]))
|
2020-05-06 16:02:11 +03:00
|
|
|
?: ?=(%& -.zef)
|
2020-05-06 19:33:42 +03:00
|
|
|
[p.zef arvo]
|
2020-05-06 16:02:11 +03:00
|
|
|
(feck now [fec nub]:p.zef)
|
2020-02-11 08:51:46 +03:00
|
|
|
:: Error notifications are unwrapped and routed as usual
|
|
|
|
::
|
2020-05-06 16:02:11 +03:00
|
|
|
%crud
|
2020-02-11 08:51:46 +03:00
|
|
|
?. ?=(^ q.q.ovo)
|
|
|
|
~|([%unknown-crud q.ovo] !!)
|
|
|
|
::
|
2020-05-06 16:02:11 +03:00
|
|
|
%+ leap now
|
|
|
|
?@ -.q.q.ovo
|
|
|
|
:: legacy %crud, directly routed
|
2020-02-11 08:51:46 +03:00
|
|
|
::
|
2020-05-06 16:02:11 +03:00
|
|
|
(poke:(lead now ~) (dint p.ovo) ovo)
|
|
|
|
:: modern %crud, unwrapped and routed w/ $goof
|
2020-02-11 08:51:46 +03:00
|
|
|
::
|
2020-05-06 16:02:11 +03:00
|
|
|
=/ =goof ;;(goof -.q.q.ovo)
|
|
|
|
=/ =curd ;;(curd +.q.q.ovo)
|
|
|
|
(crud:(lead now ~) (dint p.ovo) goof p.ovo curd)
|
|
|
|
==
|
|
|
|
:: +lead: initialize +le core
|
|
|
|
::
|
|
|
|
++ lead
|
|
|
|
|= [now=@da nub=(unit debt:le:part)]
|
|
|
|
^+ le:part
|
2020-05-06 19:33:42 +03:00
|
|
|
~| lead+.?(nub)
|
2020-05-06 16:02:11 +03:00
|
|
|
=; el
|
|
|
|
?~ nub el
|
|
|
|
(abed:el u.nub)
|
|
|
|
~(. le:part our now eny lac vil (~(gas by *(map term vane)) vanes))
|
|
|
|
:: +leap: run vane loop and handle effects
|
|
|
|
::
|
|
|
|
++ leap
|
|
|
|
|= [now=@da el=_le:part]
|
2020-05-06 19:33:42 +03:00
|
|
|
^- [(list ovum) *]
|
|
|
|
~| %leap
|
2020-05-06 16:02:11 +03:00
|
|
|
=^ zef vanes loop:el
|
|
|
|
?: ?=(%& -.zef)
|
2020-05-06 19:33:42 +03:00
|
|
|
[p.zef arvo]
|
2020-05-06 16:02:11 +03:00
|
|
|
(feck now [fec nub]:p.zef)
|
2020-05-07 11:51:08 +03:00
|
|
|
:: +whey: report memory usage
|
|
|
|
::
|
|
|
|
++ whey
|
|
|
|
|= now=@da
|
|
|
|
^- mass
|
|
|
|
:+ %arvo %|
|
|
|
|
:~ hoon+&+pit
|
|
|
|
zuse+&+bud
|
|
|
|
vane+|+whey:(lead now ~)
|
|
|
|
==
|
2020-05-06 16:02:11 +03:00
|
|
|
:: +feck: handle an effect from a vane
|
2017-11-18 02:14:56 +03:00
|
|
|
::
|
2018-12-05 10:34:45 +03:00
|
|
|
++ feck
|
2020-05-06 16:02:11 +03:00
|
|
|
|= [now=@da ovo=ovum nub=debt:le:part]
|
2020-05-06 19:33:42 +03:00
|
|
|
^- [(list ovum) *]
|
|
|
|
~| feck+-.q.ovo
|
2020-05-06 16:02:11 +03:00
|
|
|
?: ?=(%lyra -.q.ovo)
|
2020-05-09 15:09:26 +03:00
|
|
|
(vega now nub ;;([(unit @) @] +.q.ovo))
|
2020-05-06 16:02:11 +03:00
|
|
|
?+ -.q.ovo ~|(bad-fec+-.q.ovo !!)
|
2020-05-07 11:51:08 +03:00
|
|
|
:: produce memory usage report
|
|
|
|
::
|
|
|
|
%whey
|
|
|
|
=. out.nub [[p.ovo mass+(whey now)] out.nub]
|
|
|
|
(leap now (lead now `nub))
|
2020-05-06 16:02:11 +03:00
|
|
|
:: %verb: toggle event verbose event printfs
|
2018-12-05 10:34:45 +03:00
|
|
|
::
|
|
|
|
%verb
|
2020-05-07 11:51:08 +03:00
|
|
|
=. lac !lac
|
|
|
|
(leap now (lead now `nub))
|
2020-05-06 16:02:11 +03:00
|
|
|
:: %veer: install %zuse or vane
|
2018-12-05 10:34:45 +03:00
|
|
|
::
|
|
|
|
%veer
|
2020-05-06 16:02:11 +03:00
|
|
|
=. soul (veer our now q.ovo)
|
|
|
|
(leap now (lead now `nub))
|
|
|
|
:: %wack: add entropy
|
2018-12-05 23:50:28 +03:00
|
|
|
::
|
|
|
|
%wack
|
|
|
|
?> ?=(@ q.q.ovo)
|
2018-12-07 03:51:52 +03:00
|
|
|
=. eny (shaz (cat 3 eny q.q.ovo))
|
2020-05-06 16:02:11 +03:00
|
|
|
(leap now (lead now `nub))
|
2018-12-05 10:34:45 +03:00
|
|
|
==
|
2020-05-06 16:02:11 +03:00
|
|
|
:: +vega: reboot kernel
|
2019-01-18 08:37:34 +03:00
|
|
|
::
|
2020-05-06 16:02:11 +03:00
|
|
|
++ vega
|
2018-12-05 20:28:46 +03:00
|
|
|
|= $: :: now: current date
|
2020-05-06 16:02:11 +03:00
|
|
|
:: nub: vane continuation state
|
2020-05-09 15:09:26 +03:00
|
|
|
:: hun: hoon.hoon source, or ~ if unchanged
|
2018-12-05 20:28:46 +03:00
|
|
|
:: arv: arvo.hoon source
|
|
|
|
::
|
|
|
|
now=@da
|
2020-05-06 16:02:11 +03:00
|
|
|
nub=debt:le:part
|
2020-05-09 15:09:26 +03:00
|
|
|
hun=(unit @t)
|
2018-12-05 20:28:46 +03:00
|
|
|
van=@t
|
|
|
|
==
|
|
|
|
:: produce a new kernel and an effect list
|
|
|
|
::
|
2020-05-06 19:33:42 +03:00
|
|
|
^- [(list ovum) *]
|
2020-05-09 15:09:26 +03:00
|
|
|
:: go metacircular as hint to vere to run in new memory arena
|
2018-12-05 20:28:46 +03:00
|
|
|
::
|
2020-05-09 15:09:26 +03:00
|
|
|
=; res ?-(-.res %& p.res, %| (mean leaf+"vega: ruin" p.res))
|
|
|
|
%- mule |.
|
|
|
|
:: obtain hoon compiler data
|
2018-12-05 20:28:46 +03:00
|
|
|
::
|
2020-05-09 15:09:26 +03:00
|
|
|
:: Arvo is compiled against the hoon.hoon vase with its outer +ride
|
|
|
|
:: gate stripped off, leaving the main core.
|
2018-12-05 20:28:46 +03:00
|
|
|
::
|
2020-05-09 15:09:26 +03:00
|
|
|
:: hyp: hoon core type
|
|
|
|
:: hoc: hoon core
|
|
|
|
:: cop: compiler gate
|
|
|
|
:: lod: can we use the +load arm? (language-compatible upgrade)
|
2018-12-05 20:28:46 +03:00
|
|
|
::
|
2020-05-09 15:09:26 +03:00
|
|
|
=/ [hyp=* hoc=* cop=* lod=?]
|
|
|
|
:: if no new hoon.hoon source, use current compiler
|
|
|
|
::
|
|
|
|
?~ hun
|
|
|
|
[-:!>(+>:ride) +>:ride ride &]
|
|
|
|
:: compile new hoon.hoon source with the current compiler
|
|
|
|
::
|
|
|
|
=/ raw
|
|
|
|
~> %slog.[0 leaf+"vega: compiling hoon"]
|
2020-06-19 07:44:17 +03:00
|
|
|
(road |.((ride %noun u.hun)))
|
2020-05-09 15:09:26 +03:00
|
|
|
:: activate the new compiler gate, producing +ride
|
|
|
|
::
|
|
|
|
=/ cop .*(0 +.raw)
|
|
|
|
:: find the hoon version number of the new kernel
|
|
|
|
::
|
|
|
|
=/ nex
|
|
|
|
(@ .*(cop q:(~(mint ut p.raw) %noun [%limb %hoon-version])))
|
|
|
|
?> |(=(nex hoon-version) =(+(nex) hoon-version))
|
|
|
|
:: if we're upgrading language versions, recompile the compiler
|
|
|
|
::
|
2020-06-13 07:38:50 +03:00
|
|
|
=^ hot=* cop
|
|
|
|
?: =(nex hoon-version)
|
|
|
|
[raw cop]
|
|
|
|
~> %slog.[0 leaf+"vega: recompiling hoon {<nex>}k"]
|
|
|
|
~& [%hoon-compile-upgrade nex]
|
2020-06-19 07:44:17 +03:00
|
|
|
%- road |.
|
2020-06-13 07:38:50 +03:00
|
|
|
=/ hot (slum cop [%noun hun])
|
|
|
|
[hot .*(0 +.hot)]
|
2020-05-09 15:09:26 +03:00
|
|
|
:: extract the hoon core from the outer gate (+ride)
|
|
|
|
::
|
|
|
|
=/ hoc .*(cop [%0 7])
|
|
|
|
:: compute the type of the hoon.hoon core
|
|
|
|
::
|
|
|
|
=/ hyp -:(slum cop [-.hot '+>'])
|
|
|
|
::
|
|
|
|
[hyp hoc cop =(nex hoon-version)]
|
2018-12-05 20:28:46 +03:00
|
|
|
:: compile arvo
|
|
|
|
::
|
|
|
|
=/ rav
|
2020-05-08 09:18:24 +03:00
|
|
|
~> %slog.[0 leaf+"vega: compiling kernel {(scow %p (mug hyp))}"]
|
2020-06-19 07:44:17 +03:00
|
|
|
%- road |.
|
2018-12-09 05:42:36 +03:00
|
|
|
(slum cop [hyp van])
|
2018-12-05 20:48:27 +03:00
|
|
|
:: activate arvo, and extract the arvo core from the outer gate
|
2018-12-05 20:28:46 +03:00
|
|
|
::
|
2020-05-08 09:18:24 +03:00
|
|
|
~> %slog.[0 leaf+"vega: extracting core"]
|
2018-12-05 20:48:27 +03:00
|
|
|
=/ voc .*(hoc [%7 +.rav %0 7])
|
2018-12-05 20:28:46 +03:00
|
|
|
:: entry gate: ++load for the normal case, ++come for upgrade
|
|
|
|
::
|
|
|
|
=/ gat
|
2020-05-09 15:09:26 +03:00
|
|
|
=/ arm ?:(lod 'load' 'come')
|
2020-05-08 09:18:24 +03:00
|
|
|
~> %slog.[0 leaf+"vega: +{(trip arm)}"]
|
2018-12-05 20:48:27 +03:00
|
|
|
:: compute the type of the arvo.hoon core
|
|
|
|
::
|
2018-12-09 05:42:36 +03:00
|
|
|
=/ vip -:(slum cop [-.rav '+>'])
|
2018-12-05 20:48:27 +03:00
|
|
|
:: compute the formula for the upgrade gate
|
|
|
|
::
|
2018-12-09 05:42:36 +03:00
|
|
|
=/ fol +:(slum cop [vip arm])
|
2018-12-05 20:48:27 +03:00
|
|
|
:: produce the upgrade gate
|
|
|
|
::
|
|
|
|
.*(voc fol)
|
2018-12-06 04:58:41 +03:00
|
|
|
:: upgrade gate sample
|
2018-12-05 20:28:46 +03:00
|
|
|
::
|
|
|
|
=/ sam
|
2018-12-06 04:58:41 +03:00
|
|
|
:* our
|
|
|
|
now
|
|
|
|
eny
|
2020-06-28 08:13:42 +03:00
|
|
|
[%~2020.6.28 nub]
|
2018-12-06 09:10:24 +03:00
|
|
|
bud
|
2018-12-06 04:58:41 +03:00
|
|
|
(turn vanes |=([label=@tas =vane] [label vase.vane]))
|
|
|
|
==
|
2018-12-05 20:28:46 +03:00
|
|
|
:: call into the new kernel
|
|
|
|
::
|
2020-05-08 09:18:24 +03:00
|
|
|
~> %slog.[0 leaf+"vega: evolving"]
|
|
|
|
~< %slog.[0 leaf+"vega: evolution"]
|
2018-12-09 05:42:36 +03:00
|
|
|
=/ out (slum gat sam)
|
2019-02-01 10:37:00 +03:00
|
|
|
:: add types to the product
|
2018-12-05 20:28:46 +03:00
|
|
|
::
|
2020-05-06 19:33:42 +03:00
|
|
|
;;([(list ovum) *] out)
|
2018-12-06 04:58:41 +03:00
|
|
|
:: +veer: install %zuse or a vane
|
2017-09-28 03:27:08 +03:00
|
|
|
::
|
2018-12-06 04:58:41 +03:00
|
|
|
:: Identity is in the sample so the larval stage
|
2020-05-08 13:02:54 +03:00
|
|
|
:: can use this too.
|
2018-12-05 20:28:46 +03:00
|
|
|
::
|
2018-12-06 04:58:41 +03:00
|
|
|
++ veer
|
|
|
|
|= [who=ship now=@da fav=curd]
|
2020-05-06 16:02:11 +03:00
|
|
|
^+ soul
|
2020-05-08 13:02:54 +03:00
|
|
|
=> .(fav ;;([%veer lal=@tas pax=path txt=@t] fav))
|
2020-05-09 15:09:26 +03:00
|
|
|
=; res ?-(-.res %& p.res, %| (mean leaf+"veer: {<lal.fav>}" p.res))
|
|
|
|
%- mule |.
|
2017-09-28 03:27:08 +03:00
|
|
|
?: =(%$ lal.fav)
|
2020-05-06 19:33:42 +03:00
|
|
|
~> %slog.[0 leaf+"zuse: {(scow p+(mug txt.fav))}"]
|
2017-09-28 03:27:08 +03:00
|
|
|
=+ gen=(rain pax.fav txt.fav)
|
|
|
|
=+ vax=(slap pit gen)
|
2020-05-06 16:02:11 +03:00
|
|
|
soul(bud vax)
|
|
|
|
%_ soul
|
2018-12-01 02:58:56 +03:00
|
|
|
vanes
|
|
|
|
|- ^+ vanes
|
|
|
|
?~ vanes
|
2020-05-08 09:18:24 +03:00
|
|
|
~> %slog.[0 leaf+"vane: {<lal.fav>} {(scow p+(mug txt.fav))}"]
|
2020-05-08 13:02:54 +03:00
|
|
|
=/ vin (vint who lal.fav vil bud pax.fav txt.fav)
|
|
|
|
[[lal.fav vane.vin] vanes]
|
2018-12-01 02:58:56 +03:00
|
|
|
?. =(lal.fav label.i.vanes)
|
|
|
|
[i.vanes $(vanes t.vanes)]
|
2020-05-08 09:18:24 +03:00
|
|
|
~> %slog.[0 leaf+"vane: {<lal.fav>} {(scow p+(mug txt.fav))}"]
|
2018-12-01 02:58:56 +03:00
|
|
|
:_ t.vanes
|
|
|
|
:- label.i.vanes
|
2020-05-09 15:09:26 +03:00
|
|
|
~| [%failed-vane-activation lal.fav]
|
2020-05-06 16:02:11 +03:00
|
|
|
=< vane
|
|
|
|
%. [pax txt]:fav
|
|
|
|
ruck:(vent who lal.fav vil bud [vase.vane.i.vanes *worm])
|
2017-09-28 03:27:08 +03:00
|
|
|
==
|
2020-05-06 16:02:11 +03:00
|
|
|
:: +wish: external compute
|
2017-09-28 03:27:08 +03:00
|
|
|
::
|
2020-05-06 16:02:11 +03:00
|
|
|
++ wish
|
2018-12-06 09:10:24 +03:00
|
|
|
|= txt/@
|
2017-09-28 03:27:08 +03:00
|
|
|
q:(slap bud (ream txt))
|
|
|
|
--
|