From 90e375bd50b052809beccb2ac4776f53a37e16de Mon Sep 17 00:00:00 2001 From: bonbud-macryg Date: Tue, 2 Jul 2024 14:45:01 +0100 Subject: [PATCH 01/10] Draft first pass --- pkg/arvo/neo/cod/std/src/fil/types.txt | 401 +++++++++++++++++++++++++ 1 file changed, 401 insertions(+) create mode 100644 pkg/arvo/neo/cod/std/src/fil/types.txt diff --git a/pkg/arvo/neo/cod/std/src/fil/types.txt b/pkg/arvo/neo/cod/std/src/fil/types.txt new file mode 100644 index 0000000000..d24ad3c1b6 --- /dev/null +++ b/pkg/arvo/neo/cod/std/src/fil/types.txt @@ -0,0 +1,401 @@ +# Shrubbery Types + +## `band` + +[dependencies] + +``` ++$ band $+(band (map term fief)) +``` + +## `bowl` + +`bowl:neo`, similar to `bowl:gall`. + +``` ++$ bowl + $: src=name + our=@p + were=pith + here=pith + now=@da + eny=@uvJ + deps=(map term (pair pith lore)) + kids=lore + == +``` + +- `src`: source ship and path [of what?]. +- `our`: our ship. +- `were`: ??? +- `here`: ??? +- `now`: current datetime. +- `eny`: entropy. +- `deps`: ??? +- `kids`: ??? + +## `card` + +An instruction for a shrub, similar to a `card:agent:gall`. + +``` ++$ card (pair pith note) +``` + +The `pith` is the shrub this card will be sent to. The `note` will be of type `%make`, `%poke`, `%tomb`, or `%cull`. + +## `care` + +Perspective on a path. + +``` ++$ care + $~ %x + $? %x + %y + %z + %a + %b + %c + == +``` + +The cares `%x`, `%y`, and `%z` appear throughout the system: you’ll use them while defining `kids` and `deps`, and state updates will be head-tagged with one of these cares. + +[not sure about %a, %b, %c] + +## `conf` + +Dependency configuration for a new shrub. + +``` ++$ conf (map term pith) +``` + +This can be included in a `%make` card when we want to pass dependencies into a new shrub. + +The `term`s are arbitrary tags the new shrub has defined, and the `pith`s are locations of the relevant shrubs whose state will be tracked for the new shrub to respond to. + +## `curb` + +Constraint on the state of a shrub. + +``` ++$ curb + $~ [%pro %$] + $% [%or p=(list curb)] + [%only p=stud] + [%rol p=stud q=curb] + [%not p=curb q=curb] + [%pro p=stud] + [%any ~] + == +``` + +[explain each individually] + +[how can they be combined, why would you do that?] + +## `dare` + +A `%y` or `%z` care. (Think: "dare is a downward care".) + +``` ++$ dare ?(%y %z) +``` + +## `deps` + +??? + +``` ++$ deps band +``` + +## `dita` + +Either `[%.y iota]` or `[%.n aura]`. + +``` ++$ dita (each iota aura) +``` + +## `dock` + +??? + +``` ++$ dock [state=curb poke=(set stud) =kids] +``` + +See `pish` for usage. + +## `ever` + +Total version numbers for a shrub and its descendants. + +``` ++$ ever + $: exe=lock + why=lock + zed=lock + :: + shrub-life=@ud + ship-life=@ud + ship-rift=@ud + :: + =time + == +``` + +- “Exe” is only incremented when the shrub itself updates it state. (i.e. `%x` care.) +- “Why” is incremented when the shrub or any of its immediate children updates. (i.e. `%y` care.) +- “Zed” is incremented when the shrub or any of its decendants updates. (i.e. `%z` care.) + +[life, rift] + +[time] + +## `fief` + +??? + +``` ++$ fief [=deed =quay] +``` + +## `form` + +A shrub’s I/O logic. + +``` ++$ form + $_ ^| + |_ [=bowl =saga] + ++ poke + |~ [=stud val=vase] + *(quip card pail) + ++ init + |~ old=(unit pail) + *(quip card pail) + -- +``` + +- `+poke`: handle incoming pokes, return a list of `card`s and a `pail` of the new state. +- `+init`: initial I/O when this shrub is created, handle any data passed in through the `%make` card, return list of `card`s and a `pail` of the new state. + +## `hash` + +Unsigned 256-bit hash. + +``` ++$ hash @uvH +``` + +## `kook` + +Type of a shrub. + +``` ++$ kook + $_ ^& + |% + ++ state *curb + ++ poke *(set stud) + ++ form *^form + ++ kids *(unit port) + ++ deps *(map term fief) + -- +``` + +- `+state`: the type of this shrub’s state. +- `+poke`: the types of request that can change this shrub’s state. +- `+form`: I/O logic for a shrub. +- `+kids`: the type of the values beneath this shrub in the namespace. +- `+deps`: the types of values this shrub will accept from dependencies. + +## `lads` + +Constraint on the paths and types of a shurb’s descendants. + +``` ++$ lads $+(lads (map pish lash)) +``` + +Constraining `pish` defines the paths that can be created below this shrub in the namespace, and constraining `lash` defines the state and pokes of those shrubs. + +## `lash` + +Shrub’s state and accepted pokes to change that state. + +``` ++$ lash [state=curb poke=(set stud)] +``` + +Used to constrain descendants. + +## `lock` + +Data version numbers. + +``` ++$ lock (pair @ud @ud) +``` + +The head is the data version, the tail the type version. + +## `made` + +Type, state, and dependency values for making a new shrub. + +``` ++$ made [=stud init=(unit pail) =conf] +``` + +The `stud` is required. + +The `init` unit can be `~` to create a shrub with no initial state, and the `conf` map can be empty to create a shrub with no dependencies. + +## `mode` + +Change corresponding a shrub in a `%gift` update. [`%rely` too?] + +``` ++$ mode ?(%add %dif %del) +``` + +In a state update, all relevant shrubs will be included and tagged with a `mode`. + +- `%add`: This shrub has been added since the last update. +- `%dif`: This shrub is not new, but the value at this path has changed since the last update. +- `%del`: This shrub has been deleted since the last update. + +Like `%add` and `%dif`, the `%del` `mode` will carry the data at the relevant path so that subscribers can act on that data however they like. + +## `myth` + +Binding, possibly tombstoned. + +``` ++$ myth + $: pail=(unit pail) + =aeon + == +``` + +## `note` + +Shrubbery’s note type, analogous to `note:agent:gall`. + +``` ++$ note + $% [%make made] + [%poke =pail] + [%tomb cas=(unit case)] + [%cull ~] + == +``` + +The `note` type only works with shrubs, not Arvo. These `note`s sent in `card`s give Shrubbery one of five commands: +- `%make`: create a shrub at the `card`’s `pith` with these initial values. +- `%poke`: poke the shrub with this `pail`. +- `%tomb`: tombstone the shrub at this case. +- `%cull`: delete the shrub. + +## `oath` + +[Pair of unsigned 256-bit hash and a corresponding signature?] + +``` ++$ oath (pair hash seal) +``` + +## `once` + +Partial version information for a shrub. + +``` ++$ once [?(%x %y %z) p=case] +``` + +Identifies a shrub by either `%x`, `%y`, `%z`, and includes a `case` value. + +## `over` + +Range of time, used for case bookkeeping. + +``` ++$ over + $: why=(pair @ud @ud) + why-mut=(pair @ud @ud) + zed=(pair @ud @ud) + zed-mut=(pair @ud @ud) + =rift + == +``` + +“Why” and “zed” correspond to `%y` and `%z`. [What about mut and rift?] + +## pail + +Pair of stud and vase. + +``` ++$ pail (pair stud vase) +``` + +In most cases a stud is used as a mark, so you can think of a `pail` as a of “mark and vase”. + +## `pish` + +Pattern match over a path. + +``` ++$ pish + $+ pish + $@(? [i=dita t=pish]) +``` + +Either a `?` or a recursive list whose head is `dita` and whose tail is a `pish`. + +The `pish` ends with a `?`. If that ending is `%.y`, this path may continue. If th ending is `%.n`, the path stops. + +## `port` + +Scope for constraining a shrub’s children (dare is `%y`) or descendants (dare is `%z`). + +``` ++$ port (pair dare lads) +``` + +## `quay` + +??? + +``` ++$ quay (pair lash (unit port)) +``` + +## `seal` + +[256-bit hash, signed with [a shrub’s?] private key.] + +``` ++$ seal @uvH +``` + +## `stud` + +Name for a build system output, usually used like a mark. + +``` ++$ stud + $@ @tas + $: mark=@tas + [=ship =desk] + == +``` + +Local studs can be referred to by their `@tas` without further complication, but foreign studs need to be addressed by their source `ship` and `desk`. + +[What is a foreign stud? From another ship or from any other shrub?] From 451e986ae6958ab0e7dea5db7d7562c5f16cecdf Mon Sep 17 00:00:00 2001 From: bonbud-macryg Date: Tue, 2 Jul 2024 16:21:38 +0100 Subject: [PATCH 02/10] Add some more types, fill in some more info --- pkg/arvo/neo/cod/std/src/fil/types.txt | 150 ++++++++++++++++++------- 1 file changed, 108 insertions(+), 42 deletions(-) diff --git a/pkg/arvo/neo/cod/std/src/fil/types.txt b/pkg/arvo/neo/cod/std/src/fil/types.txt index d24ad3c1b6..26b83d3708 100644 --- a/pkg/arvo/neo/cod/std/src/fil/types.txt +++ b/pkg/arvo/neo/cod/std/src/fil/types.txt @@ -1,13 +1,37 @@ # Shrubbery Types +This doesn't cover every type defined in `/sur/neo.hoon`. It does cover all of the types you'll regularly work while writing userspace shrubs, and the types you need to know about to fully understand those types. + +## `aeon` + +Total version numbers and signature for a shrub. [How is the signature being used here?] + +``` ++$ aeon (pair ever oath) +``` + +## `axal` + +Fundamental node, recursive. + +This mold builder creates a representation of a node in Clay like an [arch](https://docs.urbit.org/language/hoon/reference/arvo#arch) (a file or a directory) or [axil](https://docs.urbit.org/language/hoon/reference/arvo#axil) (fundamental node), but the directory map contains more axals, so it contains the entire subtree rather than just one level. + +``` +++ axal + |$ [item] + [fil=(unit item) kid=(map iota $)] +``` + ## `band` -[dependencies] +Dependency map. ``` +$ band $+(band (map term fief)) ``` +The `term`s are arbitrary keywords defined in a shrub's `+deps` arm. When that shrub is created, the `conf` will have to include a map of all the required dependencies. + ## `bowl` `bowl:neo`, similar to `bowl:gall`. @@ -28,7 +52,7 @@ - `src`: source ship and path [of what?]. - `our`: our ship. - `were`: ??? -- `here`: ??? +- `here`: location of this shrub. - `now`: current datetime. - `eny`: entropy. - `deps`: ??? @@ -62,7 +86,7 @@ Perspective on a path. The cares `%x`, `%y`, and `%z` appear throughout the system: you’ll use them while defining `kids` and `deps`, and state updates will be head-tagged with one of these cares. -[not sure about %a, %b, %c] +[not sure about %a, %b, %c; i know the correspond to x y z but not sure about usage] ## `conf` @@ -98,34 +122,42 @@ Constraint on the state of a shrub. ## `dare` -A `%y` or `%z` care. (Think: "dare is a downward care".) +A `%y` or `%z` care. (Think "dare is a downward care".) ``` +$ dare ?(%y %z) ``` -## `deps` +Used while constraining descendants. + +## `deed` -??? +Whether or not a depdenency must already exist in order for this shrub to build. ``` -+$ deps band ++$ deed + $@ ? + $: time=(unit @dr) + req=? + == ``` -## `dita` +[in what case is `time` used?] -Either `[%.y iota]` or `[%.n aura]`. +## `deps` + +Dependency map. ``` -+$ dita (each iota aura) ++$ deps band ``` -## `dock` +## `dita` -??? +A cell of either `%.y` and an `iota` or `%.n` and an `aura`. ``` -+$ dock [state=curb poke=(set stud) =kids] ++$ dita (each iota aura) ``` See `pish` for usage. @@ -150,15 +182,15 @@ Total version numbers for a shrub and its descendants. - “Exe” is only incremented when the shrub itself updates it state. (i.e. `%x` care.) - “Why” is incremented when the shrub or any of its immediate children updates. (i.e. `%y` care.) -- “Zed” is incremented when the shrub or any of its decendants updates. (i.e. `%z` care.) +- “Zed” is incremented when the shrub or any of its descendants updates. (i.e. `%z` care.) -[life, rift] +[what about life, rift] -[time] +[what about time] ## `fief` -??? +Declares whether a shrub must already exist to use it as a depdenency, and constrain that shrub and its descendants. ``` +$ fief [=deed =quay] @@ -192,6 +224,42 @@ Unsigned 256-bit hash. +$ hash @uvH ``` +## `idea` + +Pail transformation rule. [i think?] + +``` ++$ idea + $: =saga + thru=(unit stud) + =pail + == +``` + +## `iota` + +Typed path segment. + +``` ++$ iota + $+ iota + $~ [%n ~] + $@ @tas + $% [%ub @ub] [%uc @uc] [%ud @ud] [%ui @ui] + [%ux @ux] [%uv @uv] [%uw @uw] + [%sb @sb] [%sc @sc] [%sd @sd] [%si @si] + [%sx @sx] [%sv @sv] [%sw @sw] + [%da @da] [%dr @dr] + [%f ?] [%n ~] + [%if @if] [%is @is] + [%t @t] [%ta @ta] + [%p @p] [%q @q] + [%rs @rs] [%rd @rd] [%rh @rh] [%rq @rq] + == +``` + +Either a `term` or a head-tagged `aura`, `?`, or `~`. Used to type `pith`s. + ## `kook` Type of a shrub. @@ -244,6 +312,14 @@ Data version numbers. The head is the data version, the tail the type version. +## `lore` + +[??? - need this to fully explain bowl:neo] + +``` ++$ lore (axal idea) +``` + ## `made` Type, state, and dependency values for making a new shrub. @@ -252,13 +328,11 @@ Type, state, and dependency values for making a new shrub. +$ made [=stud init=(unit pail) =conf] ``` -The `stud` is required. - -The `init` unit can be `~` to create a shrub with no initial state, and the `conf` map can be empty to create a shrub with no dependencies. +The `stud` is required. The `init` unit can be `~` to create a shrub with no initial state, and the `conf` map can be empty to create a shrub with no dependencies. ## `mode` -Change corresponding a shrub in a `%gift` update. [`%rely` too?] +Change corresponding to a shrub's new status in a `%rely` update, which the shrub receives when a dependency's state changes. ``` +$ mode ?(%add %dif %del) @@ -304,7 +378,7 @@ The `note` type only works with shrubs, not Arvo. These `note`s sent in `card`s ## `oath` -[Pair of unsigned 256-bit hash and a corresponding signature?] +[Pair of unsigned 256-bit hash and a corresponding signature? Not sure about usage] ``` +$ oath (pair hash seal) @@ -318,24 +392,6 @@ Partial version information for a shrub. +$ once [?(%x %y %z) p=case] ``` -Identifies a shrub by either `%x`, `%y`, `%z`, and includes a `case` value. - -## `over` - -Range of time, used for case bookkeeping. - -``` -+$ over - $: why=(pair @ud @ud) - why-mut=(pair @ud @ud) - zed=(pair @ud @ud) - zed-mut=(pair @ud @ud) - =rift - == -``` - -“Why” and “zed” correspond to `%y` and `%z`. [What about mut and rift?] - ## pail Pair of stud and vase. @@ -362,20 +418,30 @@ The `pish` ends with a `?`. If that ending is `%.y`, this path may continue. If ## `port` -Scope for constraining a shrub’s children (dare is `%y`) or descendants (dare is `%z`). +Constraint on a shrub’s immediate children or all descendants. ``` +$ port (pair dare lads) ``` +If the `dare` is `%y` this only constrains children. If the `dare` is `%z` this constrains all descendants. The `lads` defines acceptable paths, state, and pokes for the descendants. + ## `quay` -??? +Define a depdenency's state and pokes, constrain the depdenency's descendants' state and pokes. ``` +$ quay (pair lash (unit port)) ``` +## `saga` + +Versioned pail. [Maybe? How is this used?] + +``` ++$ saga (pair aeon pail) +``` + ## `seal` [256-bit hash, signed with [a shrub’s?] private key.] From 7b669829e6eda848528c22fb5a63b061ad816cf5 Mon Sep 17 00:00:00 2001 From: bonbud-macryg Date: Wed, 3 Jul 2024 13:57:22 +0100 Subject: [PATCH 03/10] Add styling to code blocks --- pkg/arvo/neo/cod/std/src/fil/feather.css | 1393 +++++++++++----------- 1 file changed, 698 insertions(+), 695 deletions(-) diff --git a/pkg/arvo/neo/cod/std/src/fil/feather.css b/pkg/arvo/neo/cod/std/src/fil/feather.css index b79799a4f7..b844b3f90c 100644 --- a/pkg/arvo/neo/cod/std/src/fil/feather.css +++ b/pkg/arvo/neo/cod/std/src/fil/feather.css @@ -7,700 +7,703 @@ * **/ -:root { - - /* --font: 'Urbit Sans'; - --font-mono: 'Monaco'; - --mono-scale: 0.8; - --letter-spacing: 0.024em; - --line-height: 1.4; - */ - --0in: calc(0 * var(--1in)); - --1in: 4px; - --font-size: calc(4 * var(--1in)); - --2in: calc(2 * var(--1in)); - --3in: calc(3 * var(--1in)); - --4in: calc(4 * var(--1in)); - --5in: calc(5 * var(--1in)); - --6in: calc(6 * var(--1in)); - --7in: calc(7 * var(--1in)); - --8in: calc(8 * var(--1in)); - --9in: calc(9 * var(--1in)); - - --10in: calc(10 * var(--1in)); - --11in: calc(11 * var(--1in)); - --12in: calc(12 * var(--1in)); - --13in: calc(13 * var(--1in)); - --14in: calc(14 * var(--1in)); - --15in: calc(15 * var(--1in)); - --16in: calc(16 * var(--1in)); - --17in: calc(17 * var(--1in)); - --18in: calc(18 * var(--1in)); - --19in: calc(19 * var(--1in)); - - --20in: calc(20 * var(--1in)); - --21in: calc(21 * var(--1in)); - --22in: calc(22 * var(--1in)); - --23in: calc(23 * var(--1in)); - --24in: calc(24 * var(--1in)); - --25in: calc(25 * var(--1in)); - --26in: calc(26 * var(--1in)); - --27in: calc(27 * var(--1in)); - --28in: calc(28 * var(--1in)); - --29in: calc(29 * var(--1in)); - - --30in: calc(30 * var(--1in)); - --31in: calc(31 * var(--1in)); - --32in: calc(32 * var(--1in)); - --33in: calc(33 * var(--1in)); - --34in: calc(34 * var(--1in)); - --35in: calc(35 * var(--1in)); - --36in: calc(36 * var(--1in)); - --37in: calc(37 * var(--1in)); - --38in: calc(38 * var(--1in)); - --39in: calc(39 * var(--1in)); - --40in: calc(40 * var(--1in)); - - - /* --light-b-3: #dd5522; - --light-b-2: #ddaa33; - --light-b-1: #55dd33; - --light-b0: #dddddd; - --light-b1: #cccccc; - --light-b2: #bbbbbb; - --light-b3: #aaaaaa; - --light-b4: #999999; - --light-f-3: #993311; - --light-f-2: #aaaa22; - --light-f-1: #339911; - --light-f0: #111111; - --light-f1: #333333; - --light-f2: #444444; - --light-f3: #555555; - --light-f4: #777777; - - --dark-b-3: #551111; - --dark-b-2: #555511; - --dark-b-1: #225511; - --dark-b0: #222222; - --dark-b1: #333333; - --dark-b2: #444444; - --dark-b3: #555555; - --dark-b4: #666666; - --dark-f-3: #ee7755; - --dark-f-2: #ccbb33; - --dark-f-1: #55cc33; - --dark-f0: #eeeeee; - --dark-f1: #cccccc; - --dark-f2: #bbbbbb; - --dark-f3: #aaaaaa; - --dark-f4: #888888; - */ - --b-3: var(--light-b-3); - --b-2: var(--light-b-2); - --b-1: var(--light-b-1); - --b0: var(--light-b0); - --b1: var(--light-b1); - --b2: var(--light-b2); - --b3: var(--light-b3); - --b4: var(--light-b4); - --f-3: var(--light-f-3); - --f-2: var(--light-f-2); - --f-1: var(--light-f-1); - --f0: var(--light-f0); - --f1: var(--light-f1); - --f2: var(--light-f2); - --f3: var(--light-f3); - --f4: var(--light-f4); -} -@media (prefers-color-scheme: dark) { :root { - --b-3: var(--dark-b-3); - --b-2: var(--dark-b-2); - --b-1: var(--dark-b-1); - --b0: var(--dark-b0); - --b1: var(--dark-b1); - --b2: var(--dark-b2); - --b3: var(--dark-b3); - --b4: var(--dark-b4); - --f-3: var(--dark-f-3); - --f-2: var(--dark-f-2); - --f-1: var(--dark-f-1); - --f0: var(--dark-f0); - --f1: var(--dark-f1); - --f2: var(--dark-f2); - --f3: var(--dark-f3); - --f4: var(--dark-f4); - } -} -* { - font-size: var(--font-size); -} -/* -@media (max-width: 900px) { - :root { - --font-size: calc(1.3 * var(--font-size)); - } -} -*/ -body { - font-family: var(--font); - letter-spacing: var(--letter-spacing); - line-height: 1; - height: 100%; -} -button { - border: inherit; - background: inherit; - color: inherit; -} - -.break { - word-break: break-word; -} -.action { - touch-action: manipulation; -} -.hidden, -.folded { - display: none !important; -} -.jc { - justify-content: center; -} -.jb { - justify-content: space-between; -} -.ja { - justify-content: space-around; -} -.js { - justify-content: start; -} -.je { - justify-content: end; -} -.js { - justify-content: start; -} -.as { - align-items: start; -} -.af { - align-items: stretch; -} -.ae { - align-items: end; -} -.ac { - align-items: center; -} -.wfc { - width: fit-content; -} -.wf { - width: 100%; -} -.mw-page { - max-width: 650px; -} -.hf { - height: 100%; -} -.hfc { - height: fit-content; -} -.mono { - font-family: var(--font-mono), monospace; - font-size: calc(1em * var(--mono-scale)); -} -.italic { - font-style: italic; -} -.underline { - text-decoration: underline; -} -.bold { - font-weight: bold; -} -.strike { - text-decoration: line-through; -} - -.pre { - white-space: pre; -} -.pre-line { - white-space: pre-line; -} - -.tl { - text-align: left; -} -.tc { - text-align: center; -} -.tr { - text-align: right; -} - -.block { - display: block; -} -.inline { - display: inline-block; -} - -.fc { - display: flex; - flex-direction: column; -} -.fcr { - display: flex; - flex-direction: column-reverse; -} -.fr { - display: flex; - flex-direction: row; -} -.frw { - display: flex; - flex-direction: row; - flex-wrap: wrap; -} -.basis-full { - flex-basis: 100%; -} -.basis-half { - flex-basis: 50%; - flex-shrink: 0; -} -.basis-none { - flex-basis: 0%; - flex-shrink: 1; -} -.shrink-0 { - flex-shrink: 0; -} -.relative { - position: relative; -} -.absolute { - position: absolute; -} -.fixed { - position: fixed; -} -.sticky { - position: sticky; -} - -.z-2 { - z-index: -20; -} -.z-1 { - z-index: -10; -} -.z0 { - z-index: 0; -} -.z1 { - z-index: 10; -} -.z2 { - z-index: 20; -} - -.grow { - flex-grow: 1; -} - -.g0 { - gap: 0; -} -.g1 { - gap: 4px; -} -.g2 { - gap: 8px; -} -.g3 { - gap: 12px; -} -.g4 { - gap: 16px; -} -.g5 { - gap: 20px; -} -.g6 { - gap: 24px; -} -.g7 { - gap: 32px; -} -.g8 { - gap: 40px; -} - - - -.p-8 { - padding: 32px 64px; -} -.p-7 { - padding: 28px 56px; -} -.p-6 { - padding: 24px 48px; -} -.p-5 { - padding: 20px 40px; -} -.p-4 { - padding: 16px 32px; -} -.p-3 { - padding: 12px 24px; -} -.p-2 { - padding: 8px 16px; -} -.p-1 { - padding: 4px 8px; -} -.p0 { - padding: 0; -} -.p1 { - padding: 4px; -} -.p2 { - padding: 8px; -} -.p3 { - padding: 12px; -} -.p4 { - padding: 16px; -} -.p5 { - padding: 24px; -} -.p6 { - padding: 30px; -} -.p7 { - padding: 34px; -} -.p8 { - padding: 38px; -} -.p-page { - padding-top: 30px; - padding-bottom: 200px; - padding-left: 12px; - padding-right: 12px; -} - - -.ma { - margin: auto; -} - -.mt1 { - margin-top: 1rem; -} -.mt2 { - margin-top: 2rem; -} -.mt3 { - margin-top: 3rem; -} - -.m0 { - margin: 0; -} - - - - -.o0 { - opacity: 0%; -} -.o1 { - opacity: 10%; -} -.o2 { - opacity: 20%; -} -.o3 { - opacity: 30%; -} -.o4 { - opacity: 40%; -} -.o5 { - opacity: 50%; -} -.o6 { - opacity: 60%; -} -.o7 { - opacity: 70%; -} -.o8 { - opacity: 80%; -} -.o9 { - opacity: 90%; -} -.o10 { - opacity: 100%; -} - - - - -.scroll-y { - overflow-y: auto; -} -.scroll-x { - overflow-x: auto; -} -.scroll-hidden { - overflow: hidden; -} -.loader { - position: relative; -} -.loading { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - pointer-events: none; -} -.loader .loading { - opacity: 0; - transition: opacity 300ms; -} -.htmx-request .loader .loading, -.loader.htmx-request .loading { - opacity: 1; -} -.loader .loaded { - opacity: 1; - transition: opacity 300ms; -} -.htmx-request .loader .loaded, -.loader.htmx-request .loaded { - opacity: 0; -} - -.f-3 { - color: var(--f-3); -} -.f-2 { - color: var(--f-2); -} -.f-1 { - color: var(--f-1); -} -.f0 { - color: var(--f0); -} -.f1 { - color: var(--f1); -} -.f2 { - color: var(--f2); -} -.f3 { - color: var(--f3); -} -.f4 { - color: var(--f4); -} - -.b-3 { - background-color: var(--b-3); -} -.b-2 { - background-color: var(--b-2); -} -.b-1 { - background-color: var(--b-1); -} -.b0 { - background-color: var(--b0); -} -.b1 { - background-color: var(--b1); -} -.b2 { - background-color: var(--b2); -} -.b3 { - background-color: var(--b3); -} -.b4 { - background-color: var(--b4); -} - -.s-2 { - font-size: 0.7rem; - } -.s-1 { - font-size: 0.85rem; -} -.s0 { - font-size: 1rem; -} -.s1 { - font-size: 1.15rem; -} -.s2 { - font-size: 1.3rem; -} -.s3 { - font-size: 1.45rem; -} -.s4 { - font-size: 1.6rem; -} -.s5 { - font-size: 2rem; -} -.s6 { - font-size: 2.4rem; -} -.bd0 { - border: none; -} -.bd1 { - border: 0.8px solid var(--b3); -} -.bd2 { - border: 0.8px solid var(--f3); -} -.bd3 { - border: 2px solid var(--f1); -} -/* deprecated */ -.border { - border: 0.8px solid var(--f3); -} - -.br1 { - border-radius: 3px; -} -.br2 { - border-radius: 6px; -} -.br3 { - border-radius: 12px; -} - -.hover:hover { - filter: invert(20%); -} -.toggled { - filter: invert(100%); -} -.hover.toggled:hover { - filter: invert(100%); -} -.active, -.selected { - filter: invert(10%); -} -.hover.active:hover, -.hover.selected:hover { - filter: invert(25%); -} -.numbered > *:before { - content: counter(line); - display: inline-block; - /* border-right: 1px solid var(--f3); */ - /* padding: 0 .5em; */ - /* margin-right: .5em; */ - color: var(--f3); - /* min-width: 34px; */ - text-align: right; -} -.numbered > * { + + /* --font: 'Urbit Sans'; + --font-mono: 'Monaco'; + --mono-scale: 0.8; + --letter-spacing: 0.024em; + --line-height: 1.4; + */ + --0in: calc(0 * var(--1in)); + --1in: 4px; + --font-size: calc(4 * var(--1in)); + --2in: calc(2 * var(--1in)); + --3in: calc(3 * var(--1in)); + --4in: calc(4 * var(--1in)); + --5in: calc(5 * var(--1in)); + --6in: calc(6 * var(--1in)); + --7in: calc(7 * var(--1in)); + --8in: calc(8 * var(--1in)); + --9in: calc(9 * var(--1in)); + + --10in: calc(10 * var(--1in)); + --11in: calc(11 * var(--1in)); + --12in: calc(12 * var(--1in)); + --13in: calc(13 * var(--1in)); + --14in: calc(14 * var(--1in)); + --15in: calc(15 * var(--1in)); + --16in: calc(16 * var(--1in)); + --17in: calc(17 * var(--1in)); + --18in: calc(18 * var(--1in)); + --19in: calc(19 * var(--1in)); + + --20in: calc(20 * var(--1in)); + --21in: calc(21 * var(--1in)); + --22in: calc(22 * var(--1in)); + --23in: calc(23 * var(--1in)); + --24in: calc(24 * var(--1in)); + --25in: calc(25 * var(--1in)); + --26in: calc(26 * var(--1in)); + --27in: calc(27 * var(--1in)); + --28in: calc(28 * var(--1in)); + --29in: calc(29 * var(--1in)); + + --30in: calc(30 * var(--1in)); + --31in: calc(31 * var(--1in)); + --32in: calc(32 * var(--1in)); + --33in: calc(33 * var(--1in)); + --34in: calc(34 * var(--1in)); + --35in: calc(35 * var(--1in)); + --36in: calc(36 * var(--1in)); + --37in: calc(37 * var(--1in)); + --38in: calc(38 * var(--1in)); + --39in: calc(39 * var(--1in)); + --40in: calc(40 * var(--1in)); + + + /* --light-b-3: #dd5522; + --light-b-2: #ddaa33; + --light-b-1: #55dd33; + --light-b0: #dddddd; + --light-b1: #cccccc; + --light-b2: #bbbbbb; + --light-b3: #aaaaaa; + --light-b4: #999999; + --light-f-3: #993311; + --light-f-2: #aaaa22; + --light-f-1: #339911; + --light-f0: #111111; + --light-f1: #333333; + --light-f2: #444444; + --light-f3: #555555; + --light-f4: #777777; + + --dark-b-3: #551111; + --dark-b-2: #555511; + --dark-b-1: #225511; + --dark-b0: #222222; + --dark-b1: #333333; + --dark-b2: #444444; + --dark-b3: #555555; + --dark-b4: #666666; + --dark-f-3: #ee7755; + --dark-f-2: #ccbb33; + --dark-f-1: #55cc33; + --dark-f0: #eeeeee; + --dark-f1: #cccccc; + --dark-f2: #bbbbbb; + --dark-f3: #aaaaaa; + --dark-f4: #888888; + */ + --b-3: var(--light-b-3); + --b-2: var(--light-b-2); + --b-1: var(--light-b-1); + --b0: var(--light-b0); + --b1: var(--light-b1); + --b2: var(--light-b2); + --b3: var(--light-b3); + --b4: var(--light-b4); + --f-3: var(--light-f-3); + --f-2: var(--light-f-2); + --f-1: var(--light-f-1); + --f0: var(--light-f0); + --f1: var(--light-f1); + --f2: var(--light-f2); + --f3: var(--light-f3); + --f4: var(--light-f4); + } + @media (prefers-color-scheme: dark) { + :root { + --b-3: var(--dark-b-3); + --b-2: var(--dark-b-2); + --b-1: var(--dark-b-1); + --b0: var(--dark-b0); + --b1: var(--dark-b1); + --b2: var(--dark-b2); + --b3: var(--dark-b3); + --b4: var(--dark-b4); + --f-3: var(--dark-f-3); + --f-2: var(--dark-f-2); + --f-1: var(--dark-f-1); + --f0: var(--dark-f0); + --f1: var(--dark-f1); + --f2: var(--dark-f2); + --f3: var(--dark-f3); + --f4: var(--dark-f4); + } + } + * { + font-size: var(--font-size); + } + /* + @media (max-width: 900px) { + :root { + --font-size: calc(1.3 * var(--font-size)); + } + } + */ + body { + font-family: var(--font); + letter-spacing: var(--letter-spacing); + line-height: 1; + height: 100%; + } + button { + border: inherit; + background: inherit; + color: inherit; + } + + .break { + word-break: break-word; + } + .action { + touch-action: manipulation; + } + .hidden, + .folded { + display: none !important; + } + .jc { + justify-content: center; + } + .jb { + justify-content: space-between; + } + .ja { + justify-content: space-around; + } + .js { + justify-content: start; + } + .je { + justify-content: end; + } + .js { + justify-content: start; + } + .as { + align-items: start; + } + .af { + align-items: stretch; + } + .ae { + align-items: end; + } + .ac { + align-items: center; + } + .wfc { + width: fit-content; + } + .wf { + width: 100%; + } + .mw-page { + max-width: 650px; + } + .hf { + height: 100%; + } + .hfc { + height: fit-content; + } + .mono { + font-family: var(--font-mono), monospace; + font-size: calc(1em * var(--mono-scale)); + } + .italic { + font-style: italic; + } + .underline { + text-decoration: underline; + } + .bold { + font-weight: bold; + } + .strike { + text-decoration: line-through; + } + + .pre { + white-space: pre; + } + .pre-line { + white-space: pre-line; + } + + .tl { + text-align: left; + } + .tc { + text-align: center; + } + .tr { + text-align: right; + } + + .block { + display: block; + } + .inline { + display: inline-block; + } + + .fc { + display: flex; + flex-direction: column; + } + .fcr { + display: flex; + flex-direction: column-reverse; + } + .fr { + display: flex; + flex-direction: row; + } + .frw { + display: flex; + flex-direction: row; + flex-wrap: wrap; + } + .basis-full { + flex-basis: 100%; + } + .basis-half { + flex-basis: 50%; + flex-shrink: 0; + } + .basis-none { + flex-basis: 0%; + flex-shrink: 1; + } + .shrink-0 { + flex-shrink: 0; + } + .relative { + position: relative; + } + .absolute { + position: absolute; + } + .fixed { + position: fixed; + } + .sticky { + position: sticky; + } + + .z-2 { + z-index: -20; + } + .z-1 { + z-index: -10; + } + .z0 { + z-index: 0; + } + .z1 { + z-index: 10; + } + .z2 { + z-index: 20; + } + + .grow { + flex-grow: 1; + } + + .g0 { + gap: 0; + } + .g1 { + gap: 4px; + } + .g2 { + gap: 8px; + } + .g3 { + gap: 12px; + } + .g4 { + gap: 16px; + } + .g5 { + gap: 20px; + } + .g6 { + gap: 24px; + } + .g7 { + gap: 32px; + } + .g8 { + gap: 40px; + } + + + + .p-8 { + padding: 32px 64px; + } + .p-7 { + padding: 28px 56px; + } + .p-6 { + padding: 24px 48px; + } + .p-5 { + padding: 20px 40px; + } + .p-4 { + padding: 16px 32px; + } + .p-3 { + padding: 12px 24px; + } + .p-2 { + padding: 8px 16px; + } + .p-1 { + padding: 4px 8px; + } + .p0 { + padding: 0; + } + .p1 { + padding: 4px; + } + .p2 { + padding: 8px; + } + .p3 { + padding: 12px; + } + .p4 { + padding: 16px; + } + .p5 { + padding: 24px; + } + .p6 { + padding: 30px; + } + .p7 { + padding: 34px; + } + .p8 { + padding: 38px; + } + .p-page { + padding-top: 30px; + padding-bottom: 200px; + padding-left: 12px; + padding-right: 12px; + } + + + .ma { + margin: auto; + } + + .mt1 { + margin-top: 1rem; + } + .mt2 { + margin-top: 2rem; + } + .mt3 { + margin-top: 3rem; + } + + .m0 { + margin: 0; + } + + + + + .o0 { + opacity: 0%; + } + .o1 { + opacity: 10%; + } + .o2 { + opacity: 20%; + } + .o3 { + opacity: 30%; + } + .o4 { + opacity: 40%; + } + .o5 { + opacity: 50%; + } + .o6 { + opacity: 60%; + } + .o7 { + opacity: 70%; + } + .o8 { + opacity: 80%; + } + .o9 { + opacity: 90%; + } + .o10 { + opacity: 100%; + } + + + + + .scroll-y { + overflow-y: auto; + } + .scroll-x { + overflow-x: auto; + } + .scroll-hidden { + overflow: hidden; + } + .loader { + position: relative; + } + .loading { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + pointer-events: none; + } + .loader .loading { + opacity: 0; + transition: opacity 300ms; + } + .htmx-request .loader .loading, + .loader.htmx-request .loading { + opacity: 1; + } + .loader .loaded { + opacity: 1; + transition: opacity 300ms; + } + .htmx-request .loader .loaded, + .loader.htmx-request .loaded { + opacity: 0; + } + + .f-3 { + color: var(--f-3); + } + .f-2 { + color: var(--f-2); + } + .f-1 { + color: var(--f-1); + } + .f0 { + color: var(--f0); + } + .f1 { + color: var(--f1); + } + .f2 { + color: var(--f2); + } + .f3 { + color: var(--f3); + } + .f4 { + color: var(--f4); + } + + .b-3 { + background-color: var(--b-3); + } + .b-2 { + background-color: var(--b-2); + } + .b-1 { + background-color: var(--b-1); + } + .b0 { + background-color: var(--b0); + } + .b1 { + background-color: var(--b1); + } + .b2 { + background-color: var(--b2); + } + .b3 { + background-color: var(--b3); + } + .b4 { + background-color: var(--b4); + } + + .s-2 { + font-size: 0.7rem; + } + .s-1 { + font-size: 0.85rem; + } + .s0 { + font-size: 1rem; + } + .s1 { + font-size: 1.15rem; + } + .s2 { + font-size: 1.3rem; + } + .s3 { + font-size: 1.45rem; + } + .s4 { + font-size: 1.6rem; + } + .s5 { + font-size: 2rem; + } + .s6 { + font-size: 2.4rem; + } + .bd0 { + border: none; + } + .bd1 { + border: 0.8px solid var(--b3); + } + .bd2 { + border: 0.8px solid var(--f3); + } + .bd3 { + border: 2px solid var(--f1); + } + /* deprecated */ + .border { + border: 0.8px solid var(--f3); + } + + .br1 { + border-radius: 3px; + } + .br2 { + border-radius: 6px; + } + .br3 { + border-radius: 12px; + } + + .hover:hover { + filter: invert(20%); + } + .toggled { + filter: invert(100%); + } + .hover.toggled:hover { + filter: invert(100%); + } + .active, + .selected { + filter: invert(10%); + } + .hover.active:hover, + .hover.selected:hover { + filter: invert(25%); + } + .numbered > *:before { + content: counter(line); + display: inline-block; + /* border-right: 1px solid var(--f3); */ + /* padding: 0 .5em; */ + /* margin-right: .5em; */ + color: var(--f3); + /* min-width: 34px; */ + text-align: right; + } + .numbered > * { + display: block; + counter-increment: line; + } + .prose h1 { + font-size: 1.45rem; + margin: 1rem 0; + } + .prose h2 { + font-size: 1.3rem; + margin: 1rem 0; + } + .prose h3 { + font-size: 1.15rem; + margin: 1rem 0; + } + .prose h1, .prose h2, .prose h3 { + font-weight: bold; + } + .prose p { + margin-bottom: 1rem; + line-height: var(--line-height); + } + .prose img { + max-width: 100%; + display: block; + max-height: 350px; + } + .prose details { + margin-bottom: 1rem; + } + .prose a { + text-decoration: underline; + } + .prose blockquote { + margin-left: 10px; + border-left: 2px solid var(--b3); + padding: 4px; + padding-left: 12px; + color: var(--f2); + } + .prose pre { + font-family: var(--font-mono); + font-size: calc(1em * var(--mono-scale)); + overflow-x: auto; + width: 100%; display: block; - counter-increment: line; -} -.prose h1 { - font-size: 1.45rem; - margin: 1rem 0; -} -.prose h2 { - font-size: 1.3rem; - margin: 1rem 0; -} -.prose h3 { - font-size: 1.15rem; - margin: 1rem 0; -} -.prose h1, .prose h2, .prose h3 { - font-weight: bold; -} -.prose p { - margin-bottom: 1rem; - line-height: var(--line-height); -} -.prose img { - max-width: 100%; - display: block; - max-height: 350px; -} -.prose details { - margin-bottom: 1rem; -} -.prose a { - text-decoration: underline; -} -.prose blockquote { - margin-left: 10px; - border-left: 2px solid var(--b3); - padding: 4px; - padding-left: 12px; - color: var(--f2); -} -.prose pre { - font-family: var(--font-mono); - font-size: calc(1em * var(--mono-scale)); - overflow-x: auto; - width: 100%; - display: block; - padding: 8px; -} -.prose code { - font-family: var(--font-mono); - font-size: calc(1em * var(--mono-scale)); - color: var(--f2); -} -.prose ul, -.prose ol { - padding-left: 29px; - line-height: calc(calc(1 + var(--line-height)) / 2); - margin-bottom: 0.6rem; -} -.prose ul p, -.prose ol p { - margin-bottom: 0; - line-height: var(--line-height); -} -.prose ul ul, -.prose ol ul, -.prose ul ol, -.prose ol ol { - margin-bottom: 0; -} -.prose summary { - user-select: none; - cursor: pointer; -} + padding: 8px; + margin-bottom: 1rem; + background-color: var(--b4); + border-radius: 3px; + } + .prose code { + font-family: var(--font-mono); + font-size: calc(1em * var(--mono-scale)); + color: var(--f2); + } + .prose ul, + .prose ol { + padding-left: 29px; + line-height: calc(calc(1 + var(--line-height)) / 2); + margin-bottom: 0.6rem; + } + .prose ul p, + .prose ol p { + margin-bottom: 0; + line-height: var(--line-height); + } + .prose ul ul, + .prose ol ul, + .prose ul ol, + .prose ol ol { + margin-bottom: 0; + } + .prose summary { + user-select: none; + cursor: pointer; + } From c8ecca556ddfc300e98a7f3da05816b94801c1c3 Mon Sep 17 00:00:00 2001 From: bonbud-macryg Date: Wed, 3 Jul 2024 13:58:29 +0100 Subject: [PATCH 04/10] Make code block background darker --- pkg/arvo/neo/cod/std/src/fil/feather.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/arvo/neo/cod/std/src/fil/feather.css b/pkg/arvo/neo/cod/std/src/fil/feather.css index b844b3f90c..42e04c8f4f 100644 --- a/pkg/arvo/neo/cod/std/src/fil/feather.css +++ b/pkg/arvo/neo/cod/std/src/fil/feather.css @@ -678,7 +678,7 @@ display: block; padding: 8px; margin-bottom: 1rem; - background-color: var(--b4); + background-color: var(--b1); border-radius: 3px; } .prose code { From 06562f0ea5de1c628913d8ec27d4b5a9a8dbbf4d Mon Sep 17 00:00:00 2001 From: bonbud-macryg Date: Wed, 3 Jul 2024 14:06:44 +0100 Subject: [PATCH 05/10] Match backtick text to codeblock styling --- pkg/arvo/neo/cod/std/src/fil/feather.css | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/arvo/neo/cod/std/src/fil/feather.css b/pkg/arvo/neo/cod/std/src/fil/feather.css index 42e04c8f4f..67f65d2d1c 100644 --- a/pkg/arvo/neo/cod/std/src/fil/feather.css +++ b/pkg/arvo/neo/cod/std/src/fil/feather.css @@ -684,7 +684,10 @@ .prose code { font-family: var(--font-mono); font-size: calc(1em * var(--mono-scale)); - color: var(--f2); + color: var(--f0); + background-color: var(--b1); + border-radius: 3px; + padding: 2px; } .prose ul, .prose ol { From f7ede89b079e90bfa33dbc41c5951e7f0a2d5d00 Mon Sep 17 00:00:00 2001 From: bonbud-macryg Date: Wed, 3 Jul 2024 15:53:26 +0100 Subject: [PATCH 06/10] add types doc to /imp/home --- pkg/arvo/neo/cod/std/src/imp/home.hoon | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/arvo/neo/cod/std/src/imp/home.hoon b/pkg/arvo/neo/cod/std/src/imp/home.hoon index 0e7cb3da26..aead8701d9 100644 --- a/pkg/arvo/neo/cod/std/src/imp/home.hoon +++ b/pkg/arvo/neo/cod/std/src/imp/home.hoon @@ -5,6 +5,8 @@ /* tasks /* messenger /* introduction +/* developer-environment-setup +/* types ^- kook:neo |% ++ state pro/%home @@ -45,8 +47,10 @@ [#/[p/our.bowl]/home/docs/tutorials/messenger %make %sail `sail/!>([messenger 'prose p-page mw-page ma' ~]) ~] [#/[p/our.bowl]/home/docs/tutorials/tasks %make %sail `sail/!>([tasks 'prose p-page mw-page ma' ~]) ~] :: - [#/[p/our.bowl]/home/docs/guides %make %folder `folder/!>([%feather ~]) ~] + [#/[p/our.bowl]/home/docs/guides %make %folder `folder/!>([%development %feather %types ~]) ~] + [#/[p/our.bowl]/home/docs/guides/development %make %sail `sail/!>([developer-environment-setup 'prose p-page mw-page ma' ~]) ~] [#/[p/our.bowl]/home/docs/guides/feather %make %sail `sail/!>([feather-intro 'prose p-page mw-page ma' ~]) ~] + [#/[p/our.bowl]/home/docs/guides/types %make %sail `sail/!>([types 'prose p-page mw-page ma' ~]) ~] == ++ poke |= =pail:neo From a569711ef9be334811694469846b62f27d973491 Mon Sep 17 00:00:00 2001 From: bonbud-macryg Date: Fri, 5 Jul 2024 11:55:45 +0100 Subject: [PATCH 07/10] Revisions / questions --- pkg/arvo/neo/cod/std/src/fil/types.txt | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/pkg/arvo/neo/cod/std/src/fil/types.txt b/pkg/arvo/neo/cod/std/src/fil/types.txt index 26b83d3708..0c4f0d103d 100644 --- a/pkg/arvo/neo/cod/std/src/fil/types.txt +++ b/pkg/arvo/neo/cod/std/src/fil/types.txt @@ -30,7 +30,7 @@ Dependency map. +$ band $+(band (map term fief)) ``` -The `term`s are arbitrary keywords defined in a shrub's `+deps` arm. When that shrub is created, the `conf` will have to include a map of all the required dependencies. +The `term`s are arbitrary keywords defined in a shrub's `+deps` arm. When that shrub is created, the `%make` card's `conf` will have to include a map of all the required dependencies. ## `bowl` @@ -51,13 +51,15 @@ The `term`s are arbitrary keywords defined in a shrub's `+deps` arm. When that s - `src`: source ship and path [of what?]. - `our`: our ship. -- `were`: ??? +- `were`: Deprecated; use `here` instead. - `here`: location of this shrub. - `now`: current datetime. - `eny`: entropy. - `deps`: ??? - `kids`: ??? +[above are dependencies and descendants yeah but need `lore` to explain the types and what they do here] + ## `card` An instruction for a shrub, similar to a `card:agent:gall`. @@ -122,7 +124,7 @@ Constraint on the state of a shrub. ## `dare` -A `%y` or `%z` care. (Think "dare is a downward care".) +A `%y` or `%z` care. (Mnemonic: "dare is a downward care".) ``` +$ dare ?(%y %z) @@ -184,7 +186,7 @@ Total version numbers for a shrub and its descendants. - “Why” is incremented when the shrub or any of its immediate children updates. (i.e. `%y` care.) - “Zed” is incremented when the shrub or any of its descendants updates. (i.e. `%z` care.) -[what about life, rift] +[what about shrub-life, ship-rift, etc?] [what about time] @@ -226,7 +228,7 @@ Unsigned 256-bit hash. ## `idea` -Pail transformation rule. [i think?] +State and history of a node. `thru` is the `/imp` corresponding to that node's API. ``` +$ idea @@ -322,7 +324,7 @@ The head is the data version, the tail the type version. ## `made` -Type, state, and dependency values for making a new shrub. +Type, state, and dependency values for making a new shrub. Used in `%make` cards. ``` +$ made [=stud init=(unit pail) =conf] @@ -436,7 +438,7 @@ Define a depdenency's state and pokes, constrain the depdenency's descendants' s ## `saga` -Versioned pail. [Maybe? How is this used?] +Versioned pail. [Seems like part of the aeon's `ever` increments when state changes, but is that `exe` or the `life`?] ``` +$ saga (pair aeon pail) @@ -446,6 +448,8 @@ Versioned pail. [Maybe? How is this used?] [256-bit hash, signed with [a shrub’s?] private key.] +[How are signatures used between shrubs?] + ``` +$ seal @uvH ``` From 0ce28dfc7e8de3cc9cf4bb77091d1626ceb6c34d Mon Sep 17 00:00:00 2001 From: bonbud-macryg Date: Fri, 5 Jul 2024 12:27:53 +0100 Subject: [PATCH 08/10] Add note about lock --- pkg/arvo/neo/cod/std/src/fil/types.txt | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/pkg/arvo/neo/cod/std/src/fil/types.txt b/pkg/arvo/neo/cod/std/src/fil/types.txt index 0c4f0d103d..25e2cdb17f 100644 --- a/pkg/arvo/neo/cod/std/src/fil/types.txt +++ b/pkg/arvo/neo/cod/std/src/fil/types.txt @@ -312,7 +312,7 @@ Data version numbers. +$ lock (pair @ud @ud) ``` -The head is the data version, the tail the type version. +The head is the data version, the tail the type version. Used in `ever`. ## `lore` @@ -348,17 +348,6 @@ In a state update, all relevant shrubs will be included and tagged with a `mode` Like `%add` and `%dif`, the `%del` `mode` will carry the data at the relevant path so that subscribers can act on that data however they like. -## `myth` - -Binding, possibly tombstoned. - -``` -+$ myth - $: pail=(unit pail) - =aeon - == -``` - ## `note` Shrubbery’s note type, analogous to `note:agent:gall`. From 5e1422e346cbda353242a1adb5f2570a3479fd62 Mon Sep 17 00:00:00 2001 From: bonbud-macryg Date: Thu, 1 Aug 2024 15:20:36 +0100 Subject: [PATCH 09/10] Implement feedback on docs --- pkg/arvo/neo/cod/std/src/fil/types.txt | 87 +++++++++++--------------- 1 file changed, 38 insertions(+), 49 deletions(-) diff --git a/pkg/arvo/neo/cod/std/src/fil/types.txt b/pkg/arvo/neo/cod/std/src/fil/types.txt index 25e2cdb17f..7a0d57d09f 100644 --- a/pkg/arvo/neo/cod/std/src/fil/types.txt +++ b/pkg/arvo/neo/cod/std/src/fil/types.txt @@ -4,7 +4,7 @@ This doesn't cover every type defined in `/sur/neo.hoon`. It does cover all of t ## `aeon` -Total version numbers and signature for a shrub. [How is the signature being used here?] +Total version numbers and signature for a shrub. ``` +$ aeon (pair ever oath) @@ -49,16 +49,14 @@ The `term`s are arbitrary keywords defined in a shrub's `+deps` arm. When that s == ``` -- `src`: source ship and path [of what?]. -- `our`: our ship. +- `src`: Source ship and path of the change that woke this shrub up. (On `+init`, the shrub that issued the `%make`. On `+poke`, the shrub that issued the `%poke`.) +- `our`: Our ship. - `were`: Deprecated; use `here` instead. -- `here`: location of this shrub. -- `now`: current datetime. -- `eny`: entropy. -- `deps`: ??? -- `kids`: ??? - -[above are dependencies and descendants yeah but need `lore` to explain the types and what they do here] +- `here`: Location of this shrub. +- `now`: Current datetime. +- `eny`: Entropy. +- `deps`: The shrub's dependencies. +- `kids`: The shurb's kids. ## `card` @@ -88,8 +86,6 @@ Perspective on a path. The cares `%x`, `%y`, and `%z` appear throughout the system: you’ll use them while defining `kids` and `deps`, and state updates will be head-tagged with one of these cares. -[not sure about %a, %b, %c; i know the correspond to x y z but not sure about usage] - ## `conf` Dependency configuration for a new shrub. @@ -116,11 +112,26 @@ Constraint on the state of a shrub. [%pro p=stud] [%any ~] == -``` +`` + +Most of these are unimplemented or aren't used in practice. For now, the only ones you need to know about are `%pro` and `%or`. -[explain each individually] +- `%pro`: The type must be this `stud`. +- `%or`: The type must be one of these `curb`s. -[how can they be combined, why would you do that?] +### Example usage + +``` +++ state + ^- curb:neo + [%pro %message] +``` + +``` +++ state + ^- curb:neo + [%or ~[[%pro %txt] [%pro %message]]] +``` ## `dare` @@ -134,7 +145,7 @@ Used while constraining descendants. ## `deed` -Whether or not a depdenency must already exist in order for this shrub to build. +Whether or not a dependency must be provided in the `%make` card in order for this shrub to build. ``` +$ deed @@ -144,7 +155,7 @@ Whether or not a depdenency must already exist in order for this shrub to build. == ``` -[in what case is `time` used?] +If a `time` is specified, the shrub will fail to build if the dependency hasn't been imported within that amount of time. This can be used while establishing a shrub on another ship as a dependency. ## `deps` @@ -186,9 +197,15 @@ Total version numbers for a shrub and its descendants. - “Why” is incremented when the shrub or any of its immediate children updates. (i.e. `%y` care.) - “Zed” is incremented when the shrub or any of its descendants updates. (i.e. `%z` care.) -[what about shrub-life, ship-rift, etc?] +The other fields we see here are needed to maintain referential transparency, but they're implementation details we won't cover here. It's worth talking about the `lock`s, as they represent different things corresponding to different cares. + +Each `lock` is two version numbers: one for data, and one for type. (The data version number is analagous to a [`case`](https://docs.urbit.org/glossary/case).) + +For `exe`, the data version is the number of times that the data has changed. For `why`, the data version is the node's data version plus the sum of its immediate kids' data versions. For `zed`, it's the node's data version plus the sum of all its descendants' data versions. -[what about time] +The type versions tell us how many times the shape of the value at this path has changed. In an `exe` care this is just the number of times the node's value has changed from null to non-null or vice-versa. (Every shrub starts with a type version number of 0. This happens to correspond to the breach count for that shrub, the `shrub-rift`.) + +The type versions in `why` and `zed` cares follow the same summation logic as the data versions described above, except they're the sum of type versions. ## `fief` @@ -314,14 +331,6 @@ Data version numbers. The head is the data version, the tail the type version. Used in `ever`. -## `lore` - -[??? - need this to fully explain bowl:neo] - -``` -+$ lore (axal idea) -``` - ## `made` Type, state, and dependency values for making a new shrub. Used in `%make` cards. @@ -367,14 +376,6 @@ The `note` type only works with shrubs, not Arvo. These `note`s sent in `card`s - `%tomb`: tombstone the shrub at this case. - `%cull`: delete the shrub. -## `oath` - -[Pair of unsigned 256-bit hash and a corresponding signature? Not sure about usage] - -``` -+$ oath (pair hash seal) -``` - ## `once` Partial version information for a shrub. @@ -427,22 +428,12 @@ Define a depdenency's state and pokes, constrain the depdenency's descendants' s ## `saga` -Versioned pail. [Seems like part of the aeon's `ever` increments when state changes, but is that `exe` or the `life`?] +Versioned pail. ``` +$ saga (pair aeon pail) ``` -## `seal` - -[256-bit hash, signed with [a shrub’s?] private key.] - -[How are signatures used between shrubs?] - -``` -+$ seal @uvH -``` - ## `stud` Name for a build system output, usually used like a mark. @@ -455,6 +446,4 @@ Name for a build system output, usually used like a mark. == ``` -Local studs can be referred to by their `@tas` without further complication, but foreign studs need to be addressed by their source `ship` and `desk`. - -[What is a foreign stud? From another ship or from any other shrub?] +We can use a `@tas` for the stud when the shrub comes from the local ship's base distribution of Shrubbery: the `/std` desk. In all other cases, we need to also specify the type's source ship and desk. This is analagous to the way shrubs treat all I/O that doesn't come from an ancestor as if it could have come from another ship on the network. From d16a03afa490ff52b0f51aa1bbe72feea0c57f63 Mon Sep 17 00:00:00 2001 From: bonbud-macryg Date: Fri, 2 Aug 2024 14:04:25 +0100 Subject: [PATCH 10/10] Implement initial feedback --- pkg/arvo/neo/cod/std/src/fil/types.txt | 39 +++++++++----------------- 1 file changed, 13 insertions(+), 26 deletions(-) diff --git a/pkg/arvo/neo/cod/std/src/fil/types.txt b/pkg/arvo/neo/cod/std/src/fil/types.txt index 7a0d57d09f..f9cfead43f 100644 --- a/pkg/arvo/neo/cod/std/src/fil/types.txt +++ b/pkg/arvo/neo/cod/std/src/fil/types.txt @@ -1,10 +1,10 @@ # Shrubbery Types -This doesn't cover every type defined in `/sur/neo.hoon`. It does cover all of the types you'll regularly work while writing userspace shrubs, and the types you need to know about to fully understand those types. +This doesn't cover every type defined in `/sur/neo.hoon`. It does cover all of the types you'll regularly work with while writing userspace shrubs, and the types you need to know about to fully understand those types. ## `aeon` -Total version numbers and signature for a shrub. +Total version numbers and signature for a shrub. Look at `ever` to see how version numbers are totaled. ``` +$ aeon (pair ever oath) @@ -14,7 +14,9 @@ Total version numbers and signature for a shrub. Fundamental node, recursive. -This mold builder creates a representation of a node in Clay like an [arch](https://docs.urbit.org/language/hoon/reference/arvo#arch) (a file or a directory) or [axil](https://docs.urbit.org/language/hoon/reference/arvo#axil) (fundamental node), but the directory map contains more axals, so it contains the entire subtree rather than just one level. +This mold builder creates a representation of a node in Clay like an [arch](https://docs.urbit.org/language/hoon/reference/arvo#arch) (a file or a directory) or [axil](https://docs.urbit.org/language/hoon/reference/arvo#axil) (fundamental node). + +In Arvo, the axal's directory is a map of `term` to `$`. In Shrubbery, the directory (`kid`) is a map of `iota` to `$`. This is because Shrubbery uses piths while Arvo uses paths. ``` ++ axal @@ -30,7 +32,7 @@ Dependency map. +$ band $+(band (map term fief)) ``` -The `term`s are arbitrary keywords defined in a shrub's `+deps` arm. When that shrub is created, the `%make` card's `conf` will have to include a map of all the required dependencies. +The `term`s are keywords defined by a shrub's `+deps` arm. When that shrub is created, the `%make` card's `conf` will have to include a map of all the required dependencies. ## `bowl` @@ -56,7 +58,7 @@ The `term`s are arbitrary keywords defined in a shrub's `+deps` arm. When that s - `now`: Current datetime. - `eny`: Entropy. - `deps`: The shrub's dependencies. -- `kids`: The shurb's kids. +- `kids`: The shrub's kids. ## `card` @@ -66,11 +68,11 @@ An instruction for a shrub, similar to a `card:agent:gall`. +$ card (pair pith note) ``` -The `pith` is the shrub this card will be sent to. The `note` will be of type `%make`, `%poke`, `%tomb`, or `%cull`. +The `pith` is the shrub this card will be sent to. The note will be head-tagged with `%make`, `%poke`, `%tomb`, or `%cull`. ## `care` -Perspective on a path. +Perspective on a path: the node at this path (`%x`), the node and its kids (`%y`), or the node and all its descendants (`%z`). ``` +$ care @@ -84,7 +86,9 @@ Perspective on a path. == ``` -The cares `%x`, `%y`, and `%z` appear throughout the system: you’ll use them while defining `kids` and `deps`, and state updates will be head-tagged with one of these cares. +The cares `%x`, `%y`, and `%z` appear throughout the system. You’ll use them while defining `kids` and `deps`. State updates will be head-tagged with one of these cares. + +Cares `%a`, `%b`, and `%c` are unimplemented. ## `conf` @@ -112,26 +116,9 @@ Constraint on the state of a shrub. [%pro p=stud] [%any ~] == -`` - -Most of these are unimplemented or aren't used in practice. For now, the only ones you need to know about are `%pro` and `%or`. - -- `%pro`: The type must be this `stud`. -- `%or`: The type must be one of these `curb`s. - -### Example usage - -``` -++ state - ^- curb:neo - [%pro %message] ``` -``` -++ state - ^- curb:neo - [%or ~[[%pro %txt] [%pro %message]]] -``` +These constraints can be combined to specify that a shrub takes one `curb` as its state (`%pro`) or that it can take one of several `curb`s as its state (`%or`). ## `dare`