adds |mass to %lient and %rver

This commit is contained in:
Joe Bryan 2019-03-12 18:13:25 -07:00
parent 5da8c8bdf3
commit f9ba9bfd6e
4 changed files with 70 additions and 18 deletions

View File

@ -16,10 +16,11 @@
$: a/(unit mass) ::
b/(unit mass) ::
c/(unit mass) ::
e/(unit mass) ::
f/(unit mass) ::
g/(unit mass) ::
j/(unit mass) ::
l/(unit mass) ::
r/(unit mass) ::
== ::
== ::
++ axon :: dill per duct
@ -56,9 +57,6 @@
{$veer p/@ta q/path r/@t} :: install vane
{$verb $~} :: verbose mode
== ::
++ note-eyre ::
$% {$wegh $~} ::
== ::
++ note-ford ::
$% {$wegh $~} ::
== ::
@ -78,17 +76,24 @@
snap=(unit snapshot:jael) :: head start
== ::
[%fake our=ship] :: boot fake
[%wegh ~]
[%wegh ~] ::
== ::
++ note-lient ::
$% [%wegh ~] ::
== ::
++ note-rver ::
$% [%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} ::
{$l note-lient} ::
{$r note-rver} ::
== ::
++ sign-ames ::
$% {$nice $~} ::
@ -108,9 +113,6 @@
++ sign-dill ::
$% {$blit p/(list blit)} ::
== ::
++ sign-eyre ::
$% {$mass p/mass} ::
== ::
++ sign-ford ::
$% {$mass p/mass} ::
== ::
@ -121,17 +123,24 @@
== ::
++ sign-jael ::
$% [%init p=ship] ::
[%mass p=mass]
[%mass p=mass] ::
== ::
++ sign-lient ::
$% [%mass p=mass] ::
== ::
++ sign-rver ::
$% [%mass p=mass] ::
== ::
++ 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} ::
{$l sign-lient} ::
{$r sign-rver} ::
==
:::::::: :: dill tiles
--
@ -279,10 +288,11 @@
:* [hen %pass /heft/ames %a %wegh ~]
[hen %pass /heft/behn %b %wegh ~]
[hen %pass /heft/clay %c %wegh ~]
[hen %pass /heft/eyre %e %wegh ~]
[hen %pass /heft/ford %f %wegh ~]
[hen %pass /heft/gall %g %wegh ~]
[hen %pass /heft/jael %j %wegh ~]
[hen %pass /heft/lient %l %wegh ~]
[hen %pass /heft/rver %r %wegh ~]
moz
==
==
@ -377,7 +387,7 @@
|= sih/sign
^+ +>
?- sih
{?($a $b $c $e $f $g $j) $mass *}
{?($a $b $c $f $g $j $l $r) $mass *}
(wegh -.sih p.sih)
::
{$a $nice *}
@ -432,7 +442,7 @@
:: +wegh: receive a memory report from a vane and maybe emit full report
::
++ wegh
|= {lal/?($a $b $c $e $f $g $j) mas/mass}
|= {lal/?($a $b $c $f $g $j $l $r) mas/mass}
^+ +>
:: update our listing of vane responses with this new one
::
@ -441,20 +451,22 @@
$a ~?(?=(^ a.hef.all) %double-mass-a hef.all(a `mas))
$b ~?(?=(^ b.hef.all) %double-mass-b hef.all(b `mas))
$c ~?(?=(^ c.hef.all) %double-mass-c hef.all(c `mas))
$e ~?(?=(^ e.hef.all) %double-mass-e hef.all(e `mas))
$f ~?(?=(^ f.hef.all) %double-mass-f hef.all(f `mas))
$g ~?(?=(^ g.hef.all) %double-mass-g hef.all(g `mas))
$j ~?(?=(^ j.hef.all) %double-mass-j hef.all(j `mas))
$l ~?(?=(^ l.hef.all) %double-mass-l hef.all(l `mas))
$r ~?(?=(^ r.hef.all) %double-mass-r hef.all(r `mas))
==
:: if not all vanes have responded yet, no-op
::
?. ?& ?=(^ a.hef.all)
?=(^ b.hef.all)
?=(^ c.hef.all)
?=(^ e.hef.all)
?=(^ f.hef.all)
?=(^ g.hef.all)
?=(^ j.hef.all)
?=(^ l.hef.all)
?=(^ r.hef.all)
==
+>.$
:: clear vane reports from our state before weighing ourself
@ -462,8 +474,8 @@
:: Otherwise, the state of vanes printed after this one get absorbed
:: into Dill's %dot catchall report.
::
=/ ven=(list mass) ~[u.a u.b u.c u.e u.g u.f u.j]:hef.all
=> .(hef.all [~ ~ ~ ~ ~ ~ ~])
=/ ven=(list mass) ~[u.a u.b u.c u.g u.f u.j u.l u.r]:hef.all
=> .(hef.all [~ ~ ~ ~ ~ ~ ~ ~])
:: wegh ourself now that our state doesn't include other masses
::
=/ self=mass

View File

@ -342,6 +342,20 @@
%receive
=^ moves state.ax (receive:client +.task)
[moves light-gate]
::
%wegh
:_ light-gate
:~ :* duct
%give
%mass
^- mass
:+ %lient %|
:~ nex+&+next-id.state.ax
outbound+&+outbound-duct.state.ax
by-id+&+connection-by-id.state.ax
by-duct+&+connection-by-duct.state.ax
axle+&+ax
== == ==
==
:: http-client issues no requests to other vanes
::

View File

@ -1666,6 +1666,20 @@
%disconnect
=. server-state.ax (remove-binding:server binding.task)
[~ http-server-gate]
::
%wegh
:_ http-server-gate
:~ :* duct
%give
%mass
^- mass
:+ %rver %|
:~ bindings+&+bindings.server-state.ax
auth+&+authentication-state.server-state.ax
connections+&+connections.server-state.ax
channels+&+channel-state.server-state.ax
axle+&+ax
== == ==
==
::
++ take

View File

@ -2057,6 +2057,9 @@
:: %response: response to the caller
::
[%http-response =client-response]
:: memory usage report
::
[%mass =mass]
==
::
++ task
@ -2075,6 +2078,9 @@
:: receives http data from outside
::
[%receive id=@ud =http-event:http]
:: memory usage request
::
[%wegh ~]
==
--
:: +client-response: one or more client responses given to the caller
@ -2162,6 +2168,9 @@
:: not allowed.
::
[%bound accepted=? =binding]
:: memory usage report
::
[%mass =mass]
==
::
++ task
@ -2197,6 +2206,9 @@
:: the first place.
::
[%disconnect =binding]
:: memory usage request
::
[%wegh ~]
==
::
--