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.
|
|
|
|
::
|
2020-11-15 11:56:52 +03:00
|
|
|
|= [now=@da ovo=ovum]
|
2018-12-06 23:32:42 +03:00
|
|
|
^- *
|
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 ::::::
|
|
|
|
:::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
2020-12-03 03:16:59 +03:00
|
|
|
=> ..ride
|
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
|
|
|
|
::
|
2020-11-21 23:59:39 +03:00
|
|
|
++ arvo %arvo-kelvin
|
|
|
|
::
|
2020-11-22 01:23:05 +03:00
|
|
|
:: $arch: node identity
|
|
|
|
:: $axal: fundamental node, recursive
|
|
|
|
:: $axil: fundamental node
|
2020-02-07 21:33:49 +03:00
|
|
|
:: $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
|
2020-11-24 00:06:50 +03:00
|
|
|
:: $gang: infinite set of peers
|
2020-02-07 21:33:49 +03:00
|
|
|
:: $mark: symbolic content type
|
2020-11-26 06:32:18 +03:00
|
|
|
:: $mien: orientation
|
2020-11-24 00:06:50 +03:00
|
|
|
:: +omen: namespace path and data
|
2020-02-07 21:33:49 +03:00
|
|
|
:: $ship: network identity
|
|
|
|
:: $sink: subscription
|
|
|
|
::
|
2020-11-22 01:23:05 +03:00
|
|
|
+$ arch (axil @uvI)
|
|
|
|
++ axal
|
|
|
|
|$ [item]
|
|
|
|
[fil=(unit item) dir=(map @ta $)] ::
|
|
|
|
++ axil
|
|
|
|
|$ [item]
|
|
|
|
[fil=(unit item) dir=(map @ta ~)]
|
|
|
|
::
|
2020-02-07 21:33:49 +03:00
|
|
|
+$ beak (trel ship desk case)
|
2020-11-24 00:06:50 +03:00
|
|
|
+$ beam [beak s=path]
|
2020-02-07 21:33:49 +03:00
|
|
|
+$ 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)
|
2020-11-24 00:06:50 +03:00
|
|
|
+$ gang (unit (set ship))
|
2020-02-07 21:33:49 +03:00
|
|
|
+$ mark @tas
|
2020-11-26 06:32:18 +03:00
|
|
|
+$ mein [our=ship now=@da eny=@uvJ]
|
2020-11-24 00:06:50 +03:00
|
|
|
++ omen |$ [a] (pair path (cask a))
|
2020-02-07 21:33:49 +03:00
|
|
|
+$ 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-12-03 00:52:49 +03:00
|
|
|
:: $card: tagged, untyped event
|
2020-02-07 21:33:49 +03:00
|
|
|
:: $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
|
2020-11-24 00:06:50 +03:00
|
|
|
:: $roof: namespace
|
2020-12-06 13:55:19 +03:00
|
|
|
:: $rook: meta-namespace (super advanced)
|
2020-11-24 00:06:50 +03:00
|
|
|
:: +room: generic namespace
|
2020-12-06 13:55:19 +03:00
|
|
|
:: $root: raw namespace
|
2020-02-07 21:33:49 +03:00
|
|
|
:: +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-12-03 00:52:49 +03:00
|
|
|
+$ card (cask)
|
2020-02-07 21:33:49 +03:00
|
|
|
+$ 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-12-03 00:52:49 +03:00
|
|
|
+$ ovum [=wire =card]
|
2020-02-07 21:33:49 +03:00
|
|
|
::
|
2020-11-24 00:06:50 +03:00
|
|
|
+$ roof (room vase) :: namespace
|
|
|
|
+$ rook (room meta) :: meta-namespace
|
|
|
|
++ room :: either namespace
|
|
|
|
|$ [a]
|
|
|
|
$~ =>(~ |~(* ~))
|
|
|
|
$- $: lyc=gang :: leakset
|
|
|
|
cyr=term :: perspective
|
|
|
|
bem=beam :: path
|
|
|
|
== ::
|
|
|
|
%- unit :: ~: unknown
|
|
|
|
%- unit :: ~ ~: invalid
|
|
|
|
(cask a)
|
2020-12-06 13:55:19 +03:00
|
|
|
+$ root $-(^ (unit (unit)))
|
2020-02-07 21:33:49 +03:00
|
|
|
::
|
|
|
|
++ 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
|
|
|
|
::
|
2020-11-13 23:35:01 +03:00
|
|
|
:: $debt: ephemeral state
|
2020-11-26 06:32:18 +03:00
|
|
|
:: $grub: persistent state, larval stage
|
2020-11-13 23:35:01 +03:00
|
|
|
:: $germ: worklist source and bar stack
|
|
|
|
:: $heir: upgradeable state
|
|
|
|
:: $plan: worklist
|
|
|
|
:: $soul: persistent state
|
2020-02-07 21:33:49 +03:00
|
|
|
:: $vane: kernel module
|
2020-11-18 02:04:26 +03:00
|
|
|
:: $vere: runtime version
|
2020-02-07 21:33:49 +03:00
|
|
|
:: $vile: reflexive constants
|
2020-11-26 06:32:18 +03:00
|
|
|
:: $waif: arvo task, from anywhere
|
|
|
|
:: $wasp: arvo task, from Outside
|
2020-12-05 13:32:54 +03:00
|
|
|
:: $worm: compiler cache
|
2020-11-26 06:32:18 +03:00
|
|
|
:: $wisp: arvo task, larval stage
|
2020-11-18 02:04:26 +03:00
|
|
|
:: $wynn: kelvin stack
|
2020-11-13 23:35:01 +03:00
|
|
|
::
|
|
|
|
+$ debt
|
|
|
|
$: :: run: list of worklists
|
|
|
|
:: out: pending output
|
2020-11-19 10:44:28 +03:00
|
|
|
:: kel: kernel files
|
|
|
|
:: fil: pending files
|
2020-11-13 23:35:01 +03:00
|
|
|
::
|
|
|
|
run=(list plan)
|
|
|
|
out=(list ovum)
|
2020-11-19 10:44:28 +03:00
|
|
|
kel=(list (pair path (cask)))
|
|
|
|
fil=(list (pair path (cask)))
|
2020-11-13 23:35:01 +03:00
|
|
|
==
|
|
|
|
+$ germ [vane=term bars=(list duct)]
|
2020-11-26 06:32:18 +03:00
|
|
|
+$ grub
|
|
|
|
$: :: who: identity once we know it
|
|
|
|
:: eny: entropy once we learn it
|
2020-12-03 03:16:59 +03:00
|
|
|
:: lac: laconicity as we want it
|
|
|
|
:: ver: the Outside as we see it
|
|
|
|
:: fat: source when we attain it
|
|
|
|
:: lul: %lull when we acquire it
|
|
|
|
:: zus: %zuse once we receive it
|
|
|
|
:: van: vanes while we desire it
|
2020-11-26 06:32:18 +03:00
|
|
|
::
|
|
|
|
who=(unit ship)
|
|
|
|
eny=(unit @)
|
|
|
|
lac=?
|
|
|
|
ver=(unit vere)
|
|
|
|
fat=(unit (axal (cask)))
|
2020-12-03 03:16:59 +03:00
|
|
|
lul=(unit (trap vase))
|
|
|
|
zus=(unit (trap vase))
|
2020-11-26 06:32:18 +03:00
|
|
|
van=(map term (trap vase))
|
|
|
|
==
|
2020-11-13 23:35:01 +03:00
|
|
|
+$ heir
|
2020-11-26 06:32:18 +03:00
|
|
|
$% [%grub _arvo =grub]
|
|
|
|
[_arvo =debt =soul]
|
2020-11-13 23:35:01 +03:00
|
|
|
==
|
|
|
|
+$ plan (pair germ (list move))
|
|
|
|
+$ soul
|
2020-11-26 06:32:18 +03:00
|
|
|
$: :: identity, time, entropy
|
|
|
|
:: fad: configuration
|
|
|
|
:: zen: Outside knowledge
|
|
|
|
:: mod: internal modules
|
|
|
|
::
|
|
|
|
mein
|
|
|
|
$= fad
|
|
|
|
$: :: lac: not verbose
|
|
|
|
::
|
|
|
|
lac=?
|
|
|
|
==
|
|
|
|
$= zen
|
|
|
|
$: :: ver: runtime version
|
|
|
|
:: lag: upgrade blocked
|
|
|
|
::
|
|
|
|
ver=vere
|
|
|
|
lag=_|
|
|
|
|
==
|
|
|
|
$= mod
|
|
|
|
$: :: fat: filesystem
|
2020-12-03 03:16:59 +03:00
|
|
|
:: lul: %lull
|
2020-11-26 06:32:18 +03:00
|
|
|
:: zus: %zuse
|
|
|
|
:: van: vanes
|
|
|
|
::
|
|
|
|
fat=(axal (cask))
|
2020-12-03 03:16:59 +03:00
|
|
|
lul=vase
|
2020-11-26 06:32:18 +03:00
|
|
|
zus=vase
|
|
|
|
van=(map term vane)
|
|
|
|
==
|
2020-11-13 23:35:01 +03:00
|
|
|
==
|
2018-12-01 02:07:08 +03:00
|
|
|
+$ vane [=vase =worm]
|
2020-12-06 14:23:26 +03:00
|
|
|
+$ vere [[non=@ta rev=path] kel=wynn]
|
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
|
|
|
==
|
2020-11-26 06:32:18 +03:00
|
|
|
::
|
|
|
|
+$ waif
|
|
|
|
:: %trim: trim state, spam to all
|
|
|
|
:: %vega: notify vanes post upgrade
|
|
|
|
:: %what: update from files
|
|
|
|
:: %whey: produce $mass :: XX remove, scry
|
|
|
|
:: %verb: toggle laconicity
|
|
|
|
::
|
2020-12-02 22:35:29 +03:00
|
|
|
$% [%trim p=@ud]
|
2020-11-26 06:32:18 +03:00
|
|
|
[%vega ~]
|
|
|
|
[%what p=(list (pair path (cask)))]
|
|
|
|
[%whey ~]
|
|
|
|
[%verb p=(unit ?)]
|
|
|
|
==
|
|
|
|
+$ wasp
|
|
|
|
:: %crud: reroute $ovum with $goof
|
|
|
|
:: %wack: iterate entropy
|
|
|
|
:: %wyrd: check/record runtime kelvin stack
|
|
|
|
::
|
|
|
|
$% [%crud =goof =ovum]
|
|
|
|
[%wack p=@uvJ]
|
|
|
|
[%wyrd p=vere]
|
|
|
|
==
|
2020-12-05 13:32:54 +03:00
|
|
|
+$ worm
|
|
|
|
$: :: +nest, +play, and +mint
|
|
|
|
::
|
|
|
|
nes=(set ^)
|
|
|
|
pay=(map (pair type hoon) type)
|
|
|
|
mit=(map (pair type hoon) (pair type nock))
|
|
|
|
==
|
2020-11-26 06:32:18 +03:00
|
|
|
+$ wisp
|
2020-12-02 22:35:29 +03:00
|
|
|
$% $>(?(%verb %what) waif)
|
2020-11-26 06:32:18 +03:00
|
|
|
$>(?(%wack %wyrd) wasp)
|
|
|
|
[%whom p=ship]
|
|
|
|
==
|
2020-11-18 02:04:26 +03:00
|
|
|
+$ wynn (list (pair term @ud))
|
2020-11-26 06:32:18 +03:00
|
|
|
-- =>
|
|
|
|
::
|
2020-05-06 19:33:42 +03:00
|
|
|
~% %hex ..ut ~
|
2018-02-01 02:36:48 +03:00
|
|
|
|%
|
|
|
|
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
|
|
|
:: section 3bE, Arvo core ::
|
|
|
|
::
|
2020-11-24 00:06:50 +03:00
|
|
|
++ en-beam
|
|
|
|
|=(b=beam =*(s scot `path`[(s %p p.b) q.b (s r.b) s.b]))
|
|
|
|
::
|
|
|
|
++ de-beam
|
|
|
|
|= p=path
|
|
|
|
^- (unit beam)
|
|
|
|
?. ?=([@ @ @ *] p) ~
|
|
|
|
?~ who=(slaw %p i.p) ~
|
|
|
|
?~ des=?~(i.t.p (some %$) (slaw %tas i.t.p)) ~ :: XX +sym ;~(pose low (easy %$))
|
|
|
|
?~ ved=(slay i.t.t.p) ~
|
|
|
|
?. ?=([%$ case] u.ved) ~
|
|
|
|
`(unit beam)`[~ [`ship`u.who `desk`u.des `case`p.u.ved] t.t.t.p]
|
|
|
|
::
|
2020-12-06 13:55:19 +03:00
|
|
|
++ look
|
|
|
|
~/ %look
|
|
|
|
|= [rof=roof lyc=gang]
|
|
|
|
^- root
|
|
|
|
~/ %in
|
2020-11-26 17:09:31 +03:00
|
|
|
|= [ref=* raw=*]
|
2020-12-06 13:55:19 +03:00
|
|
|
?~ pax=((soft path) raw) ~
|
|
|
|
?~ u.pax ~
|
|
|
|
=* cyr i.u.pax
|
|
|
|
?~ bem=(de-beam t.u.pax) ~
|
|
|
|
?. ((sane %tas) cyr) ~
|
|
|
|
?~ dat=(rof lyc cyr u.bem) ~
|
|
|
|
?~ u.dat [~ ~]
|
|
|
|
=* vax q.u.u.dat
|
|
|
|
?. ?& ?=(^ ref)
|
|
|
|
=(hoon-version -.ref)
|
|
|
|
-:(~(nets wa *worm) +.ref p.vax)
|
2019-08-29 01:39:04 +03:00
|
|
|
==
|
|
|
|
~>(%slog.[0 leaf+"arvo: scry-lost"] ~)
|
2020-12-06 13:55:19 +03:00
|
|
|
[~ ~ q.vax]
|
2020-12-06 14:23:26 +03:00
|
|
|
:: |wyrd: kelvin negotiation
|
2020-11-18 02:04:26 +03:00
|
|
|
::
|
|
|
|
:: specified but unimplemented:
|
|
|
|
:: arvo should produce a [wend/wynn] effect
|
|
|
|
:: to signal downgrade
|
|
|
|
::
|
|
|
|
++ wyrd
|
2020-12-06 14:23:26 +03:00
|
|
|
|%
|
|
|
|
:: +sane: kelvin stack for validity
|
2020-11-18 02:04:26 +03:00
|
|
|
::
|
2020-12-06 14:23:26 +03:00
|
|
|
++ sane
|
|
|
|
|= kel=wynn
|
|
|
|
^- ?
|
|
|
|
&
|
|
|
|
:: ?: =(~ kel) &
|
|
|
|
:: =^ las=(pair term @ud) kel kel
|
|
|
|
:: |- ^- ?
|
|
|
|
:: ?~ kel &
|
|
|
|
:: ?& (gte q.las q.i.kel)
|
|
|
|
:: $(las i.kel, kel t.kel)
|
|
|
|
:: ==
|
|
|
|
:: +need: require kelvins
|
2020-11-18 02:04:26 +03:00
|
|
|
::
|
2020-12-06 14:23:26 +03:00
|
|
|
++ need
|
|
|
|
|= [run=wynn hav=wynn]
|
|
|
|
:: wyr: ~: runtime supports all required kelvins
|
|
|
|
:: ^: runtime support is missing or lagging
|
|
|
|
::
|
|
|
|
=; wyr !.
|
|
|
|
?~ wyr
|
|
|
|
same
|
|
|
|
~& wyrd=wyr
|
|
|
|
~_ :+ %rose
|
|
|
|
[" " ~ ~]
|
|
|
|
:~ =+ p.u.wyr
|
|
|
|
leaf/"%{(trip p)} %{(scow %ud q)} required;"
|
|
|
|
?~ q.u.wyr
|
|
|
|
leaf/"runtime missing support"
|
|
|
|
leaf/"runtime only supports %{(scow %ud u.q.u.wyr)}"
|
|
|
|
==
|
|
|
|
~> %mean.'arvo: upgrade blocked'
|
|
|
|
~> %mean.'wyrd'
|
|
|
|
!!
|
|
|
|
::
|
|
|
|
|- ^- (unit (pair (pair term @ud) (unit @ud)))
|
|
|
|
?~ hav ~
|
|
|
|
::
|
|
|
|
:: fel: %&: runtime kelvin for [i.hav]
|
|
|
|
:: %|: no specified runtime support
|
|
|
|
::
|
|
|
|
=/ fel
|
|
|
|
|- ^- (each @ud (pair term @ud))
|
|
|
|
?~ run |/i.hav
|
|
|
|
?:(=(p.i.hav p.i.run) &/q.i.run $(run t.run))
|
|
|
|
::
|
|
|
|
?- -.fel
|
|
|
|
%| `[p.fel ~]
|
|
|
|
%& ?.((lte p.fel q.i.hav) `[i.hav `p.fel] $(hav t.hav))
|
|
|
|
==
|
|
|
|
--
|
2020-11-22 01:23:05 +03:00
|
|
|
::
|
|
|
|
:: |de: axal engine
|
|
|
|
::
|
|
|
|
++ de
|
|
|
|
=| fat=(axal)
|
|
|
|
|@
|
|
|
|
::
|
|
|
|
++ get
|
|
|
|
|= pax=path
|
|
|
|
^+ fat
|
|
|
|
?~ pax fat
|
|
|
|
=/ kid (~(get by dir.fat) i.pax)
|
|
|
|
?~ kid [~ ~]
|
|
|
|
$(fat u.kid, pax t.pax)
|
|
|
|
::
|
|
|
|
++ put
|
|
|
|
|* [pax=path dat=*]
|
|
|
|
=> .(dat `_?>(?=(^ fil.fat) u.fil.fat)`dat)
|
|
|
|
^+ fat
|
|
|
|
?~ pax fat(fil `dat)
|
|
|
|
=/ kid (~(get by dir.fat) i.pax)
|
|
|
|
=/ new (fall kid fat(fil ~, dir ~))
|
|
|
|
fat(dir (~(put by dir.fat) i.pax $(fat new, pax t.pax)))
|
|
|
|
::
|
|
|
|
++ gas
|
|
|
|
|= lit=(list (pair path _?>(?=(^ fil.fat) u.fil.fat)))
|
|
|
|
^+ fat
|
|
|
|
?~ lit fat
|
|
|
|
$(fat (put p.i.lit q.i.lit), lit t.lit)
|
|
|
|
::
|
|
|
|
++ tap
|
|
|
|
=| pax=path
|
|
|
|
=| out=(list (pair path _?>(?=(^ fil.fat) u.fil.fat)))
|
|
|
|
|- ^+ out
|
|
|
|
=? out ?=(^ fil.fat) :_(out [pax u.fil.fat])
|
|
|
|
=/ dir ~(tap by dir.fat)
|
|
|
|
|- ^+ out
|
|
|
|
?~ dir out
|
|
|
|
%= $
|
|
|
|
dir t.dir
|
|
|
|
out ^$(pax (weld pax /[p.i.dir]), fat q.i.dir)
|
|
|
|
==
|
|
|
|
--
|
|
|
|
::
|
2020-12-05 13:32:54 +03:00
|
|
|
++ wa :: cached compile
|
|
|
|
|_ worm
|
|
|
|
++ nell |=(ref=type (nest [%cell %noun %noun] ref)) :: nest in cell
|
|
|
|
++ nest :: nest:ut, cached
|
|
|
|
|= [sut=type ref=type]
|
|
|
|
^- [? worm]
|
|
|
|
?: (~(has in nes) [sut ref]) [& +>+<]
|
|
|
|
?. (~(nest ut sut) | ref)
|
|
|
|
~& %nest-failed
|
|
|
|
=+ foo=(skol ref)
|
|
|
|
=+ bar=(skol sut)
|
|
|
|
~& %nest-need
|
|
|
|
~> %slog.[0 bar]
|
|
|
|
~& %nest-have
|
|
|
|
~> %slog.[0 foo]
|
|
|
|
[| +>+<.$]
|
|
|
|
[& +>+<(nes (~(put in nes) [sut ref]))]
|
|
|
|
::
|
|
|
|
++ call :: call gate
|
|
|
|
|= [vax=vase nam=term som=(each vase ^)]
|
|
|
|
^- [vase worm]
|
|
|
|
=^ duf +>+<.$ (open vax nam som)
|
|
|
|
(slap duf [%limb %$])
|
|
|
|
::
|
|
|
|
++ open :: assemble door
|
|
|
|
|= [vax=vase nam=term som=(each vase ^)]
|
|
|
|
^- [vase worm]
|
|
|
|
=* key [%cncb [[%& 2] ~] [[[%& 6] ~] [%$ 3]] ~]
|
|
|
|
=^ dor +>+<.$ (slap vax [%limb nam])
|
|
|
|
=^ mes +>+<.$ (slot 6 dor)
|
|
|
|
=^ hip +>+<.$
|
|
|
|
?- -.som
|
|
|
|
%& (nest p.mes p.p.som)
|
|
|
|
%| (nets p.mes -.p.som)
|
|
|
|
==
|
|
|
|
?> hip
|
|
|
|
[[p.dor q.dor(+6 +7.som)] +>+<.$]
|
|
|
|
::
|
|
|
|
++ neat :: type compliance
|
|
|
|
|= [typ=type som=(each vase ^)]
|
|
|
|
^- worm
|
|
|
|
=^ hip +>+<.$
|
|
|
|
?- -.som
|
|
|
|
%& (nest typ p.p.som)
|
|
|
|
%| (nets typ -.p.som)
|
|
|
|
==
|
|
|
|
?> hip
|
|
|
|
+>+<.$
|
|
|
|
::
|
|
|
|
++ nets :: typeless nest
|
|
|
|
|= [sut=* ref=*]
|
|
|
|
^- [? worm]
|
|
|
|
?: (~(has in nes) [sut ref]) [& +>+<]
|
|
|
|
=+ gat=|=([a=type b=type] (~(nest ut a) | b))
|
|
|
|
?. (? (slum gat [sut ref]))
|
|
|
|
~& %nets-failed
|
|
|
|
=+ tag=`*`skol
|
|
|
|
=+ foo=(tank (slum tag ref))
|
|
|
|
=+ bar=(tank (slum tag sut))
|
|
|
|
~& %nets-need
|
|
|
|
~> %slog.[0 bar]
|
|
|
|
~& %nets-have
|
|
|
|
~> %slog.[0 foo]
|
|
|
|
[| +>+<.$]
|
|
|
|
[& +>+<.$(nes (~(put in nes) [sut ref]))]
|
|
|
|
:: +play: +play:ut, cached
|
|
|
|
::
|
|
|
|
++ play
|
|
|
|
|= [sut=type gen=hoon]
|
|
|
|
^- [type worm]
|
|
|
|
=+ old=(~(get by pay) [sut gen])
|
|
|
|
?^ old [u.old +>+<.$]
|
|
|
|
=+ new=(~(play ut sut) gen)
|
|
|
|
[new +>+<.$(pay (~(put by pay) [sut gen] new))]
|
|
|
|
:: +mint: +mint:ut to noun, cached
|
|
|
|
::
|
|
|
|
++ mint
|
|
|
|
|= [sut=type gen=hoon]
|
|
|
|
^- [(pair type nock) worm]
|
|
|
|
=+ old=(~(get by mit) [sut gen])
|
|
|
|
?^ old [u.old +>+<.$]
|
|
|
|
=+ new=(~(mint ut sut) %noun gen)
|
|
|
|
[new +>+<.$(mit (~(put by mit) [sut gen] new))]
|
|
|
|
:: +slam: +slam:ut, cached
|
|
|
|
::
|
|
|
|
++ slam
|
|
|
|
|= [gat=vase sam=vase]
|
|
|
|
=/ sut=type [%cell p.gat p.sam]
|
|
|
|
=/ gen=hoon [%cnsg [%$ ~] [%$ 2] [%$ 3] ~]
|
|
|
|
=^ new=type +>+<.$ (play sut gen)
|
|
|
|
[[new (slum q.gat q.sam)] +>+<.$]
|
|
|
|
:: +slap: +slap:ut, cached
|
|
|
|
::
|
|
|
|
++ slap
|
|
|
|
|= [vax=vase gen=hoon]
|
|
|
|
^- [vase worm]
|
|
|
|
=^ gun +>+< (mint p.vax gen)
|
|
|
|
[[p.gun .*(q.vax q.gun)] +>+<.$]
|
|
|
|
:: +slot: +slot:ut, cached
|
|
|
|
::
|
|
|
|
++ slot
|
|
|
|
|= [axe=@ vax=vase]
|
|
|
|
^- [vase worm]
|
|
|
|
=^ gun +>+< (mint p.vax [%$ axe])
|
|
|
|
[[p.gun .*(q.vax [0 axe])] +>+<.$]
|
2020-12-07 03:58:38 +03:00
|
|
|
::
|
|
|
|
:: +slur: slam a vase with a maze
|
|
|
|
::
|
|
|
|
++ slur
|
|
|
|
|= [gat=vase sam=maze]
|
|
|
|
^- [vase worm]
|
|
|
|
=^ cur +>+<.$ (slot 6 gat)
|
|
|
|
=. +>+<.$ (neat p.cur sam)
|
|
|
|
(slym gat q.p.sam)
|
2020-12-05 13:32:54 +03:00
|
|
|
:: +slym: +slym:ut, cached
|
|
|
|
::
|
|
|
|
++ slym
|
|
|
|
|= [gat=vase sam=*]
|
|
|
|
^- [vase worm]
|
|
|
|
(slap gat(+<.q sam) [%limb %$])
|
|
|
|
::
|
|
|
|
++ sped :: specialize vase
|
|
|
|
|= vax=vase
|
|
|
|
^- [vase worm]
|
|
|
|
=+ ^= gen ^- hoon
|
|
|
|
?@ q.vax [%wtts [%base [%atom %$]] [%& 1]~]
|
|
|
|
?@ -.q.vax [%wtts [%leaf %tas -.q.vax] [%& 2]~]
|
|
|
|
[%wtts [%base %cell] [%& 1]~]
|
|
|
|
=^ typ +>+<.$ (play p.vax [%wtgr gen [%$ 1]])
|
|
|
|
[[typ q.vax] +>+<.$]
|
|
|
|
::
|
|
|
|
++ spot :: slot then sped
|
|
|
|
|= [axe=@ vax=vase]
|
|
|
|
^- [vase worm]
|
|
|
|
=^ xav +>+< (slot axe vax)
|
|
|
|
(sped xav)
|
|
|
|
::
|
|
|
|
++ stop :: sped then slot
|
|
|
|
|= [axe=@ vax=vase]
|
|
|
|
^- [vase worm]
|
|
|
|
=^ xav +>+< (sped vax)
|
|
|
|
(slot axe xav)
|
|
|
|
--
|
|
|
|
::
|
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
|
2020-11-19 10:44:28 +03:00
|
|
|
:: $hoof: hoon source
|
|
|
|
:: $news: collated updates
|
2020-11-26 06:32:18 +03:00
|
|
|
:: $oped: module updates
|
2020-12-03 00:52:49 +03:00
|
|
|
:: $seed: next kernel source
|
2020-02-07 21:33:49 +03:00
|
|
|
::
|
2020-11-19 10:44:28 +03:00
|
|
|
+$ hoof @t
|
|
|
|
+$ news
|
|
|
|
$: :: sys: installs + replacements
|
|
|
|
:: use: non-system files
|
|
|
|
::
|
|
|
|
sys=(map path (cask))
|
|
|
|
use=(map path (cask))
|
|
|
|
==
|
2020-11-26 06:32:18 +03:00
|
|
|
+$ oped
|
2020-12-03 03:16:59 +03:00
|
|
|
$: lul=(unit hoof)
|
|
|
|
zus=(unit hoof)
|
2020-11-19 10:44:28 +03:00
|
|
|
van=(list (cask hoof))
|
|
|
|
==
|
2020-11-26 06:32:18 +03:00
|
|
|
+$ seed [hun=(unit hoof) arv=hoof]
|
2020-02-07 21:33:49 +03:00
|
|
|
--
|
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
|
|
|
|%
|
|
|
|
::
|
|
|
|
+| %engines
|
|
|
|
::
|
2020-11-19 10:44:28 +03:00
|
|
|
:: |adapt
|
|
|
|
::
|
|
|
|
++ adapt
|
|
|
|
=> |%
|
|
|
|
:: deep file as source
|
|
|
|
::
|
|
|
|
++ sole |=(a=(cask) `hoof`?>(?=([%hoon @t] a) q.a))
|
|
|
|
--
|
2020-11-22 01:23:05 +03:00
|
|
|
|_ fat=(axal (cask))
|
2020-11-19 10:44:28 +03:00
|
|
|
::
|
|
|
|
:: +group: collate changes
|
|
|
|
::
|
|
|
|
++ group
|
|
|
|
|= fal=(list (pair path (cask)))
|
|
|
|
=| del=news
|
|
|
|
|- ^+ del
|
|
|
|
?~ fal del
|
|
|
|
:: classify files, ignoring unchanged
|
|
|
|
::
|
|
|
|
=* pax p.i.fal
|
|
|
|
=* dat q.i.fal
|
|
|
|
=/ hav (~(get de fat) pax)
|
|
|
|
=? del |(?=(~ fil.hav) !=(u.fil.hav dat))
|
|
|
|
?: ?=([%sys *] pax)
|
|
|
|
del(sys (~(put by sys.del) pax dat))
|
|
|
|
del(use (~(put by use.del) pax dat))
|
|
|
|
$(fal t.fal)
|
|
|
|
:: +usurp: consider self-replacement
|
|
|
|
::
|
|
|
|
++ usurp
|
|
|
|
|= del=news
|
|
|
|
^- (unit (pair seed (list (pair path (cask)))))
|
|
|
|
=/ hun (~(get by sys.del) /sys/hoon)
|
|
|
|
=/ arv (~(get by sys.del) /sys/arvo)
|
|
|
|
?~ hun
|
|
|
|
?~ arv ~
|
|
|
|
`[`(sole u.arv) [/sys/arvo u.arv] ~]
|
|
|
|
=/ rav
|
|
|
|
~| %usurp-hoon-no-arvo
|
|
|
|
((bond |.((need fil:(~(get de fat) /sys/arvo)))) arv)
|
|
|
|
~! rav
|
|
|
|
:+ ~
|
|
|
|
[`(sole u.hun) (sole rav)]
|
|
|
|
[[/sys/arvo rav] [/sys/hoon u.hun] ~]
|
|
|
|
:: +adorn: augment capabilities
|
|
|
|
::
|
|
|
|
++ adorn
|
|
|
|
|= [del=news all=?]
|
2020-11-26 06:32:18 +03:00
|
|
|
^- (pair oped _fat)
|
2020-12-03 03:16:59 +03:00
|
|
|
:: lull: shared structures
|
|
|
|
::
|
|
|
|
=^ lul fat
|
|
|
|
?^ hav=(~(get by sys.del) /sys/lull)
|
|
|
|
:- `(sole u.hav)
|
|
|
|
(~(put de fat) /sys/lull u.hav)
|
|
|
|
:_ fat
|
|
|
|
~| %adorn-no-lull
|
|
|
|
?.(all ~ `(sole (need fil:(~(get de fat) /sys/lull))))
|
2020-11-19 10:44:28 +03:00
|
|
|
:: zuse: shared library
|
|
|
|
::
|
2020-12-03 03:16:59 +03:00
|
|
|
:: %lull is the subject of %zuse; force all if we have a new %lull
|
|
|
|
::
|
|
|
|
=. all |(all ?=(^ lul))
|
2020-11-19 10:44:28 +03:00
|
|
|
=^ zus fat
|
|
|
|
?^ hav=(~(get by sys.del) /sys/zuse)
|
|
|
|
:- `(sole u.hav)
|
|
|
|
(~(put de fat) /sys/zuse u.hav)
|
|
|
|
:_ fat
|
|
|
|
~| %adorn-no-zuse
|
|
|
|
?.(all ~ `(sole (need fil:(~(get de fat) /sys/zuse))))
|
|
|
|
:: kernel modules
|
|
|
|
::
|
|
|
|
:: %zuse is the subject of the vanes; force all if we have a new %zuse
|
|
|
|
::
|
2020-12-03 03:16:59 +03:00
|
|
|
=. all |(all ?=(^ zus))
|
2020-11-19 10:44:28 +03:00
|
|
|
=| nav=(map term hoof)
|
2020-12-03 03:16:59 +03:00
|
|
|
=? nav all
|
2020-11-19 10:44:28 +03:00
|
|
|
%- ~(gas by nav)
|
|
|
|
%+ turn
|
|
|
|
~(tap by dir:(~(get de fat) /sys/vane))
|
|
|
|
|=([name=@ta _fat] [`@tas`name (sole (need fil))])
|
|
|
|
::
|
|
|
|
=^ new fat
|
|
|
|
%^ spin
|
|
|
|
%+ skim ~(tap by sys.del)
|
|
|
|
|=([p=path *] ?=([%sys %vane @tas ~] p))
|
|
|
|
fat
|
|
|
|
|= [[p=path q=(cask)] taf=_fat]
|
|
|
|
^- (pair (cask hoof) _fat)
|
|
|
|
?> ?=([%sys %vane @tas ~] p)
|
|
|
|
=* nam i.t.t.p
|
|
|
|
?> ((sane %tas) nam)
|
|
|
|
[[`@tas`nam (sole q)] (~(put de taf) p q)]
|
|
|
|
::
|
|
|
|
=; van
|
2020-12-03 03:16:59 +03:00
|
|
|
[[lul zus van] fat]
|
2020-11-19 10:44:28 +03:00
|
|
|
%+ sort ~(tap by (~(gas by nav) new))
|
|
|
|
|=([[a=@tas *] [b=@tas *]] (aor a b))
|
|
|
|
-- :: adapt
|
|
|
|
::
|
2020-02-05 23:48:30 +03:00
|
|
|
:: |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
|
2020-11-15 11:56:52 +03:00
|
|
|
=> |%
|
2020-12-06 11:38:37 +03:00
|
|
|
+$ vane-sample [now=@da eny=@uvJ rof=rook]
|
|
|
|
::
|
2020-11-15 11:56:52 +03:00
|
|
|
++ smit
|
2020-12-05 06:53:46 +03:00
|
|
|
|= [cap=tape sub=vase pax=path txt=@t]
|
|
|
|
^- vase
|
2020-11-15 11:56:52 +03:00
|
|
|
~> %slog.[0 leaf+"{cap}: {(scow p+(mug txt))}"]
|
|
|
|
%- road |.
|
|
|
|
~_ leaf/cap
|
2020-12-05 06:53:46 +03:00
|
|
|
(slap sub (rain pax txt))
|
2020-11-15 11:56:52 +03:00
|
|
|
::
|
|
|
|
++ create
|
2020-12-06 11:38:37 +03:00
|
|
|
|= [our=ship zus=vase lal=term pax=path txt=@t]
|
2020-11-15 11:56:52 +03:00
|
|
|
^- vase
|
2020-12-05 06:53:46 +03:00
|
|
|
=/ cap "vane %{(trip lal)}"
|
2020-12-06 11:38:37 +03:00
|
|
|
(slym (smit cap zus pax txt) our)
|
2020-11-15 11:56:52 +03:00
|
|
|
::
|
|
|
|
++ settle
|
|
|
|
|= van=vase
|
|
|
|
^- (pair vase worm)
|
|
|
|
=/ [rig=vase wor=worm] (~(slym wa *worm) van *vane-sample)
|
|
|
|
[van +:(~(slap wa wor) rig [%limb %scry])]
|
|
|
|
::
|
|
|
|
:: XX pass identity to preserve behavior?
|
|
|
|
::
|
|
|
|
++ update
|
|
|
|
|= [las=vase nex=vase]
|
|
|
|
^- vase
|
|
|
|
=/ sam=vase (slap (slym las *vane-sample) [%limb %stay])
|
|
|
|
=/ gat=vase (slap (slym nex *vane-sample) [%limb %load])
|
|
|
|
(slam gat sam)
|
|
|
|
--
|
|
|
|
::
|
|
|
|
~% %va ..va ~
|
2020-12-06 11:38:37 +03:00
|
|
|
|_ [vil=vile vax=vase sac=worm]
|
2020-02-05 23:48:30 +03:00
|
|
|
::
|
|
|
|
:: |plow:va: operate in time and space
|
|
|
|
::
|
|
|
|
++ plow
|
2020-11-24 00:06:50 +03:00
|
|
|
|= [now=@da rok=rook]
|
2020-02-05 23:48:30 +03:00
|
|
|
|%
|
|
|
|
:: +peek:plow:va: read from a local namespace
|
|
|
|
::
|
|
|
|
++ peek
|
2020-11-24 00:06:50 +03:00
|
|
|
^- rook
|
|
|
|
|= [lyc=gang cyr=term bem=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
|
|
|
|
::
|
2020-12-06 11:38:37 +03:00
|
|
|
=/ sam=vane-sample [now *@uvJ rok]
|
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-11-24 09:58:15 +03:00
|
|
|
~> %mean.'peek: pull failed'
|
2020-02-05 23:48:30 +03:00
|
|
|
(~(slap wa sac) rig [%limb %scry])
|
|
|
|
::
|
2020-11-24 00:06:50 +03:00
|
|
|
=/ mas=[gang term beam] [lyc cyr bem]
|
|
|
|
::
|
2020-11-24 09:58:15 +03:00
|
|
|
=^ pro sac
|
|
|
|
~> %mean.'peek: call failed'
|
|
|
|
(~(slym wa sac) gat mas)
|
2020-11-24 00:06:50 +03:00
|
|
|
?~ q.pro ~
|
|
|
|
?~ +.q.pro [~ ~]
|
|
|
|
=^ dat sac (~(slot wa sac) 7 pro)
|
|
|
|
``[(,mark -.q.dat) (,^ +.q.dat)]
|
2020-02-05 23:48:30 +03:00
|
|
|
::
|
|
|
|
:: |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-12-06 11:38:37 +03:00
|
|
|
=/ sam=vane-sample [now eny rok]
|
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-12-07 03:58:38 +03:00
|
|
|
=> |%
|
|
|
|
:: +slid: cons a vase onto a maze
|
|
|
|
::
|
|
|
|
++ slid
|
|
|
|
|= [hed=vase tal=maze]
|
|
|
|
^- maze
|
|
|
|
?- -.tal
|
|
|
|
%& [%& (slop hed p.tal)]
|
|
|
|
%| [%| [%cell p.hed p.p.tal] [q.hed q.p.tal]]
|
|
|
|
==
|
|
|
|
--
|
2020-02-05 23:48:30 +03:00
|
|
|
|%
|
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-12-06 11:38:37 +03:00
|
|
|
:: sample is [duct (unit goof) (hobo task)]
|
2020-02-05 23:48:30 +03:00
|
|
|
::
|
2020-02-27 04:35:12 +03:00
|
|
|
=/ sam=maze
|
2020-12-06 11:38:37 +03:00
|
|
|
(slid duc (slid err task))
|
2020-12-07 03:58:38 +03:00
|
|
|
=^ pro sac (~(slur wa sac) gat sam)
|
2020-02-05 23:48:30 +03:00
|
|
|
(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-12-06 11:38:37 +03:00
|
|
|
:: sample is [wire duct (unit goof) 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-12-06 11:38:37 +03:00
|
|
|
(slid tea (slid duc (slid err (slid src gift))))
|
2020-12-07 03:58:38 +03:00
|
|
|
=^ pro sac (~(slur wa sac) gat sam)
|
2020-02-05 23:48:30 +03:00
|
|
|
(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-11-13 23:35:01 +03:00
|
|
|
~% %le ..le ~
|
2020-11-19 10:44:28 +03:00
|
|
|
=| $: :: run: list of worklists
|
|
|
|
:: out: pending output
|
|
|
|
:: gem: worklist metadata
|
2020-11-15 11:56:52 +03:00
|
|
|
:: dud: propagate error
|
2020-11-19 10:44:28 +03:00
|
|
|
:: but: reboot signal
|
2020-11-15 11:56:52 +03:00
|
|
|
::
|
2020-11-19 10:44:28 +03:00
|
|
|
::
|
|
|
|
run=(list plan)
|
|
|
|
out=(list ovum)
|
2020-11-15 11:56:52 +03:00
|
|
|
gem=germ
|
|
|
|
dud=(unit goof)
|
2020-11-19 10:44:28 +03:00
|
|
|
$= but %- unit
|
|
|
|
$: gat=$-(heir (trap ^))
|
|
|
|
kel=(list (pair path (cask)))
|
|
|
|
fil=(list (pair path (cask)))
|
|
|
|
==
|
2020-11-15 11:56:52 +03:00
|
|
|
==
|
2020-02-05 23:48:30 +03:00
|
|
|
::
|
2020-11-24 00:06:50 +03:00
|
|
|
|_ [[pit=vase vil=vile] soul]
|
2020-02-05 23:48:30 +03:00
|
|
|
+* this .
|
2020-11-24 00:06:50 +03:00
|
|
|
sol +<+
|
2020-05-06 16:02:11 +03:00
|
|
|
::
|
2020-11-15 11:56:52 +03:00
|
|
|
:: +abet: finalize loop
|
2020-05-06 16:02:11 +03:00
|
|
|
::
|
2020-02-05 23:48:30 +03:00
|
|
|
++ abet
|
2020-11-15 11:56:52 +03:00
|
|
|
^- (each (pair (list ovum) soul) (trap ^))
|
|
|
|
?~ but
|
2020-11-24 00:06:50 +03:00
|
|
|
^- [%& (pair (list ovum) soul)]
|
2020-11-15 11:56:52 +03:00
|
|
|
&/[(flop out) sol]
|
2020-11-24 00:06:50 +03:00
|
|
|
|/(gat.u.but [arvo [run out [kel fil]:u.but] sol])
|
2020-02-05 23:48:30 +03:00
|
|
|
:: +poke: prepare a worklist-of-one from outside
|
|
|
|
::
|
|
|
|
++ poke
|
2020-11-15 11:56:52 +03:00
|
|
|
|= =ovum
|
2020-02-05 23:48:30 +03:00
|
|
|
^+ this
|
2020-03-04 00:20:34 +03:00
|
|
|
~> %mean.'arvo: poke crashed'
|
2020-11-26 06:32:18 +03:00
|
|
|
~? !lac.fad ["" %unix p.card.ovum wire.ovum now]
|
2020-11-15 11:56:52 +03:00
|
|
|
(poke:pith ovum)
|
2020-02-11 08:51:46 +03:00
|
|
|
::
|
2020-11-15 11:56:52 +03:00
|
|
|
++ jump
|
|
|
|
|= =debt
|
2020-02-11 08:51:46 +03:00
|
|
|
^+ this
|
2020-11-15 11:56:52 +03:00
|
|
|
=: run run.debt
|
|
|
|
out out.debt
|
|
|
|
==
|
2020-11-19 10:44:28 +03:00
|
|
|
:: apply remaining update
|
|
|
|
::
|
|
|
|
(~(lod what:pith fil.debt) kel.debt)
|
2020-11-15 11:56:52 +03:00
|
|
|
:: +emit: enqueue a worklist with source
|
2020-02-05 23:48:30 +03:00
|
|
|
::
|
2020-11-15 11:56:52 +03:00
|
|
|
++ emit
|
|
|
|
|= pan=plan
|
|
|
|
this(run [pan run])
|
2020-02-05 23:48:30 +03:00
|
|
|
:: +loop: until done
|
|
|
|
::
|
|
|
|
++ loop
|
2020-11-15 11:56:52 +03:00
|
|
|
^+ abet
|
|
|
|
?: ?| ?=(~ run)
|
|
|
|
?=(^ but)
|
|
|
|
==
|
|
|
|
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
|
2020-11-15 11:56:52 +03:00
|
|
|
loop:(step mov)
|
2020-02-05 23:48:30 +03:00
|
|
|
:: +step: advance the loop one step by routing a move
|
|
|
|
::
|
|
|
|
++ step
|
|
|
|
|= =move
|
2020-11-15 11:56:52 +03:00
|
|
|
^+ this
|
2020-02-10 07:01:03 +03:00
|
|
|
::
|
2020-11-26 06:32:18 +03:00
|
|
|
~? &(!lac.fad ?=(^ dud)) %goof
|
2020-02-10 07:01:03 +03:00
|
|
|
::
|
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
|
|
|
|
::
|
2020-11-26 06:32:18 +03:00
|
|
|
~? &(!lac.fad !=(%$ 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-11-15 11:56:52 +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
|
|
|
|
::
|
2020-11-26 06:32:18 +03:00
|
|
|
~? !lac.fad
|
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-11-15 11:56:52 +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
|
|
|
|
::
|
2020-11-16 22:53:21 +03:00
|
|
|
=^ way=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)
|
|
|
|
::
|
2020-11-26 06:32:18 +03:00
|
|
|
~? &(!lac.fad !=(%$ way) |(!=(%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-11-16 22:53:21 +03:00
|
|
|
(take duct wire way 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
|
2020-11-15 11:56:52 +03:00
|
|
|
^- mass
|
2020-11-26 06:32:18 +03:00
|
|
|
=; sam=(list mass)
|
2020-11-15 11:56:52 +03:00
|
|
|
:+ %arvo %|
|
|
|
|
:~ hoon+&+pit
|
2020-11-26 06:32:18 +03:00
|
|
|
zuse+&+zus.mod
|
|
|
|
vane+|+sam
|
2020-11-15 11:56:52 +03:00
|
|
|
==
|
|
|
|
::
|
2020-05-07 11:51:08 +03:00
|
|
|
=/ von
|
2020-11-25 22:39:13 +03:00
|
|
|
%+ turn
|
2020-11-26 06:32:18 +03:00
|
|
|
(sort ~(tap by van.mod) |=([[a=@tas *] [b=@tas *]] (aor a b)))
|
2020-05-07 11:51:08 +03:00
|
|
|
|=([lal=@tas =vane] (cat 3 %vane- lal)^vane)
|
|
|
|
::
|
|
|
|
:~ :+ %reports %|
|
|
|
|
%+ turn von
|
|
|
|
=/ bem=beam [[our %home da+now] /whey]
|
|
|
|
|= [lal=@tas =vane]
|
2020-12-02 11:47:29 +03:00
|
|
|
=/ met (peek ~ (rsh [3 5] lal) bem)
|
2020-11-24 00:06:50 +03:00
|
|
|
?> &(?=(^ met) ?=(^ u.met)) :: XX make optional
|
|
|
|
lal^|+;;((list mass) q.q.u.u.met)
|
2020-05-07 11:51:08 +03:00
|
|
|
::
|
|
|
|
:+ %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
|
2020-11-24 00:06:50 +03:00
|
|
|
^- rook
|
|
|
|
|= [lyc=gang cyr=term bem=beam]
|
2020-02-07 21:33:49 +03:00
|
|
|
^- (unit (unit (cask meta)))
|
2020-02-05 23:48:30 +03:00
|
|
|
::
|
2020-11-24 00:06:50 +03:00
|
|
|
?: ?=(%$ cyr)
|
|
|
|
(peek:pith lyc %$ bem)
|
2020-02-05 23:48:30 +03:00
|
|
|
::
|
2020-12-05 10:40:45 +03:00
|
|
|
:: vane and care are concatenated
|
2020-02-05 23:48:30 +03:00
|
|
|
::
|
2020-12-06 05:22:57 +03:00
|
|
|
=/ way=term (grow (end 3 cyr))
|
2020-12-05 10:40:45 +03:00
|
|
|
=/ car=term (rsh 3 cyr)
|
|
|
|
?. (~(has by van.mod) way)
|
2020-02-05 23:48:30 +03:00
|
|
|
~
|
2020-12-05 10:40:45 +03:00
|
|
|
(peek:(plow way) lyc car bem)
|
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-11-15 11:56:52 +03:00
|
|
|
?: ?=(%$ way)
|
|
|
|
~> %mean.'call: bad waif'
|
|
|
|
(call:pith ;;(waif:pith q.p.task))
|
|
|
|
::
|
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
|
2020-12-06 05:22:57 +03:00
|
|
|
call:(spin:(plow (grow 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-11-16 22:53:21 +03:00
|
|
|
?: ?=(%$ way)
|
|
|
|
::
|
|
|
|
:: the caller was Outside
|
|
|
|
::
|
|
|
|
?> ?=(~ duct)
|
|
|
|
(xeno:pith wire ;;(card q.p.gift))
|
|
|
|
::
|
|
|
|
:: the caller was a vane
|
|
|
|
::
|
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]]
|
2020-12-06 05:22:57 +03:00
|
|
|
take:(spin:(plow (grow 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-12-05 10:40:45 +03:00
|
|
|
=. van.mod (~(put by van.mod) (grow vane.gum) [vax sac])
|
2020-03-18 01:52:06 +03:00
|
|
|
(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-11-26 06:32:18 +03:00
|
|
|
(~(got by van.mod) way)
|
2020-12-06 11:38:37 +03:00
|
|
|
(~(plow va [vil vane]) now peek)
|
2020-11-15 11:56:52 +03:00
|
|
|
::
|
|
|
|
:: |pith: operate on arvo internals
|
|
|
|
::
|
|
|
|
++ pith
|
|
|
|
|%
|
|
|
|
++ gest
|
|
|
|
|= =ovum
|
|
|
|
^- $>(%pass ball)
|
2020-12-05 10:40:45 +03:00
|
|
|
=^ way=term wire.ovum wire.ovum
|
2020-11-15 11:56:52 +03:00
|
|
|
::
|
|
|
|
:: %$: default, routed to arvo-proper as trivial vase
|
2020-12-05 10:40:45 +03:00
|
|
|
:: @: route to vane as $hobo
|
2020-11-15 11:56:52 +03:00
|
|
|
::
|
|
|
|
=/ =vase
|
|
|
|
?- way
|
|
|
|
%$ noun/card.ovum
|
|
|
|
@ [cell/[atom/tas/`%soft %noun] soft/card.ovum]
|
|
|
|
==
|
|
|
|
[%pass wire.ovum way &/vase]
|
|
|
|
::
|
2020-11-19 10:44:28 +03:00
|
|
|
:: |what: update engine
|
|
|
|
::
|
|
|
|
:: +kel: (maybe) initiate a kernel update
|
|
|
|
:: +lod: continue with update after kernel +load
|
|
|
|
:: +mod: update the modules of the kernel
|
|
|
|
::
|
|
|
|
++ what
|
|
|
|
|_ fil=(list (pair path (cask)))
|
|
|
|
::
|
|
|
|
++ kel
|
|
|
|
^+ ..pith
|
2020-11-26 06:32:18 +03:00
|
|
|
=/ del (~(group adapt fat.mod.sol) fil)
|
|
|
|
=/ tub (~(usurp adapt fat.mod.sol) del)
|
2020-11-19 10:44:28 +03:00
|
|
|
?~ tub
|
|
|
|
(mod del |)
|
|
|
|
=/ pos=plan
|
|
|
|
[$/~ [*duct (gest [//arvo vega/~])] ~]
|
2020-11-26 06:32:18 +03:00
|
|
|
=/ gat (boot kel.ver.zen [hun arv]:p.u.tub)
|
2020-11-19 10:44:28 +03:00
|
|
|
%_ ..pith
|
|
|
|
but `[gat q.u.tub fil]
|
|
|
|
run (weld run [pos ~])
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ lod
|
|
|
|
|= kel=(list (pair path (cask)))
|
|
|
|
^+ ..pith
|
2020-11-26 06:32:18 +03:00
|
|
|
=. fat.mod.sol (~(gas de fat.mod.sol) kel)
|
2020-11-19 10:44:28 +03:00
|
|
|
%+ mod
|
2020-11-26 06:32:18 +03:00
|
|
|
(~(group adapt fat.mod.sol) fil)
|
2020-11-19 10:44:28 +03:00
|
|
|
%+ lien kel
|
|
|
|
|= [p=path *]
|
|
|
|
?=([%sys ?(%arvo %hoon) *] p)
|
|
|
|
::
|
|
|
|
++ mod
|
|
|
|
|= [del=news all=?]
|
|
|
|
^+ ..pith
|
2020-11-26 06:32:18 +03:00
|
|
|
=^ job=oped fat.mod.sol (~(adorn adapt fat.mod.sol) del all)
|
2020-12-03 03:16:59 +03:00
|
|
|
=? lul.mod.sol ?=(^ lul.job)
|
2020-12-05 06:53:46 +03:00
|
|
|
(smit:va "lull" pit /sys/lull/hoon u.lul.job)
|
2020-11-26 06:32:18 +03:00
|
|
|
=? zus.mod.sol ?=(^ zus.job)
|
2020-12-05 06:53:46 +03:00
|
|
|
(smit:va "zuse" lul.mod.sol /sys/zuse/hoon u.zus.job)
|
2020-12-06 14:23:26 +03:00
|
|
|
%- %+ need:wyrd kel.ver.zen
|
2020-12-03 03:16:59 +03:00
|
|
|
:~ lull/;;(@ud q:(slap lul.mod.sol limb/%lull))
|
|
|
|
zuse/;;(@ud q:(slap zus.mod.sol limb/%zuse))
|
|
|
|
==
|
2020-11-19 10:44:28 +03:00
|
|
|
%= ..pith
|
2020-11-26 06:32:18 +03:00
|
|
|
van.mod
|
2020-11-19 10:44:28 +03:00
|
|
|
%+ roll van.job
|
2020-11-26 06:32:18 +03:00
|
|
|
|= [[nam=term txt=hoof] van=_van.mod.sol]
|
2020-11-19 10:44:28 +03:00
|
|
|
^+ van
|
2020-12-06 11:38:37 +03:00
|
|
|
=/ nex (create:va our zus.mod.sol nam /sys/vane/[nam]/hoon txt)
|
2020-12-05 10:40:45 +03:00
|
|
|
=/ nav (~(get by van) nam)
|
2020-11-19 10:44:28 +03:00
|
|
|
=? nex ?=(^ nav) (update:va vase.u.nav nex)
|
2020-12-05 10:40:45 +03:00
|
|
|
(~(put by van) nam (settle:va nex))
|
2020-11-19 10:44:28 +03:00
|
|
|
==
|
|
|
|
--
|
|
|
|
::
|
2020-11-15 11:56:52 +03:00
|
|
|
++ call
|
|
|
|
|= =waif
|
|
|
|
^+ ..pith
|
|
|
|
?^ dud ~>(%mean.'pith: goof' !!)
|
|
|
|
?- -.waif
|
2020-11-17 06:47:43 +03:00
|
|
|
::
|
|
|
|
:: %trim: clear state
|
|
|
|
::
|
|
|
|
:: clears compiler caches if high-priority
|
|
|
|
:: XX add separate $wasp if this should happen last
|
|
|
|
::
|
2020-11-26 06:32:18 +03:00
|
|
|
%trim =? van.mod =(0 p.waif)
|
|
|
|
(~(run by van.mod) |=(=vane vane(worm *worm)))
|
2020-11-17 06:47:43 +03:00
|
|
|
(emit $/~ (spam /arvo !>(waif)))
|
2020-11-15 11:56:52 +03:00
|
|
|
::
|
2020-11-19 10:44:28 +03:00
|
|
|
%vega (emit $/~ (spam /arvo !>(waif))) :: XX also out
|
2020-11-26 06:32:18 +03:00
|
|
|
%verb ..pith(lac.fad ?~(p.waif !lac.fad u.p.waif))
|
2020-11-15 11:56:52 +03:00
|
|
|
::
|
2020-11-19 10:44:28 +03:00
|
|
|
%what ~(kel what p.waif)
|
2020-11-15 11:56:52 +03:00
|
|
|
%whey ..pith(out [[//arvo mass/whey] out])
|
|
|
|
==
|
|
|
|
::
|
2020-11-24 00:06:50 +03:00
|
|
|
++ peek
|
|
|
|
^- roof
|
|
|
|
|= [lyc=gang car=term bem=beam]
|
|
|
|
^- (unit (unit cage))
|
|
|
|
?. ?| =(our p.bem)
|
|
|
|
?=(%$ q.bem)
|
|
|
|
=([%da now] p.r.bem)
|
|
|
|
==
|
|
|
|
~
|
|
|
|
?+ s.bem ~
|
2020-12-04 00:56:25 +03:00
|
|
|
[%whey ~] ``mass/!>(whey)
|
|
|
|
[%fad %lac ~] ``noun/!>(lac.fad)
|
|
|
|
[%zen %lag ~] ``noun/!>(lag.zen)
|
|
|
|
[%zen %ver ~] ``noun/!>(ver.zen)
|
|
|
|
[%mod %fat *] ``noun/!>((~(get de fat.mod) t.t.s.bem))
|
2020-11-24 00:06:50 +03:00
|
|
|
==
|
|
|
|
::
|
2020-11-15 11:56:52 +03:00
|
|
|
++ poke
|
|
|
|
|= =ovum
|
|
|
|
^+ ..pith
|
|
|
|
?~ wire.ovum
|
|
|
|
~>(%mean.'pith: bad wire' !!)
|
|
|
|
::
|
2020-12-03 00:52:49 +03:00
|
|
|
?. ?=(?(%crud %wack %wyrd) p.card.ovum)
|
2020-11-17 06:47:43 +03:00
|
|
|
(emit $/~ [*duct (gest ovum)] ~)
|
2020-11-15 11:56:52 +03:00
|
|
|
::
|
2020-11-24 09:58:15 +03:00
|
|
|
=/ buz ~> %mean.'pith: bad wasp'
|
|
|
|
;;(wasp card.ovum)
|
2020-11-17 06:47:43 +03:00
|
|
|
?- -.buz
|
2020-11-15 11:56:52 +03:00
|
|
|
::
|
2020-11-17 06:47:43 +03:00
|
|
|
:: %crud: forward error notification
|
2020-11-15 11:56:52 +03:00
|
|
|
::
|
2020-11-26 06:32:18 +03:00
|
|
|
%crud =? lag.zen ?& ?=(%exit mote.goof.buz)
|
|
|
|
?=(^ tang.goof.buz)
|
|
|
|
?=(%leaf -.i.tang.goof.buz) :: XX ?@
|
|
|
|
?=(%wyrd (crip p.i.tang.goof.buz))
|
|
|
|
==
|
2020-11-22 00:04:04 +03:00
|
|
|
~&(%lagging &)
|
|
|
|
(emit $/~ [*duct hurl/[goof.buz (gest ovum.buz)]] ~)
|
2020-11-15 11:56:52 +03:00
|
|
|
::
|
2020-11-17 06:47:43 +03:00
|
|
|
:: XX review
|
2020-11-15 11:56:52 +03:00
|
|
|
::
|
2020-11-17 06:47:43 +03:00
|
|
|
%wack ..pith(eny (shaz (cat 3 eny p.buz)))
|
2020-11-18 02:04:26 +03:00
|
|
|
::
|
|
|
|
:: %wyrd: check for runtime kelvin compatibility
|
|
|
|
::
|
2020-12-06 14:23:26 +03:00
|
|
|
%wyrd ?. (sane:wyrd kel.p.buz)
|
|
|
|
~>(%mean.'wyrd: insane' !!)
|
|
|
|
%- %+ need:wyrd kel.p.buz
|
2020-11-22 00:04:04 +03:00
|
|
|
^- (list (pair term @))
|
|
|
|
:~ hoon/hoon-version
|
|
|
|
arvo/arvo
|
2020-12-03 03:16:59 +03:00
|
|
|
lull/;;(@ud q:(slap lul.mod limb/%lull))
|
|
|
|
zuse/;;(@ud q:(slap zus.mod limb/%zuse))
|
2020-11-22 00:04:04 +03:00
|
|
|
==
|
2020-11-26 06:32:18 +03:00
|
|
|
=? lag.zen !=(rev.ver.zen rev.p.buz) ~&(%unlagging |)
|
|
|
|
..pith(ver.zen p.buz)
|
2020-11-15 11:56:52 +03:00
|
|
|
==
|
|
|
|
::
|
|
|
|
++ spam
|
|
|
|
|= [=wire =vase]
|
|
|
|
^- (list move)
|
|
|
|
%+ turn
|
2020-11-26 06:32:18 +03:00
|
|
|
%+ sort ~(tap by van.mod)
|
2020-11-15 11:56:52 +03:00
|
|
|
|=([[a=@tas *] [b=@tas *]] (aor a b))
|
|
|
|
|=([way=term *] `move`[*duct %pass wire way `maze`&/vase])
|
2020-11-16 22:53:21 +03:00
|
|
|
::
|
|
|
|
++ xeno
|
|
|
|
|= =ovum
|
|
|
|
^+ this
|
|
|
|
this(out [ovum out])
|
2020-11-15 11:56:52 +03:00
|
|
|
--
|
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)
|
|
|
|
::
|
2020-11-15 11:56:52 +03:00
|
|
|
++ boot
|
2020-11-18 02:04:26 +03:00
|
|
|
|= [kel=wynn hun=(unit @t) van=@t]
|
2020-11-15 11:56:52 +03:00
|
|
|
^- $-(heir (trap ^))
|
|
|
|
~> %mean.'vega: ruin'
|
|
|
|
?~ hun
|
|
|
|
=/ gat
|
|
|
|
~> %slog.[0 leaf/"vega: compiling arvo"]
|
|
|
|
%- road |.
|
|
|
|
(slap !>(..ride) (rain /sys/arvo/hoon van))
|
|
|
|
=/ lod
|
|
|
|
(slap (slot 7 gat) [%limb %load])
|
|
|
|
|= =heir
|
|
|
|
|. ;;(^ q:(slam lod !>(heir)))
|
|
|
|
::
|
|
|
|
:: hyp: hoon core type
|
|
|
|
:: hoc: hoon core
|
|
|
|
:: cop: compiler gate
|
|
|
|
::
|
|
|
|
=/ [hyp=* hoc=* cop=*]
|
|
|
|
:: compile new hoon.hoon source with the current compiler
|
|
|
|
::
|
|
|
|
=/ raw
|
|
|
|
~> %slog.[0 leaf/"vega: compiling hoon"]
|
|
|
|
(road |.((ride %noun u.hun)))
|
|
|
|
:: activate the new compiler gate, producing +ride
|
|
|
|
::
|
|
|
|
=/ cop .*(0 +.raw)
|
|
|
|
:: find the kelvin version number of the new compiler
|
|
|
|
::
|
|
|
|
=/ nex
|
|
|
|
;;(@ .*(cop q:(~(mint ut p.raw) %noun [%limb %hoon-version])))
|
|
|
|
:: require single-step upgrade
|
2019-01-14 02:54:47 +03:00
|
|
|
::
|
2020-11-15 11:56:52 +03:00
|
|
|
?. |(=(nex hoon-version) =(+(nex) hoon-version))
|
2020-11-18 02:04:26 +03:00
|
|
|
:: XX revise hint
|
2020-11-15 11:56:52 +03:00
|
|
|
::
|
|
|
|
~>(%mean.'wyrd: vega:' !!)
|
2020-11-18 02:04:26 +03:00
|
|
|
:: require runtime compatibility
|
|
|
|
::
|
2020-12-06 14:23:26 +03:00
|
|
|
%- (need:wyrd kel [hoon/nex ~])
|
2018-12-03 01:05:10 +03:00
|
|
|
::
|
2020-11-15 11:56:52 +03:00
|
|
|
:: if we're upgrading language versions, recompile the compiler
|
|
|
|
::
|
|
|
|
=^ hot=* cop
|
|
|
|
?: =(nex hoon-version)
|
|
|
|
[raw cop]
|
|
|
|
=/ hot
|
|
|
|
~> %slog.[0 leaf+"vega: recompiling hoon %{<`@`nex>}"]
|
2020-11-26 05:57:41 +03:00
|
|
|
(road |.((slum cop [%noun u.hun])))
|
2020-11-15 11:56:52 +03:00
|
|
|
[hot .*(0 +.hot)]
|
|
|
|
:: extract the hoon core from the outer gate (+ride)
|
|
|
|
::
|
|
|
|
=/ hoc .*(cop [%0 7])
|
|
|
|
:: compute the type of the hoon.hoon core
|
2018-12-03 01:05:10 +03:00
|
|
|
::
|
2020-11-15 11:56:52 +03:00
|
|
|
=/ hyp -:(slum cop [-.hot '+>'])
|
2018-12-03 01:05:10 +03:00
|
|
|
::
|
2020-11-15 11:56:52 +03:00
|
|
|
[hyp hoc cop]
|
|
|
|
::
|
|
|
|
:: compile arvo
|
2018-12-03 01:05:10 +03:00
|
|
|
::
|
2020-11-15 11:56:52 +03:00
|
|
|
=/ rav
|
|
|
|
~> %slog.[0 leaf/"vega: compiling arvo"]
|
|
|
|
(road |.((slum cop [hyp van])))
|
|
|
|
:: activate arvo and extract the arvo core from the outer gate
|
|
|
|
::
|
|
|
|
=/ voc .*(hoc [%7 +.rav %0 7])
|
2018-12-03 01:05:10 +03:00
|
|
|
::
|
2020-11-15 11:56:52 +03:00
|
|
|
:: extract the upgrade gate +load
|
|
|
|
::
|
|
|
|
:: XX +come is now ignored, remove?
|
|
|
|
:: XX could be a constant axis now (currently +10)
|
|
|
|
::
|
|
|
|
=/ lod
|
|
|
|
:: vip: type of the arvo.hoon core
|
|
|
|
:: fol: formula for the +load gate
|
2018-12-03 01:05:10 +03:00
|
|
|
::
|
2020-11-15 11:56:52 +03:00
|
|
|
=/ vip -:(slum cop [-.rav '+>'])
|
|
|
|
=/ fol +:(slum cop [vip 'load'])
|
|
|
|
:: produce the upgrade gate
|
|
|
|
::
|
|
|
|
.*(voc fol)
|
|
|
|
::
|
|
|
|
|= =heir
|
|
|
|
|. ;;(^ (slum lod heir))
|
2017-09-28 03:27:08 +03:00
|
|
|
::
|
|
|
|
++ viol :: vane tools
|
2020-11-25 23:22:55 +03:00
|
|
|
|= but=type
|
2017-09-28 03:27:08 +03:00
|
|
|
^- vile
|
2020-11-25 23:22:55 +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-11-19 10:44:28 +03:00
|
|
|
++ grow
|
|
|
|
|= way=term
|
|
|
|
?+ way way
|
|
|
|
%a %ames
|
|
|
|
%b %behn
|
|
|
|
%c %clay
|
|
|
|
%d %dill
|
|
|
|
%e %eyre
|
|
|
|
%f %ford
|
|
|
|
%g %gall
|
|
|
|
%i %iris
|
|
|
|
%j %jael
|
|
|
|
==
|
2020-11-26 06:32:18 +03:00
|
|
|
-- =>
|
|
|
|
::
|
|
|
|
:: cached reflexives
|
2018-12-06 04:58:41 +03:00
|
|
|
::
|
2020-12-05 07:32:17 +03:00
|
|
|
=/ pit=vase !>(..part)
|
2020-11-26 06:32:18 +03:00
|
|
|
=/ vil=vile (viol p.pit)
|
2018-12-06 02:25:12 +03:00
|
|
|
::
|
2020-11-26 06:32:18 +03:00
|
|
|
:: arvo state, as a discriminable sample
|
2020-05-06 16:02:11 +03:00
|
|
|
::
|
2020-11-26 06:32:18 +03:00
|
|
|
=| [_arvo soul]
|
|
|
|
=* sol ->
|
2020-11-15 11:56:52 +03:00
|
|
|
|%
|
2020-05-06 16:02:11 +03:00
|
|
|
::
|
|
|
|
:: +come: load incompatible
|
|
|
|
::
|
2020-11-15 11:56:52 +03:00
|
|
|
++ come |=(* !!) :: +4
|
|
|
|
::
|
2020-06-13 08:50:12 +03:00
|
|
|
:: +load: load compatible, notifying vanes
|
2017-09-28 03:27:08 +03:00
|
|
|
::
|
2020-11-15 11:56:52 +03:00
|
|
|
++ load :: +10
|
2020-11-26 06:32:18 +03:00
|
|
|
|= hir=$<(%grub heir)
|
2020-11-15 11:56:52 +03:00
|
|
|
^- ^
|
2020-05-07 11:51:08 +03:00
|
|
|
~| %load
|
2020-11-15 11:56:52 +03:00
|
|
|
:: store persistent state
|
|
|
|
::
|
2020-11-13 23:35:01 +03:00
|
|
|
=. sol
|
|
|
|
?- -.hir
|
2020-11-21 23:59:39 +03:00
|
|
|
_arvo soul.hir
|
2017-09-28 03:27:08 +03:00
|
|
|
==
|
2020-11-15 11:56:52 +03:00
|
|
|
:: clear compiler caches
|
|
|
|
::
|
2020-11-26 06:32:18 +03:00
|
|
|
=. van.mod (~(run by van.mod) |=(=vane vane(worm *worm)))
|
2020-11-18 02:04:26 +03:00
|
|
|
::
|
2020-12-06 14:23:26 +03:00
|
|
|
%- %+ need:wyrd kel.ver.zen
|
2020-11-18 02:04:26 +03:00
|
|
|
^- (list (pair term @))
|
|
|
|
:~ hoon/hoon-version
|
2020-11-21 23:59:39 +03:00
|
|
|
arvo/arvo
|
2020-12-03 03:16:59 +03:00
|
|
|
lull/;;(@ud q:(slap lul.mod limb/%lull))
|
|
|
|
zuse/;;(@ud q:(slap zus.mod limb/%zuse))
|
2020-11-18 02:04:26 +03:00
|
|
|
==
|
2020-11-15 11:56:52 +03:00
|
|
|
:: restore working state and resume
|
|
|
|
::
|
|
|
|
=/ zef=(each (pair (list ovum) soul) (trap ^))
|
2020-11-24 00:06:50 +03:00
|
|
|
loop:(~(jump le:part [pit vil] sol) debt.hir)
|
2020-11-15 11:56:52 +03:00
|
|
|
?- -.zef
|
|
|
|
%& [p.p.zef ..load(sol q.p.zef)]
|
|
|
|
%| $:p.zef
|
|
|
|
==
|
|
|
|
::
|
2020-05-06 16:02:11 +03:00
|
|
|
:: +peek: external inspect
|
2017-09-28 03:27:08 +03:00
|
|
|
::
|
2020-11-15 11:56:52 +03:00
|
|
|
++ peek :: +46
|
2020-11-24 00:06:50 +03:00
|
|
|
|= $: lyc=gang
|
|
|
|
$= nom
|
|
|
|
%+ each path
|
|
|
|
$% [%once cyr=term syd=desk tyl=spur]
|
|
|
|
[%beam cyr=term bem=beam]
|
|
|
|
==
|
|
|
|
==
|
|
|
|
^- (unit (cask))
|
|
|
|
=/ hap=(unit [pat=? cyr=term bem=beam])
|
|
|
|
?- nom
|
|
|
|
[%& *] ?~ p.nom ~
|
|
|
|
?~ bem=(de-beam t.p.nom) ~
|
|
|
|
`[| i.p.nom u.bem]
|
|
|
|
::
|
|
|
|
[%| %beam *] `[| cyr bem]:p.nom
|
|
|
|
::
|
|
|
|
[%| %once *] `[& cyr.p.nom [our syd.p.nom da/now] tyl.p.nom]
|
|
|
|
==
|
2020-11-15 11:56:52 +03:00
|
|
|
::
|
2020-11-24 00:06:50 +03:00
|
|
|
?~ hap ~
|
|
|
|
=/ pro (~(peek le:part [pit vil] sol) lyc [cyr bem]:u.hap)
|
|
|
|
?: |(?=(~ pro) ?=(~ u.pro)) ~
|
|
|
|
=/ dat=(cask) [p q.q]:u.u.pro
|
|
|
|
?. pat.u.hap `dat
|
|
|
|
`[%omen [cyr.u.hap (en-beam bem.u.hap)] dat]
|
2020-11-15 11:56:52 +03:00
|
|
|
::
|
2020-05-06 16:02:11 +03:00
|
|
|
:: +poke: external apply
|
2017-09-28 03:27:08 +03:00
|
|
|
::
|
2020-11-15 11:56:52 +03:00
|
|
|
++ poke :: +47
|
2018-12-05 10:34:45 +03:00
|
|
|
|= [now=@da ovo=ovum]
|
2020-11-15 11:56:52 +03:00
|
|
|
^- ^
|
2020-11-24 00:06:50 +03:00
|
|
|
=: eny.sol (shaz (cat 3 eny now)) :: XX review
|
|
|
|
now.sol now
|
|
|
|
==
|
2019-09-27 23:00:37 +03:00
|
|
|
::
|
2020-12-03 00:52:49 +03:00
|
|
|
~| poke/p.card.ovo
|
2020-11-15 11:56:52 +03:00
|
|
|
=/ zef=(each (pair (list ovum) soul) (trap ^))
|
2020-11-24 00:06:50 +03:00
|
|
|
loop:(~(poke le:part [pit vil] sol) ovo)
|
2020-11-15 11:56:52 +03:00
|
|
|
?- -.zef
|
|
|
|
%& [p.p.zef ..poke(sol q.p.zef)]
|
|
|
|
%| $:p.zef
|
2020-05-06 16:02:11 +03:00
|
|
|
==
|
|
|
|
::
|
2020-11-15 11:56:52 +03:00
|
|
|
:: +wish: external compute
|
2020-05-06 16:02:11 +03:00
|
|
|
::
|
2020-11-15 11:56:52 +03:00
|
|
|
++ wish :: +22
|
2020-11-26 06:32:18 +03:00
|
|
|
|= txt=@
|
|
|
|
q:(slap zus.mod (ream txt))
|
2020-11-15 11:56:52 +03:00
|
|
|
--
|
2020-05-07 11:51:08 +03:00
|
|
|
::
|
2020-11-15 11:56:52 +03:00
|
|
|
:: larval stage
|
2017-11-18 02:14:56 +03:00
|
|
|
::
|
2020-11-15 11:56:52 +03:00
|
|
|
:: 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.
|
2019-01-18 08:37:34 +03:00
|
|
|
::
|
2020-11-15 11:56:52 +03:00
|
|
|
:: For convenience, this larval stage also supports hoon compilation
|
|
|
|
:: with +wish and vane installation with the %veer event.
|
|
|
|
::
|
|
|
|
=> |%
|
|
|
|
++ molt
|
2020-11-26 06:32:18 +03:00
|
|
|
|= [now=@da grub]
|
2020-11-18 02:04:26 +03:00
|
|
|
^- (unit heir)
|
2020-12-03 03:16:59 +03:00
|
|
|
?. &(?=(^ who) ?=(^ eny) ?=(^ ver) ?=(^ fat) ?=(^ lul) ?=(^ zus))
|
2020-11-18 02:04:26 +03:00
|
|
|
~
|
2020-12-03 03:16:59 +03:00
|
|
|
=/ lul $:u.lul
|
|
|
|
=/ zus $:u.zus
|
2020-12-06 14:23:26 +03:00
|
|
|
%- %+ need:wyrd kel.u.ver
|
2020-11-18 02:04:26 +03:00
|
|
|
^- (list (pair term @))
|
|
|
|
:~ hoon/hoon-version
|
2020-11-21 23:59:39 +03:00
|
|
|
arvo/arvo
|
2020-12-03 03:16:59 +03:00
|
|
|
lull/;;(@ud q:(slap lul limb/%lull))
|
2020-11-18 02:04:26 +03:00
|
|
|
zuse/;;(@ud q:(slap zus limb/%zuse))
|
2020-11-15 11:56:52 +03:00
|
|
|
==
|
|
|
|
=/ nav %- ~(run by van)
|
2020-12-06 11:38:37 +03:00
|
|
|
|=(a=(trap vase) (settle:va:part (slym $:a u.who)))
|
2020-11-24 00:06:50 +03:00
|
|
|
:^ ~ arvo *debt
|
2020-12-03 03:16:59 +03:00
|
|
|
[[u.who now u.eny] [lac] [u.ver |] u.fat lul zus nav]
|
|
|
|
::
|
|
|
|
++ what
|
2020-12-05 06:53:46 +03:00
|
|
|
=> |%
|
|
|
|
++ smit
|
|
|
|
|= [cap=tape sub=(trap vase) pax=path txt=@t]
|
|
|
|
^- (trap vase)
|
|
|
|
~> %slog.[0 leaf+"{cap}: {(scow p+(mug txt))}"]
|
|
|
|
%- road |.
|
|
|
|
~_ leaf/cap
|
|
|
|
(swat sub (rain pax txt))
|
|
|
|
--
|
|
|
|
::
|
2020-12-03 03:16:59 +03:00
|
|
|
|= [grub fil=(list (pair path (cask)))]
|
|
|
|
^- grub
|
|
|
|
=* gub +<-
|
|
|
|
=/ taf (fall fat *(axal (cask)))
|
|
|
|
=/ del (~(group adapt:part taf) fil)
|
|
|
|
=/ tub (~(usurp adapt:part taf) del)
|
|
|
|
?: &(?=(^ dir.taf) ?=(^ tub))
|
|
|
|
~>(%mean.'arvo: larval reboot' !!) :: XX support
|
|
|
|
::
|
|
|
|
:: require, and unconditionally adopt, initial kernel source
|
|
|
|
::
|
|
|
|
=? taf =(~ dir.taf) :: XX TMI
|
|
|
|
~| %larval-need-kernel
|
|
|
|
?> &(?=(^ tub) ?=(^ hun.p.u.tub))
|
|
|
|
(~(gas de taf) q.u.tub)
|
|
|
|
::
|
|
|
|
=^ job=oped:part taf (~(adorn adapt:part taf) del |)
|
|
|
|
=? lul ?=(^ lul.job)
|
2020-12-05 06:53:46 +03:00
|
|
|
`(smit "lull" |.(pit) /sys/lull/hoon u.lul.job)
|
2020-12-03 03:16:59 +03:00
|
|
|
=? zus ?=(^ zus.job)
|
|
|
|
?. ?=(^ lul)
|
|
|
|
~|(%larval-need-lull !!)
|
2020-12-05 06:53:46 +03:00
|
|
|
`(smit "zuse" u.lul /sys/zuse/hoon u.zus.job)
|
2020-12-03 03:16:59 +03:00
|
|
|
=? van !=(~ van.job) :: XX TMI
|
|
|
|
?. ?=(^ zus)
|
|
|
|
~|(%larval-need-zuse !!)
|
|
|
|
%+ roll van.job
|
2020-12-05 10:40:45 +03:00
|
|
|
|= [[nam=term txt=hoof:part] =_van]
|
2020-12-03 03:16:59 +03:00
|
|
|
^+ van
|
2020-12-05 10:40:45 +03:00
|
|
|
%+ ~(put by van) nam
|
|
|
|
(smit "vane %{(trip nam)}" u.zus /sys/vane/[nam]/hoon txt)
|
2020-12-03 03:16:59 +03:00
|
|
|
gub(fat `taf)
|
2020-11-15 11:56:52 +03:00
|
|
|
--
|
|
|
|
::
|
2020-11-26 06:32:18 +03:00
|
|
|
:: larval state, as a discriminable sample
|
|
|
|
::
|
|
|
|
=| [%grub _arvo grub]
|
|
|
|
=* gub ->+
|
|
|
|
::
|
2020-11-15 11:56:52 +03:00
|
|
|
|%
|
|
|
|
++ come ^come :: +4
|
2020-11-26 06:32:18 +03:00
|
|
|
::
|
|
|
|
++ load :: +10
|
|
|
|
|= hir=heir
|
|
|
|
?: ?=(%grub -.hir)
|
2020-11-24 09:58:15 +03:00
|
|
|
~>(%mean.'arvo: larval reboot' !!) :: XX support
|
2020-11-26 06:32:18 +03:00
|
|
|
(^load hir)
|
|
|
|
::
|
2020-11-15 11:56:52 +03:00
|
|
|
++ peek _~ :: +46
|
2020-11-26 06:32:18 +03:00
|
|
|
::
|
2020-11-15 11:56:52 +03:00
|
|
|
++ poke :: +47
|
|
|
|
|= [now=@da ovo=ovum]
|
|
|
|
^- ^
|
2020-12-03 03:16:59 +03:00
|
|
|
~| poke/p.card.ovo
|
2020-11-26 06:32:18 +03:00
|
|
|
=/ wip
|
|
|
|
~> %mean.'arvo: bad wisp'
|
2020-12-03 00:52:49 +03:00
|
|
|
;;(wisp card.ovo)
|
2018-12-05 20:28:46 +03:00
|
|
|
::
|
2020-11-15 11:56:52 +03:00
|
|
|
=. ..poke
|
2020-11-26 06:32:18 +03:00
|
|
|
?- -.wip
|
|
|
|
%verb ..poke(lac ?~(p.wip !lac u.p.wip))
|
|
|
|
%wack ..poke(eny `p.wip)
|
2020-12-03 03:16:59 +03:00
|
|
|
%what ..poke(gub (what gub p.wip))
|
2020-11-26 06:32:18 +03:00
|
|
|
%whom ..poke(who ~|(%whom-once ?>(?=(~ who) `p.wip)))
|
2020-11-19 10:44:28 +03:00
|
|
|
::
|
2020-12-06 14:23:26 +03:00
|
|
|
%wyrd ?. (sane:wyrd kel.p.wip)
|
|
|
|
~>(%mean.'wyrd: insane' !!)
|
|
|
|
%- %+ need:wyrd kel.p.wip
|
2020-11-26 06:32:18 +03:00
|
|
|
^- (list (pair term @))
|
|
|
|
:* hoon/hoon-version
|
|
|
|
arvo/arvo
|
2020-12-03 03:16:59 +03:00
|
|
|
?~ lul ~
|
|
|
|
:- lull/;;(@ud q:(slap $:u.lul limb/%lull))
|
|
|
|
?~ zus ~
|
|
|
|
[zuse/;;(@ud q:(slap $:u.zus limb/%zuse)) ~]
|
2020-11-26 06:32:18 +03:00
|
|
|
==
|
|
|
|
..poke(ver `p.wip)
|
2020-11-15 11:56:52 +03:00
|
|
|
==
|
2018-12-05 20:28:46 +03:00
|
|
|
::
|
2020-11-18 02:04:26 +03:00
|
|
|
:: upgrade once we've accumulated necessary state
|
|
|
|
::
|
2020-12-03 03:16:59 +03:00
|
|
|
?~ hir=(molt now gub)
|
|
|
|
[~ ..poke]
|
2020-11-15 11:56:52 +03:00
|
|
|
~> %slog.[0 leaf+"arvo: metamorphosis"]
|
2020-11-18 02:04:26 +03:00
|
|
|
(load u.hir)
|
2017-09-28 03:27:08 +03:00
|
|
|
::
|
2020-11-15 11:56:52 +03:00
|
|
|
++ wish :: +22
|
|
|
|
|= txt=*
|
2020-12-03 03:16:59 +03:00
|
|
|
q:(slap ?~(zus pit $:u.zus) (ream ;;(@t txt)))
|
2017-09-28 03:27:08 +03:00
|
|
|
--
|