mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-01 11:33:41 +03:00
arvo: refactor |mass output, make vane /whey peek optional
This commit is contained in:
parent
32e1ed0a15
commit
e8cdafddfc
@ -1294,31 +1294,30 @@
|
||||
^- mass
|
||||
=; sam=(list mass)
|
||||
:+ %arvo %|
|
||||
:~ hoon+&+pit
|
||||
zuse+&+zus.mod
|
||||
:~ :+ %hoon %|
|
||||
:~ one+&+..bloq
|
||||
two+&+..turn
|
||||
tri+&+..year
|
||||
qua+&+..sane
|
||||
pen+&+..ride
|
||||
==
|
||||
hex+&+..part
|
||||
pit+&+pit
|
||||
lull+|+[dot+&+q typ+&+p ~]:lul.mod
|
||||
zuse+|+[dot+&+q typ+&+p ~]:zus.mod
|
||||
vane+|+sam
|
||||
==
|
||||
::
|
||||
=/ von
|
||||
%+ turn
|
||||
(sort ~(tap by van.mod) |=([[a=@tas *] [b=@tas *]] (aor a b)))
|
||||
::
|
||||
:~ :+ %reports %|
|
||||
=/ bem=beam [[our %home da+now] /whey] ::TODO %base?
|
||||
%+ turn von
|
||||
|= [nam=term =vane]
|
||||
=/ met (peek [~ ~] nam bem)
|
||||
~| mass/nam
|
||||
?> &(?=(^ met) ?=(^ u.met)) :: XX make optional
|
||||
nam^|+;;((list mass) q.q.u.u.met)
|
||||
::
|
||||
:+ %caches %|
|
||||
%+ turn von
|
||||
|=([nam=term =vane] nam^&+worm.vane)
|
||||
::
|
||||
:+ %dregs %|
|
||||
%+ turn von
|
||||
|=([nam=term =vane] nam^&+vase.vane)
|
||||
==
|
||||
=/ bem=beam [[our %home da+now] /whey] ::TODO %base?
|
||||
|= [nam=term =vane]
|
||||
=; mas=(list mass)
|
||||
nam^|+(welp mas [dot+&+q.vase typ+&+p.vase sac+&+worm ~]:vane)
|
||||
?~ met=(peek [~ ~] nam bem) ~
|
||||
?~ u.met ~
|
||||
~| mass+nam
|
||||
;;((list mass) q.q.u.u.met)
|
||||
:: +peek: read from the entire namespace
|
||||
::
|
||||
++ peek
|
||||
|
Loading…
Reference in New Issue
Block a user