mirror of
https://github.com/urbit/shrub.git
synced 2024-12-14 20:02:51 +03:00
Merge remote-tracking branch 'origin/master' into philip/trad
This commit is contained in:
commit
49736a1248
265
sys/hoon.hoon
265
sys/hoon.hoon
@ -209,9 +209,8 @@
|
||||
|= a=@
|
||||
^- @
|
||||
?- a
|
||||
$1 !!
|
||||
$2 1
|
||||
$3 1
|
||||
?(%2 %3) 1
|
||||
?(%0 %1) !!
|
||||
* (add (mod a 2) (mul $(a (div a 2)) 2))
|
||||
==
|
||||
::
|
||||
@ -321,7 +320,7 @@
|
||||
:: input if it fits or a default value if it doesn't.
|
||||
::
|
||||
:: examples: * @ud ,[p=time q=?(%a %b)]
|
||||
_|~(* +<)
|
||||
$~(* $-(* *))
|
||||
::
|
||||
+* pair [head tail]
|
||||
:: dual tuple
|
||||
@ -385,116 +384,6 @@
|
||||
:: type that was passed in.
|
||||
::
|
||||
$@(~ [~ u=item])
|
||||
::
|
||||
:: ::
|
||||
:::: 2o: containers ::
|
||||
:: ::
|
||||
::
|
||||
+* jar [key value] (map key (list value)) :: map of lists
|
||||
+* jug [key value] (map key (set value)) :: map of sets
|
||||
+* map [key value] (tree (pair key value)) :: table
|
||||
+* qeu [item] (tree item) :: queue
|
||||
+* set [item] (tree item) :: set
|
||||
::
|
||||
:::: 2q: molds and mold builders ::
|
||||
:: ::
|
||||
::
|
||||
+$ axis @ :: tree address
|
||||
+$ bean ? :: 0=&=yes, 1=|=no
|
||||
+$ flag ?
|
||||
+$ char @t :: UTF8 byte
|
||||
+$ cord @t :: UTF8, LSB first
|
||||
+$ byts [wid=@ud dat=@] :: bytes, MSB first
|
||||
+$ deco ?($bl $br $un $~) :: text decoration
|
||||
+$ date {{a/? y/@ud} m/@ud t/tarp} :: parsed date
|
||||
+$ knot @ta :: ASCII text
|
||||
+$ noun * :: any noun
|
||||
+$ path (list knot) :: like unix path
|
||||
+$ stud :: standard name
|
||||
$@ mark=@tas :: auth=urbit
|
||||
$: auth=@tas :: standards authority
|
||||
type=path :: standard label
|
||||
== ::
|
||||
+$ stub (list (pair stye (list @c))) :: styled unicode
|
||||
+$ stye (pair (set deco) (pair tint tint)) :: decos/bg/fg
|
||||
+$ styl :: cascading style
|
||||
%+ pair (unit deco) ::
|
||||
(pair (unit tint) (unit tint)) ::
|
||||
:: ::
|
||||
+$ styx (list $@(@t (pair styl styx))) :: styled text
|
||||
+$ tile :: XX: ?@(knot (pair styl knot))
|
||||
::
|
||||
cord
|
||||
+$ tint ?($r $g $b $c $m $y $k $w $~) :: text color
|
||||
::
|
||||
:: A `plum` is the intermediate representation for the pretty-printer. It
|
||||
:: encodes hoon-shaped data with the least amount of structured needed
|
||||
:: for formating.
|
||||
::
|
||||
:: A `plum` is either a
|
||||
::
|
||||
:: - `cord`: A simple cord
|
||||
:: - `[%para *]`: A wrappable paragraph.
|
||||
:: - `[%tree *]`: A formatted plum tree
|
||||
:: - `[%sbrk *]`: An indication of a nested subexpression.
|
||||
::
|
||||
:: The formatter will use the tall mode unless:
|
||||
::
|
||||
:: - A plum has only a `wide` style.
|
||||
:: - The plum is in `%sbrk` form and its subplum (`kid`), when
|
||||
:: formatted in wide mode, can fit on a single line.
|
||||
::
|
||||
+$ plum
|
||||
$@ cord
|
||||
$% [%para prefix=tile lines=(list @t)]
|
||||
[%tree fmt=plumfmt kids=(list plum)]
|
||||
[%sbrk kid=plum]
|
||||
==
|
||||
::
|
||||
:: A `plumfmt` is a description of how to render a `plum`. A `plumfmt`
|
||||
:: must include a `wide`, a `tall`, or both.
|
||||
::
|
||||
:: A `wide` is a description of how to render a plum in a single
|
||||
:: line. The nested (`kids`) sub-plums will be interleaved with `delimit`
|
||||
:: strings, and, if `enclose` is set, then the output will be enclosed
|
||||
:: with `p.u.enclose` abnd `q.u.enclose`.
|
||||
::
|
||||
:: For example, to build a plumfmt for string literals, we could write:
|
||||
::
|
||||
:: [wide=[~ '' [~ '"' '"']] tall=~]
|
||||
::
|
||||
:: A `tall` is a description of how to render a plum across multiple
|
||||
:: lines. The output will be prefixed by `intro`, suffixed by
|
||||
:: `final.u.indef`, and each subplum prefixed by `sigil.u.indef`.
|
||||
::
|
||||
:: For example, to build a plumfmt for cores, we could write:
|
||||
::
|
||||
:: [wide=~ tall=`['' `['++' '--']]]
|
||||
::
|
||||
+$ plumfmt
|
||||
$: wide=(unit [delimit=tile enclose=(unit (pair tile tile))])
|
||||
tall=(unit [intro=tile indef=(unit [sigil=tile final=tile])])
|
||||
==
|
||||
::
|
||||
++ tang (list tank) :: bottom-first error
|
||||
++ tank $~ [%leaf ~] ::
|
||||
$% {$leaf p/tape} :: printing formats
|
||||
{$plum p/plum} ::
|
||||
$: $palm :: backstep list
|
||||
p/{p/tape q/tape r/tape s/tape} ::
|
||||
q/(list tank) ::
|
||||
== ::
|
||||
$: $rose :: flat list
|
||||
p/{p/tape q/tape r/tape} :: mid open close
|
||||
q/(list tank) ::
|
||||
== ::
|
||||
== ::
|
||||
++ tape (list @tD) :: utf8 string as list
|
||||
++ tour (list @c) :: utf32 clusters
|
||||
++ tarp {d/@ud h/@ud m/@ud s/@ud f/(list @ux)} :: parsed time
|
||||
++ term @tas :: ascii symbol
|
||||
++ wain (list cord) :: text lines
|
||||
++ wall (list tape) :: text lines
|
||||
-- =>
|
||||
:: ::
|
||||
:::: 2: layer two ::
|
||||
@ -1833,6 +1722,14 @@
|
||||
++ to :: queue engine
|
||||
=| a/(tree) :: (qeu)
|
||||
|@
|
||||
++ apt :: check correctness
|
||||
^- ?
|
||||
?~ a &
|
||||
|- ^- ?
|
||||
?~ l.a &
|
||||
?~ r.a &
|
||||
&((mor n.l.a n.r.a) $(a l.a) $(a r.a))
|
||||
::
|
||||
++ bal
|
||||
|- ^+ a
|
||||
?~ a ~
|
||||
@ -1899,7 +1796,25 @@
|
||||
?~ a ~
|
||||
?~(r.a [~ n.a] $(a r.a))
|
||||
--
|
||||
::
|
||||
:::: 2o: containers ::
|
||||
:: ::
|
||||
::
|
||||
+* jar [key value] (map key (list value)) :: map of lists
|
||||
+* jug [key value] (map key (set value)) :: map of sets
|
||||
::
|
||||
+* map [key value] :: table
|
||||
$| (tree (pair key value))
|
||||
|=(a=(tree (pair)) ~(apt by a))
|
||||
::
|
||||
+* qeu [item] :: queue
|
||||
$| (tree item)
|
||||
|=(a=(tree) ~(apt to a))
|
||||
::
|
||||
+* set [item] :: set
|
||||
$| (tree item)
|
||||
|=(a=(tree) ~(apt in a))
|
||||
::
|
||||
:::: 2l: container from container ::
|
||||
:: ::
|
||||
::
|
||||
@ -1965,6 +1880,106 @@
|
||||
[i=i.a t=$(a t.a)]
|
||||
--
|
||||
::
|
||||
:::: 2q: molds and mold builders ::
|
||||
:: ::
|
||||
::
|
||||
+$ axis @ :: tree address
|
||||
+$ bean ? :: 0=&=yes, 1=|=no
|
||||
+$ flag ?
|
||||
+$ char @t :: UTF8 byte
|
||||
+$ cord @t :: UTF8, LSB first
|
||||
+$ byts [wid=@ud dat=@] :: bytes, MSB first
|
||||
+$ deco ?($bl $br $un $~) :: text decoration
|
||||
+$ date {{a/? y/@ud} m/@ud t/tarp} :: parsed date
|
||||
+$ knot @ta :: ASCII text
|
||||
+$ noun * :: any noun
|
||||
+$ path (list knot) :: like unix path
|
||||
+$ stud :: standard name
|
||||
$@ mark=@tas :: auth=urbit
|
||||
$: auth=@tas :: standards authority
|
||||
type=path :: standard label
|
||||
== ::
|
||||
+$ stub (list (pair stye (list @c))) :: styled unicode
|
||||
+$ stye (pair (set deco) (pair tint tint)) :: decos/bg/fg
|
||||
+$ styl :: cascading style
|
||||
%+ pair (unit deco) ::
|
||||
(pair (unit tint) (unit tint)) ::
|
||||
:: ::
|
||||
+$ styx (list $@(@t (pair styl styx))) :: styled text
|
||||
+$ tile :: XX: ?@(knot (pair styl knot))
|
||||
::
|
||||
cord
|
||||
+$ tint ?($r $g $b $c $m $y $k $w $~) :: text color
|
||||
::
|
||||
:: A `plum` is the intermediate representation for the pretty-printer. It
|
||||
:: encodes hoon-shaped data with the least amount of structured needed
|
||||
:: for formating.
|
||||
::
|
||||
:: A `plum` is either a
|
||||
::
|
||||
:: - `cord`: A simple cord
|
||||
:: - `[%para *]`: A wrappable paragraph.
|
||||
:: - `[%tree *]`: A formatted plum tree
|
||||
:: - `[%sbrk *]`: An indication of a nested subexpression.
|
||||
::
|
||||
:: The formatter will use the tall mode unless:
|
||||
::
|
||||
:: - A plum has only a `wide` style.
|
||||
:: - The plum is in `%sbrk` form and its subplum (`kid`), when
|
||||
:: formatted in wide mode, can fit on a single line.
|
||||
::
|
||||
+$ plum
|
||||
$@ cord
|
||||
$% [%para prefix=tile lines=(list @t)]
|
||||
[%tree fmt=plumfmt kids=(list plum)]
|
||||
[%sbrk kid=plum]
|
||||
==
|
||||
::
|
||||
:: A `plumfmt` is a description of how to render a `plum`. A `plumfmt`
|
||||
:: must include a `wide`, a `tall`, or both.
|
||||
::
|
||||
:: A `wide` is a description of how to render a plum in a single
|
||||
:: line. The nested (`kids`) sub-plums will be interleaved with `delimit`
|
||||
:: strings, and, if `enclose` is set, then the output will be enclosed
|
||||
:: with `p.u.enclose` abnd `q.u.enclose`.
|
||||
::
|
||||
:: For example, to build a plumfmt for string literals, we could write:
|
||||
::
|
||||
:: [wide=[~ '' [~ '"' '"']] tall=~]
|
||||
::
|
||||
:: A `tall` is a description of how to render a plum across multiple
|
||||
:: lines. The output will be prefixed by `intro`, suffixed by
|
||||
:: `final.u.indef`, and each subplum prefixed by `sigil.u.indef`.
|
||||
::
|
||||
:: For example, to build a plumfmt for cores, we could write:
|
||||
::
|
||||
:: [wide=~ tall=`['' `['++' '--']]]
|
||||
::
|
||||
+$ plumfmt
|
||||
$: wide=(unit [delimit=tile enclose=(unit (pair tile tile))])
|
||||
tall=(unit [intro=tile indef=(unit [sigil=tile final=tile])])
|
||||
==
|
||||
::
|
||||
++ tang (list tank) :: bottom-first error
|
||||
++ tank $~ [%leaf ~] ::
|
||||
$% {$leaf p/tape} :: printing formats
|
||||
{$plum p/plum} ::
|
||||
$: $palm :: backstep list
|
||||
p/{p/tape q/tape r/tape s/tape} ::
|
||||
q/(list tank) ::
|
||||
== ::
|
||||
$: $rose :: flat list
|
||||
p/{p/tape q/tape r/tape} :: mid open close
|
||||
q/(list tank) ::
|
||||
== ::
|
||||
== ::
|
||||
++ tape (list @tD) :: utf8 string as list
|
||||
++ tour (list @c) :: utf32 clusters
|
||||
++ tarp {d/@ud h/@ud m/@ud s/@ud f/(list @ux)} :: parsed time
|
||||
++ term @tas :: ascii symbol
|
||||
++ wain (list cord) :: text lines
|
||||
++ wall (list tape) :: text lines
|
||||
::
|
||||
:::: 2p: serialization ::
|
||||
:: ::
|
||||
::
|
||||
@ -8319,7 +8334,7 @@
|
||||
::
|
||||
{$bsld *}
|
||||
:+ %tsls
|
||||
relative
|
||||
relative:clear(mod q.mod)
|
||||
:+ %wtld
|
||||
[%wtts [%over ~[&/3] p.mod] ~[&/4]]
|
||||
$/2
|
||||
@ -8328,7 +8343,7 @@
|
||||
::
|
||||
{$bsbn *}
|
||||
:+ %tsls
|
||||
relative
|
||||
relative:clear(mod q.mod)
|
||||
:+ %wtbn
|
||||
[%wtts [%over ~[&/3] p.mod] ~[&/4]]
|
||||
$/2
|
||||
@ -10151,7 +10166,7 @@
|
||||
~/ %mint
|
||||
|= {gol/type gen/hoon}
|
||||
^- {p/type q/nock}
|
||||
~& %pure-mint
|
||||
::~& %pure-mint
|
||||
|^ ^- {p/type q/nock}
|
||||
?: ?&(=(%void sut) !?=({$dbug *} gen))
|
||||
?. |(!vet ?=({$lost *} gen) ?=({$zpzp *} gen))
|
||||
@ -16731,21 +16746,19 @@
|
||||
%+ cook
|
||||
|= [b=term c=(list term) e=spec]
|
||||
^- [term hoon]
|
||||
:* b
|
||||
:- b
|
||||
:+ %brtr
|
||||
:- %bscl
|
||||
=- ?>(?=(^ -) -)
|
||||
:: for each .term in .c, produce $=(term $~(* $-(* *)))
|
||||
:: ie {term}=mold
|
||||
::
|
||||
%+ turn c
|
||||
|= =term
|
||||
^- spec
|
||||
:+ %bsts
|
||||
term
|
||||
[%bshp [%base %noun] [%base %noun]]
|
||||
:- %ktcl
|
||||
:+ %made
|
||||
[b c]
|
||||
e
|
||||
==
|
||||
=/ tar [%base %noun]
|
||||
[%bsts term [%bssg tar [%bshp tar tar]]]
|
||||
[%ktcl [%made [b c] e]]
|
||||
;~ pfix (jest '+*')
|
||||
;~ plug
|
||||
;~(pfix gap sym)
|
||||
|
@ -8,7 +8,56 @@
|
||||
::
|
||||
=+ protocol-version=3
|
||||
|%
|
||||
+= move [p=duct q=(wind note:able gift:able)] :: local move
|
||||
+$ move [p=duct q=(wind note gift:able)] :: local move
|
||||
+$ note :: out request $->
|
||||
$~ [%b %wait *@da] ::
|
||||
$% $: %b :: to %behn
|
||||
$> $? %rest :: cancel timer
|
||||
%wait :: set timer
|
||||
== ::
|
||||
task:able:behn ::
|
||||
== ::
|
||||
$: %d :: to %dill
|
||||
$>(%flog task:able:dill) :: log output
|
||||
== ::
|
||||
$: %j :: to %jael
|
||||
$> $? %meet :: neighbor
|
||||
%pubs :: view public keys
|
||||
%turf :: view domains
|
||||
%vein :: view private keys
|
||||
== ::
|
||||
task:able:jael ::
|
||||
== ::
|
||||
$: %g :: to %gall
|
||||
$>(%deal task:able:gall) :: interact with apps
|
||||
== ::
|
||||
$: @tas :: to any
|
||||
$>(%west task:able) :: deliver message
|
||||
== == ::
|
||||
+$ sign :: in result _<-
|
||||
$~ [%b %wake ~] ::
|
||||
$% $: %b :: from %behn
|
||||
$>(%wake gift:able:behn) :: timer activate
|
||||
== ::
|
||||
$: %j :: from %jael
|
||||
$> $? %pubs :: public keys
|
||||
%turf :: bind to domains
|
||||
%vein :: private keys
|
||||
== ::
|
||||
gift:able:jael ::
|
||||
== ::
|
||||
$: %g :: from %gall
|
||||
$% [%mean p=ares] :: XX obsolete
|
||||
[%nice ~] :: XX obsolete
|
||||
$>(%unto gift:able:gall) :: application ack
|
||||
== == ::
|
||||
$: @tas :: from any
|
||||
$% $>(%crud vane-task) :: XX strange
|
||||
$> $? %mack :: message ack
|
||||
%woot :: reaction message
|
||||
== ::
|
||||
gift:able ::
|
||||
== == == ::
|
||||
:: |pact: internal packet structures
|
||||
::
|
||||
++ pact
|
||||
@ -1294,7 +1343,7 @@
|
||||
++ stay fox
|
||||
++ take :: accept response
|
||||
~/ %take
|
||||
|= [tea=wire hen=duct hin=(hypo sign:able)]
|
||||
|= [tea=wire hen=duct hin=(hypo sign)]
|
||||
^- [(list move) _..^$]
|
||||
=. any.ton.fox eny
|
||||
=^ duy ..knap
|
||||
@ -1402,7 +1451,7 @@
|
||||
::
|
||||
++ knap
|
||||
~/ %knap
|
||||
|= [tea=wire hen=duct sih=sign:able]
|
||||
|= [tea=wire hen=duct sih=sign]
|
||||
^- [(list move) _+>]
|
||||
:: if we got an error from behn, report it to %dill; TODO handle errors
|
||||
::
|
||||
|
@ -5,8 +5,19 @@
|
||||
=, behn
|
||||
|= pit=vase
|
||||
=> |%
|
||||
+$ move [p=duct q=(wind note:able gift:able)]
|
||||
+$ sign [%b %wake error=(unit tang)]
|
||||
+$ move [p=duct q=(wind note gift:able)]
|
||||
+$ note :: out request $->
|
||||
$~ [%b %wait *@da] ::
|
||||
$% $: %b :: to self
|
||||
$>(%wait task:able) :: set timer
|
||||
== ::
|
||||
$: %d :: to %dill
|
||||
$>(%flog task:able:dill) :: log output
|
||||
== == ::
|
||||
+$ sign
|
||||
$~ [%b %wake ~]
|
||||
$% [%b $>(%wake gift:able)]
|
||||
==
|
||||
::
|
||||
+$ behn-state
|
||||
$: timers=(list timer)
|
||||
@ -237,7 +248,7 @@
|
||||
=^ moves state
|
||||
?- -.task
|
||||
%born born:event-core
|
||||
%crud (crud:event-core [tag tang]:task)
|
||||
%crud (crud:event-core [p q]:task)
|
||||
%rest (rest:event-core date=p.task)
|
||||
%drip (drip:event-core move=p.task)
|
||||
%vega vega:event-core
|
||||
|
@ -469,57 +469,64 @@
|
||||
::
|
||||
++ move {p/duct q/(wind note gift:able)} :: local move
|
||||
++ note :: out request $->
|
||||
$% $: $a :: to %ames
|
||||
$% {$want p/ship q/path r/*} ::
|
||||
$~ [%b %wait *@da] ::
|
||||
$% $: %a :: to %ames
|
||||
$>(%want task:able:ames) ::
|
||||
== ::
|
||||
$: %b :: to %behn
|
||||
$> $? %drip ::
|
||||
%rest ::
|
||||
%wait ::
|
||||
== ::
|
||||
task:able:behn ::
|
||||
== ::
|
||||
$: %c :: to %clay
|
||||
$> $? %info :: internal edit
|
||||
%merg :: merge desks
|
||||
%warp ::
|
||||
%werp ::
|
||||
== ::
|
||||
task:able ::
|
||||
== ::
|
||||
$: %d :: to %dill
|
||||
$>(%flog task:able:dill) ::
|
||||
== ::
|
||||
$: %f :: to %ford
|
||||
$> $? %build ::
|
||||
%keep ::
|
||||
%wipe ::
|
||||
== ::
|
||||
task:able:ford ::
|
||||
== == ::
|
||||
$: $c :: to %clay
|
||||
$% {$info q/@tas r/nori} :: internal edit
|
||||
{$merg p/@tas q/@p r/@tas s/case t/germ:clay} :: merge desks
|
||||
{$warp p/ship q/riff} ::
|
||||
{$werp p/ship q/ship r/riff} ::
|
||||
== == ::
|
||||
$: $d :: to %dill
|
||||
$% $: $flog ::
|
||||
$% {$crud p/@tas q/(list tank)} ::
|
||||
{$text p/tape} ::
|
||||
== == ::
|
||||
== == ::
|
||||
$: $f ::
|
||||
$% [%build live=? schematic=schematic:ford] ::
|
||||
[%keep compiler-cache=@ud build-cache=@ud] ::
|
||||
[%wipe percent-to-remove=@ud] ::
|
||||
== == ::
|
||||
$: $b ::
|
||||
$% {$wait p/@da} ::
|
||||
{$rest p/@da} ::
|
||||
{$drip p/vase} ::
|
||||
== == == ::
|
||||
++ riot (unit rant) :: response+complete
|
||||
++ sign :: in result $<-
|
||||
$% $: %y
|
||||
$% {$init-clad ~}
|
||||
== ==
|
||||
$: $a :: by %ames
|
||||
$% {$woot p/ship q/coop} ::
|
||||
{$send p/lane:ames q/@} :: transmit packet
|
||||
$~ [%b %wake ~] ::
|
||||
$% $: %y ::
|
||||
$% [%init-clad ~] ::
|
||||
== == ::
|
||||
$: %b
|
||||
$% {$writ p/riot} ::
|
||||
== ==
|
||||
$: $c :: by %clay
|
||||
$% {$note p/@tD q/tank} ::
|
||||
{$mere p/(each (set path) (pair term tang))}
|
||||
{$writ p/riot} ::
|
||||
== == ::
|
||||
$: $f ::
|
||||
$% [%made date=@da result=made-result:ford] ::
|
||||
== == ::
|
||||
$: $b ::
|
||||
$% {$wake error=(unit tang)} :: timer activate
|
||||
$: %a :: by %ames
|
||||
$> $? %send :: XX strange
|
||||
%woot ::
|
||||
== ::
|
||||
gift:able:ames ::
|
||||
== ::
|
||||
$: %b :: by %behn
|
||||
$% $>(%wake gift:able:behn) :: timer activate
|
||||
$>(%writ gift:able) :: XX %slip
|
||||
== == ::
|
||||
$: %c :: by %clay
|
||||
$> $? %mere ::
|
||||
%note ::
|
||||
%writ ::
|
||||
== ::
|
||||
gift:able ::
|
||||
== ::
|
||||
$: %f :: by %ford
|
||||
$>(%made gift:able:ford) ::
|
||||
== ::
|
||||
$: @tas :: by any
|
||||
$% {$crud p/@tas q/(list tank)} ::
|
||||
== == == ::
|
||||
$>(%crud vane-task) :: XX strange
|
||||
== == ::
|
||||
--
|
||||
::
|
||||
:: Old state types for ++load
|
||||
@ -4346,10 +4353,11 @@
|
||||
[mos ..^$]
|
||||
::
|
||||
%west
|
||||
=* wer wer.req
|
||||
=* pax pax.req
|
||||
=* wer p.req
|
||||
=* pax q.req
|
||||
=* res r.req
|
||||
?: ?=({%question *} pax)
|
||||
=+ ryf=;;(riff res.req)
|
||||
=+ ryf=;;(riff res)
|
||||
:_ ..^$
|
||||
:~ [hen %give %mack ~]
|
||||
=/ =wire
|
||||
@ -4361,7 +4369,7 @@
|
||||
=+ inx=(slav %ud i.t.t.pax)
|
||||
=^ mos ruf
|
||||
=/ den ((de our now ski hen ruf) wer syd)
|
||||
abet:(take-foreign-answer:den inx ;;((unit rand) res.req))
|
||||
abet:(take-foreign-answer:den inx ;;((unit rand) res))
|
||||
[[[hen %give %mack ~] mos] ..^$]
|
||||
::
|
||||
%wegh
|
||||
|
@ -35,105 +35,97 @@
|
||||
$% {$dill-belt p/(hypo dill-belt)} ::
|
||||
== ::
|
||||
++ move {p/duct q/(wind note gift:able)} :: local move
|
||||
++ note-ames :: weird ames move
|
||||
$% {$wegh $~} ::
|
||||
== ::
|
||||
++ note-behn ::
|
||||
$% {$wegh $~} ::
|
||||
== ::
|
||||
++ note-clay ::
|
||||
$% {$merg p/@tas q/@p r/@tas s/case t/germ:clay} :: merge desks
|
||||
{$warp p/ship q/riff:clay} :: wait for clay hack
|
||||
{$wegh $~} ::
|
||||
{$perm p/desk q/path r/rite:clay} :: change permissions
|
||||
== ::
|
||||
++ note-dill :: note to self, odd
|
||||
$% {$crud p/@tas q/(list tank)} ::
|
||||
{$heft $~} ::
|
||||
{$init p/ship} ::
|
||||
{$lyra p/@t q/@t} :: upgrade kernel
|
||||
{$text p/tape} ::
|
||||
{$veer p/@ta q/path r/@t} :: install vane
|
||||
{$verb $~} :: verbose mode
|
||||
== ::
|
||||
++ note-eyre ::
|
||||
$% {$wegh $~} ::
|
||||
== ::
|
||||
++ note-ford ::
|
||||
$% {$wegh $~} ::
|
||||
== ::
|
||||
++ note-gall ::
|
||||
$% {$conf dock $load ship desk} ::
|
||||
{$deal p/sock q/cush:gall} ::
|
||||
{$wegh $~} ::
|
||||
== ::
|
||||
++ note-jael ::
|
||||
$% $: %dawn :: boot from keys
|
||||
=seed:able:jael :: identity params
|
||||
spon=ship :: sponsor
|
||||
czar=(map ship [=life =pass]) :: galaxy table
|
||||
turf=(list turf) :: domains
|
||||
bloq=@ud :: block number
|
||||
node=(unit purl:eyre) :: gateway url
|
||||
snap=(unit snapshot:jael) :: head start
|
||||
== ::
|
||||
[%fake our=ship] :: boot fake
|
||||
[%wegh ~]
|
||||
== ::
|
||||
++ note :: out request $->
|
||||
$% {$a note-ames} ::
|
||||
{$b note-behn} ::
|
||||
{$c note-clay} ::
|
||||
{$d note-dill} ::
|
||||
{$e note-eyre} ::
|
||||
{$f note-ford} ::
|
||||
{$g note-gall} ::
|
||||
{$j note-jael} ::
|
||||
$~ [%d %verb ~] ::
|
||||
$% $: %a ::
|
||||
$>(%wegh task:able:ames) ::
|
||||
== ::
|
||||
++ sign-ames ::
|
||||
$% {$nice $~} ::
|
||||
{$send p/lane:ames q/@} ::
|
||||
{$mass p/mass} ::
|
||||
$: %b ::
|
||||
$>(%wegh task:able:behn) ::
|
||||
== ::
|
||||
++ sign-behn ::
|
||||
$% {$mass p/mass} ::
|
||||
{$writ p/riot:clay} ::
|
||||
$: %c ::
|
||||
$> $? %merg :: merge desks
|
||||
%perm :: change permissions
|
||||
%warp :: wait for clay hack
|
||||
%wegh :: memory measure
|
||||
== ::
|
||||
++ sign-clay ::
|
||||
$% {$mere p/(each (set path) (pair term tang))} ::
|
||||
{$note p/@tD q/tank} ::
|
||||
{$writ p/riot:clay} ::
|
||||
{$mass p/mass} ::
|
||||
{$mack p/(unit tang)} ::
|
||||
task:able:clay ::
|
||||
== ::
|
||||
++ sign-dill ::
|
||||
$% {$blit p/(list blit)} ::
|
||||
$: %d ::
|
||||
$> $? %crud ::
|
||||
%heft ::
|
||||
%init :: XX obsolete?
|
||||
%lyra ::
|
||||
%text ::
|
||||
%veer ::
|
||||
%verb ::
|
||||
== ::
|
||||
++ sign-eyre ::
|
||||
$% {$mass p/mass} ::
|
||||
task:able:dill ::
|
||||
== ::
|
||||
++ sign-ford ::
|
||||
$% {$mass p/mass} ::
|
||||
$: %e ::
|
||||
$>(%wegh task:able:eyre) ::
|
||||
== ::
|
||||
++ sign-gall ::
|
||||
$% {$onto p/(each suss:gall tang)} ::
|
||||
{$unto p/cuft:gall} ::
|
||||
{$mass p/mass} ::
|
||||
$: %f ::
|
||||
$>(%wegh task:able:ford) ::
|
||||
== ::
|
||||
++ sign-jael ::
|
||||
$% [%init p=ship] ::
|
||||
[%mass p=mass]
|
||||
$: %g ::
|
||||
$> $? %conf ::
|
||||
%deal ::
|
||||
%wegh ::
|
||||
== ::
|
||||
task:able:gall ::
|
||||
== ::
|
||||
$: %j ::
|
||||
$> $? %dawn ::
|
||||
%fake ::
|
||||
%wegh ::
|
||||
== ::
|
||||
task:able:jael ::
|
||||
== == ::
|
||||
++ sign :: in result $<-
|
||||
$% {$a sign-ames} ::
|
||||
{$b sign-behn} ::
|
||||
{$c sign-clay} ::
|
||||
{$d sign-dill} ::
|
||||
{$e sign-eyre} ::
|
||||
{$f sign-ford} ::
|
||||
{$g sign-gall} ::
|
||||
{%j sign-jael} ::
|
||||
==
|
||||
$~ [%j %init *@p] ::
|
||||
$% $: %a ::
|
||||
$% [%nice ~] :: XX obsolete
|
||||
$> $? %mass ::
|
||||
%send :: XX strange
|
||||
== ::
|
||||
gift:able:ames ::
|
||||
== == ::
|
||||
$: %b ::
|
||||
$% $>(%mass gift:able:behn) ::
|
||||
$>(%writ gift:able:clay) :: XX %slip
|
||||
== == ::
|
||||
$: %c ::
|
||||
$> $? %mack :: XX strange
|
||||
%mass ::
|
||||
%mere ::
|
||||
%note ::
|
||||
%writ ::
|
||||
== ::
|
||||
gift:able:clay ::
|
||||
== ::
|
||||
$: %d ::
|
||||
$>(%blit gift:able:dill) ::
|
||||
== ::
|
||||
$: %e ::
|
||||
$>(%mass gift:able:eyre) ::
|
||||
== ::
|
||||
$: %f ::
|
||||
$>(%mass gift:able:ford) ::
|
||||
== ::
|
||||
$: %g ::
|
||||
$> $? %mass ::
|
||||
%onto ::
|
||||
%unto ::
|
||||
== ::
|
||||
gift:able:gall ::
|
||||
== ::
|
||||
$: %j ::
|
||||
$> $? %init ::
|
||||
%mass ::
|
||||
== ::
|
||||
gift:able:jael ::
|
||||
== == ::
|
||||
:::::::: :: dill tiles
|
||||
--
|
||||
=| all/axle
|
||||
@ -508,7 +500,8 @@
|
||||
?> ?=(?(%dawn %fake) -.p.task)
|
||||
?> =(~ hey.all)
|
||||
=. hey.all `hen
|
||||
=/ boot ((soft note-jael) p.task)
|
||||
=/ boot
|
||||
((soft $>($?(%dawn %fake) task:able:jael)) p.task)
|
||||
?~ boot
|
||||
~| invalid-boot-event+hen !!
|
||||
:_(..^$ [hen %pass / %j u.boot]~)
|
||||
|
@ -12,53 +12,61 @@
|
||||
|% :: interfaces
|
||||
++ move {p/duct q/(wind note gift:able)} :: local move
|
||||
++ note :: out request $->
|
||||
$% $: $a :: to %ames
|
||||
$% {$want p/ship q/{path *}} ::
|
||||
== == ::
|
||||
$: $b :: to %behn
|
||||
$% {$wait p/@da} ::
|
||||
{$rest p/@da} ::
|
||||
== == ::
|
||||
$: $d :: to %dill
|
||||
$% {$flog p/{$crud p/@tas q/(list tank)}} ::
|
||||
== == ::
|
||||
$: $e :: to self
|
||||
$% {$thud ~} :: proxied death
|
||||
{$this p/? q/clip r/httq} :: proxied request
|
||||
{$meta vase} :: type check
|
||||
== == ::
|
||||
$: $f ::
|
||||
$% [%build live=? schematic=schematic:ford]
|
||||
[%kill ~]
|
||||
== ==
|
||||
$: $g :: to %gall
|
||||
$% {$deal p/sock q/cush:gall} :: full transmission
|
||||
$~ [%b %wait *@da] ::
|
||||
$% $: %a :: to %ames
|
||||
$>(%want task:able:ames) ::
|
||||
== ::
|
||||
$: %b :: to %behn
|
||||
$> $? %rest ::
|
||||
%wait ::
|
||||
== ::
|
||||
task:able:behn ::
|
||||
== ::
|
||||
$: %d :: to %dill
|
||||
$>(%flog task:able:dill) ::
|
||||
== ::
|
||||
$: %e :: to self
|
||||
$% [%meta vase] :: type check
|
||||
$> $? %this :: proxied request
|
||||
%thud :: proxied death
|
||||
== ::
|
||||
task:able ::
|
||||
== == ::
|
||||
$: %f ::
|
||||
$> $? %build ::
|
||||
%kill ::
|
||||
== ::
|
||||
task:able:ford ::
|
||||
== ::
|
||||
$: %g :: to %gall
|
||||
$>(%deal task:able:gall) :: full transmission
|
||||
== ::
|
||||
$: %j :: to %jael
|
||||
$% [%turf ~] :: view domains
|
||||
== == == ::
|
||||
$>(%turf task:able:jael) :: view domains
|
||||
== == ::
|
||||
++ sign :: in result $<-
|
||||
$% $: $a :: by %ames
|
||||
$% {$woot p/ship q/coop} :: acknowledgment
|
||||
== == ::
|
||||
$: $b :: by %behn
|
||||
$% {$wake error=(unit tang)} :: timer activate
|
||||
== == ::
|
||||
$: $g :: by %gall
|
||||
$% {$unto p/cuft:gall} :: within agent
|
||||
== == ::
|
||||
$: $e :: by self
|
||||
$% {$thou p/httr} :: response for proxy
|
||||
== == ::
|
||||
$: $f
|
||||
$% [%made date=@da result=made-result:ford] ::
|
||||
== ==
|
||||
$: %j :: from %jael
|
||||
$% [%turf turf=(list turf)] :: bind to domains
|
||||
== == ::
|
||||
$~ [%b %wake ~] ::
|
||||
$% $: %a :: by %ames
|
||||
$>(%woot gift:able:ames) :: acknowledgment
|
||||
== ::
|
||||
$: %b :: by %behn
|
||||
$>(%wake gift:able:behn) :: timer activate
|
||||
== ::
|
||||
$: %g :: by %gall
|
||||
$>(%unto gift:able:gall) :: within agent
|
||||
== ::
|
||||
$: %e :: by self
|
||||
$>(%thou gift:able) :: response for proxy
|
||||
== ::
|
||||
$: %f :: by %ford
|
||||
$>(%made gift:able:ford) :: build result
|
||||
== ::
|
||||
$: %j :: by %jael
|
||||
$>(%turf gift:able:jael) :: bind to domains
|
||||
== ::
|
||||
$: @tas :: by any
|
||||
$% {$crud p/@tas q/(list tank)} ::
|
||||
== == == ::
|
||||
$>(%crud vane-task) :: XX strange
|
||||
== == ::
|
||||
++ ixor @t :: oryx hash
|
||||
++ whir $@ ~ :: wire subset
|
||||
$% {$ac p/hole q/whir} :: cookied
|
||||
|
@ -144,45 +144,33 @@
|
||||
==
|
||||
:: +note: private request from ford to another vane
|
||||
::
|
||||
+= note
|
||||
+$ note
|
||||
$~ [%c %warp *@p *riff:clay]
|
||||
$% :: %c: to clay
|
||||
::
|
||||
$: %c
|
||||
:: %warp: internal (intra-ship) file request
|
||||
::
|
||||
$% $: %warp
|
||||
:: ship: target for request
|
||||
::
|
||||
=ship
|
||||
:: riff: clay request contents
|
||||
::
|
||||
riff=riff:clay
|
||||
== == == ==
|
||||
$>(%warp task:able:clay)
|
||||
== ==
|
||||
:: +sign: private response from another vane to ford
|
||||
::
|
||||
+= sign
|
||||
+$ sign
|
||||
$~ [%c %writ *riot:clay]
|
||||
$? :: %c: from clay
|
||||
::
|
||||
:: XX also from behn due to %slip asynchronicity
|
||||
::
|
||||
$: ?(%b %c)
|
||||
:: %writ: internal (intra-ship) file response
|
||||
$> $? :: %writ: internal (intra-ship) file response
|
||||
::
|
||||
$% $: %writ
|
||||
:: riot: response contents
|
||||
::
|
||||
riot=riot:clay
|
||||
==
|
||||
%writ
|
||||
:: %wris: response to %mult; many changed files
|
||||
::
|
||||
$: %wris
|
||||
:: case: case of the new files
|
||||
::
|
||||
:: %wris can only return dates to us.
|
||||
::
|
||||
case=[%da p=@da]
|
||||
:: care-paths: the +care:clay and +path of each file
|
||||
::
|
||||
care-paths=(set [care=care:clay =path])
|
||||
== == == ==
|
||||
%wris
|
||||
==
|
||||
gift:able:clay
|
||||
== ==
|
||||
--
|
||||
|%
|
||||
:: +axle: overall ford state
|
||||
@ -6259,6 +6247,8 @@
|
||||
^- [(list move) ford-state]
|
||||
::
|
||||
?> ?=([@tas %wris *] sign)
|
||||
=* case-sign p.sign
|
||||
=* care-paths-sign q.sign
|
||||
=+ [ship desk date]=(raid:wired t.wire ~[%p %tas %da])
|
||||
=/ disc [ship desk]
|
||||
::
|
||||
@ -6281,7 +6271,7 @@
|
||||
=* event-args [[our i.ducts now scry-gate] state.ax]
|
||||
=* rebuild rebuild:(per-event event-args)
|
||||
=^ duct-moves state.ax
|
||||
(rebuild subscription p.case.sign disc care-paths.sign)
|
||||
(rebuild subscription p.case-sign disc care-paths-sign)
|
||||
::
|
||||
$(ducts t.ducts, moves (weld moves duct-moves))
|
||||
:: +take-unblocks: unblock all builds waiting on this scry request
|
||||
@ -6290,6 +6280,7 @@
|
||||
^- [(list move) ford-state]
|
||||
::
|
||||
?> ?=([@tas %writ *] sign)
|
||||
=* riot-sign p.sign
|
||||
:: scry-request: the +scry-request we had previously blocked on
|
||||
::
|
||||
=/ =scry-request
|
||||
@ -6300,9 +6291,9 @@
|
||||
:: If the result is `~`, the requested resource was not available.
|
||||
::
|
||||
=/ scry-result=(unit cage)
|
||||
?~ riot.sign
|
||||
?~ riot-sign
|
||||
~
|
||||
`r.u.riot.sign
|
||||
`r.u.riot-sign
|
||||
::
|
||||
=/ ducts=(list ^duct)
|
||||
~| [%ford-take-missing-scry-request scry-request]
|
||||
|
@ -94,10 +94,40 @@
|
||||
[%vent-result p=vent-result] :: tmp workaround
|
||||
== ::
|
||||
++ card :: i/o action
|
||||
(wind note:able gift) ::
|
||||
(wind note gift) ::
|
||||
:: ::
|
||||
++ move :: output
|
||||
{p/duct q/card} ::
|
||||
:: ::
|
||||
+$ note :: out request $->
|
||||
$~ [%b %wait *@da] ::
|
||||
$% $: %b :: to %behn
|
||||
$> $? %rest :: cancel timer
|
||||
%wait :: set timer
|
||||
== ::
|
||||
task:able:behn ::
|
||||
== ::
|
||||
$: %e :: to %eyre
|
||||
$>(%hiss task:able:eyre) :: http request
|
||||
== ::
|
||||
$: %a :: to %ames
|
||||
$>(%want task:able:ames) :: send message
|
||||
== ::
|
||||
$: %j :: to self
|
||||
$>(%look task) :: set ethereum source
|
||||
== ::
|
||||
$: @tas ::
|
||||
$% $>(%init vane-task) :: report install
|
||||
$>(%sunk vane-task) :: report death
|
||||
== == == ::
|
||||
:: ::
|
||||
+$ sign :: in result $<-
|
||||
$~ [%b %wake ~] ::
|
||||
$% [%b $>(%wake gift:able:behn)] :: wakeup
|
||||
[%e $>(%sigh gift:able:eyre)] :: marked http response
|
||||
[%j $>(%vent gift)] :: ethereum changes
|
||||
[%a $>(%woot gift:able:ames)] :: message result
|
||||
== ::
|
||||
-- ::
|
||||
:: ::::
|
||||
:::: # light :: light cores
|
||||
@ -1125,7 +1155,7 @@
|
||||
%+ exec [d ~ ~]
|
||||
:+ %pass
|
||||
/(scot %p our)/vent-result
|
||||
^- note:able
|
||||
^- note
|
||||
[%a %want who /j/(scot %p our)/vent-result %vent-result res]
|
||||
::
|
||||
++ extract-snap :: extract rewind point
|
||||
@ -1710,7 +1740,7 @@
|
||||
:: +wrap-note: %pass a note using a made-up duct
|
||||
::
|
||||
++ wrap-note
|
||||
|= [wir=wire not=note:able]
|
||||
|= [wir=wire not=note]
|
||||
^- move
|
||||
:- [/jael/eth-logic ~ ~]
|
||||
[%pass (weld /(scot %p our) wir) not]
|
||||
@ -2218,7 +2248,7 @@
|
||||
%+ exec [d ~ ~]
|
||||
:+ %pass
|
||||
/(scot %p our)/vent-result
|
||||
^- note:able
|
||||
^- note
|
||||
[%a %want who /j/(scot %p our)/vent-result %vent-result res]
|
||||
:: :: ++feed:su
|
||||
--
|
||||
|
244
sys/zuse.hoon
244
sys/zuse.hoon
@ -187,6 +187,31 @@
|
||||
[%transfer-proxy new=address] :: ChangedTransferProxy
|
||||
==
|
||||
--
|
||||
:: +vane-task: general tasks shared across vanes
|
||||
::
|
||||
+$ vane-task
|
||||
$% :: i/o device replaced (reset state)
|
||||
::
|
||||
[%born ~]
|
||||
:: error report
|
||||
::
|
||||
[%crud p=@tas q=(list tank)]
|
||||
:: boot completed (XX legacy)
|
||||
::
|
||||
[%init p=ship]
|
||||
:: peer discontinuity
|
||||
::
|
||||
[%sunk p=ship q=rift]
|
||||
:: kernel upgraded
|
||||
::
|
||||
[%vega ~]
|
||||
:: produce labeled state (for memory measurement)
|
||||
::
|
||||
[%wegh ~]
|
||||
:: receive message via %ames
|
||||
::
|
||||
[%west p=ship q=path r=*]
|
||||
==
|
||||
:: ::::
|
||||
:::: ++ames :: (1a) network
|
||||
:: ::::
|
||||
@ -197,26 +222,6 @@
|
||||
:: ::::
|
||||
++ able ^?
|
||||
|%
|
||||
++ note :: out request $->
|
||||
$% $: $b :: to %behn
|
||||
$% {$rest p/@da} :: cancel timer
|
||||
{$wait p/@da} :: set timer
|
||||
== == ::
|
||||
$: $d :: to %dill
|
||||
$% {$flog p/flog:dill} ::
|
||||
== == ::
|
||||
$: %j :: to %jael
|
||||
$% [%meet =ship =life =pass] :: neighbor
|
||||
[%pubs =ship] :: view public keys
|
||||
[%turf ~] :: view domains
|
||||
[%vein ~] :: view private keys
|
||||
== == ::
|
||||
$: $g :: to %gall
|
||||
$% {$deal p/sock q/cush:gall} ::
|
||||
== == ::
|
||||
$: @tas :: to any
|
||||
$% {$west p/ship q/path r/*} ::
|
||||
== == == ::
|
||||
++ gift :: out result <-$
|
||||
$% {$mack p/(unit tang)} :: acknowledgement
|
||||
{$mass p/mass} :: memory usage
|
||||
@ -224,40 +229,22 @@
|
||||
{$turf p/(list turf)} :: bind to domains
|
||||
{$woot p/ship q/coop} :: reaction message
|
||||
== ::
|
||||
++ sign :: in result _<-
|
||||
$% $: $b :: to %behn
|
||||
$% {$wake error=(unit tang)} :: timer activate
|
||||
== == ::
|
||||
$: %j :: from %jael
|
||||
$% [%pubs public:able:jael] :: public keys
|
||||
[%turf turf=(list turf)] :: bind to domains
|
||||
[%vein =life vein=(map life ring)] :: private keys
|
||||
== == ::
|
||||
$: $g :: from %gall
|
||||
$% {$unto p/cuft:gall} ::
|
||||
{$mean p/ares} :: XX old clean up
|
||||
{$nice ~} ::
|
||||
== == ::
|
||||
$: @tas ::
|
||||
$% {$crud p/@tas q/(list tank)} :: by any
|
||||
{$mack p/(unit tang)} :: message ack
|
||||
{$woot p/ship q/coop} :: reaction message
|
||||
== == == ::
|
||||
++ task :: in request ->$
|
||||
$~ [%vega ~] ::
|
||||
$% {$barn ~} :: new unix process
|
||||
{$bonk ~} :: reset the timer
|
||||
{$crud p/@tas q/(list tank)} :: error with trace
|
||||
$>(%crud vane-task) :: error with trace
|
||||
{$hear p/lane q/@} :: receive packet
|
||||
{$halo p/lane q/@ r/ares} :: hole with trace
|
||||
{$hole p/lane q/@} :: packet failed
|
||||
[%init p=ship] :: report install
|
||||
$>(%init vane-task) :: report install
|
||||
{$kick p/@da} :: wake up
|
||||
{$nuke p/@p} :: toggle auto-block
|
||||
{$sunk p=ship q=rift} :: report death
|
||||
{$vega ~} :: report upgrade
|
||||
$>(%sunk vane-task) :: report death
|
||||
$>(%vega vane-task) :: report upgrade
|
||||
{$wake ~} :: timer activate
|
||||
{$wegh ~} :: report memory
|
||||
{$west p/ship q/path r/*} :: network request
|
||||
$>(%wegh vane-task) :: report memory
|
||||
$>(%west vane-task) :: network request
|
||||
{$want p/ship q/path r/*} :: forward message
|
||||
== ::
|
||||
-- ::able
|
||||
@ -423,13 +410,6 @@
|
||||
:: ::::
|
||||
++ able ^?
|
||||
|%
|
||||
++ note :: out request $->
|
||||
$% $: %b :: to %behn
|
||||
$% [%wait p=@da]
|
||||
== ==
|
||||
$: %d :: to %dill
|
||||
$% [%flog =flog:dill]
|
||||
== == ==
|
||||
++ gift :: out result <-$
|
||||
$% [%doze p=(unit @da)] :: next alarm
|
||||
[%mass p=mass] :: memory usage
|
||||
@ -437,14 +417,15 @@
|
||||
[%meta p=vase]
|
||||
==
|
||||
++ task :: in request ->$
|
||||
$% [%born ~] :: new unix process
|
||||
[%crud tag=@tas =tang] :: error with trace
|
||||
$~ [%vega ~] ::
|
||||
$% $>(%born vane-task) :: new unix process
|
||||
$>(%crud vane-task) :: error with trace
|
||||
[%rest p=@da] :: cancel alarm
|
||||
[%drip p=vase] :: give in next event
|
||||
[%vega ~] :: report upgrade
|
||||
$>(%vega vane-task) :: report upgrade
|
||||
[%wait p=@da] :: set alarm
|
||||
[%wake ~] :: timer activate
|
||||
[%wegh ~] :: report memory
|
||||
$>(%wegh vane-task) :: report memory
|
||||
==
|
||||
-- ::able
|
||||
-- ::behn
|
||||
@ -475,14 +456,15 @@
|
||||
{$wris p/{$da p/@da} q/(set (pair care path))} :: many changes
|
||||
== ::
|
||||
++ task :: in request ->$
|
||||
$~ [%vega ~] ::
|
||||
$% {$boat ~} :: pier rebooted
|
||||
{$cred nom/@ta cew/crew} :: set permission group
|
||||
{$crew ~} :: permission groups
|
||||
{$crow nom/@ta} :: group usage
|
||||
{$crud p/@tas q/(list tank)} :: error with trace
|
||||
$>(%crud vane-task) :: error with trace
|
||||
{$drop des/desk} :: cancel pending merge
|
||||
{$info des/desk dit/nori} :: internal edit
|
||||
{$init our/@p} :: report install
|
||||
$>(%init vane-task) :: report install
|
||||
{$into des/desk all/? fis/mode} :: external edit
|
||||
$: $merg :: merge desks
|
||||
des/desk :: target
|
||||
@ -493,12 +475,12 @@
|
||||
{$dirk des/desk} :: mark mount dirty
|
||||
{$ogre pot/$@(desk beam)} :: delete mount point
|
||||
{$perm des/desk pax/path rit/rite} :: change permissions
|
||||
{$sunk p=ship q=rift} :: report death
|
||||
{$vega ~} :: report upgrade
|
||||
$>(%sunk vane-task) :: report death
|
||||
$>(%vega vane-task) :: report upgrade
|
||||
{$warp wer/ship rif/riff} :: internal file req
|
||||
{$werp who/ship wer/ship rif/riff} :: external file req
|
||||
{$wegh ~} :: report memory
|
||||
{$west wer/ship pax/path res/*} :: network request
|
||||
$>(%wegh vane-task) :: report memory
|
||||
$>(%west vane-task) :: network request
|
||||
== ::
|
||||
-- ::able
|
||||
::
|
||||
@ -646,24 +628,25 @@
|
||||
{$verb ~} :: verbose mode
|
||||
== ::
|
||||
++ task :: in request ->$
|
||||
$~ [%vega ~] ::
|
||||
$% {$belt p/belt} :: terminal input
|
||||
{$blew p/blew} :: terminal config
|
||||
{$boot p/*} :: weird %dill boot
|
||||
{$crud p/@tas q/(list tank)} :: error with trace
|
||||
$>(%crud vane-task) :: error with trace
|
||||
{$flog p/flog} :: wrapped error
|
||||
{$flow p/@tas q/(list gill:gall)} :: terminal config
|
||||
{$hail ~} :: terminal refresh
|
||||
{$heft ~} :: memory report
|
||||
{$hook ~} :: this term hung up
|
||||
{$harm ~} :: all terms hung up
|
||||
{$init p/ship} :: after gall ready
|
||||
$>(%init vane-task) :: after gall ready
|
||||
{$lyra p/@t q/@t} :: upgrade kernel
|
||||
{$noop ~} :: no operation
|
||||
{$sunk p=ship q=rift} :: report death
|
||||
$>(%sunk vane-task) :: report death
|
||||
{$talk p/tank} ::
|
||||
{$text p/tape} ::
|
||||
{$veer p/@ta q/path r/@t} :: install vane
|
||||
{$vega ~} :: report upgrade
|
||||
$>(%vega vane-task) :: report upgrade
|
||||
{$verb ~} :: verbose mode
|
||||
== ::
|
||||
-- ::able
|
||||
@ -749,23 +732,24 @@
|
||||
[%vega p=@t q=@t] :: drop-through
|
||||
== ::
|
||||
+= task :: in request ->$
|
||||
$% [%born p=(list host)] :: new unix process
|
||||
[%crud p=@tas q=(list tank)] :: XX rethink
|
||||
$~ [%vega ~] ::
|
||||
$% [%born p=(list host)] :: XX vane-task
|
||||
$>(%crud vane-task) :: XX rethink
|
||||
[%hiss p=(unit user) q=mark r=cage] :: outbound user req
|
||||
[%init p=@p] :: report install
|
||||
$>(%init vane-task) :: report install
|
||||
[%live p=@ud q=(unit @ud)] :: http/s ports
|
||||
[%rule p=http-rule] :: update config
|
||||
[%serv p=$@(desk beam)] :: set serving root
|
||||
[%sunk p=ship q=rift] :: report death
|
||||
$>(%sunk vane-task) :: report death
|
||||
[%them p=(unit hiss)] :: outbound request
|
||||
[%they p=@ud q=httr] :: inbound response
|
||||
[%chis p=? q=clip r=httq] :: IPC inbound request
|
||||
[%this p=? q=clip r=httq] :: inbound request
|
||||
[%thud ~] :: inbound cancel
|
||||
[%vega ~] :: report upgrade
|
||||
[%wegh ~] :: report memory
|
||||
$>(%vega vane-task) :: report upgrade
|
||||
$>(%wegh vane-task) :: report memory
|
||||
[%well p=path q=(unit mime)] :: put/del .well-known
|
||||
[%west p=ship q=[path *]] :: network request
|
||||
$>(%west vane-task) :: network request
|
||||
[%wise p=ship q=prox] :: proxy notification
|
||||
== ::
|
||||
-- ::able
|
||||
@ -977,6 +961,7 @@
|
||||
:: +task:able:ford: requests to ford
|
||||
::
|
||||
+= task
|
||||
$~ [%vega ~]
|
||||
$% :: %build: perform a build, either live or once
|
||||
::
|
||||
$: %build
|
||||
@ -998,13 +983,13 @@
|
||||
[%kill ~]
|
||||
:: %sunk: receive a report that a foreign ship has lost continuity
|
||||
::
|
||||
[%sunk =ship =rift]
|
||||
$>(%sunk vane-task)
|
||||
:: %vega: report kernel upgrade
|
||||
::
|
||||
[%vega ~]
|
||||
$>(%vega vane-task)
|
||||
:: %wegh: produce memory usage information
|
||||
::
|
||||
[%wegh ~]
|
||||
$>(%wegh vane-task)
|
||||
:: %wipe: wipes stored builds
|
||||
::
|
||||
[%wipe percent-to-remove=@ud]
|
||||
@ -1689,13 +1674,14 @@
|
||||
{$mack p/(unit tang)} :: message ack
|
||||
== ::
|
||||
++ task :: incoming request
|
||||
$~ [%vega ~] ::
|
||||
$% {$conf p/dock q/culm} :: configure app
|
||||
{$init p/ship} :: set owner
|
||||
$>(%init vane-task) :: set owner
|
||||
{$deal p/sock q/cush} :: full transmission
|
||||
{$sunk p=ship q/rift} :: report death
|
||||
{$vega ~} :: report upgrade
|
||||
{$west p/ship q/path r/*} :: network request
|
||||
{$wegh ~} :: report memory
|
||||
$>(%sunk vane-task) :: report death
|
||||
$>(%vega vane-task) :: report upgrade
|
||||
$>(%west vane-task) :: network request
|
||||
$>(%wegh vane-task) :: report memory
|
||||
== ::
|
||||
-- ::able
|
||||
++ bitt (map bone (pair ship path)) :: incoming subs
|
||||
@ -1822,26 +1808,6 @@
|
||||
[%vent p=vent-result] :: ethereum changes
|
||||
== ::
|
||||
:: ::
|
||||
++ note :: out request $->
|
||||
=, eyre ::
|
||||
$% $: %b ::
|
||||
$% [%rest p=@da] :: cancel timer
|
||||
[%wait p=@da] :: wait until
|
||||
== == ::
|
||||
$: %e ::
|
||||
$% [%hiss p=(unit user) q=mark r=cage] :: outbound user req
|
||||
== == ::
|
||||
$: %a ::
|
||||
$% [%want p=ship q=path r=*] :: send message
|
||||
== == ::
|
||||
$: %j ::
|
||||
$% [%vent-result p=vent-result] :: tmp workaround
|
||||
[%look src=(each ship purl:eyre)] ::
|
||||
== == ::
|
||||
$: @tas ::
|
||||
$% [%init p=ship] :: report install
|
||||
[%sunk p=ship q=rift] :: report death
|
||||
== == == ::
|
||||
++ public :: public key state
|
||||
$: life=life :: current key number
|
||||
pubs=(map life pass) :: pubkeys by number
|
||||
@ -1853,17 +1819,12 @@
|
||||
::
|
||||
+$ seed [who=ship lyf=life key=ring sig=(unit oath:pki)]
|
||||
::
|
||||
++ sign :: in result $<-
|
||||
$% {$b $wake error=(unit tang)} :: wakeup
|
||||
[%e %sigh p=cage] :: marked http response
|
||||
[%j %vent p=vent-result] :: ethereum changes
|
||||
[%a %woot p=ship q=coop] :: message result
|
||||
== ::
|
||||
++ tally :: balance update
|
||||
%+ each balance :: complete
|
||||
action :: change
|
||||
::
|
||||
+= task :: in request ->$
|
||||
$~ [%vega ~] ::
|
||||
$% [%burn p=ship q=safe] :: destroy rights
|
||||
[%hail p=ship q=remote] :: remote update
|
||||
$: %dawn :: boot from keys
|
||||
@ -1885,13 +1846,13 @@
|
||||
[%meet =ship =life =pass] :: met after breach
|
||||
[%snap snap=snapshot kick=?] :: load snapshot
|
||||
[%turf ~] :: view domains
|
||||
[%vega ~] :: report upgrade
|
||||
$>(%vega vane-task) :: report upgrade
|
||||
[%vein ~] :: view signing keys
|
||||
[%vent ~] :: view ethereum events
|
||||
[%vest ~] :: view public balance
|
||||
[%vine ~] :: view secret history
|
||||
[%wegh ~] :: memory usage request
|
||||
[%west p=ship q=path r=*] :: remote request
|
||||
$>(%wegh vane-task) :: memory usage request
|
||||
$>(%west vane-task) :: remote request
|
||||
[%wind p=@ud] :: rewind before block
|
||||
== ::
|
||||
-- ::
|
||||
@ -7105,20 +7066,55 @@
|
||||
{$j gift:able:jael}
|
||||
==
|
||||
::
|
||||
++ unix-task :: input from unix
|
||||
$% {$belt p/belt:dill} :: dill: keyboard
|
||||
{$blew p/blew:dill} :: dill: configure
|
||||
{$boat ~} :: clay: reboot
|
||||
{$born ~} :: eyre: new process
|
||||
[%crud tag=@tas =tang] :: any vane: error report
|
||||
{$hail ~} :: dill: refresh
|
||||
{$hear p/lane:ames q/@} :: ames: input packet
|
||||
{$hook ~} :: dill: hangup
|
||||
{$into p/desk q/? r/mode:clay} :: clay: external edit
|
||||
{$they p/@ud q/httr:eyre} :: eyre: in response
|
||||
{$this p/? q/clip:eyre r/httq:eyre} :: eyre: in request
|
||||
{$thud ~} :: eyre: in cancel
|
||||
{$wake ~} :: behn: wakeup
|
||||
+$ unix-task :: input from unix
|
||||
$~ [%wake ~]
|
||||
$% :: %ames: new process
|
||||
::
|
||||
$>(%barn task:able:ames)
|
||||
:: %dill: keyboard input
|
||||
::
|
||||
$>(%belt task:able:dill)
|
||||
:: %dill: configure terminal (resized)
|
||||
::
|
||||
$>(%blew task:able:dill)
|
||||
:: %clay: new process
|
||||
::
|
||||
$>(%boat task:able:clay)
|
||||
:: %behn/%eyre: new process
|
||||
::
|
||||
:: XX %eyre includes payload
|
||||
::
|
||||
$>(%born vane-task)
|
||||
:: any vane: error report
|
||||
::
|
||||
$>(%crud vane-task)
|
||||
:: %dill: reset terminal configuration
|
||||
::
|
||||
$>(%hail task:able:dill)
|
||||
:: %ames: hear packet
|
||||
::
|
||||
$>(%hear task:able:ames)
|
||||
:: %dill: hangup
|
||||
::
|
||||
$>(%hook task:able:dill)
|
||||
:: %clay: external edit
|
||||
::
|
||||
$>(%into task:able:clay)
|
||||
:: %eyre: learn ports of live http servers
|
||||
::
|
||||
$>(%live task:able:eyre)
|
||||
:: %eyre: hear http response
|
||||
::
|
||||
$>(%they task:able:eyre)
|
||||
:: %eyre: hear http request
|
||||
::
|
||||
$>(%this task:able:eyre)
|
||||
:: %eyre: hear http request cancellation
|
||||
::
|
||||
$>(%thud task:able:eyre)
|
||||
:: %behn: wakeup
|
||||
::
|
||||
$>(%wake task:able:behn)
|
||||
==
|
||||
:: ::
|
||||
:::: ++azimuth :: (2az) azimuth
|
||||
|
35
tests/sys/hoon/molds.hoon
Normal file
35
tests/sys/hoon/molds.hoon
Normal file
@ -0,0 +1,35 @@
|
||||
/+ *test
|
||||
|%
|
||||
++ test-set
|
||||
;: weld
|
||||
%+ expect-eq
|
||||
!> (some (sy 1 2 ~))
|
||||
!> ((soft (set)) [2 [1 ~ ~] ~])
|
||||
::
|
||||
%+ expect-eq
|
||||
!> ~
|
||||
!> ((soft (set)) [2 ~ [1 ~ ~]])
|
||||
==
|
||||
::
|
||||
++ test-map
|
||||
;: weld
|
||||
%+ expect-eq
|
||||
!> (some (my [1 2] [3 4] ~))
|
||||
!> ((soft (map)) [[1 2] ~ [[3 4] ~ ~]])
|
||||
::
|
||||
%+ expect-eq
|
||||
!> ~
|
||||
!> ((soft (map)) [[1 2] [[3 4] ~ ~] ~])
|
||||
==
|
||||
::
|
||||
++ test-qeu
|
||||
;: weld
|
||||
%+ expect-eq
|
||||
!> (some (~(gas to *(qeu)) "abcd"))
|
||||
!> ((soft (qeu)) [98 [100 ~ [99 ~ ~]] [97 ~ ~]])
|
||||
::
|
||||
%+ expect-eq
|
||||
!> ~
|
||||
!> ((soft (qeu)) [98 [97 ~ ~] [100 ~ [99 ~ ~]]])
|
||||
==
|
||||
--
|
@ -121,7 +121,7 @@
|
||||
++ jael-take
|
||||
|= $: jael-gate=_jael-gate
|
||||
now=@da
|
||||
take-args=[=wire =duct wrapped-task=(hypo sign:able:jael-gate)]
|
||||
take-args=[=wire =duct wrapped-task=(hypo sign:jael-gate)]
|
||||
expected-moves=(list move:jael-gate)
|
||||
==
|
||||
^- [tang _jael-gate]
|
||||
@ -141,7 +141,7 @@
|
||||
++ jael-take-with-comparator
|
||||
|= $: jael-gate=_jael-gate
|
||||
now=@da
|
||||
take-args=[=wire =duct wrapped-task=(hypo sign:able:jael-gate)]
|
||||
take-args=[=wire =duct wrapped-task=(hypo sign:jael-gate)]
|
||||
move-comparator=$-((list move:jael-gate) tang)
|
||||
==
|
||||
^- [tang _jael-gate]
|
||||
|
Loading…
Reference in New Issue
Block a user