arvo: restructures |mass, switches to %x //whey

This commit is contained in:
Joe Bryan 2023-04-24 16:01:00 -04:00
parent 05304146a7
commit 5dfc8e3c5d
9 changed files with 68 additions and 62 deletions

View File

@ -1369,11 +1369,11 @@
::
%+ turn
(sort ~(tap by van.mod) |=([[a=@tas *] [b=@tas *]] (aor a b)))
=/ bem=beam [[our %base da+now] /whey] ::TODO %base?
=/ bem=beam [[our %$ da+now] //whey]
|= [nam=term =vane]
=; mas=(list mass)
nam^|+(welp mas [dot+&+q.vase typ+&+p.vase sac+&+worm ~]:vane)
?~ met=(peek [~ ~] nam bem) ~
?~ met=(peek [~ ~] [nam %x] bem) ~
?~ u.met ~
~| mass+nam
;;((list mass) q.q.u.u.met)

View File

@ -4412,15 +4412,6 @@
=* lot=coin $/r.bem
=* tyl s.bem
::
::TODO don't special-case whey scry
::
?: &(=(%$ ren) =(tyl /whey))
=/ maz=(list mass)
=+ [known alien]=(skid ~(val by peers.ames-state) |=(^ =(%known +<-)))
:~ peers-known+&+known
peers-alien+&+alien
==
``mass+!>(maz)
:: only respond for the local identity, %$ desk, current timestamp
::
?. ?& =(&+our why)
@ -4430,6 +4421,7 @@
?. for.veb.bug.ames-state ~
~> %slog.0^leaf/"ames: scry-fail {<why=why lot=lot now=now syd=syd>}"
~
:: /ax//whey (list mass)
:: /ax/protocol/version @
:: /ax/peers (map ship ?(%alien %known))
:: /ax/peers/[ship] ship-state
@ -4444,6 +4436,14 @@
?. ?=(%x ren) ~
=> .(tyl `(pole knot)`tyl)
?+ tyl ~
[%$ %whey ~]
=/ maz=(list mass)
=+ [known alien]=(skid ~(val by peers.ames-state) |=(^ =(%known +<-)))
:~ peers-known+&+known
peers-alien+&+alien
==
``mass+!>(maz)
::
[%protocol %version ~]
``noun+!>(protocol-version)
::

View File

@ -243,13 +243,6 @@
=* lot=coin $/r.bem
=* tyl s.bem
::
::TODO don't special-case whey scry
::
?: &(=(ren %$) =(tyl /whey))
=/ maz=(list mass)
:~ timers+&+timers.state
==
``mass+!>(maz)
:: only respond for the local identity, %$ desk, current timestamp
::
?. ?& =(&+our why)
@ -257,6 +250,7 @@
=(%$ syd)
==
~
:: /bx//whey (list mass) memory usage labels
:: /bx/debug/timers (list [@da duct]) all timers and their ducts
:: /bx/timers (list @da) all timer timestamps
:: /bx/timers/next (unit @da) the very next timer to fire
@ -264,6 +258,12 @@
::
?. ?=(%x ren) ~
?+ tyl [~ ~]
[%$ %whey ~]
=/ maz=(list mass)
:~ timers+&+timers.state
==
``mass+!>(maz)
::
[%debug %timers ~]
:^ ~ ~ %noun
!> ^- (list [@da duct])

View File

@ -5861,8 +5861,10 @@
::
?. ?=(%& -.why) ~
=* his p.why
?: &(=(ren %$) =(tyl /whey))
::
?: &(?=(%x ren) =(tyl //whey))
``mass+!>(whey)
::
:: ~& scry+[ren `path`[(scot %p his) syd ~(rent co lot) tyl]]
:: =- ~& %scry-done -
=+ luk=?.(?=(%$ -.lot) ~ ((soft case) p.lot))

View File

@ -489,14 +489,7 @@
::
?. ?=(%& -.why) ~
=* his p.why
::TODO don't special-case whey scry
::
?: &(=(ren %$) =(tyl /whey))
=/ maz=(list mass)
:~ hey+&+hey.all
dug+&+dug.all
==
``mass+!>(maz)
:: only respond for the local identity, %$ desk, current timestamp
::
?. ?& =(&+our why)
@ -504,10 +497,14 @@
=(%$ syd)
==
~
:: /%x//whey (list mass) memory usage labels
:: /dy/sessions (set @tas) all existing sessions
:: /du/sessions/[ses] ? does session ses exist?
::
?+ [ren tyl] ~
[%x %$ %whey ~] =- ``mass+!>(`(list mass)`-)
[hey+&+hey.all dug+&+dug.all ~]
::
[%y %sessions ~] ``noun+!>(~(key by dug.all))
[%u %sessions @ ~] ``noun+!>((~(has by dug.all) (snag 1 tyl)))
==

View File

@ -2888,15 +2888,7 @@
?. ?=(%& -.why)
~
=* who p.why
?: =(tyl /whey)
=/ maz=(list mass)
:~ bindings+&+bindings.server-state.ax
auth+&+authentication-state.server-state.ax
connections+&+connections.server-state.ax
channels+&+channel-state.server-state.ax
axle+&+ax
==
``mass+!>(maz)
::
?. ?=(%$ -.lot)
[~ ~]
?. =(our who)
@ -2904,9 +2896,17 @@
[~ ~]
~& [%r %scry-foreign-host who]
~
?: &(?=(%x ren) ?=(~ syd))
?: &(?=(%x ren) ?=(%$ syd))
=, server-state.ax
?+ tyl [~ ~]
[%$ %whey ~] =- ``mass+!>(`(list mass)`-)
:~ bindings+&+bindings.server-state.ax
auth+&+authentication-state.server-state.ax
connections+&+connections.server-state.ax
channels+&+channel-state.server-state.ax
axle+&+ax
==
::
[%cors ~] ``noun+!>(cors-registry)
[%cors %requests ~] ``noun+!>(requests.cors-registry)
[%cors %approved ~] ``noun+!>(approved.cors-registry)

View File

@ -2067,29 +2067,6 @@
(mo-peek:mo & dap routes care path)
::
=> .(path t.path)
?: &(=(care %$) =(path /whey))
=/ blocked
=/ queued (~(run by blocked.state) |=((qeu blocked-move) [%.y +<]))
(sort ~(tap by queued) aor)
::
=/ running
%+ turn (sort ~(tap by yokes.state) aor)
|= [dap=term =yoke]
^- mass
=/ met=(list mass)
=/ dat (mo-peek:mo | dap [~ ship] %x /whey/mass)
?: ?=(?(~ [~ ~]) dat) ~
(fall ((soft (list mass)) q.q.u.u.dat) ~)
?~ met
dap^&+yoke
dap^|+(welp met dot+&+yoke ~)
::
=/ maz=(list mass)
:~ [%foreign %.y contacts.state]
[%blocked %.n blocked]
[%active %.n running]
==
``mass+!>(maz)
::
?: ?& =(%u care)
=(~ path)
@ -2164,6 +2141,34 @@
::
?: ?=(%x care)
?. =(p.bem our) ~
::
?: ?=(%$ q.bem) :: app %$ reserved
?+ path ~
[%whey ~]
=/ blocked
=/ queued (~(run by blocked.state) |=((qeu blocked-move) [%.y +<]))
(sort ~(tap by queued) aor)
::
=/ running
%+ turn (sort ~(tap by yokes.state) aor)
|= [dap=term =yoke]
^- mass
=/ met=(list mass)
=/ dat (mo-peek:mo | dap [~ ship] %x /whey/mass)
?: ?=(?(~ [~ ~]) dat) ~
(fall ((soft (list mass)) q.q.u.u.dat) ~)
?~ met
dap^&+yoke
dap^|+(welp met dot+&+yoke ~)
::
=/ maz=(list mass)
:~ [%foreign %.y contacts.state]
[%blocked %.n blocked]
[%active %.n running]
==
``mass+!>(maz)
==
::
?~ yok=(~(get by yokes.state) q.bem) ~
?: ?=(%nuke -.u.yok) ~
=/ ski (~(get by sky.u.yok) path)

View File

@ -395,7 +395,7 @@
::
?. ?=(%& -.why) ~
=* his p.why
?: &(=(ren %$) =(tyl /whey))
?: &(?=(%x ren) =(tyl //whey))
=/ maz=(list mass)
:~ nex+&+next-id.state.ax
outbound+&+outbound-duct.state.ax

View File

@ -1066,13 +1066,15 @@
:: XX review for security, stability, cases other than now
::
?. =(lot [%$ %da now]) ~
?. =(%$ ren) [~ ~]
?: =(tyl /whey)
::
?: &(?=(%x ren) =(tyl //whey))
=/ maz=(list mass)
:~ pki+&+pki.lex
etn+&+etn.lex
==
``mass+!>(maz)
::
?. =(%$ ren) [~ ~]
?+ syd
~
::