urbit/arvo/ford.hoon

132 lines
6.3 KiB
Plaintext
Raw Normal View History

2014-04-23 21:02:36 +04:00
!: :: %ford, new execution control
!? 164
::::
|= pit=vase
^- vane
=> =~
|% :: structures
++ axle :: all %ford state
$: wad=(map duct task) :: tasks by duct
== ::
++ bone ,@ud :: abstract duct
++ claw :: startup chain
$: est=@da :: startup date
eny=@ :: entropy
joy=(unit viol) :: local context
ran=(unit viol) :: arguments
jiv=(unit viol) :: app configuration
kyq=(unit viol) :: app customization
gam=(unit viol) :: app image
== ::
++ crab :: ascending card
$% [%halt ~] :: interrupt
[%ride p=(list skit) q=(each path twig)] :: start/restart
== ::
++ crib :: execution thread
$: kit=(map ,@ud kite) :: dependencies
eve=(qeu ,[p=wire q=card]) :: pending cards
war=(each claw (unit vial)) :: execution
== ::
++ croc ,* :: descending card
++ hawk :: untyped effect
$% [%call p=bone q=wire r=*] :: advance card
[%give p=bone q=*] :: produce card
[%play p=bone q=*] :: reprocess card
== ::
++ hide :: engine state
$: own=[p=ship q=@tas] :: static identity
^= seq :: dynamic sequence
$: num=@ud :: change number
eny=@ :: entropy
now=@da :: date
== == ::
++ hive :: typed engine
|* [cud=,_* wad=,_* bag=_,*] :: condensed state
$_ ^? ::
|_ hide ::
++ pack *bag :: save as bag
++ poke :: apply
|+ $: kul=(unit keel) :: acting agent
tea=wire :: logical place
fav=cud :: present event
== ::
[*(list wad) +>] :: effects
++ poll :: current subchange
|+ tea=path ::
_@ud ::
++ peek :: view
|+ $: kyl=keel :: inspecting agent
asp=?(%view %diff) :: desired aspect
tea=wire :: logical place
dev=path :: device identity
== ::
[*?(%view %diff) *vase] ::
++ prep :: restore from bag
|= bux=bag ::
+> ::
== ::
++ keel (unit ship khan) :: general identity
++ khan ,[p=@tas q=@tas] :: foreign identity
++ lamp :: task definition
$: wor=writ :: authority
sac=(list skit) :: library structure
lac=(each path twig) :: indirect/direct
== ::
++ logo ,@tas :: logical type
++ skit ,[p=(unit ,@ta) q=(list ,@ta) r=(list ,@ta)] :: tracking path
++ task :: execution
$: lam=lamp :: task definition
nah=crib :: task state
== ::
++ vial ,* :: untyped vase
--
. ==
=| axle
=* lex -
|= [now=@da eny=@ sky=$+(* (unit))] :: activate
^? :: opaque core
|% ::
++ beat :: process move
|= [wru=(unit writ) tea=wire hen=duct fav=curd]
=> .(fav ((hard card) fav))
=. ney (shax :(mix (shax now) +(eny) ney)) :: XX!! shd not need
?: ?=(%crud -.fav)
[[[wru [/d hen] %flog fav] ~] ..^$]
^- [p=(list move) q=vane]
=. gub ?.(=(0 gub) gub (cat 3 (rsh 3 1 (scot %p (end 6 1 eny))) '-'))
=^ mos bol
abet:apex:~(adit ye [[wru tea hen fav] [now eny sky] ~] bol)
[mos ..^$]
::
++ come
|= [sam=? old=vase]
^- vane
(load old)
::
++ doze
|= [now=@da hen=duct]
^- (unit ,@da)
~
::
++ load
|= old=vase
^- vane
?. (~(nest ut -:!>(`bolo`+>-.^$)) | p.old)
~& %eyre-reset
..^$
..^$(+>- (bolo q.old))
::
++ raze
^- vane
..$(+>- *bolo)
::
++ scry
|= [our=ship ren=@tas who=ship syd=disc lot=coin tyl=path]
^- (unit)
~
::
++ stay
`vase`!>((colt `bolo`+>-.$))
++ vern [164 0]
--