From 81f425489366d727377d599a88a585f06807149f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C5=8Dshin?= Date: Sun, 6 Mar 2022 16:45:55 -0500 Subject: [PATCH] vere: guarantee unique concatenated names --- pkg/urbit/vere/disk.c | 2 +- pkg/urbit/vere/io/conn.c | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/pkg/urbit/vere/disk.c b/pkg/urbit/vere/disk.c index 8d7e272e91..2bb48d9c1f 100644 --- a/pkg/urbit/vere/disk.c +++ b/pkg/urbit/vere/disk.c @@ -669,7 +669,7 @@ u3_disk_info(u3_disk* log_u) while ( red_u ) { lit = u3nc( u3_pier_mass( - c3__read, + u3dt("cat", 3, c3__read, u3dc("scot", c3__ux, u3i_chub((c3_d)red_u))), u3i_list( u3_pier_mase("start", u3i_chub(red_u->eve_d)), u3_pier_mase("final", u3i_chub(red_u->eve_d + red_u->len_d - 1)), diff --git a/pkg/urbit/vere/io/conn.c b/pkg/urbit/vere/io/conn.c index f0e8fee279..915747f9b1 100644 --- a/pkg/urbit/vere/io/conn.c +++ b/pkg/urbit/vere/io/conn.c @@ -56,15 +56,18 @@ ** ** the %peel path /help produces a list of available commands. ** /info produces runtime metrics at the moment in time that the -** request was received. -** -** the type produced by /info is $mass: +** request was received. the type produced by /info is $mass: ** ** +$ mass (pair cord (each * (list mass))) ** -** where the leaves are conventionally @ud, but the precise -** interpretation depends on the metric (e.g. loobean settings -** or integer counters.) +** where the leaves are conventionally @ud, but the +** precise interpretation depends on the metric (e.g. +** loobean settings or integer counters.) it is acceptable +** to flatten the list by prepending the parent cord +** to each child element with a separator, e.g.: +** [%pier %| [%ames %| [%packets-sent %& 37] ~] ~] could be +** rendered as 'pier-ames-packets-sent'. this transformation is +** guaranteed to result in unique names. ** ** %ovum is a raw kernel move, to be injected directly into ** arvo. needless to say this will void your warranty. usually