on master help sign in
Merge branch 'master' into roll-reel-redux
2b16725poprox
.gitignore+4−1
@@ -13,6 +13,7 @@
13# next.js
13# next.js
14/.next/
14/.next/
15/out/
15/out/
16+.next
16
17
17# production
18# production
18/build
19/build
@@ -37,4 +38,6 @@ yarn-error.log*
37.vercel
38.vercel
38
39
39# editors
40# editors
40−/.nova/
41+/.nova/
42+
43+yarn.lock
components/EventPreview.js+42−38
@@ -4,6 +4,7 @@ import {
4 ShowOrHide,
4 ShowOrHide,
5 ReadableList,
5 ReadableList,
6 Person,
6 Person,
7+ Name,
7 DateRange,
8 DateRange,
8} from "../components/Snippets";
9} from "../components/Snippets";
9import {
10import {
@@ -14,6 +15,42 @@ import {
14 formatTimeZone,
15 formatTimeZone,
15} from "../lib/lib";
16} from "../lib/lib";
16
17
18+// JAL(2021.9.13) Couldn't quite get this to work properly. There's a trailing
19+// "and"
20+//
21+// function GuestList({ guests, textClass }) {
22+
23+// const renderGuests = guests?.length > 2 ? guests?.slice(0,2) : guests;
24+// const noRenderGuestsCount = guests?.slice(2).length;
25+
26+// return (
27+// <p className={textClass + " type-sub"}>
28+// <b>
29+// {renderGuests?.length > 1 ? "With guests " : "With guest "}
30+// </b>
31+// <ReadableList>
32+// {renderGuests?.map((guest, index) => (
33+// <>
34+// <Person
35+// key={`${guest.name}-${guest.patp}`}
36+// nameClassNames={textClass}
37+// patpClassNames={textClass}
38+// name={guest.name}
39+// patp={guest.patp}
40+// />
41+// {renderGuests?.length > 1 ? <span>, </span> : <></>}
42+// </>
43+// ))}
44+// {noRenderGuestsCount > 1 ?
45+// <Name>{noRenderGuestsCount} more </Name>
46+// :
47+// <></>
48+// }
49+// </ReadableList>
50+// </p>
51+// );
52+// }
53+
17export default function EventPreview({ event, className, big }) {
54export default function EventPreview({ event, className, big }) {
18 // Event tiles have a 'dark mode' used when their background images are dark and white text is needed for legibility.
55 // Event tiles have a 'dark mode' used when their background images are dark and white text is needed for legibility.
19 const grayText = event?.dark ? "text-washedWhite" : "text-wall-400";
56 const grayText = event?.dark ? "text-washedWhite" : "text-wall-400";
@@ -46,7 +83,11 @@ export default function EventPreview({ event, className, big }) {
46 } flex-col h-full`}
83 } flex-col h-full`}
47 >
84 >
48 <h3 className={`${blackText} mb-2`}>{event.title}</h3>
85 <h3 className={`${blackText} mb-2`}>{event.title}</h3>
86+ <p className={blackText + ""}>{event.description}</p>
87+ </div>
88+
89+ <div className="absolute p-6 left-0 bottom-0 w-full pr-32">
49− <p className={`${blackText} mb-2`}>{event.location}</p>
90+ <p className={`${blackText} type-sub mb-1`}>{event.location}</p>
50 <DateRange
91 <DateRange
51 starts={starts}
92 starts={starts}
52 ends={ends}
93 ends={ends}
@@ -54,43 +95,6 @@ export default function EventPreview({ event, className, big }) {
54 />
95 />
55 </div>
96 </div>
56
97
57− <div className="absolute p-6 left-0 bottom-0 w-full pr-32">
58− <ShowOrHide condition={event.hosts}>
59− <p className={blackText + " type-sub"}>
60− <b>{"Hosted by "}</b>
61− <ReadableList>
62− {event.hosts?.map((host, index) => (
63− <Person
64− key={`${host.name}-${host.patp}`}
65− nameClassNames={blackText}
66− patpClassNames={blackText}
67− name={host.name}
68− patp={host.patp}
69− />
70− ))}
71− </ReadableList>
72− </p>
73− </ShowOrHide>
74− <ShowOrHide condition={event.guests}>
75− <p className={blackText + " type-sub"}>
76− <b>
77− {event.guests?.length > 1 ? "With guests " : "With guest "}
78− </b>
79− <ReadableList>
80− {event.guests?.map((guest, index) => (
81− <Person
82− key={`${guest.name}-${guest.patp}`}
83− nameClassNames={blackText}
84− patpClassNames={blackText}
85− name={guest.name}
86− patp={guest.patp}
87− />
88− ))}
89− </ReadableList>
90− </p>
91− </ShowOrHide>
92− </div>
93−
94 {inFuture && event.registration_url ? (
98 {inFuture && event.registration_url ? (
95 <div className="absolute right-0 bottom-0 p-6">
99 <div className="absolute right-0 bottom-0 p-6">
96 <a
100 <a
content/blog/value-of-address-space-pt1.md+1−5
@@ -9,11 +9,7 @@ ship = "~patnes-rigtyn + ~ravmel-ropdyl"
9image = "https://media.urbit.org/site/posts/essays/value-of-address-space-pt1.jpg"
9image = "https://media.urbit.org/site/posts/essays/value-of-address-space-pt1.jpg"
10+++
10+++
11
11
12−<br>
13−
14−<img class="ba" src="https://media.urbit.org/site/posts/essays/value-of-address-space-pt1.jpg">
12+![](https://media.urbit.org/site/posts/essays/value-of-address-space-pt1.jpg)
15−
16−<br>
17
13
18_This is the first in a series of three posts on Urbit address space. See also [part 2](https://urbit.org/blog/value-of-address-space-pt2/) and [part 3](https://urbit.org/blog/value-of-address-space-pt3/)._
14_This is the first in a series of three posts on Urbit address space. See also [part 2](https://urbit.org/blog/value-of-address-space-pt2/) and [part 3](https://urbit.org/blog/value-of-address-space-pt3/)._
19
15
content/blog/value-of-address-space-pt2.md+11−33
@@ -9,11 +9,7 @@ ship = "~patnes-rigtyn + ~ravmel-ropdyl"
9image = "https://media.urbit.org/site/posts/essays/value-of-address-space-pt2.jpg"
9image = "https://media.urbit.org/site/posts/essays/value-of-address-space-pt2.jpg"
10+++
10+++
11
11
12−<br>
13−
14−<img class="ba" src="https://media.urbit.org/site/posts/essays/value-of-address-space-pt2.jpg">
12+![](https://media.urbit.org/site/posts/essays/value-of-address-space-pt2.jpg)
15−
16−<br>
17
13
18_This is the second in a series of three posts on Urbit address space. See also [part 1](https://urbit.org/blog/value-of-address-space-pt1/) and [part 3](https://urbit.org/blog/value-of-address-space-pt3/)._
14_This is the second in a series of three posts on Urbit address space. See also [part 1](https://urbit.org/blog/value-of-address-space-pt1/) and [part 3](https://urbit.org/blog/value-of-address-space-pt3/)._
19
15
@@ -25,21 +21,17 @@ Value and price are distinct concepts that often get conflated. In our view, Urb
25
21
26256 galaxies, ~65,000 stars, ~4B planets.
22256 galaxies, ~65,000 stars, ~4B planets.
27
23
28−<br>
29−
30−<img class="ba w-100" src="https://media.urbit.org/site/posts/essays/value-of-address-space-pt2a.svg">
24+![](https://media.urbit.org/site/posts/essays/value-of-address-space-pt2a.svg)
31−
32−<br>
33
25
34A foundational design principle of the Urbit network is that the address space is limited. This rarity helps qualify Urbit as a [collectible](https://nakamotoinstitute.org/shelling-out/), and thus creates a non-zero acquisition cost for an address. This cost discourages abuses like spam and bot-net attacks. Traditionally, these attacks are made with quasi-unlimited access to IP addresses. The unit economics of acquiring planets for these nefarious purposes is a strong deterrent.
26A foundational design principle of the Urbit network is that the address space is limited. This rarity helps qualify Urbit as a [collectible](https://nakamotoinstitute.org/shelling-out/), and thus creates a non-zero acquisition cost for an address. This cost discourages abuses like spam and bot-net attacks. Traditionally, these attacks are made with quasi-unlimited access to IP addresses. The unit economics of acquiring planets for these nefarious purposes is a strong deterrent.
35
27
36−There are 256 galaxies on the network. Each galaxy is initialized with ownership of 256 stars. Galaxies act as root nodes for peer discovery and packet routing within the Urbit network, and they are each also entitled to vote on updates to the smart contracts which govern the network. To date, galaxies trade primarily on OTC (over the counter) desks, and rarely appear on the open market.
28+There are 256 galaxies on the network. Each galaxy is initialized with ownership of 255 stars. Galaxies act as root nodes for peer discovery and packet routing within the Urbit network, and they are each also entitled to vote on updates to the smart contracts which govern the network. To date, galaxies trade primarily on OTC (over the counter) desks, and rarely appear on the open market.
37
29
38−There are 65,536 total stars on the network. In turn, each star is initialized with ownership of 65,536 planets. Stars currently trade on platforms independent of Tlon, such as [urbit.live](https://urbit.live/) and [opensea.io](https://opensea.io/). The current price range can easily be ascertained on those sites, but as of the time of this writing, stars are selling at a price that greatly discounts their planet holdings.
30+There are 65,280 total stars on the network. In turn, each star is initialized with ownership of 65,535 planets. Stars currently trade on platforms independent of Tlon, such as [urbit.live](https://urbit.live/) and [opensea.io](https://opensea.io/). The current price range can easily be ascertained on those sites, but as of the time of this writing, stars are selling at a price that greatly discounts their planet holdings.
39
31
40One would expect that in an efficient market the relative pricing of stars on one hand, and planets on the other hand would eventually align (so to speak). This may come to pass as the Urbit community increases education about Urbit, and as additional planet sellers and hosting providers enter the space.
32One would expect that in an efficient market the relative pricing of stars on one hand, and planets on the other hand would eventually align (so to speak). This may come to pass as the Urbit community increases education about Urbit, and as additional planet sellers and hosting providers enter the space.
41
33
42−Finally, there are 4,294,967,296 (or 2<sup>32</sup>) planets on the network. Planets currently trade largely in a range of $10 to $15. We expect planet prices to fluctuate from provider to provider as described in the previous post, based on the quality of services various providers offer. That said, it's worth noting that the cost to configure addresses for distribution is fairly static and this may act as something of a lower bound.
34+Finally, there are 4,294,901,760 (or ~2<sup>32</sup>) planets on the network. Planets currently trade largely in a range of $10 to $15. We expect planet prices to fluctuate from provider to provider as described in the previous post, based on the quality of services various providers offer. That said, it's worth noting that the cost to configure addresses for distribution is fairly static and this may act as something of a lower bound.
43
35
44That said, we also anticipate that planet prices will be abstracted away from most purchasers, and will be included in bundled annual packages of hosting and data routing services. For this reason, infrastructure service providers (i.e. hosting providers) will likely be the best positioned parties to capture value from planet distribution.
36That said, we also anticipate that planet prices will be abstracted away from most purchasers, and will be included in bundled annual packages of hosting and data routing services. For this reason, infrastructure service providers (i.e. hosting providers) will likely be the best positioned parties to capture value from planet distribution.
45
37
@@ -65,31 +57,21 @@ Utility is only one component of a value calculation. To further develop the inq
65
57
66Urbit IDs are individually represented by non-fungible ERC-721 tokens, and can therefore be sold by any platform that supports this token standard. Currently there are three known Urbit-exclusive sales platforms and one generalized ERC-721 platform that list Urbit IDs. Prices for stars and planets are readily available. Volume is low, as no effort has been made to promote the fact of availability, yet the number of [total transactions](https://azimuth.network/stats/events.txt) has increased steadily since the network was launched to Ethereum in 2019, even absent public messaging.
58Urbit IDs are individually represented by non-fungible ERC-721 tokens, and can therefore be sold by any platform that supports this token standard. Currently there are three known Urbit-exclusive sales platforms and one generalized ERC-721 platform that list Urbit IDs. Prices for stars and planets are readily available. Volume is low, as no effort has been made to promote the fact of availability, yet the number of [total transactions](https://azimuth.network/stats/events.txt) has increased steadily since the network was launched to Ethereum in 2019, even absent public messaging.
67
59
68−<br>
69−<img class="" src="https://media.urbit.org/site/posts/essays/value-of-address-space-pt2-tps.svg">
60+![](https://media.urbit.org/site/posts/essays/value-of-address-space-pt2-tps.svg)
70−<br>
71
61
72−<br>
73−<img class="" src="https://media.urbit.org/site/posts/essays/value-of-address-space-pt2-tss.svg">
62+![](https://media.urbit.org/site/posts/essays/value-of-address-space-pt2-tss.svg)
74−<br>
75
63
76Buying non-fungible tokens like Urbit IDs is rather different than trading quasi-fungible tokens like Bitcoin (even setting aside the issue of volume). Each Urbit ID is unique, and so they tend to be purchased by end users for their specific characteristics, rather than generically. As an example, the planet `~parret-barret` sold for about $1,000 at a time when most planets were selling for $10-20, perhaps due to its rhyming name. Planets with circular sigils also often sell for significantly more than other planets — we’re not entirely sure why this is the case.
64Buying non-fungible tokens like Urbit IDs is rather different than trading quasi-fungible tokens like Bitcoin (even setting aside the issue of volume). Each Urbit ID is unique, and so they tend to be purchased by end users for their specific characteristics, rather than generically. As an example, the planet `~parret-barret` sold for about $1,000 at a time when most planets were selling for $10-20, perhaps due to its rhyming name. Planets with circular sigils also often sell for significantly more than other planets — we’re not entirely sure why this is the case.
77
65
78## Planet Sales
66## Planet Sales
79
67
80−<br>
81−<img class="" src="https://media.urbit.org/site/posts/essays/value-of-address-space-pt2e-price-eth.svg">
68+![](https://media.urbit.org/site/posts/essays/value-of-address-space-pt2e-price-eth.svg)
82−<br>
83
69
84−<br>
85−<img class="" src="https://media.urbit.org/site/posts/essays/value-of-address-space-pt2e-price-btc.svg">
70+![](https://media.urbit.org/site/posts/essays/value-of-address-space-pt2e-price-btc.svg)
86−<br>
87
71
88## Star Sales
72## Star Sales
89
73
90−<br>
91−<img class="w-100" src="https://media.urbit.org/site/posts/essays/value-of-address-space-pt2e-price-btc-usd.svg">
74+![](https://media.urbit.org/site/posts/essays/value-of-address-space-pt2e-price-btc-usd.svg)
92−<br>
93
75
94This ID-specific trading pattern is generally appropriate in our view: Urbit ID isn’t designed to be rapidly traded at high volume. Urbit is more like a house than a fungible good like a currency.
76This ID-specific trading pattern is generally appropriate in our view: Urbit ID isn’t designed to be rapidly traded at high volume. Urbit is more like a house than a fungible good like a currency.
95
77
@@ -97,11 +79,7 @@ For the time being buying and selling of Urbit IDs happens through auctions on s
97
79
98Strictly speaking, liquidity is a measure of the degree to which a given asset will change in value due to a given transaction. In that sense, Urbit address space is likely fairly illiquid. But liquidity can’t be properly understood without volume. As noted above, the volume of transactions on the network has been steadily increasing since inception, and yet the price has remained fairly constant. This seems to indicate a healthy ratio.
80Strictly speaking, liquidity is a measure of the degree to which a given asset will change in value due to a given transaction. In that sense, Urbit address space is likely fairly illiquid. But liquidity can’t be properly understood without volume. As noted above, the volume of transactions on the network has been steadily increasing since inception, and yet the price has remained fairly constant. This seems to indicate a healthy ratio.
99
81
100−<br>
101−
102−<img class="ba w-100" src="https://media.urbit.org/site/posts/essays/value-of-address-space-pt2b.svg">
82+![](https://media.urbit.org/site/posts/essays/value-of-address-space-pt2b.svg)
103−
104−<br>
105
83
106A further impact on liquidity and volume is that of available supply. At present, the majority of Urbit address space is locked by smart contracts. These lockups began to release at varying linear rates in January 2019. All address space will be completely unlocked and tradeable by January 2025. Eventually as both understanding and demand increase, we anticipate that planets will find an equilibrium price, and stars will be repriced accordingly.
84A further impact on liquidity and volume is that of available supply. At present, the majority of Urbit address space is locked by smart contracts. These lockups began to release at varying linear rates in January 2019. All address space will be completely unlocked and tradeable by January 2025. Eventually as both understanding and demand increase, we anticipate that planets will find an equilibrium price, and stars will be repriced accordingly.
107
85
content/blog/value-of-address-space-pt3.md+5−15
@@ -11,9 +11,7 @@ image = "https://media.urbit.org/site/posts/essays/value-of-address-space-pt3.jp
11
11
12<br>
12<br>
13
13
14−<img class="ba" src="https://media.urbit.org/site/posts/essays/value-of-address-space-pt3.jpg">
14+![](https://media.urbit.org/site/posts/essays/value-of-address-space-pt3.jpg)
15−
16−<br>
17
15
18_This is the third in a series of three posts on Urbit address space. See also [part 1](https://urbit.org/blog/value-of-address-space-pt1/) and [part 2](https://urbit.org/blog/value-of-address-space-pt2/)._
16_This is the third in a series of three posts on Urbit address space. See also [part 1](https://urbit.org/blog/value-of-address-space-pt1/) and [part 2](https://urbit.org/blog/value-of-address-space-pt2/)._
19
17
@@ -53,13 +51,9 @@ A locked star is held in a contract and can neither be booted nor issue planets.
53
51
54In practice, the only Urbit IDs that are ‘locked’ are stars. A galaxy that is said to be locked is simply a galaxy whose stars are currently held by a lockup contract. A locked galaxy can be transferred (i.e. sold or simply moved to a new key) and booted (importantly, any galaxy—booted or not—can vote), but it can’t issue stars until the lockup contract expires.
52In practice, the only Urbit IDs that are ‘locked’ are stars. A galaxy that is said to be locked is simply a galaxy whose stars are currently held by a lockup contract. A locked galaxy can be transferred (i.e. sold or simply moved to a new key) and booted (importantly, any galaxy—booted or not—can vote), but it can’t issue stars until the lockup contract expires.
55
53
56−<br>
57−<img class="ba" src="https://media.urbit.org/site/posts/essays/value-of-address-space-pt3-graph1.png">
54+![Star Unlocking Schedule](https://media.urbit.org/site/posts/essays/value-of-address-space-pt3-graph1.png)
58−<br>
59
55
60−<br>
61−<img class="ba" src="https://media.urbit.org/site/posts/essays/value-of-address-space-pt3-graph2.png">
56+![Total Urbit IDs Spawned and Activated](https://media.urbit.org/site/posts/essays/value-of-address-space-pt3-graph2.png)
62−<br>
63
57
64These lockups all began to release at varying linear rates in January 2019 (specifically on Tue Jan 08 23:34:41 2019 UTC).
58These lockups all began to release at varying linear rates in January 2019 (specifically on Tue Jan 08 23:34:41 2019 UTC).
65
59
@@ -78,9 +72,7 @@ Spawning Limits –
78
72
79Unlocked stars are further gated by the number of planets they’re able to spawn. Every unlocked star was immediately able to spawn 1024 planets from the moment Urbit went live on the blockchain in January 2019—we wanted everyone to be able to invite some friends to their communities right away. From that date forward, the spawnable amount doubles every year (365 days), maxing out at 65,535 spawnable planets after 6 years.
73Unlocked stars are further gated by the number of planets they’re able to spawn. Every unlocked star was immediately able to spawn 1024 planets from the moment Urbit went live on the blockchain in January 2019—we wanted everyone to be able to invite some friends to their communities right away. From that date forward, the spawnable amount doubles every year (365 days), maxing out at 65,535 spawnable planets after 6 years.
80
74
81−<br>
82−<img class="ba" src="https://media.urbit.org/site/posts/essays/value-of-address-space-pt3-graph3.png">
75+![Total Spawnable Planets and Spawnable Planets per Star](https://media.urbit.org/site/posts/essays/value-of-address-space-pt3-graph3.png)
83−<br>
84
76
85When we layer the spawning limits over the various lockup contracts, we find that all Urbit address space is both unlocked and spawnable by January 9, 2025.
77When we layer the spawning limits over the various lockup contracts, we find that all Urbit address space is both unlocked and spawnable by January 9, 2025.
86
78
@@ -92,9 +84,7 @@ We consider the opacity of our understanding about transactions on the network t
92
84
93The chart below is an estimate (as of January 2020) based on our general understanding of how galaxies are distributed. Much of this is anecdotal, and it’s largely based on the very few transactions we’ve observed within the galaxy table since Urbit went on chain in 2019. This chart should therefore be understood as incomplete, and an estimate only.
85The chart below is an estimate (as of January 2020) based on our general understanding of how galaxies are distributed. Much of this is anecdotal, and it’s largely based on the very few transactions we’ve observed within the galaxy table since Urbit went on chain in 2019. This chart should therefore be understood as incomplete, and an estimate only.
94
86
95−<br>
96−<img class="ba" src="https://media.urbit.org/site/posts/essays/value-of-address-space-pt3-graph4.png">
87+![Estimated Galaxy Distribution](https://media.urbit.org/site/posts/essays/value-of-address-space-pt3-graph4.png)
97−<br>
98
88
99Address space distribution is best understood in terms of galaxies and stars independently, as they’re distinct assets. The chart above only illustrates galaxy distribution, but describes Tlon’s “naked” galaxy holdings, which are galaxies empty of their stars. These galaxies are empty because the stars they once contained have been distributed, primarily to Tlon contractors, employees, and to certain private buyers.
89Address space distribution is best understood in terms of galaxies and stars independently, as they’re distinct assets. The chart above only illustrates galaxy distribution, but describes Tlon’s “naked” galaxy holdings, which are galaxies empty of their stars. These galaxies are empty because the stars they once contained have been distributed, primarily to Tlon contractors, employees, and to certain private buyers.
100
90
content/docs/_index.md+1−1
@@ -6,7 +6,7 @@ template = "sections/docs.html"
6
6
7Welcome to the developer documentation for the Urbit project. This documentation
7Welcome to the developer documentation for the Urbit project. This documentation
8is maintained by [Tlon](https://tlon.io) and the Urbit community in a public
8is maintained by [Tlon](https://tlon.io) and the Urbit community in a public
9−[Github repository](https://github.com/urbit/docs). Issues and contributions are
9+[Github repository](https://github.com/urbit/urbit.org/tree/master/content/docs). Issues and contributions are
10welcome.
10welcome.
11
11
12This documentation provides a series of explainers, guides, tutorials and
12This documentation provides a series of explainers, guides, tutorials and
content/docs/arvo/concepts/subscriptions.md+43−43
@@ -4,7 +4,7 @@ weight = 50
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−Urbit relies heavily on subscriptions throughout the stack. We strongly
7+Urbit relies heavily on subscriptions throughout the stack. We strongly
8prefer reactive data flow compared to querying or polling, which is why
8prefer reactive data flow compared to querying or polling, which is why
9for example our equivalent to git natively supports subscriptions to its
9for example our equivalent to git natively supports subscriptions to its
10data.
10data.
@@ -12,7 +12,7 @@ data.
12We have many application-level styles of subscription, but we only have
12We have many application-level styles of subscription, but we only have
13three true subscription types in Arvo, named for the vane they're
13three true subscription types in Arvo, named for the vane they're
14implemented in: Clay subscriptions (filesystem), Gall subscriptions
14implemented in: Clay subscriptions (filesystem), Gall subscriptions
15−(applications), and Jael subscriptions (Urbit ID info). They're at
15+(applications), and Jael subscriptions (Urbit ID info). They're at
16three different points in the idea maze of subscriptions, and we'll
16three different points in the idea maze of subscriptions, and we'll
17encounter each of them here.
17encounter each of them here.
18
18
@@ -28,9 +28,9 @@ later request.
28### Exactly-once updates
28### Exactly-once updates
29
29
30Some subscriptions need the subscriber to receive each update separately
30Some subscriptions need the subscriber to receive each update separately
31−instead of collapsing them into a single diff. Sometimes a subscription
31+instead of collapsing them into a single diff. Sometimes a subscription
32is really a sequence of commands, in which case there's no meaningful
32is really a sequence of commands, in which case there's no meaningful
33−way to collapse them. Similarly, software updates may be expected to be
33+way to collapse them. Similarly, software updates may be expected to be
34applied in order.
34applied in order.
35
35
36### Syncing data
36### Syncing data
@@ -38,79 +38,79 @@ applied in order.
38Other times, it's more natural to think of a subscription as
38Other times, it's more natural to think of a subscription as
39communicating a data structure, where the only goal is to keep the data
39communicating a data structure, where the only goal is to keep the data
40structure on the subscriber's side up-to-date with what's on the
40structure on the subscriber's side up-to-date with what's on the
41−publisher's side. In this case, it's perfectly fine to collapse several
41+publisher's side. In this case, it's perfectly fine to collapse several
42updates into one large update, or even to resend the entire data
42updates into one large update, or even to resend the entire data
43−structure. Partial updates exist only as an optimization.
43+structure. Partial updates exist only as an optimization.
44
44
45For this sort of subscription, we commonly use terms like "diff" instead
45For this sort of subscription, we commonly use terms like "diff" instead
46of "message" or "update", and we say that we "apply a diff" instead of
46of "message" or "update", and we say that we "apply a diff" instead of
47−"process an update". We also often identify the subscription with the
47+"process an update". We also often identify the subscription with the
48data structure itself.
48data structure itself.
49
49
50## Memory pressure
50## Memory pressure
51
51
52Naively implemented, subscriptions pose a memory leak risk if the
52Naively implemented, subscriptions pose a memory leak risk if the
53subscriber can't receive updates as fast as the publisher wants to send
53subscriber can't receive updates as fast as the publisher wants to send
54−them. This commonly happens when the subscriber goes offline for an
54+them. This commonly happens when the subscriber goes offline for an
55−extended period of time (possibly forever; especially for comets). It's
55+extended period of time (possibly forever; especially for comets). It's
56sufficient to bound the amount of memory dedicated to any particular
56sufficient to bound the amount of memory dedicated to any particular
57subscriber.
57subscriber.
58
58
59In a synchronous system, you don't have to worry about what happens if
59In a synchronous system, you don't have to worry about what happens if
60−one side or the other ceases to be available. All of our subscriptions,
60+one side or the other ceases to be available. All of our subscriptions,
61though, can happen between ships.
61though, can happen between ships.
62
62
63### Small data
63### Small data
64
64
65For particularly low-volume subscriptions, it may be acceptable to
65For particularly low-volume subscriptions, it may be acceptable to
66−ignore the problem. Jael uses this approach, since the only time it's
66+ignore the problem. Jael uses this approach, since the only time it's
67used across ships is to update moon keys, which is very low-volume and
67used across ships is to update moon keys, which is very low-volume and
68−less than 1KB per update. If these subscriptions are used for more,
68+less than 1KB per update. If these subscriptions are used for more,
69this strategy will have to be revisited.
69this strategy will have to be revisited.
70
70
71### Buffers
71### Buffers
72
72
73−A common solution to this problem is the venerable buffer. If more than
73+A common solution to this problem is the venerable buffer. If more than
74−N updates need to be sent, start dropping updates. There are several
74+N updates need to be sent, start dropping updates. There are several
75options for what to do when the buffer is full and the publisher wishes
75options for what to do when the buffer is full and the publisher wishes
76to send another message:
76to send another message:
77
77
78−- Drop the oldest message. Particularly suitable for systems where new
78+- Drop the oldest message. Particularly suitable for systems where new
79−messages obsolete old ones. For example, if you just need the latest
79+ messages obsolete old ones. For example, if you just need the latest
80−ticker price for an asset, you could use a buffer size of one and
80+ ticker price for an asset, you could use a buffer size of one and
81−replaced it any time you have a new price.
81+ replaced it any time you have a new price.
82
82
83−- Don't add the new message to the buffer. Semantically this is usually
83+- Don't add the new message to the buffer. Semantically this is usually
84−less helpful, but mechanically it can be simpler and reduce memory
84+ less helpful, but mechanically it can be simpler and reduce memory
85−churn, since the buffer stops changing and new messages are simply
85+ churn, since the buffer stops changing and new messages are simply
86−ignored.
86+ ignored.
87
87
88−- Drop the newest message and close the subscription. Unlike the
88+- Drop the newest message and close the subscription. Unlike the
89−previous two, this is compatible with the principle of exactly-once
89+ previous two, this is compatible with the principle of exactly-once
90−messaging. Specifically, it preserves the guarantee that you won't
90+ messaging. Specifically, it preserves the guarantee that you won't
91−receive two non-consecutive subscription updates, at the cost of making
91+ receive two non-consecutive subscription updates, at the cost of making
92−you resubscribe if you fall behind.
92+ you resubscribe if you fall behind.
93
93
94−Gall subscriptions use the last of these. The buffer is bounded by a
94+Gall subscriptions use the last of these. The buffer is bounded by a
95simple heuristic, and when a subscription exceeds that buffer, it is
95simple heuristic, and when a subscription exceeds that buffer, it is
96closed and the app is expected to resubscribe when they come back
96closed and the app is expected to resubscribe when they come back
97−online. Note that even though the subscription is closed, messages in
97+online. Note that even though the subscription is closed, messages in
98flight cannot be removed until they've been acknowledged since Ames
98flight cannot be removed until they've been acknowledged since Ames
99guarantees exactly-once messaging, so those last few messages will be
99guarantees exactly-once messaging, so those last few messages will be
100stuck in memory until the subscriber comes back online.
100stuck in memory until the subscriber comes back online.
101
101
102Buffers are commonly bounded by size, but this puts constraints on the
102Buffers are commonly bounded by size, but this puts constraints on the
103−types of messages may be sent. They may also be bounded in time: if the
103+types of messages may be sent. They may also be bounded in time: if the
104subscriber stops taking messages for at least X time, the buffer is
104subscriber stops taking messages for at least X time, the buffer is
105−full. Gall taks a hybrid approach; currently the heuristic is that the
105+full. Gall taks a hybrid approach; currently the heuristic is that the
106buffer counts as full if it has at least five messages and it has been
106buffer counts as full if it has at least five messages and it has been
10730 seconds since a message was acknowledged.
10730 seconds since a message was acknowledged.
108
108
109### One at a time
109### One at a time
110
110
111−Another scheme is to avoid multi-message subscriptions. Instead of
111+Another scheme is to avoid multi-message subscriptions. Instead of
112allowing the subscriber to subscribe to all future updates on a path,
112allowing the subscriber to subscribe to all future updates on a path,
113−allow them to "subscribe" to the *next* update only. When they get that
113+allow them to "subscribe" to the _next_ update only. When they get that
114update, they subscribe to the new next update, so that they ultimately
114update, they subscribe to the new next update, so that they ultimately
115get every message.
115get every message.
116
116
@@ -122,41 +122,41 @@ This is near the theoretical ideal for memory usage, since you'll never
122queue up several messages to send to the subscriber.
122queue up several messages to send to the subscriber.
123
123
124It also encourages processing each update in order rather than zooming
124It also encourages processing each update in order rather than zooming
125−forward from time to time. It's possible (if a little awkward) to
125+forward from time to time. It's possible (if a little awkward) to
126simulate this with buffers though, and it's possible to allow zooming
126simulate this with buffers though, and it's possible to allow zooming
127forward in the one-at-a-time scheme by having the requests be "most
127forward in the one-at-a-time scheme by having the requests be "most
128recent after update N" instead of "next after update N".
128recent after update N" instead of "next after update N".
129
129
130This scheme is at its strongest, then, when you're already storing
130This scheme is at its strongest, then, when you're already storing
131intermediate states or updates, or when you don't care about
131intermediate states or updates, or when you don't care about
132−intermediate states and always send the most recent one. Otherwise,
132+intermediate states and always send the most recent one. Otherwise,
133buffers are a convenient place to temporarily store updates that you
133buffers are a convenient place to temporarily store updates that you
134−don't want to store internally. Of course, if it's semantically
134+don't want to store internally. Of course, if it's semantically
135important that you give each update separately, buffers won't save you
135important that you give each update separately, buffers won't save you
136from having to store the intermediate updates, since they may fill up.
136from having to store the intermediate updates, since they may fill up.
137
137
138Another conceptual advantage is that it has no notion of "connectivity".
138Another conceptual advantage is that it has no notion of "connectivity".
139−It operates forever in a single mode. By contrast, buffer-based
139+It operates forever in a single mode. By contrast, buffer-based
140solutions must keep track of whether the buffer is full and react to
140solutions must keep track of whether the buffer is full and react to
141−that. This increases complexity in the system, and complexity is the
141+that. This increases complexity in the system, and complexity is the
142great evil.
142great evil.
143
143
144The biggest disadvantage of this system is that it takes much longer to
144The biggest disadvantage of this system is that it takes much longer to
145−process many small updates. With buffers, the publisher could have a
145+process many small updates. With buffers, the publisher could have a
146dozen small updates in flight at the same time, while in this scheme
146dozen small updates in flight at the same time, while in this scheme
147they would only send one at a time, waiting for a response between each
147they would only send one at a time, waiting for a response between each
148−one. Losing this pipelining can be quite significant for some
148+one. Losing this pipelining can be quite significant for some
149applications, but for low-volume subscriptions (certainly anything that
149applications, but for low-volume subscriptions (certainly anything that
150updates less than once per minute) this will have no noticeable effect.
150updates less than once per minute) this will have no noticeable effect.
151
151
152−Clay uses this scheme. It's low-volume, it stores all previous states
152+Clay uses this scheme. It's low-volume, it stores all previous states
153anyway (since it's a revision-control system), and it's sometimes
153anyway (since it's a revision-control system), and it's sometimes
154important to get updates one at a time (for example when downloading OTA
154important to get updates one at a time (for example when downloading OTA
155−software updates). Ships that send OTA updates often have many ships
155+software updates). Ships that send OTA updates often have many ships
156subscribed to them, and the updates themselves may be large, so it's
156subscribed to them, and the updates themselves may be large, so it's
157important they don't queue up when ships inevitably disappear.
157important they don't queue up when ships inevitably disappear.
158
158
159I tend to think most Gall subscriptions should follow this pattern as
159I tend to think most Gall subscriptions should follow this pattern as
160−well. Our most latency-sensitive subscriptions are chat messages, and
160+well. Our most latency-sensitive subscriptions are chat messages, and
161while I haven't tested it, I would guess that even those wouldn't be
161while I haven't tested it, I would guess that even those wouldn't be
162affected by this scheme.
162affected by this scheme.
content/docs/development/environment.md+1−1
@@ -14,7 +14,7 @@ To do work with Hoon, we recommended using a "fake" ship -- one that's not
14connected to the network.
14connected to the network.
15
15
16Because such a ship has no presence on the network, you don't need an Azimuth
16Because such a ship has no presence on the network, you don't need an Azimuth
17−identity. You just need to have [installed the Urbit binary](/getting-started).
17+identity. You just need to have [installed the Urbit binary](/getting-started/cli).
18
18
19To create a fake ship named `~zod`, run the command below. You can replace `zod`
19To create a fake ship named `~zod`, run the command below. You can replace `zod`
20with any valid Urbit ship-name.
20with any valid Urbit ship-name.
content/docs/hoon/reference/rune/tis.md+9−3
@@ -423,11 +423,11 @@ Regular: **running**.
423
423
424### `=*` "tistar"
424### `=*` "tistar"
425
425
426−`[%tstr p=term q=hoon r=hoon]`: define a macro.
426+`[%tstr p=term q=hoon r=hoon]`: define a deferred expression.
427
427
428##### Produces
428##### Produces
429
429
430−`r`, compiled with a subject in which `p` is a macro for `q`.
430+`r`, compiled with a subject in which `p` is a deferred expression for `q`.
431
431
432##### Syntax
432##### Syntax
433
433
@@ -435,7 +435,13 @@ Regular: **3-fixed**.
435
435
436##### Discussion
436##### Discussion
437
437
438−The difference between macroing and pinning is that pinning changes the subject, but for macroing the subject noun stays the same. The macro'd expression, `q`, is recorded in the type information of `p`. `q` is calculated every time you use the `p` macro.
438+`=*` assigns a name to an expression that will be evaluated in each place the
439+name is dereferenced. This allows you to "write" through it to the original
440+subject `axis`. `q` is recorded in the type information of `p`, and `q` is
441+calculated every time you use `p`.
442+
443+This rune has some similarities with macros, and some similarities with aliases,
444+but it is not really either.
439
445
440##### Examples
446##### Examples
441
447
content/docs/hoon/reference/stdlib/1a.md+403−284
@@ -4,7 +4,7 @@ weight = 1
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++add`
7+## `++add`
8
8
9Add
9Add
10
10
@@ -23,41 +23,54 @@ An [`atom`](/docs/glossary/atom).
23#### Source
23#### Source
24
24
25```hoon
25```hoon
26− ++ add
26+++ add
27− ~/ %add
27+ ~/ %add
28− |= [a=@ b=@]
28+ |= [a=@ b=@]
29− ^- @
29+ ^- @
30− ?: =(0 a) b
30+ ?: =(0 a) b
31− $(a (dec a), b +(b))
31+ $(a (dec a), b +(b))
32```
32```
33
33
34#### Examples
34#### Examples
35
35
36```
36```
37− > (add 2 2)
37+> (add 2 2)
38− 4
38+4
39+```
39
40
41+```
40− > (add 1 1.000.000)
42+> (add 1 1.000.000)
41− 1.000.001
43+1.000.001
44+```
42
45
46+```
43− > (add 1.333 (mul 2 2))
47+> (add 1.333 (mul 2 2))
44− 1.337
48+1.337
49+```
45
50
51+```
46− > (add 'a' 4)
52+> (add 'a' 4)
47− 101
53+101
54+```
48
55
56+```
49− > (add 'a' 'b')
57+> (add 'a' 'b')
50− 195
58+195
59+```
51
60
61+```
52− > (add 0xc 0xf)
62+> (add 0xc 0xf)
53− 27
63+27
64+```
54
65
66+```
55− > `@ux`(add 0xc 0xf)
67+> `@ux`(add 0xc 0xf)
56− 0x1b
68+0x1b
57```
69```
58
70
59---
71---
72+
60−### `++dec`
73+## `++dec`
61
74
62Decrement
75Decrement
63
76
@@ -74,41 +87,47 @@ An [`atom`](/docs/glossary/atom).
74#### Source
87#### Source
75
88
76```hoon
89```hoon
77− ++ dec
90+++ dec
78− ~/ %dec
91+ ~/ %dec
79− |= a=@
92+ |= a=@
80− ~| %decrement-underflow
93+ ~_ leaf+"decrement-underflow"
81− ?< =(0 a)
94+ ?< =(0 a)
82− =+ b=0
95+ =+ b=0
83− |- ^- @
96+ |- ^- @
84− ?: =(a +(b)) b
97+ ?: =(a +(b)) b
85− $(b +(b))
98+ $(b +(b))
86```
99```
87
100
88#### Examples
101#### Examples
89
102
90```
103```
91− > (dec 7)
104+> (dec 7)
92− 6
105+6
93−
106+```
94− > (dec 0)
95− ! decrement-underflow
96− ! exit
97
107
108+```
98− > (dec 'b')
109+> (dec 0)
99− 97
110+! decrement-underflow
100− > `@t`(dec 'b')
111+! exit
101− 'a'
112+```
102
113
114+```
103− > (dec 0xc)
115+> (dec 'b')
104− 11
116+97
105− > `@ux`(dec 0xc)
117+> `@t`(dec 'b')
106− 0xb
118+'a'
107```
119```
108
120
121+```
122+> (dec 0xc)
123+11
124+> `@ux`(dec 0xc)
125+0xb
126+```
109
127
110---
128---
129+
111−### `++div`
130+## `++div`
112
131
113Divide
132Divide
114
133
@@ -127,43 +146,52 @@ An [`atom`](/docs/glossary/atom).
127#### Source
146#### Source
128
147
129```hoon
148```hoon
130− ++ div
149+++ div
131− ~/ %div
150+ ~/ %div
132− |: [a=`@`1 b=`@`1]
151+ |: [a=`@`1 b=`@`1]
133− ^- @
152+ ^- @
134− ~_ leaf+"divide-by-zero"
153+ ~_ leaf+"divide-by-zero"
135− ?< =(0 b)
154+ ?< =(0 b)
136− =+ c=0
155+ =+ c=0
137− |-
156+ |-
138− ?: (lth a b) c
157+ ?: (lth a b) c
139− $(a (sub a b), c +(c))
158+ $(a (sub a b), c +(c))
140```
159```
141
160
142#### Examples
161#### Examples
143
162
144```
163```
145− > (div 4 2)
164+> (div 4 2)
146− 2
165+2
166+```
147
167
168+```
148− > (div 17 8)
169+> (div 17 8)
149− 2
170+2
171+```
150
172
173+```
151− > (div 20 30)
174+> (div 20 30)
152− 0
175+0
176+```
153
177
178+```
154− > (div 'ab' 'a')
179+> (div 'ab' 'a')
155− 259
180+259
156− > `@`'ab'
181+> `@`'ab'
157− 25.185
182+25.185
158− > `@`a
183+> `@`a
159− 97
184+97
185+```
160
186
187+```
161− > (div 0x9f 0x29)
188+> (div 0x9f 0x29)
162− 6
189+6
163```
190```
164
191
165---
192---
193+
166−### `++dvr`
194+## `++dvr`
167
195
168Divide with remainder
196Divide with remainder
169
197
@@ -182,38 +210,47 @@ A cell of [`atoms`](/docs/glossary/atom).
182#### Source
210#### Source
183
211
184```hoon
212```hoon
185− ++ dvr
213+++ dvr
186− ~/ %dvr
214+ ~/ %dvr
187− |= [a=@ b=@]
215+ |= [a=@ b=@]
188− ^- [p=@ q=@]
216+ ^- [p=@ q=@]
189− [(div a b) (mod a b)]
217+ [(div a b) (mod a b)]
190```
218```
191
219
192#### Examples
220#### Examples
193
221
194```
222```
195− > (dvr 17 8)
223+> (dvr 17 8)
196− [p=2 q=1]
224+[p=2 q=1]
225+```
197
226
227+```
198− > (dvr 17 6)
228+> (dvr 17 6)
199− [p=2 q=5]
229+[p=2 q=5]
230+```
200
231
232+```
201− > (dvr 18 6)
233+> (dvr 18 6)
202− [p=3 q=0]
234+[p=3 q=0]
235+```
203
236
237+```
204− > (dvr 4 2)
238+> (dvr 4 2)
205− [p=2 q=0]
239+[p=2 q=0]
240+```
206
241
242+```
207− > (dvr 'ab 'a')
243+> (dvr 'ab 'a')
208− [p=259 q=62]
244+[p=259 q=62]
209− > `@`'a'
245+> `@`'a'
210− 97
246+97
211− > `@`'ab'
247+> `@`'ab'
212− 25.185
248+25.185
213```
249```
214
250
215---
251---
252+
216−### `++gte`
253+## `++gte`
217
254
218Greater-than/equal
255Greater-than/equal
219
256
@@ -232,28 +269,33 @@ A flag.
232#### Source
269#### Source
233
270
234```hoon
271```hoon
235− ++ gte
272+++ gte
236− ~/ %gte
273+ ~/ %gte
237− |= [a=@ b=@]
274+ |= [a=@ b=@]
238− ^- ?
275+ ^- ?
239− !(lth a b)
276+ !(lth a b)
240```
277```
241
278
242#### Examples
279#### Examples
243
280
244```
281```
245− > (gte 100 10)
282+> (gte 100 10)
246− %.y
283+%.y
284+```
247
285
286+```
248− > (gte 4 4)
287+> (gte 4 4)
249− %.y
288+%.y
289+```
250
290
291+```
251− > (gte 3 4)
292+> (gte 3 4)
252− %.n
293+%.n
253```
294```
254
295
255---
296---
297+
256−### `++gth`
298+## `++gth`
257
299
258Greater-than
300Greater-than
259
301
@@ -272,29 +314,33 @@ A flag.
272#### Source
314#### Source
273
315
274```hoon
316```hoon
275− ++ gth
317+++ gth
276− ~/ %gth
318+ ~/ %gth
277− |= [a=@ b=@]
319+ |= [a=@ b=@]
278− ^- ?
320+ ^- ?
279− !(lte a b)
321+ !(lte a b)
280```
322```
281
323
282−
283#### Examples
324#### Examples
284
325
285```
326```
286− > (gth 'd' 'c')
327+> (gth 'd' 'c')
287− %.y
328+%.y
329+```
288
330
331+```
289− > (gth ~h1 ~m61)
332+> (gth ~h1 ~m61)
290− %.n
333+%.n
334+```
291
335
336+```
292− > (gth 'steak' 'brisket')
337+> (gth 'steak' 'brisket')
293− %.n
338+%.n
294```
339```
295
340
296---
341---
342+
297−### `++lte`
343+## `++lte`
298
344
299Less-than/equal
345Less-than/equal
300
346
@@ -313,45 +359,56 @@ A flag.
313#### Source
359#### Source
314
360
315```hoon
361```hoon
316− ++ lte
362+++ lte
317− ~/ %lte
363+ ~/ %lte
318− |= [a=@ b=@]
364+ |= [a=@ b=@]
319− |(=(a b) (lth a b))
365+ |(=(a b) (lth a b))
320```
366```
321
367
322#### Examples
368#### Examples
323
369
324```
370```
325− > (lte 4 5)
371+> (lte 4 5)
326− %.y
372+%.y
327−
373+```
328− > (lte 5 4)
329− %.n
330−
331− > (lte 5 5)
332− %.y
333
374
375+```
334− > (lte 0 0)
376+> (lte 5 4)
335− %.y
377+%.n
378+```
336
379
380+```
381+> (lte 5 5)
382+%.y
383+```
337
384
385+```
338− > (lte 'a' 'b')
386+> (lte 0 0)
339− %.y
387+%.y
340− > `@`'a'
341− 97
342− > `@`'b'
388+```
343− 98
344
389
345− > (lte 'abraham' 'bob')
390+```
346− %.n
391+> (lte 'a' 'b')
392+%.y
393+> `@`'a'
394+97
395+> `@`'b'
396+98
397+```
347
398
348− > (lte ~m61 ~h1)
399+```
400+> (lte 'abraham' 'bob')
349− %.n
401+%.n
350```
402```
351
403
404+```
405+> (lte ~m61 ~h1)
406+%.n
407+```
352
408
353---
409---
410+
354−### `++lth`
411+## `++lth`
355
412
356Less-than
413Less-than
357
414
@@ -370,46 +427,57 @@ A flag.
370#### Source
427#### Source
371
428
372```hoon
429```hoon
373− ++ lth
430+++ lth
374− ~/ %lth
431+ ~/ %lth
375− |= [a=@ b=@]
432+ |= [a=@ b=@]
376− ^- ?
433+ ^- ?
377− ?& !=(a b)
434+ ?& !=(a b)
378− |-
435+ |-
379− ?| =(0 a)
436+ ?| =(0 a)
380− ?& !=(0 b)
437+ ?& !=(0 b)
381− $(a (dec a), b (dec b))
438+ $(a (dec a), b (dec b))
382− == == ==
439+ == == ==
383```
440```
384
441
385#### Examples
442#### Examples
386
443
387```
444```
388− > (lth 4 5)
445+> (lth 4 5)
389− %.y
446+%.y
447+```
390
448
449+```
391− > (lth 5 4)
450+> (lth 5 4)
392− %.n
451+%.n
452+```
393
453
454+```
394− > (lth 5 5)
455+> (lth 5 5)
395− %.n
456+%.n
457+```
396
458
459+```
397− > (lth 5 0)
460+> (lth 5 0)
398− %.n
461+%.n
462+```
399
463
464+```
400− > (lth 'a' 'b')
465+> (lth 'a' 'b')
401− %.y
466+%.y
402− > `@`'a'
467+> `@`'a'
403− 97
468+97
404− > `@`'b'
469+> `@`'b'
405− 98
470+98
471+```
406
472
473+```
407− > (lth 'abraham' 'bob')
474+> (lth 'abraham' 'bob')
408− %.n
475+%.n
409```
476```
410
477
411---
478---
479+
412−### `++max`
480+## `++max`
413
481
414Maximum
482Maximum
415
483
@@ -428,44 +496,59 @@ An [`atom`](/docs/glossary/atom).
428#### Source
496#### Source
429
497
430```hoon
498```hoon
431− ++ max
499+++ max
432− ~/ %max
500+ ~/ %max
433− |= [a=@ b=@]
501+ |= [a=@ b=@]
434− ^- @
502+ ^- @
435− ?: (gth a b) a
503+ ?: (gth a b) a
436− b
504+ b
437```
505```
438
506
439#### Examples
507#### Examples
440
508
441```
509```
442− > (max 10 100)
510+> (max 10 100)
443− 100
511+100
512+```
444
513
514+```
445− > (max 10.443 9)
515+> (max 10.443 9)
446− 10.443
516+10.443
517+```
447
518
519+```
448− > (max 1 1)
520+> (max 1 1)
449− 1
521+1
522+```
450
523
524+```
451− > (max 'abraham' 'bob')
525+> (max 'abraham' 'bob')
452− 30.787.873.400.840.801
526+30.787.873.400.840.801
527+```
453
528
529+```
454− > `@t`(max 'abraham' 'bob')
530+> `@t`(max 'abraham' 'bob')
455− 'abraham'
531+'abraham'
532+```
456
533
534+```
457− > `@t`(max 'abraham' 'benjamin')
535+> `@t`(max 'abraham' 'benjamin')
458− 'benjamin'
536+'benjamin'
537+```
459
538
539+```
460− > `@dr`(max ~m6 ~h1)
540+> `@dr`(max ~m6 ~h1)
461− ~h1
541+~h1
542+```
462
543
544+```
463− >`@ux`(max 0xe1 0x1e)
545+>`@ux`(max 0xe1 0x1e)
464− 0xe1
546+0xe1
465```
547```
466
548
467---
549---
550+
468−### `++min`
551+## `++min`
469
552
470Minimum
553Minimum
471
554
@@ -484,42 +567,54 @@ An [`atom`](/docs/glossary/atom).
484#### Source
567#### Source
485
568
486```hoon
569```hoon
487− ++ min
570+++ min
488− ~/ %min
571+ ~/ %min
489− |= [a=@ b=@]
572+ |= [a=@ b=@]
490− ^- @
573+ ^- @
491− ?: (lth a b) a
574+ ?: (lth a b) a
492− b
575+ b
493```
576```
494
577
495#### Examples
578#### Examples
496
579
497```
580```
498− > (min 10 100)
581+> (min 10 100)
499− 10
582+10
500−
583+```
501− > (min 10.443 9)
502− 9
503
584
585+```
504− > (min 1 1)
586+> (min 10.443 9)
505− 1
587+9
588+```
506
589
507− > (min 'abraham' 'bob')
590+```
508− 6.451.042
591+> (min 1 1)
592+1
593+```
509
594
595+```
510− > `@t`(min 'abraham' 'bob')
596+> (min 'abraham' 'bob')
511− 'bob'
597+6.451.042
598+```
512
599
600+```
513− > `@t`(min 'abraham' 'benjamin')
601+> `@t`(min 'abraham' 'bob')
514− 'abraham'
602+'bob'
603+```
515
604
516− > `@dr`(min ~m6 ~h1)
605+```
517− ~m6
606+> `@t`(min 'abraham' 'benjamin')
607+'abraham'
518```
608```
519
609
610+```
611+> `@dr`(min ~m6 ~h1)
612+~m6
613+```
520
614
521---
615---
616+
522−### `++mod`
617+## `++mod`
523
618
524Modulus
619Modulus
525
620
@@ -538,39 +633,48 @@ An [`atom`](/docs/glossary/atom).
538#### Source
633#### Source
539
634
540```hoon
635```hoon
541− ++ mod
636+++ mod
542− ~/ %mod
637+ ~/ %mod
543− |: [a=`@`1 b=`@`1]
638+ |: [a=`@`1 b=`@`1]
544− ^- @
639+ ^- @
545− ?< =(0 b)
640+ ?< =(0 b)
546− (sub a (mul b (div a b)))
641+ (sub a (mul b (div a b)))
547```
642```
548
643
549#### Examples
644#### Examples
550
645
551```
646```
552− > (mod 5 2)
647+> (mod 5 2)
553− 1
648+1
649+```
554
650
651+```
555− > (mod 5 5)
652+> (mod 5 5)
556− 0
653+0
654+```
557
655
656+```
558− > (mod 2 5)
657+> (mod 2 5)
559− 2
658+2
659+```
560
660
661+```
561− > (mod 40 20)
662+> (mod 40 20)
562− 0
663+0
664+```
563
665
666+```
564− > `@`'c'
667+> `@`'c'
565− 99
668+99
566− >`@`'a'
669+>`@`'a'
567− 97
670+97
568− > (mod 'c' 'a')
671+> (mod 'c' 'a')
569− 2
672+2
570```
673```
571
674
572---
675---
676+
573−### `++mul`
677+## `++mul`
574
678
575Multiply
679Multiply
576
680
@@ -589,39 +693,45 @@ An [`atom`](/docs/glossary/atom).
589#### Source
693#### Source
590
694
591```hoon
695```hoon
592− ++ mul
696+++ mul
593− ~/ %mul
697+ ~/ %mul
594− |: [a=`@`1 b=`@`1]
698+ |: [a=`@`1 b=`@`1]
595− ^- @
699+ ^- @
596− =+ c=0
700+ =+ c=0
597− |-
701+ |-
598− ?: =(0 a) c
702+ ?: =(0 a) c
599− $(a (dec a), c (add b c))
703+ $(a (dec a), c (add b c))
600```
704```
601
705
602#### Examples
706#### Examples
603
707
604```
708```
605− > (mul 3 4)
709+> (mul 3 4)
606− 12
710+12
607−
711+```
608− > (mul 0 1)
609− 0
610
712
611− > `@`'a'
713+```
612− 97
613− > `@`'b'
614− 98
615− > (mul 'a' 'b')
714+> (mul 0 1)
616− 9.506
715+0
716+```
617
717
618− >`@ux`(mul 0x1f 0xe)
718+```
619− 0x1b2
719+> `@`'a'
720+97
721+> `@`'b'
722+98
723+> (mul 'a' 'b')
724+9.506
620```
725```
621
726
727+```
728+>`@ux`(mul 0x1f 0xe)
729+0x1b2
730+```
622
731
623---
732---
733+
624−### `++sub`
734+## `++sub`
625
735
626Subtract
736Subtract
627
737
@@ -640,41 +750,50 @@ An [`atom`](/docs/glossary/atom).
640#### Source
750#### Source
641
751
642```hoon
752```hoon
643− ++ sub
753+++ sub
644− ~/ %sub
754+ ~/ %sub
645− |= [a=@ b=@]
755+ |= [a=@ b=@]
646− ~_ leaf+"subtract-underflow"
756+ ~_ leaf+"subtract-underflow"
647− ^- @
757+ ^- @
648− ?: =(0 b) a
758+ ?: =(0 b) a
649− $(a (dec a), b (dec b))
759+ $(a (dec a), b (dec b))
650```
760```
651
761
652−
653#### Examples
762#### Examples
654
763
655```
764```
656− > (sub 10 5)
765+> (sub 10 5)
657− 5
766+5
767+```
658
768
769+```
659− > (sub 243 44)
770+> (sub 243 44)
660− 199
771+199
772+```
661
773
774+```
662− > (sub 5 0)
775+> (sub 5 0)
663− 5
776+5
777+```
664
778
779+```
665− > (sub 0 5)
780+> (sub 0 5)
666− ! subtract-underflow
781+! subtract-underflow
667− ! exit
782+! exit
783+```
668
784
785+```
669− > (sub 'c' 'a')
786+> (sub 'c' 'a')
670− 2
787+2
671− > `@`'c'
788+> `@`'c'
672− 99
789+99
673− > `@`'a'
790+> `@`'a'
674− 97
791+97
792+```
675
793
794+```
676− > (sub 0x1f 0xe)
795+> (sub 0x1f 0xe)
677− 17
796+17
678− > `@ux`(sub 0x1f 0xe)
797+> `@ux`(sub 0x1f 0xe)
679− 0x11
798+0x11
680−```
799+```
content/docs/hoon/reference/stdlib/1b.md+125−89
@@ -7,7 +7,7 @@ template = "doc.html"
7Check out the Nock [explanation](/docs/nock/) for more
7Check out the Nock [explanation](/docs/nock/) for more
8information on the tree-addressing system.
8information on the tree-addressing system.
9
9
10−### `++cap`
10+## `++cap`
11
11
12Tree head
12Tree head
13
13
@@ -15,7 +15,6 @@ Tests whether the tree address `a` is in the head or the tail of a [`noun`](/doc
15Produces the constant [`atom`](/docs/glossary/atom) `%2` if it is within the head (subtree `+2`), or
15Produces the constant [`atom`](/docs/glossary/atom) `%2` if it is within the head (subtree `+2`), or
16the constant [`atom`](/docs/glossary/atom) `%3` if it is within the tail (subtree `+3`).
16the constant [`atom`](/docs/glossary/atom) `%3` if it is within the tail (subtree `+3`).
17
17
18−
19#### Accepts
18#### Accepts
20
19
21`a` is an [`atom`](/docs/glossary/atom).
20`a` is an [`atom`](/docs/glossary/atom).
@@ -27,46 +26,57 @@ A constant [`atom`](/docs/glossary/atom).
27#### Source
26#### Source
28
27
29```hoon
28```hoon
30− ++ cap
29+++ cap
31− ~/ %cap
30+ ~/ %cap
32− |= a=@
31+ |= a=@
33− ^- ?($2 $3)
32+ ^- ?(%2 %3)
34− ?- a
33+ ?- a
35− $2 %2
34+ %2 %2
36− $3 %3
35+ %3 %3
37− ?(%0 %1) !!
36+ ?(%0 %1) !!
38− * $(a (div a 2))
37+ * $(a (div a 2))
39− ==
38+ ==
40```
39```
41
40
42#### Examples
41#### Examples
43
42
44```
43```
45− > (cap 4)
44+> (cap 4)
46− %2
45+%2
46+```
47
47
48+```
48− > (cap 6)
49+> (cap 6)
49− %3
50+%3
51+```
50
52
53+```
51− > (cap (add 10 9))
54+> (cap (add 10 9))
52− %2
55+%2
56+```
53
57
58+```
54− > (cap 1) ::address '1' is in neither the head nor the tail
59+> (cap 1) ::address '1' is in neither the head nor the tail
55− ! exit
60+! exit
61+```
56
62
63+```
57− > (cap 0x40))
64+> (cap 0x40))
58− %2
65+%2
59− > `@`0x40
66+> `@`0x40
60− 64
67+64
68+```
61
69
70+```
62− > (cap 'a')
71+> (cap 'a')
63− %3
72+%3
64− > `@`'a'
73+> `@`'a'
65− 97
74+97
66```
75```
67
76
68---
77---
78+
69−### `++mas`
79+## `++mas`
70
80
71Address within head/tail
81Address within head/tail
72
82
@@ -84,51 +94,66 @@ An [`atom`](/docs/glossary/atom).
84#### Source
94#### Source
85
95
86```hoon
96```hoon
87− ++ mas
97+++ mas
88− ~/ %mas
98+ ~/ %mas
89− |= a=@
99+ |= a=@
90− ^- @
100+ ^- @
91− ?- a
101+ ?- a
92− 1 !!
102+ ?(%2 %3) 1
93− 2 1
103+ ?(%0 %1) !!
94− 3 1
95− * (add (mod a 2) (mul $(a (div a 2)) 2))
104+ * (add (mod a 2) (mul $(a (div a 2)) 2))
96− ==
105+ ==
97```
106```
98
107
99#### Examples
108#### Examples
100
109
101```
110```
102− > (mas 3)
111+> (mas 3)
103− 1
112+1
113+```
104
114
115+```
105− > (mas 4)
116+> (mas 4)
106− 2
117+2
118+```
107
119
120+```
108− > (mas 5)
121+> (mas 5)
109− 3
122+3
110− > (cap 5) ::`(cap a)` computes whether address `a` is in the head or the tail
123+> (cap 5) ::`(cap a)` computes whether address `a` is in the head or the tail
111− %2
124+%2
125+```
112
126
127+```
113− > (mas 7)
128+> (mas 7)
114− 3
129+3
115− > (cap 7)
130+> (cap 7)
116− %3
131+%3
132+```
117
133
134+```
118− > (mas 11)
135+> (mas 11)
119− 7
136+7
137+```
120
138
139+```
121− > (mas (mas 11))
140+> (mas (mas 11))
122− 3
141+3
142+```
123
143
144+```
124− > (cap (mas 6))
145+> (cap (mas 6))
125− %3
146+%3
147+```
126
148
127− > (mas 0)
149+```
128− ! exit ::address `0` is in neither the head nor the tail
150+> (mas 0) ::address `0` is in neither the head nor the tail
151+! exit
152+```
129
153
130− > (mas 1)
154+```
131− ! exit ::address `1` is in neither the head nor the tail
155+> (mas 1) ::address `1` is in neither the head nor the tail
156+! exit
132```
157```
133
158
134#### Discussion
159#### Discussion
@@ -166,7 +191,8 @@ Notice how the old values in the head (subtree `+2`) were not illustrated in
166this case, because `+7` is within the tail (subtree `+3`).
191this case, because `+7` is within the tail (subtree `+3`).
167
192
168---
193---
194+
169−### `++peg`
195+## `++peg`
170
196
171Address within address
197Address within address
172
198
@@ -186,43 +212,54 @@ An [`atom`](/docs/glossary/atom).
186#### Source
212#### Source
187
213
188```hoon
214```hoon
189− ++ peg
215+++ peg
190− ~/ %peg
216+ ~/ %peg
191− |= [a=@ b=@]
217+ |= [a=@ b=@]
192− ?< =(0 a)
218+ ?< =(0 a)
193− ^- @
219+ ^- @
194− ?- b
220+ ?- b
195− $1 a
221+ %1 a
196− $2 (mul a 2)
222+ %2 (mul a 2)
197− $3 +((mul a 2))
223+ %3 +((mul a 2))
198− * (add (mod b 2) (mul $(b (div b 2)) 2))
224+ * (add (mod b 2) (mul $(b (div b 2)) 2))
199− ==
225+ ==
200```
226```
201
227
202#### Examples
228#### Examples
203
229
204```
230```
205− > (peg 4 1)
231+> (peg 4 1)
206− 4
232+4
207−
233+```
208− > (peg 1 4)
209− 4
210
234
235+```
211− > (peg 4 2)
236+> (peg 1 4)
212− 8
237+4
238+```
213
239
240+```
214− > (peg 4 8)
241+> (peg 4 2)
215− 32
242+8
243+```
216
244
245+```
217− > (peg 4 (4 2))
246+> (peg 4 8)
218− 32
247+32
248+```
219
249
250+```
220− > (peg 8 45)
251+> (peg 4 (4 2))
221− 269
252+32
253+```
222
254
223− > (cap (peg 4 2)) ::`(cap a)` computes whether address `a` is in the head or the tail
255+```
224− %2
256+> (peg 8 45)
257+269
258+```
225
259
260+```
261+> (cap (peg 4 2)) ::`(cap a)` computes whether address `a` is in the head or the tail
262+%2
226```
263```
227
264
228#### Discussion
265#### Discussion
@@ -269,5 +306,4 @@ Notice how relative address `+4` is at the same position as absolute address
269 (continues...)
306 (continues...)
270```
307```
271
308
272−
273---
309---
content/docs/hoon/reference/stdlib/1c.md+201−122
@@ -4,7 +4,7 @@ weight = 3
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `$bite`
7+## `+$bite`
8
8
9Atom slice specifier.
9Atom slice specifier.
10
10
@@ -42,7 +42,7 @@ supplied, it defaults to a value of 1.
42 0
42 0
43```
43```
44
44
45−### `$bloq`
45+## `+$bloq`
46
46
47Blocksize
47Blocksize
48
48
@@ -105,33 +105,40 @@ See the [bit arithmetic](/docs/hoon/reference/stdlib/2c) section for operations
105
105
106---
106---
107
107
108−### `++each`
108+## `++each`
109
109
110Mold of fork between two types
110Mold of fork between two types
111
111
112A mold generator. Produces a discriminated fork between two types, defaulting to
112A mold generator. Produces a discriminated fork between two types, defaulting to
113−`a`.
113+`this`.
114
114
115#### Source
115#### Source
116
116
117+```hoon
117− ++ each
118+++ each
118− |*([a=mold b=mold] $%([$| p=b] [$& p=a]))
119+ |$ [this that]
119−
120+ $% [%| p=that]
121+ [%& p=this]
122+ ==
123+```
120
124
121#### Examples
125#### Examples
122
126
123```
127```
124− > ? *(each cord time)
128+> ? *(each cord time)
125− ?({$.y p/@t} {$.n p/@da})
129+ ?([%.y p=@t] [%.n p=@da])
126− [%.y p='']
130+[%.y p='']
131+```
127
132
133+```
128− > ? *(each * tape)
134+> ? *(each * tape)
129− ?({$.y p/*} {$.n p/""})
135+ ?([%.y p=*] [%.n p=""])
130− [%.y p=0]
136+[%.y p=0]
131```
137```
132
138
133---
139---
140+
134−### `++gate`
141+## `++gate`
135
142
136Function
143Function
137
144
@@ -139,7 +146,6 @@ A [`core`](/docs/glossary/core) with one arm, `$`--the empty name--which transfo
139product noun. If used dryly as a type, the subject must have a sample type of
146product noun. If used dryly as a type, the subject must have a sample type of
140`*`.
147`*`.
141
148
142−
143#### Source
149#### Source
144
150
145```hoon
151```hoon
@@ -150,16 +156,23 @@ product noun. If used dryly as a type, the subject must have a sample type of
150#### Examples
156#### Examples
151
157
152```
158```
153− > ? gate
159+> ? gate
154− <1.rdl {* <31.ohr 1.jmk $143>}>
160+ <1.ddq [* <46.hgz 1.pnw %140>]>
155− <1.rdl {* <31.ohr 1.jmk $143>}>
161+<1.ddq [* <46.hgz 1.pnw %140>]>
162+```
156
163
164+```
157− > (`gate`|=(a=* [a 'b']) 1)
165+> (`gate`|=(a=* [a 'b']) 1)
158− [1 98]
166+[1 98]
167+```
159
168
169+```
160− > (`gate`|=(a=@ [a 'b']) 1)
170+> (`gate`|=(a=@ [a 'b']) 1)
171+mint-nice
172+-need.@
173+-have.*
161− ! nest-fail
174+nest-fail
162− ! exit
175+dojo: hoon expression failed
163```
176```
164
177
165#### Discussion
178#### Discussion
@@ -171,43 +184,51 @@ mathematical sense. Any `gate` normalizes to an iron `gate`.
171See also: [`++lift`](/docs/hoon/reference/stdlib/2a#lift), [`++cork`](/docs/hoon/reference/stdlib/2n#cork)
184See also: [`++lift`](/docs/hoon/reference/stdlib/2a#lift), [`++cork`](/docs/hoon/reference/stdlib/2n#cork)
172
185
173---
186---
187+
174−### `++list`
188+## `++list`
175
189
176List
190List
177
191
178A mold generator. Generates a mold of a null-terminated list of a
192A mold generator. Generates a mold of a null-terminated list of a
179homogenous type.
193homogenous type.
180
194
181−
182#### Source
195#### Source
183
196
184```hoon
197```hoon
185− ++ list
198+++ list
186− |*(a=mold $@($~ (lest a)))
199+ |$ [item]
200+ $@(~ [i=item t=(list item)])
187```
201```
188
202
189#### Examples
203#### Examples
190
204
191```
205```
192− > *(list)
206+> *(list)
193− ~
207+~
194−
208+```
195− > `(list @)`"abc"
196− ~[97 98 99]
197
209
210+```
198− > (snag 0 "abc")
211+> `(list @)`"abc"
199− 'a'
212+~[97 98 99]
213+```
200
214
201− > `(list @)`[1 2 'j' ~]
215+```
202− ~[1 2 106]
216+> (snag 0 "abc")
217+'a'
218+```
203
219
204```
220```
221+> `(list @)`[1 2 'j' ~]
222+~[1 2 106]
223+```
224+
205#### Discussion
225#### Discussion
206
226
207See also: [`++turn`](/docs/hoon/reference/stdlib/2b#turn), [`++snag`](/docs/hoon/reference/stdlib/2b#snag)
227See also: [`++turn`](/docs/hoon/reference/stdlib/2b#turn), [`++snag`](/docs/hoon/reference/stdlib/2b#snag)
208
228
209---
229---
230+
210−### `++lone`
231+## `++lone`
211
232
212Face on mold
233Face on mold
213
234
@@ -216,56 +237,68 @@ A mold generator. Puts face of `p` on the passed-in mold.
216#### Source
237#### Source
217
238
218```hoon
239```hoon
219− ++ lone
240+++ lone
220− |*(a=mold [p=a])
241+ |$ [item]
242+ p=item
221```
243```
222
244
223#### Examples
245#### Examples
224
246
225```
247```
226− > ? *cord
248+> ? *cord
227− @t
249+@t
228− ''
250+''
251+```
252+
253+```
229− > ? *(lone cord)
254+> ? *(lone cord)
230− p/@t
255+ p=@t
231− p=''
256+p=''
257+```
258+
259+```
260+> ? *(lone @)
261+ p=@
262+p=0
263+```
232
264
233− > ? *(lone @)
265+```
234− p/@
235− p=0
236− > ? *@
266+> ? *@
237− @
267+ @
238− 0
268+0
239```
269```
240
270
241---
271---
272+
242−### `++pair`
273+## `++pair`
243
274
244Mold of pair of types
275Mold of pair of types
245
276
246A mold generator. Produces a tuple of two of the types passed in.
277A mold generator. Produces a tuple of two of the types passed in.
247
278
248−
249#### Source
279#### Source
250
280
251```hoon
281```hoon
252− ++ pair
282+++ pair
253− |*([a=mold b=mold] [p=a q=b])
283+ |$ [head tail]
284+ [p=head q=tail]
254```
285```
255
286
256#### Examples
287#### Examples
257
288
258```
289```
259− > *(pair ? cord)
290+> *(pair ? cord)
260− [p=%.y q='']
291+[p=%.y q='']
261−
292+```
262− > *(pair tape @)
263− [p="" q=0]
264
293
294+```
295+> *(pair tape @)
296+[p="" q=0]
265```
297```
266
298
267---
299---
300+
268−### `++pole`
301+## `++pole`
269
302
270Faceless [`list`](/docs/hoon/reference/stdlib/1c#list)
303Faceless [`list`](/docs/hoon/reference/stdlib/1c#list)
271
304
@@ -274,24 +307,26 @@ A mold generator. A [`list`](/docs/hoon/reference/stdlib/1c#list) without the fa
274#### Source
307#### Source
275
308
276```hoon
309```hoon
277− ++ pole
310+++ pole
278− |*(a=mold $@($~ [a (pole a)]))
311+ |$ [item]
312+ $@(~ [item (pole item)])
279```
313```
280
314
281−
282#### Examples
315#### Examples
283
316
284```
317```
285− > =/(a "asdf" ?>(?=(^ a) `(lest @tD)`a))
318+> =/(a "asdf" ?>(?=(^ a) `(lest @tD)`a))
286− [i='a' t=[i='s' t=[i='d' t=[i='f' t=~]]]]
319+[i='a' t=[i='s' t=[i='d' t=[i='f' t=~]]]]
287−
288− > `(pole char)`"asdf"
289− ['a' ['s' ['d' ['f' ~]]]]
290```
320```
291
321
322+```
323+> `(pole char)`"asdf"
324+['a' ['s' ['d' ['f' ~]]]]
325+```
292
326
293---
327---
328+
294−### `++qual`
329+## `++qual`
295
330
296Mold of 4-type tuple
331Mold of 4-type tuple
297
332
@@ -300,43 +335,49 @@ A mold generator. Produces a tuple of four of the types passed in.
300#### Source
335#### Source
301
336
302```hoon
337```hoon
303− ++ qual
338+++ qual
304− |* [a=mold b=mold c=mold d=mold]
339+ |$ [first second third fourth]
305− [p=a q=b r=c s=d]
340+ [p=first q=second r=third s=fourth]
306```
341```
307
342
308#### Examples
343#### Examples
309
344
310```
345```
311− > *(qual date time tape cord)
346+> *(qual date time tape cord)
312− [p=[[a=%.y y=0] m=0 t=[d=0 h=0 m=0 s=0 f=~]] q=~292277024401-.1.1 r="" s='']
347+[p=[[a=%.y y=0] m=0 t=[d=0 h=0 m=0 s=0 f=~]] q=~2000.1.1 r="" s='']
348+```
313
349
350+```
314− > *(qual (list @) @u @ud @ux)
351+> *(qual (list @) @u @ud @ux)
315− [p=~ q=0 r=0 s=0x0]
352+[p=~ q=0 r=0 s=0x0]
316```
353```
317
354
318---
355---
356+
319−### `++quip`
357+## `++quip`
320
358
321Mold of pair of [`list`](/docs/hoon/reference/stdlib/1c#list) and type
359Mold of pair of [`list`](/docs/hoon/reference/stdlib/1c#list) and type
322
360
323−A mold generator. Produces a tuple of a [`list`](/docs/hoon/reference/stdlib/1c#list) of `a` and the mold of `b`.
361+A mold generator. Produces a tuple of a [`list`](/docs/hoon/reference/stdlib/1c#list) of `item` and the mold of `state`.
324
362
325#### Source
363#### Source
326
364
327```hoon
365```hoon
328− ++ quip
366+++ quip
329− |*([a=mold b=mold] [(list a) b])
367+ |$ [item state]
368+ [(list item) state]
330```
369```
331
370
332#### Examples
371#### Examples
333
372
334```
373```
335− > *(quip @ _'hi')
374+> *(quip @ _'hi')
336− [~ 'hi']
375+[~ 'hi']
376+```
337
377
378+```
338− > `(quip @ @ux)`[[1 2 3 4 ~] 0x10]
379+> `(quip @ @ux)`[[1 2 3 4 ~] 0x10]
339− [~[1 2 3 4] 0x10]
380+[~[1 2 3 4] 0x10]
340```
381```
341
382
342#### Discussion
383#### Discussion
@@ -345,7 +386,33 @@ A common pattern in Hoon code is to return a `list` of changes, along with a
345new state. You'll often see `quip` used in Gall apps.
386new state. You'll often see `quip` used in Gall apps.
346
387
347---
388---
389+
390+## `++step`
391+
392+Atom size or offset, in [bloq](#bloq)s.
393+
394+#### Source
395+
396+```
397+++ step
398+ _`@u`1
399+```
400+
401+#### Examples
402+
403+```
404+> `step`0
405+0
406+```
407+
408+```
409+> `step`2
410+2
411+```
412+
413+---
414+
348−### `++trap`
415+## `++trap`
349
416
350[`Core`](/docs/glossary/core) with one arm `$`
417[`Core`](/docs/glossary/core) with one arm `$`
351
418
@@ -354,26 +421,31 @@ A trap is a [`core`](/docs/glossary/core) with one arm `$`.
354#### Source
421#### Source
355
422
356```hoon
423```hoon
357− ++ trap
424+++ trap
358− |*(a=mold _|?(*a))
425+ |$ [product]
426+ _|?($:product)
359```
427```
360
428
361#### Examples
429#### Examples
362
430
363```
431```
364− > (*trap)
432+> (*trap)
365− <1?dxy 1.oeg {a/<1|rbb {* <31.ohr 1.jmk $143>}> <31.ohr 1.jmk $143>}>
433+<1?ruo 1.mhl [product=<1|xpg [* * *]> <46.hgz 1.pnw %140>]>
366−
434+```
367− > *(*trap)
368− 0
369
435
370− > (|.(42))
436+```
371− 42
437+> *(*trap)
438+0
372```
439```
373
440
441+```
442+> (|.(42))
443+42
444+```
374
445
375---
446---
447+
376−### `++tree`
448+## `++tree`
377
449
378Tree mold generator
450Tree mold generator
379
451
@@ -383,20 +455,21 @@ left/right sub `tree` of the same type. Pretty-printed with `{}`.
383#### Source
455#### Source
384
456
385```hoon
457```hoon
386− ++ tree
458+++ tree
459+ |$ [node]
387− |*(a=mold $@($~ [n=a l=(tree a) r=(tree a)]))
460+ $@(~ [n=node l=(tree node) r=(tree node)])
388```
461```
389
462
390#### Examples
463#### Examples
391
464
392```
465```
393− > `(tree [@ tape])`[[1 "hi"] [[2 "bye"] ~ ~] ~]
466+> `(tree [@ tape])`[[1 "hi"] [[2 "bye"] ~ ~] ~]
394− {[2 "bye"] [1 "hi"]}
467+{[2 "bye"] [1 "hi"]}
395```
468```
396
469
397−
398---
470---
471+
399−### `++trel`
472+## `++trel`
400
473
401Mold of three types
474Mold of three types
402
475
@@ -405,49 +478,55 @@ A mold generator. A mold of the tuple of the three types passed in.
405#### Source
478#### Source
406
479
407```hoon
480```hoon
408− ++ trel
481+++ trel
409− |*([a=mold b=mold c=mold] [p=a q=b r=c])
482+ |$ [first second third]
483+ [p=first q=second r=third]
410```
484```
411
485
412#### Examples
486#### Examples
413
487
414```
488```
415− > *(trel @ud @t @s)
489+> *(trel @ud @t @s)
416− [p=0 q='' r=--0]
490+[p=0 q='' r=--0]
491+```
417
492
493+```
418− > *(trel cord bloq tape)
494+> *(trel cord bloq tape)
419− [p='' q=0 r=""]
495+[p='' q=0 r=""]
420```
496```
421
497
422---
498---
499+
423−### `++unit`
500+## `++unit`
424
501
425Maybe
502Maybe
426
503
427−A mold generator. A `unit` is either `~` or `[~ u=a]`, where `a` is the
504+A mold generator. A `unit` is either `~` or `[~ u=item]`, where `item` is the
428type that was passed in.
505type that was passed in.
429
506
430−
431#### Source
507#### Source
432
508
433```hoon
509```hoon
434− ++ unit
510+++ unit
435− |*(a=mold $@($~ [$~ u=a]))
511+ |$ [item]
512+ $@(~ [~ u=item])
436```
513```
437
514
438#### Examples
515#### Examples
439
516
440```
517```
441− > ? *(unit time)
518+> ? *(unit time)
442− ?({$~ u/@da} $~)
519+ u(@da)
443− ~
520+~
521+```
444
522
523+```
445− > =a |= a=@
524+> =a |= a=@
446− ^- (unit @)
525+ ^- (unit @)
447− ?~ a ~
526+ ?~ a ~
448− [~ a]
527+ [~ a]
449− > (a 2)
528+> (a 2)
450− [~ u=2]
529+[~ 2]
451```
530```
452
531
453#### Discussion
532#### Discussion
content/docs/hoon/reference/stdlib/2a.md+298−131
@@ -4,7 +4,7 @@ weight = 4
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++biff`
7+## `++biff`
8
8
9[`Unit`](/docs/hoon/reference/stdlib/1c#unit) as argument
9[`Unit`](/docs/hoon/reference/stdlib/1c#unit) as argument
10
10
@@ -24,25 +24,27 @@ A [`unit`](/docs/hoon/reference/stdlib/1c#unit).
24#### Source
24#### Source
25
25
26```hoon
26```hoon
27− ++ biff
27+++ biff
28− |* [a=(unit) b=$-(* (unit))]
28+ |* [a=(unit) b=$-(* (unit))]
29− ?~ a ~
29+ ?~ a ~
30− (b u.a)
30+ (b u.a)
31```
31```
32
32
33#### Examples
33#### Examples
34
34
35```
35```
36− > (biff (some 5) |=(a=@ (some (add a 2))))
36+> (biff (some 5) |=(a=@ (some (add a 2))))
37− [~ u=7]
37+[~ u=7]
38−
39− > (biff ~ |=(a=@ (some (add a 2))))
40− ~
41```
38```
42
39
40+```
41+> (biff ~ |=(a=@ (some (add a 2))))
42+~
43+```
43
44
44---
45---
46+
45−### `++bind`
47+## `++bind`
46
48
47Non-unit function to [`unit`](/docs/hoon/reference/stdlib/1c#unit), producing [`unit`](/docs/hoon/reference/stdlib/1c#unit)
49Non-unit function to [`unit`](/docs/hoon/reference/stdlib/1c#unit), producing [`unit`](/docs/hoon/reference/stdlib/1c#unit)
48
50
@@ -63,27 +65,28 @@ A [`unit`](/docs/hoon/reference/stdlib/1c#unit).
63#### Source
65#### Source
64
66
65```hoon
67```hoon
66− ++ bind
68+++ bind
67− |* [a=(unit) b=gate]
69+ |* [a=(unit) b=gate]
68− ?~ a ~
70+ ?~ a ~
69− [~ u=(b u.a)]
71+ [~ u=(b u.a)]
70```
72```
71
73
72−
73#### Examples
74#### Examples
74
75
75```
76```
76− > (bind ((unit @) [~ 97]) ,@t)
77+> (bind ((unit @) [~ 97]) ,@t)
77− [~ u='a']
78+[~ u='a']
78−
79− > =a |=(a=@ (add a 1))
80− > (bind ((unit @) [~ 2]) a)
81− [~ u=3]
82```
79```
83
80
81+```
82+> =a |=(a=@ (add a 1))
83+> (bind ((unit @) [~ 2]) a)
84+[~ u=3]
85+```
84
86
85---
87---
88+
86−### `++bond`
89+## `++bond`
87
90
88Replace null
91Replace null
89
92
@@ -103,11 +106,11 @@ Either the product of `a` or the value inside of [`unit`](/docs/hoon/reference/s
103#### Source
106#### Source
104
107
105```hoon
108```hoon
106− ++ bond
109+++ bond
107− |* a=(trap)
110+ |* a=(trap)
108− |* b=(unit)
111+ |* b=(unit)
109− ?~ b $:a
112+ ?~ b $:a
110− u.b
113+ u.b
111```
114```
112
115
113#### Examples
116#### Examples
@@ -117,14 +120,16 @@ Either the product of `a` or the value inside of [`unit`](/docs/hoon/reference/s
117 1.024
120 1.024
118 > ((bond |.((bex 10))) ~)
121 > ((bond |.((bex 10))) ~)
119 1.024
122 1.024
123+```
120
124
125+```
121 > ((bond |.((bex 10))) (slaw %ud '123'))
126 > ((bond |.((bex 10))) (slaw %ud '123'))
122 123
127 123
123```
128```
124
129
125−
126---
130---
131+
127−### `++both`
132+## `++both`
128
133
129Group [`unit`](/docs/hoon/reference/stdlib/1c#unit) values into pair
134Group [`unit`](/docs/hoon/reference/stdlib/1c#unit) values into pair
130
135
@@ -145,31 +150,36 @@ A [`unit`](/docs/hoon/reference/stdlib/1c#unit) of the two initial values.
145#### Source
150#### Source
146
151
147```hoon
152```hoon
148− ++ both
153+++ both
149− |* [a=(unit) b=(unit)]
154+ |* [a=(unit) b=(unit)]
150− ?~ a ~
155+ ?~ a ~
151− ?~ b ~
156+ ?~ b ~
152− [~ u=[u.a u.b]]
157+ [~ u=[u.a u.b]]
153```
158```
154
159
155#### Examples
160#### Examples
156
161
157```
162```
158− > (both (some 1) (some %b))
163+> (both (some 1) (some %b))
159− [~ u=[1 %b]]
164+[~ u=[1 %b]]
165+```
160
166
167+```
161− > (both ~ (some %b))
168+> (both ~ (some %b))
162− ~
169+~
163```
170```
164
171
165---
172---
166−### `++clap`
167
173
174+## `++clap`
175+
168−Apply function to two [`units`](/docs/hoon/reference/stdlib/1c#unit)
176+Combine two [`units`](/docs/hoon/reference/stdlib/1c#unit) with function
169
177
170Applies a binary function `c`--which does not usually accept or produce a
178Applies a binary function `c`--which does not usually accept or produce a
171[`unit`](/docs/hoon/reference/stdlib/1c#unit)-- to the values of two [`units`](/docs/hoon/reference/stdlib/1c#unit), `a` and `b`, producing a [`unit`](/docs/hoon/reference/stdlib/1c#unit).
179[`unit`](/docs/hoon/reference/stdlib/1c#unit)-- to the values of two [`units`](/docs/hoon/reference/stdlib/1c#unit), `a` and `b`, producing a [`unit`](/docs/hoon/reference/stdlib/1c#unit).
172
180
181+If `a` is null, produces `b`. If `b` is null, produces `a`. Otherwise, produces the produce of `c` in a `unit`.
182+
173#### Accepts
183#### Accepts
174
184
175`a` is a [`unit`](/docs/hoon/reference/stdlib/1c#unit).
185`a` is a [`unit`](/docs/hoon/reference/stdlib/1c#unit).
@@ -185,32 +195,82 @@ A [`unit`](/docs/hoon/reference/stdlib/1c#unit).
185#### Source
195#### Source
186
196
187```hoon
197```hoon
188− ++ clap :: combine
198+++ clap
189− |* [a=(unit) b=(unit) c=_|=(^ +<-)]
199+ |* [a=(unit) b=(unit) c=_=>(~ |=(^ +<-))]
190− ?~ a b
200+ ?~ a b
191− ?~ b a
201+ ?~ b a
192− [~ u=(c u.a u.b)]
202+ [~ u=(c u.a u.b)]
193```
203```
194
204
195#### Examples
205#### Examples
196
206
197```
207```
198− > =u ((unit @t) [~ 'a'])
208+> (clap ~ `'b' |=([a=@tD b=@tD] `tape`[a b ~]))
199− > =v ((unit @t) [~ 'b'])
209+[~ u='b']
200− > (clap u v |=([a=@t b=@t] (welp (trip a) (trip b))))
210+```
211+
212+```
213+> (clap `'a' ~ |=([a=@tD b=@tD] `tape`[a b ~]))
214+[~ u='a']
215+```
216+
217+```
218+> (clap `'a' `'b' |=([a=@tD b=@tD] `tape`[a b ~]))
201− [~ u="ab"]
219+[~ u="ab"]
220+```
221+
222+---
223+
224+## `++clef`
225+
226+Compose two [`units`](/docs/hoon/reference/stdlib/1c#unit) with function
227+
228+Applies a binary function `c`--which does not usually accept [`units`](/docs/hoon/reference/stdlib/1c#unit)-- to the values of two [`units`](/docs/hoon/reference/stdlib/1c#unit), `a` and `b`, producing a [`unit`](/docs/hoon/reference/stdlib/1c#unit).
229+
230+If `a` or `b` are null, produces null. Otherwise, produces the produce of `c`.
231+
232+#### Accepts
233+
234+`a` is a `unit`.
235+
236+`b` is a `unit`.
237+
238+`c` is a `gate` that takes a `cell` and produces a `unit`.
239+
240+#### Produces
241+
242+A `unit`.
243+
244+#### Source
245+
246+```hoon
247+++ clef
248+ |* [a=(unit) b=(unit) c=_=>(~ |=(^ `+<-))]
249+ ?~ a ~
250+ ?~ b ~
251+ (c u.a u.b)
252+```
253+
254+#### Examples
202
255
203− > =a ((unit @u) [~ 1])
256+```
204− > =b ((unit @u) [~ 2])
257+> (clef ~ `'b' |=([a=@tD b=@tD] `(unit tape)`[~ [a b ~]]))
205− > =c |=([a=@ b=@] (add a b))
258+~
259+```
206
260
207− > (clap a b c)
261+```
208− [~ 3]
262+> (clef `'a' ~ |=([a=@tD b=@tD] `(unit tape)`[~ [a b ~]]))
263+~
209```
264```
210
265
266+```
267+> (clef `'a' `'b' |=([a=@tD b=@tD] `(unit tape)`[~ [a b ~]]))
268+[~ "ab"]
269+```
211
270
212---
271---
272+
213−### `++drop`
273+## `++drop`
214
274
215[`Unit`](/docs/hoon/reference/stdlib/1c#unit) to list
275[`Unit`](/docs/hoon/reference/stdlib/1c#unit) to list
216
276
@@ -227,27 +287,29 @@ A list.
227#### Source
287#### Source
228
288
229```hoon
289```hoon
230− ++ drop :: enlist
290+++ drop
231− |* a=(unit)
291+ |* a=(unit)
232− ?~ a ~
292+ ?~ a ~
233− [i=u.a t=~]
293+ [i=u.a t=~]
234```
294```
235
295
236#### Examples
296#### Examples
237
297
238```
298```
239− > =a ((unit @) [~ 97])
299+> =a ((unit @) [~ 97])
240− > (drop a)
300+> (drop a)
241− [i=97 t=~]
301+[i=97 t=~]
242−
243− > =a ((unit @) [~])
244− > (drop a)
245− ~
246```
302```
247
303
304+```
305+> =a ((unit @) [~])
306+> (drop a)
307+~
308+```
248
309
249---
310---
311+
250−### `++fall`
312+## `++fall`
251
313
252Give [`unit`](/docs/hoon/reference/stdlib/1c#unit) a default value
314Give [`unit`](/docs/hoon/reference/stdlib/1c#unit) a default value
253
315
@@ -266,32 +328,125 @@ Either a [`noun`](/docs/glossary/noun) `b` or the unwrapped value of [`unit`](/d
266#### Source
328#### Source
267
329
268```hoon
330```hoon
269− ++ fall :: default
331+++ fall
270− |* [a=(unit) b=*]
332+ |* [a=(unit) b=*]
271− ?~(a b u.a)
333+ ?~(a b u.a)
334+```
335+
336+#### Examples
337+
338+```
339+> (fall ~ 'a')
340+'a'
341+> (fall [~ u=0] 'a')
342+0
343+```
344+
345+---
346+
347+## `++flit`
348+
349+Make filter
350+
351+Accepts gate `a` which produces a `?`. Applies `a` to `b`, producing `b` wrapped in a `unit` if true, otherwise produces null.
352+
353+`+flit` is a wet gate that takes `a` and produces a new wet gate that takes `b`.
354+
355+#### Accepts
356+
357+`a` is a `gate` which produces `?`, and is the sample of the outer wet gate.
358+
359+`b` is any `noun`, and is the sample of the inner wet gate.
360+
361+#### Produces
362+
363+`(unit [type])`, where `[type]` is the type of `b`.
364+
365+#### Source
366+
367+```hoon
368+++ flit
369+ |* a=$-(* ?)
370+ |* b=*
371+ ?.((a b) ~ [~ u=b])
372+```
373+
374+#### Examples
375+
376+```
377+> =f (flit |=(=@ud ?:(=(ud 1) %.y %.n)))
378+> (f 1)
379+[~ 1]
380+> (f 2)
381+~
382+```
383+
384+---
385+
386+## `++hunt`
387+
388+First of units
389+
390+Apply binary gate `ord`, which produces a `?`, to units `a` and `b`. Produce `a` if true and `b` if false. If `a` is null, produce `b`. If `b` is null, produce `a`.
391+
392+This allows selecting between two units by some rule.
393+
394+#### Accepts
395+
396+`ord` is a `$-(^ ?)` - a binary gate that produces `?`.
397+
398+`a` is a `unit`.
399+
400+`b` is a `unit`.
401+
402+#### Produces
403+
404+A `unit`.
405+
406+#### Source
407+
408+```hoon
409+++ hunt
410+ |* [ord=$-(^ ?) a=(unit) b=(unit)]
411+ ^- %- unit
412+ $? _?>(?=(^ a) u.a)
413+ _?>(?=(^ b) u.b)
414+ ==
415+ ?~ a b
416+ ?~ b a
417+ ?:((ord u.a u.b) a b)
272```
418```
273
419
274#### Examples
420#### Examples
275
421
276```
422```
277− > (fall ~ 'a')
423+> (hunt gte ~ `20)
278− 'a'
424+[~ 20]
279− > (fall [~ u=0] 'a')
425+```
280− 0
426+
427+```
428+> (hunt gte `10 ~)
429+[~ 10]
430+```
431+
432+```
433+> (hunt gte `10 `20)
434+[~ 20]
281```
435```
282
436
283---
437---
438+
284−### `++lift`
439+## `++lift`
285
440
286Curried bind
441Curried bind
287
442
288−Accepts a `++gate` `a` and produces a function that accepts [`unit`](/docs/hoon/reference/stdlib/1c#unit)
443+Accepts function `a` and produces a function that accepts [`unit`](/docs/hoon/reference/stdlib/1c#unit)
289`b` to which it applies `a`. Used when you want a function that does not accept
444`b` to which it applies `a`. Used when you want a function that does not accept
290or produce a [`unit`](/docs/hoon/reference/stdlib/1c#unit) to both accept and produce a [`unit`](/docs/hoon/reference/stdlib/1c#unit).
445or produce a [`unit`](/docs/hoon/reference/stdlib/1c#unit) to both accept and produce a [`unit`](/docs/hoon/reference/stdlib/1c#unit).
291
446
292#### Accepts
447#### Accepts
293
448
294−`a` is a gate.
449+`a` is a `mold`.
295
450
296`b` is a [`unit`](/docs/hoon/reference/stdlib/1c#unit).
451`b` is a [`unit`](/docs/hoon/reference/stdlib/1c#unit).
297
452
@@ -302,25 +457,27 @@ A [`unit`](/docs/hoon/reference/stdlib/1c#unit).
302#### Source
457#### Source
303
458
304```hoon
459```hoon
305− ++ lift :: lift gate (fmap)
460+++ lift
306− |* a=gate :: flipped
461+ |* a=mold
307− |* b=(unit) :: curried
462+ |* b=(unit)
308− (bind b a) :: bind
463+ (bind b a)
309```
464```
310
465
311#### Examples
466#### Examples
312
467
313```
468```
314− > ((lift dec) `(unit @)`~)
315− ~
316−
317− > ((lift dec) `(unit @)`[~ 20])
469+> ((lift dec) `(unit @)`~)
318− [~ 19]
470+~
319```
471```
320
472
473+```
474+> ((lift dec) `(unit @)`[~ 20])
475+[~ 19]
476+```
321
477
322---
478---
479+
323−### `++mate`
480+## `++mate`
324
481
325Choose
482Choose
326
483
@@ -343,36 +500,40 @@ A [`unit`](/docs/hoon/reference/stdlib/1c#unit) or crash.
343#### Source
500#### Source
344
501
345```hoon
502```hoon
346− ++ mate :: choose
503+++ mate
347− |* [a=(unit) b=(unit)]
504+ |* [a=(unit) b=(unit)]
348− ?~ b a
505+ ?~ b a
349− ?~ a b
506+ ?~ a b
350− ?.(=(u.a u.b) ~|('mate' !!) a)
507+ ?.(=(u.a u.b) ~>(%mean.'mate' !!) a)
351```
508```
352
509
353#### Examples
510#### Examples
354
511
355```
512```
356− > =a ((unit @) [~ 97])
513+> =a ((unit @) [~ 97])
357− > =b ((unit @) [~ 97])
514+> =b ((unit @) [~ 97])
358− > (mate a b)
515+> (mate a b)
359− [~ 97]
360−
361− > =a ((unit @) [~ 97])
516+[~ 97]
362− > =b ((unit @) [~])
517+```
363− > (mate a b)
364− [~ 97]
365
518
519+```
366− > =a ((unit @) [~ 97])
520+> =a ((unit @) [~ 97])
367− > =b ((unit @) [~ 98])
521+> =b ((unit @) [~])
368− > (mate a b)
522+> (mate a b)
369− ! 'mate'
523+[~ 97]
370− ! exit
371```
524```
372
525
526+```
527+> =a ((unit @) [~ 97])
528+> =b ((unit @) [~ 98])
529+> (mate a b)
530+! 'mate'
531+! exit
532+```
373
533
374---
534---
535+
375−### `++need`
536+## `++need`
376
537
377Unwrap [`unit`](/docs/hoon/reference/stdlib/1c#unit)
538Unwrap [`unit`](/docs/hoon/reference/stdlib/1c#unit)
378
539
@@ -389,31 +550,36 @@ Either the unwrapped value of `a` (`u.a`), or crash.
389#### Source
550#### Source
390
551
391```hoon
552```hoon
392− ++ need :: demand
553+++ need
554+ ~/ %need
393− |* a=(unit)
555+ |* a=(unit)
394− ?~ a ~|(%need !!)
556+ ?~ a ~>(%mean.'need' !!)
395− u.a
557+ u.a
396```
558```
397
559
398#### Examples
560#### Examples
399
561
400```
562```
401− > =a ((unit [@t @t]) [~ ['a' 'b']])
563+> =a ((unit [@t @t]) [~ ['a' 'b']])
402− > (need a)
564+> (need a)
403− ['a' 'b']
565+['a' 'b']
404−
566+```
405− > =a ((unit @ud) [~ 17])
406− > (need a)
407− 17
408
567
568+```
409− > =a ((unit @) [~])
569+> =a ((unit @ud) [~ 17])
410− > (need a)
570+> (need a)
411− ! exit
571+17
412```
572```
413
573
574+```
575+> =a ((unit @) [~])
576+> (need a)
577+! exit
578+```
414
579
415---
580---
581+
416−### `++some`
582+## `++some`
417
583
418Wrap value in a [`unit`](/docs/hoon/reference/stdlib/1c#unit)
584Wrap value in a [`unit`](/docs/hoon/reference/stdlib/1c#unit)
419
585
@@ -430,20 +596,21 @@ A [`unit`](/docs/hoon/reference/stdlib/1c#unit).
430#### Source
596#### Source
431
597
432```hoon
598```hoon
433− ++ some :: lift (pure)
599+++ some
434− |* a=*
600+ |* a=*
435− [~ u=a]
601+ [~ u=a]
436```
602```
437
603
438#### Examples
604#### Examples
439
605
440```
606```
441− > (some ['a' 'b'])
607+> (some ['a' 'b'])
442− [~ u=['a' 'b']]
608+[~ u=['a' 'b']]
443−
444− > (some &)
445− [~ u=%.y]
446```
609```
447
610
611+```
612+> (some &)
613+[~ u=%.y]
614+```
448
615
449---
616---
content/docs/hoon/reference/stdlib/2b.md+630−431
@@ -4,7 +4,53 @@ weight = 5
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7+## `++bake`
8+
9+**Note:** This function isn't specifically a list function but is included in section 2b of the standard library so is documented here for completeness.
10+
11+Convert wet gate `f` to a dry gate by specifying argument mold `a`.
12+
13+`+bake` is a wet gate that takes a wet gate and produces a dry gate.
14+
15+#### Accepts
16+
17+`f` is a `gate`.
18+
19+`a` is a `mold`.
20+
21+#### Produces
22+
23+A dry `gate` whose sample type is `a`.
24+
25+#### Source
26+
27+```hoon
28+++ bake
29+ |* [f=gate a=mold]
30+ |= arg=a
31+ (f arg)
32+```
33+
34+#### Examples
35+
36+```
37+> =wet-gate |*(a=* [a a])
38+> (wet-gate 42)
39+[42 42]
40+> (wet-gate ['foo' 'bar'])
41+[['foo' 'bar'] 'foo' 'bar']
42+> =dry-gate (bake wet-gate @ud)
43+> (dry-gate 42)
44+[42 42]
45+> (dry-gate ['foo' 'bar'])
46+-need.@ud
47+-have.[@t @t]
48+nest-fail
49+```
50+
51+---
52+
7−### `++fand`
53+## `++fand`
8
54
9All indices in `list`
55All indices in `list`
10
56
@@ -24,42 +70,48 @@ A `list`.
24#### Source
70#### Source
25
71
26```hoon
72```hoon
27− ++ fand
73+++ fand
28− ~/ %fand
74+ ~/ %fand
29− |= [nedl=(list) hstk=(list)]
75+ |= [nedl=(list) hstk=(list)]
30− =| i=@ud
76+ =| i=@ud
31− =| fnd=(list @ud)
77+ =| fnd=(list @ud)
32− |- ^+ fnd
78+ |- ^+ fnd
33− =+ [n=nedl h=hstk]
79+ =+ [n=nedl h=hstk]
34− |-
80+ |-
35− ?: |(?=($~ n) ?=($~ h))
81+ ?: |(?=(~ n) ?=(~ h))
36− (flop fnd)
82+ (flop fnd)
37− ?: =(i.n i.h)
83+ ?: =(i.n i.h)
38− ?~ t.n
84+ ?~ t.n
39− ^$(i +(i), hstk +.hstk, fnd [i fnd])
85+ ^$(i +(i), hstk +.hstk, fnd [i fnd])
40− $(n t.n, h t.h)
86+ $(n t.n, h t.h)
41− ^$(i +(i), hstk +.hstk)
87+ ^$(i +(i), hstk +.hstk)
42```
88```
43
89
44#### Examples
90#### Examples
45
91
46```
92```
47− > (fand ~[3] ~[1 2 3])
93+> (fand ~[3] ~[1 2 3])
48− ~[2]
94+~[2]
49−
95+```
50− > (fand ~[4] ~[1 2 3])
51− ~
52
96
97+```
53− > (fand ~['a'] "cbabab")
98+> (fand ~[4] ~[1 2 3])
54− ~[2 4]
99+~
100+```
55
101
102+```
56− > (fand "ba" "cbabab")
103+> (fand ~['a'] "cbabab")
57− ~[1 3]
104+~[2 4]
58```
105```
59
106
107+```
108+> (fand "ba" "cbabab")
109+~[1 3]
110+```
60
111
61---
112---
113+
62−### `++find`
114+## `++find`
63
115
64First index in `list`
116First index in `list`
65
117
@@ -79,43 +131,52 @@ The `unit` of an atom.
79#### Source
131#### Source
80
132
81```hoon
133```hoon
82− ++ find
134+++ find
83− ~/ %find
135+ ~/ %find
84− |= [nedl=(list) hstk=(list)]
136+ |= [nedl=(list) hstk=(list)]
85− =| i=@ud
137+ =| i=@ud
86− |- ^- (unit @ud)
138+ |- ^- (unit @ud)
87− =+ [n=nedl h=hstk]
139+ =+ [n=nedl h=hstk]
88− |-
140+ |-
89− ?: |(?=($~ n) ?=($~ h))
141+ ?: |(?=(~ n) ?=(~ h))
90− ~
142+ ~
91− ?: =(i.n i.h)
143+ ?: =(i.n i.h)
92− ?~ t.n
144+ ?~ t.n
93− `i
145+ `i
94− $(n t.n, h t.h)
146+ $(n t.n, h t.h)
95− ^$(i +(i), hstk +.hstk)
147+ ^$(i +(i), hstk +.hstk)
96```
148```
97
149
98#### Examples
150#### Examples
99
151
100```
152```
101− > (find [3]~ ~[1 2 3])
153+> (find [3]~ ~[1 2 3])
102− [~ u=2]
154+[~ u=2]
155+```
103
156
157+```
104− > (find [4]~ ~[1 2 3])
158+> (find [4]~ ~[1 2 3])
105− ~
159+~
160+```
106
161
162+```
107− > (find ['c']~ "cbabab")
163+> (find ['c']~ "cbabab")
108− [~ u=0]
164+[~ u=0]
165+```
109
166
167+```
110− > (find "ab" "cbabab")
168+> (find "ab" "cbabab")
111− [~ u=1]
169+[~ u=1]
170+```
112
171
172+```
113− > (find "bab" "cbabab")
173+> (find "bab" "cbabab")
114− [~ u=2]
174+[~ u=2]
115```
175```
116
176
117---
177---
178+
118−### `++flop`
179+## `++flop`
119
180
120Reverse
181Reverse
121
182
@@ -132,31 +193,33 @@ A `list`.
132#### Source
193#### Source
133
194
134```hoon
195```hoon
135− ++ flop
196+++ flop
136− ~/ %flop
197+ ~/ %flop
137− |* a=(list)
198+ |* a=(list)
138− => .(a (homo a))
199+ => .(a (homo a))
139− ^+ a
200+ ^+ a
140− =+ b=`_a`~
201+ =+ b=`_a`~
141− |-
202+ |-
142− ?~ a b
203+ ?~ a b
143− $(a t.a, b [i.a b])
204+ $(a t.a, b [i.a b])
144```
205```
145
206
146−
147#### Examples
207#### Examples
148
208
149```
209```
150− > =a [1 2 3 ~]
210+> =a [1 2 3 ~]
151− > (flop a)
211+> (flop a)
152− ~[3 2 1]
212+~[3 2 1]
213+```
153
214
215+```
154− > (flop (flop a))
216+> (flop (flop a))
155− ~[1 2 3]
217+~[1 2 3]
156```
218```
157
219
158---
220---
221+
159−### `++gulf`
222+## `++gulf`
160
223
161List from range
224List from range
162
225
@@ -176,24 +239,28 @@ a `list`.
176#### Source
239#### Source
177
240
178```hoon
241```hoon
179− ++ gulf
242+++ gulf
180− |= [a=@ b=@]
243+ |= [a=@ b=@]
244+ ?> (lte a b)
181− ^- (list @)
245+ |- ^- (list @)
182− ?:(=(a +(b)) ~ [a $(a +(a))])
246+ ?:(=(a +(b)) ~ [a $(a +(a))])
183```
247```
184
248
185#### Examples
249#### Examples
186
250
187```
251```
188− > (gulf 1 6)
252+> (gulf 1 6)
189− ~[1 2 3 4 5 6]
253+~[1 2 3 4 5 6]
254+```
190
255
256+```
191− > `(list @t)`(gulf 99 106)
257+> `(list @t)`(gulf 99 106)
192− <|c d e f g h i j|>
258+<|c d e f g h i j|>
193```
259```
194
260
195---
261---
262+
196−### `++homo`
263+## `++homo`
197
264
198Homogenize
265Homogenize
199
266
@@ -212,7 +279,7 @@ a `list`.
212#### Source
279#### Source
213
280
214```hoon
281```hoon
215−++ homo :: homogenize
282+++ homo
216 |* a=(list)
283 |* a=(list)
217 ^+ =< $
284 ^+ =< $
218 |@ ++ $ ?:(*? ~ [i=(snag 0 a) t=$])
285 |@ ++ $ ?:(*? ~ [i=(snag 0 a) t=$])
@@ -223,23 +290,60 @@ a `list`.
223#### Examples
290#### Examples
224
291
225```
292```
226− > lyst
293+> lyst
227− [i=1 t=[i=97 t=[i=2 t=[i=98 t=[i=[~ u=10] t=~]]]]]
294+[i=1 t=[i=97 t=[i=2 t=[i=98 t=[i=[~ u=10] t=~]]]]]
295+> (homo lyst)
296+~[1 97 2 98 [~ u=10]]
297+```
298+
299+```
300+> =a (limo [1 2 3 ~])
301+> a
302+[i=1 t=[i=2 t=[i=3 t=~]]]
303+> (homo a)
304+~[1 2 3]
305+```
306+
307+---
308+
309+## `++into`
310+
311+Insert item at index
228
312
229− > (homo lyst)
313+Accepts a `list` `a`, an atom `b`, and a noun `c`, producing the list of `a` with the item `c` inserted at index `b`.
230− ~[1 97 2 98 [~ u=10]]
314+
315+#### Accepts
316+
317+`a` is a list.
318+
319+`b` is a atom.
231
320
232− > =a (limo [1 2 3 ~])
321+`c` is a noun.
233− > a
234− [i=1 t=[i=2 t=[i=3 t=~]]]
235
322
236− > (homo a)
323+#### Produces
324+
325+the list of `a` with the item `c` inserted at index `b`.
326+
327+#### Source
328+
329+```hoon
330+++ into
331+ ~/ %into
332+ |* [a=(list) b=@ c=*]
333+ ^+ a
334+ (weld (scag b a) [c (slag b a)])
335+```
336+
337+#### Examples
338+
339+```
340+> (into (limo ~[2 3 4]) 1 11)
237− ~[1 2 3]
341+~[2 11 3 4]
238```
342```
239
343
240---
344---
241
345
242−### `++join`
346+## `++join`
243
347
244Constructs a new `list`, placing `sep` between every element of `lit`.
348Constructs a new `list`, placing `sep` between every element of `lit`.
245
349
@@ -256,29 +360,32 @@ a `list`.
256#### Source
360#### Source
257
361
258```hoon
362```hoon
259− ++ join
363+++ join
260− |* [sep=* lit=(list)]
364+ |* [sep=* lit=(list)]
261− =. sep `_?>(?=(^ lit) i.lit)`sep
365+ =. sep `_?>(?=(^ lit) i.lit)`sep
262− ?~ lit ~
366+ ?~ lit ~
263− =| out=(list _?>(?=(^ lit) i.lit))
367+ =| out=(list _?>(?=(^ lit) i.lit))
264− |- ^+ out
368+ |- ^+ out
265− ?~ t.lit
369+ ?~ t.lit
266− (flop [i.lit out])
370+ (flop [i.lit out])
267− $(out [sep i.lit out], lit t.lit)
371+ $(out [sep i.lit out], lit t.lit)
268```
372```
269
373
270#### Examples
374#### Examples
271
375
272```
376```
273− > (join ' ' "hoon")
377+> (join ' ' "hoon")
274− "h o o n"
378+"h o o n"
379+```
275
380
381+```
276− > (join 0 `(list @)`~[1 2 3])
382+> (join 0 `(list @)`~[1 2 3])
277− ~[1 0 2 0 3]
383+~[1 0 2 0 3]
278```
384```
279
385
280---
386---
387+
281−### `++lent`
388+## `++lent`
282
389
283List length
390List length
284
391
@@ -295,29 +402,31 @@ an atom.
295#### Source
402#### Source
296
403
297```hoon
404```hoon
298− ++ lent
405+++ lent
299− ~/ %lent
406+ ~/ %lent
300− |= a=(list)
407+ |= a=(list)
301− ^- @
408+ ^- @
302− =+ b=0
409+ =+ b=0
303− |-
410+ |-
304− ?~ a b
411+ ?~ a b
305− $(a t.a, b +(b))
412+ $(a t.a, b +(b))
306```
413```
307
414
308#### Examples
415#### Examples
309
416
310```
417```
311− > (lent [1 2 3 4 ~]))
418+> (lent [1 2 3 4 ~]))
312− 4
419+4
313−
314− > (lent [1 'a' 2 'b' (some 10) ~])
315− 5
316```
420```
317
421
422+```
423+> (lent [1 'a' 2 'b' (some 10) ~])
424+5
425+```
318
426
319---
427---
428+
320−### `++levy`
429+## `++levy`
321
430
322Logical "and" on list
431Logical "and" on list
323
432
@@ -336,31 +445,32 @@ A boolean.
336#### Source
445#### Source
337
446
338```hoon
447```hoon
339− ++ levy
448+++ levy
340− ~/ %levy :: all of
449+ ~/ %levy
341− |* [a=(list) b=$-(* ?)]
450+ |* [a=(list) b=$-(* ?)]
342− |- ^- ?
451+ |- ^- ?
343− ?~ a &
452+ ?~ a &
344− ?. (b i.a) |
453+ ?. (b i.a) |
345− $(a t.a)
454+ $(a t.a)
346```
455```
347
456
348#### Examples
457#### Examples
349
458
350```
459```
351− > =a |=(a=@ (lte a 1))
460+> =a |=(a=@ (lte a 1))
352− > (levy `(list @)`[0 1 2 1 ~] a)
461+> (levy `(list @)`[0 1 2 1 ~] a)
353− %.n
462+%.n
354−
355− > =a |=(a=@ (lte a 3))
356− > (levy `(list @)`[0 1 2 1 ~] a)
357− %.y
358```
463```
359
464
465+```
466+> =a |=(a=@ (lte a 3))
467+> (levy `(list @)`[0 1 2 1 ~] a)
468+%.y
469+```
360
470
361---
471---
362
472
363−### `++lien`
473+## `++lien`
364
474
365Logical "or" on list
475Logical "or" on list
366
476
@@ -376,30 +486,32 @@ every element of `++list` `a`.
376#### Source
486#### Source
377
487
378```hoon
488```hoon
379− ++ lien
489+++ lien
380− ~/ %lien
490+ ~/ %lien
381− |* [a=(list) b=$-(* ?)]
491+ |* [a=(list) b=$-(* ?)]
382− |- ^- ?
492+ |- ^- ?
383− ?~ a |
493+ ?~ a |
384− ?: (b i.a) &
494+ ?: (b i.a) &
385− $(a t.a)
495+ $(a t.a)
386```
496```
387
497
388#### Examples
498#### Examples
389
499
390```
500```
391− > =a |=(a=@ (gte a 1))
501+> =a |=(a=@ (gte a 1))
392− > (lien `(list @)`[0 1 2 1 ~] a)
502+> (lien `(list @)`[0 1 2 1 ~] a)
393− %.y
503+%.y
394−
395− > =a |=(a=@ (gte a 3))
396− > (lien `(list @)`[0 1 2 1 ~]) a)
397− %.n
398```
504```
399
505
506+```
507+> =a |=(a=@ (gte a 3))
508+> (lien `(list @)`[0 1 2 1 ~]) a)
509+%.n
510+```
400
511
401---
512---
513+
402−### `++limo`
514+## `++limo`
403
515
404List Constructor
516List Constructor
405
517
@@ -416,7 +528,7 @@ A `++list`.
416#### Source
528#### Source
417
529
418```hoon
530```hoon
419−++ limo :: listify
531+++ limo
420 |* a=*
532 |* a=*
421 ^+ =< $
533 ^+ =< $
422 |@ ++ $ ?~(a ~ ?:(*? [i=-.a t=$] $(a +.a)))
534 |@ ++ $ ?~(a ~ ?:(*? [i=-.a t=$] $(a +.a)))
@@ -427,18 +539,18 @@ A `++list`.
427#### Examples
539#### Examples
428
540
429```
541```
430− > (limo [1 2 3 ~])
542+> (limo [1 2 3 ~])
431− [i=1 t=[i=2 t=[i=3 t=~]]]
543+[i=1 t=[i=2 t=[i=3 t=~]]]
432```
544```
433
545
434−
435---
546---
547+
436−### `++murn`
548+## `++murn`
437
549
438Maybe transform
550Maybe transform
439
551
440Passes each member of `list` `a` to gate `b`, which must produce a
552Passes each member of `list` `a` to gate `b`, which must produce a
441−`unit`. Produces a new list with all the results that do not produce
553+`unit`. Produces a new list with all the results that do not produce
442`~`.
554`~`.
443
555
444#### Accepts
556#### Accepts
@@ -454,28 +566,28 @@ A unit.
454#### Source
566#### Source
455
567
456```hoon
568```hoon
457− ++ murn :: maybe transform
569+++ murn
458− ~/ %murn
570+ ~/ %murn
459− |* [a=(list) b=$-(* (unit))]
571+ |* [a=(list) b=$-(* (unit))]
460− |-
572+ => .(a (homo a))
573+ |- ^- (list _?>(?=(^ a) (need (b i.a))))
461− ?~ a ~
574+ ?~ a ~
462− =+ c=(b i.a)
575+ =/ c (b i.a)
463− ?~ c
464− $(a t.a)
576+ ?~ c $(a t.a)
465− [i=u.c t=$(a t.a)]
577+ [+.c $(a t.a)]
466```
578```
467
579
468#### Examples
580#### Examples
469
581
470```
582```
471− > =a |=(a=@ ?.((gte a 2) ~ (some (add a 10))))
583+> =a |=(a=@ ?.((gte a 2) ~ (some (add a 10))))
472− > (murn `(list @)`[0 1 2 3 ~] a)
584+> (murn `(list @)`[0 1 2 3 ~] a)
473− [i=12 t=[i=13 t=~]]
585+[i=12 t=[i=13 t=~]]
474```
586```
475
587
476−
477---
588---
589+
478−### `++oust`
590+## `++oust`
479
591
480Remove
592Remove
481
593
@@ -493,25 +605,27 @@ A `++list`.
493#### Source
605#### Source
494
606
495```hoon
607```hoon
496− ++ oust :: remove
608+++ oust
497− ~/ %oust
609+ ~/ %oust
498− |* [[a=@ b=@] c=(list)]
610+ |* [[a=@ b=@] c=(list)]
499− (weld (scag a c) (slag (add a b) c))
611+ (weld (scag +<-< c) (slag (add +<-< +<->) c))
500```
612```
501
613
502#### Examples
614#### Examples
503
615
504```
616```
505− > (oust [4 5] "good day, urbit!")
617+> (oust [4 5] "good day, urbit!")
506− "good urbit!"
618+"good urbit!"
507−
508− > (oust [2 2] `(list @)`[1 2 3 4 ~])
509− ~[1 2]
510```
619```
511
620
621+```
622+> (oust [2 2] `(list @)`[1 2 3 4 ~])
623+~[1 2]
624+```
512
625
513---
626---
627+
514−### `++reap`
628+## `++reap`
515
629
516Replicate
630Replicate
517
631
@@ -530,30 +644,71 @@ A list.
530#### Source
644#### Source
531
645
532```hoon
646```hoon
533− ++ reap :: replicate
647+++ reap
534− ~/ %reap
648+ ~/ %reap
535− |* [a=@ b=*]
649+ |* [a=@ b=*]
536− |- ^- (list _b)
650+ |- ^- (list _b)
537− ?~ a ~
651+ ?~ a ~
538− [b $(a (dec a))]
652+ [b $(a (dec a))]
539```
653```
540
654
541#### Examples
655#### Examples
542
656
543```
657```
544− > (reap 20 %a)
658+> (reap 20 %a)
545− ~[%a %a %a %a %a %a %a %a %a %a %a %a %a %a %a %a %a %a %a %a]
659+~[%a %a %a %a %a %a %a %a %a %a %a %a %a %a %a %a %a %a %a %a]
660+```
661+
662+```
663+> (reap 5 ~s1)
664+~[~s1 ~s1 ~s1 ~s1 ~s1]
665+> `@dr`(roll (reap 5 ~s1) add)
666+~s5
667+```
668+
669+---
670+
671+## `++rear`
672+
673+Last item of list
674+
675+Produces the last item in list `a`, crashing if `a` is null.
676+
677+#### Accepts
678+
679+`a` is a `list`.
680+
681+#### Produces
682+
683+The type of the last element in `a`.
684+
685+#### Source
686+
687+```hoon
688+++ rear
689+ ~/ %rear
690+ |* a=(list)
691+ ^- _?>(?=(^ a) i.a)
692+ ?> ?=(^ a)
693+ ?: =(~ t.a) i.a
694+ $(a t.a)
695+```
546
696
547− > (reap 5 ~s1)
697+#### Examples
548− ~[~s1 ~s1 ~s1 ~s1 ~s1]
549
698
550− > `@dr`(roll (reap 5 ~s1) add)
699+```
551− ~s5
700+> (rear ~[1 2 3])
701+3
552```
702```
553
703
704+```
705+> (rear ~)
706+dojo: hoon expression failed
707+```
554
708
555---
709---
710+
556−### `++reel`
711+## `++reel`
557
712
558Right fold
713Right fold
559
714
@@ -582,30 +737,31 @@ The accumulator, which is a noun.
582#### Source
737#### Source
583
738
584```hoon
739```hoon
585− ++ reel
740+++ reel
586− ~/ %reel
741+ ~/ %reel
587− |* [a=(list) b=_|=([* *] +<+)]
742+ |* [a=(list) b=_=>(~ |=([* *] +<+))]
588− |- ^+ +<+.b
743+ |- ^+ ,.+<+.b
589− ?~ a
744+ ?~ a
590− +<+.b
745+ +<+.b
591− (b i.a $(a t.a))
746+ (b i.a $(a t.a))
592```
747```
593
748
594#### Examples
749#### Examples
595
750
596```
751```
597− > (reel `(list @)`[1 2 3 4 5 ~] add)
752+> (reel `(list @)`[1 2 3 4 5 ~] add)
598− 15
753+15
599
754
600− > (reel `(list @)`[6 3 1 ~] sub)
755+> (reel `(list @)`[6 3 1 ~] sub)
601− 4
756+4
602
757
603− > (reel `(list @)`[3 6 1 ~] sub)
758+> (reel `(list @)`[3 6 1 ~] sub)
604− ! subtract-underflow
759+! subtract-underflow
605− ! exit
760+! exit
606```
761```
607
762
608`+mul`'s default sample is 1, so calling `+reel` with `+mul` yields the expected behavior:
763`+mul`'s default sample is 1, so calling `+reel` with `+mul` yields the expected behavior:
764+
609```
765```
610> *mul
766> *mul
6111
7671
@@ -613,13 +769,17 @@ The accumulator, which is a noun.
613> (reel `(list @)`~[1 2 3 4] mul)
769> (reel `(list @)`~[1 2 3 4] mul)
61424
77024
615```
771```
772+
616However, if you build a gate that uses `+mul` like so, the sample defaults to 0
773However, if you build a gate that uses `+mul` like so, the sample defaults to 0
617since that is the bunt of `@`:
774since that is the bunt of `@`:
775+
618```
776```
619> (reel `(list @)`~[1 2 3 4] |=([a=@ b=@] (mul a b)))
777> (reel `(list @)`~[1 2 3 4] |=([a=@ b=@] (mul a b)))
6200
7780
621```
779```
780+
622We can fix this with `|:`:
781We can fix this with `|:`:
782+
623```
783```
624> (reel `(list @)`~[1 2 3 4] |:([a=1 b=1] (mul a b)))
784> (reel `(list @)`~[1 2 3 4] |:([a=1 b=1] (mul a b)))
62524
78524
@@ -639,7 +799,8 @@ We can check explicitly what sequence of operations `+reel` performs like this:
639
799
640
800
641---
801---
802+
642−### `++roll`
803+## `++roll`
643
804
644Left fold
805Left fold
645
806
@@ -668,13 +829,13 @@ The accumulator, which is a noun.
668#### Source
829#### Source
669
830
670```hoon
831```hoon
671− ++ roll :: left fold
832+++ roll
672− ~/ %roll
833+ ~/ %roll
673− |* [a=(list) b=_|=([* *] +<+)]
834+ |* [a=(list) b=_=>(~ |=([* *] +<+))]
674− |- ^+ +<+.b
835+ |- ^+ ,.+<+.b
675− ?~ a
836+ ?~ a
676− +<+.b
837+ +<+.b
677− $(a t.a, b b(+<+ (b i.a +<+.b)))
838+ $(a t.a, b b(+<+ (b i.a +<+.b)))
678```
839```
679
840
680#### Examples
841#### Examples
@@ -692,6 +853,7 @@ q=4
692```
853```
693
854
694`+mul`'s default sample is 1, so calling `+roll` with `+mul` yields the expected behavior:
855`+mul`'s default sample is 1, so calling `+roll` with `+mul` yields the expected behavior:
856+
695```
857```
696> *mul
858> *mul
6971
8591
@@ -699,13 +861,17 @@ q=4
699> (roll `(list @)`~[1 2 3 4] mul)
861> (roll `(list @)`~[1 2 3 4] mul)
70024
86224
701```
863```
864+
702However, if you build a gate that uses `+mul` like so, the sample defaults to 0
865However, if you build a gate that uses `+mul` like so, the sample defaults to 0
703since that is the bunt of `@`:
866since that is the bunt of `@`:
867+
704```
868```
705> (roll `(list @)`~[1 2 3 4] |=([a=@ b=@] (mul a b)))
869> (roll `(list @)`~[1 2 3 4] |=([a=@ b=@] (mul a b)))
7060
8700
707```
871```
872+
708We can fix this with `|:`:
873We can fix this with `|:`:
874+
709```
875```
710> (roll `(list @)`~[1 2 3 4] |:([a=1 b=1] (mul a b)))
876> (roll `(list @)`~[1 2 3 4] |:([a=1 b=1] (mul a b)))
71124
87724
@@ -736,7 +902,8 @@ This is in contrast to what one might expect:
736```
902```
737
903
738---
904---
905+
739−### `++scag`
906+## `++scag`
740
907
741Prefix
908Prefix
742
909
@@ -756,27 +923,29 @@ A list of the same type as `b`.
756#### Source
923#### Source
757
924
758```hoon
925```hoon
759− ++ scag :: prefix
926+++ scag
760− ~/ %scag
927+ ~/ %scag
761− |* [a=@ b=(list)]
928+ |* [a=@ b=(list)]
762− |- ^+ b
929+ |- ^+ b
763− ?: |(?=(~ b) =(0 a)) ~
930+ ?: |(?=(~ b) =(0 a)) ~
764− [i.b $(b t.b, a (dec a))]
931+ [i.b $(b t.b, a (dec a))]
765```
932```
766
933
767#### Examples
934#### Examples
768
935
769```
936```
770− > (scag 2 `(list @)`[1 2 3 4 ~])
937+> (scag 2 `(list @)`[1 2 3 4 ~])
771− [i=1 t=~[2]]
772−
773− > (scag 10 `(list @)`[1 2 3 4 ~])
774− [i=1 t=~[2 3 4]]
938+[i=1 t=~[2]]
775```
939```
776
940
941+```
942+> (scag 10 `(list @)`[1 2 3 4 ~])
943+[i=1 t=~[2 3 4]]
944+```
777
945
778---
946---
947+
779−### `++skid`
948+## `++skid`
780
949
781Separate
950Separate
782
951
@@ -799,27 +968,26 @@ A cell of two lists.
799#### Source
968#### Source
800
969
801```hoon
970```hoon
802− ++ skid :: separate
971+++ skid
803− ~/ %skid
972+ ~/ %skid
804− |* [a=(list) b=$-(* ?)]
973+ |* [a=(list) b=$-(* ?)]
805− |- ^+ [p=a q=a]
974+ |- ^+ [p=a q=a]
806− ?~ a [~ ~]
975+ ?~ a [~ ~]
807− =+ c=$(a t.a)
976+ =+ c=$(a t.a)
808− ?:((b i.a) [[i.a p.c] q.c] [p.c [i.a q.c]])
977+ ?:((b i.a) [[i.a p.c] q.c] [p.c [i.a q.c]])
809```
978```
810
979
811−
812#### Examples
980#### Examples
813
981
814```
982```
815− > =a |=(a=@ (gth a 1))
983+> =a |=(a=@ (gth a 1))
816− > (skid `(list @)`[0 1 2 3 ~] a)
984+> (skid `(list @)`[0 1 2 3 ~] a)
817− [p=[i=2 t=~[3]] q=[i=0 t=~[1]]]
985+[p=[i=2 t=~[3]] q=[i=0 t=~[1]]]
818```
986```
819
987
820−
821---
988---
989+
822−### `++skim`
990+## `++skim`
823
991
824Suffix
992Suffix
825
993
@@ -840,25 +1008,26 @@ A list.
840#### Source
1008#### Source
841
1009
842```hoon
1010```hoon
843− ++ skim :: only
1011+++ skim
844− ~/ %skim
1012+ ~/ %skim
845− |* [a=(list) b=$-(* ?)]
1013+ |* [a=(list) b=$-(* ?)]
846− |-
1014+ |-
847− ^+ a
1015+ ^+ a
848− ?~ a ~
1016+ ?~ a ~
849− ?:((b i.a) [i.a $(a t.a)] $(a t.a))
1017+ ?:((b i.a) [i.a $(a t.a)] $(a t.a))
850```
1018```
851
1019
852#### Examples
1020#### Examples
853
1021
854```
1022```
855− > =a |=(a=@ (gth a 1))
1023+> =a |=(a=@ (gth a 1))
856− > (skim `(list @)`[0 1 2 3 ~] a)
1024+> (skim `(list @)`[0 1 2 3 ~] a)
857− [i=2 t=~[3]]
1025+[i=2 t=~[3]]
858```
1026```
859
1027
860---
1028---
1029+
861−### `++skip`
1030+## `++skip`
862
1031
863Except
1032Except
864
1033
@@ -879,26 +1048,26 @@ A list of the same type as `a`.
879#### Source
1048#### Source
880
1049
881```hoon
1050```hoon
882− ++ skip :: except
1051+++ skip
883− ~/ %skip
1052+ ~/ %skip
884− |* [a=(list) b=$-(* ?)]
1053+ |* [a=(list) b=$-(* ?)]
885− |-
1054+ |-
886− ^+ a
1055+ ^+ a
887− ?~ a ~
1056+ ?~ a ~
888− ?:((b i.a) $(a t.a) [i.a $(a t.a)])
1057+ ?:((b i.a) $(a t.a) [i.a $(a t.a)])
889```
1058```
890
1059
891#### Examples
1060#### Examples
892
1061
893```
1062```
894− > =a |=(a=@ (gth a 1))
1063+> =a |=(a=@ (gth a 1))
895− > (skip `(l)`[0 1 2 3 ~]) a)
1064+> (skip `(l)`[0 1 2 3 ~]) a)
896− [i=0 t=[i=1 t=~]]
1065+[i=0 t=[i=1 t=~]]
897```
1066```
898
1067
899−
900---
1068---
1069+
901−### `++slag`
1070+## `++slag`
902
1071
903Suffix
1072Suffix
904
1073
@@ -918,27 +1087,27 @@ A list of the same type as `b`.
918#### Source
1087#### Source
919
1088
920```hoon
1089```hoon
921− ++ slag :: suffix
1090+++ slag
922− ~/ %slag
1091+ ~/ %slag
923− |* [a=@ b=(list)]
1092+ |* [a=@ b=(list)]
924− |- ^+ b
1093+ |- ^+ b
925− ?: =(0 a) b
1094+ ?: =(0 a) b
926− ?~ b ~
1095+ ?~ b ~
927− $(b t.b, a (dec a))
1096+ $(b t.b, a (dec a))
928```
1097```
929
1098
930#### Examples
1099#### Examples
931
1100
932```
1101```
933− > (slag 2 (limo [1 2 3 4 ~]))
1102+> (slag 2 (limo [1 2 3 4 ~]))
934− [i=3 t=[i=4 t=~]]
1103+[i=3 t=[i=4 t=~]]
935− > (slag 1 (limo [1 2 3 4 ~]))
1104+> (slag 1 (limo [1 2 3 4 ~]))
936− [i=2 t=[i=3 t=[i=4 t=~]]]
1105+[i=2 t=[i=3 t=[i=4 t=~]]]
937```
1106```
938
1107
939−
940---
1108---
1109+
941−### `++snag`
1110+## `++snag`
942
1111
943Index
1112Index
944
1113
@@ -958,134 +1127,144 @@ Produces an element of `b`, or crashes if no element exists at that index.
958#### Source
1127#### Source
959
1128
960```hoon
1129```hoon
961− ++ snag :: index
1130+++ snag
962− ~/ %snag
1131+ ~/ %snag
963− |* [a=@ b=(list)]
1132+ |* [a=@ b=(list)]
964− |-
1133+ |- ^+ ?>(?=(^ b) i.b)
965− ?~ b
1134+ ?~ b
966− ~|('snag-fail' !!)
1135+ ~_ leaf+"snag-fail"
1136+ !!
967− ?: =(0 a) i.b
1137+ ?: =(0 a) i.b
968− $(b t.b, a (dec a))
1138+ $(b t.b, a (dec a))
969```
1139```
970
1140
971#### Examples
1141#### Examples
972
1142
973```
1143```
974− > (snag 2 "asdf")
1144+> (snag 2 "asdf")
975− ~~d
1145+'d'
976− > (snag 0 `(list @ud)`~[1 2 3 4])
977− 1
978```
1146```
979
1147
1148+```
1149+> (snag 0 `(list @ud)`~[1 2 3 4])
1150+1
1151+```
980
1152
981---
1153---
982−### `++snoc`
983
1154
984−Append
1155+## `++snap`
985
1156
1157+Replace item at index
1158+
986−Accepts a `++list` `a` and a noun `b`, producing the list of `b` appended to `a`.
1159+Accepts a `list` `a`, an atom `b`, and a noun `c`, producing the list of `a` with the item at index `b` replaced with `c`.
987
1160
988#### Accepts
1161#### Accepts
989
1162
990`a` is a list.
1163`a` is a list.
991
1164
992−`b` is a noun.
1165+`b` is a atom.
1166+
1167+`c` is a noun.
993
1168
994#### Produces
1169#### Produces
995
1170
996−Produces a list of `b` appended to `a`.
1171+the list of `a` with the item at index `b` replaced with `c`.
997
1172
998#### Source
1173#### Source
999
1174
1000```hoon
1175```hoon
1001− ++ snoc
1176+++ snap
1177+ ~/ %snap
1002− |* [a/(list) b/*]
1178+ |* [a=(list) b=@ c=*]
1179+ ^+ a
1003− (weld a ^+(a [b]~))
1180+ (weld (scag b a) [c (slag +(b) a)])
1004```
1181```
1005
1182
1006#### Examples
1183#### Examples
1007
1184
1008```
1185```
1009− > `tape`(zing (snoc `(list tape)`~["a" "bc" "def"] "g"))
1186+> (snap (limo ~[2 3 4]) 1 11)
1010− "abcdefg"
1011− > (snoc `(list @ud)`~[1 2 3] 4)
1012− ~[1 2 3 4]
1187+~[2 11 4]
1013```
1188```
1014
1189
1015---
1190---
1016−### `++snap`
1017−
1018−Replace item at index
1019
1191
1020−Accepts a `list` `a`, an atom `b`, and a noun `c`, producing the list of `a` with the item at index `b` replaced with `c`.
1192+## `++snip`
1021−
1022−#### Accepts
1023
1193
1024−`a` is a list.
1194+Drop tail off list
1025
1195
1026−`b` is a atom.
1196+Removes the last element from list `a`.
1027
1197
1028−`c` is a noun.
1198+#### Accepts
1029
1199
1200+`a` is a `list`.
1030
1201
1031#### Produces
1202#### Produces
1032
1203
1033−the list of `a` with the item at index `b` replaced with `c`.
1204+A `list`.
1034
1205
1035#### Source
1206#### Source
1036
1207
1037```hoon
1208```hoon
1038− ++ snap
1209+++ snip
1210+ ~/ %snip
1039− |* [a/(list) b/@ c/*]
1211+ |* a=(list)
1040− ^+ a
1212+ ^+ a
1041− (weld (scag b a) [c (slag +(b) a)])
1213+ ?~ a ~
1214+ ?: =(~ t.a) ~
1215+ [i.a $(a t.a)]
1042```
1216```
1043
1217
1044#### Examples
1218#### Examples
1045
1219
1046```
1220```
1047− > (snap (limo ~[2 3 4]) 1 11)
1221+> `tape`(snip "foobar")
1048− ~[2 11 4]
1222+"fooba"
1223+```
1224+
1225+```
1226+> (snip ~)
1227+~
1049```
1228```
1050
1229
1051---
1230---
1052−### `++into`
1053
1231
1054−Insert item at index
1232+## `++snoc`
1055
1233
1234+Append
1235+
1056−Accepts a `list` `a`, an atom `b`, and a noun `c`, producing the list of `a` with the item `c` inserted at index `b`.
1236+Accepts a `++list` `a` and a noun `b`, producing the list of `b` appended to `a`.
1057
1237
1058#### Accepts
1238#### Accepts
1059
1239
1060`a` is a list.
1240`a` is a list.
1061
1241
1062−`b` is a atom.
1242+`b` is a noun.
1063−
1064−`c` is a noun.
1065−
1066
1243
1067#### Produces
1244#### Produces
1068
1245
1069−the list of `a` with the item `c` inserted at index `b`.
1246+Produces a list of `b` appended to `a`.
1070
1247
1071#### Source
1248#### Source
1072
1249
1073```hoon
1250```hoon
1074− ++ into
1251+++ snoc
1075− |* [a/(list) b/@ c/*]
1252+ |* [a=(list) b=*]
1076− ^+ a
1253+ (weld a ^+(a [b]~))
1077− (weld (scag b a) [c (slag b a)])
1078```
1254```
1079
1255
1080#### Examples
1256#### Examples
1081
1257
1082```
1258```
1083− > (into (limo ~[2 3 4]) 1 11)
1259+> `tape`(zing (snoc `(list tape)`~["a" "bc" "def"] "g"))
1260+"abcdefg"
1261+> (snoc `(list @ud)`~[1 2 3] 4)
1084− ~[2 11 3 4]
1262+~[1 2 3 4]
1085```
1263```
1086
1264
1087---
1265---
1266+
1088−### `++sort`
1267+## `++sort`
1089
1268
1090Quicksort
1269Quicksort
1091
1270
@@ -1106,28 +1285,29 @@ A list
1106#### Source
1285#### Source
1107
1286
1108```hoon
1287```hoon
1109− ++ sort !. :: quicksort
1288+++ sort !.
1110− ~/ %sort
1289+ ~/ %sort
1111− |* [a=(list) b=$-([* *] ?)]
1290+ |* [a=(list) b=$-([* *] ?)]
1112− => .(a ^.(homo a))
1291+ => .(a ^.(homo a))
1113− |- ^+ a
1292+ |- ^+ a
1114− ?~ a ~
1293+ ?~ a ~
1294+ =+ s=(skid t.a |:(c=i.a (b c i.a)))
1115− %+ weld
1295+ %+ weld
1116− $(a (skim t.a |=(c/_i.a (b c i.a))))
1296+ $(a p.s)
1117− ^+ t.a
1297+ ^+ t.a
1118− [i.a $(a (skim t.a |=(c/_i.a !(b c i.a))))]
1298+ [i.a $(a q.s)]
1119```
1299```
1120
1300
1121#### Examples
1301#### Examples
1122
1302
1123```
1303```
1124− > (sort `(list @)`[0 1 2 3 ~] gth)
1304+> (sort `(list @)`[0 1 2 3 ~] gth)
1125− ~[3 2 1 0]
1305+~[3 2 1 0]
1126```
1306```
1127
1307
1128−
1129---
1308---
1309+
1130−### `++spin` {#spin}
1310+## `++spin` {#spin}
1131
1311
1132Gate to list, with state
1312Gate to list, with state
1133
1313
@@ -1152,35 +1332,39 @@ A pair of a list and a noun.
1152#### Source
1332#### Source
1153
1333
1154```hoon
1334```hoon
1155− ++ spin
1335+++ spin
1156− ~/ %spin
1336+ ~/ %spin
1157− |* [a=(list) b=* c=_|=(^ [** +<+])]
1337+ |* [a=(list) b=* c=_|=(^ [** +<+])]
1158− => .(c `$-([_?>(?=(^ a) i.a) _b] [_-:(c) _b])`c)
1338+ => .(c `$-([_?>(?=(^ a) i.a) _b] [_-:(c) _b])`c)
1159− =/ acc=(list _-:(c)) ~
1339+ =/ acc=(list _-:(c)) ~
1160− |- ^- (pair _acc _b)
1340+ |- ^- (pair _acc _b)
1161− ?~ a
1341+ ?~ a
1162− [(flop acc) b]
1342+ [(flop acc) b]
1163− =^ res b (c i.a b)
1343+ =^ res b (c i.a b)
1164− $(acc [res acc], a t.a)
1344+ $(acc [res acc], a t.a)
1165```
1345```
1166
1346
1167#### Examples
1347#### Examples
1168
1348
1169```
1349```
1170− > %^ spin (limo ~[4 5 6]) :: Trivial example -- does nothing with the state
1350+> %^ spin (limo ~[4 5 6]) :: Trivial example -- does nothing with the state
1171− 0
1351+ 0
1172− |=([n=@ a=@] [n a])
1352+ |=([n=@ a=@] [n a])
1173− [p=~[4 5 6] q=0]
1353+[p=~[4 5 6] q=0]
1354+```
1174
1355
1356+```
1175− > %^ spin (limo ~[4 5 6]) :: Form a pair with `p` as the index and `q` as the list element
1357+> %^ spin (limo ~[4 5 6]) :: Form a pair with `p` as the index and `q` as the list element
1176− 0
1358+ 0
1177− |=([n=@ a=@] [`(pair)`[a n] +(a)])
1359+ |=([n=@ a=@] [`(pair)`[a n] +(a)])
1178− [p=~[[p=0 q=4] [p=1 q=5] [p=2 q=6]] q=3]
1360+[p=~[[p=0 q=4] [p=1 q=5] [p=2 q=6]] q=3]
1361+```
1179
1362
1363+```
1180− > %^ spin (reap 10 0) :: Create 10 random numbers less than `10`
1364+> %^ spin (reap 10 0) :: Create 10 random numbers less than `10`
1181− ~(. og eny)
1365+ ~(. og eny)
1182− |=([n=@ rng=_og] (rads:rng 10))
1366+ |=([n=@ rng=_og] (rads:rng 10))
1183− [p=~[7 8 6 0 1 5 4 7 9 3] q=<4.rvi {a/@uvJ <51.qyl 129.pdd 41.mac 1.ane $141>}>]
1367+[p=~[7 8 6 0 1 5 4 7 9 3] q=<4.rvi {a/@uvJ <51.qyl 129.pdd 41.mac 1.ane $141>}>]
1184```
1368```
1185
1369
1186#### Discussion
1370#### Discussion
@@ -1189,10 +1373,9 @@ A pair of a list and a noun.
1189with entropy (`eny`). The head of the product is the random number, the tail
1373with entropy (`eny`). The head of the product is the random number, the tail
1190is the continuation of the RNG.
1374is the continuation of the RNG.
1191
1375
1192−
1193−
1194---
1376---
1377+
1195−### `++spun` {#spun}
1378+## `++spun` {#spun}
1196
1379
1197Gate to list, with state
1380Gate to list, with state
1198
1381
@@ -1217,28 +1400,30 @@ A list.
1217#### Source
1400#### Source
1218
1401
1219```hoon
1402```hoon
1220− ++ spun
1403+++ spun
1221− ~/ %spun
1404+ ~/ %spun
1222− |* [a=(list) b=_|=(^ [** +<+])]
1405+ |* [a=(list) b=_|=(^ [** +<+])]
1223− p:(spin a +<+.b b)
1406+ p:(spin a +<+.b b)
1224```
1407```
1225
1408
1226#### Examples
1409#### Examples
1227
1410
1228```
1411```
1229− > %+ spun (limo ~[4 5 6]) :: `p` as the index and `q` as the list element
1412+> %+ spun (limo ~[4 5 6]) :: `p` as the index and `q` as the list element
1230− |=([n=@ a=@] [`(pair)`[a n] +(a)])
1413+ |=([n=@ a=@] [`(pair)`[a n] +(a)])
1231− ~[[p=0 q=4] [p=1 q=5] [p=2 q=6]]
1414+~[[p=0 q=4] [p=1 q=5] [p=2 q=6]]
1232−
1233− > =l (limo ~[7 8 9])
1234− > %+ spun (limo ~[4 5 6]) :: joins two lists into a list of pairs
1235− |=([n=@ a=@] [`(pair)`[(snag a l) n] +(a)])
1236− ~[[p=7 q=4] [p=8 q=5] [p=9 q=6]]
1237```
1415```
1238
1416
1417+```
1418+> =l (limo ~[7 8 9])
1419+> %+ spun (limo ~[4 5 6]) :: joins two lists into a list of pairs
1420+ |=([n=@ a=@] [`(pair)`[(snag a l) n] +(a)])
1421+~[[p=7 q=4] [p=8 q=5] [p=9 q=6]]
1422+```
1239
1423
1240---
1424---
1425+
1241−### `++swag`
1426+## `++swag`
1242
1427
1243Infix
1428Infix
1244
1429
@@ -1260,24 +1445,26 @@ A list of the same type as `c`.
1260#### Source
1445#### Source
1261
1446
1262```hoon
1447```hoon
1263− ++ swag
1448+++ swag
1264− |* [[a=@ b=@] c=(list)]
1449+ |* [[a=@ b=@] c=(list)]
1265− (scag +<-> (slag +<-< c))
1450+ (scag +<-> (slag +<-< c))
1266```
1451```
1267
1452
1268#### Examples
1453#### Examples
1269
1454
1270```
1455```
1271− > (swag [2 5] "roly poly")
1456+> (swag [2 5] "roly poly")
1272− "ly po"
1457+"ly po"
1273−
1274− > (swag [2 2] (limo [1 2 3 4 ~]))
1275− [i=3 t=[i=4 t=~]]
1276```
1458```
1277
1459
1460+```
1461+> (swag [2 2] (limo [1 2 3 4 ~]))
1462+[i=3 t=[i=4 t=~]]
1463+```
1278
1464
1279---
1465---
1466+
1280−### `++turn`
1467+## `++turn`
1281
1468
1282Gate to list
1469Gate to list
1283
1470
@@ -1297,23 +1484,27 @@ A list.
1297#### Source
1484#### Source
1298
1485
1299```hoon
1486```hoon
1300− ++ turn
1487+++ turn
1301− ~/ %turn
1488+ ~/ %turn
1302− |* [a=(list) b=gate]
1489+ |* [a=(list) b=gate]
1490+ => .(a (homo a))
1491+ ^- (list _?>(?=(^ a) (b i.a)))
1303− |-
1492+ |-
1304− ?~ a ~
1493+ ?~ a ~
1305− [i=(b i.a) t=$(a t.a)]
1494+ [i=(b i.a) t=$(a t.a)]
1306```
1495```
1307
1496
1308#### Examples
1497#### Examples
1309
1498
1310```
1499```
1311− > (turn (limo [104 111 111 110 ~]) @t)
1500+> (turn (limo [104 111 111 110 ~]) @t)
1312− <|h o o n|>
1501+<|h o o n|>
1502+```
1313
1503
1504+```
1314− > =a |=(a=@ (add a 4))
1505+> =a |=(a=@ (add a 4))
1315− > (turn (limo [1 2 3 4 ~]) a)
1506+> (turn (limo [1 2 3 4 ~]) a)
1316− ~[5 6 7 8]
1507+~[5 6 7 8]
1317```
1508```
1318
1509
1319#### Discussion
1510#### Discussion
@@ -1321,7 +1512,8 @@ A list.
1321`turn` is Hoon's version of 'map' in Haskell.
1512`turn` is Hoon's version of 'map' in Haskell.
1322
1513
1323---
1514---
1515+
1324−### `++weld`
1516+## `++weld`
1325
1517
1326Concatenate
1518Concatenate
1327
1519
@@ -1334,28 +1526,30 @@ Concatenate two `++list`s `a` and `b`.
1334#### Source
1526#### Source
1335
1527
1336```hoon
1528```hoon
1337− ++ weld
1529+++ weld
1338− ~/ %weld
1530+ ~/ %weld
1339− |* [a=(list) b=(list)]
1531+ |* [a=(list) b=(list)]
1340− => .(a ^.(homo a), b ^.(homo b))
1532+ => .(a ^.(homo a), b ^.(homo b))
1341− |- ^+ b
1533+ |- ^+ b
1342− ?~ a b
1534+ ?~ a b
1343− [i.a $(a t.a)]
1535+ [i.a $(a t.a)]
1344```
1536```
1345
1537
1346#### Examples
1538#### Examples
1347
1539
1348```
1540```
1349− > (weld "urb" "it")
1541+> (weld "urb" "it")
1350− "urbit"
1542+"urbit"
1351−
1352− > (weld (limo [1 2 ~]) (limo [3 4 ~]))
1353− ~[1 2 3 4]
1354```
1543```
1355
1544
1545+```
1546+> (weld (limo [1 2 ~]) (limo [3 4 ~]))
1547+~[1 2 3 4]
1548+```
1356
1549
1357---
1550---
1551+
1358−### `++welp`
1552+## `++welp`
1359
1553
1360Perfect weld
1554Perfect weld
1361
1555
@@ -1375,7 +1569,7 @@ A list.
1375#### Source
1569#### Source
1376
1570
1377```hoon
1571```hoon
1378−++ welp :: faceless weld
1572+++ welp
1379 ~/ %welp
1573 ~/ %welp
1380 =| [* *]
1574 =| [* *]
1381 |@
1575 |@
@@ -1389,23 +1583,27 @@ A list.
1389#### Examples
1583#### Examples
1390
1584
1391```
1585```
1392− > (welp "foo" "bar")
1586+> (welp "foo" "bar")
1393− "foobar"
1587+"foobar"
1394−
1588+```
1395− > (welp ~[60 61 62] ~[%a %b %c])
1396− [60 61 62 %a %b %c ~]
1397
1589
1590+```
1398− > ? (welp ~[60 61 62] ~[%a %b %c])
1591+> (welp ~[60 61 62] ~[%a %b %c])
1399− {@ud @ud @ud $a $b $c $~}
1400− [60 61 62 %a %b %c ~]
1592+[60 61 62 %a %b %c ~]
1401
1593
1402− > (welp [sa+1 so+2 ~] si=3)
1594+> ? (welp ~[60 61 62] ~[%a %b %c])
1403− [[%sa 1] [%so 2] si=3]
1595+ {@ud @ud @ud $a $b $c $~}
1596+[60 61 62 %a %b %c ~]
1404```
1597```
1405
1598
1599+```
1600+> (welp [sa+1 so+2 ~] si=3)
1601+[[%sa 1] [%so 2] si=3]
1602+```
1406
1603
1407---
1604---
1605+
1408−### `++zing`
1606+## `++zing`
1409
1607
1410Turns a `++list` of lists into a single list by promoting the elements of
1608Turns a `++list` of lists into a single list by promoting the elements of
1411each sublist into the higher.
1609each sublist into the higher.
@@ -1421,7 +1619,7 @@ A list.
1421#### Source
1619#### Source
1422
1620
1423```hoon
1621```hoon
1424−++ zing :: promote
1622+++ zing
1425 ~/ %zing
1623 ~/ %zing
1426 =| *
1624 =| *
1427 |@
1625 |@
@@ -1432,15 +1630,16 @@ A list.
1432 --
1630 --
1433```
1631```
1434
1632
1435−
1436#### Examples
1633#### Examples
1437
1634
1438```
1635```
1439− > (zing (limo [(limo ['a' 'b' 'c' ~]) (limo ['e' 'f' 'g' ~]) (limo ['h' 'i' 'j' ~]) ~]))
1636+> (zing (limo [(limo ['a' 'b' 'c' ~]) (limo ['e' 'f' 'g' ~]) (limo ['h' 'i' 'j' ~]) ~]))
1440− ~['a' 'b' 'c' 'e' 'f' 'g' 'h' 'i' 'j']
1637+~['a' 'b' 'c' 'e' 'f' 'g' 'h' 'i' 'j']
1638+```
1441
1639
1640+```
1442− > (zing (limo [(limo [1 'a' 2 'b' ~]) (limo [3 'c' 4 'd' ~]) ~]))
1641+> (zing (limo [(limo [1 'a' 2 'b' ~]) (limo [3 'c' 4 'd' ~]) ~]))
1443− ~[1 97 2 98 3 99 4 100]
1642+~[1 97 2 98 3 99 4 100]
1444```
1643```
1445
1644
1446---
1645---
content/docs/hoon/reference/stdlib/2c.md+713−637
@@ -4,15 +4,15 @@ weight = 6
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++bex`
7+## `++bex`
8
8
9Binary exponent
9Binary exponent
10
10
11−Computes the result of `2^a`, producing an atom.
11+Computes the result of `2^a`, where `a` is a block size (see [$bloq](/docs/hoon/reference/stdlib/1c#bloq)), producing an atom.
12
12
13#### Accepts
13#### Accepts
14
14
15−`a` is an atom.
15+`a` is an `bloq`.
16
16
17#### Produces
17#### Produces
18
18
@@ -21,30 +21,34 @@ An atom.
21#### Source
21#### Source
22
22
23```hoon
23```hoon
24− ++ bex
24+++ bex
25− ~/ %bex
25+ ~/ %bex
26− |= a=@
26+ |= a=bloq
27− ^- @
27+ ^- @
28− ?: =(0 a) 1
28+ ?: =(0 a) 1
29− (mul 2 $(a (dec a)))
29+ (mul 2 $(a (dec a)))
30```
30```
31
31
32#### Examples
32#### Examples
33
33
34```
34```
35− > (bex 4)
35+> (bex 4)
36− 16
36+16
37+```
37
38
39+```
38− > (bex (add 19 1))
40+> (bex (add 19 1))
39− 1.048.576
41+1.048.576
42+```
40
43
44+```
41− > (bex 0)
45+> (bex 0)
42− 1
46+1
43```
47```
44
48
45---
49---
46
50
47−### `++can`
51+## `++can`
48
52
49Assemble
53Assemble
50
54
@@ -54,9 +58,12 @@ value.
54
58
55#### Accepts
59#### Accepts
56
60
57−`a` is a block size (see [`++bloq`](/docs/hoon/reference/stdlib/1c)).
61+`a` is a block size (see [`$bloq`](/docs/hoon/reference/stdlib/1c#bloq)).
58
62
59−`b` is a `list` of length-value pairs, `p` and `q`.
63+`b` is a `list` of length-value pairs, `p` and `q`:
64+
65+- `p` is a [step](/docs/hoon/reference/stdlib/1c/#step).
66+- `q` is a `@`.
60
67
61#### Produces
68#### Produces
62
69
@@ -65,45 +72,59 @@ An atom.
65#### Source
72#### Source
66
73
67```hoon
74```hoon
68− ++ can
75+++ can
69− ~/ %can
76+ ~/ %can
70− |= [a=bloq b=(list [p=@ q=@])]
77+ |= [a=bloq b=(list [p=step q=@])]
71− ^- @
78+ ^- @
72− ?~ b 0
79+ ?~ b 0
73− (add (end a p.i.b q.i.b) (lsh a p.i.b $(b t.b)))
80+ (add (end [a p.i.b] q.i.b) (lsh [a p.i.b] $(b t.b)))
74```
81```
75
82
76#### Examples
83#### Examples
77
84
78```
85```
79− > `@ub`21 :: @ub is the binary aura
86+> `@ub`21 :: @ub is the binary aura
80− 0b1.0101
87+0b1.0101
88+```
81
89
90+```
82− > `@ub`(can 3 ~[[1 21]])
91+> `@ub`(can 3 ~[[1 21]])
83− 0b1.0101
92+0b1.0101
93+```
84
94
95+```
85− > `@ub`(can 3 ~[[1 1]])
96+> `@ub`(can 3 ~[[1 1]])
86− 0b1
97+0b1
98+```
87
99
100+```
88− > `@ub`(can 0 ~[[1 255]])
101+> `@ub`(can 0 ~[[1 255]])
89− 0b1
102+0b1
103+```
90
104
105+```
91− > `@ux`(can 3 [3 0xc1] [1 0xa] ~) :: @ux is the hexadecimal aura
106+> `@ux`(can 3 [3 0xc1] [1 0xa] ~) :: @ux is the hexadecimal aura
92− 0xa00.00c1
107+0xa00.00c1
108+```
93
109
110+```
94− > `@ux`(can 3 [3 0xc1] [1 0xa] [1 0x23] ~)
111+> `@ux`(can 3 [3 0xc1] [1 0xa] [1 0x23] ~)
95− 0x23.0a00.00c1
112+0x23.0a00.00c1
113+```
96
114
115+```
97− > `@ux`(can 4 [3 0xc1] [1 0xa] [1 0x23] ~)
116+> `@ux`(can 4 [3 0xc1] [1 0xa] [1 0x23] ~)
98− 0x23.000a.0000.0000.00c1
117+0x23.000a.0000.0000.00c1
118+```
99
119
120+```
100− > `@ux`(can 3 ~[[1 'a'] [2 'bc']])
121+> `@ux`(can 3 ~[[1 'a'] [2 'bc']])
101− 0x63.6261
122+0x63.6261
102```
123```
103
124
104---
125---
105
126
106−### `++cat`
127+## `++cat`
107
128
108Concatenate
129Concatenate
109
130
@@ -112,7 +133,7 @@ atom.
112
133
113#### Accepts
134#### Accepts
114
135
115−`a` is a block size (see [`++bloq`](/docs/hoon/reference/stdlib/1c)).
136+`a` is a block size (see [`$bloq`](/docs/hoon/reference/stdlib/1c#bloq)).
116
137
117`b` is an atom.
138`b` is an atom.
118
139
@@ -125,49 +146,43 @@ An atom.
125#### Source
146#### Source
126
147
127```hoon
148```hoon
128− ++ cat
149+++ cat
129− ~/ %cat
150+ ~/ %cat
130− |= [a=bloq b=@ c=@]
151+ |= [a=bloq b=@ c=@]
131− (add (lsh a (met a b) c) b)
152+ (add (lsh [a (met a b)] c) b)
132```
153```
133
154
134#### Examples
155#### Examples
135
156
136```
157```
137− > `@ub`(cat 3 1 0) :: @ub is the binary aura
158+> `@ub`(cat 3 1 0) :: @ub is the binary aura
138− 0b1
159+0b1
139−
140− > `@ub`(cat 0 1 1)
160+> `@ub`(cat 0 1 1)
141− 0b11
161+0b11
142−
143− > `@ub`(cat 0 2 1)
162+> `@ub`(cat 0 2 1)
144− 0b110
163+0b110
145−
146− > `@ub`(cat 2 1 1)
164+> `@ub`(cat 2 1 1)
147− 0b1.0001
165+0b1.0001
148−
166+```
149− > `@ub`256
150− 0b1.0000.0000
151−
152− > `@ub`255
153− 0b1111.1111
154−
155− > `@ub`(cat 3 256 255)
156− 0b1111.1111.0000.0001.0000.0000
157−
158− > `@ub`(cat 2 256 255)
159− 0b1111.1111.0001.0000.0000
160−
161− > (cat 3 256 255)
162− 16.711.936
163
167
168+```
169+> `@ub`256
170+0b1.0000.0000
171+> `@ub`255
172+0b1111.1111
173+> `@ub`(cat 3 256 255)
174+0b1111.1111.0000.0001.0000.0000
175+> `@ub`(cat 2 256 255)
176+0b1111.1111.0001.0000.0000
177+> (cat 3 256 255)
178+16.711.936
164− > (cat 2 256 255)
179+> (cat 2 256 255)
165− 1.044.736
180+1.044.736
166```
181```
167
182
168---
183---
169
184
170−### `++cut`
185+## `++cut`
171
186
172Slice
187Slice
173
188
@@ -176,11 +191,12 @@ Slices `c` blocks of size `a` that are positioned `b` blocks from the end of
176
191
177#### Accepts
192#### Accepts
178
193
179−`a` is a block size (see [`++bloq`](/docs/hoon/reference/stdlib/1c)).
194+`a` is a block size (see [`$bloq`](/docs/hoon/reference/stdlib/1c)).
180
195
181−`b` is an atom.
196+`[b c]` where:
182
197
183−`c` is an atom.
198+- `b` is a [step](/docs/hoon/reference/stdlib/1c#step).
199+- `c` is a [step](/docs/hoon/reference/stdlib/1c#step).
184
200
185`d` is an atom.
201`d` is an atom.
186
202
@@ -191,43 +207,42 @@ An atom.
191#### Source
207#### Source
192
208
193```hoon
209```hoon
194− ++ cut
210+++ cut
195− ~/ %cut
211+ ~/ %cut
196− |= [a=bloq [b=@u c=@u] d=@]
212+ |= [a=bloq [b=step c=step] d=@]
197− (end a c (rsh a b d))
213+ (end [a c] (rsh [a b] d))
198```
214```
199
215
200#### Examples
216#### Examples
201
217
202```
218```
203− > (cut 0 [1 1] 2)
219+> (cut 0 [1 1] 2)
204− 1
220+1
205−
206− > (cut 0 [2 1] 4)
221+> (cut 0 [2 1] 4)
207− 1
222+1
208−
223+```
209− > `@t`(cut 3 [0 3] 'abcdefgh')
210− 'abc'
211−
212− > `@t`(cut 3 [1 3] 'abcdefgh') :: @t is the cord aura
213− 'bcd'
214−
215− > `@ub`(cut 0 [0 3] 0b1111.0000.1101) :: @ub is the binary aura
216− 0b101
217−
218− > `@ub`(cut 0 [0 6] 0b1111.0000.1101)
219− 0b1101
220
224
221− > `@ub`(cut 0 [4 6] 0b1111.0000.1101)
225+```
222− 0b11.0000
226+> `@t`(cut 3 [0 3] 'abcdefgh') :: @t is the cord aura
227+'abc'
228+> `@t`(cut 3 [1 3] 'abcdefgh')
229+'bcd'
230+```
223
231
232+```
233+> `@ub`(cut 0 [0 3] 0b1111.0000.1101) :: @ub is the binary aura
234+0b101
235+> `@ub`(cut 0 [0 6] 0b1111.0000.1101)
236+0b1101
237+> `@ub`(cut 0 [4 6] 0b1111.0000.1101)
238+0b11.0000
224− > `@ub`(cut 0 [3 6] 0b1111.0000.1101)
239+> `@ub`(cut 0 [3 6] 0b1111.0000.1101)
225− 0b10.0001
240+0b10.0001
226```
241```
227
242
228---
243---
229
244
230−### `++end`
245+## `++end`
231
246
232Tail
247Tail
233
248
@@ -235,8 +250,8 @@ Produces an atom by taking the last `step` blocks of size `bloq` from `b`.
235
250
236#### Accepts
251#### Accepts
237
252
238−`a` is an atom slice specifier (see [`++bite`](/docs/hoon/reference/stdlib/1c#bite)),
253+`a` is an atom slice specifier (see [`$bite`](/docs/hoon/reference/stdlib/1c#bite)),
239−which is a block size (see [`++bloq`](/docs/hoon/reference/stdlib/1c#bloq))
254+which is a block size (see [`$bloq`](/docs/hoon/reference/stdlib/1c#bloq))
240with optional block count.
255with optional block count.
241
256
242`b` is an atom.
257`b` is an atom.
@@ -248,56 +263,51 @@ An atom.
248#### Source
263#### Source
249
264
250```hoon
265```hoon
251− ++ end
266+++ end
252− ~/ %end
267+ ~/ %end
253− |= [a=bite b=@]
268+ |= [a=bite b=@]
254− =/ [=bloq =step] ?^(a a [a *step])
269+ =/ [=bloq =step] ?^(a a [a *step])
255− (mod b (bex (mul (bex bloq) step)))
270+ (mod b (bex (mul (bex bloq) step)))
256```
271```
257
272
258#### Examples
273#### Examples
259
274
260```
275```
261− > (end [2 2] 255)
276+> (end [2 2] 255)
262− 255
277+255
263−
264− > (end [3 1] 255)
278+> (end [3 1] 255)
265− 255
279+255
266−
267− > (end 3 255)
280+> (end 3 255)
268− 255
281+255
269−
270− > (end 3 256)
282+> (end 3 256)
271− 0
283+0
272−
284+```
273− > `@ub`12 :: @ub is the binary aura
274− 0b1100
275−
276− > `@ub`(end [0 3] 12)
277− 0b100
278−
279− > (end [0 3] 12)
280− 4
281−
282− > `@ub`(end [1 3] 12)
283− 0b1100
284−
285− > (end [1 3] 12)
286− 12
287−
288− > `@ux`'abc' :: @ux is the hexademical aura
289− 0x63.6261
290
285
286+```
287+> `@ub`12 :: @ub is the binary aura
288+0b1100
291− > `@ux`(end [3 2] 'abc')
289+> `@ub`(end [0 3] 12)
292− 0x6261
290+0b100
291+> (end [0 3] 12)
292+4
293+> `@ub`(end [1 3] 12)
294+0b1100
295+> (end [1 3] 12)
296+12
297+```
293
298
299+```
300+> `@ux`'abc' :: @ux is the hexademical aura
301+0x63.6261
302+> `@ux`(end [3 2] 'abc')
303+0x6261
294− > `@t`(end [3 2] 'abc') :: @t is the cord aura
304+> `@t`(end [3 2] 'abc') :: @t is the cord aura
295− 'ab'
305+'ab'
296```
306```
297
307
298---
308---
299
309
300−### `++fil`
310+## `++fil`
301
311
302Fill bloqstream
312Fill bloqstream
303
313
@@ -305,9 +315,9 @@ Produces an atom by repeating `c` for `b` blocks of size `a`.
305
315
306#### Accepts
316#### Accepts
307
317
308−`a` is a block size (see [`++bloq`](/docs/hoon/reference/stdlib/1c)).
318+`a` is a block size (see [`$bloq`](/docs/hoon/reference/stdlib/1c#bloq)).
309
319
310−`b` is an atom.
320+`b` is a [step](/docs/hoon/reference/stdlib/1c#step).
311
321
312`c` is an atom.
322`c` is an atom.
313
323
@@ -318,38 +328,48 @@ An atom.
318#### Source
328#### Source
319
329
320```hoon
330```hoon
321− ++ fil
331+++ fil
332+ ~/ %fil
322− |= [a=bloq b=@u c=@]
333+ |= [a=bloq b=step c=@]
323− =+ n=0
334+ =| n=@ud
324− =+ d=c
335+ =. c (end a c)
336+ =/ d c
325− |- ^- @
337+ |- ^- @
326− ?: =(n b)
338+ ?: =(n b)
327− (rsh a 1 d)
339+ (rsh a d)
328− $(d (add c (lsh a 1 d)), n +(n))
340+ $(d (add c (lsh a d)), n +(n))
329```
341```
330
342
331#### Examples
343#### Examples
332
344
333```
345```
334− > `@t`(fil 3 5 %a) :: @t is the cord (string) aura
346+> `@t`(fil 3 5 %a) :: @t is the cord (string) aura
335− 'aaaaa'
347+'aaaaa'
348+```
336
349
350+```
337− > `@t`(fil 5 10 %ceeb)
351+> `@t`(fil 5 10 %ceeb)
338− 'ceebceebceebceebceebceebceebceebceebceeb'
352+'ceebceebceebceebceebceebceebceebceebceeb'
353+```
339
354
355+```
340− > `@t`(fil 4 10 %eced)
356+> `@t`(fil 4 10 'eced')
341− 'ʇʇʇʇʇʇʇʇʇʇed'
357+'ecececececececececec'
358+```
342
359
360+```
343− > `@tas`(fil 4 10 %bf) :: @tas is the term aura
361+> `@tas`(fil 4 10 %bf) :: @tas is the term aura
344− %bfbfbfbfbfbfbfbfbfbf
362+%bfbfbfbfbfbfbfbfbfbf
363+```
345
364
365+```
346− > `@ub`(fil 2 6 1) :: @ub is the binary aura
366+> `@ub`(fil 2 6 1) :: @ub is the binary aura
347− 0b1.0001.0001.0001.0001.0001
367+0b1.0001.0001.0001.0001.0001
348```
368```
349
369
350---
370---
351
371
352−### `++lsh`
372+## `++lsh`
353
373
354Left-shift
374Left-shift
355
375
@@ -357,8 +377,8 @@ Produces an atom by left-shifting `b` by `step` blocks of size `bloq`.
357
377
358#### Accepts
378#### Accepts
359
379
360−`a` is an atom slice specifier (see [`++bite`](/docs/hoon/reference/stdlib/1c#bite)),
380+`a` is an atom slice specifier (see [`$bite`](/docs/hoon/reference/stdlib/1c#bite)),
361−which is a block size (see [`++bloq`](/docs/hoon/reference/stdlib/1c#bloq))
381+which is a block size (see [`$bloq`](/docs/hoon/reference/stdlib/1c#bloq))
362with optional block count.
382with optional block count.
363
383
364`b` is an atom.
384`b` is an atom.
@@ -370,41 +390,38 @@ An atom.
370#### Source
390#### Source
371
391
372```hoon
392```hoon
373− ++ lsh
393+++ lsh
374− ~/ %lsh
394+ ~/ %lsh
375− |= [a=bite b=@]
395+ |= [a=bite b=@]
376− =/ [=bloq =step] ?^(a a [a *step])
396+ =/ [=bloq =step] ?^(a a [a *step])
377− (mul b (bex (mul (bex bloq) step)))
397+ (mul b (bex (mul (bex bloq) step)))
378```
398```
379
399
380#### Examples
400#### Examples
381
401
382```
402```
383− > `@ub`1 :: @ub is the binary aura
403+> `@ub`1 :: @ub is the binary aura
384− 0b1
404+0b1
385−
386− > `@ub`(lsh [0 1] 1)
405+> `@ub`(lsh [0 1] 1)
387− 0b10
406+0b10
388−
389− > (lsh [0 1] 1)
407+> (lsh [0 1] 1)
390− 2
408+2
391−
392− > (lsh 0 1)
409+> (lsh 0 1)
393− 2
410+2
394−
411+```
395− > `@ub`255
396− 0b1111.1111
397−
398− > `@ub`(lsh [3 1] 255)
399− 0b1111.1111.0000.0000
400
412
413+```
414+> `@ub`255
415+0b1111.1111
416+> `@ub`(lsh [3 1] 255)
417+0b1111.1111.0000.0000
401− > (lsh [3 1] 255)
418+> (lsh [3 1] 255)
402− 65.280
419+65.280
403```
420```
404
421
405---
422---
406
423
407−### `++met`
424+## `++met`
408
425
409Measure
426Measure
410
427
@@ -412,45 +429,47 @@ Computes the number of blocks of size `a` in `b`, producing an atom.
412
429
413#### Accepts
430#### Accepts
414
431
415−`a` is a block size (see [`++bloq`](/docs/hoon/reference/stdlib/1c)).
432+`a` is a block size (see [`$bloq`](/docs/hoon/reference/stdlib/1c/bloq)).
416
433
417`b` is an atom.
434`b` is an atom.
418
435
419#### Source
436#### Source
420
437
421```hoon
438```hoon
422− ++ met
439+++ met
423− ~/ %met
440+ ~/ %met
424− |= [a=bloq b=@]
441+ |= [a=bloq b=@]
425− ^- @
442+ ^- @
426− =+ c=0
443+ =+ c=0
427− |-
444+ |-
428− ?: =(0 b) c
445+ ?: =(0 b) c
429− $(b (rsh a 1 b), c +(c))
446+ $(b (rsh a b), c +(c))
430```
447```
431
448
432#### Examples
449#### Examples
433
450
434```
451```
435− > (met 0 1)
452+> (met 0 1)
436− 1
453+1
437−
438− > (met 0 2)
454+> (met 0 2)
439− 2
455+2
440−
456+```
441− > (met 3 255)
442− 1
443
457
458+```
459+> (met 3 255)
460+1
444− > (met 3 256)
461+> (met 3 256)
445− 2
462+2
463+```
446
464
465+```
447− > (met 3 'abcde')
466+> (met 3 'abcde')
448− 5
467+5
449```
468```
450
469
451---
470---
452
471
453−### `++rap`
472+## `++rap`
454
473
455Assemble non-zero
474Assemble non-zero
456
475
@@ -469,41 +488,39 @@ An atom.
469#### Source
488#### Source
470
489
471```hoon
490```hoon
472− ++ rap
491+++ rap
473− ~/ %rap
492+ ~/ %rap
474− |= [a=bloq b=(list @)]
493+ |= [a=bloq b=(list @)]
475− ^- @
494+ ^- @
476− =+ ~
477− ?~ b 0
495+ ?~ b 0
478− (cat a i.b $(b t.b))
496+ (cat a i.b $(b t.b))
479```
497```
480
498
481#### Examples
499#### Examples
482
500
483```
501```
484− > `@ub`(rap 2 [1 2 3 4 ~]) :: @ub is the binary aura
502+> `@ub`(rap 2 [1 2 3 4 ~]) :: @ub is the binary aura
485− 0b100.0011.0010.0001
503+0b100.0011.0010.0001
486−
487− > `@ub`(rap 1 [1 2 3 4 ~])
504+> `@ub`(rap 1 [1 2 3 4 ~])
488− 0b1.0011.1001
505+0b1.0011.1001
489−
490− > (rap 0 [0 0 0 ~])
491− 0
492−
493− > (rap 0 [1 0 1 ~])
494− 3
495−
496− > `@ub`3
506+```
497− 0b11
498−
499− > (rap 0 [0 1 0 0 1 2 ~])
500− 11
501
507
508+```
509+> (rap 0 [0 0 0 ~])
510+0
502− > (rap 0 [1 1 2 ~])
511+> (rap 0 [1 0 1 ~])
503− 11
512+3
513+```
504
514
515+```
516+> `@ub`3
517+0b11
518+> (rap 0 [0 1 0 0 1 2 ~])
519+11
520+> (rap 0 [1 1 2 ~])
521+11
505− > `@ub`11
522+> `@ub`11
506− 0b1011
523+0b1011
507```
524```
508
525
509#### Discussion
526#### Discussion
@@ -512,7 +529,7 @@ Any element of the value `0` is not included in concatenation.
512
529
513---
530---
514
531
515−### `++rep`
532+## `++rep`
516
533
517Assemble single
534Assemble single
518
535
@@ -533,63 +550,69 @@ An atom.
533#### Source
550#### Source
534
551
535```hoon
552```hoon
536− ++ rep
553+++ rep
537− ~/ %rep
554+ ~/ %rep
538− |= [a=bite b=(list @)]
555+ |= [a=bite b=(list @)]
539− =/ [=bloq =step] ?^(a a [a *step])
556+ =/ [=bloq =step] ?^(a a [a *step])
540− =| i=@ud
557+ =| i=@ud
541− |- ^- @
558+ |- ^- @
542− ?~ b 0
559+ ?~ b 0
543− %+ add $(i +(i), b t.b)
560+ %+ add $(i +(i), b t.b)
544− (lsh [bloq (mul step i)] (end [bloq step] i.b))
561+ (lsh [bloq (mul step i)] (end [bloq step] i.b))
545```
562```
546
563
547#### Examples
564#### Examples
548
565
549```
566```
550− > `@ub`(rep 2 [1 2 3 4 ~]) :: @ub is the binary aura
567+> `@ub`(rep 2 [1 2 3 4 ~]) :: @ub is the binary aura
551− 0b100.0011.0010.0001
568+0b100.0011.0010.0001
552−
569+```
553− > (rep 0 [0 0 1 ~])
554− 4
555−
556− > (rep 0 [0 0 0 1 ~])
557− 8
558−
559− > `@ub`(rep 0 [0 0 0 1 ~])
560− 0b1000
561−
562− > `@ub`8
563− 0b1000
564−
565− > `@ub`(rep 0 [1 0 1 0 ~])
566− 0b101
567−
568− > `@ub`(rep 0 [1 2 3 4 ~])
569− 0b101
570
570
571+```
571− > (rep 0 [0 1 0 1 ~])
572+> (rep 0 [0 0 1 ~])
572− 10
573+4
574+> (rep 0 [0 0 0 1 ~])
575+8
576+```
573
577
578+```
574− > (rep 0 [1 0 1 0 1 ~])
579+> `@ub`(rep 0 [0 0 0 1 ~])
575− 21
580+0b1000
581+> `@ub`8
582+0b1000
583+```
576
584
577− > `@ub`21
585+```
578− 0b10.1010
586+> `@ub`(rep 0 [1 0 1 0 ~])
587+0b101
588+> `@ub`(rep 0 [1 2 3 4 ~])
589+0b101
590+```
579
591
580− > `@ub`(rep 3 [12 166 8 34 ~])
592+```
593+> (rep 0 [0 1 0 1 ~])
594+10
595+> (rep 0 [1 0 1 0 1 ~])
596+21
597+> `@ub`21
581− 0b10.0010.0000.1000.1010.0110.0000.1100
598+0b10.1010
599+```
582
600
583− > `*`"abcd"
601+```
584− [97 98 99 100 0]
602+> `@ub`(rep 3 [12 166 8 34 ~])
603+0b10.0010.0000.1000.1010.0110.0000.1100
604+```
585
605
606+```
607+> `*`"abcd"
608+[97 98 99 100 0]
586− > `@t`(rep 3 "abcd") :: @t is the text aura
609+> `@t`(rep 3 "abcd") :: @t is the text aura
587− 'abcd'
610+'abcd'
588```
611```
589
612
590---
613---
591
614
592−### `++rev`
615+## `++rev`
593
616
594Reverses block order, accounting for leading zeroes.
617Reverses block order, accounting for leading zeroes.
595
618
@@ -630,35 +653,30 @@ An atom.
630
653
631```
654```
632> =a 0b1111.0000.1111.1010.0011
655> =a 0b1111.0000.1111.1010.0011
633−
634> `@ub`(rev 0 20 a)
656> `@ub`(rev 0 20 a)
6350b1100.0101.1111.0000.1111
6570b1100.0101.1111.0000.1111
636−
637> `@ub`(rev 0 12 a)
658> `@ub`(rev 0 12 a)
6380b1100.0101.1111
6590b1100.0101.1111
639−
640> `@ub`(rev 2 5 a)
660> `@ub`(rev 2 5 a)
6410b11.1010.1111.0000.1111
6610b11.1010.1111.0000.1111
642−
643> `@ub`(rev 2 4 a)
662> `@ub`(rev 2 4 a)
6440b11.1010.1111.0000
6630b11.1010.1111.0000
645−
646> `@ub`(rev 2 6 a)
664> `@ub`(rev 2 6 a)
6470b11.1010.1111.0000.1111.0000
6650b11.1010.1111.0000.1111.0000
666+```
648
667
668+```
649> (rev 1 10 1.000)
669> (rev 1 10 1.000)
650179.200
670179.200
651−
652> (rev 2 5 1.000)
671> (rev 2 5 1.000)
653582.400
672582.400
654−
655> (rev 1 5 1.000)
673> (rev 1 5 1.000)
656175
674175
657```
675```
658
676
659---
677---
660
678
661−### `++rip`
679+## `++rip`
662
680
663Disassemble
681Disassemble
664
682
@@ -679,51 +697,51 @@ A list of atoms.
679#### Source
697#### Source
680
698
681```hoon
699```hoon
682− ++ rip
700+++ rip
683− ~/ %rip
701+ ~/ %rip
684− |= [a=bite b=@]
702+ |= [a=bite b=@]
685− ^- (list @)
703+ ^- (list @)
686− ?: =(0 b) ~
704+ ?: =(0 b) ~
687− [(end a b) $(b (rsh a b))]
705+ [(end a b) $(b (rsh a b))]
688```
706```
689
707
690#### Examples
708#### Examples
691
709
692```
710```
693− > `@ub`155 :: @ub is the binary aura
711+> `@ub`155 :: @ub is the binary aura
694− 0b1001.1011
712+0b1001.1011
695−
696− > (rip 0 155)
713+> (rip 0 155)
697− ~[1 1 0 1 1 0 0 1]
714+~[1 1 0 1 1 0 0 1]
698−
699− > (rip 2 155)
715+> (rip 2 155)
700− ~[11 9]
716+~[11 9]
701−
717+```
702− > (rip 0 11)
703− ~[1 1 0 1]
704−
705− > (rip 1 155)
706− ~[3 2 1 2]
707−
708− > `@ub`256
709− 0b1.0000.0000
710−
711− > (rip 0 256)
712− ~[0 0 0 0 0 0 0 0 1]
713
718
719+```
714− > (rip 2 256)
720+> (rip 0 11)
715− ~[0 0 1]
721+~[1 1 0 1]
722+> (rip 1 155)
723+~[3 2 1 2]
724+```
716
725
726+```
727+> `@ub`256
728+0b1.0000.0000
729+> (rip 0 256)
730+~[0 0 0 0 0 0 0 0 1]
731+> (rip 2 256)
732+~[0 0 1]
717− > (rip 3 256)
733+> (rip 3 256)
718− ~[0 1]
734+~[0 1]
735+```
719
736
737+```
720− > `tape`(rip 3 'abcd')
738+> `tape`(rip 3 'abcd')
721− "abcd"
739+"abcd"
722```
740```
723
741
724---
742---
725
743
726−### `++rsh`
744+## `++rsh`
727
745
728Right-shift
746Right-shift
729
747
@@ -744,56 +762,51 @@ An atom.
744#### Source
762#### Source
745
763
746```hoon
764```hoon
747− ++ rsh
765+++ rsh
748− ~/ %rsh
766+ ~/ %rsh
749− |= [a=bite b=@]
767+ |= [a=bite b=@]
750− =/ [=bloq =step] ?^(a a [a *step])
768+ =/ [=bloq =step] ?^(a a [a *step])
751− (div b (bex (mul (bex bloq) step)))
769+ (div b (bex (mul (bex bloq) step)))
752```
770```
753
771
754#### Examples
772#### Examples
755
773
756```
774```
757− > `@ub`145 :: @ub is the binary aura
775+> `@ub`145 :: @ub is the binary aura
758− 0b1001.0001
776+0b1001.0001
759−
760− > `@ub`(rsh [1 1] 145)
777+> `@ub`(rsh [1 1] 145)
761− 0b10.0100
778+0b10.0100
762−
763− > (rsh [1 1] 145)
779+> (rsh [1 1] 145)
764− 36
780+36
765−
766− > (rsh 1 145)
781+> (rsh 1 145)
767− 36
782+36
768−
769− > `@ub`(rsh [2 1] 145)
783+> `@ub`(rsh [2 1] 145)
770− 0b1001
784+0b1001
771−
772− > (rsh [2 1] 145)
785+> (rsh [2 1] 145)
773− 9
786+9
774−
787+```
775− > `@ub`10
776− 0b1010
777−
778− > `@ub`(rsh [0 1] 10)
779− 0b101
780−
781− > (rsh [0 1] 10)
782− 5
783−
784− > `@ux`'abc'
785− 0x63.6261
786
788
787− > `@t`(rsh [3 1] 'abc')
789+```
788− 'bc'
790+> `@ub`10
791+0b1010
792+> `@ub`(rsh [0 1] 10)
793+0b101
794+> (rsh [0 1] 10)
795+5
796+```
789
797
798+```
799+> `@ux`'abc'
800+0x63.6261
801+> `@t`(rsh [3 1] 'abc')
802+'bc'
790− > `@ux`(rsh [3 1] 'abc')
803+> `@ux`(rsh [3 1] 'abc')
791− 0x6362
804+0x6362
792```
805```
793
806
794---
807---
795
808
796−### `++run`
809+## `++run`
797
810
798`++turn` into atom.
811`++turn` into atom.
799
812
@@ -817,25 +830,24 @@ An atom.
817#### Source
830#### Source
818
831
819```hoon
832```hoon
820− ++ run
833+++ run
821− ~/ %run
834+ ~/ %run
822− |= [a=bite b=@ c=$-(@ @)]
835+ |= [a=bite b=@ c=$-(@ @)]
823− (rep a (turn (rip a b) c))
836+ (rep a (turn (rip a b) c))
824```
837```
825
838
826#### Examples
839#### Examples
827
840
828```
841```
829− > `@ux`65.535 :: @ux is the hexadecimal aura
842+ > `@ux`65.535 :: @ux is the hexadecimal aura
830 0xffff
843 0xffff
831−
832− > `@ux`(run 2 65.535 dec) :: dec is the decrement gate
844+ > `@ux`(run 2 65.535 dec) :: dec is the decrement gate
833 0xeeee
845 0xeeee
834```
846```
835
847
836---
848---
837
849
838−### `++rut`
850+## `++rut`
839
851
840`++turn` into list.
852`++turn` into list.
841
853
@@ -859,25 +871,80 @@ A list.
859#### Source
871#### Source
860
872
861```hoon
873```hoon
862− ++ rut
874+++ rut
863− ~/ %rut
875+ ~/ %rut
864− |* [a=bite b=@ c=$-(@ *)]
876+ |* [a=bite b=@ c=$-(@ *)]
865− (turn (rip a b) c)
877+ (turn (rip a b) c)
866```
878```
867
879
868#### Examples
880#### Examples
869
881
870```
882```
871− > `@ux`65.535 :: @ux is the hexadecimal aura
883+> `@ux`65.535 :: @ux is the hexadecimal aura
872− 0xffff
884+0xffff
885+> `(list @ux)`(rut 2 65.535 dec) :: dec is the decrement gate
886+~[0xe 0xe 0xe 0xe]
887+```
888+
889+---
890+
891+## `++sew`
892+
893+Stitch one atom into another
894+
895+Replace `c` blocks of size `a` at offset `b` of atom `e` with `c` blocks of size `a` from atom `d`.
896+
897+That is, take `(end [a c] d)` from `d` and overwrite the `(cut a [b c] e)` part of `e`.
898+
899+Or in simpler terms, take from the start of `d` and replace some part of `e` with it.
900+
901+#### Accepts
873
902
874− > `(list @ux)`(rut 2 65.535 dec) :: dec is the decrement gate
903+`a` is a [$bloq](/docs/hoon/reference/stdlib/1c#bite) (block size).
875− ~[0xe 0xe 0xe 0xe]
904+
905+`[b c d]` where:
906+
907+- `b` is a [step](/docs/hoon/reference/stdlib/1c#step) specifying the number of `bloq`s to offset.
908+- `b` is a [step](/docs/hoon/reference/stdlib/1c#step) specifying the number of `bloq`s to replace.
909+- `d` is the donor atom.
910+
911+`e` is the recipient atom.
912+
913+#### Produces
914+
915+An atom.
916+
917+#### Source
918+
919+```hoon
920+++ sew
921+ ~/ %sew
922+ |= [a=bloq [b=step c=step d=@] e=@]
923+ ^- @
924+ %+ add
925+ (can a b^e c^d ~)
926+ =/ f [a (add b c)]
927+ (lsh f (rsh f e))
928+```
929+
930+#### Examples
931+
932+```
933+> `@t`(sew 3 [0 0 'XXXX'] 'OOOO')
934+'OOOO'
935+> `@t`(sew 3 [0 1 'XXXX'] 'OOOO')
936+'XOOO'
937+> `@t`(sew 3 [2 1 'XXXX'] 'OOOO')
938+'OOXO'
939+> `@t`(sew 3 [2 2 'XXXX'] 'OOOO')
940+'OOXX'
941+> `@t`(sew 3 [0 4 'XXXX'] 'OOOO')
942+'XXXX'
876```
943```
877
944
878---
945---
879
946
880−### `++swp`
947+## `++swp`
881
948
882Reverse block order
949Reverse block order
883
950
@@ -886,7 +953,7 @@ reversing the block order of `b` using block size `a`.
886
953
887#### Accepts
954#### Accepts
888
955
889−`a` is a block size (see [`++bloq`](/docs/hoon/reference/stdlib/1c)).
956+`a` is a block size (see [`$bloq`](/docs/hoon/reference/stdlib/1c#bloq)).
890
957
891`b` is an atom.
958`b` is an atom.
892
959
@@ -897,31 +964,33 @@ An atom
897#### Source
964#### Source
898
965
899```hoon
966```hoon
967+++ swp
968+ ~/ %swp
969+ |= [a=bloq b=@]
900− ++ swp |=([a=bloq b=@] (rep a (flop (rip a b))))
970+ (rep a (flop (rip a b)))
901```
971```
902
972
903#### Examples
973#### Examples
904
974
905```
975```
906− > `@ub`24 :: @ub is the binary aura
976+> `@ub`24 :: @ub is the binary aura
907− 0b1.1000
977+0b1.1000
908−
909− > (swp 0 24)
978+> (swp 0 24)
910− 3
979+3
911−
912− > `@ub`3
980+> `@ub`3
913− 0b11
981+0b11
914−
982+```
915− > (swp 0 0)
916− 0
917
983
984+```
985+> (swp 0 0)
986+0
918− > (swp 0 128)
987+> (swp 0 128)
919− 1
988+1
920```
989```
921
990
922---
991---
923
992
924−### `++xeb`
993+## `++xeb`
925
994
926Binary logarithm
995Binary logarithm
927
996
@@ -938,38 +1007,48 @@ An atom.
938#### Source
1007#### Source
939
1008
940```hoon
1009```hoon
941− ++ xeb
1010+++ xeb
942− ~/ %xeb
1011+ ~/ %xeb
943− |= a=@
1012+ |= a=@
944− ^- @
1013+ ^- @
945− (met 0 a)
1014+ (met 0 a)
946```
1015```
947
1016
948#### Examples
1017#### Examples
949
1018
950```
1019```
951− > (xeb 31)
1020+> (xeb 31)
952− 5
1021+5
1022+```
953
1023
1024+```
954− > (xeb 32)
1025+> (xeb 32)
955− 6
1026+6
1027+```
956
1028
1029+```
957− > (xeb 49)
1030+> (xeb 49)
958− 6
1031+6
1032+```
959
1033
1034+```
960− > (xeb 0)
1035+> (xeb 0)
961− 0
1036+0
1037+```
962
1038
1039+```
963− > (xeb 1)
1040+> (xeb 1)
964− 1
1041+1
1042+```
965
1043
1044+```
966− > (xeb 2)
1045+> (xeb 2)
967− 2
1046+2
968```
1047```
969
1048
970---
1049---
971
1050
972−### `++fe`
1051+## `++fe`
973
1052
974Modulo bloq
1053Modulo bloq
975
1054
@@ -994,7 +1073,7 @@ representation.
994
1073
995#### Accepts
1074#### Accepts
996
1075
997−`a` is a `bloq`.
1076+`a` is a `bloq` (and is the sample of the parent core).
998
1077
999`b` is an atom.
1078`b` is an atom.
1000
1079
@@ -1002,40 +1081,40 @@ representation.
1002
1081
1003#### Produces
1082#### Produces
1004
1083
1005−A `@s`
1084+A `@s`.
1006
1085
1007#### Source
1086#### Source
1008
1087
1009```hoon
1088```hoon
1089+ ++ dif
1010− ++ dif |=([b=@ c=@] (sit (sub (add out (sit b)) (sit c))))
1090+ |=([b=@ c=@] (sit (sub (add out (sit b)) (sit c))))
1011```
1091```
1012
1092
1013#### Examples
1093#### Examples
1014
1094
1015```
1095```
1016− > (~(dif fe 3) 63 64)
1096+> (~(dif fe 3) 63 64)
1017− 255
1097+255
1018−
1019− > (~(dif fe 3) 5 10)
1098+> (~(dif fe 3) 5 10)
1020− 251
1099+251
1021−
1022− > (~(dif fe 3) 0 1)
1100+> (~(dif fe 3) 0 1)
1023− 255
1101+255
1024−
1102+```
1025− > (~(dif fe 0) 9 10)
1026− 1
1027−
1028− > (~(dif fe 0) 9 11)
1029− 0
1030−
1031− > (~(dif fe 0) 9 12)
1032− 1
1033
1103
1104+```
1034− > (~(dif fe 2) 9 12)
1105+> (~(dif fe 0) 9 10)
1035− 13
1106+1
1107+> (~(dif fe 0) 9 11)
1108+0
1109+> (~(dif fe 0) 9 12)
1110+1
1111+```
1036
1112
1113+```
1114+> (~(dif fe 2) 9 12)
1115+13
1037− > (~(dif fe 2) 63 64)
1116+> (~(dif fe 2) 63 64)
1038− 15
1117+15
1039```
1118```
1040
1119
1041---
1120---
@@ -1048,7 +1127,9 @@ Inverts the order of the modular field.
1048
1127
1049#### Accepts
1128#### Accepts
1050
1129
1130+`a` is a `bloq` (and is the sample of the parent core).
1131+
1051−`b` is a `bloq`. (see [`++bloq`](/docs/hoon/reference/stdlib/1c))
1132+`b` is a `bloq`. (see [`$bloq`](/docs/hoon/reference/stdlib/1c#bloq))
1052
1133
1053#### Produces
1134#### Produces
1054
1135
@@ -1057,29 +1138,30 @@ An atom.
1057#### Source
1138#### Source
1058
1139
1059```hoon
1140```hoon
1060− ++ inv |=(b=@ (sub (dec out) (sit b)))
1141+++ inv |=(b=@ (sub (dec out) (sit b)))
1061```
1142```
1062
1143
1063#### Examples
1144#### Examples
1064
1145
1065```
1146```
1066− > (~(inv fe 3) 255)
1147+> (~(inv fe 3) 255)
1067− 0
1148+0
1068−
1069− > (~(inv fe 3) 256)
1149+> (~(inv fe 3) 256)
1070− 255
1071−
1072− > (~(inv fe 3) 0)
1073− 255
1150+255
1074−
1151+```
1075− > (~(inv fe 3) 1)
1076− 254
1077
1152
1153+```
1154+> (~(inv fe 3) 0)
1155+255
1156+> (~(inv fe 3) 1)
1157+254
1078− > (~(inv fe 3) 2)
1158+> (~(inv fe 3) 2)
1079− 253
1159+253
1160+```
1080
1161
1162+```
1081− > (~(inv fe 3) 55)
1163+> (~(inv fe 3) 55)
1082− 200
1164+200
1083```
1165```
1084
1166
1085---
1167---
@@ -1092,7 +1174,9 @@ Reverses bytes within a block.
1092
1174
1093#### Accepts
1175#### Accepts
1094
1176
1177+`a` is a `bloq` (and the sample of the parent core).
1178+
1095−`b` is a `bloq`. (see [`++bloq`](/docs/hoon/reference/stdlib/1c))
1179+`b` is a `bloq`. (see [`$bloq`](/docs/hoon/reference/stdlib/1c#bloq))
1096
1180
1097#### Produces
1181#### Produces
1098
1182
@@ -1101,75 +1185,66 @@ An atom.
1101#### Source
1185#### Source
1102
1186
1103```hoon
1187```hoon
1104− ++ net |= b=@ ^- @
1188+++ net |= b=@ ^- @
1105− => .(b (sit b))
1189+ => .(b (sit b))
1106− ?: (lte a 3)
1190+ ?: (lte a 3)
1107− b
1191+ b
1108− =+ c=(dec a)
1192+ =+ c=(dec a)
1109− %+ con
1193+ %+ con
1110− (lsh c 1 $(a c, b (cut c [0 1] b)))
1194+ (lsh c $(a c, b (cut c [0 1] b)))
1111− $(a c, b (cut c [1 1] b))
1195+ $(a c, b (cut c [1 1] b))
1112```
1196```
1113
1197
1114#### Examples
1198#### Examples
1115
1199
1116```
1200```
1117− > (~(net fe 3) 64)
1201+> (~(net fe 3) 64)
1118− 64
1202+64
1119−
1120− > (~(net fe 3) 128)
1203+> (~(net fe 3) 128)
1121− 128
1204+128
1122−
1123− > (~(net fe 3) 255)
1205+> (~(net fe 3) 255)
1124− 255
1206+255
1125−
1126− > (~(net fe 3) 256)
1207+> (~(net fe 3) 256)
1127− 0
1208+0
1128−
1129− > (~(net fe 3) 257)
1209+> (~(net fe 3) 257)
1130− 1
1131−
1132− > (~(net fe 3) 500)
1133− 244
1134−
1135− > (~(net fe 3) 511)
1136− 255
1137−
1138− > (~(net fe 3) 512)
1139− 0
1140−
1141− > (~(net fe 3) 513)
1142− 1
1210+1
1143−
1211+```
1144− > (~(net fe 3) 0)
1145− 0
1146−
1147− > (~(net fe 3) 1)
1148− 1
1149−
1150− > (~(net fe 0) 1)
1151− 1
1152−
1153− > (~(net fe 0) 2)
1154− 0
1155−
1156− > (~(net fe 0) 3)
1157− 1
1158−
1159− > (~(net fe 6) 1)
1160− 72.057.594.037.927.936
1161−
1162− > (~(net fe 6) 2)
1163− 144.115.188.075.855.872
1164
1212
1213+```
1165− > (~(net fe 6) 3)
1214+> (~(net fe 3) 500)
1166− 216.172.782.113.783.808
1215+244
1216+> (~(net fe 3) 511)
1217+255
1218+> (~(net fe 3) 512)
1219+0
1220+> (~(net fe 3) 513)
1221+1
1222+```
1167
1223
1224+```
1225+> (~(net fe 3) 0)
1226+0
1227+> (~(net fe 3) 1)
1228+1
1229+> (~(net fe 0) 1)
1230+1
1168− > (~(net fe 6) 4)
1231+> (~(net fe 0) 2)
1169− 288.230.376.151.711.744
1232+0
1233+> (~(net fe 0) 3)
1234+1
1235+```
1170
1236
1237+```
1238+> (~(net fe 6) 1)
1239+72.057.594.037.927.936
1240+> (~(net fe 6) 2)
1241+144.115.188.075.855.872
1242+> (~(net fe 6) 3)
1243+216.172.782.113.783.808
1244+> (~(net fe 6) 4)
1245+288.230.376.151.711.744
1171− > (~(net fe 6) 5)
1246+> (~(net fe 6) 5)
1172− 360.287.970.189.639.680
1247+360.287.970.189.639.680
1173```
1248```
1174
1249
1175---
1250---
@@ -1182,7 +1257,7 @@ Produces the maximum integer value that the current block can store; `2^a^a`.
1182
1257
1183#### Accepts
1258#### Accepts
1184
1259
1185−`a` is a `bloq`.
1260+`a` is a `bloq` (and is the sample of the parent core).
1186
1261
1187#### Produces
1262#### Produces
1188
1263
@@ -1191,35 +1266,33 @@ An atom.
1191#### Source
1266#### Source
1192
1267
1193```hoon
1268```hoon
1194− ++ out (bex (bex a))
1269+++ out (bex (bex a))
1195```
1270```
1196
1271
1197#### Examples
1272#### Examples
1198
1273
1199```
1274```
1200− > ~(out fe 0)
1275+> ~(out fe 0)
1201− 2
1276+2
1202−
1203− > ~(out fe 1)
1277+> ~(out fe 1)
1204− 4
1278+4
1205−
1206− > ~(out fe 2)
1279+> ~(out fe 2)
1207− 16
1280+16
1208−
1209− > ~(out fe 3)
1281+> ~(out fe 3)
1210− 256
1282+256
1211−
1212− > ~(out fe 4)
1283+> ~(out fe 4)
1213− 65.536
1284+65.536
1285+```
1214
1286
1287+```
1215− > ~(out fe 10)
1288+> ~(out fe 10)
1216− \/179.769.313.486.231.590.772.930.519.078.902.473.361.797.697.894.230.657.273\/
1289+\/179.769.313.486.231.590.772.930.519.078.902.473.361.797.697.894.230.657.273\/
1217− .430.081.157.732.675.805.500.963.132.708.477.322.407.536.021.120.113.879.87
1290+ .430.081.157.732.675.805.500.963.132.708.477.322.407.536.021.120.113.879.87
1218− 1.393.357.658.789.768.814.416.622.492.847.430.639.474.124.377.767.893.424.8
1291+ 1.393.357.658.789.768.814.416.622.492.847.430.639.474.124.377.767.893.424.8
1219− 65.485.276.302.219.601.246.094.119.453.082.952.085.005.768.838.150.682.342.
1292+ 65.485.276.302.219.601.246.094.119.453.082.952.085.005.768.838.150.682.342.
1220− 462.881.473.913.110.540.827.237.163.350.510.684.586.298.239.947.245.938.479
1293+ 462.881.473.913.110.540.827.237.163.350.510.684.586.298.239.947.245.938.479
1221− .716.304.835.356.329.624.224.137.216
1294+ .716.304.835.356.329.624.224.137.216
1222− \/ \/
1295+\/ \/
1223```
1296```
1224
1297
1225---
1298---
@@ -1232,7 +1305,7 @@ Rolls `d` to the left by `c` `b`-sized blocks.
1232
1305
1233#### Accepts
1306#### Accepts
1234
1307
1235−`a` is a `bloq`.
1308+`a` is a `bloq` (and is the sample of the parent core).
1236
1309
1237`b` is a `bloq`.
1310`b` is a `bloq`.
1238
1311
@@ -1247,30 +1320,32 @@ An atom.
1247#### Source
1320#### Source
1248
1321
1249```hoon
1322```hoon
1250− ++ rol |= [b=bloq c=@ d=@] ^- @
1323+++ rol |= [b=bloq c=@ d=@] ^- @
1251− =+ e=(sit d)
1324+ =+ e=(sit d)
1252− =+ f=(bex (sub a b))
1325+ =+ f=(bex (sub a b))
1253− =+ g=(mod c f)
1326+ =+ g=(mod c f)
1254− (sit (con (lsh b g e) (rsh b (sub f g) e)))
1327+ (sit (con (lsh [b g] e) (rsh [b (sub f g)] e)))
1255```
1328```
1256
1329
1257#### Examples
1330#### Examples
1258
1331
1259```
1332```
1260− > `@ux`(~(rol fe 6) 4 3 0xabac.dedf.1213)
1333+> `@ux`(~(rol fe 6) 4 3 0xabac.dedf.1213)
1261− 0x1213.0000.abac.dedf
1334+0x1213.0000.abac.dedf
1262
1335
1263− > `@ux`(~(rol fe 6) 4 2 0xabac.dedf.1213)
1336+> `@ux`(~(rol fe 6) 4 2 0xabac.dedf.1213)
1264− 0xdedf.1213.0000.abac
1337+0xdedf.1213.0000.abac
1338+```
1265
1339
1340+```
1266− > `@t`(~(rol fe 5) 3 1 'dfgh')
1341+> `@t`(~(rol fe 5) 3 1 'dfgh')
1267− 'hdfg'
1342+'hdfg'
1268
1343
1269− > `@t`(~(rol fe 5) 3 2 'dfgh')
1344+> `@t`(~(rol fe 5) 3 2 'dfgh')
1270− 'ghdf'
1345+'ghdf'
1271
1346
1272− > `@t`(~(rol fe 5) 3 0 'dfgh')
1347+> `@t`(~(rol fe 5) 3 0 'dfgh')
1273− 'dfgh'
1348+'dfgh'
1274```
1349```
1275
1350
1276---
1351---
@@ -1283,7 +1358,7 @@ Rolls `d` to the right by `c` `b`-sized blocks.
1283
1358
1284#### Accepts
1359#### Accepts
1285
1360
1286−`a` is a `bloq`.
1361+`a` is a `bloq` (and is the sample of the parent core).
1287
1362
1288`b` is a `bloq`.
1363`b` is a `bloq`.
1289
1364
@@ -1298,49 +1373,53 @@ An atom.
1298#### Source
1373#### Source
1299
1374
1300```hoon
1375```hoon
1301− ++ ror |= [b=bloq c=@ d=@] ^- @
1376+++ ror |= [b=bloq c=@ d=@] ^- @
1302− =+ e=(sit d)
1377+ =+ e=(sit d)
1303− =+ f=(bex (sub a b))
1378+ =+ f=(bex (sub a b))
1304− =+ g=(mod c f)
1379+ =+ g=(mod c f)
1305− (sit (con (rsh b g e) (lsh b (sub f g) e)))
1380+ (sit (con (rsh [b g] e) (lsh [b (sub f g)] e)))
1306```
1381```
1307
1382
1308#### Examples
1383#### Examples
1309
1384
1310```
1385```
1311− > `@ux`(~(ror fe 6) 4 1 0xabac.dedf.1213)
1386+> `@ux`(~(ror fe 6) 4 1 0xabac.dedf.1213)
1312− 0x1213.0000.abac.dedf
1387+0x1213.0000.abac.dedf
1313
1388
1314− > `@ux`(~(ror fe 6) 3 5 0xabac.dedf.1213)
1389+> `@ux`(~(ror fe 6) 3 5 0xabac.dedf.1213)
1315− 0xacde.df12.1300.00ab
1390+0xacde.df12.1300.00ab
1316
1391
1317− > `@ux`(~(ror fe 6) 3 3 0xabac.dedf.1213)
1392+> `@ux`(~(ror fe 6) 3 3 0xabac.dedf.1213)
1318− 0xdf12.1300.00ab.acde
1393+0xdf12.1300.00ab.acde
1394+```
1319
1395
1396+```
1320− > `@t`(~(rol fe 5) 3 0 'hijk')
1397+> `@t`(~(rol fe 5) 3 0 'hijk')
1321− 'hijk'
1398+'hijk'
1322
1399
1323− > `@t`(~(rol fe 5) 3 1 'hijk')
1400+> `@t`(~(rol fe 5) 3 1 'hijk')
1324− 'khij'
1401+'khij'
1325
1402
1326− > `@t`(~(rol fe 5) 3 2 'hijk')
1403+> `@t`(~(rol fe 5) 3 2 'hijk')
1327− 'jkhi'
1404+'jkhi'
1328```
1405```
1329
1406
1330---
1407---
1331
1408
1332−### `++sit:fe`
1409+### `++sum:fe`
1333
1410
1334−Enforce modulo
1411+Sum
1335
1412
1336−Produces an atom in the current modular block representation.
1413+Sums two numbers in this modular field.
1337
1414
1338#### Accepts
1415#### Accepts
1339
1416
1340−`a` is a `bloq`.
1417+`a` is a `bloq` (and is the sample of the parent core).
1341
1418
1342`b` is an atom.
1419`b` is an atom.
1343
1420
1421+`c` is an atom.
1422+
1344#### Produces
1423#### Produces
1345
1424
1346An atom.
1425An atom.
@@ -1348,62 +1427,51 @@ An atom.
1348#### Source
1427#### Source
1349
1428
1350```hoon
1429```hoon
1351− ++ sit |=(b=@ (end a 1 b))
1430+++ sum |=([b=@ c=@] (sit (add b c)))
1352```
1431```
1353
1432
1354#### Examples
1433#### Examples
1355
1434
1356```
1435```
1357− > (~(sit fe 3) 255)
1436+> (~(sum fe 3) 10 250)
1358− 255
1359−
1360− > (~(sit fe 3) 256)
1361− 0
1362−
1363− > (~(sit fe 3) 257)
1364− 1
1365−
1366− > (~(sit fe 2) 257)
1367− 1
1368−
1369− > (~(sit fe 2) 10.000)
1370− 0
1371−
1372− > (~(sit fe 2) 100)
1373− 4
1437+4
1374−
1438+```
1375− > (~(sit fe 2) 19)
1376− 3
1377−
1378− > (~(sit fe 2) 17)
1379− 1
1380
1439
1381− > (~(sit fe 0) 17)
1440+```
1441+> (~(sum fe 0) 0 1)
1382− 1
1442+1
1443+> (~(sum fe 0) 0 2)
1444+0
1445+```
1383
1446
1384− > (~(sit fe 0) 0)
1447+```
1448+> (~(sum fe 2) 14 2)
1385− 0
1449+0
1450+> (~(sum fe 2) 14 3)
1451+1
1452+```
1386
1453
1387− > (~(sit fe 0) 1)
1454+```
1388− 1
1455+> (~(sum fe 4) 10.000 256)
1456+10.256
1457+> (~(sum fe 4) 10.000 100.000)
1458+44.464
1389```
1459```
1390
1460
1391---
1461---
1392
1462
1393−### `++sum:fe`
1463+### `++sit:fe`
1394
1464
1395−Sum
1465+Enforce modulo
1396
1466
1397−Sums two numbers in this modular field.
1467+Produces an atom in the current modular block representation.
1398
1468
1399#### Accepts
1469#### Accepts
1400
1470
1401−`a` is a `bloq`.
1471+`a` is a `bloq` (and is the sample of the parent core).
1402
1472
1403`b` is an atom.
1473`b` is an atom.
1404
1474
1405−`c` is an atom.
1406−
1407#### Produces
1475#### Produces
1408
1476
1409An atom.
1477An atom.
@@ -1411,32 +1479,40 @@ An atom.
1411#### Source
1479#### Source
1412
1480
1413```hoon
1481```hoon
1414− ++ sum |=([b=@ c=@] (sit (add b c)))
1482+++ sit |=(b=@ (end a b))
1415```
1483```
1416
1484
1417#### Examples
1485#### Examples
1418
1486
1419```
1487```
1420− > (~(sum fe 3) 10 250)
1488+> (~(sit fe 3) 255)
1421− 4
1489+255
1422−
1490+> (~(sit fe 3) 256)
1423− > (~(sum fe 0) 0 1)
1424− 1
1425−
1426− > (~(sum fe 0) 0 2)
1427− 0
1491+0
1428−
1492+> (~(sit fe 3) 257)
1429− > (~(sum fe 2) 14 2)
1493+1
1430− 0
1494+```
1431−
1432− > (~(sum fe 2) 14 3)
1433− 1
1434
1495
1496+```
1497+> (~(sit fe 2) 257)
1498+1
1435− > (~(sum fe 4) 10.000 256)
1499+> (~(sit fe 2) 10.000)
1436− 10.256
1500+0
1501+> (~(sit fe 2) 100)
1502+4
1503+> (~(sit fe 2) 19)
1504+3
1505+> (~(sit fe 2) 17)
1506+1
1507+```
1437
1508
1438− > (~(sum fe 4) 10.000 100.000)
1509+```
1439− 44.464
1510+> (~(sit fe 0) 17)
1511+1
1512+> (~(sit fe 0) 0)
1513+0
1514+> (~(sit fe 0) 1)
1515+1
1440```
1516```
1441
1517
1442---
1518---
content/docs/hoon/reference/stdlib/2d.md+55−54
@@ -4,7 +4,7 @@ weight = 7
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++con`
7+## `++con`
8
8
9Binary OR
9Binary OR
10
10
@@ -23,22 +23,22 @@ An atom.
23#### Source
23#### Source
24
24
25```hoon
25```hoon
26− ++ con
26+++ con
27− ~/ %con
27+ ~/ %con
28− |= [a=@ b=@]
28+ |= [a=@ b=@]
29− =+ [c=0 d=0]
29+ =+ [c=0 d=0]
30− |- ^- @
30+ |- ^- @
31− ?: ?&(=(0 a) =(0 b)) d
31+ ?: ?&(=(0 a) =(0 b)) d
32− %= $
32+ %= $
33− a (rsh 0 1 a)
33+ a (rsh 0 a)
34− b (rsh 0 1 b)
34+ b (rsh 0 b)
35− c +(c)
35+ c +(c)
36− d %+ add d
36+ d %+ add d
37− %^ lsh 0 c
37+ %+ lsh [0 c]
38− ?& =(0 (end 0 1 a))
38+ ?& =(0 (end 0 a))
39− =(0 (end 0 1 b))
39+ =(0 (end 0 b))
40− ==
40+ ==
41− ==
41+ ==
42```
42```
43
43
44#### Examples
44#### Examples
@@ -97,9 +97,9 @@ contexts. That's because `0` is true in Hoon and `1` is false. Outside of Hoon,
97where `0` is false and `1` is true, bitwise OR is the logical disjunction and
97where `0` is false and `1` is true, bitwise OR is the logical disjunction and
98bitwise AND is the logical conjunction.
98bitwise AND is the logical conjunction.
99
99
100−
101---
100---
101+
102−### `++dis`
102+## `++dis`
103
103
104Binary AND
104Binary AND
105
105
@@ -118,22 +118,22 @@ An atom.
118#### Source
118#### Source
119
119
120```hoon
120```hoon
121− ++ dis
121+++ dis
122− ~/ %dis
122+ ~/ %dis
123− |= [a=@ b=@]
123+ |= [a=@ b=@]
124− =| [c=@ d=@]
124+ =| [c=@ d=@]
125− |- ^- @
125+ |- ^- @
126− ?: ?|(=(0 a) =(0 b)) d
126+ ?: ?|(=(0 a) =(0 b)) d
127− %= $
127+ %= $
128− a (rsh 0 1 a)
128+ a (rsh 0 a)
129− b (rsh 0 1 b)
129+ b (rsh 0 b)
130− c +(c)
130+ c +(c)
131− d %+ add d
131+ d %+ add d
132− %^ lsh 0 c
132+ %+ lsh [0 c]
133− ?| =(0 (end 0 1 a))
133+ ?| =(0 (end 0 a))
134− =(0 (end 0 1 b))
134+ =(0 (end 0 b))
135− ==
135+ ==
136− ==
136+ ==
137```
137```
138
138
139#### Examples
139#### Examples
@@ -187,7 +187,8 @@ where `0` is false and `1` is true, bitwise OR is the logical disjunction and
187bitwise AND is the logical conjunction.
187bitwise AND is the logical conjunction.
188
188
189---
189---
190+
190−### `++mix`
191+## `++mix`
191
192
192Binary XOR
193Binary XOR
193
194
@@ -206,19 +207,19 @@ An atom.
206#### Source
207#### Source
207
208
208```hoon
209```hoon
209− ++ mix
210+++ mix
210− ~/ %mix
211+ ~/ %mix
211− |= [a=@ b=@]
212+ |= [a=@ b=@]
212− ^- @
213+ ^- @
213− =+ [c=0 d=0]
214+ =+ [c=0 d=0]
214− |-
215+ |-
215− ?: ?&(=(0 a) =(0 b)) d
216+ ?: ?&(=(0 a) =(0 b)) d
216− %= $
217+ %= $
217− a (rsh 0 1 a)
218+ a (rsh 0 a)
218− b (rsh 0 1 b)
219+ b (rsh 0 b)
219− c +(c)
220+ c +(c)
220− d (add d (lsh 0 c =((end 0 1 a) (end 0 1 b))))
221+ d (add d (lsh [0 c] =((end 0 a) (end 0 b))))
221− ==
222+ ==
222```
223```
223
224
224#### Examples
225#### Examples
@@ -272,7 +273,8 @@ its samples and its product are stacked.
272```
273```
273
274
274---
275---
276+
275−### `++not`
277+## `++not`
276
278
277Binary NOT
279Binary NOT
278
280
@@ -294,8 +296,8 @@ An atom.
294#### Source
296#### Source
295
297
296```hoon
298```hoon
297− ++ not |= [a=bloq b=@ c=@]
299+++ not |= [a=bloq b=@ c=@]
298− (mix c (dec (bex (mul b (bex a)))))
300+ (mix c (dec (bex (mul b (bex a)))))
299```
301```
300
302
301#### Examples
303#### Examples
@@ -369,5 +371,4 @@ What's happening here may not be readily apparent. But we're only flipping the
369last block of size `1` (bitwidth 2) of the binary `0b111`. That is, we leave
371last block of size `1` (bitwidth 2) of the binary `0b111`. That is, we leave
370the "0b1" piece just the same and manipulate the "11" that the number ends with.
372the "0b1" piece just the same and manipulate the "11" that the number ends with.
371
373
372−
373−---
374+---
content/docs/hoon/reference/stdlib/2e.md+98−178
@@ -4,44 +4,7 @@ weight = 8
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++fnv`
8−
9−FNV scrambler
10−
11−Hashes an atom with the 32-bit FNV non-cryptographic hash algorithm. Multiplies
12−`a` by the prime number 16,777,619 and then takes the [block](/docs/hoon/reference/stdlib/2c) of size
13−5 off the product's end, producing an atom.
14−
15−#### Accepts
16−
17−`a` is an atom.
18−
19−#### Produces
20−
21−An atom.
22−
23−#### Source
24−
25−```hoon
26− ++ fnv |=(a=@ (end 5 1 (mul 16.777.619 a)))
27−```
28−
29−#### Examples
30−
31−```
32− > (fnv 10.000)
33− 272.465.456
34−
35− > (fnv 10.001)
36− 289.243.075
37−
38− > (fnv 1)
39− 16.777.619
40−```
41−
42−
43−---
44−### `++mug` {#mug}
7+## `++mug` {#mug}
45
8
46murmur3 scrambler
9murmur3 scrambler
47
10
@@ -59,57 +22,70 @@ An atom.
59#### Source
22#### Source
60
23
61```hoon
24```hoon
62−++ mug :: mug with murmur3
25+++ mug
63 ~/ %mug
26 ~/ %mug
64− |= a/*
27+ |= a=*
65− |^ (trim ?@(a a (mix $(a -.a) (mix 0x7fff.ffff $(a +.a)))))
28+ |^ ?@ a (mum 0xcafe.babe 0x7fff a)
66− ++ trim :: 31-bit nonzero
29+ =/ b (cat 5 $(a -.a) $(a +.a))
30+ (mum 0xdead.beef 0xfffe b)
31+ ::
32+ ++ mum
33+ |= [syd=@uxF fal=@F key=@]
67− |= key/@
34+ =/ wyd (met 3 key)
68− =+ syd=0xcafe.babe
35+ =| i=@ud
69− |- ^- @
36+ |- ^- @F
37+ ?: =(8 i) fal
70− =+ haz=(muk syd (met 3 key) key)
38+ =/ haz=@F (muk syd wyd key)
71− =+ ham=(mix (rsh 0 31 haz) (end 0 31 haz))
39+ =/ ham=@F (mix (rsh [0 31] haz) (end [0 31] haz))
72− ?.(=(0 ham) ham $(syd +(syd)))
40+ ?.(=(0 ham) ham $(i +(i), syd +(syd)))
73 --
41 --
74```
42```
75
43
76#### Examples
44#### Examples
77
45
78```
46```
79− > (mug 10.000)
47+> (mug 10.000)
80− 795.713.195
48+795.713.195
81−
49+```
82− > (mug 10.001)
83− 420.521.697
84
50
51+```
85− > (mug 1)
52+> (mug 10.001)
86− 1.901.865.568
53+420.521.697
54+```
87
55
56+```
88− > (mug (some 10))
57+> (mug 1)
89− 2.099.076.946
58+1.901.865.568
59+```
90
60
91− > (mug [1 2 3 4 5 ~])
61+```
92− 1.719.833.228
62+> (mug (some 10))
63+750.200.080
93```
64```
94
65
66+```
67+> (mug [1 2 3 4 5 ~])
68+1.565.443.491
69+```
95
70
96---
71---
72+
97−### `++muk`
73+## `++muk`
98
74
99Standard MurmurHash3
75Standard MurmurHash3
100
76
101Implementation of the 32-bit
77Implementation of the 32-bit
102[MurmurHash3](https://en.wikipedia.org/wiki/MurmurHash#Algorithm)
78[MurmurHash3](https://en.wikipedia.org/wiki/MurmurHash#Algorithm)
103−non-cryptographic hash algorithm. Takes `a` as the seed, `b` as the key length
79+non-cryptographic hash algorithm. Takes `syd` as the seed, `len` as the key length
104−in [blocks](/docs/hoon/reference/stdlib/2c) of size 3, and `c` as the key, producing an atom.
80+in [blocks](/docs/hoon/reference/stdlib/2c) of size 3, and `key` as the key, producing an atom.
105
81
106#### Accepts
82#### Accepts
107
83
108−`a` is an atom.
84+`syd` is an atom.
109
85
110−`b` is an atom.
86+`len` is an atom.
111
87
112−`c` is an atom.
88+`key` is an atom.
113
89
114#### Produces
90#### Produces
115
91
@@ -118,63 +94,63 @@ An atom.
118#### Source
94#### Source
119
95
120```hoon
96```hoon
121− ++ muk
97+++ muk :: standard murmur3
122− ~% %muk ..muk ~
98+ ~% %muk ..muk ~
123− =+ ~(. fe 5)
99+ =+ ~(. fe 5)
124− |= [syd=@ len=@ key=@]
100+ |= [syd=@ len=@ key=@]
125− ?> &((lte (met 5 syd) 1) (lte (met 0 len) 31))
101+ =. syd (end 5 syd)
126− =/ pad (sub len (met 3 key))
102+ =/ pad (sub len (met 3 key))
127− =/ data (weld (rip 3 key) (reap pad 0))
103+ =/ data (weld (rip 3 key) (reap pad 0))
128− =/ nblocks (div len 4) :: intentionally off-by-one
104+ =/ nblocks (div len 4) :: intentionally off-by-one
129− =/ h1 syd
105+ =/ h1 syd
130− =+ [c1=0xcc9e.2d51 c2=0x1b87.3593]
106+ =+ [c1=0xcc9e.2d51 c2=0x1b87.3593]
131− =/ blocks (rip 5 key)
107+ =/ blocks (rip 5 key)
132− =/ i nblocks
108+ =/ i nblocks
133− =. h1 =/ hi h1 |-
109+ =. h1 =/ hi h1 |-
110+ ?: =(0 i) hi
134− ?: =(0 i) hi :: negative array index
111+ =/ k1 (snag (sub nblocks i) blocks) :: negative array index
135− =/ k1 (snag (sub nblocks i) blocks)
136− =. k1 (sit (mul k1 c1))
112+ =. k1 (sit (mul k1 c1))
137− =. k1 (rol 0 15 k1)
113+ =. k1 (rol 0 15 k1)
138− =. k1 (sit (mul k1 c2))
114+ =. k1 (sit (mul k1 c2))
139− =. hi (mix hi k1)
115+ =. hi (mix hi k1)
140− =. hi (rol 0 13 hi)
116+ =. hi (rol 0 13 hi)
141− =. hi (sum (sit (mul hi 5)) 0xe654.6b64)
117+ =. hi (sum (sit (mul hi 5)) 0xe654.6b64)
142− $(i (dec i))
118+ $(i (dec i))
143− =/ tail (slag (mul 4 nblocks) data)
119+ =/ tail (slag (mul 4 nblocks) data)
144− =/ k1 0
120+ =/ k1 0
145− =/ tlen (dis len 3)
121+ =/ tlen (dis len 3)
146− =. h1
122+ =. h1
147− ?+ tlen h1 :: fallthrough switch
123+ ?+ tlen h1 :: fallthrough switch
148− $3 =. k1 (mix k1 (lsh 0 16 (snag 2 tail)))
124+ %3 =. k1 (mix k1 (lsh [0 16] (snag 2 tail)))
149− =. k1 (mix k1 (lsh 0 8 (snag 1 tail)))
125+ =. k1 (mix k1 (lsh [0 8] (snag 1 tail)))
150− =. k1 (mix k1 (snag 0 tail))
126+ =. k1 (mix k1 (snag 0 tail))
151− =. k1 (sit (mul k1 c1))
127+ =. k1 (sit (mul k1 c1))
152− =. k1 (rol 0 15 k1)
128+ =. k1 (rol 0 15 k1)
153− =. k1 (sit (mul k1 c2))
129+ =. k1 (sit (mul k1 c2))
154− (mix h1 k1)
130+ (mix h1 k1)
155− $2 =. k1 (mix k1 (lsh 0 8 (snag 1 tail)))
131+ %2 =. k1 (mix k1 (lsh [0 8] (snag 1 tail)))
156− =. k1 (mix k1 (snag 0 tail))
132+ =. k1 (mix k1 (snag 0 tail))
157− =. k1 (sit (mul k1 c1))
133+ =. k1 (sit (mul k1 c1))
158− =. k1 (rol 0 15 k1)
134+ =. k1 (rol 0 15 k1)
159− =. k1 (sit (mul k1 c2))
135+ =. k1 (sit (mul k1 c2))
160− (mix h1 k1)
136+ (mix h1 k1)
161− $1 =. k1 (mix k1 (snag 0 tail))
137+ %1 =. k1 (mix k1 (snag 0 tail))
162− =. k1 (sit (mul k1 c1))
138+ =. k1 (sit (mul k1 c1))
163− =. k1 (rol 0 15 k1)
139+ =. k1 (rol 0 15 k1)
164− =. k1 (sit (mul k1 c2))
140+ =. k1 (sit (mul k1 c2))
165− (mix h1 k1)
141+ (mix h1 k1)
166− ==
142+ ==
167− =. h1 (mix h1 len)
143+ =. h1 (mix h1 len)
168− |^ (fmix32 h1)
144+ |^ (fmix32 h1)
169− ++ fmix32
145+ ++ fmix32
170− |= h=@
146+ |= h=@
171− =. h (mix h (rsh 0 16 h))
147+ =. h (mix h (rsh [0 16] h))
172− =. h (sit (mul h 0x85eb.ca6b))
148+ =. h (sit (mul h 0x85eb.ca6b))
173− =. h (mix h (rsh 0 13 h))
149+ =. h (mix h (rsh [0 13] h))
174− =. h (sit (mul h 0xc2b2.ae35))
150+ =. h (sit (mul h 0xc2b2.ae35))
175− =. h (mix h (rsh 0 16 h))
151+ =. h (mix h (rsh [0 16] h))
176− h
152+ h
177− --
153+ --
178```
154```
179
155
180#### Examples
156#### Examples
@@ -209,60 +185,4 @@ An atom.
209 246.077.549
185 246.077.549
210```
186```
211
187
212−
213−---
214−### `++mum`
215−
216−31-bit MurmurHash3 scrambler
217−
218−Hashes `a` with the 31-bit MurmurHash3 non-cryptographic hash algorithm,
219−producing an atom.
220−
221−#### Accepts
222−
223−`a` is a noun.
224−
225−#### Produces
226−
227−An atom.
228−
229−#### Source
230−
231−```hoon
232− ++ mum
233− ~/ %mum
234− |= a=*
235− |^ (trim ?@(a a (mix $(a -.a) (mix 0x7fff.ffff $(a +.a)))))
236− ++ trim
237− |= key=@
238− =+ syd=0xcafe.babe
239− |- ^- @
240− =+ haz=(muk syd (met 3 key) key)
241− =+ ham=(mix (rsh 0 31 haz) (end 0 31 haz))
242− ?.(=(0 ham) ham $(syd +(syd)))
243−```
244−
245−#### Examples
246−
247−```
248− > (mum 10.000)
249− 795.713.195
250−
251− > (mum 10.001)
252− 420.521.697
253−
254− > (mum 'jerry')
255− 1.540.161.753
256−
257− > (mum 1)
258− 1.901.865.568
259−
260− > (mum (some 10))
261− 2.099.076.946
262−
263− > (mum [1 2 3 4 5 ~])
264− 1.719.833.228
265−```
266−
267−
268---
188---
content/docs/hoon/reference/stdlib/2f.md+163−285
@@ -4,11 +4,11 @@ weight = 9
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++aor`
7+## `++aor`
8
8
9Alphabetical order
9Alphabetical order
10
10
11−Computes whether `a` and `b` are in alphabetical order, producing a flag.
11+Computes whether `a` and `b` are in alphabetical order, producing a flag. Orders atoms before cells, and atoms in ascending LSB order.
12
12
13#### Accepts
13#### Accepts
14
14
@@ -23,62 +23,85 @@ A flag.
23#### Source
23#### Source
24
24
25```hoon
25```hoon
26− ++ aor
26+++ aor
27− ~/ %aor
27+ ~/ %aor
28− |= [a=* b=*]
28+ |= [a=* b=*]
29− ^- ?
29+ ^- ?
30− ?: =(a b) &
30+ ?: =(a b) &
31− ?. ?=(@ a)
31+ ?. ?=(@ a)
32− ?: ?=(@ b) |
32+ ?: ?=(@ b) |
33− ?: =(-.a -.b)
33+ ?: =(-.a -.b)
34− $(a +.a, b +.b)
34+ $(a +.a, b +.b)
35− $(a -.a, b -.b)
35+ $(a -.a, b -.b)
36− ?. ?=(@ b) &
36+ ?. ?=(@ b) &
37− |-
37+ |-
38− =+ [c=(end 3 1 a) d=(end 3 1 b)]
38+ =+ [c=(end 3 a) d=(end 3 b)]
39− ?: =(c d)
39+ ?: =(c d)
40− $(a (rsh 3 1 a), b (rsh 3 1 b))
40+ $(a (rsh 3 a), b (rsh 3 b))
41− (lth c d)
41+ (lth c d)
42```
42```
43
43
44#### Examples
44#### Examples
45
45
46```
46```
47− > (aor 'a' 'b')
47+> (aor 'a' 'b')
48− %.y
48+%.y
49−
49+> (aor 'b' 'a')
50− > (aor 'b' 'a')
50+%.n
51− %.n
51+> (aor 'a' 'a')
52−
52+%.y
53− > (aor 'a' 'a')
53+
54− %.y
54+> (aor 1 2)
55−
55+%.y
56− > (aor "foo" "bar")
56+> (aor 2 1)
57− %.n
57+%.n
58−
58+
59− > (aor "bar" "foo")
59+> (aor ['a' ~] 'b')
60− %.y
60+%.n
61+> (aor 'b' ['a' ~])
62+%.y
63+
64+> (aor ['a' ~] ['b' ~])
65+%.y
66+> (aor ['b' ~] ['a' ~])
67+%.n
68+
69+> (aor "abca" "abcz")
70+%.y
71+> (aor "abcz" "abca")
72+%.n
73+
74+> (aor 0b1011 0b1010)
75+%.n
76+> (aor 0b1010 0b1011)
77+%.y
78+
79+> (aor [1 2] [2 1])
80+%.y
81+> (aor [2 1] [1 2])
82+%.n
83+```
61
84
62− > (aor "abcdefz" "abcdefa")
85+Note the possible differences with `+dor` due to comparing one byte at a time:
63− %.n
64
86
65− > (aor "abcdefa" "abcdefz")
66− %.y
67−
68− > (aor 10.000 17.000)
69− %.y
70−
71− > (aor 10 9)
72− %.n
73```
87```
88+> (aor 0b1001.0000.0000 0b1000.1000.0000)
89+%.y
90+> (dor 0b1001.0000.0000 0b1000.1000.0000)
91+%.n
92+```
93+
94+#### Discussion
74
95
96+This is different than [+dor](#dor) in that it compares atoms one byte at a time, while `+dor` compares whole atoms at once. Note that because it simply compares bytes, it doesn't account for multi-byte UTF-8 characters and the like.
75
97
76---
98---
77−### `++dor`
78
99
79−Numeric order
100+## `++dor`
101+
102+Depth order
80
103
81−Computes whether `a` and `b` are in ascending numeric order, producing a flag.
104+Computes whether `a` and `b` are in ascending tree depth order, producing a flag. Orders atoms before cells, and atoms in ascending numerical order.
82
105
83#### Accepts
106#### Accepts
84
107
@@ -93,62 +116,71 @@ A flag.
93#### Source
116#### Source
94
117
95```hoon
118```hoon
96− ++ dor
119+++ dor
97− ~/ %dor
120+ ~/ %dor
98− |= [a=* b=*]
121+ |= [a=* b=*]
99− ^- ?
122+ ^- ?
100− ?: =(a b) &
123+ ?: =(a b) &
101− ?. ?=(@ a)
124+ ?. ?=(@ a)
102− ?: ?=(@ b) |
125+ ?: ?=(@ b) |
103− ?: =(-.a -.b)
126+ ?: =(-.a -.b)
104− $(a +.a, b +.b)
127+ $(a +.a, b +.b)
105− $(a -.a, b -.b)
128+ $(a -.a, b -.b)
106− ?. ?=(@ b) &
129+ ?. ?=(@ b) &
107− (lth a b)
130+ (lth a b)
108```
131```
109
132
110#### Examples
133#### Examples
111
134
112```
135```
113− > (dor 1 2)
136+> (dor 1 2)
114− %.y
137+%.y
115
138
116− > (dor 2 1)
139+> (dor 2 1)
117− %.n
140+%.n
118
141
119− > (dor ~[1 2 3] ~[1 2 4])
142+> (dor ~[1 2 3] ~[1 2 4])
120− %.y
143+%.y
121
144
122− > (dor ~[1 2 4] ~[1 2 3])
145+> (dor ~[1 2 4] ~[1 2 3])
123− %.n
146+%.n
124
147
125− > (dor `(list @)`~[99 100 10.000] ~[99 101 10.000])
148+> (dor `(list @)`~[99 100 10.000] ~[99 101 10.000])
126− %.y
149+%.y
127
150
128− > (dor ~[99 101 10.999] `(list @)`~[99 100 10.000])
151+> (dor ~[99 101 10.999] `(list @)`~[99 100 10.000])
129− %.n
152+%.n
153+```
154+
155+Note the possible difference with [+aor](#aor) due to comparing whole atoms rather than one byte at a time:
156+
157+```
158+> (aor 0b1001.0000.0000 0b1000.1000.0000)
159+%.y
160+> (dor 0b1001.0000.0000 0b1000.1000.0000)
161+%.n
130```
162```
131
163
132#### Discussion
164#### Discussion
133
165
134−If `a` and `b` are both atoms, `dor` is equivalent to [`lte`](/docs/hoon/reference/stdlib/1a). If they're
166+If `a` and `b` are both atoms, `dor` is equivalent to [`lte`](/docs/hoon/reference/stdlib/1a#lte). If they're
135cells, `dor` recurses on the heads, and then if the heads are the same it checks
167cells, `dor` recurses on the heads, and then if the heads are the same it checks
136the tails.
168the tails.
137
169
138If one sample is a cell and the other is an atom, the cell sample is treated as
170If one sample is a cell and the other is an atom, the cell sample is treated as
139"greater."
171"greater."
140
172
141−
142---
173---
143−### `++gor`
144
174
145−Hash order
175+## `++gor`
176+
177+Mug order
146
178
147Computes whether of `(mug a)` and `(mug b)` are in ascending numeric order,
179Computes whether of `(mug a)` and `(mug b)` are in ascending numeric order,
148producing a flag. If the `mug` hashes are equal, `a` and `b` are compared by
180producing a flag. If the `mug` hashes are equal, `a` and `b` are compared by
149`dor` instead.
181`dor` instead.
150
182
151−[`mug`](/docs/hoon/reference/stdlib/2e) is the the 31-bit nonzero FNV-1a hash algorithm.
183+[`mug`](/docs/hoon/reference/stdlib/2e#mug) is the the 31-bit nonzero FNV-1a hash algorithm.
152
184
153#### Accepts
185#### Accepts
154
186
@@ -163,223 +195,70 @@ A flag.
163#### Source
195#### Source
164
196
165```hoon
197```hoon
166− ++ gor
198+++ gor
167− ~/ %gor
199+ ~/ %gor
168− |= [a=* b=*]
200+ |= [a=* b=*]
169− ^- ?
201+ ^- ?
170− =+ [c=(mug a) d=(mug b)]
202+ =+ [c=(mug a) d=(mug b)]
171− ?: =(c d)
203+ ?: =(c d)
172− (dor a b)
204+ (dor a b)
173− (lth c d)
205+ (lth c d)
174```
206```
175
207
176#### Examples
208#### Examples
177
209
178```
210```
179− > (gor 'd' 'c')
211+> (gor 'd' 'c')
180− %.y
212+%.y
181−
213+
182− > 'd'
214+> 'd'
183− 'd'
215+'d'
184−
216+> 'c'
185− > 'c'
217+'c'
186− 'c'
218+
187−
219+> `@ud`'d'
188− > `@ud`'d'
220+100
189− 100
221+> `@ud`'c'
190−
222+99
191− > `@ud`'c'
223+
192− 99
224+> (mug 'd')
193−
225+1.628.185.714
194− > (mug 'd')
226+> (mug 'c')
195− 1.628.185.714
227+1.712.073.811
196−
228+
197− > (mug 'c')
229+> (gor 'd' 'c')
198− 1.712.073.811
230+%.y
199−
231+> (gor 'c' 'd')
200− > (gor 'd' 'c')
232+%.n
201− %.y
202−
203− > (gor 'c' 'd')
204− %.n
205−
206− > (gor "foo" "bar")
207− %.n
208−
209− > (gor (some 10) `(list @)`[1 2 3 ~])
210− %.n
211−```
212−
213−#### Discussion
214−
215−`map`s use `gor` on the key for horizontal ordering and `vor` for
216−vertical order. `map`s only look at the keys (the head of the key-value pair
217−elements) for ordering.
218−
219−---
220−### `++hor`
221−
222−Horizontal hash order
223−
224−If `a` and `b` are atoms, they are computed as samples of `gor`, producing a
225−flag.
226−
227−If `a` and `b` are cells, `hor` checks to see if their heads are equal. If their
228−heads are equal, `gor` is computed on their tails, producing a flag. If their
229−heads are not equal, `gor` is computed on their heads, producing a flag.
230−
231−If `a` is an atom and `b` is not, then `%.y` is produced. If `b` is an atom and
232−`a` is not, `%.n` is produced.
233−
234−#### Accepts
235−
236−`a` is a noun.
237−
238−`b` is a noun.
239−
240−#### Produces
241−
242−A flag.
243−
244−#### Source
245−
246−```hoon
247− ++ hor
248− ~/ %hor
249− |= [a=* b=*]
250− ^- ?
251− ?: ?=(@ a)
252− ?. ?=(@ b) &
253− (gor a b)
254− ?: ?=(@ b) |
255− ?: =(-.a -.b)
256− (gor +.a +.b)
257− (gor -.a -.b)
258−```
259−
260−#### Examples
261−
262```
233```
263− > (hor . 1)
264− %.n
265−
266− > (hor 1 2)
267− %.y
268−
269− > (hor "abc" "cba")
270− %.y
271−
272− > (hor 'c' 'd')
273− %.n
274−
275− > (hor 100 [1 1])
276− %.y
277−
278− > (hor [1 1] 100)
279− %.n
280−
281− > (hor 500.000.000 "foo")
282− %.y
283−
284− > (hor "foo" 500.000.000)
285− %.n
286−
287− > (hor 0 "foo")
288− %.y
289
234
290− > (gor `(list @)`[0 ~] 1)
291− %.n
292−
293− > (hor `(list @)`[50 500 5.000 ~] 1)
294− %.n
295```
235```
296−
236+> (gor "foo" "bar")
297−#### Discussion
237+%.n
298−
299−Sets (+set, +in) use `hor` for their horizontal order and `vor` for their
300−vertical order. See [`apt:in`](/docs/hoon/reference/stdlib/2h) to see how a set verifies its correctness.
301−`vor` is used to verify.
302−
303−---
304−### `++lor`
305−
306−Leg order
307−
308−Computes whether the corresponding legs of `a` and `b` are in ascending
309−numeric order, producing a flag.
310−
311−#### Accepts
312−
313−`a` is a noun.
314−
315−`b` is a noun.
316−
317−#### Accepts
318−
319−A flag.
320−
321−#### Source
322−
323−```hoon
324− ++ lor
325− ~/ %lor
326− |= [a=* b=*]
327− ^- ?
328− ?: =(a b) &
329− ?@ a
330− ?^ b &
331− (lth a b)
332− ?: =(-.a -.b)
333− $(a +.a, b +.b)
334− $(a -.a, b -.b)
335```
238```
336
239
337−#### Examples
338−
339```
240```
340− > (lor 1 2)
241+> (gor (some 10) `(list @)`[1 2 3 ~])
341− %.y
242+%.n
342−
343− > (lor 2 1)
344− %.n
345−
346− > (lor 9 [1 2])
347− %.y
348−
349− > (lor `(list @)`[1 2 3 ~] `(list @)`[1 2 3 4 ~])
350− %.y
351−
352− > (lor `(list @)`[1 2 3 ~] `(list @)`[1 2 2 ~])
353− %.n
354−
355− > (lor `(list @)`[1 2 3 ~] `(list @)`[2 2 ~])
356− %.y
357−
358− > (lor [2 2 5] [1 5 9 8])
359− %.n
360−
361− > (lor [1 5 8] [1 5 9 8])
362− %.y
363−
364− > (lor [1 2 3] [1 2])
365− !! exit
366```
243```
367
244
368#### Discussion
245#### Discussion
369
246
370−`lor` is no longer used internally.
247+`map`s use `gor` on the key for horizontal ordering and `mor` for
248+vertical order. `map`s only look at the keys (the head of the key-value pair
249+elements) for ordering.
371
250
372---
251---
373−### `++vor`
374
252
375−Vertical order
253+## `++mor`
254+
255+(more) mug order
376
256
377Computes whether the double-hashes `(mug (mug a))` and `(mug (mug b))` are in
257Computes whether the double-hashes `(mug (mug a))` and `(mug (mug b))` are in
378ascending numeric order, producing a flag. If the double-`mug` hashes are
258ascending numeric order, producing a flag. If the double-`mug` hashes are
379equal, `a` and `b` are compared by `dor` instead.
259equal, `a` and `b` are compared by `dor` instead.
380
260
381−[`mug`](/docs/hoon/reference/stdlib/2e) is the the 31-bit nonzero FNV-1a hash algorithm.
261+[`mug`](/docs/hoon/reference/stdlib/2e#mug) is the the 31-bit nonzero FNV-1a hash algorithm.
382−
383
262
384#### Accepts
263#### Accepts
385
264
@@ -394,20 +273,20 @@ A flag.
394#### Source
273#### Source
395
274
396```hoon
275```hoon
397− ++ vor
276+++ mor
398− ~/ %vor
277+ ~/ %mor
399− |= [a=* b=*]
278+ |= [a=* b=*]
400− ^- ?
279+ ^- ?
401− =+ [c=(mug (mug a)) d=(mug (mug b))]
280+ =+ [c=(mug (mug a)) d=(mug (mug b))]
402− ?: =(c d)
281+ ?: =(c d)
403− (dor a b)
282+ (dor a b)
404− (lth c d)
283+ (lth c d)
405```
284```
406
285
407#### Examples
286#### Examples
408
287
409```
288```
410− > (vor 'f' 'g')
289+ > (mor 'f' 'g')
411 %.y
290 %.y
412
291
413 > [(mug 'f') (mug 'g')]
292 > [(mug 'f') (mug 'g')]
@@ -416,22 +295,21 @@ A flag.
416 > [(mug (mug 'f')) (mug (mug 'g'))]
295 > [(mug (mug 'f')) (mug (mug 'g'))]
417 [261.421.509 1.861.258.547]
296 [261.421.509 1.861.258.547]
418
297
419− > (vor 'a' 'z')
298+ > (mor 'a' 'z')
420 %.n
299 %.n
421
300
422− > (vor 43.326 41.106)
301+ > (mor 43.326 41.106)
423 %.n
302 %.n
424```
303```
425
304
426#### Discussion
305#### Discussion
427
306
428−Maps, sets, and queues all use `vor` to check for vertical ordering. Maps and
307+Maps, sets, and queues all use `mor` to check for vertical ordering. Maps and
429−sets also use `gor` and `hor` for horizontal order, respectively, but queues use
308+sets also use `gor` for horizontal order, but queues use
430vertical ordering alone.
309vertical ordering alone.
431
310
432−Since hashing removes correlation, double-`mug`ging with `vor` removes
311+Since hashing removes correlation, double-`mug`ging with `mor` removes
433−correlation with single-`mug`ged `hor`. Vertical order becomes uncorrelated
312+correlation with single-`mug`ged `gor`. Vertical order becomes uncorrelated
434with horizontal order.
313with horizontal order.
435
314
436−
315+---
437−---
content/docs/hoon/reference/stdlib/2g.md+26−26
@@ -4,7 +4,7 @@ weight = 10
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++pow`
7+## `++pow`
8
8
9Computes `a` raised to the power of `b`, producing an atom.
9Computes `a` raised to the power of `b`, producing an atom.
10
10
@@ -21,14 +21,14 @@ An atom.
21#### Source
21#### Source
22
22
23```hoon
23```hoon
24− ++ pow
24+++ pow
25− ~/ %pow
25+ ~/ %pow
26− |= [a=@ b=@]
26+ |= [a=@ b=@]
27− ?: =(b 0) 1
27+ ?: =(b 0) 1
28− |- ?: =(b 1) a
28+ |- ?: =(b 1) a
29− =+ c=$(b (div b 2))
29+ =+ c=$(b (div b 2))
30− =+ d=(mul c c)
30+ =+ d=(mul c c)
31− ?~ (dis b 1) d (mul d a)
31+ ?~ (dis b 1) d (mul d a)
32```
32```
33
33
34#### Examples
34#### Examples
@@ -51,7 +51,8 @@ An atom.
51```
51```
52
52
53---
53---
54−### `++sqt`
54+
55+## `++sqt`
55
56
56Computes the square root of `a` and its remainder.
57Computes the square root of `a` and its remainder.
57
58
@@ -66,20 +67,20 @@ A cell of atoms.
66#### Source
67#### Source
67
68
68```hoon
69```hoon
69− ++ sqt
70+++ sqt
70− ~/ %sqt
71+ ~/ %sqt
71− |= a=@ ^- [p=@ q=@]
72+ |= a=@ ^- [p=@ q=@]
72− ?~ a [0 0]
73+ ?~ a [0 0]
73− =+ [q=(div (dec (xeb a)) 2) r=0]
74+ =+ [q=(div (dec (xeb a)) 2) r=0]
74− =- [-.b (sub a +.b)]
75+ =- [-.b (sub a +.b)]
75− ^= b |-
76+ ^= b |-
76− =+ s=(add r (bex q))
77+ =+ s=(add r (bex q))
77− =+ t=(mul s s)
78+ =+ t=(mul s s)
78− ?: =(q 0)
79+ ?: =(q 0)
79− ?:((lte t a) [s t] [r (mul r r)])
80+ ?:((lte t a) [s t] [r (mul r r)])
80− ?: (lte t a)
81+ ?: (lte t a)
81− $(r s, q (dec q))
82+ $(r s, q (dec q))
82− $(q (dec q))
83+ $(q (dec q))
83```
84```
84
85
85#### Examples
86#### Examples
@@ -101,5 +102,4 @@ A cell of atoms.
101 ! exit
102 ! exit
102```
103```
103
104
104−
105+---
105−---
content/docs/hoon/reference/stdlib/2h.md+345−345
@@ -4,7 +4,7 @@ weight = 11
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++in`
7+## `++in`
8
8
9Set operations
9Set operations
10
10
@@ -18,16 +18,16 @@ A `set`.
18#### Source
18#### Source
19
19
20```hoon
20```hoon
21− ++ in
21+ ~/ %in
22− ~/ %in
22+ =| a=(tree)
23− |_ a=(set)
23+ |@
24```
24```
25
25
26#### Examples
26#### Examples
27
27
28```
28```
29− > ~(. in (sy "asd"))
29+> ~(. in (sy "asd"))
30− <13.evb [nlr(^$1{@tD $1}) <414.fvk 101.jzo 1.ypj %164>]>
30+<16.ufw [a=?(%~ [?(n=@tD n=#1) l=nlr(?(@tD #1)) r=nlr(?(@tD ^#1.?(@tD #1)))]) <123.zao 46.hgz 1.pnw %140>]>
31```
31```
32
32
33### `++all:in`
33### `++all:in`
@@ -39,9 +39,9 @@ flag.
39
39
40#### Accepts
40#### Accepts
41
41
42−`a` is a `set`.
42+`a` is a `set`, and is the sample of `+in`.
43
43
44−`b` is a wet gate that accepts a noun and produces a flag.
44+`b` is a gate that accepts a noun and produces a flag.
45
45
46#### Produces
46#### Produces
47
47
@@ -50,28 +50,27 @@ A flag.
50#### Source
50#### Source
51
51
52```hoon
52```hoon
53− ++ all :: logical AND
53+++ all
54− ~/ %all
54+ ~/ %all
55− |* b=$-(* ?)
55+ |* b=$-(* ?)
56− |- ^- ?
56+ |- ^- ?
57− ?~ a
57+ ?~ a
58− &
58+ &
59− ?&((b n.a) $(a l.a) $(a r.a))
59+ ?&((b n.a) $(a l.a) $(a r.a))
60```
60```
61
61
62#### Examples
62#### Examples
63
63
64```
64```
65− > =b (sy `(list [@t *])`[['a' 1] ['b' [2 3]] ~])
65+> (~(all in (silt ~[1 2 3 4])) |=(a=@ (lth a 5)))
66− > (~(all in b) |=(a=* ?@(+.a & |)))
66+%.y
67− %.n
68
67
69− > =b (sy `(list @t)`['john' 'bonita' 'daniel' 'madeleine' ~])
68+> (~(all in (silt ~[1 2 3 4 5])) |=(a=@ (lth a 5)))
70− > (~(all in b) |=(a=@t (gte a 100)))
69+%.n
71− %.y
72```
70```
73
71
74---
72---
73+
75### `++any:in`
74### `++any:in`
76
75
77Logical OR
76Logical OR
@@ -81,7 +80,7 @@ flag.
81
80
82#### Accepts
81#### Accepts
83
82
84−`a` is a `set`.
83+`a` is a `set`, and is the sample of `+in`.
85
84
86`b` is a gate that accepts a noun and produces a flag.
85`b` is a gate that accepts a noun and produces a flag.
87
86
@@ -92,28 +91,27 @@ A flag.
92#### Source
91#### Source
93
92
94```hoon
93```hoon
95− ++ any :: logical OR
94+++ any
96− ~/ %any
95+ ~/ %any
97− |* b=$-(* ?)
96+ |* b=$-(* ?)
98− |- ^- ?
97+ |- ^- ?
99− ?~ a
98+ ?~ a
100− |
99+ |
101− ?|((b n.a) $(a l.a) $(a r.a))
100+ ?|((b n.a) $(a l.a) $(a r.a))
102```
101```
103
102
104#### Examples
103#### Examples
105
104
106```
105```
107− > =b (sy `(list [@t *])`[['a' 1] ['b' [2 3]] ~])
106+> (~(any in (silt ~[2 3 4 5])) |=(a=@ (lth a 3)))
108− > (~(any in b) |=(a/* ?@(+.a & |)))
107+%.y
109− %.y
110
108
111− > =b (sy `(list @t)`['john' 'bonita' 'daniel' 'madeleine' ~])
109+> (~(any in (silt ~[3 4 5])) |=(a=@ (lth a 3)))
112− > (~(any in b) |=(a=@t (lte a 100)))
110+%.n
113− %.n
114```
111```
115
112
116---
113---
114+
117### `++apt:in`
115### `++apt:in`
118
116
119Check correctness
117Check correctness
@@ -132,36 +130,38 @@ A flag.
132#### Source
130#### Source
133
131
134```hoon
132```hoon
135− ++ apt :: check correctness
133+++ apt
136− =< $
134+ =< $
137− ~/ %apt
135+ ~/ %apt
138− =| [l=(unit) r=(unit)]
136+ =| [l=(unit) r=(unit)]
139− |. ^- ?
137+ |. ^- ?
140− ?~ a &
138+ ?~ a &
141− ?& ?~(l & (gor n.a u.l))
139+ ?& ?~(l & (gor n.a u.l))
142− ?~(r & (gor u.r n.a))
140+ ?~(r & (gor u.r n.a))
143− ?~(l.a & ?&((mor n.a n.l.a) $(a l.a, l `n.a)))
141+ ?~(l.a & ?&((mor n.a n.l.a) $(a l.a, l `n.a)))
144− ?~(r.a & ?&((mor n.a n.r.a) $(a r.a, r `n.a)))
142+ ?~(r.a & ?&((mor n.a n.r.a) $(a r.a, r `n.a)))
145− ==
143+ ==
146```
144```
147
145
148#### Examples
146#### Examples
149
147
150```
148```
151− > ~(apt in ~)
149+> ~(apt in ~)
152− %.y
150+%.y
151+```
153
152
154− > =a (sy [1 2 3 4 5 6 ~])
153+```
155− > a
154+> =a (silt ~[1 2 3])
156− [n=6 l={5 4} r={1 3 2}]
155+> a
157− > ~(apt in a)
156+[n=2 l={1} r={3}]
158− %.y
157+> ~(apt in a)
158+%.y
159
159
160− > =z ?~ a ~ a(n 7)
160+> =z ?~(a ~ a(n 10))
161− > z
161+> z
162− [n=7 l={5 4} r={1 3 2}]
162+[n=10 l={1} r={3}]
163− > ~(apt in z)
163+> ~(apt in z)
164− %.n
164+%.n
165```
165```
166
166
167#### Discussion
167#### Discussion
@@ -169,15 +169,16 @@ A flag.
169See section [`2f`](/docs/hoon/reference/stdlib/2f) for more information on noun ordering.
169See section [`2f`](/docs/hoon/reference/stdlib/2f) for more information on noun ordering.
170
170
171---
171---
172+
172### `++bif:in`
173### `++bif:in`
173
174
174Bifurcate
175Bifurcate
175
176
176−Splits set `a` into two sets `l` and `r`, with any noun `b` removed.
177+Splits set `a` into sets `l` and `r`, which contain the items either side of `b` but not including `b`.
177
178
178#### Accepts
179#### Accepts
179
180
180−`a` is a set.
181+`a` is a set, and is the sample of `+in`.
181
182
182`b` is a noun.
183`b` is a noun.
183
184
@@ -188,40 +189,45 @@ A cell of two sets.
188#### Source
189#### Source
189
190
190```hoon
191```hoon
191− ++ bif :: splits a by b
192+++ bif
192− ~/ %bif
193+ ~/ %bif
193− |* b=*
194+ |* b=*
194− ^+ [l=a r=a]
195+ ^+ [l=a r=a]
195− =< +
196+ =< +
196− |- ^+ a
197+ |- ^+ a
197− ?~ a
198+ ?~ a
198− [b ~ ~]
199+ [b ~ ~]
199− ?: =(b n.a)
200+ ?: =(b n.a)
200− a
201+ a
201− ?: (gor b n.a)
202+ ?: (gor b n.a)
202− =+ c=$(a l.a)
203+ =+ c=$(a l.a)
203− ?> ?=(^ c)
204− c(r a(l r.c))
205− =+ c=$(a r.a)
206 ?> ?=(^ c)
204 ?> ?=(^ c)
207− c(l a(r l.c))
205+ c(r a(l r.c))
206+ =+ c=$(a r.a)
207+ ?> ?=(^ c)
208+ c(l a(r l.c))
208```
209```
209
210
210#### Examples
211#### Examples
211
212
212```
213```
213− > =a (sy `(list @)`[1 2 3 4 5 6 ~])
214+> =a `(set @)`(silt (gulf 1 20))
214− > a
215+> a
215− [n=6 l={5 4} r={1 3 2}]
216+{17 8 20 13 11 5 19 7 15 10 18 14 6 12 9 1 2 3 16 4}
216
217
217− > (~(bif in a) 6)
218+> (~(bif in a) 10)
218− [l=[n=4 l=[n=5 l={} r={}] r=~] r=[n=2 l=[n=1 l={} r={3}] r=~]]
219+[l=[n=11 l={17 8 20 13} r={5 19 7 15}] r=[n=12 l={18 14 6} r={9 1 2 3 16 4}]]
219
220
220− > (~(bif in a) 100)
221+> `[(set @) (set @)]`(~(bif in a) 10)
221− [l=[n=6 l=[n=4 l={5} r={}] r=[n=2 l={1 3} r={}]] r=~]
222+[{17 8 20 13 11 5 19 7 15} {18 14 6 12 9 1 2 3 16 4}]
222```
223```
223
224
225+#### Discussion
226+
227+Note that `set`s are horizontally ordered by the [mug](/docs/hoon/reference/stdlib/2e#mug) hash of their items and vertically ordered by the double-`mug` hash of their items. This means bifurcating the set of numbers `(silt ~[10 20 30 40 50])` at `30` will not produce `[{10 20} {40 50}]`, but rather `[{20} {10 40 50}]` due to the tree structure resulting from their `mug` hashes.
228+
224---
229---
230+
225### `++del:in`
231### `++del:in`
226
232
227Remove noun
233Remove noun
@@ -230,7 +236,7 @@ Removes `b` from the `set` `a`.
230
236
231#### Accepts
237#### Accepts
232
238
233−`a` is a set.
239+`a` is a set, and is the sample of `+in`.
234
240
235`b` is a noun.
241`b` is a noun.
236
242
@@ -241,41 +247,48 @@ A set.
241#### Source
247#### Source
242
248
243```hoon
249```hoon
244− ++ del :: b without any a
250+++ del
245− ~/ %del
251+ ~/ %del
246− |* b=*
252+ |* b=*
247− |- ^+ a
253+ |- ^+ a
248− ?~ a
254+ ?~ a
249− ~
255+ ~
250− ?. =(b n.a)
256+ ?. =(b n.a)
251− ?: (gor b n.a)
257+ ?: (gor b n.a)
252− a(l $(a l.a))
258+ a(l $(a l.a))
253− a(r $(a r.a))
259+ a(r $(a r.a))
254− |- ^- [$?(~ _a)]
260+ |- ^- [$?(~ _a)]
255− ?~ l.a r.a
261+ ?~ l.a r.a
256− ?~ r.a l.a
262+ ?~ r.a l.a
257− ?: (mor n.l.a n.r.a)
263+ ?: (mor n.l.a n.r.a)
258− l.a(r $(l.a r.l.a))
264+ l.a(r $(l.a r.l.a))
259− r.a(l $(r.a l.r.a))
265+ r.a(l $(r.a l.r.a))
260```
266```
261
267
262−
263#### Examples
268#### Examples
264
269
265```
270```
266− > =b (sy `(list @t)`['a' 'b' 'c' ~])
271+> `(set @)`(~(del in (silt ~[1 2 3 4 5])) 3)
267− > (~(del in b) 'a')
272+{5 1 2 4}
268− [n='b' l=[n='c' l={} r={}] r=~]
273+```
269
274
270− > =b (sy `(list @t)`['john' 'bonita' 'daniel' 'madeleine' ~])
275+```
271− > (~(del in b) 'john')
276+> `(set @t)`(~(del in (silt ~['foo' 'bar' 'baz'])) 'bar')
272− [n='madeleine' l=[n='daniel' l={} r={'bonita'}] r=~]
277+{'baz' 'foo'}
278+```
273
279
274− > (~(del in b) 'susan')
280+```
275− [n='madeleine' l=[n='daniel' l={} r={'bonita'}] r=[n='john' l={} r={}]]
281+> `(set @)`(~(del in (silt ~[1 2 3 4 5])) 10)
282+{5 1 2 3 4}
283+```
284+
285+```
286+> `(set @)`(~(del in ~) 10)
287+{}
276```
288```
277
289
278---
290---
291+
279### `++dif:in`
292### `++dif:in`
280
293
281Difference
294Difference
@@ -285,7 +298,7 @@ that are not in `b`.
285
298
286#### Accepts
299#### Accepts
287
300
288−`a` is a set.
301+`a` is a set, and is the sample of `+in`.
289
302
290`b` is a set.
303`b` is a set.
291
304
@@ -296,46 +309,39 @@ A set.
296#### Source
309#### Source
297
310
298```hoon
311```hoon
299− ++ dif :: difference
312+++ dif
300− ~/ %dif
313+ ~/ %dif
301− =+ b=a
314+ =+ b=a
302− |@
315+ |@
303− ++ $
316+ ++ $
304− |- ^+ a
317+ |- ^+ a
305− ?~ b
318+ ?~ b
306− a
319+ a
307− =+ c=(bif n.b)
320+ =+ c=(bif n.b)
308− ?> ?=(^ c)
321+ ?> ?=(^ c)
309− =+ d=$(a l.c, b l.b)
322+ =+ d=$(a l.c, b l.b)
310− =+ e=$(a r.c, b r.b)
323+ =+ e=$(a r.c, b r.b)
311− |- ^- [$?(~ _a)]
324+ |- ^- [$?(~ _a)]
312− ?~ d e
325+ ?~ d e
313− ?~ e d
326+ ?~ e d
314− ?: (mor n.d n.e)
327+ ?: (mor n.d n.e)
315− d(r $(d r.d))
328+ d(r $(d r.d))
316− e(l $(e l.e))
329+ e(l $(e l.e))
317− --
330+ --
318```
331```
319
332
320#### Examples
333#### Examples
321
334
322```
335```
323− > =c (sy 1 2 3 ~)
336+> =a (silt ~[1 2 3 4 5])
324− > =d (sy 2 3 4 ~)
337+> =b (silt ~[3 4])
325− > (~(dif in c) d)
326− [n=1 l=~ r=~]
327
338
328− > (~(dif in d) c)
339+> `(set @)`(~(dif in a) b)
329− [n=4 l=~ r=~]
340+{5 1 2}
330−
331− > `(set @ud)`(~(dif in c) d)
332− {1}
333−
334− > `(set @ud)`(~(dif in d) c)
335− {4}
336```
341```
337
342
338---
343---
344+
339### `++dig:in`
345### `++dig:in`
340
346
341Address b in a
347Address b in a
@@ -344,7 +350,7 @@ Produce the tree address of `b` within `a`.
344
350
345#### Accepts
351#### Accepts
346
352
347−`a` is a set.
353+`a` is a set, and is the sample of `+in`.
348
354
349`b` is a noun.
355`b` is a noun.
350
356
@@ -355,36 +361,36 @@ The `unit` of an atom.
355#### Source
361#### Source
356
362
357```hoon
363```hoon
358− ++ dig :: axis of a in b
364+++ dig
359− |= b=*
365+ |= b=*
360− =+ c=1
366+ =+ c=1
361− |- ^- (unit @)
367+ |- ^- (unit @)
362− ?~ a ~
368+ ?~ a ~
363− ?: =(b n.a) [~ u=(peg c 2)]
369+ ?: =(b n.a) [~ u=(peg c 2)]
364− ?: (gor b n.a)
370+ ?: (gor b n.a)
365− $(a l.a, c (peg c 6))
371+ $(a l.a, c (peg c 6))
366− $(a r.a, c (peg c 7))
372+ $(a r.a, c (peg c 7))
367```
373```
368
374
369−
370#### Examples
375#### Examples
371
376
372```
377```
373− > =a (sy `(list @)`[1 2 3 4 5 6 7 ~])
378+> =a (silt ~[1 2 3 4 5 6 7])
374− > `(set @)`a
375− {5 4 7 6 1 3 2}
376
379
377− > -.a
380+> -.a
378− n=6
381+n=6
379
382
380− > (~(dig in a) 7)
383+> (~(dig in a) 7)
381− [~ u=12]
384+[~ 12]
382
385
383− > (~(dig in a) 2)
386+> (~(dig in a) 2)
384− [~ u=14]
387+[~ 60]
385
388
386− > (~(dig in a) 6)
389+> (~(dig in a) 6)
387− [~ u=2]
390+[~ 2]
391+
392+> (~(dig in a) 10)
393+~
388```
394```
389
395
390#### Discussion
396#### Discussion
@@ -392,6 +398,7 @@ The `unit` of an atom.
392For more on the tree addressing system, see section [1b](/docs/hoon/reference/stdlib/1b).
398For more on the tree addressing system, see section [1b](/docs/hoon/reference/stdlib/1b).
393
399
394---
400---
401+
395### `++gas:in`
402### `++gas:in`
396
403
397Concatenate
404Concatenate
@@ -400,7 +407,7 @@ Insert the elements of a `list` `b` into a `set` `a`.
400
407
401#### Accepts
408#### Accepts
402
409
403−`a` is a set.
410+`a` is a set, and is the sample of `+in`.
404
411
405`b` is a list.
412`b` is a list.
406
413
@@ -411,31 +418,31 @@ A `set`.
411#### Source
418#### Source
412
419
413```hoon
420```hoon
414− ++ gas :: concatenate
421+++ gas
415− ~/ %gas
422+ ~/ %gas
416− |= b=(list _?>(?=(^ a) n.a))
423+ |= b=(list _?>(?=(^ a) n.a))
417− |- ^+ a
424+ |- ^+ a
418− ?~ b
425+ ?~ b
419− a
426+ a
420− $(b t.b, a (put i.b))
427+ $(b t.b, a (put i.b))
421```
428```
422
429
423#### Examples
430#### Examples
424
431
425```
432```
426− > =b `(set @t)`(sy `(list @t)`['bonita' 'madeleine' 'rudolf' 'john' ~])
433+> =a (silt ~['foo' 'bar' 'baz'])
427− > b
434+> `(set @t)`a
428− {'bonita' 'madeleine' 'rudolf' 'john'}
435+{'bar' 'baz' 'foo'}
429
436
430− > (~(gas in b) `(list @t)`['14' 'things' 'number' '1.337' ~])
437+> `(set @t)`(~(gas in a) ~['foo' 'foo' 'foo' 'foo'])
431− [n='number' l={'1.337' '14'} r={'things' 'bonita' 'madeleine' 'rudolf' 'john'}]
438+{'bar' 'baz' 'foo'}
432
439
433− > =s (sy `(list @t)`['a' 'b' 'c' 'd' 'e' ~])
440+> `(set @t)`(~(gas in a) ~['abc' 'xyz' '123'])
434− > (~(gas in s) `(list @t)`['1' '2' '3' ~])
441+{'xyz' 'bar' 'baz' 'foo' 'abc' '123'}
435− [n='e' l=[n='1' l={} r={'3' '2'}] r=[n='b' l={'d' 'a' 'c'} r={}]]
436```
442```
437
443
438---
444---
445+
439### `++has:in`
446### `++has:in`
440
447
441b in a?
448b in a?
@@ -444,7 +451,7 @@ Checks if `b` is an element of `a`, producing a flag.
444
451
445#### Accepts
452#### Accepts
446
453
447−`a` is a set.
454+`a` is a set, and is the sample of `+in`.
448
455
449`b` is a noun.
456`b` is a noun.
450
457
@@ -455,46 +462,37 @@ A flag.
455#### Source
462#### Source
456
463
457```hoon
464```hoon
458− ++ has
465+++ has
459− ~/ %has
466+ ~/ %has
460− |* b=*
467+ |* b=*
461− ^- ?
468+ ^- ?
462− :: wrap extracted item type in a unit because bunting fails
469+ %. [~ b]
463− ::
470+ |= b=(unit _?>(?=(^ a) n.a))
464− :: If we used the real item type of _?^(a n.a !!) as the sample type,
471+ => .(b ?>(?=(^ b) u.b))
465− :: then hoon would bunt it to create the default sample for the gate.
472+ |- ^- ?
466− ::
473+ ?~ a
467− :: However, bunting that expression fails if :a is ~. If we wrap it
474+ |
468− :: in a unit, the bunted unit doesn't include the bunted item type.
475+ ?: =(b n.a)
469− ::
476+ &
470− :: This way we can ensure type safety of :b without needing to perform
477+ ?: (gor b n.a)
471− :: this failing bunt. It's a hack.
478+ $(a l.a)
472− ::
479+ $(a r.a)
473− %. [~ b]
474− |= b=(unit _?>(?=(^ a) n.a))
475− => .(b ?>(?=(^ b) u.b))
476− |- ^- ?
477− ?~ a
478− |
479− ?: =(b n.a)
480− &
481− ?: (gor b n.a)
482− $(a l.a)
483− $(a r.a)
484```
480```
485
481
486#### Examples
482#### Examples
487
483
488```
484```
489− > =a (~(gas in `(set @t)`~) `(list @t)`['a' 'b' 'c' ~])
485+> =a (silt ~[1 2 3 4 5])
490− > (~(has in a) 'a')
491− %.y
492
486
493− > (~(has in a) 'z')
487+> (~(has in a) 2)
494− %.n
488+%.y
489+
490+> (~(has in a) 6)
491+%.n
495```
492```
496
493
497---
494---
495+
498### `++int:in`
496### `++int:in`
499
497
500Intersection
498Intersection
@@ -504,7 +502,7 @@ Produces a set of the intersection between two sets of the same type,
504
502
505#### Accepts
503#### Accepts
506
504
507−`a` is a set.
505+`a` is a set, and is the sample of `+in`.
508
506
509`b` is a set.
507`b` is a set.
510
508
@@ -515,41 +513,41 @@ A `set`.
515#### Source
513#### Source
516
514
517```hoon
515```hoon
518− ++ int :: intersection
516+++ int
519− ~/ %int
517+ ~/ %int
520− =+ b=a
518+ =+ b=a
521− |@
519+ |@
522− ++ $
520+ ++ $
523− |- ^+ a
521+ |- ^+ a
524− ?~ b
522+ ?~ b
525− ~
523+ ~
526− ?~ a
524+ ?~ a
527− ~
525+ ~
528− ?. (mor n.a n.b)
526+ ?. (mor n.a n.b)
529− $(a b, b a)
527+ $(a b, b a)
530− ?: =(n.b n.a)
528+ ?: =(n.b n.a)
531− a(l $(a l.a, b l.b), r $(a r.a, b r.b))
529+ a(l $(a l.a, b l.b), r $(a r.a, b r.b))
532− ?: (gor n.b n.a)
530+ ?: (gor n.b n.a)
533− %- uni(a $(a l.a, r.b ~)) $(b r.b)
531+ %- uni(a $(a l.a, r.b ~)) $(b r.b)
534− %- uni(a $(a r.a, l.b ~)) $(b l.b)
532+ %- uni(a $(a r.a, l.b ~)) $(b l.b)
535− --
533+ --
536```
534```
537
535
538−
539#### Examples
536#### Examples
540
537
541```
538```
542− > (~(int in `(set @t)`(sy "acmo")) `(set @t)`(sy "ham"))
539+> `(set @tD)`(~(int in (silt "foobar")) (silt "bar"))
543− [n='m' l={'a'} r={}]
540+{'r' 'b' 'a'}
544
541
545− > (~(int in (sy "acmo")) ~)
542+> `(set @tD)`(~(int in (silt "foobar")) ~)
546− ~
543+{}
547
544
548− > (~(int in `(set @t)`(sy "ac")) `(set @t)`(sy "ha"))
545+> `(set @tD)`(~(int in (silt "foobar")) (silt "baz"))
549− [n='a' l={} r={}]
546+{'b' 'a'}
550```
547```
551
548
552---
549---
550+
553### `++put:in`
551### `++put:in`
554
552
555Put b in a
553Put b in a
@@ -558,7 +556,7 @@ Add an element `b` to the set `a`, producing a set.
558
556
559#### Accepts
557#### Accepts
560
558
561−`a` is a set.
559+`a` is a set, and is the sample of `+in`.
562
560
563`b` is a noun.
561`b` is a noun.
564
562
@@ -569,49 +567,48 @@ A `set`.
569#### Source
567#### Source
570
568
571```hoon
569```hoon
572− ++ put :: puts b in a, sorted
570+++ put
573− ~/ %put
571+ ~/ %put
574− |* b=*
572+ |* b=*
575− |- ^+ a
573+ |- ^+ a
576− ?~ a
574+ ?~ a
577− [b ~ ~]
575+ [b ~ ~]
578− ?: =(b n.a)
576+ ?: =(b n.a)
579− a
577+ a
580− ?: (gor b n.a)
578+ ?: (gor b n.a)
581− =+ c=$(a l.a)
579+ =+ c=$(a l.a)
582− ?> ?=(^ c)
583− ?: (mor n.a n.c)
584− a(l c)
585− c(r a(l r.c))
586− =+ c=$(a r.a)
587 ?> ?=(^ c)
580 ?> ?=(^ c)
588 ?: (mor n.a n.c)
581 ?: (mor n.a n.c)
589− a(r c)
582+ a(l c)
590− c(l a(r l.c))
583+ c(r a(l r.c))
584+ =+ c=$(a r.a)
585+ ?> ?=(^ c)
586+ ?: (mor n.a n.c)
587+ a(r c)
588+ c(l a(r l.c))
591```
589```
592
590
593#### Examples
591#### Examples
594
592
595```
593```
596− > =a (~(gas in `(set @t)`~) `(list @t)`['a' 'b' 'c' ~])
594+> `(set @)`(~(put in (silt ~[1 2 3])) 4)
597− > =b (~(put in a) 'd')
595+{1 2 3 4}
598− > `(set @t)`b
599− {'d' 'a' 'c' 'b'}
600
596
601− > -.l.+.b
597+> `(set @)`(~(put in `(set @)`~) 42)
602− n='d'
598+{42}
603```
599```
604
600
605---
601---
602+
606### `++rep:in`
603### `++rep:in`
607
604
608Accumulate
605Accumulate
609
606
610−Accumulate the elements of `a` using a gate `b`.
607+Accumulate the elements of `a` using binary gate `b`.
611
608
612#### Accepts
609#### Accepts
613
610
614−`a` is a `set`.
611+`a` is a `set`, and is the sample of `+in`.
615
612
616`b` is a gate.
613`b` is a gate.
617
614
@@ -622,26 +619,28 @@ A noun.
622#### Source
619#### Source
623
620
624```hoon
621```hoon
625− ++ rep :: reduce to product
622+++ rep
626− ~/ %rep
623+ ~/ %rep
627− |* b=_=>(~ |=([* *] +<+))
624+ |* b=_=>(~ |=([* *] +<+))
628− |-
625+ |-
629− ?~ a +<+.b
626+ ?~ a +<+.b
630− $(a r.a, +<+.b $(a l.a, +<+.b (b n.a +<+.b)))
627+ $(a r.a, +<+.b $(a l.a, +<+.b (b n.a +<+.b)))
631```
628```
632
629
633#### Examples
630#### Examples
634
631
635```
632```
636− > =a (~(gas in *(set @)) [1 2 3 ~])
633+> (~(rep in (silt ~[1 2 3 4 5])) add)
637− > `(set @)`a
634+b=15
638− {1 3 2}
635+```
639
636
640− > (~(rep in a) |=([a=@ b=@] (add a b)))
637+```
641− b=6
638+> `@t`(~(rep in (silt ~['foo' 'bar' 'baz'])) |=(a=[@ @] (cat 3 a)))
639+'foobarbaz'
642```
640```
643
641
644---
642---
643+
645### `++run:in`
644### `++run:in`
646
645
647Apply gate to set
646Apply gate to set
@@ -662,28 +661,29 @@ A set.
662#### Source
661#### Source
663
662
664```hoon
663```hoon
665− ++ run :: apply gate to values
664+++ run
666− ~/ %run
665+ ~/ %run
667− |* b=gate
666+ |* b=gate
668− =+ c=`(set _?>(?=(^ a) (b n.a)))`~
667+ =+ c=`(set _?>(?=(^ a) (b n.a)))`~
669− |- ?~ a c
668+ |- ?~ a c
670− =. c (~(put in c) (b n.a))
669+ =. c (~(put in c) (b n.a))
671− =. c $(a l.a, c c)
670+ =. c $(a l.a, c c)
672− $(a r.a, c c)
671+ $(a r.a, c c)
673```
672```
674
673
675#### Examples
674#### Examples
676
675
677```
676```
678− > =s (sy ~["a" "A" "b" "c"])
677+> =s (silt ~["a" "A" "b" "c"])
679− > `(set tape)`s
678+> `(set tape)`s
680− {"A" "a" "c" "b"}
679+{"A" "a" "c" "b"}
681
680
682− > (~(run in s) cuss)
681+> (~(run in s) cuss)
683− {"A" "C" "B"}
682+{"A" "C" "B"}
684```
683```
685
684
686---
685---
686+
687### `++tap:in`
687### `++tap:in`
688
688
689Set to list
689Set to list
@@ -701,29 +701,30 @@ A list.
701#### Source
701#### Source
702
702
703```hoon
703```hoon
704− ++ tap :: convert to list
704+++ tap
705− =< $
705+ =< $
706− ~/ %tap
706+ ~/ %tap
707− =+ b=`(list _?>(?=(^ a) n.a))`~
707+ =+ b=`(list _?>(?=(^ a) n.a))`~
708− |. ^+ b
708+ |. ^+ b
709− ?~ a
709+ ?~ a
710− b
710+ b
711− $(a r.a, b [n.a $(a l.a)])
711+ $(a r.a, b [n.a $(a l.a)])
712```
712```
713
713
714−
715#### Examples
714#### Examples
716
715
717```
716```
718− > =s (sy `(list @t)`['a' 'b' 'c' 'd' 'e' ~])
717+> ~(tap in (silt "foobar"))
719− > s
718+"oafbr"
720− [n='e' l={} r={'d' 'a' 'c' 'b'}]
719+```
721
720
722− > ~(tap in s)
721+```
723− ~['b' 'c' 'a' 'd' 'e']
722+> ~(tap in (silt ~[1 2 3 4 5]))
723+~[4 3 2 1 5]
724```
724```
725
725
726---
726---
727+
727### `++uni:in`
728### `++uni:in`
728
729
729Union
730Union
@@ -733,7 +734,7 @@ Produces a set of the union between two sets of the same type, `a` and
733
734
734#### Accepts
735#### Accepts
735
736
736−`a` is a set.
737+`a` is a set, and is the sample of `+in`.
737
738
738`b` is a set.
739`b` is a set.
739
740
@@ -744,47 +745,47 @@ A set.
744#### Source
745#### Source
745
746
746```hoon
747```hoon
747− ++ uni :: union
748+++ uni
748− ~/ %uni
749+ ~/ %uni
749− =+ b=a
750+ =+ b=a
750− |@
751+ |@
751− ++ $
752+ ++ $
752− ?: =(a b) a
753+ ?: =(a b) a
753− |- ^+ a
754+ |- ^+ a
754− ?~ b
755+ ?~ b
755− a
756+ a
756− ?~ a
757+ ?~ a
757− b
758+ b
758− ?: =(n.b n.a)
759+ ?: =(n.b n.a)
759− b(l $(a l.a, b l.b), r $(a r.a, b r.b))
760+ b(l $(a l.a, b l.b), r $(a r.a, b r.b))
760− ?: (mor n.a n.b)
761+ ?: (mor n.a n.b)
761− ?: (gor n.b n.a)
762+ ?: (gor n.b n.a)
762− $(l.a $(a l.a, r.b ~), b r.b)
763+ $(l.a $(a l.a, r.b ~), b r.b)
763− $(r.a $(a r.a, l.b ~), b l.b)
764+ $(r.a $(a r.a, l.b ~), b l.b)
764− ?: (gor n.a n.b)
765+ ?: (gor n.a n.b)
765− $(l.b $(b l.b, r.a ~), a r.a)
766+ $(l.b $(b l.b, r.a ~), a r.a)
766− $(r.b $(b r.b, l.a ~), a l.a)
767+ $(r.b $(b r.b, l.a ~), a l.a)
767− --
768+ --
768```
769```
769
770
770−
771#### Examples
771#### Examples
772
772
773```
773```
774− > (~(uni in `(set @t)`(sy "ac")) `(set @)`(sy "ha"))
774+> =a (silt ~[1 2 3 4 5])
775− [n='c' l={'a'} r={'h'}]
775+> =b (silt ~[4 5 6 7 8])
776
776
777− > (~(uni in `(set @t)`(sy "acmo")) ~)
777+> `(set @)`(~(uni in a) b)
778− [n='c' l={'a'} r={'m' 'o'}]
778+{8 5 7 6 1 2 3 4}
779
779
780− > (~(uni in `(set @t)`(sy "acmo")) `(set @t)`(sy "ham"))
780+> `(set @)`(~(uni in a) ~)
781− [n='c' l={'a'} r={'m' 'o' 'h'}]
781+{5 1 2 3 4}
782
782
783− > (~(uni in `(set @t)`(sy "acmo")) `(set @t)`(sy "lep"))
783+> `(set @)`(~(uni in `(set @)`~) b)
784− [n='e' l={} r={'a' 'c' 'm' 'l' 'o' 'p'}]
784+{8 5 7 6 4}
785```
785```
786
786
787---
787---
788+
788### `++wyt:in`
789### `++wyt:in`
789
790
790Set size
791Set size
@@ -802,25 +803,24 @@ An atom.
802#### Source
803#### Source
803
804
804```hoon
805```hoon
805− ++ wyt :: size of set
806+++ wyt
806− =< $
807+ =< $
807− ~% %wyt + ~
808+ ~% %wyt + ~
808− |. ^- @
809+ |. ^- @
809− ?~(a 0 +((add $(a l.a) $(a r.a))))
810+ ?~(a 0 +((add $(a l.a) $(a r.a))))
810− --
811+--
811```
812```
812
813
813−
814#### Examples
814#### Examples
815
815
816```
816```
817− > =a (~(put in (~(put in (sy)) 'a')) 'b')
817+> ~(wyt in (silt ~[1 2 3 4]))
818− > ~(wyt in a)
818+4
819− 2
819+```
820
820
821− > =b (sy `(list @t)`['john' 'bonita' 'daniel' 'madeleine' ~])
821+```
822− > ~(wyt in b)
822+> ~(wyt in `(set @)`~)
823− 4
823+0
824```
824```
825
825
826---
826---
content/docs/hoon/reference/stdlib/2i.md+720−436
@@ -4,44 +4,47 @@ weight = 12
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++by`
7+## `++by`
8
8
9Map operations
9Map operations
10
10
11Container arm for map operation arms. A map is a set of key-value pairs. The
11Container arm for map operation arms. A map is a set of key-value pairs. The
12contained arms inherit its sample map, `a`.
12contained arms inherit its sample map, `a`.
13
13
14−### Accepts
14+#### Accepts
15
15
16`a` is a map.
16`a` is a map.
17
17
18#### Source
18#### Source
19
19
20```hoon
20```hoon
21− ++ by
21+++ by
22− ~/ %by
22+ ~/ %by
23− =| a=(tree (pair))
23+ =| a=(tree (pair)) :: (map)
24− =* node ?>(?=(^ a) n.a)
24+ =* node ?>(?=(^ a) n.a)
25+ |@
25```
26```
26
27
27#### Examples
28#### Examples
28
29
29```
30```
30− > ~(. by (my [%a 1] [%b 2] ~))
31+> ~(. by (malt (limo ~[a+1 b+2 c+3])))
31− < 27.zjr
32+< 27.jus
32− { a
33+ [ a
33− ?(
34+ ?(
34− { n/{?(p/$a p/$b) q/@ud}
35+ %~
35− l/nlr({p/?($b $a) q/@ud})
36+ [ n=[?(p=%a p=%b p=%c) q=@ud]
36− r/nlr({p/?($b $a) q/@ud})
37+ l=nlr([p=?(%a %b %c) q=@ud])
37− }
38+ r=nlr([p=?(%a %b %c) q=@ud])
38− $~
39+ ]
39− )
40+ )
40− <119.wim 31.ohr 1.jmk $143>
41+ <123.zao 46.hgz 1.pnw %140>
41− }
42+ ]
43+>
42```
44```
43
45
44---
46---
47+
45### `++all:by`
48### `++all:by`
46
49
47Logical AND
50Logical AND
@@ -51,9 +54,9 @@ with gate `b`.
51
54
52#### Accepts
55#### Accepts
53
56
54−`a` is a map.
57+`a` is a map, and is the sample of `+by`.
55
58
56−`b` is a wet gate.
59+`b` is a gate.
57
60
58#### Produces
61#### Produces
59
62
@@ -62,31 +65,36 @@ A flag.
62#### Source
65#### Source
63
66
64```hoon
67```hoon
65− ++ all :: logical AND
68+++ all
66− ~/ %all
69+ ~/ %all
67− |* b=$-(* ?)
70+ |* b=$-(* ?)
68− |- ^- ?
71+ |- ^- ?
69− ?~ a
72+ ?~ a
70− &
73+ &
71− ?&((b n.a) $(a l.a) $(a r.a))
74+ ?&((b q.n.a) $(a l.a) $(a r.a))
72```
75```
73
76
74#### Examples
77#### Examples
75
78
76```
79```
77− > =b (my [['a' 1] ['b' [2 3]] ~])
80+> =a (malt (limo ~[a+1 b+[2 3]]))
78− > (~(all by b) |=(a=* ?@(a & |)))
79− %.n
80
81
81− > =a (my [['a' 1] ['b' 2] ['c' 3] ['d' 4] ['e' 5] ~])
82+> (~(all by a) |=(a=* ?@(a & |)))
82− > (~(all by a) |=(a=@ (lte a 6)))
83+%.n
83− %.y
84+```
84
85
85− > (~(all by a) |=(a=@ (lte a 4)))
86+```
86− %.n
87+> =a (malt (limo ~[a+1 b+2 c+3 d+4 e+5]))
88+
89+> (~(all by a) |=(a=@ (lte a 6)))
90+%.y
91+
92+> (~(all by a) |=(a=@ (lte a 4)))
93+%.n
87```
94```
88
95
89---
96---
97+
90### `++any:by`
98### `++any:by`
91
99
92Logical OR
100Logical OR
@@ -96,7 +104,7 @@ gate `b`.
96
104
97#### Accepts
105#### Accepts
98
106
99−`a` is a map.
107+`a` is a map, and is the sample of `+by`.
100
108
101`b` is a wet gate.
109`b` is a wet gate.
102
110
@@ -107,28 +115,33 @@ A flag.
107#### Source
115#### Source
108
116
109```hoon
117```hoon
110− ++ any :: logical OR
118+++ any
111− ~/ %any
119+ ~/ %any
112− |* b=$-(* ?)
120+ |* b=$-(* ?)
113− |- ^- ?
121+ |- ^- ?
114− ?~ a
122+ ?~ a
115− |
123+ |
116− ?|((b q.n.a) $(a l.a) $(a r.a))
124+ ?|((b q.n.a) $(a l.a) $(a r.a))
117```
125```
118
126
119#### Examples
127#### Examples
120
128
121```
129```
122− > =b (my [['a' 1] ['b' [2 3]] ~])
130+> =a (malt (limo ~[a+1 b+[2 3]]))
123− > (~(any by b) |=(a=* ?@(a & |)))
124− %.y
125
131
126− > =a (my [['a' 1] ['b' 2] ['c' 3] ['d' 4] ['e' 5] ~])
132+> (~(any by a) |=(a=* ?@(a & |)))
127− > (~(any by a) |=(a=@ (lte a 4)))
133+%.y
128− %.y
134+```
135+
136+```
137+> =a (malt (limo ~[a+1 b+2 c+3 d+4 e+5]))
138+
139+> (~(any by a) |=(a=@ (lte a 4)))
140+%.y
129```
141```
130
142
131---
143---
144+
132### `++apt:by`
145### `++apt:by`
133
146
134Check correctness
147Check correctness
@@ -147,35 +160,36 @@ A flag.
147#### Source
160#### Source
148
161
149```hoon
162```hoon
150− ++ apt :: check correctness
163+++ apt
151− =< $
164+ =< $
152− ~/ %apt
165+ ~/ %apt
153− =| [l=(unit) r=(unit)]
166+ =| [l=(unit) r=(unit)]
154− |. ^- ?
167+ |. ^- ?
155− ?~ a &
168+ ?~ a &
156− ?& ?~(l & &((gor p.n.a u.l) !=(p.n.a u.l)))
169+ ?& ?~(l & &((gor p.n.a u.l) !=(p.n.a u.l)))
157− ?~(r & &((gor u.r p.n.a) !=(u.r p.n.a)))
170+ ?~(r & &((gor u.r p.n.a) !=(u.r p.n.a)))
158− ?~ l.a &
171+ ?~ l.a &
159− &((mor p.n.a p.n.l.a) !=(p.n.a p.n.l.a) $(a l.a, l `p.n.a))
172+ &((mor p.n.a p.n.l.a) !=(p.n.a p.n.l.a) $(a l.a, l `p.n.a))
160− ?~ r.a &
173+ ?~ r.a &
161− &((mor p.n.a p.n.r.a) !=(p.n.a p.n.r.a) $(a r.a, r `p.n.a))
174+ &((mor p.n.a p.n.r.a) !=(p.n.a p.n.r.a) $(a r.a, r `p.n.a))
162− ==
175+ ==
163```
176```
164
177
165#### Examples
178#### Examples
166
179
167```
180```
168− > =a (my [['a' 1] ['b' [2 3]] ~])
181+> =a (malt `(list [@tas @])`~[a+1 b+2 c+3 d+4 e+5])
169− > ~(apt by a)
182+
170− %.y
183+> ~(apt by a)
184+%.y
185+
186+> =z ?~(a ~ a(p.n `@tas`%z))
171
187
172− > =s (my [[1 2] [3 4] ~])
188+> z
173− > =z ?~ s ~ s(p.n 10)
189+[n=[p=%z q=2] l={[p=%e q=5]} r={[p=%d q=4] [p=%a q=1] [p=%c q=3]}]
174− > z
175− [n=[p=10 q=2] l={} r={[p=3 q=4]}]
176
190
177− > ~(apt by z)
191+> ~(apt by z)
178− %.n
192+%.n
179```
193```
180
194
181#### Discussion
195#### Discussion
@@ -186,11 +200,11 @@ See section [`2f`](/docs/hoon/reference/stdlib/2f) for more information on noun
186
200
187Bifurcate
201Bifurcate
188
202
189−Splits map `a` into two maps `l` and `r`, with the head at `b` discarded.
203+Splits map `a` into two maps `l` and `r`, which contain the items either side of key `b` with value `c` but not including `b`-`c`.
190
204
191#### Accepts
205#### Accepts
192
206
193−`a` is a map.
207+`a` is a map, and is the sample of `+by`.
194
208
195`b` is a noun.
209`b` is a noun.
196
210
@@ -203,38 +217,45 @@ A cell of two maps.
203#### Source
217#### Source
204
218
205```hoon
219```hoon
206− ++ bif :: splits a by b
220+++ bif
207− ~/ %bif
221+ ~/ %bif
208− |* [b=* c=*]
222+ |* [b=* c=*]
209− ^+ [l=a r=a]
223+ ^+ [l=a r=a]
210− =< +
224+ =< +
211− |- ^+ a
225+ |- ^+ a
212− ?~ a
226+ ?~ a
213− [[b c] ~ ~]
227+ [[b c] ~ ~]
214− ?: =(b p.n.a)
228+ ?: =(b p.n.a)
215− ?: =(c q.n.a)
229+ ?: =(c q.n.a)
216− a
230+ a
217− a(n [b c])
231+ a(n [b c])
218− ?: (gor b p.n.a)
232+ ?: (gor b p.n.a)
219− =+ d=$(a l.a)
233+ =+ d=$(a l.a)
220− ?> ?=(^ d)
221− d(r a(l r.d))
222− =+ d=$(a r.a)
223 ?> ?=(^ d)
234 ?> ?=(^ d)
224− d(l a(r l.d))
235+ d(r a(l r.d))
236+ =+ d=$(a r.a)
237+ ?> ?=(^ d)
238+ d(l a(r l.d))
225```
239```
226
240
227#### Examples
241#### Examples
228
242
229```
243```
230− > =a (my [['a' 1] ['b' 2] ['c' 3] ~])
244+> =a (malt `(list [@tas @])`~[a+1 b+2 c+3 d+4 e+5])
231
245
232− > (~(bif by a) ['b' 2])
246+> (~(bif by a) b+2)
233− [l=[n=[p='c' q=3] l=[n=[p='a' q=1] l={} r={}] r=~] r=~]
247+[l=[n=[p=%e q=5] l=~ r=~] r=[n=[p=%d q=4] l=~ r=[n=[p=%c q=3] l={[p=%a q=1]} r={}]]]
248+
249+> `[(map @tas @) (map @tas @)]`(~(bif by a) b+2)
250+[{[p=%e q=5]} {[p=%d q=4] [p=%a q=1] [p=%c q=3]}]
234```
251```
235
252
253+#### Discussion
254+
255+Note that `map`s are horizontally ordered by the [mug](/docs/hoon/reference/stdlib/2e#mug) hash of their keys and vertically ordered by the double-`mug` hash of their keys. This means bifurcating the map `(malt ~[10^10 20^20 30^30 40^40 50^50])` at `30^30` will not produce `[{10^10 20^20} {40^40 50^50}]`, but rather `[{20^20} {10^10 40^40 50^50}]` due to the tree structure resulting from their `mug` hashes.
236
256
237---
257---
258+
238### `++del:by`
259### `++del:by`
239
260
240Delete
261Delete
@@ -243,7 +264,7 @@ Produces map `a` with the element located at key `b` removed.
243
264
244#### Accepts
265#### Accepts
245
266
246−`a` is a map.
267+`a` is a map, and is the sample of `+by`.
247
268
248`b` is a key as a noun.
269`b` is a key as a noun.
249
270
@@ -254,33 +275,112 @@ A map.
254#### Source
275#### Source
255
276
256```hoon
277```hoon
257− ++ del :: delete at key b
278+++ del
258− ~/ %del
279+ ~/ %del
259− |* b=*
280+ |* b=*
281+ |- ^+ a
282+ ?~ a
283+ ~
284+ ?. =(b p.n.a)
285+ ?: (gor b p.n.a)
286+ a(l $(a l.a))
287+ a(r $(a r.a))
288+ |- ^- [$?(~ _a)]
289+ ?~ l.a r.a
290+ ?~ r.a l.a
291+ ?: (mor p.n.l.a p.n.r.a)
292+ l.a(r $(l.a r.l.a))
293+ r.a(l $(r.a l.r.a))
294+```
295+
296+#### Examples
297+
298+```
299+> =a `(map @tas @)`(malt (limo ~[a+1 b+2 c+3 d+4]))
300+> a
301+{[p=%b q=2] [p=%d q=4] [p=%a q=1] [p=%c q=3]}
302+
303+> `(map @tas @)`(~(del by a) %z)
304+{[p=%b q=2] [p=%d q=4] [p=%a q=1] [p=%c q=3]}
305+
306+> `(map @tas @)`(~(del by a) %b)
307+{[p=%d q=4] [p=%a q=1] [p=%c q=3]}
308+```
309+
310+---
311+
312+### `++dif:by`
313+
314+Difference
315+
316+Computes the difference between `a` and `b`, producing the map of key-value pairs in `a` whose keys are not in `b`.
317+
318+#### Accepts
319+
320+`a` is a `map`, and is the sample of `+by`.
321+
322+`b` is a `map`.
323+
324+#### Produces
325+
326+A `map`.
327+
328+#### Source
329+
330+```hoon
331+++ dif
332+ ~/ %dif
333+ =+ b=a
334+ |@
335+ ++ $
260 |- ^+ a
336 |- ^+ a
261− ?~ a
337+ ?~ b
262− ~
338+ a
263− ?. =(b p.n.a)
339+ =+ c=(bif p.n.b q.n.b)
264− ?: (gor b p.n.a)
340+ ?> ?=(^ c)
265− a(l $(a l.a))
341+ =+ d=$(a l.c, b l.b)
266− a(r $(a r.a))
342+ =+ e=$(a r.c, b r.b)
267 |- ^- [$?(~ _a)]
343 |- ^- [$?(~ _a)]
268− ?~ l.a r.a
344+ ?~ d e
269− ?~ r.a l.a
345+ ?~ e d
270− ?: (mor p.n.l.a p.n.r.a)
346+ ?: (mor p.n.d p.n.e)
271− l.a(r $(l.a r.l.a))
347+ d(r $(d r.d))
272− r.a(l $(r.a l.r.a))
348+ e(l $(e l.e))
349+ --
273```
350```
274
351
275#### Examples
352#### Examples
276
353
277```
354```
278− > =b (my [['a' 1] ['b' [2 3]] ~])
355+> =a `(map @tas @)`(malt (limo ~[a+1 b+2 c+3 d+4]))
279− > (~(del by b) 'a')
356+> =b `(map @tas @)`(malt (limo ~[c+3 d+4 e+5 f+6]))
280− [n=[p='b' q=[2 3]] l=~ r=~]
357+> a
358+{[p=%b q=2] [p=%d q=4] [p=%a q=1] [p=%c q=3]}
359+> b
360+{[p=%e q=5] [p=%d q=4] [p=%f q=6] [p=%c q=3]}
361+
362+> `(map @tas @)`(~(dif by a) b)
363+{[p=%b q=2] [p=%a q=1]}
364+```
365+
366+```
367+> =a `(map @tas @)`(malt (limo ~[a+1 b+2 c+3 d+4]))
368+> =b `(map @tas @)`(malt (limo ~[a+2 e+4 f+5]))
369+> a
370+{[p=%b q=2] [p=%d q=4] [p=%a q=1] [p=%c q=3]}
371+> b
372+{[p=%e q=4] [p=%f q=5] [p=%a q=2]}
373+
374+> `(map @tas @)`(~(dif by a) b)
375+{[p=%b q=2] [p=%d q=4] [p=%c q=3]}
281```
376```
282
377
378+#### Discussion
379+
380+This only compares keys, so if both maps contain the same key with different values, that key-value pair is not considered a difference and will not be included in the resulting map.
381+
283---
382---
383+
284### `++dig:by`
384### `++dig:by`
285
385
286Address of key
386Address of key
@@ -289,7 +389,7 @@ Produce the address of key `b` within map `a`.
289
389
290#### Accepts
390#### Accepts
291
391
292−`a` is a map.
392+`a` is a map, and is the sample of `+by`.
293
393
294`b` is a key as a noun.
394`b` is a key as a noun.
295
395
@@ -300,35 +400,43 @@ A unit.
300#### Source
400#### Source
301
401
302```hoon
402```hoon
303− ++ dig :: axis of b key
403+++ dig
304− |= b=*
404+ |= b=*
305− =+ c=1
405+ =+ c=1
306− |- ^- (unit @)
406+ |- ^- (unit @)
307− ?~ a ~
407+ ?~ a ~
308− ?: =(b p.n.a) [~ u=(peg c 2)]
408+ ?: =(b p.n.a) [~ u=(peg c 2)]
309− ?: (gor b p.n.a)
409+ ?: (gor b p.n.a)
310− $(a l.a, c (peg c 6))
410+ $(a l.a, c (peg c 6))
311− $(a r.a, c (peg c 7))
411+ $(a r.a, c (peg c 7))
312```
412```
313
413
314#### Examples
414#### Examples
315
415
316```
416```
317− > =b (my [['a' 1] ['b' [2 3]] ~])
417+> =a `(map @tas @)`(malt (limo ~[a+1 b+2 c+3 d+4]))
318− > (~(dig by b) 'b')
418+
319− [~ u=2]
419+> (~(dig by a) %a)
420+[~ 252]
421+
422+> (~(dig by a) %b)
423+[~ 2]
424+
425+> (~(dig by a) %e)
426+~
320```
427```
321
428
322---
429---
430+
323### `++gas:by`
431### `++gas:by`
324
432
325Concatenate
433Concatenate
326
434
327−Insert a list of key-value pairs `b` into map `a`.
435+Insert a list of key-value pairs `b` into map `a`. For a key which exists in both `a` and `b`, the value is replaced with the value in `b`.
328
436
329#### Accepts
437#### Accepts
330
438
331−`a` is a map.
439+`a` is a map, and is the sample of `+by`.
332
440
333`b` is a list of cells of key-value nouns `p` and `q`.
441`b` is a list of cells of key-value nouns `p` and `q`.
334
442
@@ -339,27 +447,43 @@ A map.
339#### Source
447#### Source
340
448
341```hoon
449```hoon
342− ++ gas :: concatenate
450+++ gas
343− ~/ %gas
451+ ~/ %gas
344− |* b=(list [p=* q=*])
452+ |* b=(list [p=* q=*])
345− => .(b `(list _?>(?=(^ a) n.a))`b)
453+ => .(b `(list _?>(?=(^ a) n.a))`b)
346− |- ^+ a
454+ |- ^+ a
347− ?~ b
455+ ?~ b
348− a
456+ a
349− $(b t.b, a (put p.i.b q.i.b))
457+ $(b t.b, a (put p.i.b q.i.b))
350```
458```
351
459
352#### Examples
460#### Examples
353
461
354```
462```
355− > =a (my [['a' 1] ['b' 2] ~])
463+> =a `(map @tas @)`(malt (limo ~[a+1 b+2 c+3 d+4]))
356− > =b [['c' 3] ['d' 4] ~]
464+> a
465+{[p=%b q=2] [p=%d q=4] [p=%a q=1] [p=%c q=3]}
357
466
358− > (~(gas by a) b)
467+> `(map @tas @)`(~(gas by a) ~[e+5 f+6 g+7])
359− [n=[p='b' q=2] l=[n=[p='d' q=4] l={} r={[p='a' q=1] [p='c' q=3]}] r=~]
468+{[p=%e q=5] [p=%b q=2] [p=%d q=4] [p=%f q=6] [p=%g q=7] [p=%a q=1] [p=%c q=3]}
469+```
470+
471+```
472+> =a `(map @tas @)`(malt (limo ~[a+1 b+2]))
473+> a
474+{[p=%b q=2] [p=%a q=1]}
475+
476+> `(map @tas @)`(~(gas by a) ~[a+100 b+200])
477+{[p=%b q=200] [p=%a q=100]}
478+```
479+
480+```
481+> `(map @tas @)`(~(gas by `(map @tas @)`~) ~[a+100 b+200])
482+{[p=%b q=200] [p=%a q=100]}
360```
483```
361
484
362---
485---
486+
363### `++get:by`
487### `++get:by`
364
488
365Grab unit value
489Grab unit value
@@ -368,7 +492,7 @@ Produce the unit value of the value located at key `b` within map `a`.
368
492
369#### Accepts
493#### Accepts
370
494
371−`a` is a map.
495+`a` is a map, and is the sample of `+by`.
372
496
373`b` is a key as a noun.
497`b` is a key as a noun.
374
498
@@ -379,34 +503,38 @@ A unit.
379#### Source
503#### Source
380
504
381```hoon
505```hoon
382− ++ get :: grab value by key
506+++ get
383− ~/ %get
507+ ~/ %get
384− |* b=*
508+ |* b=*
385− => .(b `_?>(?=(^ a) p.n.a)`b)
509+ => .(b `_?>(?=(^ a) p.n.a)`b)
386− |- ^- (unit _?>(?=(^ a) q.n.a))
510+ |- ^- (unit _?>(?=(^ a) q.n.a))
387− ?~ a
511+ ?~ a
388− ~
512+ ~
389− ?: =(b p.n.a)
513+ ?: =(b p.n.a)
390− (some q.n.a)
514+ (some q.n.a)
391− ?: (gor b p.n.a)
515+ ?: (gor b p.n.a)
392− $(a l.a)
516+ $(a l.a)
393− $(a r.a)
517+ $(a r.a)
394```
518```
395
519
396#### Examples
520#### Examples
397
521
398```
522```
399− > =b (my [['a' 1] ['b' [2 3]] ~])
523+> a
400− > (~(get by b) 'b')
524+{[p=%b q=2] [p=%d q=4] [p=%a q=1] [p=%c q=3]}
401− [~ u=[2 3]]
525+
526+> (~(get by a) %a)
527+[~ 1]
402
528
529+> (~(get by a) %b)
530+[~ 2]
403
531
404− > =m (my [['a' 1] ['b' 2] ~])
532+> (~(get by a) %z)
405− > (~(get by m) 'a')
533+~
406− [~ u=1]
407```
534```
408
535
409---
536---
537+
410### `++got:by`
538### `++got:by`
411
539
412Assert
540Assert
@@ -416,7 +544,7 @@ exist.
416
544
417#### Accepts
545#### Accepts
418
546
419−`a` is a map.
547+`a` is a map, and is the sample of `+by`.
420
548
421`b` is a key as a noun.
549`b` is a key as a noun.
422
550
@@ -424,29 +552,33 @@ exist.
424
552
425A noun.
553A noun.
426
554
427−#### Source
555+#### Source
428
556
429```hoon
557```hoon
430− ++ got :: need value by key
558+++ got
431− |* b=*
559+ |* b=*
432− (need (get b))
560+ (need (get b))
433```
561```
434
562
435#### Examples
563#### Examples
436
564
437```
565```
438− > =m (my [['a' 1] ['b' 2] ~])
566+> =a `(map @tas @)`(malt (limo ~[a+1 b+2 c+3 d+4]))
439− > m
567+> a
440− [n=[p='b' q=2] l={[p='a' q=1]} r={}]
568+{[p=%b q=2] [p=%d q=4] [p=%a q=1] [p=%c q=3]}
569+
570+> (~(got by a) %a)
571+1
441
572
442− > (~(got by m) 'a')
573+> (~(got by a) %b)
443− 1
574+2
444
575
445− > (~(got by m) 'c')
576+> (~(got by a) %z)
446− ! exit
577+dojo: hoon expression failed
447```
578```
448
579
449---
580---
581+
450### `++gut:by`
582### `++gut:by`
451
583
452Grab value with default
584Grab value with default
@@ -456,7 +588,7 @@ key does not exist.
456
588
457#### Accepts
589#### Accepts
458
590
459−`a` is a map.
591+`a` is a map, and is the sample of `+by`.
460
592
461`b` is a key as a noun.
593`b` is a key as a noun.
462
594
@@ -469,27 +601,30 @@ A noun.
469#### Source
601#### Source
470
602
471```hoon
603```hoon
472− ++ gut :: fall value by key
604+++ gut
473− |* [b=* c=*]
605+ |* [b=* c=*]
474− (fall (get b) c)
606+ (fall (get b) c)
475−
476```
607```
477
608
478#### Examples
609#### Examples
479
610
480```
611```
481− > =m (my [['a' 1] ['b' 2] ~])
612+> =a `(map @tas @)`(malt (limo ~[a+1 b+2 c+3 d+4]))
482− > m
613+> a
483− [n=[p='b' q=2] l={[p='a' q=1]} r={}]
614+{[p=%b q=2] [p=%d q=4] [p=%a q=1] [p=%c q=3]}
484
615
485− > (~(gut by m) 'a' 0)
616+> (~(gut by a) %a 9.999)
486− 1
617+1
487
618
488− > (~(gut by m) 'c' 0)
619+> (~(gut by a) %b 9.999)
489− 0
620+2
621+
622+> (~(gut by a) %z 9.999)
623+9.999
490```
624```
491
625
492---
626---
627+
493### `++has:by`
628### `++has:by`
494
629
495Key existence check
630Key existence check
@@ -498,7 +633,7 @@ Checks whether map `a` contains an element with key `b`, producing a flag.
498
633
499#### Accepts
634#### Accepts
500
635
501−`a` is a map.
636+`a` is a map, and is the sample of `+by`.
502
637
503`b` is a key as a noun.
638`b` is a key as a noun.
504
639
@@ -509,24 +644,27 @@ A flag.
509#### Source
644#### Source
510
645
511```hoon
646```hoon
512− ++ has :: key existence check
647+++ has
513− ~/ %has
648+ ~/ %has
514− |* b=*
649+ |* b=*
515− !=(~ (get b))
650+ !=(~ (get b))
516```
651```
517
652
518#### Examples
653#### Examples
519
654
520```
655```
521− > =b (my [['a' 1] ['b' [2 3]] ~])
656+> =a `(map @tas @)`(malt (limo ~[a+1 b+2 c+3 d+4]))
522− > (~(has by b) 'b')
657+> a
523− %.y
658+{[p=%b q=2] [p=%d q=4] [p=%a q=1] [p=%c q=3]}
524
659
525− > (~(has by b) 'c')
660+> (~(has by a) %a)
526− %.n
661+%.y
662+> (~(has by a) %z)
663+%.n
527```
664```
528
665
529---
666---
667+
530### `++int:by`
668### `++int:by`
531
669
532Intersection
670Intersection
@@ -537,7 +675,7 @@ element from map `b` is used.
537
675
538#### Accepts
676#### Accepts
539
677
540−`a` is a map.
678+`a` is a map, and is the sample of `+by`.
541
679
542`b` is a map.
680`b` is a map.
543
681
@@ -548,54 +686,113 @@ A map.
548#### Source
686#### Source
549
687
550```hoon
688```hoon
551− ++ int :: intersection
689+++ int
552− ~/ %int
690+ ~/ %int
553− =+ b=a
691+ =+ b=a
554− |@
692+ |@
555− ++ $
693+ ++ $
556− |- ^+ a
694+ |- ^+ a
557− ?~ b
695+ ?~ b
558− ~
696+ ~
559− ?~ a
697+ ?~ a
560− ~
698+ ~
561− ?: (mor p.n.a p.n.b)
699+ ?: (mor p.n.a p.n.b)
562− ?: =(p.n.b p.n.a)
700+ ?: =(p.n.b p.n.a)
563− b(l $(a l.a, b l.b), r $(a r.a, b r.b))
701+ b(l $(a l.a, b l.b), r $(a r.a, b r.b))
564− ?: (gor p.n.b p.n.a)
702+ ?: (gor p.n.b p.n.a)
565− %- uni(a $(a l.a, r.b ~)) $(b r.b)
703+ %- uni(a $(a l.a, r.b ~)) $(b r.b)
566− %- uni(a $(a r.a, l.b ~)) $(b l.b)
704+ %- uni(a $(a r.a, l.b ~)) $(b l.b)
567− ?: =(p.n.a p.n.b)
705+ ?: =(p.n.a p.n.b)
568− b(l $(b l.b, a l.a), r $(b r.b, a r.a))
706+ b(l $(b l.b, a l.a), r $(b r.b, a r.a))
569− ?: (gor p.n.a p.n.b)
707+ ?: (gor p.n.a p.n.b)
570− %- uni(a $(b l.b, r.a ~)) $(a r.a)
708+ %- uni(a $(b l.b, r.a ~)) $(a r.a)
571− %- uni(a $(b r.b, l.a ~)) $(a l.a)
709+ %- uni(a $(b r.b, l.a ~)) $(a l.a)
572− --
710+ --
573```
711```
574
712
575#### Examples
713#### Examples
576
714
577```
715```
578− > =n (my [['a' 1] ['c' 3] ~])
716+> =a `(map @tas @)`(malt (limo ~[a+1 b+2 c+3 d+4]))
579− > =m (my [['a' 1] ['b' 2] ~])
717+> =b `(map @tas @)`(malt (limo ~[c+3 d+4 e+5 f+6]))
718+> a
719+{[p=%b q=2] [p=%d q=4] [p=%a q=1] [p=%c q=3]}
720+> b
721+{[p=%e q=5] [p=%d q=4] [p=%f q=6] [p=%c q=3]}
722+
723+> `(map @tas @)`(~(int by a) b)
724+{[p=%d q=4] [p=%c q=3]}
725+```
580
726
581− > (~(int by m) n)
727+```
582− [n=[p='a' q=1] l=~ r=~]
728+> =a `(map @tas @)`(malt (limo ~[a+1 b+2]))
729+> =b `(map @tas @)`(malt (limo ~[a+100 b+200]))
730+> a
731+{[p=%b q=2] [p=%a q=1]}
732+> b
733+{[p=%b q=200] [p=%a q=100]}
583
734
584− > =p (my [['a' 2] ['b' 2] ~])
735+> `(map @tas @)`(~(int by a) b)
585− > p
736+{[p=%b q=200] [p=%a q=100]}
586− [n=[p='b' q=2] l={[p='a' q=2]} r={}]
737+```
587− > (~(int by p) n)
588− [n=[p='a' q=1] l=~ r=~]
589
738
590− > =q (my [['a' 2] ['c' 2] ~])
739+---
591− > q
740+
592− [n=[p='c' q=2] l={[p='a' q=2]} r={}]
741+### `++jab:by`
593− > (~(int by p) q)
742+
594− [n=[p='a' q=2] l=~ r=~]
743+Transform value
744+
745+Produce map `a` with the value at key `b` transformed by gate `c`.
746+
747+#### Accepts
748+
749+`a` is a `map`, and is the sample of `+by`.
750+
751+`b` is a noun, and a key in `a`.
752+
753+`c` is a `gate`.
754+
755+#### Produces
756+
757+A `map`.
758+
759+#### Source
760+
761+```hoon
762+++ jab
763+ ~/ %jab
764+ |* [key=_?>(?=(^ a) p.n.a) fun=$-(_?>(?=(^ a) q.n.a) _?>(?=(^ a) q.n.a))]
765+ ^+ a
766+ ::
767+ ?~ a !!
768+ ::
769+ ?: =(key p.n.a)
770+ a(q.n (fun q.n.a))
771+ ::
772+ ?: (gor key p.n.a)
773+ a(l $(a l.a))
774+ ::
775+ a(r $(a r.a))
776+```
777+
778+#### Examples
595
779
596− > =o (my [['c' 3] ['d' 4] ~])
780+```
597− > (~(int by m) o)
781+> =a `(map @tas @)`(malt (limo ~[a+1 b+2 c+3 d+4]))
598− ~
782+> a
783+{[p=%b q=2] [p=%d q=4] [p=%a q=1] [p=%c q=3]}
784+
785+> `(map @tas @)`(~(jab by a) %d |=(x=@ (pow x 2)))
786+{[p=%b q=2] [p=%d q=16] [p=%a q=1] [p=%c q=3]}
787+
788+> (~(jab by a) %z |=(x=@ (pow x 2)))
789+dojo: hoon expression failed
790+
791+> (~(jab by a) %d |=(a=@ [a a]))
792+-need.?(%~ [n=[p=@tas q=@] l=nlr([p=@tas q=@]) r=nlr([p=@tas q=@])])
793+-have.[n=[p=@tas q=[@ @]] l=nlr([p=@tas q=@]) r=nlr([p=@tas q=@])]
794+nest-fail
795+dojo: hoon expression failed
599```
796```
600
797
601---
798---
@@ -604,14 +801,11 @@ A map.
604
801
605Set of keys
802Set of keys
606
803
607−Produces a set of all keys in map `a` that is prepended to set `b`,
804+Produces a set of all keys in map `a`.
608−which is empty by default.
609
805
610#### Accepts
806#### Accepts
611
807
612−`a` is a map.
808+`a` is a map, and is the sample of `+by`.
613−
614−`b` is a set.
615
809
616#### Produces
810#### Produces
617
811
@@ -621,8 +815,10 @@ A set.
621
815
622```hoon
816```hoon
623++ key
817++ key
818+ =< $
819+ ~/ %key
624 =+ b=`(set _?>(?=(^ a) p.n.a))`~
820 =+ b=`(set _?>(?=(^ a) p.n.a))`~
625− |- ^+ b
821+ |. ^+ b
626 ?~ a b
822 ?~ a b
627 $(a r.a, b $(a l.a, b (~(put in b) p.n.a)))
823 $(a r.a, b $(a l.a, b (~(put in b) p.n.a)))
628```
824```
@@ -630,20 +826,19 @@ A set.
630#### Examples
826#### Examples
631
827
632```
828```
633− > =m (my [['a' 1] ['b' 2] ~])
829+> =a `(map @tas @)`(malt (limo ~[a+1 b+2 c+3 d+4]))
634− [n=[p='b' q=2] l={[p='a' q=1]} r={}]
635
830
636− > ~(key by m)
831+> ~(key by a)
637− {'b' 'a'}
832+{%b %d %a %c}
638```
833```
639
834
640---
835---
641
836
642### `++mar:by`
837### `++mar:by`
643
838
644−Assert and add
839+Add with validation
645
840
646−Produces map `a` with the addition of a key-value pair, where the value is a
841+Produces map `a` with the addition of key-value pair `b` and `c`, where the value is a
647nonempty unit.
842nonempty unit.
648
843
649Accept a noun and a unit of a noun of the type of the map's keys and values,
844Accept a noun and a unit of a noun of the type of the map's keys and values,
@@ -652,39 +847,45 @@ If the value is null, delete the key.
652
847
653#### Accepts
848#### Accepts
654
849
655−`a` is a map.
850+`a` is a `map`, and is the sample of `+by`.
851+
852+`b` is a noun.
656
853
657−`b` is a unit.
854+`c` is a `unit`.
658
855
659#### Produces
856#### Produces
660
857
661A map.
858A map.
662
859
663−#### Assert and Add
860+#### Source
664
861
665```hoon
862```hoon
666− ++ mar :: add with validation
863+++ mar
667− |* [b=* c=(unit *)]
864+ |* [b=* c=(unit *)]
668− ?~ c
865+ ?~ c
669− (del b)
866+ (del b)
670− (put b u.c)
867+ (put b u.c)
671```
868```
672
869
673#### Examples
870#### Examples
674
871
675```
872```
676− > =m (my [['a' 1] ['b' 2] ~])
873+> =a `(map @tas @)`(malt (limo ~[a+1 b+2 c+3 d+4]))
677− > (~(mar by m) 'c' (some 3))
874+> a
678− [n=[p='b' q=2] l=[n=[p='c' q=3] l=[n=[p='a' q=1] l={} r={}] r=~] r=~]
875+{[p=%b q=2] [p=%d q=4] [p=%a q=1] [p=%c q=3]}
679
876
680− > (~(mar by m) 'c' ~)
877+> `(map @tas @)`(~(mar by a) %e (some 5))
681− [n=[p='b' q=2] l=[n=[p='a' q=1] l=~ r=~] r=~]
878+{[p=%e q=5] [p=%b q=2] [p=%d q=4] [p=%a q=1] [p=%c q=3]}
682
879
683− > (~(mar by m) 'b' ~)
880+> `(map @tas @)`(~(mar by a) %a (some 10))
684− [n=[p='a' q=1] l=~ r=~]
881+{[p=%b q=2] [p=%d q=4] [p=%a q=10] [p=%c q=3]}
882+
883+> `(map @tas @)`(~(mar by a) %a ~)
884+{[p=%b q=2] [p=%d q=4] [p=%c q=3]}
685```
885```
686
886
687---
887---
888+
688### `++put:by`
889### `++put:by`
689
890
690Add key-value pair
891Add key-value pair
@@ -693,7 +894,7 @@ Produces `a` with the addition of the key-value pair of `b` and `c`.
693
894
694#### Accepts
895#### Accepts
695
896
696−`a` is a map.
897+`a` is a map, and is the sample of `+by`.
697
898
698`b` is a key of the same type as the keys in `a`.
899`b` is a key of the same type as the keys in `a`.
699
900
@@ -706,51 +907,56 @@ A map.
706#### Source
907#### Source
707
908
708```hoon
909```hoon
709− ++ put :: adds key-value pair
910+++ put
710− ~/ %put
911+ ~/ %put
711− |* [b=* c=*]
912+ |* [b=* c=*]
712− |- ^+ a
913+ |- ^+ a
713− ?~ a
914+ ?~ a
714− [[b c] ~ ~]
915+ [[b c] ~ ~]
715− ?: =(b p.n.a)
916+ ?: =(b p.n.a)
716− ?: =(c q.n.a)
917+ ?: =(c q.n.a)
717− a
918+ a
718− a(n [b c])
919+ a(n [b c])
719− ?: (gor b p.n.a)
920+ ?: (gor b p.n.a)
720− =+ d=$(a l.a)
921+ =+ d=$(a l.a)
721− ?> ?=(^ d)
722− ?: (mor p.n.a p.n.d)
723− a(l d)
724− d(r a(l r.d))
725− =+ d=$(a r.a)
726 ?> ?=(^ d)
922 ?> ?=(^ d)
727 ?: (mor p.n.a p.n.d)
923 ?: (mor p.n.a p.n.d)
728− a(r d)
924+ a(l d)
729− d(l a(r l.d))
925+ d(r a(l r.d))
926+ =+ d=$(a r.a)
927+ ?> ?=(^ d)
928+ ?: (mor p.n.a p.n.d)
929+ a(r d)
930+ d(l a(r l.d))
730```
931```
731
932
732#### Examples
933#### Examples
733
934
734```
935```
735− > =m (my [['a' 1] ['b' 2] ~])
936+> =a `(map @tas @)`(malt (limo ~[a+1 b+2 c+3]))
736− > (~(put by ~) 'c' 3)
937+> a
737− [n=[p='b' q=2] l=[n=[p='c' q=3] l={[p='a' q=1]} r={}] r=~]
938+{[p=%b q=2] [p=%a q=1] [p=%c q=3]}
738
939
739− > (~(put by m) "zod" 26)
940+> `(map @tas @)`(~(put by a) %d 4)
740− ! nest-fail
941+{[p=%b q=2] [p=%d q=4] [p=%a q=1] [p=%c q=3]}
741− ! exit
742
942
743− > (~(put by m) 'a' 2)
943+> `(map @tas @)`(~(put by a) %a 10)
744− [n=[p='b' q=2] l=[n=[p='a' q=2] l={} r={}] r=~]
944+{[p=%b q=2] [p=%a q=10] [p=%c q=3]}
745
945
746− > (put:by m 'a' 2)
946+> (~(put by a) 42 'foo')
747− {[p=[[98 2] [[97 1] 0 0] 0] q=[97 2]]}
947+mull-grow
948+mull-nice
949+-need.?(%~ [n=[p=@tas q=@] l=nlr([p=@tas q=@]) r=nlr([p=@tas q=@])])
950+-have.[[@ud @t] %~ %~]
951+nest-fail
952+dojo: hoon expression failed
748```
953```
749
954
750---
955---
956+
751### `++rep:by`
957### `++rep:by`
752
958
753−Replace by product
959+Reduce to product
754
960
755Accumulate elements of map `a` using gate `b`, producing a noun.
961Accumulate elements of map `a` using gate `b`, producing a noun.
756
962
@@ -758,7 +964,7 @@ Accumulate elements of map `a` using gate `b`, producing a noun.
758
964
759`a` is a map.
965`a` is a map.
760
966
761−`b` is a wet gate.
967+`b` is a gate.
762
968
763#### Produces
969#### Produces
764
970
@@ -767,63 +973,91 @@ A noun.
767#### Source
973#### Source
768
974
769```hoon
975```hoon
770− ++ rep :: reduce to product
976+++ rep
771− ~/ %rep
977+ ~/ %rep
772− |* b=_=>(~ |=([* *] +<+))
978+ |* b=_=>(~ |=([* *] +<+))
773− |-
979+ |-
774− ?~ a +<+.b
980+ ?~ a +<+.b
775− $(a r.a, +<+.b $(a l.a, +<+.b (b n.a +<+.b)))
981+ $(a r.a, +<+.b $(a l.a, +<+.b (b n.a +<+.b)))
776```
982```
777
983
778#### Examples
984#### Examples
779
985
780```
986```
781− > =m (my [['a' 1] ['b' 2] ~])
987+> =a `(map @tas @)`(malt (limo ~[a+1 b+2 c+3 d+4]))
782− > (~(rep by m) |=(a=(pair * *) p.a))
988+> a
783− q=[97 1]
989+{[p=%b q=2] [p=%d q=4] [p=%a q=1] [p=%c q=3]}
990+
991+> (~(rep by a) |=([p=[@tas @] q=@] ~&([p q] (add +.p q))))
992+[[%b 2] 0]
993+[[%d 4] 2]
994+[[%c 3] 6]
995+[[%a 1] 9]
996+q=10
784```
997```
785
998
999+#### Discussion
1000+
1001+The gate will iteratively be fed a cell whose head is a key-value pair from the map and whose tail is an accumulator, producing the final value of the accumulator.
1002+
786---
1003---
1004+
787### `++rib:by`
1005### `++rib:by`
788
1006
789−Replace values with accumulator
1007+Transform + product
1008+
1009+`c` is a gate with a sample like `[[key value] accumulator]` and a product like `[accumulator [key value]]`. Each key-value pair in map `a` is passed to `c` and replaced with the key-value pair `c` produced. The final value of the accumulator and the modified map are returned. `b` is the initial value of the accumulator.
790
1010
791#### Accepts
1011#### Accepts
792
1012
793−`a` is a map.
1013+`a` is a map, and is the sample of `+by`.
794
1014
795−`b` is a noun.
1015+`b` is a noun, and is the initial value of the accumulator.
796
1016
797−`c` is a wet gate.
1017+`c` is a gate.
798
1018
799−####
1019+#### Produces
800
1020
801−A cell of nouns.
1021+A cell of a noun and a map.
802
1022
803#### Source
1023#### Source
804
1024
805```hoon
1025```hoon
806− ++ rib :: transform + product
1026+++ rib
807− |* [b=* c=gate]
1027+ |* [b=* c=gate]
808− |- ^+ [b a]
1028+ |- ^+ [b a]
809− ?~ a [b ~]
1029+ ?~ a [b ~]
810− =+ d=(c n.a b)
1030+ =+ d=(c n.a b)
811− =. n.a +.d
1031+ =. n.a +.d
812− =+ e=$(a l.a, b -.d)
1032+ =+ e=$(a l.a, b -.d)
813− =+ f=$(a r.a, b -.e)
1033+ =+ f=$(a r.a, b -.e)
814− [-.f a(l +.e, r +.f)]
1034+ [-.f a(l +.e, r +.f)]
815```
1035```
816
1036
817#### Examples
1037#### Examples
818
1038
1039+In this example, all values less than three are changed to zero, and a list of their keys are produced along with the modified map.
1040+
819```
1041```
820− > =m (my [['a' 1] ['b' 2] ~])
1042+> =a `(map @t @)`(malt ~[['a' 1] ['b' 2] ['c' 3] ['d' 4] ['e' 5]])
821− > (~(rib by m) [1 2] (con by m))
1043+> a
1044+{[p='e' q=5] [p='b' q=2] [p='d' q=4] [p='a' q=1] [p='c' q=3]}
822
1045
823− > (~(rep by m) [1 2] |=(a=(pair * *) p.a))
1046+> =c |= [[k=@t v=@] acc=(list @t)]
1047+ ?: (lth v 3)
1048+ [[k acc] [k 0]]
1049+ [acc [k v]]
1050+
1051+> `[(list @t) (map @t @)]`(~(rib by a) *(list @t) c)
1052+[<|a b|> {[p='e' q=5] [p='b' q=0] [p='d' q=4] [p='a' q=0] [p='c' q=3]}]
824```
1053```
825
1054
1055+#### Discussion
1056+
1057+Key-value pairs in the map are transformed in their existing tree location. This means if you change the key, you'd likely produce a map with an incorrect order, so typically you should only change the value.
1058+
826---
1059---
1060+
827### `++run:by`
1061### `++run:by`
828
1062
829Transform values
1063Transform values
@@ -832,9 +1066,9 @@ Iterates over every value in map `a` using gate `b`, producing a map.
832
1066
833#### Accepts
1067#### Accepts
834
1068
835−`a` is a map.
1069+`a` is a map, and is the sample of `+by`.
836
1070
837−`b` is a wet gate.
1071+`b` is a gate.
838
1072
839#### Produces
1073#### Produces
840
1074
@@ -843,38 +1077,36 @@ A map.
843#### Source
1077#### Source
844
1078
845```hoon
1079```hoon
846− ++ run :: apply gate to values
1080+++ run
847− ~/ %run
1081+ ~/ %run
848− |* b=gate
1082+ |* b=gate
849− |-
1083+ |-
850− ?~ a a
1084+ ?~ a a
851− [n=[p=p.n.a q=(b q.n.a)] l=$(a l.a) r=$(a r.a)]
1085+ [n=[p=p.n.a q=(b q.n.a)] l=$(a l.a) r=$(a r.a)]
852```
1086```
853
1087
854#### Examples
1088#### Examples
855
1089
856```
1090```
857− > =m (my [['a' 1] ['b' 2] ~])
1091+> =a `(map @t @)`(malt ~[['a' 1] ['b' 2] ['c' 3] ['d' 4] ['e' 5]])
858
1092
859− > ^+(m (~(run by m) dec))
1093+> `(map @t @)`(~(run by a) dec)
860− [n=[p='b' q=1] l={[p='a' q=0]} r={}]
1094+{[p='e' q=4] [p='b' q=1] [p='d' q=3] [p='a' q=0] [p='c' q=2]}
861−
862− > `(map @tas @t)`(~(run by m) (cury scot %ux))
863− {[p=%a q='0x1'] [p=%b q='0x2']}
864```
1095```
865
1096
866---
1097---
1098+
867### `++rut:by`
1099### `++rut:by`
868
1100
869Transform nodes
1101Transform nodes
870
1102
871−Applies a gate `b` to nodes in map `a`.
1103+Applies a gate `b` to nodes in map `a`. The sample of gate `b` is a key-value pair, and it produces a new value.
872
1104
873#### Accepts
1105#### Accepts
874
1106
875−`a` is a map.
1107+`a` is a map, and is the sample of `+by`.
876
1108
877−`b` is a wet gate.
1109+`b` is a gate.
878
1110
879#### Produces
1111#### Produces
880
1112
@@ -883,32 +1115,38 @@ A map.
883#### Source
1115#### Source
884
1116
885```hoon
1117```hoon
886− ++ rut :: apply gate to nodes
1118+++ rut
887− |* b=gate
1119+ |* b=gate
888− |-
1120+ |-
889− ?~ a a
1121+ ?~ a a
890− [n=[p=p.n.a q=(b p.n.a q.n.a)] l=$(a l.a) r=$(a r.a)]
1122+ [n=[p=p.n.a q=(b p.n.a q.n.a)] l=$(a l.a) r=$(a r.a)]
891```
1123```
892
1124
893#### Examples
1125#### Examples
894
1126
895```
1127```
896− > =m (my [['a' 1] ['b' 2] ~])
1128+> =a `(map @ @)`(malt ~[[1 1] [2 2] [3 3] [4 4] [5 5]])
1129+
1130+> =b |= [k=@ v=@]
1131+ ?: (gth v 2)
1132+ (mul k v)
1133+ v
1134+
1135+> `(map @ @)`(~(rut by a) b)
1136+{[p=5 q=25] [p=1 q=1] [p=2 q=2] [p=3 q=9] [p=4 q=16]}
897```
1137```
898
1138
899---
1139---
1140+
900### `++tap:by`
1141### `++tap:by`
901
1142
902Listify pairs
1143Listify pairs
903
1144
904−Produces the list of all elements in map `a` that is prepended to list `b`,
1145+Produces the list of all elements in map `a`.
905−which is empty by default.
906
1146
907#### Accepts
1147#### Accepts
908
1148
909−`a` is a map.
1149+`a` is a map, and is the sample of `+by`.
910−
911−`b` is a list.
912
1150
913#### Produces
1151#### Produces
914
1152
@@ -917,41 +1155,37 @@ A list.
917#### Source
1155#### Source
918
1156
919```hoon
1157```hoon
920− ++ tap :: listify pairs
1158+++ tap
921− =< $
1159+ =< $
922− ~/ %tap
1160+ ~/ %tap
923− =+ b=`(list _?>(?=(^ a) n.a))`~
1161+ =+ b=`(list _?>(?=(^ a) n.a))`~
924− |. ^+ b
1162+ |. ^+ b
925− ?~ a
1163+ ?~ a
926− b
1164+ b
927− $(a r.a, b [n.a $(a l.a)])
1165+ $(a r.a, b [n.a $(a l.a)])
928```
1166```
929
1167
930#### Examples
1168#### Examples
931
1169
932```
1170```
933− > =m (my [['a' 1] ['b' 2] ~])
1171+> =a `(map @ @)`(malt ~[[1 1] [2 2] [3 3] [4 4] [5 5]])
934− [n=[p='b' q=2] l={[p='a' q=1]} r={}]
935− > `*`m
936− [[98 2] [[97 1] 0 0] 0]
937
1172
938− > ~(tap by m)
1173+> ~(tap by a)
939− ~[[p='b' q=2] [p='a' q=1]]
1174+~[[p=4 q=4] [p=3 q=3] [p=2 q=2] [p=1 q=1] [p=5 q=5]]
940− > `*`~(tap by m)
941− [[98 2] [97 1] 0]
942```
1175```
943
1176
944---
1177---
1178+
945### `++uni:by`
1179### `++uni:by`
946
1180
947−Union
1181+Union, merge
948
1182
949Produces a map of the union between the keys of `a` and `b`. If `b` shares a
1183Produces a map of the union between the keys of `a` and `b`. If `b` shares a
950key with `a`, the tuple from `b` is preserved.
1184key with `a`, the tuple from `b` is preserved.
951
1185
952#### Accepts
1186#### Accepts
953
1187
954−`a` is a map.
1188+`a` is a map, and is the sample `+by`.
955
1189
956`b` is a map.
1190`b` is a map.
957
1191
@@ -962,48 +1196,105 @@ A map.
962#### Source
1196#### Source
963
1197
964```hoon
1198```hoon
965− ++ uni :: union, merge
1199+++ uni
966− ~/ %uni
1200+ ~/ %uni
967− =+ b=a
1201+ =+ b=a
968− |@
1202+ |@
969− ++ $
1203+ ++ $
970− |- ^+ a
1204+ |- ^+ a
971− ?~ b
1205+ ?~ b
972− a
1206+ a
973− ?~ a
1207+ ?~ a
974− b
1208+ b
975− ?: =(p.n.b p.n.a)
1209+ ?: =(p.n.b p.n.a)
976− b(l $(a l.a, b l.b), r $(a r.a, b r.b))
1210+ b(l $(a l.a, b l.b), r $(a r.a, b r.b))
977− ?: (mor p.n.a p.n.b)
1211+ ?: (mor p.n.a p.n.b)
978− ?: (gor p.n.b p.n.a)
1212+ ?: (gor p.n.b p.n.a)
979− $(l.a $(a l.a, r.b ~), b r.b)
1213+ $(l.a $(a l.a, r.b ~), b r.b)
980− $(r.a $(a r.a, l.b ~), b l.b)
1214+ $(r.a $(a r.a, l.b ~), b l.b)
981− ?: (gor p.n.a p.n.b)
1215+ ?: (gor p.n.a p.n.b)
982− $(l.b $(b l.b, r.a ~), a r.a)
1216+ $(l.b $(b l.b, r.a ~), a r.a)
983− $(r.b $(b r.b, l.a ~), a l.a)
1217+ $(r.b $(b r.b, l.a ~), a l.a)
984− --
1218+ --
985```
1219```
986
1220
987#### Examples
1221#### Examples
988
1222
989```
1223```
990− > =m (my [['a' 1] ['b' 2] ~])
1224+> =a `(map @ @)`(malt ~[[1 1] [2 2] [3 3]])
1225+> =b `(map @ @)`(malt ~[[3 300] [4 400] [5 500]])
1226+> a
1227+{[p=1 q=1] [p=2 q=2] [p=3 q=3]}
1228+> b
1229+{[p=5 q=500] [p=3 q=300] [p=4 q=400]}
1230+
1231+> `(map @ @)`(~(uni by a) b)
1232+{[p=5 q=500] [p=1 q=1] [p=2 q=2] [p=3 q=300] [p=4 q=400]}
1233+```
1234+
1235+---
1236+
1237+### `++uno:by`
1238+
1239+General union
991
1240
992− > =o (my [['c' 3] ['d' 4] ~])
1241+Produces a map of the union between the keys of `a` and `b`. If `b` shares a key with `a`, gate `meg` is applied to both and its product is used as the new value of the key in question.
993
1242
994− > (~(uni by m) o)
1243+#### Accepts
995− [n=[p='b' q=2] l=[n=[p='d' q=4] l={} r={[p='a' q=1] [p='c' q=3]}] r=~]
1244+
1245+`a` is a `map`, and is the sample of `+by`.
1246+
1247+`b` is a `map`, and is the sample of `~(uno by a)`.
1248+
1249+`meg` is a gate, and is the sample of `(~(uno by a) b)`.
1250+
1251+#### Produces
1252+
1253+A `map`.
1254+
1255+#### Source
1256+
1257+```hoon
1258+++ uno
1259+ =+ b=a
1260+ |@
1261+ ++ $
1262+ |= meg=$-([_p:node _q:node _q:node] _q:node)
1263+ |- ^+ a
1264+ ?~ b
1265+ a
1266+ ?~ a
1267+ b
1268+ ?: =(p.n.b p.n.a)
1269+ :+ [p.n.a (meg p.n.a q.n.a q.n.b)]
1270+ $(b l.b, a l.a)
1271+ $(b r.b, a r.a)
1272+ ?: (mor p.n.a p.n.b)
1273+ ?: (gor p.n.b p.n.a)
1274+ $(l.a $(a l.a, r.b ~), b r.b)
1275+ $(r.a $(a r.a, l.b ~), b l.b)
1276+ ?: (gor p.n.a p.n.b)
1277+ $(l.b $(b l.b, r.a ~), a r.a)
1278+ $(r.b $(b r.b, l.a ~), a l.a)
1279+ --
1280+```
996
1281
997− > (~(uni by m) ~)
1282+#### Examples
998− {[p='a' q=1] [p='b' q=2]}
999
1283
1000− > n
1284+```
1001− {[p='a' q=1] [p='c' q=3]}
1285+> =a `(map @ @)`(malt ~[[1 1] [2 2] [3 3]])
1002− > (~(uni by o) n)
1286+> =b `(map @ @)`(malt ~[[3 3] [4 4] [5 5]])
1003− {[p='d' q=4] [p='a' q=1] [p='c' q=3]}
1287+> a
1288+{[p=1 q=1] [p=2 q=2] [p=3 q=3]}
1289+> b
1290+{[p=5 q=5] [p=3 q=3] [p=4 q=4]}
1291+
1292+> `(map @ @)`((~(uno by a) b) |=([k=@ v=@ w=@] (add v w)))
1293+{[p=5 q=5] [p=1 q=1] [p=2 q=2] [p=3 q=6] [p=4 q=4]}
1004```
1294```
1005
1295
1006---
1296---
1297+
1007### `++urn:by`
1298### `++urn:by`
1008
1299
1009Turn (with key)
1300Turn (with key)
@@ -1015,37 +1306,32 @@ the key and the value of each element as its sample.
1015
1306
1016`a` is a map.
1307`a` is a map.
1017
1308
1018−`b` is a wet gate that accepts two nouns.
1309+`b` is a gate that accepts two nouns.
1019
1310
1020#### Produces
1311#### Produces
1021
1312
1022−A noun.
1313+A `map`.
1023
1314
1024#### Source
1315#### Source
1025
1316
1026```hoon
1317```hoon
1027− ++ urn :: apply gate to nodes
1318+++ urn
1028− ~/ %urn
1319+ ~/ %urn
1029− |* b=$-([* *] *)
1320+ |* b=$-([* *] *)
1030− |-
1321+ |-
1031− ?~ a ~
1322+ ?~ a ~
1032− a(n n.a(q (b p.n.a q.n.a)), l $(a l.a), r $(a r.a))
1323+ a(n n.a(q (b p.n.a q.n.a)), l $(a l.a), r $(a r.a))
1033```
1324```
1034
1325
1035#### Examples
1326#### Examples
1036
1327
1037```
1328```
1038− > m
1329+> =a `(map @ @)`(malt ~[[1 1] [2 2] [3 3]])
1039− {[p='a' q=1] [p='b' q=2]}
1330+> a
1040−
1331+{[p=1 q=1] [p=2 q=2] [p=3 q=3]}
1041− > (~(urn by m) |=(a=(pair * *) q.a))
1042− {[p='a' q=1] [p='b' q=2]}
1043
1332
1044− > (~(urn by m) |=(a=(pair * *) 7))
1333+> (~(urn by a) |=([k=@ v=@] (pow v 2)))
1045− {[p='a' q=7] [p='b' q=7]}
1334+{[p=1 q=1] [p=2 q=4] [p=3 q=9]}
1046−
1047− > (~(urn by m) |=(a=(pair * *) p.a))
1048− {[p='a' q=97] [p='b' q=98]}
1049```
1335```
1050
1336
1051---
1337---
@@ -1058,7 +1344,7 @@ Produce the depth of the tree map `a`.
1058
1344
1059#### Accepts
1345#### Accepts
1060
1346
1061−`a` is a map.
1347+`a` is a map, and is the sample of `+by`.
1062
1348
1063#### Produces
1349#### Produces
1064
1350
@@ -1067,28 +1353,28 @@ An atom.
1067#### Source
1353#### Source
1068
1354
1069```hoon
1355```hoon
1070− ++ wyt :: depth of map
1356+++ wyt
1071− =< $
1357+ =< $
1072− ~% %wyt + ~
1358+ ~% %wyt + ~
1073− |. ^- @
1359+ |. ^- @
1074− ?~(a 0 +((add $(a l.a) $(a r.a))))
1360+ ?~(a 0 +((add $(a l.a) $(a r.a))))
1075```
1361```
1076
1362
1077#### Examples
1363#### Examples
1078
1364
1079```
1365```
1080− > =m (my [['a' 1] ['b' 2] ~])
1366+> =a `(map @ @)`(malt ~[[1 1] [2 2] [3 3]])
1367+> =b `(map @ @)`(malt ~[[1 1] [2 2] [3 3] [4 4] [5 5]])
1368+> a
1369+{[p=1 q=1] [p=2 q=2] [p=3 q=3]}
1370+> b
1371+{[p=5 q=5] [p=1 q=1] [p=2 q=2] [p=3 q=3] [p=4 q=4]}
1081
1372
1082− > =o (my [['c' 3] ['d' 4] ~])
1373+> ~(wyt by a)
1374+3
1083
1375
1084− > ~(wyt by m)
1376+> ~(wyt by b)
1085− 2
1377+5
1086−
1087− > ~(wyt by o)
1088− 2
1089−
1090− > ~(wyt by (~(uni by m) o))
1091− 4
1092```
1378```
1093
1379
1094---
1380---
@@ -1097,15 +1383,12 @@ An atom.
1097
1383
1098List of values
1384List of values
1099
1385
1100−Produces a list of all values in map `a` that is prepended to list `b`,
1386+Produces a list of all values in map `a`.
1101−which is empty by default.
1102
1387
1103#### Accepts
1388#### Accepts
1104
1389
1105`a` is a map.
1390`a` is a map.
1106
1391
1107−`b` is a list.
1108−
1109#### Produces
1392#### Produces
1110
1393
1111A list.
1394A list.
@@ -1123,11 +1406,12 @@ A list.
1123#### Examples
1406#### Examples
1124
1407
1125```
1408```
1126− > =m (my [['a' 1] ['b' 2] ~])
1409+> =a `(map @t @)`(malt ~[['a' 1] ['b' 2] ['c' 3]])
1127− [n=[p='b' q=2] l={[p='a' q=1]} r={}]
1410+> a
1411+{[p='b' q=2] [p='a' q=1] [p='c' q=3]}
1128
1412
1129− > ~(val by m)
1413+> ~(val by a)
1130− ~[1 2]
1414+~[3 1 2]
1131```
1415```
1132
1416
1133---
1417---
content/docs/hoon/reference/stdlib/2j.md+263−155
@@ -4,25 +4,45 @@ weight = 13
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++ja`
7+## `++ja`
8
8
9Jar engine
9Jar engine
10
10
11−```hoon
11+A container arm for `jar` operation arms. A `jar` is a `map` of
12− |_ a=(jar)
12+`list`s. The contained arms inherit the sample jar.
13−```
14
13
15−A container arm for `++jar` operation arms. A `++jar` is a `++map` of
14+#### Accepts
16−`++list`s. The contained arms inherit the sample jar.
17
15
18`a` is a jar.
16`a` is a jar.
19
17
18+#### Produces
19+
20+A core.
21+
22+#### Source
23+
24+```hoon
25+++ ja
26+ =| a=(tree (pair * (list))) :: (jar)
27+ |@
28+```
29+
30+#### Examples
31+
20```
32```
21> ~(. ja (my [a+1 b+2 ~]))
33> ~(. ja (my [a+1 b+2 ~]))
22< 2.ngd
34< 2.ngd
23− [ a=?(%~ [n=[?(p=%a p=%b) q=@ud] l=nlr([p=?(%a %b) q=@ud]) r=nlr([p=?(%a %b) q=@ud])])
35+ [ a
24− <123.zao 45.xig 1.pnw %140>
36+ ?(
37+ %~
38+ [ n=[?(p=%a p=%b) q=@ud]
39+ l=nlr([p=?(%a %b) q=@ud])
40+ r=nlr([p=?(%a %b) q=@ud])
41+ ]
42+ )
43+ <123.zao 46.hgz 1.pnw %140>
25 ]
44 ]
45+>
26```
46```
27
47
28---
48---
@@ -31,37 +51,41 @@ A container arm for `++jar` operation arms. A `++jar` is a `++map` of
31
51
32Grab value by key
52Grab value by key
33
53
34−```hoon
54+Produces the list at key `b` in jar `a`.
35− ++ get :: gets list by key
36− |* b=*
37− =+ c=(~(get by a) b)
38− ?~(c ~ u.c)
39−```
40
55
41#### Accepts
56#### Accepts
42
57
43−`a` is a `++jar`.
58+`a` is a `jar`, and is the sample of `+ja`.
44
59
45−`b` is a key of the same type as the keys in `a`.
60+`b` is a noun.
46
61
47#### Produces
62#### Produces
48
63
49−A list retrieved from jar `a` using the key `b`.
64+A `list`.
50
65
51−Examples
66+#### Source
52
67
68+```hoon
69+++ get
70+ |* b=*
71+ =+ c=(~(get by a) b)
72+ ?~(c ~ u.c)
53```
73```
54−> =l (my [['a' (ly 1 2 3 ~)] ['b' (ly 4 5 6 ~)]~])
55−> l
56−[n=[p='b' q=[i=4 t=~[5 6]]] l={} r={[p='a' q=[i=1 t=~[2 3]]]}]
57
74
58−> (~(get ja l) 'a')
75+#### Examples
59−[i=1 t=[i=2 t=~[3]]]
60
76
61−> (~(get ja l) 'b')
77+```
62−[i=4 t=[i=5 t=~[6]]]
78+> =j `(jar @t @ud)`(malt ~[['a' `(list @ud)`~[1 2 3]] ['b' `(list @ud)`~[4 5 6]]])
79+> j
80+{[p='b' q=~[4 5 6]] [p='a' q=~[1 2 3]]}
81+
82+> `(list @ud)`(~(get ja j) 'a')
83+~[1 2 3]
63
84
64−> (~(get ja l) 'c')
85+> `(list @ud)`(~(get ja j) 'b')
86+~[4 5 6]
87+
88+> `(list @ud)`(~(get ja j) 'c')
65~
89~
66```
90```
67
91
@@ -71,114 +95,166 @@ Examples
71
95
72Prepend to list
96Prepend to list
73
97
74−#### Source
98+Adds `c` to the head of the list at key `b` in jar `a`. If `b` does not exist in `a`, a new key-value pair is added with a list containing `c`.
75−
76−```hoon
77− ++ add :: adds key-list pair
78− |* [b=* c=*]
79− =+ d=(get b)
80− (~(put by a) b [c d])
81−```
82
99
83#### Accepts
100#### Accepts
84
101
85−`a` is a jar.
102+`a` is a `jar`, and is the sample of `+ja`.
86
103
87−`b` is a key of the same type as the keys in `a`.
104+`b` is a noun of the same type as the keys in `a`.
88
105
89−`c` is a value of the same type as the values in `a`.
106+`c` is a noun of the same type the lists in `a` contain.
107+
108+#### Produces
109+
110+A `jar`.
111+
112+#### Source
113+
114+```hoon
115+++ add
116+ |* [b=* c=*]
117+ =+ d=(get b)
118+ (~(put by a) b [c d])
119+```
90
120
91#### Examples
121#### Examples
92
122
93```
123```
94−> =l (my [['a' (ly 1 2 3 ~)] ['b' (ly 4 5 6 ~)]~])
124+> =j `(jar @t @ud)`(malt ~[['a' `(list @ud)`~[1 2 3]] ['b' `(list @ud)`~[4 5 6]]])
95−> l
125+> j
96−[n=[p='b' q=[i=4 t=~[5 6]]] l={} r={[p='a' q=[i=1 t=~[2 3]]]}]
126+{[p='b' q=~[4 5 6]] [p='a' q=~[1 2 3]]}
97−> (~(add ja l) 'a' 100)
127+
98−[ n=[p='b' q=[i=4 t=[i=5 t=~[6]]]]
128+> `(jar @t @ud)`(~(add ja j) 'b' 7)
99− l=~
129+{[p='b' q=~[7 4 5 6]] [p='a' q=~[1 2 3]]}
100− r=[n=[p='a' q=[i=100 t=[i=1 t=~[2 3]]]] l=~ r=~]
130+
101−]
131+> `(jar @t @ud)`(~(add ja j) 'c' 8)
102−> (~(add ja l) 'a' 100)
132+{[p='b' q=~[4 5 6]] [p='a' q=~[1 2 3]] [p='c' q=~[8]]}
103−[n=[p='b' q=[i=4 t=[i=5 t=~[6]]]] l=~ r=[n=[p='a' q=[i=100 t=[i=1 t=~[2 3]]]] l=~ r=~]]
104−> (~(add ja l) 'b' 7)
105−[n=[p='b' q=[i=7 t=[i=4 t=~[5 6]]]] l=~ r=[n=[p='a' q=[i=1 t=[i=2 t=~[3]]]] l=~ r=~]]
106−> (~(add ja l) 'c' 7)
107−[ n=[p='b' q=[i=4 t=[i=5 t=~[6]]]]
108− l=~
109− r=[n=[p='c' q=[i=7 t=~]] l=[n=[p='a' q=[i=1 t=~[2 3]]] l={} r={}] r=~]
110−]
111−> (~(add ja l) 'c' (ly 7 8 9 ~))
112−mull-grow
113−mull-nice
114```
133```
115
134
116−\*\*
135+---
117
136
118−### `++ju`
137+## `++ju`
119
138
120Jug operations
139Jug operations
121
140
141+Container arm for jug operation arms. A `jug` is a `map` of
142+`set`s. The contained arms inherit its sample jug, `a`.
143+
144+#### Accepts
145+
146+`a` is a `jug`.
147+
148+#### Produces
149+
150+A core.
151+
152+#### Source
153+
122```hoon
154```hoon
123− ++ ju :: jug engine
155+++ ju
124− |/ a=(jug)
156+ =| a=(tree (pair * (tree))) :: (jug)
157+ |@
125```
158```
126
159
127−Container arm for jug operation arms. A `++jug` is a `++map` of
160+#### Example
128−`++sets`. The contained arms inherit its sample jug, `a`.
129−
130−`a` is a jug.
131
161
132```
162```
133−> ~(. ju (my [[a (sy 1 ~)] [b (sy 2 ~)] ~]))
163+> =j `(jug @t @ud)`(malt ~[['a' (silt ~[1 2 3])] ['b' (silt ~[4 5 6])]])
134−< 5.cws
164+> j
135− [ a
165+{[p='b' q={5 6 4}] [p='a' q={1 2 3}]}
136− ?(
166+
137− %~
167+> ~(. ju j)
138− [ n=[p=@ub ?(q=%~ q=[?(n=@ud #!) l=nlr(?(@ud #!)) r=nlr(?(@ud #!))])]
168+<5.cws [a=nlr([p=@t q=nlr(@ud)]) <123.zao 46.hgz 1.pnw %140>]>
139− l=nlr([p=@ub q=?(%~ [?(n=@ud #!) l=nlr(?(@ud #!)) r=nlr(?(@ud #!))])])
140− r=nlr([p=@ub q=?(%~ [?(n=@ud #!) l=nlr(?(@ud #!)) r=nlr(?(@ud #!))])])
141− ]
142− )
143− <123.zao 45.xig 1.pnw %140>
144− ]
145```
169```
146
170
171+---
172+
147### `++del:ju`
173### `++del:ju`
148
174
149Remove
175Remove
150
176
177+Produces jug `a` with value `c` removed from set located at key `b`.
178+
179+#### Accepts
180+
181+`a` is a jug, and is the sample of `+ju`.
182+
183+`b` is a noun of the same type as the keys in `a`.
184+
185+`c` is a noun of the same type as the sets in `a` contain.
186+
151#### Source
187#### Source
152
188
153```hoon
189```hoon
154− ++ del :: del key-set pair
190+++ del
155− |* [b=* c=*]
191+ |* [b=* c=*]
156− ^+ a
192+ ^+ a
157− =+ d=(get b)
193+ =+ d=(get b)
158− =+ e=(~(del in d) c)
194+ =+ e=(~(del in d) c)
159− ?~ e
195+ ?~ e
160− (~(del by a) b)
196+ (~(del by a) b)
161− (~(put by a) b e)
197+ (~(put by a) b e)
162```
198```
163
199
164−Produces jug `a` with value `c` removed from set located at key `b`.
200+#### Examples
165
201
166−`a` is a jug.
202+```
203+> j
204+{[p='b' q={5 6 4}] [p='a' q={1 2 3}]}
167
205
168−`b` is a key of the same type as the keys in `a`.
206+> `(jug @t @ud)`(~(del ju j) 'b' 6)
207+{[p='b' q={5 4}] [p='a' q={1 2 3}]}
169
208
170−`c` is the value of the same type of the keys in `a` that is to be
209+> `(jug @t @ud)`(~(del ju j) 'b' 10)
171−removed.
210+{[p='b' q={5 6 4}] [p='a' q={1 2 3}]}
172
211
212+> `(jug @t @ud)`(~(del ju j) 'c' 10)
213+{[p='b' q={5 6 4}] [p='a' q={1 2 3}]}
173```
214```
174− > s
175− [[p='a' q={1 3 2}] [p='b' q={5 4 6}]}
176
215
177− > (~(del ju s) 'a' 1)
216+---
178− {[p='a' q={3 2}] [p='b' q={5 4 6}]}
217+
218+### `++gas:ju`
219+
220+Concatenate
221+
222+Add each of the key-value pairs in list `b` to jug `a`. The values in `b` are the type the sets in `a` contain. For keys in `b` that exist in `a`, the values will be added to their sets. For keys in `b` that don't exist in `a`, new keys and sets will be added.
223+
224+#### Accepts
225+
226+`a` is a `jug`, and is the sample of `+ju`.
179
227
180− > (~(del ju s) 'c' 7)
228+`b` is a `(list [p q])`, where:
181− {[p='a' q={1 3 2}] [p='b' q={5 4 6}]}
229+
230+- `p` is a noun, the type of the keys in `a`.
231+- `q` is a noun, the type the sets in `a` contain.
232+
233+#### Produces
234+
235+A `jug`.
236+
237+#### Source
238+
239+```hoon
240+++ gas
241+ |* b=(list [p=* q=*])
242+ => .(b `(list _?>(?=([[* ^] ^] a) [p=p q=n.q]:n.a))`b)
243+ |- ^+ a
244+ ?~ b
245+ a
246+ $(b t.b, a (put p.i.b q.i.b))
247+```
248+
249+#### Examples
250+
251+```
252+> =j `(jug @t @ud)`(malt ~[['a' (silt ~[1 2 3])] ['b' (silt ~[4 5 6])]])
253+> j
254+{[p='b' q={5 6 4}] [p='a' q={1 2 3}]}
255+
256+> `(jug @t @ud)`(~(gas ju j) ~[['a' 10] ['a' 42] ['b' 999] ['c' 7]])
257+{[p='b' q={5 6 4 999}] [p='a' q={10 42 1 2 3}] [p='c' q={7}]}
182```
258```
183
259
184---
260---
@@ -187,28 +263,42 @@ removed.
187
263
188Retrieve set
264Retrieve set
189
265
266+Produces a set retrieved from jar `a` using key `b`.
267+
268+#### Accepts
269+
270+`a` is a jar, and the sample of `+ju`.
271+
272+`b` is key, a noun of the same type as the keys in `a`.
273+
274+#### Produces
275+
276+A `set`.
277+
278+#### Source
279+
190```hoon
280```hoon
191− ++ get :: gets set by key
281+++ get
192− |* b=*
282+ |* b=*
193− =+ c=(~(get by a) b)
283+ =+ c=(~(get by a) b)
194− ?~(c ~ u.c)
284+ ?~(c ~ u.c)
195```
285```
196
286
197−Produces a set retrieved from jar `a` using key `b`.
287+#### Examples
198
288
199−`a` is a jar.
289+```
290+> =j `(jug @t @ud)`(malt ~[['a' (silt ~[1 2 3])] ['b' (silt ~[4 5 6])]])
291+> j
292+{[p='b' q={5 6 4}] [p='a' q={1 2 3}]}
200
293
201−`b` is a key of the same type as the keys in `a`.
294+> `(set @ud)`(~(get ju j) 'a')
295+{1 2 3}
202
296
203−```
297+> `(set @ud)`(~(get ju j) 'b')
204− > s
298+{5 6 4}
205− {[p='a' q={1 3 2}] [p='b' q={5 4 6}]}
299+
206− > (~(get ju s) 'a')
300+> `(set @ud)`(~(get ju j) 'c')
207− {1 3 2}
301+{}
208− > (~(get ju s) 'b')
209− {5 4 6}
210− > (~(get ju s) 'c')
211− ~
212```
302```
213
303
214---
304---
@@ -217,37 +307,45 @@ Produces a set retrieved from jar `a` using key `b`.
217
307
218Check contents
308Check contents
219
309
310+Computes whether a value `c` exists within the set located at key `b`
311+with jug `a`, producing a flag.
312+
313+#### Accepts
314+
315+`a` is a `jug`, and the sample of `+ju`.
316+
317+`b` is a noun of the same type as the keys in `a`.
318+
319+`c` is a noun of the same type as the sets in `a` contain.
320+
321+#### Produces
322+
323+A `?`.
324+
325+#### Source
326+
220```hoon
327```hoon
221− ++ has :: existence check
328+++ has
222− |* [b=* c=*]
329+ |* [b=* c=*]
223− ^- ?
330+ ^- ?
224− (~(has in (get b)) c)
331+ (~(has in (get b)) c)
225```
332```
226
333
227−Computes whether a value `c` exists within the set located at key `b`
334+#### Examples
228−with jar `a`. Produces a loobean.
229
335
230−`a` is a set.
336+```
337+> =j `(jug @t @ud)`(malt ~[['a' (silt ~[1 2 3])] ['b' (silt ~[4 5 6])]])
338+> j
339+{[p='b' q={5 6 4}] [p='a' q={1 2 3}]}
231
340
232−`b` is a key as a noun.
341+> (~(has ju j) 'b' 5)
342+%.y
233
343
234−`c` is a value as a noun.
344+> (~(has ju j) 'b' 10)
345+%.n
235
346
236−```
347+> (~(has ju j) 'c' 10)
237− > s
348+%.n
238− {[p='a' q={1 3 2}] [p='b' q={5 4 6}]}
239− > (~(has ju s) 'a' 3)
240− %.y
241− > (~(has ju s) 'b' 6)
242− %.y
243− > (~(has ju s) 'a' 7)
244− %.n
245− > (~(has jus s) 'c' 7)
246− ! -find-limb.jus
247− ! find-none
248− ! exit
249− > (~(has ju s) 'c' 7)
250− %.n
251```
349```
252
350
253---
351---
@@ -256,34 +354,44 @@ with jar `a`. Produces a loobean.
256
354
257Add key-set pair
355Add key-set pair
258
356
259−```hoon
357+Produces jug `a` with `c` added to the set located at key `b`. If `b` isn't a key in `a`, it will be added and a new set created containing `c`.
260− ++ put :: add key-set pair
358+
261− |* [b=* c=*]
359+#### Accepts
262− ^+ a
263− =+ d=(get b)
264− (~(put by a) b (~(put in d) c))
265−```
266
360
267−Produces jar `a` with `c` added to the set value located at key `b`.
361+`a` is a `jug`.
268
362
269−`a` is a set.
363+`b` is a noun, the type of the keys in `a`.
270
364
271−`b` is a key as a noun.
365+`c` is a noun, the type the sets in `a` contain.
272
366
273−`c` is a value.
367+#### Produces
368+
369+A `jug`.
370+
371+#### Source
372+
373+```hoon
374+++ put
375+ |* [b=* c=*]
376+ ^+ a
377+ =+ d=(get b)
378+ (~(put by a) b (~(put in d) c))
379+```
380+
381+#### Examples
274
382
275```
383```
276− > s
384+> j
277− [p='a' q=[1 3 2]] [p='b' q=[5 4 6]]]
385+{[p='b' q={5 6 4}] [p='a' q={1 2 3}]}
278
386
279− > (~(put ju s) 'a' 7)
387+> `(jug @t @ud)`(~(put ju j) 'c' 5)
280− {[p='a' q={7 1 3 2}] [p='b' q={5 4 6}]}
388+{[p='b' q={5 6 4}] [p='a' q={1 2 3}] [p='c' q={5}]}
281
389
282− > (~(put ju s) 'a' 1)
390+> `(jug @t @ud)`(~(put ju j) 'a' 4)
283− {[p='a' q={1 3 2}] [p='b' q={5 4 6}]}
391+{[p='b' q={5 6 4}] [p='a' q={1 2 3 4}]}
284
392
285− > (~(put ju s) 'c' 7)
393+> `(jug @t @ud)`(~(put ju j) 'a' 1)
286− {[p='a' q={1 3 2}] [p='c' q={7}] [p='b' q={5 4 6}]}
394+{[p='b' q={5 6 4}] [p='a' q={1 2 3}]}
287```
395```
288
396
289---
397---
content/docs/hoon/reference/stdlib/2k.md+191−135
@@ -4,8 +4,7 @@ weight = 14
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++to`
7+## `++to`
8−
9
8
10Queue operations
9Queue operations
11
10
@@ -19,8 +18,9 @@ sample queue.
19#### Source
18#### Source
20
19
21```hoon
20```hoon
22− ++ to
21+++ to
23− |_ a=(tree)
22+ =| a=(tree) :: (qeu)
23+ |@
24```
24```
25
25
26#### Discussion
26#### Discussion
@@ -31,50 +31,99 @@ interfaces. `to` is the interface core for `qeu`; it's not generic across all
31the different containers that use `tree`.
31the different containers that use `tree`.
32
32
33---
33---
34−### `++bal:to`
35
34
36−Balance
35+### `+apt:to`
37
36
38−Vertically rebalances queue `a`.
37+Check correctness
38+
39+Test whether queue `a` is correctly ordered, producing a flag.
39
40
40#### Accepts
41#### Accepts
41
42
42−`a` is a queue.
43+`a` is a `que`.
43
44
44#### Produces
45#### Produces
45
46
46−A queue.
47+A `?`.
47
48
48#### Source
49#### Source
49
50
50```hoon
51```hoon
51− ++ bal
52+++ apt
52− |- ^+ a
53+ |- ^- ?
53− ?~ a ~
54+ ?~ a &
54− ?. |(?=(~ l.a) (mor n.a n.l.a))
55+ ?& ?~(l.a & ?&((mor n.a n.l.a) $(a l.a)))
55− $(a l.a(r $(a a(l r.l.a))))
56+ ?~(r.a & ?&((mor n.a n.r.a) $(a r.a)))
56− ?. |(?=(~ r.a) (mor n.a n.r.a))
57+ ==
57− $(a r.a(l $(a a(r l.r.a))))
58− a
59```
58```
60
59
61#### Examples
60#### Examples
62
61
63```
62```
64− > `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~]
63+> =bad `(qeu @ud)`[1 ~ 2 ~ 3 ~ ~]
65− {"a" "b" "c" "d" "e" "f" "g"}
64+
65+> ~(apt to bad)
66+%.n
67+```
68+
69+```
70+> =good `(qeu @ud)`(~(gas to `(qeu @ud)`~) ~[1 2 3])
71+
72+> ~(apt to good)
73+%.y
74+```
75+
76+---
77+
78+### `++bal:to`
79+
80+Balance
81+
82+Vertically rebalances queue `a`.
83+
84+#### Accepts
66
85
67− > `*`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~]
86+`a` is a `qeu`.
68− [[97 0] 0 [98 0] 0 [99 0] 0 [100 0] 0 [101 0] 0 [102 0] 0 [103 0] 0 0]
69
87
70− > ~(bal to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~])
88+#### Produces
71− [n=[i='d' t=""] l={"a" "b" "c"} r={"e" "f" "g"}]
89+
90+A `qeu`.
91+
92+#### Source
93+
94+```hoon
95+++ bal
96+ |- ^+ a
97+ ?~ a ~
98+ ?. |(?=(~ l.a) (mor n.a n.l.a))
99+ $(a l.a(r $(a a(l r.l.a))))
100+ ?. |(?=(~ r.a) (mor n.a n.r.a))
101+ $(a r.a(l $(a a(r l.r.a))))
102+ a
103+```
104+
105+#### Examples
72
106
73− > `*`~(bal to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~])
107+```
74− [[100 0] [[99 0] [[98 0] [[97 0] 0 0] 0] 0] [101 0] 0 [102 0] 0 [103 0] 0 0]
108+> =a `(qeu @ud)`[1 ~ 2 ~ 3 ~ ~]
109+> a
110+{1 2 3}
111+> `*`a
112+[1 0 2 0 3 0 0]
113+> ~(apt to a)
114+%.n
115+
116+> =z `(qeu @ud)`~(bal to a)
117+> z
118+{1 2 3}
119+> `*`z
120+[2 [1 0 0] 3 0 0]
121+> ~(apt to z)
122+%.y
75```
123```
76
124
77---
125---
126+
78### `++dep:to`
127### `++dep:to`
79
128
80Maximum Depth
129Maximum Depth
@@ -92,35 +141,36 @@ An atom.
92#### Source
141#### Source
93
142
94```hoon
143```hoon
95− ++ dep :: max depth of queue
144+++ dep
96− |- ^- @
145+ |- ^- @
97− ?~ a 0
146+ ?~ a 0
98− +((max $(a l.a) $(a r.a)))
147+ +((max $(a l.a) $(a r.a)))
99```
148```
100
149
101#### Examples
150#### Examples
102
151
103```
152```
104− > =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 7 ~])
153+> =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 7 ~])
105− > ~(dep to a)
154+> ~(dep to a)
106− 4
155+4
107
156
108− > =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 ~])
157+> =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 ~])
109− > ~(dep to a)
158+> ~(dep to a)
110− 3
159+3
111
160
112− > =a (~(gas to `(qeu @)`~) `(list @)`[1 2 ~])
161+> =a (~(gas to `(qeu @)`~) `(list @)`[1 2 ~])
113− > ~(dep to a)
162+> ~(dep to a)
114− 2
163+2
115
164
116− > ~(dep to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~])
165+> ~(dep to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~])
117− 7
166+7
118
167
119− > ~(dep to ~(bal to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~]))
168+> ~(dep to ~(bal to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~]))
120− 4
169+4
121```
170```
122
171
123---
172---
173+
124### `++gas:to`
174### `++gas:to`
125
175
126Push list
176Push list
@@ -129,7 +179,7 @@ Push all elements of list `b` into the queue `a`.
129
179
130#### Accepts
180#### Accepts
131
181
132−`a` is a queue.
182+`a` is a queue, and is the sample of `+to`.
133
183
134`b` is a list.
184`b` is a list.
135
185
@@ -140,25 +190,26 @@ A queue.
140#### Source
190#### Source
141
191
142```hoon
192```hoon
143− ++ gas :: insert list to que
193+++ gas
144− |= b=(list _?>(?=(^ a) n.a))
194+ |= b=(list _?>(?=(^ a) n.a))
145− |- ^+ a
195+ |- ^+ a
146− ?~(b a $(b t.b, a (put i.b)))
196+ ?~(b a $(b t.b, a (put i.b)))
147```
197```
148
198
149−
150#### Examples
199#### Examples
151
200
152```
201```
153− > `(qeu)`(~(gas to `(qeu @)`~) [1 2 3 ~])
202+> `(qeu)`(~(gas to `(qeu @)`~) [1 2 3 ~])
154− {3 2 1}
203+{3 2 1}
155
204
156− > =a (~(gas to `(qeu @)`~) [1 2 3 ~])
205+> =a (~(gas to `(qeu @)`~) [1 2 3 ~])
157− > =b [4 5 6 ~]
206+> =b [4 5 6 ~]
158− > `(qeu)`(~(gas to a) b)
207+> `(qeu)`(~(gas to a) b)
159− {6 5 4 3 2 1}
208+{6 5 4 3 2 1}
160```
209```
210+
161---
211---
212+
162### `++get:to`
213### `++get:to`
163
214
164Head-tail pair
215Head-tail pair
@@ -176,31 +227,32 @@ A cell of the last element in `a` along with the rest of queue `a`.
176#### Source
227#### Source
177
228
178```hoon
229```hoon
179− ++ get :: head-rest pair
230+++ get
180− |- ^+ ?>(?=(^ a) [p=n.a q=*(tree _n.a)])
231+ |- ^+ ?>(?=(^ a) [p=n.a q=*(tree _n.a)])
181− ?~ a
232+ ?~ a
182− !!
233+ !!
183− ?~ r.a
234+ ?~ r.a
184− [n.a l.a]
235+ [n.a l.a]
185− =+ b=$(a r.a)
236+ =+ b=$(a r.a)
186− :- p.b
237+ :- p.b
187− ?: |(?=(~ q.b) (mor n.a n.q.b))
238+ ?: |(?=(~ q.b) (mor n.a n.q.b))
188− a(r q.b)
239+ a(r q.b)
189− a(n n.q.b, l a(r l.q.b), r r.q.b)
240+ a(n n.q.b, l a(r l.q.b), r r.q.b)
190```
241```
191
242
192#### Examples
243#### Examples
193
244
194```
245```
195− > =s (~(gas to *(tree @)) `(list @)`~[1 2 3])
246+> =s (~(gas to *(tree @)) `(list @)`~[1 2 3])
196− > ~(get to s)
247+> ~(get to s)
197− [n=2 l={3} r={1}]
248+[n=2 l={3} r={1}]
198
249
199− > ~(get to ~)
250+> ~(get to ~)
200− ! exit
251+! exit
201```
252```
202
253
203---
254---
255+
204### `++nap:to`
256### `++nap:to`
205
257
206Remove head
258Remove head
@@ -218,39 +270,40 @@ A queue.
218#### Source
270#### Source
219
271
220```hoon
272```hoon
221− ++ nap :: removes root
273+++ nap
222− ?> ?=(^ a)
274+ ?> ?=(^ a)
223− ?: =(~ l.a) r.a
275+ ?: =(~ l.a) r.a
224− =+ b=get(a l.a)
276+ =+ b=get(a l.a)
225− bal(n.a p.b, l.a q.b)
277+ bal(n.a p.b, l.a q.b)
226```
278```
227
279
228#### Examples
280#### Examples
229
281
230```
282```
231− > =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 ~])
283+> =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 ~])
232− > -.a
284+> -.a
233− n=6
285+n=6
234
286
235− > =b ~(nap to a)
287+> =b ~(nap to a)
236− > -.b
288+> -.b
237− n=2
289+n=2
238
290
239− > a
291+> a
240− [n=6 l={} r={5 4 3 2 1}]
292+[n=6 l={} r={5 4 3 2 1}]
241
293
242− > b
294+> b
243− [n=2 l=[n=4 l={5} r={3}] r=[n=1 l={} r={}]]
295+[n=2 l=[n=4 l={5} r={3}] r=[n=1 l={} r={}]]
244
296
245− > `(qeu)`b
297+> `(qeu)`b
246− {5 4 3 2 1}
298+{5 4 3 2 1}
247
299
248− > `(qeu)`a
300+> `(qeu)`a
249− {6 5 4 3 2 1}
301+{6 5 4 3 2 1}
250```
302```
251
303
252---
304---
253−### `++nip:to`
305+
306+### `++nip:to`
254
307
255Removes the root of queue `a`, producing the resulting queue.
308Removes the root of queue `a`, producing the resulting queue.
256
309
@@ -265,40 +318,41 @@ A queue.
265#### Source
318#### Source
266
319
267```hoon
320```hoon
268− ++ nip :: removes root
321+++ nip
269− |- ^+ a
322+ |- ^+ a
270− ?~ a ~
323+ ?~ a ~
271− ?~ l.a r.a
324+ ?~ l.a r.a
272− ?~ r.a l.a
325+ ?~ r.a l.a
273− ?: (mor n.l.a n.r.a)
326+ ?: (mor n.l.a n.r.a)
274− l.a(r $(l.a r.l.a))
327+ l.a(r $(l.a r.l.a))
275− r.a(l $(r.a l.r.a))
328+ r.a(l $(r.a l.r.a))
276```
329```
277
330
278#### Examples
331#### Examples
279
332
280```
333```
281− > =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 ~])
334+> =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 ~])
282− > a
335+> a
283− [n=6 l={} r={5 4 3 2 1}]
336+[n=6 l={} r={5 4 3 2 1}]
284
337
285− > ~(nip to a)
338+> ~(nip to a)
286− [n=2 l=[n=4 l={5} r={3}] r=[n=1 l={} r={}]]
339+[n=2 l=[n=4 l={5} r={3}] r=[n=1 l={} r={}]]
287```
340```
288
341
289---
342---
343+
290### `++put:to`
344### `++put:to`
291
345
292Insert
346Insert
293
347
294−Accept any noun `b` and adds to queue `a` as the head, producing the
348+Accept noun `b` and adds to queue `a` as the head, producing the
295resulting queue.
349resulting queue.
296
350
297#### Accepts
351#### Accepts
298
352
299−`a` is a queue.
353+`a` is a queue, and is the sample of `+to`.
300
354
301−`b` is any noun.
355+`b` is a noun.
302
356
303#### Produces
357#### Produces
304
358
@@ -307,23 +361,24 @@ A queue.
307#### Source
361#### Source
308
362
309```hoon
363```hoon
310− ++ put :: insert new tail
364+++ put
311− |* b=*
365+ |* b=*
312− |- ^+ a
366+ |- ^+ a
313− ?~ a
367+ ?~ a
314− [b ~ ~]
368+ [b ~ ~]
315− bal(l.a $(a l.a))
369+ bal(l.a $(a l.a))
316```
370```
317
371
318#### Examples
372#### Examples
319
373
320```
374```
321− > =a (~(gas to `(qeu @)`~) `(list @)`[3 1 2 4 5 6 ~])
375+> =a (~(gas to `(qeu @)`~) `(list @)`[3 1 2 4 5 6 ~])
322− > `(qeu)`(~(put to a) 7)
376+> `(qeu)`(~(put to a) 7)
323− {7 6 5 4 2 1 3}
377+{7 6 5 4 2 1 3}
324```
378```
325
379
326---
380---
381+
327### `++tap:to`
382### `++tap:to`
328
383
329Queue to list
384Queue to list
@@ -341,26 +396,28 @@ A list.
341#### Source
396#### Source
342
397
343```hoon
398```hoon
344− ++ tap :: adds list to end
399+++ tap
345− =+ b=`(list _?>(?=(^ a) n.a))`~
400+ =+ b=`(list _?>(?=(^ a) n.a))`~
346− |- ^+ b
401+ |- ^+ b
347− =+ 0 :: hack for jet match
402+ =+ 0 :: hack for jet match
348− ?~ a
403+ ?~ a
349− b
404+ b
350− $(a r.a, b [n.a $(a l.a)])
405+ $(a r.a, b [n.a $(a l.a)])
351```
406```
352
407
353#### Examples
408#### Examples
354
409
355```
410```
356− > =a (~(gas to `(qeu @)`~) [3 1 2 4 5 6 ~])
411+> =a (~(gas to `(qeu @)`~) [3 1 2 4 5 6 ~])
357− > `*`a
412+> `*`a
358− [6 0 2 [4 [5 0 0] 0] 1 0 3 0 0]
413+[6 0 2 [4 [5 0 0] 0] 1 0 3 0 0]
359− > ~(tap to a)
414+
360− ~[3 1 2 4 5 6]
415+> ~(tap to a)
416+~[3 1 2 4 5 6]
361```
417```
362
418
363---
419---
420+
364### `++top:to`
421### `++top:to`
365
422
366Produce head
423Produce head
@@ -378,19 +435,18 @@ A unit.
378#### Source
435#### Source
379
436
380```hoon
437```hoon
381− ++ top :: produces head
438+++ top
382− |- ^- (unit _?>(?=(^ a) n.a))
439+ |- ^- (unit _?>(?=(^ a) n.a))
383− ?~ a ~
440+ ?~ a ~
384− ?~(r.a [~ n.a] $(a r.a))
441+ ?~(r.a [~ n.a] $(a r.a))
385− --
386```
442```
387
443
388#### Examples
444#### Examples
389
445
390```
446```
391− > =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 ~])
447+> =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 ~])
392− > ~(top to a)
448+> ~(top to a)
393− [~ u=1]
449+[~ u=1]
394```
450```
395
451
396#### Discussion
452#### Discussion
content/docs/hoon/reference/stdlib/2l.md+5−3
@@ -4,7 +4,7 @@ weight = 15
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++malt`
7+## `++malt`
8
8
9Map from list
9Map from list
10
10
@@ -37,7 +37,8 @@ A map.
37```
37```
38
38
39---
39---
40−### `++molt`
40+
41+## `++molt`
41
42
42Map from pair list
43Map from pair list
43
44
@@ -75,7 +76,8 @@ A map.
75Only used internally as a helper to `malt`.
76Only used internally as a helper to `malt`.
76
77
77---
78---
78−### `++silt`
79+
80+## `++silt`
79
81
80Set from list
82Set from list
81
83
content/docs/hoon/reference/stdlib/2m.md+40−32
@@ -4,7 +4,7 @@ weight = 16
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++ly`
7+## `++ly`
8
8
9List from raw noun
9List from raw noun
10
10
@@ -40,7 +40,8 @@ A `list`.
40`ly` is an alias for `le:nl`.
40`ly` is an alias for `le:nl`.
41
41
42---
42---
43−### `++my`
43+
44+## `++my`
44
45
45Map from raw noun
46Map from raw noun
46
47
@@ -73,7 +74,8 @@ A `map`.
73`my` is an alias for `my:nl`.
74`my` is an alias for `my:nl`.
74
75
75---
76---
76−### `++sy`
77+
78+## `++sy`
77
79
78Set from raw noun
80Set from raw noun
79
81
@@ -112,7 +114,8 @@ A `set`.
112`sy` is an alias for `si:nl`.
114`sy` is an alias for `si:nl`.
113
115
114---
116---
115−### `++nl`
117+
118+## `++nl`
116
119
117Noun-to-container operations
120Noun-to-container operations
118
121
@@ -127,6 +130,7 @@ nouns.
127```
130```
128
131
129---
132---
133+
130### `++le:nl`
134### `++le:nl`
131
135
132Construct list
136Construct list
@@ -144,12 +148,12 @@ A list.
144#### Source
148#### Source
145
149
146```hoon
150```hoon
147− ++ le :: construct list
151+++ le
148− |* a=(list)
152+ |* a=(list)
149− ^+ =< $
153+ ^+ =< $
150− |@ ++ $ ?:(*? ~ [i=(snag 0 a) t=$])
154+ |@ ++ $ ?:(*? ~ [i=(snag 0 a) t=$])
151− --
155+ --
152− a
156+ a
153```
157```
154
158
155#### Examples
159#### Examples
@@ -163,6 +167,7 @@ A list.
163```
167```
164
168
165---
169---
170+
166### `++my:nl`
171### `++my:nl`
167
172
168Construct map
173Construct map
@@ -181,10 +186,10 @@ A map.
181#### Source
186#### Source
182
187
183```hoon
188```hoon
184− ++ my
189+++ my
185− |* a=(list (pair))
190+ |* a=(list (pair))
186− => .(a ^+((le a) a))
191+ => .(a ^+((le a) a))
187− (~(gas by `(map _p.i.-.a _q.i.-.a)`~) a)
192+ (~(gas by `(map _p.i.-.a _q.i.-.a)`~) a)
188```
193```
189
194
190#### Examples
195#### Examples
@@ -195,6 +200,7 @@ A map.
195```
200```
196
201
197---
202---
203+
198### `++si:nl`
204### `++si:nl`
199
205
200Construct set
206Construct set
@@ -212,10 +218,10 @@ A set.
212#### Source
218#### Source
213
219
214```hoon
220```hoon
215− ++ si
221+++ si
216− |* a=(list)
222+ |* a=(list)
217− => .(a ^+((le a) a))
223+ => .(a ^+((le a) a))
218− (~(gas in `(set _i.-.a)`~) a)
224+ (~(gas in `(set _i.-.a)`~) a)
219```
225```
220
226
221#### Examples
227#### Examples
@@ -226,6 +232,7 @@ A set.
226```
232```
227
233
228---
234---
235+
229### `++snag:nl`
236### `++snag:nl`
230
237
231Index
238Index
@@ -246,13 +253,13 @@ A noun.
246#### Sources
253#### Sources
247
254
248```hoon
255```hoon
249− ++ snag
256+++ snag
250− |* [a=@ b=(list)]
257+ |* [a=@ b=(list)]
251− ?~ b
258+ ?~ b
252− ~_ leaf+"snag-fail"
259+ ~_ leaf+"snag-fail"
253− !!
260+ !!
254− ?: =(0 a) i.b
261+ ?: =(0 a) i.b
255− $(b t.b, a (dec a))
262+ $(b t.b, a (dec a))
256```
263```
257
264
258#### Examples
265#### Examples
@@ -268,6 +275,7 @@ A noun.
268```
275```
269
276
270---
277---
278+
271### `++weld:nl`
279### `++weld:nl`
272
280
273Concatenate
281Concatenate
@@ -287,13 +295,13 @@ A list.
287#### Source
295#### Source
288
296
289```hoon
297```hoon
290− ++ weld
298+++ weld
291− |* [a=(list) b=(list)]
299+ |* [a=(list) b=(list)]
292− => .(a ^+((le a) a), b ^+((le b) b))
300+ => .(a ^+((le a) a), b ^+((le b) b))
293− =+ 42
301+ =+ 42
294− |-
302+ |-
295− ?~ a b
303+ ?~ a b
296− [i=i.a t=$(a t.a)]
304+ [i=i.a t=$(a t.a)]
297```
305```
298
306
299#### Examples
307#### Examples
content/docs/hoon/reference/stdlib/2n.md+152−138
@@ -4,7 +4,39 @@ weight = 17
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++cork`
7+## `++aftr`
8+
9+Pair after
10+
11+`+aftr` first takes gate `a`, producing a wet gate. The new wet gate then takes `b`, producing the inverted pair of `[b a]`. This is the inverted version of [+fore](#fore).
12+
13+#### Accepts
14+
15+`a` is a gate, and the sample of `+aftr`.
16+
17+`b` is a gate, and the sample of `(aftr a)`.
18+
19+#### Produces
20+
21+`(pair b a)`.
22+
23+#### Source
24+
25+```hoon
26+++ aftr |*(a=$-(* *) |*(b=$-(* *) (pair b a)))
27+```
28+
29+#### Examples
30+
31+```
32+> =a (aftr @ud)
33+> `(a @t)`['foo' 42]
34+[p='foo' q=42]
35+```
36+
37+---
38+
39+## `++cork`
8
40
9Compose forward
41Compose forward
10
42
@@ -37,7 +69,7 @@ Build `f` such that `(f x) .= (b (a x))`.
37
69
38---
70---
39
71
40−### `++corl`
72+## `++corl`
41
73
42Compose backward
74Compose backward
43
75
@@ -52,7 +84,7 @@ Build `f` such that
52#### Source
84#### Source
53
85
54```hoon
86```hoon
55−++ corl :: compose backwards
87+++ corl
56 |* [a=$-(* *) b=$-(* *)]
88 |* [a=$-(* *) b=$-(* *)]
57 =< +:|.((a (b))) :: type check
89 =< +:|.((a (b))) :: type check
58 =+ c=+<.b
90 =+ c=+<.b
@@ -69,7 +101,7 @@ Build `f` such that
69
101
70---
102---
71
103
72−### `++curr` {#curry}
104+## `++curr` {#curry}
73
105
74Right curry
106Right curry
75
107
@@ -88,10 +120,11 @@ A gate.
88#### Source
120#### Source
89
121
90```hoon
122```hoon
91− ++ curr
123+++ curr
92− |* [a=_|=(^ **) c=*}
124+ |* [a=$-(^ *) c=*]
93− |* b=_+<+.a
125+ =+ b=+<+.a
94− (a b c)
126+ |@ ++ $ (a b c)
127+ --
95```
128```
96
129
97#### Examples
130#### Examples
@@ -107,7 +140,7 @@ A gate.
107
140
108---
141---
109
142
110−### `++cury`
143+## `++cury`
111
144
112Curry left
145Curry left
113
146
@@ -126,10 +159,11 @@ A gate.
126#### Source
159#### Source
127
160
128```hoon
161```hoon
129− ++ cury
162+++ cury
130− |* [a=_|=(^ **) b=*}
163+ |* [a=$-(^ *) b=*]
131− |* c=_+<+.a
164+ =+ c=+<+.a
132− (a b c)
165+ |@ ++ $ (a b c)
166+ --
133```
167```
134
168
135#### Examples
169#### Examples
@@ -145,79 +179,39 @@ A gate.
145
179
146---
180---
147
181
148−### `++hard`
182+## `++fore`
149
183
150−Force remold
184+Pair before
151
185
152−Demands that a specific type be produced, crashing the program if it is
186+`+fore` first takes gate `a`, producing a wet gate. The new wet gate then takes `b`, producing the pair of `[a b]`.
153−not.
154
187
155−#### Source
188+#### Accepts
156−
157−```hoon
158− ++ hard
159− |* han=gate
160− |= fud=* ^- han
161− ~_ leaf+"hard"
162− =+ gol=(han fud)
163− ?>(=(gol fud) gol)
164−```
165−
166−#### Examples
167−
168−```
169− > ((hard (list)) (limo [1 2 3 ~]))
170− ~[1 2 3]
171− > ((hard @) (add 2 2))
172− 4
173− > ((hard @t) (crip "Tape to cord, bro!"))
174− 'Tape to cord, bro'
175− > ((hard tape) (crip "...Tape to cord, bro?..."))
176− ! hard
177− ! exit
178−```
179
189
180−---
190+`a` is a gate, and is the sample of `+fore`.
181
191
182−### `++soft`
192+`b` is a gate, and is the sample of `(fore a)`.
183
193
184−Maybe remold
194+#### Produces
185
195
186−Politely requests a specific type to be produced, producing null if it
196+`(pair a b)`.
187−is not.
188
197
189#### Source
198#### Source
190
199
191```hoon
200```hoon
192− ++ soft
201+++ fore |*(a=$-(* *) |*(b=$-(* *) (pair a b)))
193− |* han=gate
194− |= fud=* ^- (unit han)
195− =+ gol=(han fud)
196− ?.(=(gol fud) ~ [~ gol])
197```
202```
198
203
199#### Examples
204#### Examples
200
205
201```
206```
202− > ((soft %4) (add 2 2))
207+> =a (fore @ud)
203− [~ %4]
208+> `(a @t)`[42 'foo']
204−
209+[p=42 q='foo']
205− > ((soft @) (add 2 2))
206− [~ 4]
207−
208− > ((soft %5) (add 2 2))
209− ~
210−
211− > ((soft @t) (crip "Tape to cord, Woohoo!"))
212− [~ 'Tape to cord, Woohoo!']
213−
214− > ((soft @t) (trip 'Cmon man... Tape to cord? Please?!'))
215− ~
216```
210```
217
211
218---
212---
219
213
220−### `++head`
214+## `++head`
221
215
222Get head
216Get head
223
217
@@ -229,30 +223,30 @@ A cell.
229
223
230#### Produces
224#### Produces
231
225
232−An atom.
226+A noun.
233
227
234#### Source
228#### Source
235
229
236```hoon
230```hoon
237− ++ head |*(^ ,:+<-)
231+++ head |*(^ ,:+<-)
238```
232```
239
233
240#### Examples
234#### Examples
241
235
242```
236```
243− > (head [1 2])
237+> (head [1 2])
244− 1
238+1
245
239
246− > (head [[1 1] 2])
240+> (head [[1 1] 2])
247− [1 1]
241+[1 1]
248
242
249− > (head "hello")
243+> (head "hello")
250− 'h'
244+'h'
251```
245```
252
246
253---
247---
254
248
255−### `++same`
249+## `++same`
256
250
257Identity
251Identity
258
252
@@ -269,98 +263,54 @@ A noun.
269#### Source
263#### Source
270
264
271```hoon
265```hoon
272− ++ same |*(* +<)
266+++ same |*(* +<)
273```
267```
274
268
275#### Examples
269#### Examples
276
270
277```
271```
278− > (same [1 2])
272+> (same [1 2])
279− [1 2]
273+[1 2]
280
274
281− > (same [[1 1] 2])
275+> (same [[1 1] 2])
282− [[1 1] 2]
276+[[1 1] 2]
283
277
284− > (same "hello")
278+> (same "hello")
285− "hello"
279+"hello"
286```
280```
287
281
288---
282---
289
283
290−### `++slog`
284+## `++succ`
291
285
292−Deify printf
286+Successor
293
287
294−Produces a stack trace if the stack trace isn't null, then produces the other
288+Increment an atom.
295−input.
296
289
297#### Accepts
290#### Accepts
298
291
299−A `tang`.
292+An `atom`.
300
293
301#### Produces
294#### Produces
302
295
303−A `tang`.
296+An `atom`.
304
297
305#### Source
298#### Source
306
299
307```hoon
300```hoon
308− ++ slog
301+++ succ |=(@ +(+<))
309− =| pri=@
310− |= a=tang ^+ same
311− ?~(a same ~>(%slog.[pri i.a] $(a t.a)))
312```
302```
313
303
314#### Examples
304#### Examples
315
305
316```
306```
317− > =+ result=((slog [%leaf "error-message"]~) [12 13]) [%product result]
307+> (succ 1)
318− [%product 12 13]
308+2
319```
309```
320
310
321−#### Discussion
322−
323−`slog` is intended to be put in the middle of a bunch of chained function
324−calls that string a piece of data through them, so that an error message will be
325−printed if there's one to print.
326−
327---
311---
328
312
329−### `++mean`
313+## `++tail`
330−
331−Crash and printf
332−
333−Ends the program and produces a `tang` tracing error message.
334−
335−#### Accepts
336−
337−`a` is a tang.
338−
339−#### Produces
340−
341−A crash.
342−
343−#### Source
344−
345−```hoon
346− ++ mean
347− |= a=tang
348− ^+ !!
349− ?~ a !!
350− ~_(i.a $(a t.a))
351−```
352−
353−#### Examples
354−
355−```
356− > ~>(%mean.[%leaf "fuse-loop"] !!)
357− ####
358− !! crash
359−```
360−
361−---
362−
363−### `++tail`
364
314
365Get tail
315Get tail
366
316
@@ -377,7 +327,7 @@ A noun.
377#### Source
327#### Source
378
328
379```hoon
329```hoon
380− ++ tail |*(^ ,:+<+)
330+++ tail |*(^ ,:+<+)
381```
331```
382
332
383#### Examples
333#### Examples
@@ -395,7 +345,7 @@ A noun.
395
345
396---
346---
397
347
398−### `++test`
348+## `++test`
399
349
400Test for equality
350Test for equality
401
351
@@ -414,7 +364,7 @@ A flag.
414#### Source
364#### Source
415
365
416```hoon
366```hoon
417− ++ test |=(^ =(+<- +<+))
367+++ test |=(^ =(+<- +<+))
418```
368```
419
369
420#### Examples
370#### Examples
@@ -434,3 +384,67 @@ A flag.
434```
384```
435
385
436---
386---
387+
388+## `++lead`
389+
390+Put head
391+
392+`(lead a)` produces a wet gate, then `((lead a) b)` produces `[a b]`.
393+
394+#### Accepts
395+
396+`a` is a noun, and is the sample of `+lead`.
397+
398+`b` is a noun, and is the sample of `((lead a) b)`
399+
400+#### Produces
401+
402+A cell of `[a b]`.
403+
404+#### Source
405+
406+```hoon
407+++ lead |*(* |*(* [+>+< +<]))
408+```
409+
410+#### Examples
411+
412+```
413+> =a (lead 'foo')
414+> (a 'bar')
415+['foo' 'bar']
416+```
417+
418+---
419+
420+## `++late`
421+
422+Put tail
423+
424+`(late a)` produces a wet gate, then `((late a) b)` produces the inverted cell `[b a]`. This is the inverted version of [+lead](#lead).
425+
426+#### Accepts
427+
428+`a` is a noun, and is the sample of `+late`.
429+
430+`b` is a noun, and is the sample of `(late a)`.
431+
432+#### Produces
433+
434+A cell of `[b a]`.
435+
436+#### Source
437+
438+```hoon
439+++ late |*(* |*(* [+< +>+<]))
440+```
441+
442+#### Examples
443+
444+```
445+> =a (late 'foo')
446+> (a 'bar')
447+['bar' 'foo']
448+```
449+
450+---
content/docs/hoon/reference/stdlib/2o.md+99−86
@@ -4,109 +4,115 @@ weight = 18
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++jar`
7+## `++jar`
8
8
9Mold generator. A `jar` is a `map` of `list`.
9Mold generator. A `jar` is a `map` of `list`.
10
10
11+Produces the mold of a map from `key` to lists of `value`.
12+
13+#### Accepts
14+
15+`key` is a `mold`, and is the type of the map key
16+
17+`value` is a `mold`, and is the type of items in the lists. The lists are the values in the map.
18+
19+#### Produces
20+
21+A `mold`.
22+
11#### Source
23#### Source
12
24
13```hoon
25```hoon
14− ++ jar |*([a=mold b=mold] (map a (list b)))
26+++ jar |$ [key value] (map key (list value))
15```
27```
16
28
17#### Examples
29#### Examples
18
30
19```
31```
20− > =a (ly [1 2 ~])
32+> `(jar @t @ud)`(malt ~[['foo' ~[1 2 3]] ['bar' ~[4 5 6]]])
21− > a
33+{[p='bar' q=~[4 5 6]] [p='foo' q=~[1 2 3]]}
22− ~[1 2]
34+```
23
35
24− > =b (ly [3 4 ~])
36+#### Discussion
25− > b
26− ~[3 4]
27
37
28− > =c (my [[%a a] [%b b] ~])
38+See also: [`ja`](/docs/hoon/reference/stdlib/2j#ja), [`by`](/docs/hoon/reference/stdlib/2i), [`map`](#map), [lists](/docs/hoon/reference/stdlib/2b)
29− > c
30− [n=[p=%b q=[i=3 t=~[4]]] l={[p=%a q=[i=1 t=[i=2 t=~]]]} r={}]
31
39
32− > (~(get ja c) %a)
40+---
33− [i=1 t=[i=2 t=~]]
34
41
35− > (~(get ja c) %c)
42+## `++jug`
36− ~
37−```
38
43
39−#### Discussion
44+Mold generator. A `jug` is a `map` of `set`.
40
45
41−See also: [`ja`](/docs/hoon/reference/stdlib/2j), [`by`](/docs/hoon/reference/stdlib/2i), [`map`](/docs/hoon/reference/stdlib/2i), [`list`](/docs/hoon/reference/stdlib/2b)
46+Produces the mold of a map from `key` to sets of `value`.
42
47
43−---
48+#### Accepts
44−### `++jug`
45
49
46−Mold generator. A `jug` is a `map` of `set`.
50+`key` is a `mold`, and is the type of the map key.
51+
52+`value` is a `mold`, and is the type of items in the sets. The sets are the values in the map.
53+
54+#### Produces
55+
56+A `mold`.
47
57
48#### Source
58#### Source
49
59
50```hoon
60```hoon
51− ++ jug |*([a=mold b=mold] (map a (set b)))
61+++ jug |$ [key value] (map key (set value))
52```
62```
53
63
54#### Examples
64#### Examples
55
65
56```
66```
57− > =a (sy [1 2 ~])
67+> `(jug @t @ud)`(malt ~[['foo' (silt ~[1 2 3])] ['bar' (silt ~[4 5 6])]])
58− > a
68+{[p='bar' q={5 6 4}] [p='foo' q={1 2 3}]}
59− [n=2 l={1} r={}]
60−
61− > =b (sy [3 4 ~])
62− > b
63− [n=4 l={} r={3}]
64−
65− > =c (my [%a a] [%b b] ~])
66− > c
67− [n=[p=%b q=[n=4 l={} r={3}]] l={[p=%a q=[n=2 l={1} r={}]]} r={}]
68−
69− > (~(get ju c) %b)
70− [n=4 l=~ r=[n=3 l={} r={}]]
71−
72− > (~(put ju c) [%b 5])
73− [ n=[p=%b q=[n=4 l=[n=5 l={} r={}] r=[n=3 l={} r={}]]]
74− l=[n=[p=%a q=[n=2 l=[n=1 l={} r={}] r=~]] l={} r={}]
75− r=~
76− ]
77```
69```
78
70
79#### Discussion
71#### Discussion
80
72
81−See also: [`ja`](/docs/hoon/reference/stdlib/2j), [`by`](/docs/hoon/reference/stdlib/2i), [`set`](/docs/hoon/reference/stdlib/2h)
73+See also: [`ju`](/docs/hoon/reference/stdlib/2j#ju), [`by`](/docs/hoon/reference/stdlib/2i), [`map`](#map), [`set`](#set)
82
74
83---
75---
84−### `++map`
76+
77+## `++map`
85
78
86Map
79Map
87
80
88Mold generator. A `map` is a [treap](https://en.wikipedia.org/wiki/Treap) of
81Mold generator. A `map` is a [treap](https://en.wikipedia.org/wiki/Treap) of
89key-value pairs.
82key-value pairs.
90
83
84+Produces the mold of a map from `key` to `value`.
85+
86+#### Accepts
87+
88+`key` is a `mold`.
89+
90+`value` is a `mold`.
91+
92+#### Produces
93+
94+A `mold`.
91
95
92#### Source
96#### Source
93
97
94```hoon
98```hoon
95− ++ map |* [a=mold b=mold]
99+++ map
96− %+ cork (tree (pair a b))
100+ |$ [key value]
97− |= c=(tree (pair a b)) ^+ c
101+ $| (tree (pair key value))
98− ?.(~(apt by c) ~ c)
102+ |=(a=(tree (pair)) ?:(=(~ a) & ~(apt by a)))
99```
103```
100
104
101#### Examples
105#### Examples
102
106
103```
107```
104− > ? *(map @t @u)
108+> ? *(map @t @ud)
105− nlr({p/@t q/@u})
109+ nlr([p=@t q=@ud])
106− {}
110+{}
111+```
107
112
108− > (molt `(list (pair * *))`[[a+1 b+2] ~])
113+```
109− [n=[p=[97 1] q=[98 2]] l={} r={}]
114+> `(map @t @ud)`(malt ~[['foo' 1] ['bar' 2] ['baz' 3]])
115+{[p='bar' q=2] [p='baz' q=3] [p='foo' q=1]}
110```
116```
111
117
112#### Discussion
118#### Discussion
@@ -114,74 +120,81 @@ key-value pairs.
114See also: [`by`](/docs/hoon/reference/stdlib/2i)
120See also: [`by`](/docs/hoon/reference/stdlib/2i)
115
121
116---
122---
117−### `++qeu`
123+
124+## `++qeu`
118
125
119Queue
126Queue
120
127
121Mold generator. An ordered [treap](http://en.wikipedia.org/wiki/Treap) of
128Mold generator. An ordered [treap](http://en.wikipedia.org/wiki/Treap) of
122items.
129items.
123
130
131+Produces the mold of a queue of `item`.
132+
133+#### Accepts
134+
135+`item` is a `mold`.
136+
137+#### Produces
138+
139+A `mold`.
140+
124#### Source
141#### Source
125
142
126```hoon
143```hoon
127− ++ qeu |*(a=mold (tree a))
144+++ qeu
145+ |$ [item]
146+ $| (tree item)
147+ |=(a=(tree) ?:(=(~ a) & ~(apt to a)))
128```
148```
129
149
130−
131#### Examples
150#### Examples
132
151
133```
152```
134− > (qeu time)
153+> `(qeu @ud)`(~(gas to *(qeu @ud)) ~[1 2 3 4 5])
135− < 1.huj
154+{5 4 3 2 1}
136− { *
137− < 1.zda
138− { a/<1.vyv {* <112.lqf 224.nab 54.tyv 119.veb 31.ohr 1.jmk $143>}>
139− <31.ohr 1.jmk $143>
140− }
141− >
142− }
143−
144−
145− > (~(gas to *(qeu time)) [~2014.1.1 ~2014.1.2 ~])
146− [n=~2014.1.2 l={} r={~2014.1.1}]
147```
155```
148
156
149#### Discussion
157#### Discussion
150
158
151−See also: [`qeu`](/docs/hoon/reference/stdlib/2k)
159+See also: [`+to`](/docs/hoon/reference/stdlib/2k#to)
152
160
153---
161---
154−### `++set`
162+
163+## `++set`
155
164
156Set
165Set
157
166
158−Mold generator. A `qeu` is an ordered [treap](http://en.wikipedia.org/wiki/Treap) of
167+Mold generator. A `set` is an unordered [treap](http://en.wikipedia.org/wiki/Treap) of
159items.
168items.
160
169
170+Produces the mold of a set of `item`.
171+
172+#### Accepts
173+
174+`item` is a `mold`.
175+
176+#### Produces
177+
178+A `mold`.
179+
161#### Source
180#### Source
162
181
163```hoon
182```hoon
164− ++ set |* a=mold
183+++ set
165− %+ cork (tree a)
184+ |$ [item]
166− |= b=(tree a) ^+ b
185+ $| (tree item)
167− ?.(~(apt in b) ~ b)
186+ |=(a=(tree) ?:(=(~ a) & ~(apt in a)))
168```
187```
169
188
170#### Examples
189#### Examples
171
190
172```
191```
173− > (sy "abc")
192+> `(set @ud)`(silt ~[1 2 3 4 5])
174− [n='b' l={'a' 'c'} r={}]
193+{5 1 2 3 4}
175−
176− > (~(put in (sy "abc")) %d)
177− [n='b' l=[n='d' l={} r={'a' 'c'}] r=~]
178−
179− > (~(put in (sy "abc")) %a)
180− [n='b' l=[n='c' l={'a'} r={}] r=~]
181```
194```
182
195
183#### Discussion
196#### Discussion
184
197
185−See also: [`in`](/docs/hoon/reference/stdlib/2h)
198+See also: [`+in`](/docs/hoon/reference/stdlib/2h)
186
199
187−---
200+---
content/docs/hoon/reference/stdlib/2p.md+125−119
@@ -4,15 +4,15 @@ weight = 19
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++cue` {#cue}
7+## `++cue` {#cue}
8
8
9Unpack atom to noun
9Unpack atom to noun
10
10
11−Produces a noun unpacked from atom `a`. The inverse of `jam`.
11+Produces a noun unpacked from atom `a`. The inverse of [+jam](#jam).
12
12
13#### Accepts
13#### Accepts
14
14
15−An Atom.
15+`a` is an atom.
16
16
17#### Produces
17#### Produces
18
18
@@ -21,49 +21,44 @@ A noun.
21#### Source
21#### Source
22
22
23```hoon
23```hoon
24− ++ cue
24+++ cue
25− ~/ %cue
25+ ~/ %cue
26− |= a=@
26+ |= a=@
27− ^- *
27+ ^- *
28− =+ b=0
28+ =+ b=0
29− =+ m=`(map @ *)`~
29+ =+ m=`(map @ *)`~
30− =< q
30+ =< q
31− |- ^- [p=@ q=* r=(map @ *)]
31+ |- ^- [p=@ q=* r=(map @ *)]
32− ?: =(0 (cut 0 [b 1] a))
32+ ?: =(0 (cut 0 [b 1] a))
33− =+ c=(rub +(b) a)
33+ =+ c=(rub +(b) a)
34− [+(p.c) q.c (~(put by m) b q.c)]
34+ [+(p.c) q.c (~(put by m) b q.c)]
35− =+ c=(add 2 b)
35+ =+ c=(add 2 b)
36− ?: =(0 (cut 0 [+(b) 1] a))
36+ ?: =(0 (cut 0 [+(b) 1] a))
37− =+ u=$(b c)
37+ =+ u=$(b c)
38− =+ v=$(b (add p.u c), m r.u)
38+ =+ v=$(b (add p.u c), m r.u)
39− =+ w=[q.u q.v]
39+ =+ w=[q.u q.v]
40− [(add 2 (add p.u p.v)) w (~(put by r.v) b w)]
40+ [(add 2 (add p.u p.v)) w (~(put by r.v) b w)]
41− =+ d=(rub c a)
41+ =+ d=(rub c a)
42− [(add 2 p.d) (need (~(get by m) q.d)) m]
42+ [(add 2 p.d) (need (~(get by m) q.d)) m]
43```
43```
44
44
45#### Examples
45#### Examples
46
46
47```
47```
48− > (cue 12)
48+> (jam [1 2 3])
49− 1
49+3.426.417
50−
51− > (cue 817)
52− [1 1]
53−
54− > (cue 4.657)
55− [1 2]
56
50
57− > (cue 39.689)
51+> (cue 3.426.417)
58− [0 19]
52+[1 2 3]
59```
53```
60
54
61---
55---
62−### `++jam` {#jam}
56+
57+## `++jam` {#jam}
63
58
64Pack noun to atom
59Pack noun to atom
65
60
66−Produces an atom packed from noun `a`. The inverse of `cue`.
61+Produces an atom packed from noun `a`. The inverse of [+cue](#cue).
67
62
68#### Accepts
63#### Accepts
69
64
@@ -76,53 +71,60 @@ An atom.
76#### Source
71#### Source
77
72
78```hoon
73```hoon
79− ++ jam
74+++ jam
80− ~/ %jam
75+ ~/ %jam
81− |= a=*
76+ |= a=*
82− ^- @
77+ ^- @
83− =+ b=0
78+ =+ b=0
84− =+ m=`(map * @)`~
79+ =+ m=`(map * @)`~
85− =< q
80+ =< q
86− |- ^- [p=@ q=@ r=(map * @)]
81+ |- ^- [p=@ q=@ r=(map * @)]
87− =+ c=(~(get by m) a)
82+ =+ c=(~(get by m) a)
88− ?~ c
83+ ?~ c
89− => .(m (~(put by m) a b))
84+ => .(m (~(put by m) a b))
90− ?: ?=(@ a)
85+ ?: ?=(@ a)
91− =+ d=(mat a)
86+ =+ d=(mat a)
92− [(add 1 p.d) (lsh 0 1 q.d) m]
87+ [(add 1 p.d) (lsh 0 q.d) m]
93− => .(b (add 2 b))
88+ => .(b (add 2 b))
94− =+ d=$(a -.a)
89+ =+ d=$(a -.a)
95− =+ e=$(a +.a, b (add b p.d), m r.d)
90+ =+ e=$(a +.a, b (add b p.d), m r.d)
96− [(add 2 (add p.d p.e)) (mix 1 (lsh 0 2 (cat 0 q.d q.e))) r.e]
91+ [(add 2 (add p.d p.e)) (mix 1 (lsh [0 2] (cat 0 q.d q.e))) r.e]
97− ?: ?&(?=(@ a) (lte (met 0 a) (met 0 u.c)))
92+ ?: ?&(?=(@ a) (lte (met 0 a) (met 0 u.c)))
98− =+ d=(mat a)
93+ =+ d=(mat a)
99− [(add 1 p.d) (lsh 0 1 q.d) m]
94+ [(add 1 p.d) (lsh 0 q.d) m]
100− =+ d=(mat u.c)
95+ =+ d=(mat u.c)
101− [(add 2 p.d) (mix 3 (lsh 0 2 q.d)) m]
96+ [(add 2 p.d) (mix 3 (lsh [0 2] q.d)) m]
102```
97```
103
98
104#### Examples
99#### Examples
105
100
106```
101```
107− > (jam 1)
102+> (jam 1)
108− 12
103+12
109
104
110− > (jam [1 1])
105+> (cue 12)
111− 817
106+1
107+```
112
108
113− > (jam [1 2])
109+```
114− 4.657
110+> (jam [1 1])
111+817
115
112
116− > (jam [~ u=19])
113+> (cue 817)
117− 39.689
114+[1 1]
118```
115```
119
116
120−#### Discussion
117+```
118+> (jam [~ u=19])
119+39.689
121
120
122−`mat` is only used internally as a helper to `jam`.
121+> (cue 39.689)
122+[0 19]
123+```
123
124
124---
125---
125−### `++mat`
126+
127+## `++mat`
126
128
127Length-encode
129Length-encode
128
130
@@ -136,54 +138,58 @@ is the length of `q` in bits.
136
138
137#### Produces
139#### Produces
138
140
139−A cell of two atoms.
141+A cell of two atoms, `p` and `q`.
140
142
141#### Source
143#### Source
142
144
143```hoon
145```hoon
144− ++ mat
146+++ mat
145− ~/ %mat
147+ ~/ %mat
146− |= a=@
148+ |= a=@
147− ^- [p=@ q=@]
149+ ^- [p=@ q=@]
148− ?: =(0 a)
150+ ?: =(0 a)
149− [1 1]
151+ [1 1]
150− =+ b=(met 0 a)
152+ =+ b=(met 0 a)
151− =+ c=(met 0 b)
153+ =+ c=(met 0 b)
152− :- (add (add c c) b)
154+ :- (add (add c c) b)
153− (cat 0 (bex c) (mix (end 0 (dec c) b) (lsh 0 (dec c) a)))
155+ (cat 0 (bex c) (mix (end [0 (dec c)] b) (lsh [0 (dec c)] a)))
154```
156```
155
157
156#### Examples
158#### Examples
157
159
158```
160```
159− > (mat 0xaaa)
161+> (mat 0xaaa)
160− [p=20 q=699.024]
162+[p=20 q=699.024]
161
163
162− > (met 0 q:(mat 0xaaa))
164+> (met 0 q:(mat 0xaaa))
163− 20
165+20
164
166
165− > `@ub`q:(mat 0xaaa)
167+> `@ub`q:(mat 0xaaa)
166− 0b1010.1010.1010.1001.0000
168+0b1010.1010.1010.1001.0000
167
169
168− > =a =-(~&(- -) `@ub`0xaaa)
170+> =a =-(~&(- -) `@ub`0xaaa)
169− 0b1010.1010.1010
171+0b1010.1010.1010
170
172
171− > =b =-(~&(- -) `@ub`(xeb a))
173+> =b =-(~&(- -) `@ub`(xeb a))
172− 0b1100
174+0b1100
173
175
174− > =b =-(~&(- -) `@ub`(met 0 a))
176+> =b =-(~&(- -) `@ub`(met 0 a))
175− 0b1100
177+0b1100
176
178
177− > =c =-(~&(- -) (xeb b))
179+> =c =-(~&(- -) (xeb b))
178− 4
180+4
179
181
180− > [`@ub`a `@ub`(end 0 (dec c) b) `@ub`(bex c)]
182+> [`@ub`a `@ub`(end 0 (dec c) b) `@ub`(bex c)]
181− [0b1010.1010.1010 0b100 0b1.0000]
183+[0b1010.1010.1010 0b100 0b1.0000]
182```
184```
183
185
186+#### Discussion
187+
188+`mat` is only used internally as a helper to [`jam`](#jam).
184
189
185---
190---
186−### `++rub`
191+
192+## `++rub`
187
193
188Length-decode
194Length-decode
189
195
@@ -200,43 +206,43 @@ offset `a` is advanced.
200
206
201#### Produces
207#### Produces
202
208
203−A cell of two atoms.
209+A cell of two atoms, `p` and `q`.
204
210
205#### Source
211#### Source
206
212
207```hoon
213```hoon
208− ++ rub
214+++ rub
209− ~/ %rub
215+ ~/ %rub
210− |= [a=@ b=@]
216+ |= [a=@ b=@]
211− ^- [p=@ q=@]
217+ ^- [p=@ q=@]
212− =+ ^= c
218+ =+ ^= c
213− =+ [c=0 m=(met 0 b)]
219+ =+ [c=0 m=(met 0 b)]
214− |- ?< (gth c m)
220+ |- ?< (gth c m)
215− ?. =(0 (cut 0 [(add a c) 1] b))
221+ ?. =(0 (cut 0 [(add a c) 1] b))
216− c
222+ c
217− $(c +(c))
223+ $(c +(c))
218− ?: =(0 c)
224+ ?: =(0 c)
219− [1 0]
225+ [1 0]
220− =+ d=(add a +(c))
226+ =+ d=(add a +(c))
221− =+ e=(add (bex (dec c)) (cut 0 [d (dec c)] b))
227+ =+ e=(add (bex (dec c)) (cut 0 [d (dec c)] b))
222− [(add (add c c) e) (cut 0 [(add d (dec c)) e] b)]
228+ [(add (add c c) e) (cut 0 [(add d (dec c)) e] b)]
223```
229```
224
230
225#### Examples
231#### Examples
226
232
227```
233```
228− > `@ub`(jam 0xaaa)
234+> `@ub`(jam 0xaaa)
229− 0b1.0101.0101.0101.0010.0000
235+0b1.0101.0101.0101.0010.0000
230
236
231− > (rub 1 0b1.0101.0101.0101.0010.0000)
237+> (rub 1 0b1.0101.0101.0101.0010.0000)
232− [p=20 q=2.730]
238+[p=20 q=2.730]
233
239
234− > `@ux`q:(rub 1 0b1.0101.0101.0101.0010.0000)
240+> `@ux`q:(rub 1 0b1.0101.0101.0101.0010.0000)
235− 0xaaa
241+0xaaa
236```
242```
237
243
238#### Discussion
244#### Discussion
239
245
240−`rub` is only used internally as a helper to `cue`.
246+`rub` is only used internally as a helper to [`cue`](#cue).
241
247
242---
248---
content/docs/hoon/reference/stdlib/2q.md+350−139
@@ -4,32 +4,110 @@ weight = 20
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++char`
7+## `+$axis`
8
8
9−Character
9+Tree address
10+
11+A Nock axis inside a noun. After the leading 1, in binary, a `1` signfies
12+right and `0` left.
13+
14+#### Source
15+
16+```hoon
17++$ axis @
18+```
19+
20+#### Examples
21+
22+```
23+> =axis `axis`7
24+> axis
25+7
26+> `@ub`axis
27+0b111
28+
29+> =noun [[4 5] [6 14 15]]
30+
31+> .*(noun [0 axis])
32+[14 15]
33+```
34+
35+---
36+
37+## `+$bean`
38+
39+Boolean
40+
41+`0`, `&`, or `%.y` are true, and `1`, `|`, and `%.n` are false.
42+
43+Note 1 is false and 0 is true. This is sometimes referred to as "loobean".
44+
45+#### Source
46+
47+```hoon
48++$ bean ?
49+```
50+
51+#### Examples
52+
53+```
54+> *bean
55+%.y
56+```
57+
58+```
59+> `bean`&
60+%.y
61+```
62+
63+```
64+> `bean`|
65+%.n
66+```
67+
68+---
69+
70+## `+$flag`
71+
72+Boolean
73+
74+Same as [$bean](#bean).
10
75
11−A single character. Aura `@tD` designates a single UTF-8 byte. All parsers
76+#### Source
12−consume `tape`s, which are lists of `char`.
77+
78+```hoon
79++$ flag ?
80+```
81+
82+---
13
83
84+## `+$char`
85+
86+Character
87+
88+A single `@t` character.
14
89
15#### Source
90#### Source
16
91
17```hoon
92```hoon
18− ++ char @tD
93++$ char @t
19```
94```
20
95
21#### Examples
96#### Examples
22
97
23```
98```
24− > *char
99+> *char
25− ''
100+''
101+```
26
102
27− > `@tD`97
103+```
28− 'a'
104+> `char`'a'
105+'a'
29```
106```
30
107
31---
108---
32−### `++cord`
109+
110+## `+$cord`
33
111
34UTF-8 text
112UTF-8 text
35
113
@@ -39,26 +117,26 @@ atom of UTF-8 text.
39#### Source
117#### Source
40
118
41```hoon
119```hoon
42− ++ cord @t
120++$ cord @t
43```
121```
44
122
45#### Examples
123#### Examples
46
124
47```
125```
48− > *cord
126+> *cord
49− ''
127+''
50
128
51− > `@ux`'foobar'
129+> `@ux`'foobar'
52− 0x7261.626f.6f66
130+0x7261.626f.6f66
53
131
54− > `@t`97
132+> `@t`97
55− 'a'
133+'a'
56
134
57− > `@`'urbit'
135+> `@`'urbit'
58− 499.984.265.845
136+499.984.265.845
59
137
60− > `@t`499.984.265.845
138+> `@t`499.984.265.845
61− 'urbit'
139+'urbit'
62```
140```
63
141
64#### Discussion
142#### Discussion
@@ -66,15 +144,44 @@ atom of UTF-8 text.
66Aura `@t` designates a Unicode atom, little-endian: the first character
144Aura `@t` designates a Unicode atom, little-endian: the first character
67in the text is the least-significant byte.
145in the text is the least-significant byte.
68
146
69−[`trip`](/docs/hoon/reference/stdlib/4b) converts from `cord` to `tape`, and [`crip`](/docs/hoon/reference/stdlib/4b) converts
147+[`trip`](/docs/hoon/reference/stdlib/4b#trip) converts from `cord` to `tape`, and [`crip`](/docs/hoon/reference/stdlib/4b#crip) converts
70from `tape` to `cord`.
148from `tape` to `cord`.
71
149
150+---
151+
152+## `+$byts`
153+
154+bytes, LSB first
155+
156+An atom `dat` with its byte-length specified in `wid`. This is to handle leading zeros that are typically ignored.
72
157
158+#### Source
159+
160+```hoon
161++$ byts [wid=@ud dat=@]
162+```
163+
164+#### Examples
165+
166+```
167+> *byts
168+[wid=0 dat=0]
169+```
170+
171+```
172+> =a `byts`[4 2]
173+> a
174+[wid=4 dat=2]
175+
176+> `@ux`(rev 3 a)
177+0x200.0000
178+```
73
179
74---
180---
75−### `++date`
76
181
77−Point in time
182+## `+$date`
183+
184+Parsed date
78
185
79A boolean designating AD or BC, a year atom, a month atom, and a `tarp`,
186A boolean designating AD or BC, a year atom, a month atom, and a `tarp`,
80which is a day atom and a time.
187which is a day atom and a time.
@@ -82,176 +189,278 @@ which is a day atom and a time.
82#### Source
189#### Source
83
190
84```hoon
191```hoon
85− ++ date [[a=? y=@ud] m=@ud t=tarp]
192++$ date [[a=? y=@ud] m=@ud t=tarp]
86```
193```
87
194
88#### Examples
195#### Examples
89
196
90```
197```
91− > *date
198+> *date
92− [[a=%.y y=0] m=0 t=[d=0 h=0 m=0 s=0 f=~]]
199+[[a=%.y y=0] m=0 t=[d=0 h=0 m=0 s=0 f=~]]
93
200
94− > `date`(yore ~2014.6.6..21.09.15..0a16)
201+> `date`(yore ~2014.6.6..21.09.15..0a16)
95− [[a=%.y y=2.014] m=6 t=[d=6 h=21 m=9 s=15 f=~[0xa16]]]
202+[[a=%.y y=2.014] m=6 t=[d=6 h=21 m=9 s=15 f=~[0xa16]]]
96
203
97− > now
204+> now
98− ~2018.5.25..17.55.15..9ad8
205+~2018.5.25..17.55.15..9ad8
99```
206```
100
207
101−
102#### Discussion
208#### Discussion
103
209
104−See also: [`year`](/docs/hoon/reference/stdlib/3c), [`yore`](/docs/hoon/reference/stdlib/3c)
210+See also: [`year`](/docs/hoon/reference/stdlib/3c#year), [`yore`](/docs/hoon/reference/stdlib/3c#yore)
105
211
106---
212---
107−### `++knot`
108
213
109−ASCII
214+## `+$knot`
215+
216+ASCII text
110
217
111An atom type that only permits ASCII characters.
218An atom type that only permits ASCII characters.
112
219
113#### Source
220#### Source
114
221
115```hoon
222```hoon
223++$ knot @ta
224+```
225+
226+#### Examples
227+
228+```
229+> *knot
230+~.
231+
232+> `@ta`105
233+~.i
234+```
235+
236+---
116
237
117− ++ knot @ta
238+## `+$noun`
239+
240+Any noun
241+
242+#### Source
243+
244+```hoon
245++$ noun *
118```
246```
119
247
120#### Examples
248#### Examples
121
249
122```
250```
123− > *knot
251+> *noun
124− ~.
252+0
253+```
125
254
126− > `@ta`105
255+```
127− ~.i
256+> `noun`'foo'
257+7.303.014
258+```
259+
260+```
261+> `noun`"foo"
262+[102 111 111 0]
128```
263```
129
264
130---
265---
131−### `++tang`
132
266
133−Generic print structure
267+## `+$path`
134
268
135−A list of `tank`s. It's for printing types and bottom-up printing of stack
269+Like unix path
136−traces.
270+
271+A path is a list of [`$knot`](#knot).
137
272
138#### Source
273#### Source
139
274
140```hoon
275```hoon
141− ++ tang (list tank)
276++$ path (list knot)
142```
277```
143
278
144#### Examples
279#### Examples
145
280
146```
281```
147− > *tang
282+> *path
148− ~
283+/
284+```
285+
286+```
287+> `path`"foo"
288+/f/o/o
289+```
290+
291+```
292+> `path`[~.foo ~.bar ~.baz ~]
293+/foo/bar/baz
294+```
149
295
150− > (~(win re [%palm ["1" "2" "3" "4"] [%leaf "foobar"] [%leaf "bazbud"] [%leaf "zzzzzzqaaa"] ~]) 0 50)
296+---
151− <<"23foobar1bazbud1zzzzzzqaaa4">>
152
297
153− > (~(win re [%palm ["1" "2" "3" "4"] [%leaf "foobar"] [%leaf "bazbud"] [%leaf "zzzzzzqaaa"] ~]) 0 10)
298+## `+$stud`
154− <<"2 foobar" " bazbud" "zzzzzzqaaa">>
155
299
156− > (~(win re [%rose ["1" "2" "3"] [%leaf "foobar"] [%leaf "bazbud"] ~]) 0 20)
300+Standard name
157− <<"2foobar1bazbud3">>
158
301
159− > (~(win re [%rose ["1" "2" "3"] [%leaf "foobar"] [%leaf "bazbud"] ~]) 0 10)
302+#### Source
160− <<"2 foobar" " bazbud" "3">>
303+
304+```hoon
305++$ stud :: standard name
306+ $@ mark=@tas :: auth=urbit
307+ $: auth=@tas :: standards authority
308+ type=path :: standard label
309+ == ::
161```
310```
162
311
163---
312---
164−### `++tank`
165
313
166−Pretty-printing structure
314+## `+$tang`
167
315
168−A `tank` is one of three cases: a `%leaf` is simply a string (a printed line);
316+Bottom-first error
169−a `%palm` is list of `tank` delimited by the strings in `p`, with back-steps at
170−new lines; and a `%rose` is a list of `tank` delimited by the strings in `p`
171−without back-steps at new lines.
172
317
318+A list of [`tank`](#tank)s. It's for printing types and bottom-up printing of stack
319+traces.
173
320
174#### Source
321#### Source
175
322
176```hoon
323```hoon
177− ++ tank $% [$leaf p=tape]
324++$ tang (list tank)
178− $: $palm
179− p=[p=tape q=tape r=tape s=tape]
180− q=(list tank)
181− ==
182− $: $rose
183− p=[p=tape q=tape r=tape]
184− q=(list tank)
185− ==
186− ==
187```
325```
188
326
189#### Examples
327#### Examples
190
328
329+```
330+> *tang
331+~
332+```
191
333
192```
334```
193− > *tank
335+> %- %- slog
194− [%rose p=[p="" q="" r=""] q=~]
336+ ^- tang
337+ :~ 'foo'
338+ leaf+"bar"
339+ [%palm ["|" "(" "!" ")"] leaf+"foo" leaf+"bar" leaf+"baz" ~]
340+ [%rose [" " "[" "]"] leaf+"foo" leaf+"bar" leaf+"baz" ~]
341+ ==
342+foo
343+bar
344+(!foo|bar|baz)
345+[foo bar baz]
346+ ~
347+~
348+```
195
349
196− > (wash [0 80] >(bex 20) (bex 19)<) :: at 80 cols
350+---
197− <<"[1.048.576 524.288]">>
198
351
199− > (wash [0 15] >(bex 20) (bex 19)<) :: at 15 cols
352+## `+$tank`
200− <<"[ 1.048.576" " 524.288" "]">>
201
353
202− > [(bex 150) (bex 151)] :: at 80 cols
354+Formatted print tree
203− [ 1.427.247.692.705.959.881.058.285.969.449.495.136.382.746.624
204− 2.854.495.385.411.919.762.116.571.938.898.990.272.765.493.248
205− ]
206
355
207− > (wash [0 40] >(bex 150) (bex 151)<)
356+A `tank` is one of four cases:
208− <<
357+
209− "[ \\/1.427.247.692.705.959.881.058.285.\\/"
358+- just a `cord`.
210− " 969.449.495.136.382.746.624"
359+- `%leaf` is just a `tape`.
211− " \\/ \\/"
360+- `%palm` is a list of `tank` delimited by the strings in `p`, with back-steps at new lines.
212− " \\/2.854.495.385.411.919.762.116.571.\\/"
361+- `%rose` is a list of `tank` delimited by the strings in `p` without back-steps at new lines.
213− " 938.898.990.272.765.493.248"
362+
214− " \\/ \\/"
363+#### Source
215− "]"
364+
216− >>
365+```hoon
366++$ tank
367+ $~ leaf/~
368+ $@ cord
369+ $% [%leaf p=tape]
370+ [%palm p=(qual tape tape tape tape) q=(list tank)]
371+ [%rose p=(trel tape tape tape) q=(list tank)]
372+ ==
373+```
374+
375+#### Examples
376+
377+```
378+> *tank
379+[%leaf p=""]
380+```
381+
382+```
383+> ~(ram re 'foobar')
384+"foobar"
217```
385```
218
386
387+```
388+> ~(ram re leaf+"foo")
389+"foo"
390+```
391+
392+```
393+> ~(ram re [%palm ["|" "(" "!" ")"] leaf+"foo" leaf+"bar" leaf+"baz" ~])
394+"(!foo|bar|baz)"
395+```
396+
397+```
398+> ~(ram re [%rose [" " "[" "]"] leaf+"foo" leaf+"bar" leaf+"baz" ~])
399+"[foo bar baz]"
400+```
219
401
220---
402---
221−### `++tape`
403+
404+## `+$tape`
222
405
223List of characters
406List of characters
224
407
225−One of Hoon's two string types, the other being `++cord`. A tape is a list of
408+One of Hoon's two string types, the other being [`+cord`](#cord). A tape is a list of `@tD`.
226−`char`.
227
409
228#### Source
410#### Source
229
411
230```hoon
412```hoon
231− ++ tape (list @tD)
413++$ tape (list @tD)
232```
414```
233
415
234#### Examples
416#### Examples
235
417
236```
418```
237− > *tape
419+> *tape
238− ""
420+""
239
421
240− > `tape`"foobar"
422+> `tape`"foobar"
241− "foobar"
423+"foobar"
242
424
243− >`(list @t)`"foobar"
425+>`(list @t)`"foobar"
244− <|f o o b a r|>
426+<|f o o b a r|>
245
427
246− >`(list @tD)`"foobar"
428+>`(list @tD)`"foobar"
247− "foobar"
429+"foobar"
248
430
249− > `(list @)`"foobar"
431+> `(list @)`"foobar"
250− ~[102 111 111 98 97 114]
432+~[102 111 111 98 97 114]
251```
433```
252
434
253---
435---
254−### `++tarp`
436+
437+## `+$tour`
438+
439+UTF-32 clusters
440+
441+A `tour` is a list of UTF-32 characters.
442+
443+#### Source
444+
445+```hoon
446++$ tour (list @c)
447+```
448+
449+#### Examples
450+
451+```
452+> *tour
453+~
454+```
455+
456+```
457+> `tour`(tuba "foobar")
458+~[~-f ~-o ~-o ~-b ~-a ~-r]
459+```
460+
461+---
462+
463+## `+$tarp`
255
464
256Parsed time
465Parsed time
257
466
@@ -261,28 +470,28 @@ for precision.
261#### Source
470#### Source
262
471
263```hoon
472```hoon
264− ++ tarp [d=@ud h=@ud m=@ud s=@ud f=(list @ux)]
473++$ tarp [d=@ud h=@ud m=@ud s=@ud f=(list @ux)]
265```
474```
266
475
267#### Examples
476#### Examples
268
477
269```
478```
270− > *tarp
479+> *tarp
271− [d=0 h=0 m=0 s=0 f=~]
480+[d=0 h=0 m=0 s=0 f=~]
272
481
273− > (yell now)
482+> (yell now)
274− [d=106.751.991.821.625 h=22 m=58 s=10 f=~[0x44ff]]
483+[d=106.751.991.821.625 h=22 m=58 s=10 f=~[0x44ff]]
275
484
276− > `tarp`(yell ~2014.6.6..21.09.15..0a16)
485+> `tarp`(yell ~2014.6.6..21.09.15..0a16)
277− [d=106.751.991.820.172 h=21 m=9 s=15 f=~[0xa16]]
486+[d=106.751.991.820.172 h=21 m=9 s=15 f=~[0xa16]]
278
487
279− > (yell ~d20)
488+> (yell ~d20)
280− [d=20 h=0 m=0 s=0 f=~]
489+[d=20 h=0 m=0 s=0 f=~]
281```
490```
282
491
283−
284---
492---
285−### `++term`
493+
494+## `+$term`
286
495
287Hoon constant
496Hoon constant
288
497
@@ -292,56 +501,58 @@ first character. The syntax for `@tas` is the text itself, always preceded by
292`%`. The empty `@tas` has a
501`%`. The empty `@tas` has a
293special syntax, `$`.
502special syntax, `$`.
294
503
295−
296#### Source
504#### Source
297
505
298```hoon
506```hoon
299− ++ term @tas
507++$ term @tas
300```
508```
301
509
302#### Examples
510#### Examples
303
511
304```
512```
305− > *term
513+> *term
306− %$
514+%$
307
515
308− > *%term
516+> *%term
309− %term
517+%term
310
518
311− > %dead-fish9
519+> %dead-fish9
312− %dead-fish9
520+%dead-fish9
313
521
314− > -:!>(%dead-fish9)
522+> -:!>(%dead-fish9)
315− #t/$dead-fish9
523+#t/%dead-fish9
316−```
317
524
525+> -:!>(`@tas`%dead-fish9)
526+#t/@tas
527+```
318
528
319---
529---
320−### `++wain`
530+
531+## `+$wain`
321
532
322List of strings
533List of strings
323
534
324A list of `cord`s. A `wain` is used instead of a single `cord` with `\n`.
535A list of `cord`s. A `wain` is used instead of a single `cord` with `\n`.
325
536
326−
327#### Source
537#### Source
328
538
329```hoon
539```hoon
330− ++ wain (list cord)
540++$ wain (list cord)
331```
541```
332
542
333#### Examples
543#### Examples
334
544
335```
545```
336− > *wain
546+> *wain
337− <||>
547+<||>
338
548
339− > `wain`/som/del/rok
549+> `wain`/som/del/rok
340− <|som del rok|>
550+<|som del rok|>
341```
551```
342
552
343---
553---
344−### `++wall`
554+
555+## `+$wall`
345
556
346List of list of characters
557List of list of characters
347
558
@@ -350,8 +561,9 @@ A list of `tape`s. `wall` is used instead of a single `tape` with `\n`.
350#### Source
561#### Source
351
562
352```hoon
563```hoon
353− ++ wall (list tape)
564++$ wall (list tape)
354```
565```
566+
355#### Examples
567#### Examples
356
568
357```
569```
@@ -371,5 +583,4 @@ A list of `tape`s. `wall` is used instead of a single `tape` with `\n`.
371 >>
583 >>
372```
584```
373
585
374−
586+---
375−---
content/docs/hoon/reference/stdlib/3a.md+25−5
@@ -4,7 +4,7 @@ weight = 21
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++egcd`
7+## `++egcd`
8
8
9Extended Euclidean algorithm
9Extended Euclidean algorithm
10
10
@@ -54,7 +54,8 @@ of `a` and `b`. Also produces `u` and `v` such that `au + bv = GCD(a, b)`.
54```
54```
55
55
56---
56---
57−### `++fo`
57+
58+## `++fo`
58
59
59Modulo prime
60Modulo prime
60
61
@@ -69,6 +70,7 @@ Container core for modular arithmetic functions.
69```
70```
70
71
71---
72---
73+
72### `++dif:fo`
74### `++dif:fo`
73
75
74Subtraction
76Subtraction
@@ -106,6 +108,7 @@ An atom.
106```
108```
107
109
108---
110---
111+
109### `++exp:fo`
112### `++exp:fo`
110
113
111Exponent
114Exponent
@@ -153,6 +156,7 @@ An atom.
153```
156```
154
157
155---
158---
159+
156### `++fra:fo`
160### `++fra:fo`
157
161
158Divide
162Divide
@@ -202,6 +206,7 @@ An atom.
202```
206```
203
207
204---
208---
209+
205### `++inv:fo`
210### `++inv:fo`
206
211
207Inverse
212Inverse
@@ -248,6 +253,7 @@ An atom.
248```
253```
249
254
250---
255---
256+
251### `++pro:fo`
257### `++pro:fo`
252
258
253Multiplication
259Multiplication
@@ -285,6 +291,7 @@ An atom.
285```
291```
286
292
287---
293---
294+
288### `++sit:fo`
295### `++sit:fo`
289
296
290Modulus
297Modulus
@@ -317,6 +324,7 @@ An atom.
317```
324```
318
325
319---
326---
327+
320### `++sum:fo`
328### `++sum:fo`
321
329
322Modular sum
330Modular sum
@@ -355,7 +363,8 @@ An atom.
355```
363```
356
364
357---
365---
358−### `++si`
366+
367+## `++si`
359
368
360Signed integer
369Signed integer
361
370
@@ -393,6 +402,7 @@ one. For example:
393```
402```
394
403
395---
404---
405+
396### `++abs:si`
406### `++abs:si`
397
407
398Absolute value
408Absolute value
@@ -407,7 +417,7 @@ Produces the absolute value of signed integer `a`.
407
417
408An atom.
418An atom.
409
419
410−### Source
420+#### Source
411
421
412```hoon
422```hoon
413 ++ abs |=(a=@s (add (end 0 1 a) (rsh 0 1 a)))
423 ++ abs |=(a=@s (add (end 0 1 a) (rsh 0 1 a)))
@@ -424,6 +434,7 @@ An atom.
424```
434```
425
435
426---
436---
437+
427### `++dif:si`
438### `++dif:si`
428
439
429Subtraction
440Subtraction
@@ -458,6 +469,7 @@ A signed integer.
458```
469```
459
470
460---
471---
472+
461### `++dul:si`
473### `++dul:si`
462
474
463Modulus
475Modulus
@@ -497,6 +509,7 @@ An atom.
497```
509```
498
510
499---
511---
512+
500### `++fra:si`
513### `++fra:si`
501
514
502Divide
515Divide
@@ -534,6 +547,7 @@ A signed atom.
534```
547```
535
548
536---
549---
550+
537### `++new:si`
551### `++new:si`
538
552
539Atom to @s
553Atom to @s
@@ -576,6 +590,7 @@ A signed integer.
576```
590```
577
591
578---
592---
593+
579### `++old:si`
594### `++old:si`
580
595
581Sign and absolute value
596Sign and absolute value
@@ -608,6 +623,7 @@ A cell composed of a `term` and an atom.
608```
623```
609
624
610---
625---
626+
611### `++pro:si`
627### `++pro:si`
612
628
613Multiplication
629Multiplication
@@ -638,6 +654,7 @@ Produces a signed integer by multiplying `a` and `b`.
638```
654```
639
655
640---
656---
657+
641### `++rem:si`
658### `++rem:si`
642
659
643Remainder
660Remainder
@@ -676,8 +693,8 @@ A signed integer.
676 --2
693 --2
677```
694```
678
695
679−
680---
696---
697+
681### `++sum:si`
698### `++sum:si`
682
699
683Addition
700Addition
@@ -723,6 +740,7 @@ A signed integer.
723```
740```
724
741
725---
742---
743+
726### `++sun:si`
744### `++sun:si`
727
745
728@u to @s
746@u to @s
@@ -766,6 +784,7 @@ An atom.
766```
784```
767
785
768---
786---
787+
769### `++syn:si`
788### `++syn:si`
770
789
771Sign test
790Sign test
@@ -798,6 +817,7 @@ An `term`.
798```
817```
799
818
800---
819---
820+
801### `++cmp:si`
821### `++cmp:si`
802
822
803Compare
823Compare
content/docs/hoon/reference/stdlib/3b.md+200−29
@@ -4,7 +4,7 @@ weight = 22
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++fn`
7+## `++fn`
8
8
9Float
9Float
10
10
@@ -25,7 +25,7 @@ exponent, a signed decimal; and `a` to the significand, an unsigned integer.
25 ==
25 ==
26```
26```
27
27
28−### Examples
28+#### Examples
29
29
30```
30```
31 > *fn
31 > *fn
@@ -44,9 +44,9 @@ exponent, a signed decimal; and `a` to the significand, an unsigned integer.
44 [%f s=%.y e=--17 a=7.333.324.850.834.000.007.430.214.137.126.970]
44 [%f s=%.y e=--17 a=7.333.324.850.834.000.007.430.214.137.126.970]
45```
45```
46
46
47−
48---
47---
49−### `++dn`
48+
49+## `++dn`
50
50
51Decimal float
51Decimal float
52
52
@@ -79,7 +79,8 @@ and `a` to the significand, an unsigned integer.
79```
79```
80
80
81---
81---
82−### `++rn`
82+
83+## `++rn`
83
84
84Parsed decimal float
85Parsed decimal float
85
86
@@ -106,7 +107,8 @@ not-a-number (`$n`).
106```
107```
107
108
108---
109---
109−### `++fl`
110+
111+## `++fl`
110
112
111Arbitrary-precision floating-point
113Arbitrary-precision floating-point
112
114
@@ -134,6 +136,7 @@ Container arm for floating-point arithmetic functions.
134```
136```
135
137
136---
138---
139+
137### `++rou:fl`
140### `++rou:fl`
138
141
139Round
142Round
@@ -175,6 +178,7 @@ An `fn`.
175```
178```
176
179
177---
180---
181+
178### `++rau:fl`
182### `++rau:fl`
179
183
180Various roundings
184Various roundings
@@ -212,12 +216,12 @@ An `fn`.
212 [%f s=%.y e=-102 a=6.626.897.619.228.945.634.459.505.846.648.832]
216 [%f s=%.y e=-102 a=6.626.897.619.228.945.634.459.505.846.648.832]
213```
217```
214
218
215−
216#### Discussion
219#### Discussion
217
220
218See `lug:fl` for possible rounding operations.
221See `lug:fl` for possible rounding operations.
219
222
220---
223---
224+
221### `++add:fl`
225### `++add:fl`
222
226
223Add
227Add
@@ -273,6 +277,7 @@ An `fn`.
273```
277```
274
278
275---
279---
280+
276### `++sub:fl`
281### `++sub:fl`
277
282
278Subtract
283Subtract
@@ -329,6 +334,7 @@ An `fn`.
329```
334```
330
335
331---
336---
337+
332### `++mul:fl`
338### `++mul:fl`
333
339
334Multiply
340Multiply
@@ -362,6 +368,7 @@ An `fn`.
362```
368```
363
369
364---
370---
371+
365### `++div:fl`
372### `++div:fl`
366
373
367Divide
374Divide
@@ -400,6 +407,7 @@ An `fn`.
400```
407```
401
408
402---
409---
410+
403### `++sqt:fl`
411### `++sqt:fl`
404
412
405Square root
413Square root
@@ -437,6 +445,7 @@ An `fn`.
437```
445```
438
446
439---
447---
448+
440### `++lth:fl`
449### `++lth:fl`
441
450
442Less than
451Less than
@@ -477,6 +486,7 @@ An `flag`.
477```
486```
478
487
479---
488---
489+
480### `++equ:fl`
490### `++equ:fl`
481
491
482Equals
492Equals
@@ -515,6 +525,7 @@ A `flag`.
515```
525```
516
526
517---
527---
528+
518### `++ibl:fl`
529### `++ibl:fl`
519
530
520Integer binary logarithm
531Integer binary logarithm
@@ -546,6 +557,7 @@ A signed integer.
546```
557```
547
558
548---
559---
560+
549### `++uni:fl`
561### `++uni:fl`
550
562
551Change representation to odd
563Change representation to odd
@@ -582,6 +594,7 @@ A cell of a signed integer and an unsigned integer.
582```
594```
583
595
584---
596---
597+
585### `++xpd:fl`
598### `++xpd:fl`
586
599
587Expand
600Expand
@@ -625,6 +638,7 @@ A cell of a signed integer and an unsigned integer.
625```
638```
626
639
627---
640---
641+
628### `++lug:fl`
642### `++lug:fl`
629
643
630Central rounding mechanism
644Central rounding mechanism
@@ -634,6 +648,7 @@ value selected for `t`. `s` is a sticky bit that represents a value less than
634ULP(a) = 2^(e.a)
648ULP(a) = 2^(e.a)
635
649
636Possible rounding operations:
650Possible rounding operations:
651+
637- Floor (`$fl`)
652- Floor (`$fl`)
638- Ceiling (`$ce`)
653- Ceiling (`$ce`)
639- Smaller (`$sm`)
654- Smaller (`$sm`)
@@ -730,6 +745,7 @@ An `fn`.
730```
745```
731
746
732---
747---
748+
733### `++drg:fl`
749### `++drg:fl`
734
750
735Get printable decimal
751Get printable decimal
@@ -814,6 +830,7 @@ A cell of a signed integer and an unsigned integer.
814```
830```
815
831
816---
832---
833+
817### `++toj:fl`
834### `++toj:fl`
818
835
819Round to integer
836Round to integer
@@ -855,6 +872,7 @@ An `fn`.
855```
872```
856
873
857---
874---
875+
858### `++ned:fl`
876### `++ned:fl`
859
877
860Require float
878Require float
@@ -882,7 +900,6 @@ A cell of a signed integer and an unsigned integer.
882
900
883#### Examples
901#### Examples
884
902
885−
886```
903```
887 > (ned:fl [%f s=%.y e=-11 a=7.530.107.827.833.587])
904 > (ned:fl [%f s=%.y e=-11 a=7.530.107.827.833.587])
888 [%f s=%.y e=-11 a=7.530.107.827.833.587]
905 [%f s=%.y e=-11 a=7.530.107.827.833.587]
@@ -897,6 +914,7 @@ A cell of a signed integer and an unsigned integer.
897```
914```
898
915
899---
916---
917+
900### `++shf:fl`
918### `++shf:fl`
901
919
902Shift power
920Shift power
@@ -937,6 +955,7 @@ An `fn`.
937```
955```
938
956
939---
957---
958+
940### `++fli:fl`
959### `++fli:fl`
941
960
942Flip sign
961Flip sign
@@ -973,6 +992,7 @@ An `fn`.
973```
992```
974
993
975---
994---
995+
976### `++swr:fl`
996### `++swr:fl`
977
997
978Switch rounding
998Switch rounding
@@ -1000,6 +1020,7 @@ Switches the rounding mode of `r:fl`.
1000```
1020```
1001
1021
1002---
1022---
1023+
1003### `++prc:fl`
1024### `++prc:fl`
1004
1025
1005Force precision of 2 or greater
1026Force precision of 2 or greater
@@ -1030,6 +1051,7 @@ Otherwise, a crash is produced.
1030```
1051```
1031
1052
1032---
1053---
1054+
1033### `++den:fl`
1055### `++den:fl`
1034
1056
1035Behavior
1057Behavior
@@ -1062,6 +1084,7 @@ The default value of `d` is `%d`.
1062```
1084```
1063
1085
1064---
1086---
1087+
1065### `++emn:fl`
1088### `++emn:fl`
1066
1089
1067Minimum exponent
1090Minimum exponent
@@ -1082,6 +1105,7 @@ Produces `v:fl`, the minimum exponent. The default minimum exponent is -16.494.
1082```
1105```
1083
1106
1084---
1107---
1108+
1085### `++emx:fl`
1109### `++emx:fl`
1086
1110
1087Maximum exponent
1111Maximum exponent
@@ -1105,6 +1129,7 @@ Returns the maximum exponent of `fl`. The default maximum exponent is --16.271.
1105```
1129```
1106
1130
1107---
1131---
1132+
1108### `++spd:fl`
1133### `++spd:fl`
1109
1134
1110Smallest denormal
1135Smallest denormal
@@ -1125,6 +1150,7 @@ Produces the smallest possible denormalized float.
1125```
1150```
1126
1151
1127---
1152---
1153+
1128### `++spn:fl`
1154### `++spn:fl`
1129
1155
1130Smallest normal
1156Smallest normal
@@ -1145,6 +1171,7 @@ Produces the smallest representable normal float.
1145```
1171```
1146
1172
1147---
1173---
1174+
1148### `++lfn:fl`
1175### `++lfn:fl`
1149
1176
1150Largest normal
1177Largest normal
@@ -1165,6 +1192,7 @@ Produces the largest representable normal float.
1165```
1192```
1166
1193
1167---
1194---
1195+
1168### `++lfe:fl`
1196### `++lfe:fl`
1169
1197
1170Maximum
1198Maximum
@@ -1185,6 +1213,7 @@ Produces the sum of `emx:fl` plus `prc:fl`.
1185```
1213```
1186
1214
1187---
1215---
1216+
1188### `++zer:fl`
1217### `++zer:fl`
1189
1218
1190Zero
1219Zero
@@ -1207,6 +1236,7 @@ Produces zero represented as a float.
1207```
1236```
1208
1237
1209---
1238---
1239+
1210### `++rou:fl`
1240### `++rou:fl`
1211
1241
1212Round
1242Round
@@ -1250,6 +1280,7 @@ An `fn`.
1250```
1280```
1251
1281
1252---
1282---
1283+
1253### `++syn:fl`
1284### `++syn:fl`
1254
1285
1255Get sign
1286Get sign
@@ -1283,6 +1314,7 @@ An `fn`.
1283```
1314```
1284
1315
1285---
1316---
1317+
1286### `++abs:fl`
1318### `++abs:fl`
1287
1319
1288Absolute value
1320Absolute value
@@ -1317,6 +1349,7 @@ An `fn`.
1317```
1349```
1318
1350
1319---
1351---
1352+
1320### `++add:fl`
1353### `++add:fl`
1321
1354
1322Add
1355Add
@@ -1365,6 +1398,7 @@ An `fn`.
1365```
1398```
1366
1399
1367---
1400---
1401+
1368### `++ead:fl`
1402### `++ead:fl`
1369
1403
1370Exact add
1404Exact add
@@ -1414,6 +1448,7 @@ An `fn`.
1414```
1448```
1415
1449
1416---
1450---
1451+
1417### `++sub:fl`
1452### `++sub:fl`
1418
1453
1419Subtract
1454Subtract
@@ -1445,6 +1480,7 @@ An `fn`.
1445```
1480```
1446
1481
1447---
1482---
1483+
1448### `++mul:fl`
1484### `++mul:fl`
1449
1485
1450Multiply
1486Multiply
@@ -1479,6 +1515,7 @@ An `fn`.
1479```
1515```
1480
1516
1481---
1517---
1518+
1482### `++emu:fl`
1519### `++emu:fl`
1483
1520
1484Exact multiply
1521Exact multiply
@@ -1512,6 +1549,7 @@ An `fn`.
1512```
1549```
1513
1550
1514---
1551---
1552+
1515### `++div:fl`
1553### `++div:fl`
1516
1554
1517Divide
1555Divide
@@ -1544,6 +1582,7 @@ An `fn`.
1544```
1582```
1545
1583
1546---
1584---
1585+
1547### `++fma:fl`
1586### `++fma:fl`
1548
1587
1549Fused multiply-add
1588Fused multiply-add
@@ -1579,6 +1618,7 @@ An `fn`.
1579```
1618```
1580
1619
1581---
1620---
1621+
1582### `++sqt:fl`
1622### `++sqt:fl`
1583
1623
1584Square root
1624Square root
@@ -1612,6 +1652,7 @@ An `fn`.
1612```
1652```
1613
1653
1614---
1654---
1655+
1615### `++inv:fl`
1656### `++inv:fl`
1616
1657
1617Inverse
1658Inverse
@@ -1654,6 +1695,7 @@ An `fn`.
1654```
1695```
1655
1696
1656---
1697---
1698+
1657### `++sun:fl`
1699### `++sun:fl`
1658
1700
1659Signed integer to float
1701Signed integer to float
@@ -1690,7 +1732,8 @@ An `fn`.
1690```
1732```
1691
1733
1692---
1734---
1693−### `++san:fl`
1735+
1736+### `++san:fl`
1694
1737
1695Signed integer to float
1738Signed integer to float
1696
1739
@@ -1724,6 +1767,7 @@ An `fn`.
1724```
1767```
1725
1768
1726---
1769---
1770+
1727### `++lth:fl`
1771### `++lth:fl`
1728
1772
1729Less than
1773Less than
@@ -1770,6 +1814,7 @@ A `unit` of `flag`.
1770```
1814```
1771
1815
1772---
1816---
1817+
1773### `++lte:fl`
1818### `++lte:fl`
1774
1819
1775Less than or equal
1820Less than or equal
@@ -1815,6 +1860,7 @@ A `unit` of `flag`.
1815```
1860```
1816
1861
1817---
1862---
1863+
1818### `++equ:fl`
1864### `++equ:fl`
1819
1865
1820Equals
1866Equals
@@ -1857,6 +1903,7 @@ An `unit` of `flag`.
1857```
1903```
1858
1904
1859---
1905---
1906+
1860### `++gte:fl`
1907### `++gte:fl`
1861
1908
1862Greater or equal than
1909Greater or equal than
@@ -1895,6 +1942,7 @@ An `unit` of `flag`.
1895```
1942```
1896
1943
1897---
1944---
1945+
1898### `++gth:fl`
1946### `++gth:fl`
1899
1947
1900Greater than
1948Greater than
@@ -1930,6 +1978,7 @@ An `unit` of `flag`.
1930```
1978```
1931
1979
1932---
1980---
1981+
1933### `++drg:fl`
1982### `++drg:fl`
1934
1983
1935Float to decimal
1984Float to decimal
@@ -1964,6 +2013,7 @@ A `dn`.
1964```
2013```
1965
2014
1966---
2015---
2016+
1967### `++grd:fl`
2017### `++grd:fl`
1968
2018
1969Decimal to float
2019Decimal to float
@@ -2003,6 +2053,7 @@ An `fn`.
2003```
2053```
2004
2054
2005---
2055---
2056+
2006### `++toi:fl`
2057### `++toi:fl`
2007
2058
2008Round to signed integer
2059Round to signed integer
@@ -2036,6 +2087,7 @@ A `unit` of @s.
2036```
2087```
2037
2088
2038---
2089---
2090+
2039### `++toj:fl`
2091### `++toj:fl`
2040
2092
2041Round to integer fn
2093Round to integer fn
@@ -2079,16 +2131,17 @@ A `unit` of @s.
2079```
2131```
2080
2132
2081---
2133---
2082−### `++ff`
2134+
2135+## `++ff`
2083
2136
2084IEEE-754 Formatting
2137IEEE-754 Formatting
2085
2138
2086Container core for IEEE-754 formatting operations.
2139Container core for IEEE-754 formatting operations.
2087
2140
2088−- `w` is width: The number of bits in the exponent field.
2141+- `w` is width: The number of bits in the exponent field.
2089−- `p` is precision: The number of bits in the significand field.
2142+- `p` is precision: The number of bits in the significand field.
2090−- `w` is bias: Added to exponent when storing.
2143+- `w` is bias: Added to exponent when storing.
2091−- `r` is rounding mode: Possible modes are nearest (`$n`), up (`$u`),
2144+- `r` is rounding mode: Possible modes are nearest (`$n`), up (`$u`),
2092 down (`$d`), to zero (`$z`), and away from zero (`$a`). Default value is `%a`.
2145 down (`$d`), to zero (`$z`), and away from zero (`$a`). Default value is `%a`.
2093
2146
2094#### Source
2147#### Source
@@ -2108,6 +2161,7 @@ Container core for IEEE-754 formatting operations.
2108```
2161```
2109
2162
2110---
2163---
2164+
2111#### Discussion
2165#### Discussion
2112
2166
2113`++ff` has no use outside of the functionality provided to other cores: `++rd`,
2167`++ff` has no use outside of the functionality provided to other cores: `++rd`,
@@ -2115,6 +2169,7 @@ Container core for IEEE-754 formatting operations.
2115meant to power those cores.
2169meant to power those cores.
2116
2170
2117---
2171---
2172+
2118### `++sb:ff`
2173### `++sb:ff`
2119
2174
2120Sign bit
2175Sign bit
@@ -2135,6 +2190,7 @@ Produces the sign bit of `++ff`.
2135```
2190```
2136
2191
2137---
2192---
2193+
2138### `++me:ff`
2194### `++me:ff`
2139
2195
2140Minimum exponent
2196Minimum exponent
@@ -2155,6 +2211,7 @@ Produces the minimum possible exponent of `ff`.
2155```
2211```
2156
2212
2157---
2213---
2214+
2158### `++pa:ff`
2215### `++pa:ff`
2159
2216
2160Initialize `fl`
2217Initialize `fl`
@@ -2187,6 +2244,7 @@ configuration of the `ff` core.
2187internal use in other cores.
2244internal use in other cores.
2188
2245
2189---
2246---
2247+
2190### `++sea:ff`
2248### `++sea:ff`
2191
2249
2192`@r` to `fn`
2250`@r` to `fn`
@@ -2225,6 +2283,7 @@ A `unit` of @s.
2225```
2283```
2226
2284
2227---
2285---
2286+
2228### `++bit:ff`
2287### `++bit:ff`
2229
2288
2230`fn` to `@r`, rounding
2289`fn` to `@r`, rounding
@@ -2253,6 +2312,7 @@ A `@r`.
2253```
2312```
2254
2313
2255---
2314---
2315+
2256### `++bif:ff`
2316### `++bif:ff`
2257
2317
2258`fn` to `@r`, no rounding
2318`fn` to `@r`, no rounding
@@ -2295,6 +2355,7 @@ A `flag`.
2295```
2355```
2296
2356
2297---
2357---
2358+
2298### `++sig:ff`
2359### `++sig:ff`
2299
2360
2300Get sign
2361Get sign
@@ -2325,6 +2386,7 @@ A `flag`.
2325```
2386```
2326
2387
2327---
2388---
2389+
2328### `++exp:ff`
2390### `++exp:ff`
2329
2391
2330Get exponent
2392Get exponent
@@ -2355,6 +2417,7 @@ A signed integer.
2355```
2417```
2356
2418
2357---
2419---
2420+
2358### `++add:ff`
2421### `++add:ff`
2359
2422
2360Add
2423Add
@@ -2387,6 +2450,7 @@ A `@r`, an IEEE float.
2387```
2450```
2388
2451
2389---
2452---
2453+
2390### `++sub:ff`
2454### `++sub:ff`
2391
2455
2392Sub
2456Sub
@@ -2419,6 +2483,7 @@ A `@r`, an IEEE float.
2419```
2483```
2420
2484
2421---
2485---
2486+
2422### `++mul:ff`
2487### `++mul:ff`
2423
2488
2424Multiply
2489Multiply
@@ -2451,6 +2516,7 @@ A `@r`, an IEEE float.
2451```
2516```
2452
2517
2453---
2518---
2519+
2454### `++div:ff`
2520### `++div:ff`
2455
2521
2456Divide
2522Divide
@@ -2483,6 +2549,7 @@ A `@r`, an IEEE float.
2483```
2549```
2484
2550
2485---
2551---
2552+
2486### `++fma:ff`
2553### `++fma:ff`
2487
2554
2488Fused multiply-add
2555Fused multiply-add
@@ -2518,6 +2585,7 @@ A `@r`, an IEEE float.
2518```
2585```
2519
2586
2520---
2587---
2588+
2521### `++sqt:ff`
2589### `++sqt:ff`
2522
2590
2523Square root
2591Square root
@@ -2548,6 +2616,7 @@ A `@r`, an IEEE float.
2548```
2616```
2549
2617
2550---
2618---
2619+
2551### `++lth:ff`
2620### `++lth:ff`
2552
2621
2553Less than
2622Less than
@@ -2582,6 +2651,7 @@ A `flag`.
2582```
2651```
2583
2652
2584---
2653---
2654+
2585### `++lte:ff`
2655### `++lte:ff`
2586
2656
2587Less than or equal to
2657Less than or equal to
@@ -2616,6 +2686,7 @@ A `flag`.
2616```
2686```
2617
2687
2618---
2688---
2689+
2619### `++equ:ff`
2690### `++equ:ff`
2620
2691
2621Equals
2692Equals
@@ -2650,6 +2721,7 @@ A `flag`.
2650```
2721```
2651
2722
2652---
2723---
2724+
2653### `++gte:ff`
2725### `++gte:ff`
2654
2726
2655Greater or equal than
2727Greater or equal than
@@ -2684,6 +2756,7 @@ A `flag`.
2684```
2756```
2685
2757
2686---
2758---
2759+
2687### `++gth:ff`
2760### `++gth:ff`
2688
2761
2689Greater than
2762Greater than
@@ -2718,6 +2791,7 @@ A `flag`.
2718```
2791```
2719
2792
2720---
2793---
2794+
2721### `++sun:ff`
2795### `++sun:ff`
2722
2796
2723Unsigned integer to `@r`
2797Unsigned integer to `@r`
@@ -2747,6 +2821,7 @@ A `@r`, an IEEE float.
2747```
2821```
2748
2822
2749---
2823---
2824+
2750### `++san:ff`
2825### `++san:ff`
2751
2826
2752Signed integer to `@r`
2827Signed integer to `@r`
@@ -2776,6 +2851,7 @@ A `@r`, an IEEE float.
2776```
2851```
2777
2852
2778---
2853---
2854+
2779### `++toi:ff`
2855### `++toi:ff`
2780
2856
2781Round to integer
2857Round to integer
@@ -2805,6 +2881,7 @@ A `flag` of `@s`.
2805```
2881```
2806
2882
2807---
2883---
2884+
2808### `++drg:ff`
2885### `++drg:ff`
2809
2886
2810`@r` to decimal float
2887`@r` to decimal float
@@ -2837,6 +2914,7 @@ A `dn`.
2837```
2914```
2838
2915
2839---
2916---
2917+
2840### `++grd:ff`
2918### `++grd:ff`
2841
2919
2842Decimal float to `@r`
2920Decimal float to `@r`
@@ -2867,7 +2945,8 @@ A `@r`, an IEEE float.
2867```
2945```
2868
2946
2869---
2947---
2870−### `++rlyd`
2948+
2949+## `++rlyd`
2871
2950
2872Prep `@rd` for print
2951Prep `@rd` for print
2873
2952
@@ -2895,7 +2974,8 @@ A `dn`.
2895```
2974```
2896
2975
2897---
2976---
2898−### `++rlys`
2977+
2978+## `++rlys`
2899
2979
2900Prep @rs for print
2980Prep @rs for print
2901
2981
@@ -2923,7 +3003,8 @@ A `dn`.
2923```
3003```
2924
3004
2925---
3005---
2926−### `++rlyh`
3006+
3007+## `++rlyh`
2927
3008
2928Prep `@rh` for print
3009Prep `@rh` for print
2929
3010
@@ -2951,7 +3032,8 @@ A `dn`.
2951```
3032```
2952
3033
2953---
3034---
2954−### `++rlyq`
3035+
3036+## `++rlyq`
2955
3037
2956Prep `@rq` for print
3038Prep `@rq` for print
2957
3039
@@ -2979,7 +3061,8 @@ A `dn`.
2979```
3061```
2980
3062
2981---
3063---
2982−### `++ryld`
3064+
3065+## `++ryld`
2983
3066
2984Finish parsing `@rd`
3067Finish parsing `@rd`
2985
3068
@@ -3007,7 +3090,8 @@ A a `@rd`, a double-precision float.
3007```
3090```
3008
3091
3009---
3092---
3010−### `++ryls`
3093+
3094+## `++ryls`
3011
3095
3012Finish parsing `@rs`
3096Finish parsing `@rs`
3013
3097
@@ -3038,7 +3122,8 @@ A a `@rs`, a single-precision float.
3038```
3122```
3039
3123
3040---
3124---
3041−### `++rylh`
3125+
3126+## `++rylh`
3042
3127
3043Finish parsing `@rh`
3128Finish parsing `@rh`
3044
3129
@@ -3072,7 +3157,8 @@ A a `@rh`, a half-precision float.
3072```
3157```
3073
3158
3074---
3159---
3075−### `++rylq`
3160+
3161+## `++rylq`
3076
3162
3077Finish parsing `@rq`
3163Finish parsing `@rq`
3078
3164
@@ -3100,7 +3186,8 @@ A a `@rq`, a quad-precision float.
3100```
3186```
3101
3187
3102---
3188---
3103−### `++rd`
3189+
3190+## `++rd`
3104
3191
3105Double-precision fp
3192Double-precision fp
3106
3193
@@ -3119,6 +3206,7 @@ down (`$d`), and round to zero (`$z`).
3119```
3206```
3120
3207
3121---
3208---
3209+
3122### `++ma:rd`
3210### `++ma:rd`
3123
3211
3124Initialize `ff`
3212Initialize `ff`
@@ -3143,6 +3231,7 @@ configuration of the `rd` core.
3143```
3231```
3144
3232
3145---
3233---
3234+
3146### `++sea:rd`
3235### `++sea:rd`
3147
3236
3148`@rd` to `fn`
3237`@rd` to `fn`
@@ -3162,6 +3251,7 @@ Converts `a` from a double-precision binary float to `fn`.
3162```
3251```
3163
3252
3164---
3253---
3254+
3165### `++bit:rd`
3255### `++bit:rd`
3166
3256
3167`fn` to `@rd`
3257`fn` to `@rd`
@@ -3191,6 +3281,7 @@ A `@rd`, a double-precision float.
3191```
3281```
3192
3282
3193---
3283---
3284+
3194### `++add:rd`
3285### `++add:rd`
3195
3286
3196Add
3287Add
@@ -3224,6 +3315,7 @@ A `@rd`.
3224```
3315```
3225
3316
3226---
3317---
3318+
3227### `++sub:rd`
3319### `++sub:rd`
3228
3320
3229Subtract
3321Subtract
@@ -3257,6 +3349,7 @@ A `@rd`.
3257```
3349```
3258
3350
3259---
3351---
3352+
3260### `++mul:rd`
3353### `++mul:rd`
3261
3354
3262Multiply
3355Multiply
@@ -3290,6 +3383,7 @@ A `@rd`.
3290```
3383```
3291
3384
3292---
3385---
3386+
3293### `++div:rd`
3387### `++div:rd`
3294
3388
3295Divide
3389Divide
@@ -3323,6 +3417,7 @@ A `@rd`.
3323```
3417```
3324
3418
3325---
3419---
3420+
3326### `++fma:rd`
3421### `++fma:rd`
3327
3422
3328Fused multiply-add
3423Fused multiply-add
@@ -3344,7 +3439,6 @@ A `@rd`.
3344
3439
3345#### Source
3440#### Source
3346
3441
3347−
3348#### Source
3442#### Source
3349
3443
3350```hoon
3444```hoon
@@ -3362,6 +3456,7 @@ A `@rd`.
3362```
3456```
3363
3457
3364---
3458---
3459+
3365### `++sqt:rd`
3460### `++sqt:rd`
3366
3461
3367Square root
3462Square root
@@ -3392,6 +3487,7 @@ A `@rd`.
3392```
3487```
3393
3488
3394---
3489---
3490+
3395### `++lth:rd`
3491### `++lth:rd`
3396
3492
3397Less than
3493Less than
@@ -3431,6 +3527,7 @@ A `@rd`.
3431```
3527```
3432
3528
3433---
3529---
3530+
3434### `++lte:rd`
3531### `++lte:rd`
3435
3532
3436Less than or equal
3533Less than or equal
@@ -3470,6 +3567,7 @@ A `@rd`.
3470```
3567```
3471
3568
3472---
3569---
3570+
3473### `++equ:rd`
3571### `++equ:rd`
3474
3572
3475Equals
3573Equals
@@ -3509,6 +3607,7 @@ A `@rd`.
3509```
3607```
3510
3608
3511---
3609---
3610+
3512### `++gte:rd`
3611### `++gte:rd`
3513
3612
3514Greater than or equal
3613Greater than or equal
@@ -3548,6 +3647,7 @@ A `@rd`.
3548```
3647```
3549
3648
3550---
3649---
3650+
3551### `++gth:rd`
3651### `++gth:rd`
3552
3652
3553Greater than
3653Greater than
@@ -3587,6 +3687,7 @@ A `@rd`.
3587```
3687```
3588
3688
3589---
3689---
3690+
3590### `++sun:rd`
3691### `++sun:rd`
3591
3692
3592Unsigned integer to `@rd`
3693Unsigned integer to `@rd`
@@ -3615,6 +3716,7 @@ A `@rd`.
3615```
3716```
3616
3717
3617---
3718---
3719+
3618### `++san:rd`
3720### `++san:rd`
3619
3721
3620Unsigned integer to `@rd`
3722Unsigned integer to `@rd`
@@ -3643,6 +3745,7 @@ A `@rd`.
3643```
3745```
3644
3746
3645---
3747---
3748+
3646### `++sig:rd`
3749### `++sig:rd`
3647
3750
3648Get sign
3751Get sign
@@ -3671,6 +3774,7 @@ A `flag`.
3671```
3774```
3672
3775
3673---
3776---
3777+
3674### `++exp:rd`
3778### `++exp:rd`
3675
3779
3676Get exponent
3780Get exponent
@@ -3699,6 +3803,7 @@ A `@s`.
3699```
3803```
3700
3804
3701---
3805---
3806+
3702### `++toi:rd`
3807### `++toi:rd`
3703
3808
3704Round to integer
3809Round to integer
@@ -3727,6 +3832,7 @@ A `unit` of `@s`.
3727```
3832```
3728
3833
3729---
3834---
3835+
3730### `++drg:rd`
3836### `++drg:rd`
3731
3837
3732`@rd` to decimal float
3838`@rd` to decimal float
@@ -3756,6 +3862,7 @@ A `dn`.
3756```
3862```
3757
3863
3758---
3864---
3865+
3759### `++grd:rd`
3866### `++grd:rd`
3760
3867
3761Decimal float to `@rd`
3868Decimal float to `@rd`
@@ -3785,7 +3892,8 @@ A `@rd`.
3785```
3892```
3786
3893
3787---
3894---
3788−### `++rs`
3895+
3896+## `++rs`
3789
3897
3790Single-precision fp
3898Single-precision fp
3791
3899
@@ -3804,6 +3912,7 @@ down (`$d`), and round to zero (`$z`).
3804```
3912```
3805
3913
3806---
3914---
3915+
3807### `++ma:rs`
3916### `++ma:rs`
3808
3917
3809Initialize `ff`
3918Initialize `ff`
@@ -3828,6 +3937,7 @@ configuration of the `rs` core.
3828```
3937```
3829
3938
3830---
3939---
3940+
3831### `++sea:rs`
3941### `++sea:rs`
3832
3942
3833`@rs` to `fn`
3943`@rs` to `fn`
@@ -3857,6 +3967,7 @@ An `fn`.
3857```
3967```
3858
3968
3859---
3969---
3970+
3860### `++bit:rs`
3971### `++bit:rs`
3861
3972
3862`fn` to `@rs`
3973`fn` to `@rs`
@@ -3886,6 +3997,7 @@ A `@rs`, a single-precision float.
3886```
3997```
3887
3998
3888---
3999---
4000+
3889### `++add:rs`
4001### `++add:rs`
3890
4002
3891Add
4003Add
@@ -3919,6 +4031,7 @@ A `@rs`.
3919```
4031```
3920
4032
3921---
4033---
4034+
3922### `++sub:rs`
4035### `++sub:rs`
3923
4036
3924Subtract
4037Subtract
@@ -3942,6 +4055,7 @@ Subtracts `a` from `b`.
3942```
4055```
3943
4056
3944---
4057---
4058+
3945### `++mul:rs`
4059### `++mul:rs`
3946
4060
3947Multiply
4061Multiply
@@ -3975,6 +4089,7 @@ A `@rs`.
3975```
4089```
3976
4090
3977---
4091---
4092+
3978### `++div:rs`
4093### `++div:rs`
3979
4094
3980Divide
4095Divide
@@ -4008,6 +4123,7 @@ A `@rs`.
4008```
4123```
4009
4124
4010---
4125---
4126+
4011### `++fma:rs`
4127### `++fma:rs`
4012
4128
4013Fused multiply-add
4129Fused multiply-add
@@ -4044,6 +4160,7 @@ A `@rs`.
4044```
4160```
4045
4161
4046---
4162---
4163+
4047### `++sqt:rs`
4164### `++sqt:rs`
4048
4165
4049Square root
4166Square root
@@ -4075,6 +4192,7 @@ A `@rs`.
4075```
4192```
4076
4193
4077---
4194---
4195+
4078### `++lth:rs`
4196### `++lth:rs`
4079
4197
4080Less than
4198Less than
@@ -4111,6 +4229,7 @@ A `@rs`.
4111```
4229```
4112
4230
4113---
4231---
4232+
4114### `++lte:rs`
4233### `++lte:rs`
4115
4234
4116Less than or equal
4235Less than or equal
@@ -4147,6 +4266,7 @@ A `@rs`.
4147```
4266```
4148
4267
4149---
4268---
4269+
4150### `++equ:rs`
4270### `++equ:rs`
4151
4271
4152Equals
4272Equals
@@ -4183,6 +4303,7 @@ A `@rs`.
4183```
4303```
4184
4304
4185---
4305---
4306+
4186### `++gte:rs`
4307### `++gte:rs`
4187
4308
4188Greater than or equal
4309Greater than or equal
@@ -4219,6 +4340,7 @@ A `@rs`.
4219```
4340```
4220
4341
4221---
4342---
4343+
4222### `++gth:rs`
4344### `++gth:rs`
4223
4345
4224Greater than
4346Greater than
@@ -4258,6 +4380,7 @@ A `@rs`.
4258```
4380```
4259
4381
4260---
4382---
4383+
4261### `++sun:rs`
4384### `++sun:rs`
4262
4385
4263Unsigned integer to `@rs`
4386Unsigned integer to `@rs`
@@ -4286,6 +4409,7 @@ A `@rs`.
4286```
4409```
4287
4410
4288---
4411---
4412+
4289### `++san:rs`
4413### `++san:rs`
4290
4414
4291Signed integer to `@rs`'
4415Signed integer to `@rs`'
@@ -4344,6 +4468,7 @@ A `flag`.
4344```
4468```
4345
4469
4346---
4470---
4471+
4347### `++exp:rs`
4472### `++exp:rs`
4348
4473
4349Get exponent
4474Get exponent
@@ -4372,6 +4497,7 @@ A signed integer.
4372```
4497```
4373
4498
4374---
4499---
4500+
4375### `++toi:rs`
4501### `++toi:rs`
4376
4502
4377Round to integer
4503Round to integer
@@ -4400,6 +4526,7 @@ A `unit` of `@s`.
4400```
4526```
4401
4527
4402---
4528---
4529+
4403### `++drg:rs`
4530### `++drg:rs`
4404
4531
4405`@rs` to decimal float
4532`@rs` to decimal float
@@ -4429,6 +4556,7 @@ A `dn`.
4429```
4556```
4430
4557
4431---
4558---
4559+
4432### `++grd:rs`
4560### `++grd:rs`
4433
4561
4434Decimal float to `@rs`
4562Decimal float to `@rs`
@@ -4458,7 +4586,8 @@ A `@rs`.
4458```
4586```
4459
4587
4460---
4588---
4461−### `++rq`
4589+
4590+## `++rq`
4462
4591
4463Quadruple-precision fp
4592Quadruple-precision fp
4464
4593
@@ -4491,6 +4620,7 @@ configuration of the `rq` core.
4491```
4620```
4492
4621
4493---
4622---
4623+
4494### `++sea:rq`
4624### `++sea:rq`
4495
4625
4496`@rq` to `fn`
4626`@rq` to `fn`
@@ -4520,6 +4650,7 @@ An `fn`.
4520```
4650```
4521
4651
4522---
4652---
4653+
4523### `++bit:rq`
4654### `++bit:rq`
4524
4655
4525`fn` to `@rq`
4656`fn` to `@rq`
@@ -4549,6 +4680,7 @@ A `@rq`, a quad-precision float.
4549```
4680```
4550
4681
4551---
4682---
4683+
4552### `++add:rq`
4684### `++add:rq`
4553
4685
4554Add
4686Add
@@ -4582,6 +4714,7 @@ A `@rq`.
4582```
4714```
4583
4715
4584---
4716---
4717+
4585### `++sub:rq`
4718### `++sub:rq`
4586
4719
4587Subtract
4720Subtract
@@ -4618,6 +4751,7 @@ A `@rq`.
4618```
4751```
4619
4752
4620---
4753---
4754+
4621### `++mul:rq`
4755### `++mul:rq`
4622
4756
4623Multiply
4757Multiply
@@ -4651,6 +4785,7 @@ A `@rq`.
4651```
4785```
4652
4786
4653---
4787---
4788+
4654### `++div:rq`
4789### `++div:rq`
4655
4790
4656Divide
4791Divide
@@ -4684,6 +4819,7 @@ A `@rq`.
4684```
4819```
4685
4820
4686---
4821---
4822+
4687### `++fma:rq`
4823### `++fma:rq`
4688
4824
4689Fused multiply-add
4825Fused multiply-add
@@ -4720,6 +4856,7 @@ A `@rq`.
4720```
4856```
4721
4857
4722---
4858---
4859+
4723### `++sqt:rq`
4860### `++sqt:rq`
4724
4861
4725Square root
4862Square root
@@ -4751,6 +4888,7 @@ A `@rq`.
4751```
4888```
4752
4889
4753---
4890---
4891+
4754### `++lth:rq`
4892### `++lth:rq`
4755
4893
4756Less than
4894Less than
@@ -4776,7 +4914,6 @@ A `@rq`.
4776 (lth:ma a b)
4914 (lth:ma a b)
4777```
4915```
4778
4916
4779−
4780#### Examples
4917#### Examples
4781
4918
4782```
4919```
@@ -4788,6 +4925,7 @@ A `@rq`.
4788```
4925```
4789
4926
4790---
4927---
4928+
4791### `++lte:rq`
4929### `++lte:rq`
4792
4930
4793Less than or equal
4931Less than or equal
@@ -4827,6 +4965,7 @@ A `@rq`.
4827```
4965```
4828
4966
4829---
4967---
4968+
4830### `++equ:rq`
4969### `++equ:rq`
4831
4970
4832Equals
4971Equals
@@ -4863,6 +5002,7 @@ A `@rq`.
4863```
5002```
4864
5003
4865---
5004---
5005+
4866### `++gte:rq`
5006### `++gte:rq`
4867
5007
4868Greater than or equal
5008Greater than or equal
@@ -4902,6 +5042,7 @@ A `@rq`.
4902```
5042```
4903
5043
4904---
5044---
5045+
4905### `++gth:rq`
5046### `++gth:rq`
4906
5047
4907Tests whether `a` is greater than `b`.
5048Tests whether `a` is greater than `b`.
@@ -4939,6 +5080,7 @@ A `@rq`.
4939```
5080```
4940
5081
4941---
5082---
5083+
4942### `++sun:rq`
5084### `++sun:rq`
4943
5085
4944Unsigned integer to `@rq`
5086Unsigned integer to `@rq`
@@ -4967,6 +5109,7 @@ A `@rq`, a quad-precision float.
4967```
5109```
4968
5110
4969---
5111---
5112+
4970### `++san:rq`
5113### `++san:rq`
4971
5114
4972Signed integer to `rq`
5115Signed integer to `rq`
@@ -4995,6 +5138,7 @@ A `@rq`, a quad-precision float.
4995```
5138```
4996
5139
4997---
5140---
5141+
4998### `++sig:rq`
5142### `++sig:rq`
4999
5143
5000Get sign
5144Get sign
@@ -5023,6 +5167,7 @@ A `flag`.
5023```
5167```
5024
5168
5025---
5169---
5170+
5026### `++exp:rq`
5171### `++exp:rq`
5027
5172
5028Get exponent
5173Get exponent
@@ -5051,6 +5196,7 @@ A `@s`, a signed integer.
5051```
5196```
5052
5197
5053---
5198---
5199+
5054### `++toi:rq`
5200### `++toi:rq`
5055
5201
5056Round to integer
5202Round to integer
@@ -5082,6 +5228,7 @@ A `unit` of `@s`.
5082```
5228```
5083
5229
5084---
5230---
5231+
5085### `++drg:rq`
5232### `++drg:rq`
5086
5233
5087`@rq` to decimal float
5234`@rq` to decimal float
@@ -5114,6 +5261,7 @@ A `dn`.
5114```
5261```
5115
5262
5116---
5263---
5264+
5117### `++grd:rq`
5265### `++grd:rq`
5118
5266
5119Decimal float to `@rq`
5267Decimal float to `@rq`
@@ -5145,7 +5293,8 @@ A `@rq`, a quad-precision float.
5145```
5293```
5146
5294
5147---
5295---
5148−### `++rh`
5296+
5297+## `++rh`
5149
5298
5150Half-precision fp
5299Half-precision fp
5151
5300
@@ -5164,6 +5313,7 @@ down (`$d`), and round to zero (`$z`).
5164```
5313```
5165
5314
5166---
5315---
5316+
5167### `++ma:rh`
5317### `++ma:rh`
5168
5318
5169Initialize `ff`
5319Initialize `ff`
@@ -5179,6 +5329,7 @@ configuration of the `rh` core.
5179```
5329```
5180
5330
5181---
5331---
5332+
5182### `++sea:rh`
5333### `++sea:rh`
5183
5334
5184`@rh` to `fn`
5335`@rh` to `fn`
@@ -5208,6 +5359,7 @@ An `fn`.
5208```
5359```
5209
5360
5210---
5361---
5362+
5211### `++bit:rh`
5363### `++bit:rh`
5212
5364
5213`fn` to `@rh`
5365`fn` to `@rh`
@@ -5237,6 +5389,7 @@ A `@rh`, a half-precision float.
5237```
5389```
5238
5390
5239---
5391---
5392+
5240### `++add:rh`
5393### `++add:rh`
5241
5394
5242Produces the sum of `a` plus `b`.
5395Produces the sum of `a` plus `b`.
@@ -5268,6 +5421,7 @@ A `@rh`.
5268```
5421```
5269
5422
5270---
5423---
5424+
5271### `++sub:rh`
5425### `++sub:rh`
5272
5426
5273Subtract
5427Subtract
@@ -5304,6 +5458,7 @@ A `@rh`.
5304```
5458```
5305
5459
5306---
5460---
5461+
5307### `++mul:rh`
5462### `++mul:rh`
5308
5463
5309Multiply
5464Multiply
@@ -5337,6 +5492,7 @@ A `@rh`.
5337```
5492```
5338
5493
5339---
5494---
5495+
5340### `++div:rh`
5496### `++div:rh`
5341
5497
5342Divide
5498Divide
@@ -5370,6 +5526,7 @@ A `@rh`.
5370```
5526```
5371
5527
5372---
5528---
5529+
5373### `++fma:rh`
5530### `++fma:rh`
5374
5531
5375Fused multiply-add
5532Fused multiply-add
@@ -5406,6 +5563,7 @@ A `@rh`.
5406```
5563```
5407
5564
5408---
5565---
5566+
5409### `++sqt:rh`
5567### `++sqt:rh`
5410
5568
5411Square root
5569Square root
@@ -5437,6 +5595,7 @@ A `@rh`.
5437```
5595```
5438
5596
5439---
5597---
5598+
5440### `++lth:rh`
5599### `++lth:rh`
5441
5600
5442Less than
5601Less than
@@ -5473,6 +5632,7 @@ A `@rh`.
5473```
5632```
5474
5633
5475---
5634---
5635+
5476### `++lte:rh`
5636### `++lte:rh`
5477
5637
5478Less than or equal
5638Less than or equal
@@ -5512,6 +5672,7 @@ A `@rh`.
5512```
5672```
5513
5673
5514---
5674---
5675+
5515### `++equ:rh`
5676### `++equ:rh`
5516
5677
5517Equals
5678Equals
@@ -5548,6 +5709,7 @@ A `@rh`.
5548```
5709```
5549
5710
5550---
5711---
5712+
5551### `++gte:rh`
5713### `++gte:rh`
5552
5714
5553Greater than or equal
5715Greater than or equal
@@ -5587,6 +5749,7 @@ A `@rh`.
5587```
5749```
5588
5750
5589---
5751---
5752+
5590### `++gth:rh`
5753### `++gth:rh`
5591
5754
5592Tests whether `a` is greater than `b`.
5755Tests whether `a` is greater than `b`.
@@ -5653,6 +5816,7 @@ A `@rs`, a single-precision float.
5653```
5816```
5654
5817
5655---
5818---
5819+
5656### `++fos:rh`
5820### `++fos:rh`
5657
5821
5658`@rs` to `@rh`
5822`@rs` to `@rh`
@@ -5681,6 +5845,7 @@ A `@rh`, a half-precision float.
5681```
5845```
5682
5846
5683---
5847---
5848+
5684### `++sun:rh`
5849### `++sun:rh`
5685
5850
5686Unsigned integer to `@rh`
5851Unsigned integer to `@rh`
@@ -5709,6 +5874,7 @@ A `@rh`, a half-precision float.
5709```
5874```
5710
5875
5711---
5876---
5877+
5712### `++san:rh`
5878### `++san:rh`
5713
5879
5714Signed integer to `@rh`
5880Signed integer to `@rh`
@@ -5737,6 +5903,7 @@ A `@rh`, a half-precision float.
5737```
5903```
5738
5904
5739---
5905---
5906+
5740### `++sig:rh`
5907### `++sig:rh`
5741
5908
5742Get sign
5909Get sign
@@ -5765,6 +5932,7 @@ A `flag`.
5765```
5932```
5766
5933
5767---
5934---
5935+
5768### `++exp:rh`
5936### `++exp:rh`
5769
5937
5770Get exponent
5938Get exponent
@@ -5793,6 +5961,7 @@ A `@s`, a signed integer.
5793```
5961```
5794
5962
5795---
5963---
5964+
5796### `++toi:rh`
5965### `++toi:rh`
5797
5966
5798Round to integer
5967Round to integer
@@ -5824,6 +5993,7 @@ A `unit` of `@s`.
5824```
5993```
5825
5994
5826---
5995---
5996+
5827### `++drg:rh`
5997### `++drg:rh`
5828
5998
5829`@rh` to decimal float
5999`@rh` to decimal float
@@ -5856,6 +6026,7 @@ A `dn`.
5856```
6026```
5857
6027
5858---
6028---
6029+
5859### `++grd:rh`
6030### `++grd:rh`
5860
6031
5861Decimal float to `@rh`
6032Decimal float to `@rh`
@@ -5886,4 +6057,4 @@ A `@rh`, a a half-precision float.
5886 .~~-3.43e2
6057 .~~-3.43e2
5887```
6058```
5888
6059
5889−---
6060+---
content/docs/hoon/reference/stdlib/3c.md+26−10
@@ -4,7 +4,7 @@ weight = 23
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++yall`
7+## `++yall`
8
8
9Time since beginning of time
9Time since beginning of time
10
10
@@ -60,9 +60,9 @@ A cell of unsigned decimals.
60 [y=0 m=1 d=1]
60 [y=0 m=1 d=1]
61```
61```
62
62
63−
64---
63---
65−### `++yawn`
64+
65+## `++yawn`
66
66
67Days since beginning of time
67Days since beginning of time
68
68
@@ -124,7 +124,8 @@ An unsigned decimal.
124```
124```
125
125
126---
126---
127−### `++year`
127+
128+## `++year`
128
129
129Date to @d
130Date to @d
130
131
@@ -161,7 +162,8 @@ A `@d`.
161```
162```
162
163
163---
164---
164−### `++yell`
165+
166+## `++yell`
165
167
166Tarp from atomic date
168Tarp from atomic date
167
169
@@ -212,7 +214,8 @@ A `tarp`.
212```
214```
213
215
214---
216---
215−### `++yelp`
217+
218+## `++yelp`
216
219
217Leap-week?
220Leap-week?
218
221
@@ -251,7 +254,8 @@ A flag.
251```
254```
252
255
253---
256---
254−### `++yore`
257+
258+## `++yore`
255
259
256Date from atomic date
260Date from atomic date
257
261
@@ -287,7 +291,8 @@ A `date`.
287```
291```
288
292
289---
293---
290−### `++yule`
294+
295+## `++yule`
291
296
292Daily time to time atom
297Daily time to time atom
293
298
@@ -349,7 +354,8 @@ A time atom, `@d`.
349```
354```
350
355
351---
356---
352−### `++yo`
357+
358+## `++yo`
353
359
354Time constants core
360Time constants core
355
361
@@ -362,6 +368,7 @@ Core whose arms contain constants for interacting with earth time.
362```
368```
363
369
364---
370---
371+
365### `++cet:yo`
372### `++cet:yo`
366
373
367Days in a century
374Days in a century
@@ -394,6 +401,7 @@ An atom.
394```
401```
395
402
396---
403---
404+
397### `++day:yo`
405### `++day:yo`
398
406
399Seconds in day
407Seconds in day
@@ -421,6 +429,7 @@ An atom.
421```
429```
422
430
423---
431---
432+
424### `++era:yo`
433### `++era:yo`
425
434
426Leap-year period
435Leap-year period
@@ -458,6 +467,7 @@ A year is a leap-year if:
458- **or** if it's divisible by 400.
467- **or** if it's divisible by 400.
459
468
460---
469---
470+
461### `++hor:yo`
471### `++hor:yo`
462
472
463Seconds in hour
473Seconds in hour
@@ -486,6 +496,7 @@ An atom.
486```
496```
487
497
488---
498---
499+
489### `++jes:yo`
500### `++jes:yo`
490
501
491Maximum 64-bit timestamp
502Maximum 64-bit timestamp
@@ -515,6 +526,7 @@ An atom.
515The date is December 4, 292,277,026,596.
526The date is December 4, 292,277,026,596.
516
527
517---
528---
529+
518### `++mit:yo`
530### `++mit:yo`
519
531
520Seconds in minute
532Seconds in minute
@@ -539,6 +551,7 @@ An atom.
539```
551```
540
552
541---
553---
554+
542### `++moh:yo`
555### `++moh:yo`
543
556
544Days in month
557Days in month
@@ -568,6 +581,7 @@ A `list` of `@ud`
568```
581```
569
582
570---
583---
584+
571### `++moy:yo`
585### `++moy:yo`
572
586
573Days in months of leap-year
587Days in months of leap-year
@@ -597,6 +611,7 @@ A `list` of `@ud`.
597```
611```
598
612
599---
613---
614+
600### `++qad:yo`
615### `++qad:yo`
601
616
602Seconds in 4 years
617Seconds in 4 years
@@ -622,6 +637,7 @@ An atom.
622```
637```
623
638
624---
639---
640+
625### `++yer:yo`
641### `++yer:yo`
626
642
627Seconds in year
643Seconds in year
@@ -646,4 +662,4 @@ An atom.
646 31.536.000
662 31.536.000
647```
663```
648
664
649−---
665+---
content/docs/hoon/reference/stdlib/3d.md+26−12
@@ -4,7 +4,7 @@ weight = 24
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++shad`
7+## `++shad`
8
8
9Double SHA-256
9Double SHA-256
10
10
@@ -34,7 +34,8 @@ An atom.
34```
34```
35
35
36---
36---
37−### `++shaf`
37+
38+## `++shaf`
38
39
39Half SHA-256
40Half SHA-256
40
41
@@ -69,7 +70,8 @@ first and last halves of the 256-bit salted hash `shas`.
69```
70```
70
71
71---
72---
72−### `++shal`
73+
74+## `++shal`
73
75
74SHA-512 with length
76SHA-512 with length
75
77
@@ -225,7 +227,8 @@ as a way of saying that the atom `ruz` is shorter than its representative
225byte-string.
227byte-string.
226
228
227---
229---
228−### `++sham`
230+
231+## `++sham`
229
232
230128-bit noun hash
233128-bit noun hash
231
234
@@ -263,7 +266,8 @@ An atom.
263```
266```
264
267
265---
268---
266−### `++shan`
269+
270+## `++shan`
267
271
268SHA-1
272SHA-1
269
273
@@ -359,7 +363,8 @@ An atom.
359SHA-1 is a deprecated function; it is not considered secure.
363SHA-1 is a deprecated function; it is not considered secure.
360
364
361---
365---
362−### `++shas`
366+
367+## `++shas`
363
368
364Salted hash
369Salted hash
365
370
@@ -391,7 +396,8 @@ of that logical operation is then itself hashed with SHA-256.
391```
396```
392
397
393---
398---
394−### `++shaw`
399+
400+## `++shaw`
395
401
396Hash to nbits
402Hash to nbits
397
403
@@ -429,7 +435,8 @@ An atom.
429```
435```
430
436
431---
437---
432−### `++shax`
438+
439+## `++shax`
433
440
434SHA-256
441SHA-256
435
442
@@ -454,7 +461,8 @@ Produces an atom by hashing an atom `ruz` with SHA-256.
454```
461```
455
462
456---
463---
457−### `++shay`
464+
465+## `++shay`
458
466
459SHA-256 with length
467SHA-256 with length
460
468
@@ -578,7 +586,8 @@ as a way of saying that the atom `ruz` is shorter than its representative
578byte-string.
586byte-string.
579
587
580---
588---
581−### `++shaz`
589+
590+## `++shaz`
582
591
583SHA-512
592SHA-512
584
593
@@ -611,7 +620,8 @@ An atom.
611```
620```
612
621
613---
622---
614−### `++og`
623+
624+## `++og`
615
625
616Container arm for SHA-256-powered random-number generation. Its sample `a` is an
626Container arm for SHA-256-powered random-number generation. Its sample `a` is an
617atom that is used as a seed for the hash.
627atom that is used as a seed for the hash.
@@ -646,6 +656,7 @@ result every time it is run. Use `eny`, 256 bits of entropy, for a
646non-deterministic product.
656non-deterministic product.
647
657
648---
658---
659+
649### `++rad:og`
660### `++rad:og`
650
661
651Random in range
662Random in range
@@ -687,6 +698,7 @@ An atom.
687```
698```
688
699
689---
700---
701+
690### `++rads:og`
702### `++rads:og`
691
703
692Random continuation
704Random continuation
@@ -732,6 +744,7 @@ generate separate random values from the same seed. Notice how we jump from
732one `rads` function call to another in the above example.
744one `rads` function call to another in the above example.
733
745
734---
746---
747+
735### `++raw:og`
748### `++raw:og`
736
749
737Random bits
750Random bits
@@ -781,12 +794,13 @@ An atom.
781```
794```
782
795
783---
796---
797+
784### `++raws:og`
798### `++raws:og`
785
799
786Random bits continuation
800Random bits continuation
787
801
788Produces a cell. The head of the cell is an atom with a bitwidth `b` that is
802Produces a cell. The head of the cell is an atom with a bitwidth `b` that is
789−composed of random bits. The tail is a new core produced from hashing the
803+composed of random bits. The tail is a new core produced from hashing the
790parent core with `(raw b)`.
804parent core with `(raw b)`.
791
805
792#### Source
806#### Source
content/docs/hoon/reference/stdlib/3f.md+20−4
@@ -3,7 +3,8 @@ title = "3f: Scrambling"
3weight = 26
3weight = 26
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6−### `++un`
6+
7+## `++un`
7
8
8Reversible scrambling
9Reversible scrambling
9
10
@@ -18,6 +19,7 @@ Used in the `@p` phonetic base.
18```
19```
19
20
20---
21---
22+
21### `++wren:un`
23### `++wren:un`
22
24
23Conceal structure
25Conceal structure
@@ -70,6 +72,7 @@ An atom.
70```
72```
71
73
72---
74---
75+
73### `++wred:un`
76### `++wred:un`
74
77
75Restore structure
78Restore structure
@@ -122,6 +125,7 @@ An atom.
122```
125```
123
126
124---
127---
128+
125### `++xafo:un`
129### `++xafo:un`
126
130
127Add modulo 255
131Add modulo 255
@@ -159,6 +163,7 @@ An atom.
159```
163```
160
164
161---
165---
166+
162### `++xaro:un`
167### `++xaro:un`
163
168
164Subtract modulo 255
169Subtract modulo 255
@@ -196,6 +201,7 @@ An atom.
196```
201```
197
202
198---
203---
204+
199### `++zaft:un`
205### `++zaft:un`
200
206
201Look up in 255 sub box
207Look up in 255 sub box
@@ -248,6 +254,7 @@ An atom.
248```
254```
249
255
250---
256---
257+
251### `++zart:un`
258### `++zart:un`
252
259
253Reverse look up in 255 sub box
260Reverse look up in 255 sub box
@@ -298,6 +305,7 @@ An atom.
298```
305```
299
306
300---
307---
308+
301### `++zyft:un`
309### `++zyft:un`
302
310
303Lookup byte in 256 sub box
311Lookup byte in 256 sub box
@@ -351,6 +359,7 @@ An atom.
351```
359```
352
360
353---
361---
362+
354### `++zyrt:un`
363### `++zyrt:un`
355
364
356Reverse lookup byte in 256 sub box
365Reverse lookup byte in 256 sub box
@@ -403,7 +412,8 @@ An atom.
403```
412```
404
413
405---
414---
406−### `++ob`
415+
416+## `++ob`
407
417
408Reversible scrambling, v2
418Reversible scrambling, v2
409
419
@@ -416,6 +426,7 @@ A core for performing reversible scrambling operations for the `@p` phonetic
416base.
426base.
417
427
418---
428---
429+
419### `++feen:ob`
430### `++feen:ob`
420
431
421Conceal structure, v2
432Conceal structure, v2
@@ -465,6 +476,7 @@ An atom.
465```
476```
466
477
467---
478---
479+
468### `++fend:ob`
480### `++fend:ob`
469
481
470Restore structure, v2
482Restore structure, v2
@@ -518,6 +530,7 @@ An atom.
518```
530```
519
531
520---
532---
533+
521### `++fice:ob`
534### `++fice:ob`
522
535
523Feistel-like cipher
536Feistel-like cipher
@@ -561,6 +574,7 @@ An atom.
561```
574```
562
575
563---
576---
577+
564### `++teil:ob`
578### `++teil:ob`
565
579
566Reverse Feistel-like cipher
580Reverse Feistel-like cipher
@@ -593,7 +607,6 @@ An atom.
593 ::
607 ::
594```
608```
595
609
596−
597#### Examples
610#### Examples
598
611
599```
612```
@@ -605,6 +618,7 @@ An atom.
605```
618```
606
619
607---
620---
621+
608### `++rynd:ob`
622### `++rynd:ob`
609
623
610Reverse Feistel-like cipher
624Reverse Feistel-like cipher
@@ -647,6 +661,7 @@ A cell of two atoms.
647```
661```
648
662
649---
663---
664+
650### `++rund:ob`
665### `++rund:ob`
651
666
652Reverse single Feistel-like
667Reverse single Feistel-like
@@ -689,6 +704,7 @@ A cell of two atoms.
689```
704```
690
705
691---
706---
707+
692### `++raku:ob`
708### `++raku:ob`
693
709
694Key list
710Key list
@@ -719,4 +735,4 @@ A list of atoms of aura `@ux` (hexadecimal).
719 ~[0xb76d.5eed 0xee28.1300 0x85bc.ae01 0x4b38.7af7]
735 ~[0xb76d.5eed 0xee28.1300 0x85bc.ae01 0x4b38.7af7]
720```
736```
721
737
722−---
738+---
content/docs/hoon/reference/stdlib/3g.md+23−42
@@ -4,8 +4,7 @@ weight = 27
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++coin`
7+## `++coin`
8−
9
8
10Noun-literal syntax cases
9Noun-literal syntax cases
11
10
@@ -22,6 +21,7 @@ and printed using `++so` and `++co` cores.
22```
21```
23
22
24---
23---
24+
25#### Examples
25#### Examples
26
26
27```
27```
@@ -46,9 +46,9 @@ and printed using `++so` and `++co` cores.
46 [3 4]
46 [3 4]
47```
47```
48
48
49−
50---
49---
51−### `++dime`
50+
51+## `++dime`
52
52
53Aura-atom pair
53Aura-atom pair
54
54
@@ -71,7 +71,8 @@ to parse atoms of specific auras.
71```
71```
72
72
73---
73---
74−### `++edge`
74+
75+## `++edge`
75
76
76Parsing location metadata. Parsing location input `p` and optional result `p.q` and parsing continuation `q.q`.
77Parsing location metadata. Parsing location input `p` and optional result `p.q` and parsing continuation `q.q`.
77
78
@@ -95,9 +96,9 @@ Parsing location metadata. Parsing location input `p` and optional result `p.q`
95
96
96See also: [Section 3g](/docs/hoon/reference/stdlib/3g#rule), `++rule`
97See also: [Section 3g](/docs/hoon/reference/stdlib/3g#rule), `++rule`
97
98
98−
99---
99---
100−### `++hair`
100+
101+## `++hair`
101
102
102Parsing line and column
103Parsing line and column
103
104
@@ -126,7 +127,8 @@ A pair of two `@ud` used in parsing indicating line and column number.
126```
127```
127
128
128---
129---
129−### `++like`
130+
131+## `++like`
130
132
131Generic edge
133Generic edge
132
134
@@ -160,7 +162,8 @@ Generates an `++edge` with a parsed result set to a specific type.
160```
162```
161
163
162---
164---
163−### `++nail`
165+
166+## `++nail`
164
167
165Location, remainder of parsed text
168Location, remainder of parsed text
166
169
@@ -180,31 +183,8 @@ Indicates parsing position `p`, and remaining text to be parsed `q`.
180```
183```
181
184
182---
185---
183−### `++path`
184−
185−Filesystem path
186−
187−A list of `++knot`s. `++knot` is another name for `@ta`.
188−
189−#### Source
190−
191−```hoon
192− ++ path (list knot)
193−```
194−
195−#### Examples
196
186
197−```
187+## `++pint`
198− > `path`"abc"
199− /a/b/c
200−```
201−
202−#### Discussion
203−
204−Used in `%clay` and `%eyre` extensively.
205−
206−---
207−### `++pint`
208
188
209Parsing range
189Parsing range
210
190
@@ -227,15 +207,14 @@ stack traces.
227 [p=[p=1 q=4] q=[p=1 q=6]]
207 [p=[p=1 q=4] q=[p=1 q=6]]
228```
208```
229
209
230−
231---
210---
232−### `++rule`
211+
212+## `++rule`
233
213
234Parsing rule
214Parsing rule
235
215
236An empty parsing rule, but used to check that parsing rules match this with `_`.
216An empty parsing rule, but used to check that parsing rules match this with `_`.
237
217
238−
239#### Source
218#### Source
240
219
241```hoon
220```hoon
@@ -250,7 +229,8 @@ An empty parsing rule, but used to check that parsing rules match this with `_`.
250```
229```
251
230
252---
231---
253−### `++spot`
232+
233+## `++spot`
254
234
255Stack trace line
235Stack trace line
256
236
@@ -271,14 +251,14 @@ The stack trace that is printed after crashing.
271```
251```
272
252
273---
253---
274−### `++tone`
254+
255+## `++tone`
275
256
276Nock result, error report
257Nock result, error report
277
258
278Produces either success (`%0`), a block with list of requests blocked on (`%1`),
259Produces either success (`%0`), a block with list of requests blocked on (`%1`),
279or failure with an error report (`%2`).
260or failure with an error report (`%2`).
280
261
281−
282#### Source
262#### Source
283
263
284```hoon
264```hoon
@@ -319,14 +299,14 @@ or failure with an error report (`%2`).
319```
299```
320
300
321---
301---
322−### `++toon`
302+
303+## `++toon`
323
304
324Nock result, stack trace
305Nock result, stack trace
325
306
326Produces either success (`%0`), a block with list of requests blocked on (`%1`),
307Produces either success (`%0`), a block with list of requests blocked on (`%1`),
327or failure with a stack trace (`%2`).
308or failure with a stack trace (`%2`).
328
309
329−
330#### Source
310#### Source
331
311
332```hoon
312```hoon
@@ -347,7 +327,8 @@ or failure with a stack trace (`%2`).
347```
327```
348
328
349---
329---
350−### `++wonk`
330+
331+## `++wonk`
351
332
352Product from edge
333Product from edge
353
334
content/docs/hoon/reference/stdlib/4a.md+5−1
@@ -4,7 +4,7 @@ weight = 28
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++po`
7+## `++po`
8
8
9Phonetic base
9Phonetic base
10
10
@@ -54,6 +54,7 @@ contained arms.
54```
54```
55
55
56---
56---
57+
57### `++ind:po`
58### `++ind:po`
58
59
59Parse suffix
60Parse suffix
@@ -92,6 +93,7 @@ A `unit`.
92```
93```
93
94
94---
95---
96+
95### `++ins:po`
97### `++ins:po`
96
98
97Parse prefix
99Parse prefix
@@ -133,6 +135,7 @@ A `unit` of an atom.
133```
135```
134
136
135---
137---
138+
136### `++tod:po`
139### `++tod:po`
137
140
138Fetch suffix
141Fetch suffix
@@ -177,6 +180,7 @@ An atom.
177```
180```
178
181
179---
182---
183+
180### `++tos:po`
184### `++tos:po`
181
185
182Fetch prefix
186Fetch prefix
content/docs/hoon/reference/stdlib/4b.md+36−37
@@ -4,7 +4,7 @@ weight = 29
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++at`
7+## `++at`
8
8
9```hoon
9```hoon
10 ++ at
10 ++ at
@@ -13,8 +13,6 @@ template = "doc.html"
13
13
14XX document
14XX document
15
15
16−
17−
18### `++r:at`
16### `++r:at`
19
17
20```hoon
18```hoon
@@ -34,7 +32,6 @@ XX document
34 rux
32 rux
35```
33```
36
34
37−
38XX document
35XX document
39
36
40### `++rf:at`
37### `++rf:at`
@@ -43,7 +40,6 @@ XX document
43 ++ rf `tape`[?-(a $& '&', $| '|', * !!) ~]
40 ++ rf `tape`[?-(a $& '&', $| '|', * !!) ~]
44```
41```
45
42
46−
47XX document
43XX document
48
44
49### `++rn:at`
45### `++rn:at`
@@ -179,10 +175,9 @@ XX document
179
175
180---
176---
181
177
182−
183---
178---
184
179
185−### `++cass`
180+## `++cass`
186
181
187To lowercase
182To lowercase
188
183
@@ -220,7 +215,8 @@ A `++tape`.
220```
215```
221
216
222---
217---
223−### `++crip`
218+
219+## `++crip`
224
220
225Tape to cord
221Tape to cord
226
222
@@ -254,7 +250,8 @@ A `++cord`.
254```
250```
255
251
256---
252---
257−### `++cuss`
253+
254+## `++cuss`
258
255
259To uppercase
256To uppercase
260
257
@@ -292,7 +289,8 @@ A `++tape`.
292```
289```
293
290
294---
291---
295−### `++mesc`
292+
293+## `++mesc`
296
294
297Escape special chars
295Escape special chars
298
296
@@ -332,9 +330,9 @@ A `++tape`.
332 "as\0x27/sa\0xc3/\0x9f/"
330 "as\0x27/sa\0xc3/\0x9f/"
333```
331```
334
332
335−
336---
333---
337−### `++runt`
334+
335+## `++runt`
338
336
339Prepend `n` times
337Prepend `n` times
340
338
@@ -371,9 +369,9 @@ A `++tape`.
371 "aaaaaaaaaa"
369 "aaaaaaaaaa"
372```
370```
373
371
374−
375---
372---
376−### `++sand`
373+
374+## `++sand`
377
375
378Soft-cast by aura
376Soft-cast by aura
379
377
@@ -408,9 +406,9 @@ A `(unit @)`.
408 ~
406 ~
409```
407```
410
408
411−
412---
409---
413−### `++sane`
410+
411+## `++sane`
414
412
415Check aura validity
413Check aura validity
416
414
@@ -477,9 +475,9 @@ A boolean.
477 %.n
475 %.n
478```
476```
479
477
480−
481---
478---
482−### `++teff`
479+
480+## `++teff`
483
481
484UTF8 Length
482UTF8 Length
485
483
@@ -514,9 +512,9 @@ An atom.
514 2
512 2
515```
513```
516
514
517−
518---
515---
519−### `++trim`
516+
517+## `++trim`
520
518
521Tape split
519Tape split
522
520
@@ -555,9 +553,9 @@ A cell of `++tape`s, `p` and `q`.
555 [p="zam" q=""]
553 [p="zam" q=""]
556```
554```
557
555
558−
559---
556---
560−### `++trip`
557+
558+## `++trip`
561
559
562Cord to tape
560Cord to tape
563
561
@@ -594,9 +592,9 @@ A `++tape`.
594 "abc"
592 "abc"
595```
593```
596
594
597−
598---
595---
599−### `++tuba`
596+
597+## `++tuba`
600
598
601UTF8 to UTF32 tape
599UTF8 to UTF32 tape
602
600
@@ -629,9 +627,9 @@ A `++list` of codepoints `@c`.
629 ~[~-c ~-h ~-a ~-r ~-s]
627 ~[~-c ~-h ~-a ~-r ~-s]
630```
628```
631
629
632−
633---
630---
634−### `++tufa`
631+
632+## `++tufa`
635
633
636UTF32 to UTF8 tape
634UTF32 to UTF8 tape
637
635
@@ -665,9 +663,9 @@ A `++tape`.
665 "ab±c"
663 "ab±c"
666```
664```
667
665
668−
669---
666---
670−### `++tuft`
667+
668+## `++tuft`
671
669
672UTF32 to UTF8 text
670UTF32 to UTF8 text
673
671
@@ -724,9 +722,9 @@ A `++cord`.
724 '¶'
722 '¶'
725```
723```
726
724
727−
728---
725---
729−### `++turf`
726+
727+## `++turf`
730
728
731UTF8 to UTF32 cord
729UTF8 to UTF32 cord
732
730
@@ -781,9 +779,9 @@ A `@c`, UTF-32 codepoint.
781 0x442.0000.0443.0000.0442.0000.0020.0000.044f
779 0x442.0000.0443.0000.0442.0000.0020.0000.044f
782```
780```
783
781
784−
785---
782---
786−### `++wack`
783+
784+## `++wack`
787
785
788Coin format encode
786Coin format encode
789
787
@@ -831,7 +829,8 @@ A `++span` (`@ta`).
831```
829```
832
830
833---
831---
834−### `++wick`
832+
833+## `++wick`
835
834
836Coin format decode
835Coin format decode
837
836
@@ -877,9 +876,9 @@ A `++span` `@ta`.
877 '~20_sam~'
876 '~20_sam~'
878```
877```
879
878
880−
881---
879---
882−### `++woad`
880+
881+## `++woad`
883
882
884Unescape cord
883Unescape cord
885
884
@@ -938,9 +937,9 @@ A `++cord`.
938 '¶20 as'
937 '¶20 as'
939```
938```
940
939
941−
942---
940---
943−### `++wood`
941+
942+## `++wood`
944
943
945Escape cord
944Escape cord
946
945
content/docs/hoon/reference/stdlib/4c.md+12−16
@@ -4,7 +4,7 @@ weight = 30
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++re`
7+## `++re`
8
8
9Pretty-printing engine
9Pretty-printing engine
10
10
@@ -29,6 +29,7 @@ Pretty-printing engine that accepts a `++tank` sample and contains arms that per
29```
29```
30
30
31---
31---
32+
32### `++ram:re`
33### `++ram:re`
33
34
34Flatten to tape
35Flatten to tape
@@ -71,7 +72,9 @@ A `++tape`.
71 > ~(ram re rose+["." "(" ")"]^~[leaf+"bar" leaf+"baz" leaf+"bam"])
72 > ~(ram re rose+["." "(" ")"]^~[leaf+"bar" leaf+"baz" leaf+"bam"])
72 "(bar.baz.bam)"
73 "(bar.baz.bam)"
73```
74```
75+
74---
76---
77+
75### `++win:re`
78### `++win:re`
76
79
77Render at indent
80Render at indent
@@ -136,6 +139,7 @@ A `++wall` (`++list` of `++tapes`).
136```
139```
137
140
138---
141---
142+
139### `++din:re`
143### `++din:re`
140
144
141XX document
145XX document
@@ -148,7 +152,6 @@ XX document
148
152
149 ++ din (mod (add 2 tab) (mul 2 (div edg 3)))
153 ++ din (mod (add 2 tab) (mul 2 (div edg 3)))
150
154
151−
152---
155---
153
156
154### `++fit:re`
157### `++fit:re`
@@ -163,14 +166,10 @@ Determine whether `tac` fits on one line. Internal to `++win`
163
166
164#### Source
167#### Source
165
168
166−++ fit (lte (lent ram) (sub edg tab))
169+++ fit (lte (lent ram) (sub edg tab))
167−
168
170
169#### Examples
171#### Examples
170
172
171−
172−
173−
174---
173---
175
174
176### `++rig:re`
175### `++rig:re`
@@ -216,6 +215,7 @@ A `++wall` (list of `++tape`s).
216#### Examples
215#### Examples
217
216
218---
217---
218+
219### `++wig:re`
219### `++wig:re`
220
220
221`++win` render tape
221`++win` render tape
@@ -248,10 +248,9 @@ Render `++tape`. Internal to `++win`.
248 --
248 --
249```
249```
250
250
251−
252−
253---
251---
254−### `++show`
252+
253+## `++show`
255
254
256```hoon
255```hoon
257 ++ show :: XX deprecated, use span
256 ++ show :: XX deprecated, use span
@@ -314,7 +313,7 @@ Render `++tape`. Internal to `++win`.
314
313
315XX document
314XX document
316
315
317−### `++shep`
316+## `++shep`
318
317
319```hoon
318```hoon
320 ++ shep
319 ++ shep
@@ -338,7 +337,7 @@ XX document
338
337
339XX document
338XX document
340
339
341−### `++shop`
340+## `++shop`
342
341
343```hoon
342```hoon
344 ++ shop
343 ++ shop
@@ -356,9 +355,6 @@ XX document
356 ::
355 ::
357```
356```
358
357
359−
360XX document
358XX document
361
359
362−
360+---
363−
364−---
content/docs/hoon/reference/stdlib/4d.md+4−4
@@ -4,7 +4,7 @@ weight = 31
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++last`
7+## `++last`
8
8
9Further trace
9Further trace
10
10
@@ -48,7 +48,8 @@ A `hair`.
48```
48```
49
49
50---
50---
51−### `++lust`
51+
52+## `++lust`
52
53
53Detect newline
54Detect newline
54
55
@@ -73,7 +74,6 @@ A hair.
73 ?:(=(`@`10 weq) [+(p.naz) 1] [p.naz +(q.naz)])
74 ?:(=(`@`10 weq) [+(p.naz) 1] [p.naz +(q.naz)])
74```
75```
75
76
76−
77#### Examples
77#### Examples
78
78
79```
79```
@@ -97,4 +97,4 @@ A hair.
97 [2 6]
97 [2 6]
98```
98```
99
99
100−---
100+---
content/docs/hoon/reference/stdlib/4e.md+20−33
@@ -4,7 +4,7 @@ weight = 32
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++bend`
7+## `++bend`
8
8
9Conditional composer
9Conditional composer
10
10
@@ -70,9 +70,9 @@ A `++rule`.
70 [~ %sep]
70 [~ %sep]
71```
71```
72
72
73−
74---
73---
75−### `++comp`
74+
75+## `++comp`
76
76
77Arbitrary compose
77Arbitrary compose
78
78
@@ -123,7 +123,8 @@ A `++rule`.
123```
123```
124
124
125---
125---
126−### `++fail`
126+
127+## `++fail`
127
128
128Never parse
129Never parse
129
130
@@ -154,9 +155,9 @@ An `++edge`.
154 [p=[p=1.337 q=70] q=~]
155 [p=[p=1.337 q=70] q=~]
155```
156```
156
157
157−
158---
158---
159−### `++glue`
159+
160+## `++glue`
160
161
161Skip delimiter
162Skip delimiter
162
163
@@ -174,8 +175,6 @@ result.
174
175
175#### Produces
176#### Produces
176
177
177−
178−
179#### Source
178#### Source
180
179
181```hoon
180```hoon
@@ -205,7 +204,8 @@ result.
205```
204```
206
205
207---
206---
208−### `++less`
207+
208+## `++less`
209
209
210Parse unless
210Parse unless
211
211
@@ -220,8 +220,6 @@ connect `vex` with the following `++rule`.
220
220
221#### Produces
221#### Produces
222
222
223−
224−
225#### Source
223#### Source
226
224
227```hoon
225```hoon
@@ -249,9 +247,9 @@ connect `vex` with the following `++rule`.
249 ! exit
247 ! exit
250```
248```
251
249
252−
253---
250---
254−### `++pfix`
251+
252+## `++pfix`
255
253
256Discard first rule
254Discard first rule
257
255
@@ -264,8 +262,6 @@ ignoring the result of the first and producing the result of the second.
264
262
265#### Produces
263#### Produces
266
264
267−
268−
269#### Source
265#### Source
270
266
271```hoon
267```hoon
@@ -284,9 +280,9 @@ ignoring the result of the first and producing the result of the second.
284 q=10
280 q=10
285```
281```
286
282
287−
288---
283---
289−### `++plug`
284+
285+## `++plug`
290
286
291Parse to tuple
287Parse to tuple
292
288
@@ -302,8 +298,6 @@ more detailed explanation.
302
298
303#### Produces
299#### Produces
304
300
305−
306−
307#### Source
301#### Source
308
302
309```hoon
303```hoon
@@ -333,9 +327,9 @@ more detailed explanation.
333 [%moke '/' ~ %da ~2014.1.1]
327 [%moke '/' ~ %da ~2014.1.1]
334```
328```
335
329
336−
337---
330---
338−### `++pose`
331+
332+## `++pose`
339
333
340Parse options
334Parse options
341
335
@@ -350,8 +344,6 @@ following rule `sab`. See also: the monad applicator ;\~
350
344
351#### Produces
345#### Produces
352
346
353−
354−
355#### Source
347#### Source
356
348
357```hoon
349```hoon
@@ -382,9 +374,9 @@ following rule `sab`. See also: the monad applicator ;\~
382 ! exit
374 ! exit
383```
375```
384
376
385−
386---
377---
387−### `++sfix`
378+
379+## `++sfix`
388
380
389Discard second rule
381Discard second rule
390
382
@@ -399,8 +391,6 @@ result of the first and discarding the result of the second.
399
391
400#### Produces
392#### Produces
401
393
402−
403−
404#### Source
394#### Source
405
395
406```hoon
396```hoon
@@ -419,9 +409,9 @@ result of the first and discarding the result of the second.
419 q=10
409 q=10
420```
410```
421
411
422−
423---
412---
424−### `++simu`
413+
414+## `++simu`
425
415
426First and second
416First and second
427
417
@@ -436,8 +426,6 @@ connect `vex` with the following `++rule`.
436
426
437#### Produces
427#### Produces
438
428
439−
440−
441#### Source
429#### Source
442
430
443```hoon
431```hoon
@@ -467,5 +455,4 @@ connect `vex` with the following `++rule`.
467 ! exit
455 ! exit
468```
456```
469
457
470−
458+---
471−---
content/docs/hoon/reference/stdlib/4f.md+49−53
@@ -4,7 +4,7 @@ weight = 33
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++bass`
7+## `++bass`
8
8
9Parser modifier: LSB
9Parser modifier: LSB
10ordered `++list` as atom of a `++base`.
10ordered `++list` as atom of a `++base`.
@@ -44,10 +44,9 @@ A `++rule`.
44 0b101.0011
44 0b101.0011
45```
45```
46
46
47−
48---
47---
49
48
50−### `++boss`
49+## `++boss`
51
50
52Parser modifier: LSB
51Parser modifier: LSB
53
52
@@ -91,7 +90,8 @@ A `++rule`.
91```
90```
92
91
93---
92---
94−### `++cold`
93+
94+## `++cold`
95
95
96Replace with constant
96Replace with constant
97
97
@@ -132,9 +132,9 @@ An `++edge`.
132 [p=[p=1 q=1] q=~]
132 [p=[p=1 q=1] q=~]
133```
133```
134
134
135−
136---
135---
137−### `++cook`
136+
137+## `++cook`
138
138
139Apply gate
139Apply gate
140
140
@@ -182,9 +182,9 @@ An `++rule`.
182 [p=[p=1 q=2] q=[~ u=[p='b' q=[p=[p=1 q=2] q="bc"]]]]
182 [p=[p=1 q=2] q=[~ u=[p='b' q=[p=[p=1 q=2] q="bc"]]]]
183```
183```
184
184
185−
186---
185---
187−### `++easy`
186+
187+## `++easy`
188
188
189Always parse
189Always parse
190
190
@@ -225,9 +225,9 @@ A `++rule`.
225 [p=[p=1 q=1] q=[~ [p='a' q=[p=[p=1 q=1] q="bc"]]]]
225 [p=[p=1 q=1] q=[~ [p='a' q=[p=[p=1 q=1] q="bc"]]]]
226```
226```
227
227
228−
229---
228---
230−### `++full`
229+
230+## `++full`
231
231
232Parse to end
232Parse to end
233
233
@@ -266,9 +266,9 @@ A `++rule`.
266 [p=[p=1 q=3] q=[~ u=[p=[~~a ~~b] q=[p=[p=1 q=3] q=""]]]]
266 [p=[p=1 q=3] q=[~ u=[p=[~~a ~~b] q=[p=[p=1 q=3] q=""]]]]
267```
267```
268
268
269−
270---
269---
271−### `++funk`
270+
271+## `++funk`
272
272
273Add to tape
273Add to tape
274
274
@@ -303,9 +303,9 @@ A `++rule`.
303 [p=[p=1 q=4] q=~]
303 [p=[p=1 q=4] q=~]
304```
304```
305
305
306−
307---
306---
308−### `++here`
307+
308+## `++here`
309
309
310Place-based apply
310Place-based apply
311
311
@@ -351,9 +351,9 @@ A `++rule`.
351 ~[[[[p=1 q=1] p=1 q=2] ~~a] [[[p=1 q=2] p=1 q=3] ~~b] [[[p=1 q=3] p=1 q=4] ~~c]]
351 ~[[[[p=1 q=1] p=1 q=2] ~~a] [[[p=1 q=2] p=1 q=3] ~~b] [[[p=1 q=3] p=1 q=4] ~~c]]
352```
352```
353
353
354−
355---
354---
356−### `++ifix`
355+
356+## `++ifix`
357
357
358Infix
358Infix
359
359
@@ -392,9 +392,9 @@ A `++rule`.
392 "my"
392 "my"
393```
393```
394
394
395−
396---
395---
397−### `++jest`
396+
397+## `++jest`
398
398
399Match a cord
399Match a cord
400
400
@@ -445,9 +445,9 @@ An `++edge`.
445 [p=[p=1 q=9] q=[~ [p='john doe' q=[p=[p=1 q=9] q=""]]]]
445 [p=[p=1 q=9] q=[~ [p='john doe' q=[p=[p=1 q=9] q=""]]]]
446```
446```
447
447
448−
449---
448---
450−### `++just`
449+
450+## `++just`
451
451
452Match a char
452Match a char
453
453
@@ -496,9 +496,9 @@ A `++rule`.
496 ~~~25.
496 ~~~25.
497```
497```
498
498
499−
500---
499---
501−### `++knee`
500+
501+## `++knee`
502
502
503Recursive parsers
503Recursive parsers
504
504
@@ -552,9 +552,9 @@ A `++rule`.
552 [~~a "bcd"]
552 [~~a "bcd"]
553```
553```
554
554
555−
556---
555---
557−### `++mask`
556+
557+## `++mask`
558
558
559Match char
559Match char
560
560
@@ -603,7 +603,8 @@ A `++rule`.
603```
603```
604
604
605---
605---
606−### `++more`
606+
607+## `++more`
607
608
608Parse list with delimiter
609Parse list with delimiter
609
610
@@ -641,9 +642,9 @@ A `++rule`.
641 [q=40 ~[q=20 q=60 q=1 q=5]]
642 [q=40 ~[q=20 q=60 q=1 q=5]]
642```
643```
643
644
644−
645---
645---
646−### `++most`
646+
647+## `++most`
647
648
648Parse list of at least one match
649Parse list of at least one match
649
650
@@ -682,9 +683,9 @@ A `++rule`.
682 ! exit
683 ! exit
683```
684```
684
685
685−
686---
686---
687−### `++next`
687+
688+## `++next`
688
689
689Consume char
690Consume char
690
691
@@ -721,10 +722,9 @@ An `++edge`.
721 [p=[p=1 q=2] q=[~ [p=~~j q=[p=[p=1 q=2] q="ohn jumps jones"]]]]
722 [p=[p=1 q=2] q=[~ [p=~~j q=[p=[p=1 q=2] q="ohn jumps jones"]]]]
722```
723```
723
724
724−
725---
725---
726
726
727−### `++plus`
727+## `++plus`
728
728
729List of at least one match.
729List of at least one match.
730
730
@@ -760,9 +760,9 @@ A `++rule`.
760 ['-' [' ' [' ' ['-' [' ' ~]]]]]
760 ['-' [' ' [' ' ['-' [' ' ~]]]]]
761```
761```
762
762
763−
764---
763---
765−### `++sear`
764+
765+## `++sear`
766
766
767Conditional `++cook`
767Conditional `++cook`
768
768
@@ -803,9 +803,9 @@ A `++rule`.
803 [p=[p=1 q=2] q=~]
803 [p=[p=1 q=2] q=~]
804```
804```
805
805
806−
807---
806---
808−### `++shim`
807+
808+## `++shim`
809
809
810Char in range
810Char in range
811
811
@@ -851,9 +851,9 @@ A `++rule`.
851 [p=[p=1 q=2] q=[~ [p=~~~41. q=[p=[p=1 q=2] q="bc"]]]]
851 [p=[p=1 q=2] q=[~ [p=~~~41. q=[p=[p=1 q=2] q="bc"]]]]
852```
852```
853
853
854−
855---
854---
856−### `++slug` {#slug}
855+
856+## `++slug` {#slug}
857
857
858Use gate to parse delimited list
858Use gate to parse delimited list
859
859
@@ -890,9 +890,9 @@ A `++rule`.
890 'abc'
890 'abc'
891```
891```
892
892
893−
894---
893---
895−### `++stag`
894+
895+## `++stag`
896
896
897Add label
897Add label
898
898
@@ -936,9 +936,9 @@ A `++rule`.
936 [p=[p=1 q=2] q=[~ u=[p=[10.000 ~~a] q=[p=[p=1 q=2] q="bc"]]]]
936 [p=[p=1 q=2] q=[~ u=[p=[10.000 ~~a] q=[p=[p=1 q=2] q="bc"]]]]
937```
937```
938
938
939−
940---
939---
941−### `++star`
940+
941+## `++star`
942
942
943List of matches
943List of matches
944
944
@@ -979,9 +979,9 @@ Parser modifier: parse `++list` of matches.
979 "john smith"
979 "john smith"
980```
980```
981
981
982−
983---
982---
984−### `++stet`
983+
984+## `++stet`
985
985
986Add faces
986Add faces
987
987
@@ -993,8 +993,6 @@ Add faces `[p q]` to range-parser pairs in a list.
993
993
994#### Produces
994#### Produces
995
995
996−
997−
998#### Source
996#### Source
999
997
1000```hoon
998```hoon
@@ -1030,9 +1028,9 @@ Add faces `[p q]` to range-parser pairs in a list.
1030 ]
1028 ]
1031```
1029```
1032
1030
1033−
1034---
1031---
1035−### `++stew`
1032+
1033+## `++stew`
1036
1034
1037Switch by first
1035Switch by first
1038
1036
@@ -1083,15 +1081,13 @@ Switch by first
1083 ::
1081 ::
1084```
1082```
1085
1083
1086−
1087Parser generator. From an associative `++list` of characters or character
1084Parser generator. From an associative `++list` of characters or character
1088ranges to `++rule`s, construct a `++map`, and parse `++tape`s only
1085ranges to `++rule`s, construct a `++map`, and parse `++tape`s only
1089with `++rules` associated with a range that the `++tape`'s first character falls in.
1086with `++rules` associated with a range that the `++tape`'s first character falls in.
1090
1087
1091−
1092−
1093---
1088---
1094−### `++stir`
1089+
1090+## `++stir`
1095
1091
1096Parse repeatedly
1092Parse repeatedly
1097
1093
@@ -1137,9 +1133,9 @@ A rule.
1137 b=294
1133 b=294
1138```
1134```
1139
1135
1140−
1141---
1136---
1142−### `++stun`
1137+
1138+## `++stun`
1143
1139
1144Parse several times
1140Parse several times
1145
1141
content/docs/hoon/reference/stdlib/4g.md+8−8
@@ -4,7 +4,7 @@ weight = 34
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++rash`
7+## `++rash`
8
8
9Parse or crash
9Parse or crash
10
10
@@ -47,9 +47,9 @@ The value of the parse result, or crash.
47 ! exit
47 ! exit
48```
48```
49
49
50−
51---
50---
52−### `++rush`
51+
52+## `++rush`
53
53
54Parse or null
54Parse or null
55
55
@@ -91,9 +91,9 @@ The value of the parse result, or null.
91 ~
91 ~
92```
92```
93
93
94−
95---
94---
96−### `++rust`
95+
96+## `++rust`
97
97
98Parse tape or null
98Parse tape or null
99
99
@@ -131,9 +131,9 @@ A `(unit ,@t)`
131 ~
131 ~
132```
132```
133
133
134−
135---
134---
136−### `++scan`
135+
136+## `++scan`
137
137
138Parse tape or crash
138Parse tape or crash
139
139
@@ -176,4 +176,4 @@ Either a `++tape` or a crash.
176 ! exit
176 ! exit
177```
177```
178
178
179−---
179+---
content/docs/hoon/reference/stdlib/4h.md+66−64
@@ -4,7 +4,7 @@ weight = 35
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++ace`
7+## `++ace`
8
8
9Parse space
9Parse space
10
10
@@ -33,9 +33,9 @@ Parses ASCII character 32, space.
33 [p=[p=1 q=2] q=[~ [p=~~. q=[p=[p=1 q=2] q="abc "]]]]
33 [p=[p=1 q=2] q=[~ [p=~~. q=[p=[p=1 q=2] q="abc "]]]]
34```
34```
35
35
36−
37---
36---
38−### `++bar`
37+
38+## `++bar`
39
39
40Parse vertical bar
40Parse vertical bar
41
41
@@ -63,9 +63,9 @@ Parses ASCII character 124, the vertical bar.
63 [p=[p=1 q=2] q=[~ [p=~~~7c. q=[p=[p=1 q=2] q="="]]]]
63 [p=[p=1 q=2] q=[~ [p=~~~7c. q=[p=[p=1 q=2] q="="]]]]
64```
64```
65
65
66−
67---
66---
68−### `++bas`
67+
68+## `++bas`
69
69
70Parse backslash
70Parse backslash
71
71
@@ -98,9 +98,9 @@ character, `\`.
98 [p=[p=1 q=1] q=~]
98 [p=[p=1 q=1] q=~]
99```
99```
100
100
101−
102---
101---
103−### `++buc`
102+
103+## `++buc`
104
104
105Parse dollar sign
105Parse dollar sign
106
106
@@ -128,9 +128,9 @@ Parses ASCII character 36, the dollar sign.
128 [p=[p=1 q=2] q=[~ [p=~~~24. q=[p=[p=1 q=2] q="%"]]]]
128 [p=[p=1 q=2] q=[~ [p=~~~24. q=[p=[p=1 q=2] q="%"]]]]
129```
129```
130
130
131−
132---
131---
133−### `++cab`
132+
133+## `++cab`
134
134
135Parse underscore
135Parse underscore
136
136
@@ -158,9 +158,9 @@ Parses ASCII character 95, the underscore.
158 [p=[p=1 q=1] q=~]
158 [p=[p=1 q=1] q=~]
159```
159```
160
160
161−
162---
161---
163−### `++cen`
162+
163+## `++cen`
164
164
165Parses percent sign
165Parses percent sign
166
166
@@ -188,9 +188,9 @@ Parses ASCII character 37, the percent sign.
188 [p=[p=1 q=2] q=[~ [p=~~~25. q=[p=[p=1 q=2] q="^"]]]]
188 [p=[p=1 q=2] q=[~ [p=~~~25. q=[p=[p=1 q=2] q="^"]]]]
189```
189```
190
190
191−
192---
191---
193−### `++col`
192+
193+## `++col`
194
194
195Parse colon
195Parse colon
196
196
@@ -219,7 +219,8 @@ Parses ASCII character 58, the colon
219```
219```
220
220
221---
221---
222−### `++com`
222+
223+## `++com`
223
224
224Parse comma
225Parse comma
225
226
@@ -247,9 +248,9 @@ Parses ASCII character 44, the comma.
247 [p=[p=1 q=1] q=~]
248 [p=[p=1 q=1] q=~]
248```
249```
249
250
250−
251---
251---
252−### `++doq`
252+
253+## `++doq`
253
254
254Parse double quote
255Parse double quote
255
256
@@ -282,9 +283,9 @@ Parses ASCII character 34, the double quote.
282 ! exit
283 ! exit
283```
284```
284
285
285−
286---
286---
287−### `++dot`
287+
288+## `++dot`
288
289
289Parse period
290Parse period
290
291
@@ -312,9 +313,9 @@ Parses ASCII character 46, the period.
312 [p=[p=1 q=2] q=[~ [p=~~~. q=[p=[p=1 q=2] q="^"]]]]
313 [p=[p=1 q=2] q=[~ [p=~~~. q=[p=[p=1 q=2] q="^"]]]]
313```
314```
314
315
315−
316---
316---
317−### `++fas`
317+
318+## `++fas`
318
319
319Parse forward slash
320Parse forward slash
320
321
@@ -339,9 +340,9 @@ Parses ASCII character 47, the forward slash.
339 [p=[p=1 q=1] q=~]
340 [p=[p=1 q=1] q=~]
340```
341```
341
342
342−
343---
343---
344−### `++gal`
344+
345+## `++gal`
345
346
346Parse less-than sign
347Parse less-than sign
347
348
@@ -369,9 +370,9 @@ Parses ASCII character 60, the less-than sign.
369 [p=[p=1 q=1] q=~]
370 [p=[p=1 q=1] q=~]
370```
371```
371
372
372−
373---
373---
374−### `++gar`
374+
375+## `++gar`
375
376
376Parse greater-than sign
377Parse greater-than sign
377
378
@@ -399,9 +400,9 @@ Parses ASCII character 62, the greater-than sign.
399 [p=[p=1 q=1] q=~]
400 [p=[p=1 q=1] q=~]
400```
401```
401
402
402−
403---
403---
404−### `++hax`
404+
405+## `++hax`
405
406
406Parse number sign
407Parse number sign
407
408
@@ -426,9 +427,9 @@ Parses ASCII character 35, the number sign.
426 [p=[p=1 q=2] q=[~ [p=~~~23. q=[p=[p=1 q=2] q="!"]]]]
427 [p=[p=1 q=2] q=[~ [p=~~~23. q=[p=[p=1 q=2] q="!"]]]]
427```
428```
428
429
429−
430---
430---
431−### `++hep`
431+
432+## `++hep`
432
433
433Parse hyphen
434Parse hyphen
434
435
@@ -453,9 +454,9 @@ Parses ASCII character 45, the hyphen.
453 [p=[p=1 q=1] q=~]
454 [p=[p=1 q=1] q=~]
454```
455```
455
456
456−
457---
457---
458−### `++kel`
458+
459+## `++kel`
459
460
460Parse left curley bracket
461Parse left curley bracket
461
462
@@ -482,9 +483,9 @@ interpolation. To parse either of them, they must be escaped.
482 [p=[p=1 q=1] q=~]
483 [p=[p=1 q=1] q=~]
483```
484```
484
485
485−
486---
486---
487−### `++ker`
487+
488+## `++ker`
488
489
489Parse right curley bracket
490Parse right curley bracket
490
491
@@ -511,9 +512,9 @@ interpolation. To parse either of them, they must be escaped.
511 [p=[p=1 q=1] q=~]
512 [p=[p=1 q=1] q=~]
512```
513```
513
514
514−
515---
515---
516−### `++ket`
516+
517+## `++ket`
517
518
518Parse caret
519Parse caret
519
520
@@ -539,7 +540,8 @@ Parses ASCII character 94, the caret.
539```
540```
540
541
541---
542---
542−### `++lus`
543+
544+## `++lus`
543
545
544Parse plus sign
546Parse plus sign
545
547
@@ -567,9 +569,9 @@ Parses ASCII character 43, the plus sign.
567 [p=[p=1 q=1] q=~]
569 [p=[p=1 q=1] q=~]
568```
570```
569
571
570−
571---
572---
572−### `++pam`
573+
574+## `++pam`
573
575
574Parse ampersand
576Parse ampersand
575
577
@@ -597,9 +599,9 @@ Parses ASCII character 38, the ampersand.
597 [p=[p=1 q=1] q=~]
599 [p=[p=1 q=1] q=~]
598```
600```
599
601
600−
601---
602---
602−### `++pat`
603+
604+## `++pat`
603
605
604Parse "at" sign
606Parse "at" sign
605
607
@@ -627,9 +629,9 @@ Parses ASCII character 64, the "at" sign.
627 [p=[p=1 q=1] q=~]
629 [p=[p=1 q=1] q=~]
628```
630```
629
631
630−
631---
632---
632−### `++pel`
633+
634+## `++pel`
633
635
634Parse left parenthesis
636Parse left parenthesis
635
637
@@ -654,9 +656,9 @@ Parses ASCII character 40, the left parenthesis.
654 [p=[p=1 q=1] q=~]
656 [p=[p=1 q=1] q=~]
655```
657```
656
658
657−
658---
659---
659−### `++per`
660+
661+## `++per`
660
662
661Parse right parenthesis
663Parse right parenthesis
662
664
@@ -681,9 +683,9 @@ Parses ASCII character 41, the right parenthesis.
681 [p=[p=1 q=1] q=~]
683 [p=[p=1 q=1] q=~]
682```
684```
683
685
684−
685---
686---
686−### `++sel`
687+
688+## `++sel`
687
689
688Parse left square bracket
690Parse left square bracket
689
691
@@ -708,9 +710,9 @@ Parses ASCII character 91, the left square bracket.
708 [p=[p=1 q=1] q=~]
710 [p=[p=1 q=1] q=~]
709```
711```
710
712
711−
712---
713---
713−### `++sem`
714+
715+## `++sem`
714
716
715Parse semicolon
717Parse semicolon
716
718
@@ -735,9 +737,9 @@ Parses ASCII character 59, the semicolon.
735 [p=[p=1 q=1] q=~]
737 [p=[p=1 q=1] q=~]
736```
738```
737
739
738−
739---
740---
740−### `++ser`
741+
742+## `++ser`
741
743
742Parse right square bracket
744Parse right square bracket
743
745
@@ -762,9 +764,9 @@ Parses ASCII character 93, the right square bracket.
762 [p=[p=1 q=1] q=~]
764 [p=[p=1 q=1] q=~]
763```
765```
764
766
765−
766---
767---
767−### `++sig`
768+
769+## `++sig`
768
770
769Parse tilde
771Parse tilde
770
772
@@ -789,9 +791,9 @@ Parses ASCII character 126, the tilde.
789 [p=[p=1 q=1] q=~]
791 [p=[p=1 q=1] q=~]
790```
792```
791
793
792−
793---
794---
794−### `++soq`
795+
796+## `++soq`
795
797
796Parse single quote
798Parse single quote
797
799
@@ -817,9 +819,9 @@ Parses ASCII character 39, soq. Note the extra '' is to escape the first
817 [p=[p=1 q=1] q=~]
819 [p=[p=1 q=1] q=~]
818```
820```
819
821
820−
821---
822---
822−### `++tar`
823+
824+## `++tar`
823
825
824Parse asterisk
826Parse asterisk
825
827
@@ -847,9 +849,9 @@ Parses ASCII character 42, the asterisk.
847 [p=[p=1 q=1] q=~]
849 [p=[p=1 q=1] q=~]
848```
850```
849
851
850−
851---
852---
852−### `++tec`
853+
854+## `++tec`
853
855
854Parse backtick
856Parse backtick
855
857
@@ -878,9 +880,9 @@ accent").
878 [p=[p=1 q=1] q=~]
880 [p=[p=1 q=1] q=~]
879```
881```
880
882
881−
882---
883---
883−### `++tis`
884+
885+## `++tis`
884
886
885Parse equals sign
887Parse equals sign
886
888
@@ -906,7 +908,8 @@ Parses ASCII character 61, the equals sign.
906```
908```
907
909
908---
910---
909−### `++wut`
911+
912+## `++wut`
910
913
911Parses question mark
914Parses question mark
912
915
@@ -931,9 +934,9 @@ Parses ASCII character 63, the question mark.
931 [p=[p=1 q=1] q=~]
934 [p=[p=1 q=1] q=~]
932```
935```
933
936
934−
935---
937---
936−### `++zap`
938+
939+## `++zap`
937
940
938Exclamation point
941Exclamation point
939
942
@@ -958,5 +961,4 @@ Parses ASCII character 33, the exclamation point zap.
958 [p=[p=1 q=1] q=~]
961 [p=[p=1 q=1] q=~]
959```
962```
960
963
961−
964+---
962−---
content/docs/hoon/reference/stdlib/4i.md+70−72
@@ -4,7 +4,7 @@ weight = 36
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++alf`
7+## `++alf`
8
8
9Alphabetic characters
9Alphabetic characters
10
10
@@ -29,9 +29,9 @@ Parse alphabetic characters, both upper and lowercase.
29 "AaBbCc"
29 "AaBbCc"
30```
30```
31
31
32−
33---
32---
34−### `++aln`
33+
34+## `++aln`
35
35
36Alphanumeric characters
36Alphanumeric characters
37
37
@@ -56,9 +56,9 @@ Parse alphanumeric characters - both alphabetic characters and numbers.
56 "0123456789abcdef"
56 "0123456789abcdef"
57```
57```
58
58
59−
60---
59---
61−### `++alp`
60+
61+## `++alp`
62
62
63Alphanumeric and `-`
63Alphanumeric and `-`
64
64
@@ -83,10 +83,9 @@ Parse alphanumeric strings and hep, "-".
83 "123abc-"
83 "123abc-"
84```
84```
85
85
86−
87---
86---
88
87
89−### `++bet`
88+## `++bet`
90
89
91Axis syntax `-`, `+`
90Axis syntax `-`, `+`
92
91
@@ -108,9 +107,9 @@ Parse the hep and lus axis syntax.
108 3
107 3
109```
108```
110
109
111−
112---
110---
113−### `++bin`
111+
112+## `++bin`
114
113
115Binary to atom
114Binary to atom
116
115
@@ -138,9 +137,9 @@ Parse a tape of binary (0s and 1s) and produce its atomic representation.
138 2.063
137 2.063
139```
138```
140
139
141−
142---
140---
143−### `++but`
141+
142+## `++but`
144
143
145Binary digit
144Binary digit
146
145
@@ -167,9 +166,9 @@ Parse a single binary digit.
167 ~[0 1]
166 ~[0 1]
168```
167```
169
168
170−
171---
169---
172−### `++cit`
170+
171+## `++cit`
173
172
174Octal digit
173Octal digit
175
174
@@ -196,9 +195,9 @@ Parse a single octal digit.
196 ~[6 0]
195 ~[6 0]
197```
196```
198
197
199−
200---
198---
201−### `++dem`
199+
200+## `++dem`
202
201
203Decimal to atom
202Decimal to atom
204
203
@@ -223,9 +222,9 @@ Parse a decimal number to an atom.
223 12.456
222 12.456
224```
223```
225
224
226−
227---
225---
228−### `++dit`
226+
227+## `++dit`
229
228
230Decimal digit
229Decimal digit
231
230
@@ -248,9 +247,9 @@ Parse a single decimal digit.
248 ~[2 6 0 0 0]
247 ~[2 6 0 0 0]
249```
248```
250
249
251−
252---
250---
253−### `++dog`
251+
252+## `++dog`
254
253
255`.` optional gap
254`.` optional gap
256
255
@@ -273,9 +272,9 @@ Dot followed by an optional gap, used with numbers.
273 [~~~. ~]
272 [~~~. ~]
274```
273```
275
274
276−
277---
275---
278−### `++doh`
276+
277+## `++doh`
279
278
280`@p` separator
279`@p` separator
281
280
@@ -301,9 +300,9 @@ Phonetic base phrase separator
301 [[~~- ~~-] ~]
300 [[~~- ~~-] ~]
302```
301```
303
302
304−
305---
303---
306−### `++dun`
304+
305+## `++dun`
307
306
308`--` to `~`
307`--` to `~`
309
308
@@ -324,10 +323,9 @@ Parse phep, `--`, to null, `~`.
324 [p=[p=1 q=3] q=[~ u=[p=~ q=[p=[p=1 q=3] q=""]]]]
323 [p=[p=1 q=3] q=[~ u=[p=~ q=[p=[p=1 q=3] q=""]]]]
325```
324```
326
325
327−
328---
326---
329
327
330−### `++duz`
328+## `++duz`
331
329
332`==` to `~`
330`==` to `~`
333
331
@@ -348,10 +346,9 @@ Parse stet, `==`, to null `~`.
348 [p=[p=1 q=3] q=[~ u=[p=~ q=[p=[p=1 q=3] q=" |=..."]]]]
346 [p=[p=1 q=3] q=[~ u=[p=~ q=[p=[p=1 q=3] q=" |=..."]]]]
349```
347```
350
348
351−
352---
349---
353
350
354−### `++gah`
351+## `++gah`
355
352
356Newline or ' '
353Newline or ' '
357
354
@@ -386,9 +383,9 @@ Whitespace component, either newline or space.
386 ~[32 32 32 10 32 10 32 32]
383 ~[32 32 32 10 32 10 32 32]
387```
384```
388
385
389−
390---
386---
391−### `++gap`
387+
388+## `++gap`
392
389
393Plural whitespace
390Plural whitespace
394
391
@@ -400,9 +397,9 @@ Separates tall runes
400 ++ gap (cold ~ ;~(plug gaq (star ;~(pose vul gah)))) :: plural whitespace
397 ++ gap (cold ~ ;~(plug gaq (star ;~(pose vul gah)))) :: plural whitespace
401```
398```
402
399
403−
404---
400---
405−### `++gaq`
401+
402+## `++gaq`
406
403
407End of line
404End of line
408
405
@@ -418,10 +415,9 @@ Two spaces, a newline, or comment.
418 ==
415 ==
419```
416```
420
417
421−
422−
423---
418---
424−### `++gaw`
419+
420+## `++gaw`
425
421
426Classic whitespace
422Classic whitespace
427
423
@@ -433,9 +429,9 @@ Terran whitespace.
433 ++ gaw (cold ~ (star ;~(pose vul gah))) :: classic white
429 ++ gaw (cold ~ (star ;~(pose vul gah))) :: classic white
434```
430```
435
431
436−
437---
432---
438−### `++gay`
433+
434+## `++gay`
439
435
440Optional gap
436Optional gap
441
437
@@ -448,7 +444,8 @@ Optional gap.
448```
444```
449
445
450---
446---
451−### `++gon`
447+
448+## `++gon`
452
449
453Long numbers
450Long numbers
454
451
@@ -470,9 +467,9 @@ Parse long numbers - Numbers which wrap around the shell with the line
470 [p=[p=1 q=3] q=[~ u=[p=[~~~5c. ~ ~~~2f.] q=[p=[p=1 q=3] q=""]]]]
467 [p=[p=1 q=3] q=[~ u=[p=[~~~5c. ~ ~~~2f.] q=[p=[p=1 q=3] q=""]]]]
471```
468```
472
469
473−
474---
470---
475−### `++gul`
471+
472+## `++gul`
476
473
477Axis syntax `<` or `>`
474Axis syntax `<` or `>`
478
475
@@ -494,9 +491,9 @@ Parse the axis gal and gar axis syntax.
494 3
491 3
495```
492```
496
493
497−
498---
494---
499−### `++hex`
495+
496+## `++hex`
500
497
501Hex to atom
498Hex to atom
502
499
@@ -528,7 +525,8 @@ Parse any hexadecimal number to an atom.
528```
525```
529
526
530---
527---
531−### `++hig`
528+
529+## `++hig`
532
530
533Uppercase
531Uppercase
534
532
@@ -556,9 +554,9 @@ Parse a single uppercase letter.
556 [p=[p=1 q=2] q=[~ [p=~~~47. q=[p=[p=1 q=2] q=""]]]]
554 [p=[p=1 q=2] q=[~ [p=~~~47. q=[p=[p=1 q=2] q=""]]]]
557```
555```
558
556
559−
560---
557---
561−### `++hit`
558+
559+## `++hit`
562
560
563Hex digits
561Hex digits
564
562
@@ -588,7 +586,8 @@ Parse a single hexadecimal digit.
588```
586```
589
587
590---
588---
591−### `++iny`
589+
590+## `++iny`
592
591
593Indentation block
592Indentation block
594
593
@@ -645,9 +644,9 @@ A `++rule`.
645 de"
644 de"
646```
645```
647
646
648−
649---
647---
650−### `++low`
648+
649+## `++low`
651
650
652Lowercase
651Lowercase
653
652
@@ -672,9 +671,9 @@ Parse a single lowercase letter.
672 [p=[p=1 q=2] q=[~ [p=~~g q=[p=[p=1 q=2] q=""]]]]
671 [p=[p=1 q=2] q=[~ [p=~~g q=[p=[p=1 q=2] q=""]]]]
673```
672```
674
673
675−
676---
674---
677−### `++mes`
675+
676+## `++mes`
678
677
679Hexbyte
678Hexbyte
680
679
@@ -699,9 +698,9 @@ Parse a hexbyte.
699 66
698 66
700```
699```
701
700
702−
703---
701---
704−### `++nix`
702+
703+## `++nix`
705
704
706Letters and `-`
705Letters and `-`
707
706
@@ -723,10 +722,9 @@ Parse Letters and `-`.
723 'as_me'
722 'as_me'
724```
723```
725
724
726−
727---
725---
728
726
729−### `++nud`
727+## `++nud`
730
728
731Numeric
729Numeric
732
730
@@ -752,7 +750,8 @@ Parse a numeric character - A number.
752```
750```
753
751
754---
752---
755−### `++prn`
753+
754+## `++prn`
756
755
757Printable character
756Printable character
758
757
@@ -776,9 +775,9 @@ Parse any printable character.
776 ! exit
775 ! exit
777```
776```
778
777
779−
780---
778---
781−### `++qit`
779+
780+## `++qit`
782
781
783Chars in cord
782Chars in cord
784
783
@@ -814,9 +813,9 @@ Parse an individual character to its cord atom representation.
814 ~[99 111 114 100]
813 ~[99 111 114 100]
815```
814```
816
815
817−
818---
816---
819−### `++qit`
817+
818+## `++qit`
820
819
821Chars in cord
820Chars in cord
822
821
@@ -852,10 +851,9 @@ Parse an individual character to its cord atom representation.
852 ~[99 111 114 100]
851 ~[99 111 114 100]
853```
852```
854
853
855−
856−
857---
854---
858−### `++qut`
855+
856+## `++qut`
859
857
860Cord
858Cord
861
859
@@ -894,9 +892,9 @@ quote (aka triple-soq) cord, between which must be in an indented block.
894 'Heredoc isn't prohibited from containing quotes'
892 'Heredoc isn't prohibited from containing quotes'
895```
893```
896
894
897−
898---
895---
899−### `++soz`
896+
897+## `++soz`
900
898
901Delimiting `'''`
899Delimiting `'''`
902
900
@@ -918,9 +916,9 @@ Parse a triple-single quote, used for multiline strings.
918 ! exit
916 ! exit
919```
917```
920
918
921−
922---
919---
923−### `++sym`
920+
921+## `++sym`
924
922
925Term
923Term
926
924
@@ -947,9 +945,9 @@ A term: a letter(lowercase), followed by letters, numbers, or `-`.
947 7.174.515
945 7.174.515
948```
946```
949
947
950−
951---
948---
952−### `++ven`
949+
950+## `++ven`
953
951
954`+>-` axis syntax
952`+>-` axis syntax
955
953
@@ -988,9 +986,9 @@ Axis syntax parser
988 [3 4]
986 [3 4]
989```
987```
990
988
991−
992---
989---
993−### `++vit`
990+
991+## `++vit`
994
992
995Base64 digit
993Base64 digit
996
994
@@ -1023,7 +1021,8 @@ Parse a standard base64 digit.
1023```
1021```
1024
1022
1025---
1023---
1026−### `++vul`
1024+
1025+## `++vul`
1027
1026
1028Comments to null
1027Comments to null
1029
1028
@@ -1050,5 +1049,4 @@ with a newline character.
1050 ! exit
1049 ! exit
1051```
1050```
1052
1051
1053−
1052+---
1054−---
content/docs/hoon/reference/stdlib/4j.md+62−64
@@ -4,7 +4,7 @@ weight = 37
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++ab`
7+## `++ab`
8
8
9Primitive parser engine
9Primitive parser engine
10
10
@@ -24,7 +24,7 @@ A core containing numeric parser primitives.
24 <36.ecc 414.gly 100.xkc 1.ypj %164>
24 <36.ecc 414.gly 100.xkc 1.ypj %164>
25```
25```
26
26
27−------------------------------------------------------------------------
27+---
28
28
29### `++bix:ab`
29### `++bix:ab`
30
30
@@ -57,7 +57,7 @@ A an atom. XX
57 q=163
57 q=163
58```
58```
59
59
60−------------------------------------------------------------------------
60+---
61
61
62### `++hif:ab`
62### `++hif:ab`
63
63
@@ -89,7 +89,7 @@ An atom.
89 q=48.626
89 q=48.626
90```
90```
91
91
92−------------------------------------------------------------------------
92+---
93
93
94### `++huf:ab`
94### `++huf:ab`
95
95
@@ -125,7 +125,7 @@ An atom. XX
125 0x1.0100
125 0x1.0100
126```
126```
127
127
128−------------------------------------------------------------------------
128+---
129
129
130### `++hyf:ab`
130### `++hyf:ab`
131
131
@@ -157,7 +157,7 @@ An atom. XX
157 365.637.097.828.335.095
157 365.637.097.828.335.095
158```
158```
159
159
160−------------------------------------------------------------------------
160+---
161
161
162### `++pev:ab`
162### `++pev:ab`
163
163
@@ -193,7 +193,7 @@ An atom.
193 ~ <syntax error at [1 11]>
193 ~ <syntax error at [1 11]>
194```
194```
195
195
196−------------------------------------------------------------------------
196+---
197
197
198### `++pew:ab`
198### `++pew:ab`
199
199
@@ -207,8 +207,6 @@ Up to five @uw (base 64) digits.
207
207
208#### Produces
208#### Produces
209
209
210−
211−
212#### Source
210#### Source
213
211
214```hoon
212```hoon
@@ -232,7 +230,7 @@ Up to five @uw (base 64) digits.
232 ! exit
230 ! exit
233```
231```
234
232
235−------------------------------------------------------------------------
233+---
236
234
237### `++piv:ab`
235### `++piv:ab`
238
236
@@ -260,7 +258,7 @@ Parsing `++rule`. Parses exactly five base-32 digits.
260 ! exit
258 ! exit
261```
259```
262
260
263−------------------------------------------------------------------------
261+---
264
262
265### `++piw:ab`
263### `++piw:ab`
266
264
@@ -288,8 +286,7 @@ Parsing `++rule`. Parses exactly five base-64 digits.
288 ! exit
286 ! exit
289```
287```
290
288
291−
289+---
292−------------------------------------------------------------------------
293
290
294### `++qeb:ab`
291### `++qeb:ab`
295
292
@@ -325,7 +322,7 @@ a leading zero.
325 ! exit
322 ! exit
326```
323```
327
324
328−------------------------------------------------------------------------
325+---
329
326
330### `++qex:ab`
327### `++qex:ab`
331
328
@@ -359,7 +356,7 @@ without a leading zero.
359 ! exit
356 ! exit
360```
357```
361
358
362−------------------------------------------------------------------------
359+---
363
360
364### `++qib:ab`
361### `++qib:ab`
365
362
@@ -389,7 +386,7 @@ Parsing `++rule`. Parses exactly four binary digits.
389 ! exit
386 ! exit
390```
387```
391
388
392−------------------------------------------------------------------------
389+---
393
390
394### `++qix:ab`
391### `++qix:ab`
395
392
@@ -419,7 +416,7 @@ Parsing `++rule`. Parses exactly four hexadecimal digits.
419 ! exit
416 ! exit
420```
417```
421
418
422−------------------------------------------------------------------------
419+---
423
420
424### `++seb:ab`
421### `++seb:ab`
425
422
@@ -450,7 +447,7 @@ Parsing `++rule`. Parses the number 1.
450 ! {1 1}
447 ! {1 1}
451```
448```
452
449
453−------------------------------------------------------------------------
450+---
454
451
455### `++sed:ab`
452### `++sed:ab`
456
453
@@ -478,7 +475,7 @@ Parsing `++rule`. Parses a nonzero decimal digit.
478 ! exit
475 ! exit
479```
476```
480
477
481−------------------------------------------------------------------------
478+---
482
479
483### `++sev:ab`
480### `++sev:ab`
484
481
@@ -506,7 +503,7 @@ Parsing `++rule`. Parses a nonzero base-32 digit
506 ! exit
503 ! exit
507```
504```
508
505
509−------------------------------------------------------------------------
506+---
510
507
511### `++sew:ab`
508### `++sew:ab`
512
509
@@ -534,7 +531,7 @@ Parsing `++rule`. Parses a nonzero base-64 digit
534 ! exit
531 ! exit
535```
532```
536
533
537−------------------------------------------------------------------------
534+---
538
535
539### `++sex:ab`
536### `++sex:ab`
540
537
@@ -562,7 +559,7 @@ Parsing `++rule`. Parses a nonzero hexadecimal digit.
562 ! exit
559 ! exit
563```
560```
564
561
565−------------------------------------------------------------------------
562+---
566
563
567### `++sib:ab`
564### `++sib:ab`
568
565
@@ -589,7 +586,7 @@ Parsing `++rule`. Parses a binary digit.
589 0
586 0
590```
587```
591
588
592−------------------------------------------------------------------------
589+---
593
590
594### `++sid:ab`
591### `++sid:ab`
595
592
@@ -614,7 +611,7 @@ Parsing `++rule`. Parses a decimal digit.
614 5
611 5
615```
612```
616
613
617−------------------------------------------------------------------------
614+---
618
615
619### `++siv:ab`
616### `++siv:ab`
620
617
@@ -639,7 +636,7 @@ Parsing `++rule`. Parses a base-32 digit.
639 12
636 12
640```
637```
641
638
642−------------------------------------------------------------------------
639+---
643
640
644### `++siw:ab`
641### `++siw:ab`
645
642
@@ -664,7 +661,7 @@ Parsing `++rule`. Parses a base-64 digit.
664 48
661 48
665```
662```
666
663
667−------------------------------------------------------------------------
664+---
668
665
669### `++six:ab`
666### `++six:ab`
670
667
@@ -689,7 +686,7 @@ Parsing `++rule`. Parses a hexadecimal digit.
689 14
686 14
690```
687```
691
688
692−------------------------------------------------------------------------
689+---
693
690
694### `++sov:ab`
691### `++sov:ab`
695
692
@@ -713,7 +710,8 @@ Parsing `++rule`. Parses a base-32 letter.
713 > (scan "c" sov:ab)
710 > (scan "c" sov:ab)
714 12
711 12
715```
712```
716−------------------------------------------------------------------------
713+
714+---
717
715
718### `++sow:ab`
716### `++sow:ab`
719
717
@@ -743,7 +741,7 @@ Parsing `++rule`. Parses a base-64 letter/symbol.
743 48
741 48
744```
742```
745
743
746−------------------------------------------------------------------------
744+---
747
745
748### `++sox:ab`
746### `++sox:ab`
749
747
@@ -768,7 +766,7 @@ Parsing `++rule`. Parses a hexadecimal letter.
768 14
766 14
769```
767```
770
768
771−------------------------------------------------------------------------
769+---
772
770
773### `++ted:ab`
771### `++ted:ab`
774
772
@@ -801,7 +799,7 @@ leading zero.
801 ! exit
799 ! exit
802```
800```
803
801
804−------------------------------------------------------------------------
802+---
805
803
806### `++tip:ab`
804### `++tip:ab`
807
805
@@ -830,7 +828,7 @@ syllable.
830 242
828 242
831```
829```
832
830
833−------------------------------------------------------------------------
831+---
834
832
835### `++tiq:ab`
833### `++tiq:ab`
836
834
@@ -849,6 +847,7 @@ syllable.
849 ++ tiq (sear |=(a/@ (ind:po a)) til)
847 ++ tiq (sear |=(a/@ (ind:po a)) til)
850
848
851```
849```
850+
852#### Examples
851#### Examples
853
852
854```
853```
@@ -858,7 +857,7 @@ syllable.
858 1
857 1
859```
858```
860
859
861−------------------------------------------------------------------------
860+---
862
861
863### `++tid:ab`
862### `++tid:ab`
864
863
@@ -886,7 +885,7 @@ Parsing `++rule`. Parses exactly three decimal digits.
886 ! exit
885 ! exit
887```
886```
888
887
889−------------------------------------------------------------------------
888+---
890
889
891### `++til:ab`
890### `++til:ab`
892
891
@@ -916,7 +915,7 @@ Parsing `++rule`. Parses exactly three lowercase letters.
916 ! exit
915 ! exit
917```
916```
918
917
919−------------------------------------------------------------------------
918+---
920
919
921### `++urs:ab`
920### `++urs:ab`
922
921
@@ -945,7 +944,7 @@ Parsing rule. Parses characters from an atom of the span aura `@ta`.
945 'asa-lom_tak'
944 'asa-lom_tak'
946```
945```
947
946
948−------------------------------------------------------------------------
947+---
949
948
950### `++urt:ab`
949### `++urt:ab`
951
950
@@ -973,7 +972,7 @@ for cab, `_`.
973 'asa-lom.t0k'
972 'asa-lom.t0k'
974```
973```
975
974
976−------------------------------------------------------------------------
975+---
977
976
978### `++voy:ab`
977### `++voy:ab`
979
978
@@ -1001,9 +1000,9 @@ byte.
1001 q=39
1000 q=39
1002```
1001```
1003
1002
1004−------------------------------------------------------------------------
1003+---
1005
1004
1006−### `++ag`
1005+## `++ag`
1007
1006
1008Top-level atom parser engine
1007Top-level atom parser engine
1009
1008
@@ -1027,7 +1026,7 @@ A core containing top-level atom parsers.
1027 <14.vpu 414.mof 100.xkc 1.ypj %164>
1026 <14.vpu 414.mof 100.xkc 1.ypj %164>
1028```
1027```
1029
1028
1030−------------------------------------------------------------------------
1029+---
1031
1030
1032### `++ape:ag`
1031### `++ape:ag`
1033
1032
@@ -1054,7 +1053,7 @@ Parser modifier. Parses 0 or the sample rule `fel`.
1054 ~[2 0 2]
1053 ~[2 0 2]
1055```
1054```
1056
1055
1057−------------------------------------------------------------------------
1056+---
1058
1057
1059### `++bay:ag`
1058### `++bay:ag`
1060
1059
@@ -1079,7 +1078,7 @@ Parsing rule. Parses a binary number without a leading zero.
1079 q=38
1078 q=38
1080```
1079```
1081
1080
1082−------------------------------------------------------------------------
1081+---
1083
1082
1084### `++bip:ag`
1083### `++bip:ag`
1085
1084
@@ -1107,7 +1106,7 @@ Parsing rule. Parses a `@is`, an IPv6 address.
1107 .0.0.ea.3e6c.0.0.0.0
1106 .0.0.ea.3e6c.0.0.0.0
1108```
1107```
1109
1108
1110−------------------------------------------------------------------------
1109+---
1111
1110
1112### `++dem:ag`
1111### `++dem:ag`
1113
1112
@@ -1134,7 +1133,7 @@ Parsing rule. Parses a decimal number that includes dot separators.
1134 q=13.507
1133 q=13.507
1135```
1134```
1136
1135
1137−------------------------------------------------------------------------
1136+---
1138
1137
1139### `++dim:ag`
1138### `++dim:ag`
1140
1139
@@ -1162,7 +1161,7 @@ Parsing rule. Parses a decimal number without a leading zero.
1162 ! exit
1161 ! exit
1163```
1162```
1164
1163
1165−------------------------------------------------------------------------
1164+---
1166
1165
1167### `++dum:ag`
1166### `++dum:ag`
1168
1167
@@ -1191,7 +1190,7 @@ Parsing rule. Parses a decmial number with leading zeroes.
1191 q=13.507
1190 q=13.507
1192```
1191```
1193
1192
1194−------------------------------------------------------------------------
1193+---
1195
1194
1196### `++fed:ag`
1195### `++fed:ag`
1197
1196
@@ -1233,7 +1232,7 @@ Parsing rule. Parses an atom of aura `@p`, the phonetic base.
1233 282.810.089.790.159.633.869.501.053.313.363.681.181
1232 282.810.089.790.159.633.869.501.053.313.363.681.181
1234```
1233```
1235
1234
1236−------------------------------------------------------------------------
1235+---
1237
1236
1238### `++hex:ag`
1237### `++hex:ag`
1239
1238
@@ -1264,7 +1263,7 @@ Parsing rule. Parses a hexadecimal number
1264 0x3.ac8d
1263 0x3.ac8d
1265```
1264```
1266
1265
1267−------------------------------------------------------------------------
1266+---
1268
1267
1269### `++lip:ag`
1268### `++lip:ag`
1270
1269
@@ -1294,7 +1293,7 @@ Parsing rule. Parses an IPv4 address.
1294 .8.8.8.8
1293 .8.8.8.8
1295```
1294```
1296
1295
1297−------------------------------------------------------------------------
1296+---
1298
1297
1299### `++viz:ag`
1298### `++viz:ag`
1300
1299
@@ -1319,7 +1318,7 @@ Parsing rule. Parses a Base-32 number with dot separators.
1319 q=15.125.353.270
1318 q=15.125.353.270
1320```
1319```
1321
1320
1322−------------------------------------------------------------------------
1321+---
1323
1322
1324### `++vum:ag`
1323### `++vum:ag`
1325
1324
@@ -1344,7 +1343,7 @@ Parsing rule. Parses a raw base-32 string.
1344 q=15.125.353.270
1343 q=15.125.353.270
1345```
1344```
1346
1345
1347−------------------------------------------------------------------------
1346+---
1348
1347
1349### `++wiz:ag`
1348### `++wiz:ag`
1350
1349
@@ -1372,7 +1371,8 @@ Parsing rule. Parses a base-64 number.
1372```
1371```
1373
1372
1374---
1373---
1375−### `++mu`
1374+
1375+## `++mu`
1376
1376
1377Core used to scramble 16-bit atoms
1377Core used to scramble 16-bit atoms
1378
1378
@@ -1402,7 +1402,7 @@ relationship between a planet and its star.
1402 <3.sjm [[@ux @ux] <414.hhh 100.xkc 1.ypj %164>]>
1402 <3.sjm [[@ux @ux] <414.hhh 100.xkc 1.ypj %164>]>
1403```
1403```
1404
1404
1405−------------------------------------------------------------------------
1405+---
1406
1406
1407### `++zag:mu`
1407### `++zag:mu`
1408
1408
@@ -1433,7 +1433,7 @@ planet.
1433 [0x22e1 0x201]
1433 [0x22e1 0x201]
1434```
1434```
1435
1435
1436−------------------------------------------------------------------------
1436+---
1437
1437
1438### `++zig:mu`
1438### `++zig:mu`
1439
1439
@@ -1465,7 +1465,7 @@ planet.
1465 [0x1f04 0x1042]
1465 [0x1f04 0x1042]
1466```
1466```
1467
1467
1468−------------------------------------------------------------------------
1468+---
1469
1469
1470### `++zug:mu`
1470### `++zug:mu`
1471
1471
@@ -1495,14 +1495,13 @@ planet name.
1495 0x10e1.00fa
1495 0x10e1.00fa
1496```
1496```
1497
1497
1498−
1499---
1498---
1500−### `++ne`
1499+
1500+## `++ne`
1501
1501
1502Digit rendering engine
1502Digit rendering engine
1503
1503
1504−A door containing arms that render digits at bases 10, 16, 32, and
1504+A door containing arms that render digits at bases 10, 16, 32, and 64.
1505−64.
1506
1505
1507#### Accepts
1506#### Accepts
1508
1507
@@ -1524,7 +1523,7 @@ A door containing arms that render digits at bases 10, 16, 32, and
1524 <4.gut [@ud <414.hhh 100.xkc 1.ypj %164>]>
1523 <4.gut [@ud <414.hhh 100.xkc 1.ypj %164>]>
1525```
1524```
1526
1525
1527−------------------------------------------------------------------------
1526+---
1528
1527
1529### `++d:ne`
1528### `++d:ne`
1530
1529
@@ -1552,7 +1551,7 @@ Renders a decimal digit as an atom of an ACII byte value.
1552
1551
1553```
1552```
1554
1553
1555−------------------------------------------------------------------------
1554+---
1556
1555
1557### `++x:ne`
1556### `++x:ne`
1558
1557
@@ -1582,7 +1581,7 @@ Renders a hexadecimal digit as an atom of an ASCII byte value.
1582 'e'
1581 'e'
1583```
1582```
1584
1583
1585−------------------------------------------------------------------------
1584+---
1586
1585
1587### `++v:ne`
1586### `++v:ne`
1588
1587
@@ -1611,7 +1610,7 @@ Renders a base-32 digit as an atom of an ASCII byte value.
1611 'p'
1610 'p'
1612```
1611```
1613
1612
1614−------------------------------------------------------------------------
1613+---
1615
1614
1616### `++w:ne`
1615### `++w:ne`
1617
1616
@@ -1652,5 +1651,4 @@ Renders a base-64 digit as an atom of an ASCII byte value.
1652 '-'
1651 '-'
1653```
1652```
1654
1653
1655−
1656---
1654---
content/docs/hoon/reference/stdlib/4k.md+5−5
@@ -4,7 +4,7 @@ weight = 38
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++co`
7+## `++co`
8
8
9Literal rendering engine
9Literal rendering engine
10
10
@@ -34,7 +34,7 @@ A door that contains arms that operate on the sample coin `lot`.
34 >
34 >
35```
35```
36
36
37−------------------------------------------------------------------------
37+---
38
38
39### `++rear:co`
39### `++rear:co`
40
40
@@ -63,7 +63,7 @@ Renders a coin `lot` as a tape prepended to the sample tape `rom`.
63 "0xc8--ha"
63 "0xc8--ha"
64```
64```
65
65
66−------------------------------------------------------------------------
66+---
67
67
68### `++rent:co`
68### `++rent:co`
69
69
@@ -92,7 +92,8 @@ Renders a coin `lot` as a span.
92 > `@t`~(rent co %$ %ux 200)
92 > `@t`~(rent co %$ %ux 200)
93 '0xc8'
93 '0xc8'
94```
94```
95−------------------------------------------------------------------------
95+
96+---
96
97
97### `++rend:co`
98### `++rend:co`
98
99
@@ -272,5 +273,4 @@ Renders a coin `lot` as a tape.
272 0vph
273 0vph
273```
274```
274
275
275−
276---
276---
content/docs/hoon/reference/stdlib/4l.md+11−13
@@ -4,7 +4,7 @@ weight = 39
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++so`
7+## `++so`
8
8
9Coin parser engine
9Coin parser engine
10
10
@@ -28,7 +28,7 @@ Core containing arms that parse `++coin`.
28 <10.mkn 414.hhh 100.xkc 1.ypj %164>
28 <10.mkn 414.hhh 100.xkc 1.ypj %164>
29```
29```
30
30
31−------------------------------------------------------------------------
31+---
32
32
33### `++bisk:so`
33### `++bisk:so`
34
34
@@ -68,7 +68,7 @@ producing a `++dime`.
68 [%ux q=1.205.249]
68 [%ux q=1.205.249]
69```
69```
70
70
71−------------------------------------------------------------------------
71+---
72
72
73### `++crub:so`
73### `++crub:so`
74
74
@@ -260,7 +260,7 @@ and `@t`, producing a `++dime`.
260 [%ta 7.561.581]
260 [%ta 7.561.581]
261```
261```
262
262
263−------------------------------------------------------------------------
263+---
264
264
265### `++nuck:so`
265### `++nuck:so`
266
266
@@ -289,7 +289,6 @@ corresponding `++coin` parser.
289 ==
289 ==
290```
290```
291
291
292−
293#### Examples
292#### Examples
294
293
295```
294```
@@ -316,7 +315,7 @@ corresponding `++coin` parser.
316 0vph
315 0vph
317```
316```
318
317
319−------------------------------------------------------------------------
318+---
320
319
321### `++nusk:so`
320### `++nusk:so`
322
321
@@ -349,7 +348,7 @@ formatting).
349 [~ %ta ~.asd_a]
348 [~ %ta ~.asd_a]
350```
349```
351
350
352−------------------------------------------------------------------------
351+---
353
352
354### `++perd:so`
353### `++perd:so`
355
354
@@ -385,7 +384,7 @@ prefixes.
385 [%many [[% p=[p=~.ud q=20]] ~[[% p=[p=~.tas q=120]]]]]
384 [%many [[% p=[p=~.ud q=20]] ~[[% p=[p=~.tas q=120]]]]]
386```
385```
387
386
388−------------------------------------------------------------------------
387+---
389
388
390### `++royl:so`
389### `++royl:so`
391
390
@@ -456,7 +455,7 @@ Parsing rule. Parses a number into a `++dime` float.
456 .~3.13999999999999
455 .~3.13999999999999
457```
456```
458
457
459−------------------------------------------------------------------------
458+---
460
459
461### `++royl-cell:so`
460### `++royl-cell:so`
462
461
@@ -475,7 +474,7 @@ Intermediate parsed float convereter
475 ::
474 ::
476```
475```
477
476
478−------------------------------------------------------------------------
477+---
479
478
480### `++tash:so`
479### `++tash:so`
481
480
@@ -518,7 +517,7 @@ Parsing rule. Parses a signed number into a `++dime`.
518 [%sx --0x2e]
517 [%sx --0x2e]
519```
518```
520
519
521−------------------------------------------------------------------------
520+---
522
521
523### `++twid:so`
522### `++twid:so`
524
523
@@ -556,7 +555,7 @@ Parsing rule. Parses coins after a leading sig, `~`.
556 [%blob [1 1]]
555 [%blob [1 1]]
557```
556```
558
557
559−------------------------------------------------------------------------
558+---
560
559
561### `++zust:so`
560### `++zust:so`
562
561
@@ -604,5 +603,4 @@ Parsing rule. Parses an atom of either `@if` (IP address), `@f`
604 [%rd .~12.00999999999999]
603 [%rd .~12.00999999999999]
605```
604```
606
605
607−
608---
606---
content/docs/hoon/reference/stdlib/4m.md+20−18
@@ -4,7 +4,7 @@ weight = 40
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++scot`
7+## `++scot`
8
8
9Render dime as cord
9Render dime as cord
10
10
@@ -45,9 +45,9 @@ A `cord`.
45 '~.asd_a'
45 '~.asd_a'
46```
46```
47
47
48−
49---
48---
50−### `++scow`
49+
50+## `++scow`
51
51
52Render dime as tape
52Render dime as tape
53
53
@@ -66,6 +66,7 @@ A `tape`.
66```hoon
66```hoon
67 ++ scow |=(mol/dime ~(rend co %$ mol))
67 ++ scow |=(mol/dime ~(rend co %$ mol))
68```
68```
69+
69#### Examples
70#### Examples
70
71
71```
72```
@@ -79,9 +80,9 @@ A `tape`.
79 "~.asd_a"
80 "~.asd_a"
80```
81```
81
82
82−
83---
83---
84−### `++slat`
84+
85+## `++slat`
85
86
86Curried slaw
87Curried slaw
87
88
@@ -117,9 +118,9 @@ A `gate`.
117 [~ ~.asd_a
118 [~ ~.asd_a
118```
119```
119
120
120−
121---
121---
122−### `++slav`
122+
123+## `++slav`
123
124
124Demand: parse cord with input aura
125Demand: parse cord with input aura
125
126
@@ -164,7 +165,8 @@ The atom of a `(unit @)` from `++slaw`, or crash.
164```
165```
165
166
166---
167---
167−### `++slaw`
168+
169+## `++slaw`
168
170
169Parse cord to input aura
171Parse cord to input aura
170
172
@@ -212,9 +214,9 @@ A `(unit @)`.
212 ~
214 ~
213```
215```
214
216
215−
216---
217---
217−### `++slay`
218+
219+## `++slay`
218
220
219Parse cord to coin
221Parse cord to coin
220
222
@@ -272,9 +274,9 @@ A `(unit coin)`.
272 0vph
274 0vph
273```
275```
274
276
275−
276---
277---
277−### `++smyt`
278+
279+## `++smyt`
278
280
279Render path as tank
281Render path as tank
280
282
@@ -318,9 +320,9 @@ A `tank`.
318 ]
320 ]
319```
321```
320
322
321−
322---
323---
323−### `++spat`
324+
325+## `++spat`
324
326
325Render path as cord
327Render path as cord
326
328
@@ -351,9 +353,9 @@ A `cord`.
351 '/as/les/top'
353 '/as/les/top'
352```
354```
353
355
354−
355---
356---
356−### `++spud`
357+
358+## `++spud`
357
359
358Render path as tape
360Render path as tape
359
361
@@ -384,9 +386,9 @@ A `tape`.
384 "/as/les/top"
386 "/as/les/top"
385```
387```
386
388
387−
388---
389---
389−### `++stab`
390+
391+## `++stab`
390
392
391Parse cord to path
393Parse cord to path
392
394
content/docs/hoon/reference/stdlib/4n.md+15−13
@@ -4,7 +4,7 @@ weight = 41
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++mack`
7+## `++mack`
8
8
9Nock subject to unit
9Nock subject to unit
10
10
@@ -48,9 +48,9 @@ The `++unit` of a noun.
48 [~ %no]
48 [~ %no]
49```
49```
50
50
51−
52---
51---
53−### `++mink`
52+
53+## `++mink`
54
54
55Mock interpreter
55Mock interpreter
56
56
@@ -174,7 +174,8 @@ A `++tone`.
174```
174```
175
175
176---
176---
177−### `++mock`
177+
178+## `++mock`
178
179
179Compute formula on subject with hint
180Compute formula on subject with hint
180
181
@@ -223,9 +224,9 @@ The `++unit` of a noun.
223 "14"
224 "14"
224```
225```
225
226
226−
227---
227---
228−### `++mong`
228+
229+## `++mong`
229
230
230Slam gate with sample
231Slam gate with sample
231
232
@@ -279,9 +280,9 @@ A `++toon`.
279 [%0 p=[8 6]]
280 [%0 p=[8 6]]
280```
281```
281
282
282−
283---
283---
284−### `++mook`
284+
285+## `++mook`
285
286
286Intelligently render crash annotation
287Intelligently render crash annotation
287
288
@@ -351,9 +352,9 @@ A `++toon`.
351 [%2 p=~[[%leaf p="/b/repl/:<[1 1].[1 2]>"] [%leaf p="####"]]]
352 [%2 p=~[[%leaf p="/b/repl/:<[1 1].[1 2]>"] [%leaf p="####"]]]
352```
353```
353
354
354−
355---
355---
356−### `++mule`
356+
357+## `++mule`
357
358
358Typed virtual
359Typed virtual
359
360
@@ -404,9 +405,9 @@ XX
404 ]
405 ]
405```
406```
406
407
407−
408---
408---
409−### `++mute`
409+
410+## `++mute`
410
411
411Untyped virtual
412Untyped virtual
412
413
@@ -417,6 +418,7 @@ information.
417#### Accepts
418#### Accepts
418
419
419`taq` is a `++trap`.
420`taq` is a `++trap`.
421+
420#### Produces
422#### Produces
421
423
422Either a noun or a `++list` of `++tank`.
424Either a noun or a `++list` of `++tank`.
@@ -444,4 +446,4 @@ Either a noun or a `++list` of `++tank`.
444 [%.n p=~]
446 [%.n p=~]
445```
447```
446
448
447−---
449+---
content/docs/hoon/reference/stdlib/4o.md+31−127
@@ -4,7 +4,7 @@ weight = 42
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++abel`
7+## `++abel`
8
8
9Biblical names in hoon are primarily aliases for the compiler.
9Biblical names in hoon are primarily aliases for the compiler.
10
10
@@ -21,9 +21,9 @@ Biblical names in hoon are primarily aliases for the compiler.
21 %void
21 %void
22```
22```
23
23
24−
25---
24---
26−### `++aura`
25+
26+## `++aura`
27
27
28'type' of atom
28'type' of atom
29
29
@@ -46,37 +46,9 @@ See also: `++base`, aura reference
46 ~.ux
46 ~.ux
47```
47```
48
48
49−
50−---
51−### `++axis`
52−
53−Nock axis
54−
55−A Nock axis inside a noun. After the leading 1, in binary, a `1` signfies
56−right and `0` left.
57−
58−#### Source
59−
60−```hoon
61− ++ axis ,@ :: tree address
62−```
63−
64−#### Examples
65−
66−```
67− > *axis
68− 0
69−
70− > :: 0 is not actually a valid axis
71− > [[4 5] 6 7]
72− [[4 5] 6 7]
73− > `axis`0b110
74− 6
75−```
76−
77---
49---
78
50
79−### `++base`
51+## `++base`
80
52
81Base type
53Base type
82
54
@@ -106,34 +78,7 @@ boolean or null labelled with an aura.
106
78
107---
79---
108
80
109−### `++bean`
81+## `++beer`
110−
111−Boolean
112−
113−`0`, `&`, or `%.y` are true, and `1`, `|`, and `%.n` are false.
114−
115−#### Source
116−
117−```hoon
118− ++ bean ,? :: 0=&=yes, 1=|=no
119−```
120−
121−#### Examples
122−
123−```
124− > *bean
125− %.y
126−
127− > `bean`&
128− %.y
129− > `bean`|
130− %.n
131−```
132−
133−
134−---
135−
136−### `++beer`
137
82
138Tape builder
83Tape builder
139
84
@@ -156,7 +101,7 @@ Used to build tapes internally.
156
101
157---
102---
158
103
159−### `++beet`
104+## `++beet`
160
105
161XML interpolation cases
106XML interpolation cases
162
107
@@ -174,9 +119,9 @@ Used internally.
174 == ::
119 == ::
175```
120```
176
121
177−
178---
122---
179−### `++chum`
123+
124+## `++chum`
180
125
181Jet hint information
126Jet hint information
182
127
@@ -206,10 +151,9 @@ XX there's a ++chum in zuse that's politely causing this not to work
206 [%sgfs p=[std=%lob kel=314] q=[%zpzp ~]]
151 [%sgfs p=[std=%lob kel=314] q=[%zpzp ~]]
207```
152```
208
153
209−
210---
154---
211
155
212−### `++coil`
156+## `++coil`
213
157
214Tuple of core information
158Tuple of core information
215
159
@@ -225,9 +169,9 @@ intermediate step within Section 2fB. Converted by `++core` to %core type.
225 == ::
169 == ::
226```
170```
227
171
228−
229---
172---
230−### `++foot`
173+
174+## `++foot`
231
175
232Cases of arms by variance model.
176Cases of arms by variance model.
233
177
@@ -263,7 +207,7 @@ See also: `++ap`, `++ut`
263
207
264---
208---
265
209
266−### `++limb`
210+## `++limb`
267
211
268```hoon
212```hoon
269 ++ limb $|(term $%([%& p=axis] [%| p=@ud q=term])) ::
213 ++ limb $|(term $%([%& p=axis] [%| p=@ud q=term])) ::
@@ -284,9 +228,9 @@ See also: section 2fC-2fD
284 [%.n p=3 q=%$]
228 [%.n p=3 q=%$]
285```
229```
286
230
287−
288---
231---
289−### `++line`
232+
233+## `++line`
290
234
291XX move to `++ut`
235XX move to `++ut`
292
236
@@ -317,7 +261,7 @@ XX move to `++ut`
317
261
318---
262---
319
263
320−### `++metl`
264+## `++metl`
321
265
322```hoon
266```hoon
323 ++ metl ?(%gold %iron %zinc %lead) :: core variance
267 ++ metl ?(%gold %iron %zinc %lead) :: core variance
@@ -327,15 +271,12 @@ XX move to `++ut`
327
271
328See also: `++coil`
272See also: `++coil`
329
273
330−
331−
332---
274---
333
275
334−### `++nock`
276+## `++nock`
335
277
336Virtual machine. See Nock.
278Virtual machine. See Nock.
337
279
338−
339#### Source
280#### Source
340
281
341```hoon
282```hoon
@@ -361,26 +302,9 @@ Virtual machine. See Nock.
361 [p=[%4 p=[%0 p=1]] q=[%1 p=20]]
302 [p=[%4 p=[%0 p=1]] q=[%1 p=20]]
362```
303```
363
304
364−
365−---
366−
367−### `++noun`
368−
369−```hoon
370− ++ noun ,* :: any noun
371−```
372−
373−Used nowhere XX
374−
375−```
376− > `noun`~[1 2 3]
377− [1 2 3 0]
378−```
379−
380−
381---
305---
382
306
383−### `++null`
307+## `++null`
384
308
385```hoon
309```hoon
386 ++ null ,~ :: null, nil, etc
310 ++ null ,~ :: null, nil, etc
@@ -394,10 +318,9 @@ Used nowhere XX
394 %~
318 %~
395```
319```
396
320
397−
398---
321---
399
322
400−### `++port`
323+## `++port`
401
324
402XX move to `++ut`
325XX move to `++ut`
403
326
@@ -421,10 +344,9 @@ Type and location of core-shaped thing? XX Compiler Internals
421 [p=0 q=[%.y p=%void]]
344 [p=0 q=[%.y p=%void]]
422```
345```
423
346
424−
425---
347---
426
348
427−### `++span`
349+## `++span`
428
350
429ASCII atom
351ASCII atom
430
352
@@ -439,7 +361,6 @@ besides numbers and lowercase letters are permitted.
439 ++ span ,@ta :: text-atom (ASCII)
361 ++ span ,@ta :: text-atom (ASCII)
440```
362```
441
363
442−
443#### Examples
364#### Examples
444
365
445```
366```
@@ -458,10 +379,9 @@ besides numbers and lowercase letters are permitted.
458 'foo-bar'
379 'foo-bar'
459```
380```
460
381
461−
462---
382---
463
383
464−### `++tiki`
384+## `++tiki`
465
385
466XX move to `++ut`
386XX move to `++ut`
467
387
@@ -496,10 +416,9 @@ A `++wing` or `++hoon`.
496 ]
416 ]
497```
417```
498
418
499−
500---
419---
501
420
502−### `++toga`
421+## `++toga`
503
422
504Tree of faces
423Tree of faces
505
424
@@ -540,10 +459,9 @@ XX move to `++ut` and rune doc (for \^= examples)
540 ]
459 ]
541```
460```
542
461
543−
544---
462---
545
463
546−### `++tone`
464+## `++tone`
547
465
548Intermediate Nock computation result
466Intermediate Nock computation result
549
467
@@ -589,10 +507,9 @@ Similar to `++toon`, but stack trace is not yet rendered.
589 ]
507 ]
590```
508```
591
509
592−
593---
510---
594
511
595−### `++tuna`
512+## `++tuna`
596
513
597XML template tree
514XML template tree
598
515
@@ -616,11 +533,9 @@ tuna, and %f is a empty node.
616
533
617See also: `++sail`
534See also: `++sail`
618
535
619−
620−
621---
536---
622
537
623−### `++tusk`
538+## `++tusk`
624
539
625List of expressions
540List of expressions
626
541
@@ -642,10 +557,9 @@ a `++tusk`.
642 ~[[%dtzy p=%ud q=1] [%dtzy p=%ud q=2] [%dtzy p=%ud q=3]]
557 ~[[%dtzy p=%ud q=1] [%dtzy p=%ud q=2] [%dtzy p=%ud q=3]]
643```
558```
644
559
645−
646---
560---
647
561
648−### `++hoon`
562+## `++hoon`
649
563
650Expression
564Expression
651
565
@@ -653,11 +567,9 @@ An expression, or AST.
653
567
654See Rune section of Hoon reference
568See Rune section of Hoon reference
655
569
656−
657−
658---
570---
659
571
660−### `++tyke`
572+## `++tyke`
661
573
662List of 'maybe' hoons
574List of 'maybe' hoons
663
575
@@ -665,7 +577,6 @@ List of `++unit` `++hoon`, or gaps left to be inferred, in `++path`
665parsing. When you use a path such as `/=main=/pub/src/doc` the path is in fact
577parsing. When you use a path such as `/=main=/pub/src/doc` the path is in fact
666a `++tyke`, where the `=` are inferred from your current path.
578a `++tyke`, where the `=` are inferred from your current path.
667
579
668−
669#### Source
580#### Source
670
581
671```hoon
582```hoon
@@ -681,10 +592,9 @@ a `++tyke`, where the `=` are inferred from your current path.
681 ~[~ ~ [~ [%dtzy p=%tas q=29.537]] ~]
592 ~[~ ~ [~ [%dtzy p=%tas q=29.537]] ~]
682```
593```
683
594
684−
685---
595---
686
596
687−### `++typo`
597+## `++typo`
688
598
689Pointer for `++type`
599Pointer for `++type`
690
600
@@ -701,11 +611,9 @@ context when upating.
701
611
702See also: `++seem`, `++vise`, `++type`
612See also: `++seem`, `++vise`, `++type`
703
613
704−
705−
706---
614---
707
615
708−### `++tyre`
616+## `++tyre`
709
617
710List, term hoon
618List, term hoon
711
619
@@ -717,10 +625,9 @@ Associative list of `++term` `++hoon`, used in jet hint processing.
717 ++ tyre (list ,[p=term q=hoon]) ::
625 ++ tyre (list ,[p=term q=hoon]) ::
718```
626```
719
627
720−
721---
628---
722
629
723−### `++vase`
630+## `++vase`
724
631
725Typed data. A `++vase` is used wherever typed data is explicitly worked
632Typed data. A `++vase` is used wherever typed data is explicitly worked
726with.
633with.
@@ -738,10 +645,9 @@ with.
738 [p=[%cube p=0 q=[%atom p=%n]] q=0]
645 [p=[%cube p=0 q=[%atom p=%n]] q=0]
739```
646```
740
647
741−
742---
648---
743
649
744−### `++vise`
650+## `++vise`
745
651
746Convert during reboot
652Convert during reboot
747
653
@@ -757,11 +663,9 @@ Used to convert from previously-typed data during reboot.
757
663
758See also: `++typo`, `++seer`
664See also: `++typo`, `++seer`
759
665
760−
761−
762---
666---
763
667
764−### `++wing`
668+## `++wing`
765
669
766```hoon
670```hoon
767 ++ wing (list limb) ::
671 ++ wing (list limb) ::
content/docs/hoon/reference/stdlib/5c.md+77−1
@@ -4,4 +4,80 @@ weight = 45
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−(To be documented)
7+(To be fully documented)
8+
9+## `++slog`
10+
11+Deify printf
12+
13+Prints stack trace `a` if the stack trace isn't null, then produces the other
14+input. `+slog` first takes `a`, producing a gate. The gate then takes some hoon.
15+
16+#### Accepts
17+
18+`a` is a `tang`, and is the sample of `+slog`.
19+
20+`(slog a)` takes some `hoon`.
21+
22+#### Produces
23+
24+The result of the hoon given to `(slog a)`, with `a` printed to the terminal.
25+
26+#### Source
27+
28+```hoon
29+++ slog
30+ =| pri=@
31+ |= a=tang ^+ same
32+ ?~(a same ~>(%slog.[pri i.a] $(a t.a)))
33+```
34+
35+#### Examples
36+
37+```
38+foo
39+> ((slog leaf+"foo" ~) (add 1 1))
40+2
41+```
42+
43+#### Discussion
44+
45+`slog` is intended to be put in the middle of a bunch of chained function
46+calls that string a piece of data through them, so that an error message will be
47+printed if there's one to print.
48+
49+---
50+
51+## `++mean`
52+
53+Crash and printf
54+
55+Ends the program and prints `a`, a tracing error message.
56+
57+#### Accepts
58+
59+`a` is a `tang`.
60+
61+#### Produces
62+
63+A crash, with `a` printed to the terminal.
64+
65+#### Source
66+
67+```hoon
68+++ mean
69+ |= a=tang
70+ ^+ !!
71+ ?~ a !!
72+ ~_(i.a $(a t.a))
73+```
74+
75+#### Examples
76+
77+```
78+> (mean leaf+"foo" ~)
79+foo
80+dojo: hoon expression failed
81+```
82+
83+---
content/docs/hoon/reference/stdlib/5f.md+18−23
@@ -4,11 +4,11 @@ weight = 48
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−### `++mane`
7+## `++mane`
8
8
9XML name
9XML name
10
10
11−An XML name (tag name or attribute name) with an optional namespace. Parsed by
11+An XML name (tag name or attribute name) with an optional namespace. Parsed by
12`++name:de-xml:html` in `zuse.hoon`, rendered by `++name:en-xml:html` in `zuse.hoon`.
12`++name:de-xml:html` in `zuse.hoon`, rendered by `++name:en-xml:html` in `zuse.hoon`.
13
13
14#### Source
14#### Source
@@ -31,9 +31,9 @@ See also: `++sail`
31 [%div %namespace]
31 [%div %namespace]
32```
32```
33
33
34−
35---
34---
36−### `++manx`
35+
36+## `++manx`
37
37
38XML node.
38XML node.
39
39
@@ -49,10 +49,9 @@ Parsed by `++apex` within `++apex:de-xml:html` in `zuse.hoon`, rendered by `++ap
49
49
50See also: `++sail` doc
50See also: `++sail` doc
51
51
52−
53−
54---
52---
55−### `++marl`
53+
54+## `++marl`
56
55
57List of XML nodes
56List of XML nodes
58
57
@@ -66,10 +65,9 @@ A list of `++manx`.
66
65
67#### Examples
66#### Examples
68
67
69−
70−
71---
68---
72−### `++mars`
69+
70+## `++mars`
73
71
74XML CDATA
72XML CDATA
75
73
@@ -83,10 +81,9 @@ Implicitly produced by `++chrd` within `++chrd:de-xml:html`
83
81
84#### Examples
82#### Examples
85
83
86−
87−
88---
84---
89−### `++mart`
85+
86+## `++mart`
90
87
91List of XML attributes
88List of XML attributes
92
89
@@ -103,9 +100,9 @@ Parsed by `++attr:de-xml:html` in `zuse.hoon`, rendered by `++attr:en-xml:html`
103
100
104#### Examples
101#### Examples
105
102
106−
107---
103---
108−### `++marx`
104+
105+## `++marx`
109
106
110XML tag
107XML tag
111
108
@@ -120,10 +117,9 @@ A `++marx` is a pair of a tag name, `++mane` and a list of attributes,
120
117
121#### Examples
118#### Examples
122
119
123−
124−
125---
120---
126−### `++pass`
121+
122+## `++pass`
127
123
128Atom alias
124Atom alias
129
125
@@ -135,9 +131,9 @@ Used primarily in crypto.
135 ++ pass @ :: public key
131 ++ pass @ :: public key
136```
132```
137
133
138−
139---
134---
140−### `++ring`
135+
136+## `++ring`
141
137
142Atom alias
138Atom alias
143
139
@@ -149,9 +145,9 @@ Used primarily in crypto.
149 ++ ring @ :: private key
145 ++ ring @ :: private key
150```
146```
151
147
152−
153---
148---
154−### `++time`
149+
150+## `++time`
155
151
156Absolute date
152Absolute date
157
153
@@ -172,5 +168,4 @@ See also: `++date`, aura reference
172 ~2014.1.1
168 ~2014.1.1
173```
169```
174
170
175−
176---
171---
content/docs/hoon/reference/stdlib/table-of-contents.md+95−63
@@ -26,6 +26,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
26<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#addrh' title="Add (halfprecision float)"><code>++add:rh</code></a>
26<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#addrh' title="Add (halfprecision float)"><code>++add:rh</code></a>
27<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#addrs' title="Add (singleprecision float)"><code>++add:rs</code></a>
27<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#addrs' title="Add (singleprecision float)"><code>++add:rs</code></a>
28<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#addrq' title="Add (quadprecision float)"><code>++add:rq</code></a>
28<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#addrq' title="Add (quadprecision float)"><code>++add:rq</code></a>
29+<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#aftr' title="Pair after"><code>++aftr</code></a>
29<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#ag' title="Toplevel atom parser engine"><code>++ag</code></a>
30<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#ag' title="Toplevel atom parser engine"><code>++ag</code></a>
30<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#alf' title="Parse alphabetic characters"><code>++alf</code></a>
31<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#alf' title="Parse alphabetic characters"><code>++alf</code></a>
31<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#allby' title="Logical AND (map and wet gate)"><code>++all:by</code></a>
32<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#allby' title="Logical AND (map and wet gate)"><code>++all:by</code></a>
@@ -38,19 +39,21 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
38<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#apeag' title="Parse 0 or rule"><code>++ape:ag</code></a>
39<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#apeag' title="Parse 0 or rule"><code>++ape:ag</code></a>
39<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#aptby' title="Check correctness (map)"><code>++apt:by</code></a>
40<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#aptby' title="Check correctness (map)"><code>++apt:by</code></a>
40<a class="tooltip" href='/docs/hoon/reference/stdlib/2h/#aptin' title="Check correctness (set)"><code>++apt:in</code></a>
41<a class="tooltip" href='/docs/hoon/reference/stdlib/2h/#aptin' title="Check correctness (set)"><code>++apt:in</code></a>
42+<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#aptto' title="Check correctness of queue"><code>++apt:to</code></a>
41<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#at' title="(Undocumented)"><code>++at</code></a>
43<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#at' title="(Undocumented)"><code>++at</code></a>
42<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#aura' title="'Type' of atom"><code>++aura</code></a>
44<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#aura' title="'Type' of atom"><code>++aura</code></a>
43−<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#axis' title="Nock axis"><code>++axis</code></a>
45+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#axis' title="Tree address"><code>+$axis</code></a>
44
46
45### b
47### b
46
48
49+<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#bake' title="Convert wet gate to dry gate"><code>++bake</code></a>
47<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#balto' title="Balance queue"><code>++bal:to</code></a>
50<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#balto' title="Balance queue"><code>++bal:to</code></a>
48<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#bar' title="Parse | (bar)"><code>++bar</code></a>
51<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#bar' title="Parse | (bar)"><code>++bar</code></a>
49<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#bas' title="Parse \ (bas)"><code>++bas</code></a>
52<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#bas' title="Parse \ (bas)"><code>++bas</code></a>
50<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#base' title="Base type"><code>++base</code></a>
53<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#base' title="Base type"><code>++base</code></a>
51<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#bass' title="Parser modifier (LSBordered ++list as atom of ++base)"><code>++bass</code></a>
54<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#bass' title="Parser modifier (LSBordered ++list as atom of ++base)"><code>++bass</code></a>
52<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#bayag' title="Parses binary number"><code>++bay:ag</code></a>
55<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#bayag' title="Parses binary number"><code>++bay:ag</code></a>
53−<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#bean' title="Boolean"><code>++bean</code></a>
56+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#bean' title="Boolean"><code>+$bean</code></a>
54<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#beer' title="Tape builder"><code>++beer</code></a>
57<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#beer' title="Tape builder"><code>++beer</code></a>
55<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#beet' title="XML interpolation cases"><code>++beet</code></a>
58<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#beet' title="XML interpolation cases"><code>++beet</code></a>
56<a class="tooltip" href='/docs/hoon/reference/stdlib/4e/#bend' title="Conditional composer"><code>++bend</code></a>
59<a class="tooltip" href='/docs/hoon/reference/stdlib/4e/#bend' title="Conditional composer"><code>++bend</code></a>
@@ -77,6 +80,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
77<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#both' title="Group unit values into pair"><code>++both</code></a>
80<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#both' title="Group unit values into pair"><code>++both</code></a>
78<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#buc' title="Parse $ (buc)"><code>++buc</code></a>
81<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#buc' title="Parse $ (buc)"><code>++buc</code></a>
79<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#but' title="Parse binary digit"><code>++but</code></a>
82<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#but' title="Parse binary digit"><code>++but</code></a>
83+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#byts' title="bytes, LSB first"><code>+$byts</code></a>
80
84
81### c
85### c
82
86
@@ -87,10 +91,11 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
87<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#cat' title="Concatenate"><code>++cat</code></a>
91<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#cat' title="Concatenate"><code>++cat</code></a>
88<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#cen' title="Parse % (cen)"><code>++cen</code></a>
92<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#cen' title="Parse % (cen)"><code>++cen</code></a>
89<a class="tooltip" href='/docs/hoon/reference/stdlib/3c/#cetyo' title="Days in a century"><code>++cet:yo</code></a>
93<a class="tooltip" href='/docs/hoon/reference/stdlib/3c/#cetyo' title="Days in a century"><code>++cet:yo</code></a>
90−<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#char' title="Character"><code>++char</code></a>
94+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#char' title="Character"><code>+$char</code></a>
91<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#chum' title="Jet hint information"><code>++chum</code></a>
95<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#chum' title="Jet hint information"><code>++chum</code></a>
92<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#cit' title="Octal digit"><code>++cit</code></a>
96<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#cit' title="Octal digit"><code>++cit</code></a>
93−<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#clap' title="Apply function to two units"><code>++clap</code></a>
97+<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#clap' title="Combine two units with function"><code>++clap</code></a>
98+<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#clef' title="Compose two units with function"><code>++clef</code></a>
94<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#cmpsi' title="Compare (signed integer)"><code>++cmp:si</code></a>
99<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#cmpsi' title="Compare (signed integer)"><code>++cmp:si</code></a>
95<a class="tooltip" href='/docs/hoon/reference/stdlib/4k/#co' title="Literal rendering engine"><code>++co</code></a>
100<a class="tooltip" href='/docs/hoon/reference/stdlib/4k/#co' title="Literal rendering engine"><code>++co</code></a>
96<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#coil' title="Tuple of core information"><code>++coil</code></a>
101<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#coil' title="Tuple of core information"><code>++coil</code></a>
@@ -101,7 +106,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
101<a class="tooltip" href='/docs/hoon/reference/stdlib/4e/#comp' title="Arbitrary compose"><code>++comp</code></a>
106<a class="tooltip" href='/docs/hoon/reference/stdlib/4e/#comp' title="Arbitrary compose"><code>++comp</code></a>
102<a class="tooltip" href='/docs/hoon/reference/stdlib/2d/#con' title="Binary OR"><code>++con</code></a>
107<a class="tooltip" href='/docs/hoon/reference/stdlib/2d/#con' title="Binary OR"><code>++con</code></a>
103<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#cook' title="Apply gate"><code>++cook</code></a>
108<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#cook' title="Apply gate"><code>++cook</code></a>
104−<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#cord' title="UTF8 text"><code>++cord</code></a>
109+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#cord' title="UTF8 text"><code>+$cord</code></a>
105<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#cork' title="Compose forward"><code>++cork</code></a>
110<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#cork' title="Compose forward"><code>++cork</code></a>
106<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#corl' title="Compose backward"><code>++corl</code></a>
111<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#corl' title="Compose backward"><code>++corl</code></a>
107<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#crip' title="Tape to cord"><code>++crip</code></a>
112<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#crip' title="Tape to cord"><code>++crip</code></a>
@@ -115,7 +120,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
115### d
120### d
116
121
117<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#dne' title="Render decimal"><code>++d:ne</code></a>
122<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#dne' title="Render decimal"><code>++d:ne</code></a>
118−<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#date' title="Point in time"><code>++date</code></a>
123+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#date' title="Parsed date"><code>+$date</code></a>
119<a class="tooltip" href='/docs/hoon/reference/stdlib/3c/#dayyo' title="Seconds in day"><code>++day:yo</code></a>
124<a class="tooltip" href='/docs/hoon/reference/stdlib/3c/#dayyo' title="Seconds in day"><code>++day:yo</code></a>
120<a class="tooltip" href='/docs/hoon/reference/stdlib/1a/#dec' title="Decrement"><code>++dec</code></a>
125<a class="tooltip" href='/docs/hoon/reference/stdlib/1a/#dec' title="Decrement"><code>++dec</code></a>
121<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#delby' title="Delete (map)"><code>++del:by</code></a>
126<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#delby' title="Delete (map)"><code>++del:by</code></a>
@@ -125,6 +130,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
125<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#demag' title="Parse decmal with dots"><code>++dem:ag</code></a>
130<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#demag' title="Parse decmal with dots"><code>++dem:ag</code></a>
126<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#denfl' title="Denormalizes (floating point)"><code>++den:fl</code></a>
131<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#denfl' title="Denormalizes (floating point)"><code>++den:fl</code></a>
127<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#depto' title="Maximum depth (queue)"><code>++dep:to</code></a>
132<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#depto' title="Maximum depth (queue)"><code>++dep:to</code></a>
133+<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#difby' title="Difference between maps"><code>++dif:by</code></a>
128<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#diffe' title="Difference between atoms (modular basis)"><code>++dif:fe</code></a>
134<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#diffe' title="Difference between atoms (modular basis)"><code>++dif:fe</code></a>
129<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#diffo' title='Subtraction (modular base)'><code>++dif:fo</code></a>
135<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#diffo' title='Subtraction (modular base)'><code>++dif:fo</code></a>
130<a class="tooltip" href='/docs/hoon/reference/stdlib/2h/#difin' title='Difference (set)'><code>++dif:in</code></a>
136<a class="tooltip" href='/docs/hoon/reference/stdlib/2h/#difin' title='Difference (set)'><code>++dif:in</code></a>
@@ -146,7 +152,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
146<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#dog' title="Optional gap"><code>++dog</code></a>
152<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#dog' title="Optional gap"><code>++dog</code></a>
147<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#doh' title="@p separator"><code>++doh</code></a>
153<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#doh' title="@p separator"><code>++doh</code></a>
148<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#doq' title="Parse double quote"><code>++doq</code></a>
154<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#doq' title="Parse double quote"><code>++doq</code></a>
149−<a class="tooltip" href='/docs/hoon/reference/stdlib/2f/#dor' title="Numeric order"><code>++dor</code></a>
155+<a class="tooltip" href='/docs/hoon/reference/stdlib/2f/#dor' title="Depth order"><code>++dor</code></a>
150<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#dot' title="Parse period"><code>++dot</code></a>
156<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#dot' title="Parse period"><code>++dot</code></a>
151<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#drgff' title="@r to decimal float"><code>++drg:ff</code></a>
157<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#drgff' title="@r to decimal float"><code>++drg:ff</code></a>
152<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#drgfl' title="Get printable decimal (signed and unsigned integer cell)"><code>++drg:fl</code></a>
158<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#drgfl' title="Get printable decimal (signed and unsigned integer cell)"><code>++drg:fl</code></a>
@@ -200,7 +206,9 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
200<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#fil' title="Fill bloqstream"><code>++fil</code></a>
206<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#fil' title="Fill bloqstream"><code>++fil</code></a>
201<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#find' title="First index in list"><code>++find</code></a>
207<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#find' title="First index in list"><code>++find</code></a>
202<a class="tooltip" href='/docs/hoon/reference/stdlib/4c/#fitre' title="Fit on one line test"><code>++fit:re</code></a>
208<a class="tooltip" href='/docs/hoon/reference/stdlib/4c/#fitre' title="Fit on one line test"><code>++fit:re</code></a>
209+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#flag' title="Boolean (flag)"><code>+$flag</code></a>
203<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#flifl' title="Flip sign"><code>++fli:fl</code></a>
210<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#flifl' title="Flip sign"><code>++fli:fl</code></a>
211+<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#flit' title="Make filter"><code>++flit</code></a>
204<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#flop' title="Reverse list"><code>++flop</code></a>
212<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#flop' title="Reverse list"><code>++flop</code></a>
205<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#fmaff' title="Fused multiplyadd (IEEE float)"><code>++fma:ff</code></a>
213<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#fmaff' title="Fused multiplyadd (IEEE float)"><code>++fma:ff</code></a>
206<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#fmafl' title="Fused multiplyadd"><code>++fma:fl</code></a>
214<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#fmafl' title="Fused multiplyadd"><code>++fma:fl</code></a>
@@ -208,9 +216,9 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
208<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#fmarh' title="Fused multiplyadd (halfprecision float)"><code>++fma:rh</code></a>
216<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#fmarh' title="Fused multiplyadd (halfprecision float)"><code>++fma:rh</code></a>
209<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#fmars' title="Fused multiplyadd (singleprecision float)"><code>++fma:rs</code></a>
217<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#fmars' title="Fused multiplyadd (singleprecision float)"><code>++fma:rs</code></a>
210<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#fmarq' title="Fused multiplyadd (quadprecision float)"><code>++fma:rq</code></a>
218<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#fmarq' title="Fused multiplyadd (quadprecision float)"><code>++fma:rq</code></a>
211−<a class="tooltip" href='/docs/hoon/reference/stdlib/2e/#fnv' title="FNV scrambler"><code>++fnv</code></a>
212<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#fo' title="Modulo prime"><code>++fo</code></a>
219<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#fo' title="Modulo prime"><code>++fo</code></a>
213<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#foot' title="Cases of arms by variance model"><code>++foot</code></a>
220<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#foot' title="Cases of arms by variance model"><code>++foot</code></a>
221+<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#fore' title="Pair before"><code>++fore</code></a>
214<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#fosrh' title="@rs to @rh"><code>++fos:rh</code></a>
222<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#fosrh' title="@rs to @rh"><code>++fos:rh</code></a>
215<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#frafo' title="Divide (modular base)"><code>++fra:fo</code></a>
223<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#frafo' title="Divide (modular base)"><code>++fra:fo</code></a>
216<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#frasi' title="Divide (signed integer)"><code>++fra:si</code></a>
224<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#frasi' title="Divide (signed integer)"><code>++fra:si</code></a>
@@ -226,6 +234,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
226<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#gar' title="Parse > (gar)"><code>++gar</code></a>
234<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#gar' title="Parse > (gar)"><code>++gar</code></a>
227<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#gasby' title="Concatenate (map)"><code>++gas:by</code></a>
235<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#gasby' title="Concatenate (map)"><code>++gas:by</code></a>
228<a class="tooltip" href='/docs/hoon/reference/stdlib/2h/#gasin' title="Concatenate (set)"><code>++gas:in</code></a>
236<a class="tooltip" href='/docs/hoon/reference/stdlib/2h/#gasin' title="Concatenate (set)"><code>++gas:in</code></a>
237+<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#gasju' title="Concatenate (jug)"><code>++gas:ju</code></a>
229<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#gasto' title="Push list into queue"><code>++gas:to</code></a>
238<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#gasto' title="Push list into queue"><code>++gas:to</code></a>
230<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#gate' title="Function"><code>++gate</code></a>
239<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#gate' title="Function"><code>++gate</code></a>
231<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#gaw' title="Classic whitespace"><code>++gaw</code></a>
240<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#gaw' title="Classic whitespace"><code>++gaw</code></a>
@@ -236,7 +245,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
236<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#getto' title="Headtail pair"><code>++get:to</code></a>
245<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#getto' title="Headtail pair"><code>++get:to</code></a>
237<a class="tooltip" href='/docs/hoon/reference/stdlib/4e/#glue' title="Skip delimiter"><code>++glue</code></a>
246<a class="tooltip" href='/docs/hoon/reference/stdlib/4e/#glue' title="Skip delimiter"><code>++glue</code></a>
238<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#gon' title="Parse long numbers"><code>++gon</code></a>
247<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#gon' title="Parse long numbers"><code>++gon</code></a>
239−<a class="tooltip" href='/docs/hoon/reference/stdlib/2f/#gor' title="Hash order"><code>++gor</code></a>
248+<a class="tooltip" href='/docs/hoon/reference/stdlib/2f/#gor' title="Mug order"><code>++gor</code></a>
240<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#gotby' title="Assert for value (map)"><code>++got:by</code></a>
249<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#gotby' title="Assert for value (map)"><code>++got:by</code></a>
241<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#grdff' title="Decimal float to @r"><code>++grd:ff</code></a>
250<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#grdff' title="Decimal float to @r"><code>++grd:ff</code></a>
242<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#grdfl' title="Decimal to float"><code>++grd:fl</code></a>
251<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#grdfl' title="Decimal to float"><code>++grd:fl</code></a>
@@ -264,7 +273,6 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
264### h
273### h
265
274
266<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#hair' title="Parsing line and column"><code>++hair</code></a>
275<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#hair' title="Parsing line and column"><code>++hair</code></a>
267−<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#hard' title="Force remold"><code>++hard</code></a>
268<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#hasby' title="Key existence check (map)"><code>++has:by</code></a>
276<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#hasby' title="Key existence check (map)"><code>++has:by</code></a>
269<a class="tooltip" href='/docs/hoon/reference/stdlib/2h/#hasin' title="Key existence check (set)"><code>++has:in</code></a>
277<a class="tooltip" href='/docs/hoon/reference/stdlib/2h/#hasin' title="Key existence check (set)"><code>++has:in</code></a>
270<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#hasju' title="Check contents (jug)"><code>++has:ju</code></a>
278<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#hasju' title="Check contents (jug)"><code>++has:ju</code></a>
@@ -278,9 +286,9 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
278<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#hig' title="Parse single uppercase letter"><code>++hig</code></a>
286<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#hig' title="Parse single uppercase letter"><code>++hig</code></a>
279<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#hit' title="Parse single hexadecimal digit"><code>++hit</code></a>
287<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#hit' title="Parse single hexadecimal digit"><code>++hit</code></a>
280<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#homo' title="Homogenize list"><code>++homo</code></a>
288<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#homo' title="Homogenize list"><code>++homo</code></a>
281−<a class="tooltip" href='/docs/hoon/reference/stdlib/2f/#hor' title="Horizontal hash order"><code>++hor</code></a>
282<a class="tooltip" href='/docs/hoon/reference/stdlib/3c/#horyo' title="Seconds in hour"><code>++hor:yo</code></a>
289<a class="tooltip" href='/docs/hoon/reference/stdlib/3c/#horyo' title="Seconds in hour"><code>++hor:yo</code></a>
283<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#hufab' title="Parse two phonetic pairs"><code>++huf:ab</code></a>
290<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#hufab' title="Parse two phonetic pairs"><code>++huf:ab</code></a>
291+<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#hunt' title="Select between two units by a rule"><code>++hunt</code></a>
284<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#hyfab' title="Parse 8 phonetic bytes"><code>++hyf:ab</code></a>
292<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#hyfab' title="Parse 8 phonetic bytes"><code>++hyf:ab</code></a>
285
293
286### i
294### i
@@ -299,6 +307,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
299### j
307### j
300
308
301<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#ja' title="Jar engine"><code>++ja</code></a>
309<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#ja' title="Jar engine"><code>++ja</code></a>
310+<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#jabby' title="Transform value (map)"><code>++jab:by</code></a>
302<a class="tooltip" href='/docs/hoon/reference/stdlib/2p/#jam' title="Pack noun to atom"><code>++jam</code></a>
311<a class="tooltip" href='/docs/hoon/reference/stdlib/2p/#jam' title="Pack noun to atom"><code>++jam</code></a>
303<a class="tooltip" href='/docs/hoon/reference/stdlib/2o/#jar' title="Mold generator (jar)"><code>++jar</code></a>
312<a class="tooltip" href='/docs/hoon/reference/stdlib/2o/#jar' title="Mold generator (jar)"><code>++jar</code></a>
304<a class="tooltip" href='/docs/hoon/reference/stdlib/3c/#jesyo' title="Maximum 64bit timestamp"><code>++jes:yo</code></a>
313<a class="tooltip" href='/docs/hoon/reference/stdlib/3c/#jesyo' title="Maximum 64bit timestamp"><code>++jes:yo</code></a>
@@ -315,11 +324,13 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
315<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#ket' title="Parse ^ (ket)"><code>++ket</code></a>
324<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#ket' title="Parse ^ (ket)"><code>++ket</code></a>
316<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#keyby' title="Set of keys"><code>++key:by</code></a>
325<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#keyby' title="Set of keys"><code>++key:by</code></a>
317<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#knee' title="Recursive parsers"><code>++knee</code></a>
326<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#knee' title="Recursive parsers"><code>++knee</code></a>
318−<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#knot' title="Atom type of ASCII characters"><code>++knot</code></a>
327+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#knot' title="Atom type of ASCII characters"><code>+$knot</code></a>
319
328
320### l
329### l
321
330
322<a class="tooltip" href='/docs/hoon/reference/stdlib/4d/#last' title="Further trace"><code>++last</code></a>
331<a class="tooltip" href='/docs/hoon/reference/stdlib/4d/#last' title="Further trace"><code>++last</code></a>
332+<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#late' title="Put tail"><code>++late</code></a>
333+<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#lead' title="Put head"><code>++lead</code></a>
323<a class="tooltip" href='/docs/hoon/reference/stdlib/2m/#lenl' title="Construct list from nullterminated noun"><code>++le:nl</code></a>
334<a class="tooltip" href='/docs/hoon/reference/stdlib/2m/#lenl' title="Construct list from nullterminated noun"><code>++le:nl</code></a>
324<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#lent' title="List length"><code>++lent</code></a>
335<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#lent' title="List length"><code>++lent</code></a>
325<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#levy' title="Logical AND on list"><code>++levy</code></a>
336<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#levy' title="Logical AND on list"><code>++levy</code></a>
@@ -334,7 +345,6 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
334<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#lipag' title="Parse IPv4 address"><code>++lip:ag</code></a>
345<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#lipag' title="Parse IPv4 address"><code>++lip:ag</code></a>
335<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#list' title="Mold constructor (list)"><code>++list</code></a>
346<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#list' title="Mold constructor (list)"><code>++list</code></a>
336<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#lone' title="Mold generator (face on mold)"><code>++lone</code></a>
347<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#lone' title="Mold generator (face on mold)"><code>++lone</code></a>
337−<a class="tooltip" href='/docs/hoon/reference/stdlib/2f/#lor' title="Leg order"><code>++lor</code></a>
338<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#low' title="Parse lowercase letter"><code>++low</code></a>
348<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#low' title="Parse lowercase letter"><code>++low</code></a>
339<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#lsh' title="Leftshift"><code>++lsh</code></a>
349<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#lsh' title="Leftshift"><code>++lsh</code></a>
340<a class="tooltip" href='/docs/hoon/reference/stdlib/1a/#lte' title="Less than / equal (atom)"><code>++lte</code></a>
350<a class="tooltip" href='/docs/hoon/reference/stdlib/1a/#lte' title="Less than / equal (atom)"><code>++lte</code></a>
@@ -366,14 +376,14 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
366<a class="tooltip" href='/docs/hoon/reference/stdlib/4n/#mack' title="Nock subject to unit"><code>++mack</code></a>
376<a class="tooltip" href='/docs/hoon/reference/stdlib/4n/#mack' title="Nock subject to unit"><code>++mack</code></a>
367<a class="tooltip" href='/docs/hoon/reference/stdlib/2l/#malt' title="Map from list"><code>++malt</code></a>
377<a class="tooltip" href='/docs/hoon/reference/stdlib/2l/#malt' title="Map from list"><code>++malt</code></a>
368<a class="tooltip" href='/docs/hoon/reference/stdlib/2o/#map' title="Mold generator (map)"><code>++map</code></a>
378<a class="tooltip" href='/docs/hoon/reference/stdlib/2o/#map' title="Mold generator (map)"><code>++map</code></a>
369−<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#marby' title="Assert and add (map)"><code>++mar:by</code></a>
379+<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#marby' title="Add with validation (map)"><code>++mar:by</code></a>
370<a class="tooltip" href='/docs/hoon/reference/stdlib/1b/#mas' title="Address within head/tail"><code>++mas</code></a>
380<a class="tooltip" href='/docs/hoon/reference/stdlib/1b/#mas' title="Address within head/tail"><code>++mas</code></a>
371<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#mask' title="Match character"><code>++mask</code></a>
381<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#mask' title="Match character"><code>++mask</code></a>
372<a class="tooltip" href='/docs/hoon/reference/stdlib/2p/#mat' title="Lengthencode"><code>++mat</code></a>
382<a class="tooltip" href='/docs/hoon/reference/stdlib/2p/#mat' title="Lengthencode"><code>++mat</code></a>
373<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#mate' title="Choose"><code>++mate</code></a>
383<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#mate' title="Choose"><code>++mate</code></a>
374<a class="tooltip" href='/docs/hoon/reference/stdlib/1a/#max' title="Maximum"><code>++max</code></a>
384<a class="tooltip" href='/docs/hoon/reference/stdlib/1a/#max' title="Maximum"><code>++max</code></a>
375<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#meff' title="Minimum exponent of ff"><code>++me:ff</code></a>
385<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#meff' title="Minimum exponent of ff"><code>++me:ff</code></a>
376−<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#mean' title="Crash and printf"><code>++mean</code></a>
386+<a class="tooltip" href='/docs/hoon/reference/stdlib/5c/#mean' title="Crash and printf"><code>++mean</code></a>
377<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#mes' title="Parse hexabyte"><code>++mes</code></a>
387<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#mes' title="Parse hexabyte"><code>++mes</code></a>
378<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#mesc' title="Escape special characters"><code>++mesc</code></a>
388<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#mesc' title="Escape special characters"><code>++mesc</code></a>
379<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#met' title="Measure"><code>++met</code></a>
389<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#met' title="Measure"><code>++met</code></a>
@@ -388,6 +398,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
388<a class="tooltip" href='/docs/hoon/reference/stdlib/2l/#molt' title="Map from pair list"><code>++molt</code></a>
398<a class="tooltip" href='/docs/hoon/reference/stdlib/2l/#molt' title="Map from pair list"><code>++molt</code></a>
389<a class="tooltip" href='/docs/hoon/reference/stdlib/4n/#mong' title="Slam gate with sample"><code>++mong</code></a>
399<a class="tooltip" href='/docs/hoon/reference/stdlib/4n/#mong' title="Slam gate with sample"><code>++mong</code></a>
390<a class="tooltip" href='/docs/hoon/reference/stdlib/4n/#mook' title="Intelligently render crash annotation"><code>++mook</code></a>
400<a class="tooltip" href='/docs/hoon/reference/stdlib/4n/#mook' title="Intelligently render crash annotation"><code>++mook</code></a>
401+<a class="tooltip" href='/docs/hoon/reference/stdlib/2f/#mor' title="(more) mug order"><code>++mor</code></a>
391<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#more' title="Parse list with delimiter"><code>++more</code></a>
402<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#more' title="Parse list with delimiter"><code>++more</code></a>
392<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#most' title="Parse list of at least one match"><code>++most</code></a>
403<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#most' title="Parse list of at least one match"><code>++most</code></a>
393<a class="tooltip" href='/docs/hoon/reference/stdlib/3c/#moyyo' title="Days in months of leapyear"><code>++moy:yo</code></a>
404<a class="tooltip" href='/docs/hoon/reference/stdlib/3c/#moyyo' title="Days in months of leapyear"><code>++moy:yo</code></a>
@@ -403,7 +414,6 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
403<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#mulrq' title="Multiply (quadprecision float)"><code>++mul:rq</code></a>
414<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#mulrq' title="Multiply (quadprecision float)"><code>++mul:rq</code></a>
404<a class="tooltip" href='/docs/hoon/reference/stdlib/4n/#mule' title="Typed virtual"><code>++mule</code></a>
415<a class="tooltip" href='/docs/hoon/reference/stdlib/4n/#mule' title="Typed virtual"><code>++mule</code></a>
405<a class="tooltip" href='/docs/hoon/reference/stdlib/4n/#mute' title="Untyped virtual"><code>++mute</code></a>
416<a class="tooltip" href='/docs/hoon/reference/stdlib/4n/#mute' title="Untyped virtual"><code>++mute</code></a>
406−<a class="tooltip" href='/docs/hoon/reference/stdlib/2e/#mum' title="31bit MurmurHash3 scrambler"><code>++mum</code></a>
407<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#murn' title="Maybe transform"><code>++murn</code></a>
417<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#murn' title="Maybe transform"><code>++murn</code></a>
408<a class="tooltip" href='/docs/hoon/reference/stdlib/2m/#my' title="Map from raw noun"><code>++my</code></a>
418<a class="tooltip" href='/docs/hoon/reference/stdlib/2m/#my' title="Map from raw noun"><code>++my</code></a>
409<a class="tooltip" href='/docs/hoon/reference/stdlib/2m/#mynl' title="Construct map from nullterminated noun"><code>++my:nl</code></a>
419<a class="tooltip" href='/docs/hoon/reference/stdlib/2m/#mynl' title="Construct map from nullterminated noun"><code>++my:nl</code></a>
@@ -423,7 +433,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
423<a class="tooltip" href='/docs/hoon/reference/stdlib/2m/#nl' title="Noun to container operations"><code>++nl</code></a>
433<a class="tooltip" href='/docs/hoon/reference/stdlib/2m/#nl' title="Noun to container operations"><code>++nl</code></a>
424<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#nock' title="Virtual machine (see Nock)"><code>++nock</code></a>
434<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#nock' title="Virtual machine (see Nock)"><code>++nock</code></a>
425<a class="tooltip" href='/docs/hoon/reference/stdlib/2d/#not' title="Binary NOT (atom)"><code>++not</code></a>
435<a class="tooltip" href='/docs/hoon/reference/stdlib/2d/#not' title="Binary NOT (atom)"><code>++not</code></a>
426−<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#noun' title="(Undocumented)"><code>++noun</code></a>
436+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#noun' title="Any noun"><code>+$noun</code></a>
427<a class="tooltip" href='/docs/hoon/reference/stdlib/4l/#nuckso' title="Toplevel coin parser"><code>++nuck:so</code></a>
437<a class="tooltip" href='/docs/hoon/reference/stdlib/4l/#nuckso' title="Toplevel coin parser"><code>++nuck:so</code></a>
428<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#nud' title="Parse numeric character"><code>++nud</code></a>
438<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#nud' title="Parse numeric character"><code>++nud</code></a>
429<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#null' title="(Undocumented)"><code>++null</code></a>
439<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#null' title="(Undocumented)"><code>++null</code></a>
@@ -443,7 +453,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
443<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#pair' title="Mold of pair of types"><code>++pair</code></a>
453<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#pair' title="Mold of pair of types"><code>++pair</code></a>
444<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#pam' title="Parse & (pam)"><code>++pam</code></a>
454<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#pam' title="Parse & (pam)"><code>++pam</code></a>
445<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#pat' title="Parse @ (pat)"><code>++pat</code></a>
455<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#pat' title="Parse @ (pat)"><code>++pat</code></a>
446−<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#path' title="Filesystem path"><code>++path</code></a>
456+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#path' title="Like unix path"><code>+$path</code></a>
447<a class="tooltip" href='/docs/hoon/reference/stdlib/1b/#peg' title="Address within address"><code>++peg</code></a>
457<a class="tooltip" href='/docs/hoon/reference/stdlib/1b/#peg' title="Address within address"><code>++peg</code></a>
448<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#pel' title="Parse ( (pel)"><code>++pel</code></a>
458<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#pel' title="Parse ( (pel)"><code>++pel</code></a>
449<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#per' title="Parse ) (per)"><code>++per</code></a>
459<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#per' title="Parse ) (per)"><code>++per</code></a>
@@ -495,6 +505,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
495<a class="tooltip" href='/docs/hoon/reference/stdlib/3d/#rawog' title="Random bits"><code>++raw:og</code></a>
505<a class="tooltip" href='/docs/hoon/reference/stdlib/3d/#rawog' title="Random bits"><code>++raw:og</code></a>
496<a class="tooltip" href='/docs/hoon/reference/stdlib/3d/#rawsog' title="Random bits continuation"><code>++raws:og</code></a>
506<a class="tooltip" href='/docs/hoon/reference/stdlib/3d/#rawsog' title="Random bits continuation"><code>++raws:og</code></a>
497<a class="tooltip" href='/docs/hoon/reference/stdlib/4c/#re' title="Prettyprinting engine (tank)"><code>++re</code></a>
507<a class="tooltip" href='/docs/hoon/reference/stdlib/4c/#re' title="Prettyprinting engine (tank)"><code>++re</code></a>
508+<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#rear' title="Last item in list"><code>++rear</code></a>
498<a class="tooltip" href='/docs/hoon/reference/stdlib/4k/#rearco' title="Prepend and render atom as tape"><code>++rear:co</code></a>
509<a class="tooltip" href='/docs/hoon/reference/stdlib/4k/#rearco' title="Prepend and render atom as tape"><code>++rear:co</code></a>
499<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#reap' title="Replicate (list)"><code>++reap</code></a>
510<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#reap' title="Replicate (list)"><code>++reap</code></a>
500<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#reel' title="Right fold (list)"><code>++reel</code></a>
511<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#reel' title="Right fold (list)"><code>++reel</code></a>
@@ -502,11 +513,11 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
502<a class="tooltip" href='/docs/hoon/reference/stdlib/4k/#rendco' title="Render coin lot as tape"><code>++rend:co</code></a>
513<a class="tooltip" href='/docs/hoon/reference/stdlib/4k/#rendco' title="Render coin lot as tape"><code>++rend:co</code></a>
503<a class="tooltip" href='/docs/hoon/reference/stdlib/4k/#rentco' title="Render coin lot as span"><code>++rent:co</code></a>
514<a class="tooltip" href='/docs/hoon/reference/stdlib/4k/#rentco' title="Render coin lot as span"><code>++rent:co</code></a>
504<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#rep' title="Assemble single"><code>++rep</code></a>
515<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#rep' title="Assemble single"><code>++rep</code></a>
505−<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#repby' title="Replace by product (map)"><code>++rep:by</code></a>
516+<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#repby' title="Reduce to product (map)"><code>++rep:by</code></a>
506<a class="tooltip" href='/docs/hoon/reference/stdlib/2h/#repin' title="Accumulate elements (set)"><code>++rep:in</code></a>
517<a class="tooltip" href='/docs/hoon/reference/stdlib/2h/#repin' title="Accumulate elements (set)"><code>++rep:in</code></a>
507<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#rev' title="Reverse"><code>++rev</code></a>
518<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#rev' title="Reverse"><code>++rev</code></a>
508<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#rfat' title="(Undocumented)"><code>++rf:at</code></a>
519<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#rfat' title="(Undocumented)"><code>++rf:at</code></a>
509−<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#ribby' title="Replace values with accumulator (map)"><code>++rib:by</code></a>
520+<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#ribby' title="Transform + product (map)"><code>++rib:by</code></a>
510<a class="tooltip" href='/docs/hoon/reference/stdlib/4c/#rigre' title="Wrap tape in / (tank)"><code>++rig:re</code></a>
521<a class="tooltip" href='/docs/hoon/reference/stdlib/4c/#rigre' title="Wrap tape in / (tank)"><code>++rig:re</code></a>
511<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#rip' title="Disassemble"><code>++rip</code></a>
522<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#rip' title="Disassemble"><code>++rip</code></a>
512<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#rnat' title="(Undocumented)"><code>++rn:at</code></a>
523<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#rnat' title="(Undocumented)"><code>++rn:at</code></a>
@@ -567,6 +578,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
567<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#ser' title="Parse ] (ser)"><code>++ser</code></a>
578<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#ser' title="Parse ] (ser)"><code>++ser</code></a>
568<a class="tooltip" href='/docs/hoon/reference/stdlib/2o/#set' title="Mold generator (set)"><code>++set</code></a>
579<a class="tooltip" href='/docs/hoon/reference/stdlib/2o/#set' title="Mold generator (set)"><code>++set</code></a>
569<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#sevab' title="Parse nonzero base 32 digit"><code>++sev:ab</code></a>
580<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#sevab' title="Parse nonzero base 32 digit"><code>++sev:ab</code></a>
581+<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#sew' title="Stitch one atom into another"><code>++sew</code></a>
570<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#sewab' title="Parse nonzero base 64 digit"><code>++sew:ab</code></a>
582<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#sewab' title="Parse nonzero base 64 digit"><code>++sew:ab</code></a>
571<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#sexab' title="Parse nonzero hexadecimal digit"><code>++sex:ab</code></a>
583<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#sexab' title="Parse nonzero hexadecimal digit"><code>++sex:ab</code></a>
572<a class="tooltip" href='/docs/hoon/reference/stdlib/4e/#sfix' title="Discard second rule"><code>++sfix</code></a>
584<a class="tooltip" href='/docs/hoon/reference/stdlib/4e/#sfix' title="Discard second rule"><code>++sfix</code></a>
@@ -610,14 +622,14 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
610<a class="tooltip" href='/docs/hoon/reference/stdlib/4m/#slav' title="Demand: parse cord with input aura"><code>++slav</code></a>
622<a class="tooltip" href='/docs/hoon/reference/stdlib/4m/#slav' title="Demand: parse cord with input aura"><code>++slav</code></a>
611<a class="tooltip" href='/docs/hoon/reference/stdlib/4m/#slaw' title="Parse cord to input aura"><code>++slaw</code></a>
623<a class="tooltip" href='/docs/hoon/reference/stdlib/4m/#slaw' title="Parse cord to input aura"><code>++slaw</code></a>
612<a class="tooltip" href='/docs/hoon/reference/stdlib/4m/#slay' title="Parse cord to coin"><code>++slay</code></a>
624<a class="tooltip" href='/docs/hoon/reference/stdlib/4m/#slay' title="Parse cord to coin"><code>++slay</code></a>
613−<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#slog' title="Deify printf"><code>++slog</code></a>
625+<a class="tooltip" href='/docs/hoon/reference/stdlib/5c/#slog' title="Deify printf"><code>++slog</code></a>
614<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#slug' title="Use gate to parse delimited list"><code>++slug</code></a>
626<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#slug' title="Use gate to parse delimited list"><code>++slug</code></a>
615<a class="tooltip" href='/docs/hoon/reference/stdlib/4m/#smyt' title="Render path as tank"><code>++smyt</code></a>
627<a class="tooltip" href='/docs/hoon/reference/stdlib/4m/#smyt' title="Render path as tank"><code>++smyt</code></a>
616<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#snag' title="Produce element at specific index (list)"><code>++snag</code></a>
628<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#snag' title="Produce element at specific index (list)"><code>++snag</code></a>
617<a class="tooltip" href='/docs/hoon/reference/stdlib/2m/#snagnl' title="Produce element from list at specific nullterminated noun"><code>++snag:nl</code></a>
629<a class="tooltip" href='/docs/hoon/reference/stdlib/2m/#snagnl' title="Produce element from list at specific nullterminated noun"><code>++snag:nl</code></a>
630+<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#snip' title="Drop tail off list"><code>++snip</code></a>
618<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#snoc' title="Append noun to list"><code>++snoc</code></a>
631<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#snoc' title="Append noun to list"><code>++snoc</code></a>
619<a class="tooltip" href='/docs/hoon/reference/stdlib/4l/#so' title="Coin parser engine"><code>++so</code></a>
632<a class="tooltip" href='/docs/hoon/reference/stdlib/4l/#so' title="Coin parser engine"><code>++so</code></a>
620−<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#soft' title="Maybe remold"><code>++soft</code></a>
621<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#some' title="Wrap value in unit"><code>++some</code></a>
633<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#some' title="Wrap value in unit"><code>++some</code></a>
622<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#soq' title="Parse ' (soq)"><code>++soq</code></a>
634<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#soq' title="Parse ' (soq)"><code>++soq</code></a>
623<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#sort' title="Quicksort (list)"><code>++sort</code></a>
635<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#sort' title="Quicksort (list)"><code>++sort</code></a>
@@ -643,9 +655,11 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
643<a class="tooltip" href='/docs/hoon/reference/stdlib/4m/#stab' title="Parse cord to path"><code>++stab</code></a>
655<a class="tooltip" href='/docs/hoon/reference/stdlib/4m/#stab' title="Parse cord to path"><code>++stab</code></a>
644<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#stag' title="Add label"><code>++stag</code></a>
656<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#stag' title="Add label"><code>++stag</code></a>
645<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#star' title="Produce list of matches"><code>++star</code></a>
657<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#star' title="Produce list of matches"><code>++star</code></a>
658+<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#step' title="Atom size or offset, in bloqs"><code>++step</code></a>
646<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#stet' title="Add faces to rangeparser pairs in list"><code>++stet</code></a>
659<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#stet' title="Add faces to rangeparser pairs in list"><code>++stet</code></a>
647<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#stew' title="Switch by first"><code>++stew</code></a>
660<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#stew' title="Switch by first"><code>++stew</code></a>
648<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#stir' title="Parse repeatedly"><code>++stir</code></a>
661<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#stir' title="Parse repeatedly"><code>++stir</code></a>
662+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#stud' title="Standard name"><code>+$stud</code></a>
649<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#stun' title="Parse several times"><code>++stun</code></a>
663<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#stun' title="Parse several times"><code>++stun</code></a>
650<a class="tooltip" href='/docs/hoon/reference/stdlib/1a/#sub' title="Subtract"><code>++sub</code></a>
664<a class="tooltip" href='/docs/hoon/reference/stdlib/1a/#sub' title="Subtract"><code>++sub</code></a>
651<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#subff' title="Subtract from IEEE float"><code>++sub:ff</code></a>
665<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#subff' title="Subtract from IEEE float"><code>++sub:ff</code></a>
@@ -654,6 +668,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
654<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#subrh' title="Subtract from halfprecision float"><code>++sub:rh</code></a>
668<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#subrh' title="Subtract from halfprecision float"><code>++sub:rh</code></a>
655<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#subrs' title="Subtract from singleprecision float"><code>++sub:rs</code></a>
669<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#subrs' title="Subtract from singleprecision float"><code>++sub:rs</code></a>
656<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#subrq' title="Subtract from quadprecision float"><code>++sub:rq</code></a>
670<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#subrq' title="Subtract from quadprecision float"><code>++sub:rq</code></a>
671+<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#succ' title="Successor"><code>++succ</code></a>
657<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#sumfe' title="Sum two numbers in modular field"><code>++sum:fe</code></a>
672<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#sumfe' title="Sum two numbers in modular field"><code>++sum:fe</code></a>
658<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#sumfo' title="Modular sum"><code>++sum:fo</code></a>
673<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#sumfo' title="Modular sum"><code>++sum:fo</code></a>
659<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#sumsi' title="Addition (signed integer)"><code>++sum:si</code></a>
674<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#sumsi' title="Addition (signed integer)"><code>++sum:si</code></a>
@@ -677,18 +692,18 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
677<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#tail' title="Get tail of cell"><code>++tail</code></a>
692<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#tail' title="Get tail of cell"><code>++tail</code></a>
678<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#tapto' title="Queue to list"><code>++tap:to</code></a>
693<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#tapto' title="Queue to list"><code>++tap:to</code></a>
679<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#tar' title="Parse * (tar)"><code>++tar</code></a>
694<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#tar' title="Parse * (tar)"><code>++tar</code></a>
680−<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#tang' title="Generic print structure"><code>++tang</code></a>
695+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#tang' title="Bottom-first error"><code>+$tang</code></a>
681−<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#tank' title="Prettyprinting structure"><code>++tank</code></a>
696+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#tank' title="Formatted print tree"><code>+$tank</code></a>
682<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#tapby' title="Listify pairs"><code>++tap:by</code></a>
697<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#tapby' title="Listify pairs"><code>++tap:by</code></a>
683<a class="tooltip" href='/docs/hoon/reference/stdlib/2h/#tapin' title="Flatten set into list"><code>++tap:in</code></a>
698<a class="tooltip" href='/docs/hoon/reference/stdlib/2h/#tapin' title="Flatten set into list"><code>++tap:in</code></a>
684−<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#tape' title="List of characters"><code>++tape</code></a>
699+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#tape' title="List of characters"><code>+$tape</code></a>
685−<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#tarp' title="Parsed time"><code>++tarp</code></a>
700+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#tarp' title="Parsed time"><code>+$tarp</code></a>
686<a class="tooltip" href='/docs/hoon/reference/stdlib/4l/#tashso' title="Parse signed dime"><code>++tash:so</code></a>
701<a class="tooltip" href='/docs/hoon/reference/stdlib/4l/#tashso' title="Parse signed dime"><code>++tash:so</code></a>
687<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#tec' title="Parse ` (tec)"><code>++tec</code></a>
702<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#tec' title="Parse ` (tec)"><code>++tec</code></a>
688<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#tedab' title="Parse decimal number with <= 3 digits"><code>++ted:ab</code></a>
703<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#tedab' title="Parse decimal number with <= 3 digits"><code>++ted:ab</code></a>
689<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#teff' title="UTF8 length"><code>++teff</code></a>
704<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#teff' title="UTF8 length"><code>++teff</code></a>
690<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#teilob' title="Reverse Feistellike cipher"><code>++teil:ob</code></a>
705<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#teilob' title="Reverse Feistellike cipher"><code>++teil:ob</code></a>
691−<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#term' title="Hoon constant"><code>++term</code></a>
706+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#term' title="Hoon constant"><code>+$term</code></a>
692<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#test' title="Test for equality"><code>++test</code></a>
707<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#test' title="Test for equality"><code>++test</code></a>
693<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#tidab' title="Parse 3 decimal digits"><code>++tid:ab</code></a>
708<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#tidab' title="Parse 3 decimal digits"><code>++tid:ab</code></a>
694<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#tiki' title="(Undocumented)"><code>++tiki</code></a>
709<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#tiki' title="(Undocumented)"><code>++tiki</code></a>
@@ -711,6 +726,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
711<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#topto' title="Produce head of queue"><code>++top:to</code></a>
726<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#topto' title="Produce head of queue"><code>++top:to</code></a>
712<a class="tooltip" href='/docs/hoon/reference/stdlib/4a/#tospo' title="Fetch prefix"><code>++tos:po</code></a>
727<a class="tooltip" href='/docs/hoon/reference/stdlib/4a/#tospo' title="Fetch prefix"><code>++tos:po</code></a>
713<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#tosrh' title="Convert halfprecision float to singleprecision float"><code>++tos:rh</code></a>
728<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#tosrh' title="Convert halfprecision float to singleprecision float"><code>++tos:rh</code></a>
729+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#tour' title="UTF-32 clusters"><code>+$tour</code></a>
714<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#trap' title="Core with one arm $"><code>++trap</code></a>
730<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#trap' title="Core with one arm $"><code>++trap</code></a>
715<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#tree' title="Mold generator (tree)"><code>++tree</code></a>
731<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#tree' title="Mold generator (tree)"><code>++tree</code></a>
716<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#trel' title="Mold generator (tuple of three types)"><code>++trel</code></a>
732<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#trel' title="Mold generator (tuple of three types)"><code>++trel</code></a>
@@ -731,10 +747,11 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
731### u
747### u
732
748
733<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#un' title="Reversible scrambling"><code>++un</code></a>
749<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#un' title="Reversible scrambling"><code>++un</code></a>
734−<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#uniby' title="Union (map between keys of two lists)"><code>++uni:by</code></a>
750+<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#uniby' title="Union, merge (map)"><code>++uni:by</code></a>
735<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#unifl' title="Change representation to odd"><code>++uni:fl</code></a>
751<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#unifl' title="Change representation to odd"><code>++uni:fl</code></a>
736<a class="tooltip" href='/docs/hoon/reference/stdlib/2h/#uniin' title="Union (sets)"><code>++uni:in</code></a>
752<a class="tooltip" href='/docs/hoon/reference/stdlib/2h/#uniin' title="Union (sets)"><code>++uni:in</code></a>
737<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#unit' title="Mold generator (maybe)"><code>++unit</code></a>
753<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#unit' title="Mold generator (maybe)"><code>++unit</code></a>
754+<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#unoby' title="General union (map)"><code>++uno:by</code></a>
738<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#urnby' title="Turn (with key) (map)"><code>++urn:by</code></a>
755<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#urnby' title="Turn (with key) (map)"><code>++urn:by</code></a>
739<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#ursab' title="Parse span characters"><code>++urs:ab</code></a>
756<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#ursab' title="Parse span characters"><code>++urs:ab</code></a>
740<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#urtab' title="Parse non_ span"><code>++urt:ab</code></a>
757<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#urtab' title="Parse non_ span"><code>++urt:ab</code></a>
@@ -749,7 +766,6 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
749<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#vise' title="Convert during reboot"><code>++vise</code></a>
766<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#vise' title="Convert during reboot"><code>++vise</code></a>
750<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#vit' title="Parse base 64 digit"><code>++vit</code></a>
767<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#vit' title="Parse base 64 digit"><code>++vit</code></a>
751<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#vizag' title="Parse base 32 digit with dot separators"><code>++viz:ag</code></a>
768<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#vizag' title="Parse base 32 digit with dot separators"><code>++viz:ag</code></a>
752−<a class="tooltip" href='/docs/hoon/reference/stdlib/2f/#vor' title="Vertical order"><code>++vor</code></a>
753<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#voyab' title="Parse bas, soq, or bix"><code>++voy:ab</code></a>
769<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#voyab' title="Parse bas, soq, or bix"><code>++voy:ab</code></a>
754<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#vul' title="Comments to null"><code>++vul</code></a>
770<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#vul' title="Comments to null"><code>++vul</code></a>
755<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#vumag' title="Parse base 32 string"><code>++vum:ag</code></a>
771<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#vumag' title="Parse base 32 string"><code>++vum:ag</code></a>
@@ -758,8 +774,8 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
758
774
759<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#wne' title="Render base 64 digit"><code>++w:ne</code></a>
775<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#wne' title="Render base 64 digit"><code>++w:ne</code></a>
760<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#wack' title="Coin format encode"><code>++wack</code></a>
776<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#wack' title="Coin format encode"><code>++wack</code></a>
761−<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#wain' title="List of cords"><code>++wain</code></a>
777+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#wain' title="List of cords"><code>+$wain</code></a>
762−<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#wall' title="List of list of characters"><code>++wall</code></a>
778+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#wall' title="List of list of characters"><code>+$wall</code></a>
763<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#weld' title="Concatenate two lists"><code>++weld</code></a>
779<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#weld' title="Concatenate two lists"><code>++weld</code></a>
764<a class="tooltip" href='/docs/hoon/reference/stdlib/2m/#weldnl' title="Concatenate nullterminated nouns"><code>++weld:nl</code></a>
780<a class="tooltip" href='/docs/hoon/reference/stdlib/2m/#weldnl' title="Concatenate nullterminated nouns"><code>++weld:nl</code></a>
765<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#welp' title="Perfect concatenate (lists)"><code>++welp</code></a>
781<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#welp' title="Perfect concatenate (lists)"><code>++welp</code></a>
@@ -844,6 +860,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
844<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#pair' title="Mold of pair of types"><code>++pair</code></a>
860<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#pair' title="Mold of pair of types"><code>++pair</code></a>
845<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#pole' title="Mold generator of faceless list"><code>++pole</code></a>
861<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#pole' title="Mold generator of faceless list"><code>++pole</code></a>
846<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#quip' title="Mold generator (tuple of list and type)"><code>++quip</code></a>
862<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#quip' title="Mold generator (tuple of list and type)"><code>++quip</code></a>
863+<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#step' title="Atom size or offset, in bloqs"><code>++step</code></a>
847<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#trap' title="Core with one arm $"><code>++trap</code></a>
864<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#trap' title="Core with one arm $"><code>++trap</code></a>
848<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#tree' title="Mold generator (tree)"><code>++tree</code></a>
865<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#tree' title="Mold generator (tree)"><code>++tree</code></a>
849<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#trel' title="Mold generator (tuple of three types)"><code>++trel</code></a>
866<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#trel' title="Mold generator (tuple of three types)"><code>++trel</code></a>
@@ -855,9 +872,12 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
855<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#bind' title="Nonunit function to unit, producing unit"><code>++bind</code></a>
872<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#bind' title="Nonunit function to unit, producing unit"><code>++bind</code></a>
856<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#bond' title="Replace null"><code>++bond</code></a>
873<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#bond' title="Replace null"><code>++bond</code></a>
857<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#both' title="Group unit values into pair"><code>++both</code></a>
874<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#both' title="Group unit values into pair"><code>++both</code></a>
858−<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#clap' title="Apply function to two units"><code>++clap</code></a>
875+<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#clap' title="Combine two units with function"><code>++clap</code></a>
876+<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#clef' title="Compose two units with function"><code>++clef</code></a>
859<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#drop' title="Unit to list"><code>++drop</code></a>
877<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#drop' title="Unit to list"><code>++drop</code></a>
860<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#fall' title="Give unit a default value"><code>++fall</code></a>
878<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#fall' title="Give unit a default value"><code>++fall</code></a>
879+<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#flit' title="Make filter"><code>++flit</code></a>
880+<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#hunt' title="Select between two units by a rule"><code>++hunt</code></a>
861<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#lift' title="Curried bind"><code>++lift</code></a>
881<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#lift' title="Curried bind"><code>++lift</code></a>
862<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#mate' title="Choose"><code>++mate</code></a>
882<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#mate' title="Choose"><code>++mate</code></a>
863<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#need' title="Unwrap unit"><code>++need</code></a>
883<a class="tooltip" href='/docs/hoon/reference/stdlib/2a/#need' title="Unwrap unit"><code>++need</code></a>
@@ -865,6 +885,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
865
885
866### 2b: list logic
886### 2b: list logic
867
887
888+<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#bake' title="Convert wet gate to dry gate"><code>++bake</code></a>
868<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#fand' title="All indices in list"><code>++fand</code></a>
889<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#fand' title="All indices in list"><code>++fand</code></a>
869<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#find' title="First index in list"><code>++find</code></a>
890<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#find' title="First index in list"><code>++find</code></a>
870<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#flop' title="Reverse list"><code>++flop</code></a>
891<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#flop' title="Reverse list"><code>++flop</code></a>
@@ -886,6 +907,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
886<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#skip' title="Produce list of elements failing boolean gate"><code>++skip</code></a>
907<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#skip' title="Produce list of elements failing boolean gate"><code>++skip</code></a>
887<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#slag' title="Produce all elements from index in list"><code>++slag</code></a>
908<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#slag' title="Produce all elements from index in list"><code>++slag</code></a>
888<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#snag' title="Produce element at specific index (list)"><code>++snag</code></a>
909<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#snag' title="Produce element at specific index (list)"><code>++snag</code></a>
910+<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#snip' title="Drop tail off list"><code>++snip</code></a>
889<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#snoc' title="Append noun to list"><code>++snoc</code></a>
911<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#snoc' title="Append noun to list"><code>++snoc</code></a>
890<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#sort' title="Quicksort (list)"><code>++sort</code></a>
912<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#sort' title="Quicksort (list)"><code>++sort</code></a>
891<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#spin' title="Gate to list (with state)"><code>++spin</code></a>
913<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#spin' title="Gate to list (with state)"><code>++spin</code></a>
@@ -921,6 +943,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
921<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#rip' title="Disassemble"><code>++rip</code></a>
943<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#rip' title="Disassemble"><code>++rip</code></a>
922<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#rev' title="Reverse"><code>++rev</code></a>
944<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#rev' title="Reverse"><code>++rev</code></a>
923<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#rsh' title="Rightshift"><code>++rsh</code></a>
945<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#rsh' title="Rightshift"><code>++rsh</code></a>
946+<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#sew' title="Stitch one atom into another"><code>++sew</code></a>
924<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#swp' title="Reverse block order"><code>++swp</code></a>
947<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#swp' title="Reverse block order"><code>++swp</code></a>
925<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#xeb' title="Binary logarithm"><code>++xeb</code></a>
948<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#xeb' title="Binary logarithm"><code>++xeb</code></a>
926
949
@@ -933,19 +956,15 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
933
956
934### 2e: insecure hashing
957### 2e: insecure hashing
935
958
936−<a class="tooltip" href='/docs/hoon/reference/stdlib/2e/#fnv' title="FNV scrambler"><code>++fnv</code></a>
937<a class="tooltip" href='/docs/hoon/reference/stdlib/2e/#mug' title="FNV1a scrambler"><code>++mug</code></a>
959<a class="tooltip" href='/docs/hoon/reference/stdlib/2e/#mug' title="FNV1a scrambler"><code>++mug</code></a>
938<a class="tooltip" href='/docs/hoon/reference/stdlib/2e/#muk' title="Standard MurmurHash3"><code>++muk</code></a>
960<a class="tooltip" href='/docs/hoon/reference/stdlib/2e/#muk' title="Standard MurmurHash3"><code>++muk</code></a>
939−<a class="tooltip" href='/docs/hoon/reference/stdlib/2e/#mum' title="31bit MurmurHash3 scrambler"><code>++mum</code></a>
940
961
941### 2f: noun ordering
962### 2f: noun ordering
942
963
943<a class="tooltip" href='/docs/hoon/reference/stdlib/2f/#aor' title="Alphabetical order"><code>++aor</code></a>
964<a class="tooltip" href='/docs/hoon/reference/stdlib/2f/#aor' title="Alphabetical order"><code>++aor</code></a>
944−<a class="tooltip" href='/docs/hoon/reference/stdlib/2f/#dor' title="Numeric order"><code>++dor</code></a>
965+<a class="tooltip" href='/docs/hoon/reference/stdlib/2f/#dor' title="Depth order"><code>++dor</code></a>
945−<a class="tooltip" href='/docs/hoon/reference/stdlib/2f/#gor' title="Hash order"><code>++gor</code></a>
966+<a class="tooltip" href='/docs/hoon/reference/stdlib/2f/#gor' title="Mug order"><code>++gor</code></a>
946−<a class="tooltip" href='/docs/hoon/reference/stdlib/2f/#hor' title="Horizontal hash order"><code>++hor</code></a>
967+<a class="tooltip" href='/docs/hoon/reference/stdlib/2f/#mor' title="(more) mug order"><code>++mor</code></a>
947−<a class="tooltip" href='/docs/hoon/reference/stdlib/2f/#lor' title="Leg order"><code>++lor</code></a>
948−<a class="tooltip" href='/docs/hoon/reference/stdlib/2f/#vor' title="Vertical order"><code>++vor</code></a>
949
968
950### 2g: unsigned powers
969### 2g: unsigned powers
951
970
@@ -980,20 +999,24 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
980<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#aptby' title="Check correctness (map)"><code>++apt:by</code></a>
999<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#aptby' title="Check correctness (map)"><code>++apt:by</code></a>
981<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#bifby' title="Bifurcate map"><code>++bif:by</code></a>
1000<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#bifby' title="Bifurcate map"><code>++bif:by</code></a>
982<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#delby' title="Delete (map)"><code>++del:by</code></a>
1001<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#delby' title="Delete (map)"><code>++del:by</code></a>
1002+<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#difby' title="Difference between maps"><code>++dif:by</code></a>
983<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#digby' title="Address of key (map)"><code>++dig:by</code></a>
1003<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#digby' title="Address of key (map)"><code>++dig:by</code></a>
984<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#gasby' title="Concatenate (map)"><code>++gas:by</code></a>
1004<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#gasby' title="Concatenate (map)"><code>++gas:by</code></a>
985<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#getby' title="Grab unit value"><code>++get:by</code></a>
1005<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#getby' title="Grab unit value"><code>++get:by</code></a>
986<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#gotby' title="Assert for value (map)"><code>++got:by</code></a>
1006<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#gotby' title="Assert for value (map)"><code>++got:by</code></a>
987<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#hasby' title="Key existence check (map)"><code>++has:by</code></a>
1007<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#hasby' title="Key existence check (map)"><code>++has:by</code></a>
988<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#intby' title="Intersection (map)"><code>++int:by</code></a>
1008<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#intby' title="Intersection (map)"><code>++int:by</code></a>
989−<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#marby' title="Assert and add (map)"><code>++mar:by</code></a>
1009+<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#jabby' title="Transform value (map)"><code>++jab:by</code></a>
1010+<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#keyby' title="Set of keys"><code>++key:by</code></a>
1011+<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#marby' title="Add with validation (map)"><code>++mar:by</code></a>
990<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#putby' title="Add keyvalue pair (map)"><code>++put:by</code></a>
1012<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#putby' title="Add keyvalue pair (map)"><code>++put:by</code></a>
991−<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#repby' title="Replace by product (map)"><code>++rep:by</code></a>
1013+<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#repby' title="Reduce to product (map)"><code>++rep:by</code></a>
992−<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#ribby' title="Replace values with accumulator (map)"><code>++rib:by</code></a>
1014+<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#ribby' title="Transform + product (map)"><code>++rib:by</code></a>
993<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#runby' title="Transform values (map)"><code>++run:by</code></a>
1015<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#runby' title="Transform values (map)"><code>++run:by</code></a>
994<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#rutby' title="Transform nodes (map)"><code>++rut:by</code></a>
1016<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#rutby' title="Transform nodes (map)"><code>++rut:by</code></a>
995<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#tapby' title="Listify pairs"><code>++tap:by</code></a>
1017<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#tapby' title="Listify pairs"><code>++tap:by</code></a>
996−<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#uniby' title="Union (map between keys of two lists)"><code>++uni:by</code></a>
1018+<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#uniby' title="Union, merge (map)"><code>++uni:by</code></a>
1019+<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#unoby' title="General union (map)"><code>++uno:by</code></a>
997<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#urnby' title="Turn (with key) (map)"><code>++urn:by</code></a>
1020<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#urnby' title="Turn (with key) (map)"><code>++urn:by</code></a>
998<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#wytby' title="Produce depth of tree map"><code>++wyt:by</code></a>
1021<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#wytby' title="Produce depth of tree map"><code>++wyt:by</code></a>
999
1022
@@ -1005,6 +1028,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
1005
1028
1006<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#ju' title="Jug operations"><code>++ju</code></a>
1029<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#ju' title="Jug operations"><code>++ju</code></a>
1007<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#delju' title="Delete (jug)"><code>++del:ju</code></a>
1030<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#delju' title="Delete (jug)"><code>++del:ju</code></a>
1031+<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#gasju' title="Concatenate (jug)"><code>++gas:ju</code></a>
1008<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#getju' title="Retrieve set"><code>++get:ju</code></a>
1032<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#getju' title="Retrieve set"><code>++get:ju</code></a>
1009<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#hasju' title="Check contents (jug)"><code>++has:ju</code></a>
1033<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#hasju' title="Check contents (jug)"><code>++has:ju</code></a>
1010<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#putju' title="Add keyset pair (jar)"><code>++put:ju</code></a>
1034<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#putju' title="Add keyset pair (jar)"><code>++put:ju</code></a>
@@ -1012,6 +1036,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
1012### 2k: queue logic
1036### 2k: queue logic
1013
1037
1014<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#to' title="Queue operations"><code>++to</code></a>
1038<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#to' title="Queue operations"><code>++to</code></a>
1039+<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#aptto' title="Check correctness of queue"><code>++apt:to</code></a>
1015<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#balto' title="Balance queue"><code>++bal:to</code></a>
1040<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#balto' title="Balance queue"><code>++bal:to</code></a>
1016<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#depto' title="Maximum depth (queue)"><code>++dep:to</code></a>
1041<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#depto' title="Maximum depth (queue)"><code>++dep:to</code></a>
1017<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#gasto' title="Push list into queue"><code>++gas:to</code></a>
1042<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#gasto' title="Push list into queue"><code>++gas:to</code></a>
@@ -1043,18 +1068,19 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
1043
1068
1044### 2n: functional hacks
1069### 2n: functional hacks
1045
1070
1071+<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#aftr' title="Pair after"><code>++aftr</code></a>
1046<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#cork' title="Compose forward"><code>++cork</code></a>
1072<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#cork' title="Compose forward"><code>++cork</code></a>
1047<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#corl' title="Compose backward"><code>++corl</code></a>
1073<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#corl' title="Compose backward"><code>++corl</code></a>
1048<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#curr' title="Rightcurry a gate"><code>++curr</code></a>
1074<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#curr' title="Rightcurry a gate"><code>++curr</code></a>
1049<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#cury' title="Curry left a gate"><code>++cury</code></a>
1075<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#cury' title="Curry left a gate"><code>++cury</code></a>
1050−<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#hard' title="Force remold"><code>++hard</code></a>
1076+<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#fore' title="Pair before"><code>++fore</code></a>
1051<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#head' title="Get head of cell"><code>++head</code></a>
1077<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#head' title="Get head of cell"><code>++head</code></a>
1052−<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#mean' title="Crash and printf"><code>++mean</code></a>
1053<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#same' title="Identity (produces same value)"><code>++same</code></a>
1078<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#same' title="Identity (produces same value)"><code>++same</code></a>
1054−<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#slog' title="Deify printf"><code>++slog</code></a>
1079+<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#succ' title="Successor"><code>++succ</code></a>
1055−<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#soft' title="Maybe remold"><code>++soft</code></a>
1056<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#tail' title="Get tail of cell"><code>++tail</code></a>
1080<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#tail' title="Get tail of cell"><code>++tail</code></a>
1057<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#test' title="Test for equality"><code>++test</code></a>
1081<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#test' title="Test for equality"><code>++test</code></a>
1082+<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#lead' title="Put head"><code>++lead</code></a>
1083+<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#late' title="Put tail"><code>++late</code></a>
1058
1084
1059### 2o: normalizing containers
1085### 2o: normalizing containers
1060
1086
@@ -1073,17 +1099,25 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
1073
1099
1074### 2q: molds and mold builders
1100### 2q: molds and mold builders
1075
1101
1076−<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#char' title="Character"><code>++char</code></a>
1102+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#axis' title="Tree address"><code>+$axis</code></a>
1077−<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#cord' title="UTF8 text"><code>++cord</code></a>
1103+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#bean' title="Boolean"><code>+$bean</code></a>
1078−<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#date' title="Point in time"><code>++date</code></a>
1104+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#char' title="Character"><code>+$char</code></a>
1079−<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#knot' title="Atom type of ASCII characters"><code>++knot</code></a>
1105+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#cord' title="UTF8 text"><code>+$cord</code></a>
1080−<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#tang' title="Generic print structure"><code>++tang</code></a>
1106+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#byts' title="bytes, LSB first"><code>+$byts</code></a>
1081−<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#tank' title="Prettyprinting structure"><code>++tank</code></a>
1107+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#date' title="Parsed date"><code>+$date</code></a>
1082−<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#tape' title="List of characters"><code>++tape</code></a>
1108+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#flag' title="Boolean (flag)"><code>+$flag</code></a>
1083−<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#tarp' title="Parsed time"><code>++tarp</code></a>
1109+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#knot' title="Atom type of ASCII characters"><code>+$knot</code></a>
1084−<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#term' title="Hoon constant"><code>++term</code></a>
1110+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#noun' title="Any noun"><code>+$noun</code></a>
1085−<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#wain' title="List of cords"><code>++wain</code></a>
1111+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#path' title="Like unix path"><code>+$path</code></a>
1086−<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#wall' title="List of list of characters"><code>++wall</code></a>
1112+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#stud' title="Standard name"><code>+$stud</code></a>
1113+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#tang' title="Bottom-first error"><code>+$tang</code></a>
1114+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#tank' title="Formatted print tree"><code>+$tank</code></a>
1115+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#tape' title="List of characters"><code>+$tape</code></a>
1116+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#tour' title="UTF-32 clusters"><code>+$tour</code></a>
1117+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#tarp' title="Parsed time"><code>+$tarp</code></a>
1118+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#term' title="Hoon constant"><code>+$term</code></a>
1119+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#wain' title="List of cords"><code>+$wain</code></a>
1120+<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#wall' title="List of list of characters"><code>+$wall</code></a>
1087
1121
1088### 3a: modular and signed ints
1122### 3a: modular and signed ints
1089
1123
@@ -1364,7 +1398,6 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
1364<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#hair' title="Parsing line and column"><code>++hair</code></a>
1398<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#hair' title="Parsing line and column"><code>++hair</code></a>
1365<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#like' title="Generic edge"><code>++like</code></a>
1399<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#like' title="Generic edge"><code>++like</code></a>
1366<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#nail' title="Location, remainder of parsed text"><code>++nail</code></a>
1400<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#nail' title="Location, remainder of parsed text"><code>++nail</code></a>
1367−<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#path' title="Filesystem path"><code>++path</code></a>
1368<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#pint' title="Parsing range"><code>++pint</code></a>
1401<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#pint' title="Parsing range"><code>++pint</code></a>
1369<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#rule' title="Parsing rule (match this with _)"><code>++rule</code></a>
1402<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#rule' title="Parsing rule (match this with _)"><code>++rule</code></a>
1370<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#spot' title="Stack trace line"><code>++spot</code></a>
1403<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#spot' title="Stack trace line"><code>++spot</code></a>
@@ -1668,9 +1701,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
1668
1701
1669<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#abel' title="Compiler alias"><code>++abel</code></a>
1702<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#abel' title="Compiler alias"><code>++abel</code></a>
1670<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#aura' title="'Type' of atom"><code>++aura</code></a>
1703<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#aura' title="'Type' of atom"><code>++aura</code></a>
1671−<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#axis' title="Nock axis"><code>++axis</code></a>
1672<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#base' title="Base type"><code>++base</code></a>
1704<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#base' title="Base type"><code>++base</code></a>
1673−<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#bean' title="Boolean"><code>++bean</code></a>
1674<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#beer' title="Tape builder"><code>++beer</code></a>
1705<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#beer' title="Tape builder"><code>++beer</code></a>
1675<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#beet' title="XML interpolation cases"><code>++beet</code></a>
1706<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#beet' title="XML interpolation cases"><code>++beet</code></a>
1676<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#chum' title="Jet hint information"><code>++chum</code></a>
1707<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#chum' title="Jet hint information"><code>++chum</code></a>
@@ -1680,7 +1711,6 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
1680<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#line' title="(Undocumented)"><code>++line</code></a>
1711<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#line' title="(Undocumented)"><code>++line</code></a>
1681<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#metl' title="(Undocumented)"><code>++metl</code></a>
1712<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#metl' title="(Undocumented)"><code>++metl</code></a>
1682<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#nock' title="Virtual machine (see Nock)"><code>++nock</code></a>
1713<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#nock' title="Virtual machine (see Nock)"><code>++nock</code></a>
1683−<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#noun' title="(Undocumented)"><code>++noun</code></a>
1684<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#null' title="(Undocumented)"><code>++null</code></a>
1714<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#null' title="(Undocumented)"><code>++null</code></a>
1685<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#port' title="(Undocumented)"><code>++port</code></a>
1715<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#port' title="(Undocumented)"><code>++port</code></a>
1686<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#span' title="ASCII atom"><code>++span</code></a>
1716<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#span' title="ASCII atom"><code>++span</code></a>
@@ -1706,7 +1736,9 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
1706
1736
1707### 5c: compiler backend and prettyprinter
1737### 5c: compiler backend and prettyprinter
1708
1738
1709−<a class="tooltip" href='/docs/hoon/reference/stdlib/5c/'>_(To be documented)_</a>
1739+<a class="tooltip" href='/docs/hoon/reference/stdlib/5c/'>_(To be fully documented)_</a>
1740+<a class="tooltip" href='/docs/hoon/reference/stdlib/5c/#slog' title="Deify printf"><code>++slog</code></a>
1741+<a class="tooltip" href='/docs/hoon/reference/stdlib/5c/#mean' title="Crash and printf"><code>++mean</code></a>
1710
1742
1711### 5d: parser
1743### 5d: parser
1712
1744
content/grants/analytics-script.md+2−1
@@ -11,7 +11,8 @@ image = ""
11description = "Write a generator that exports chat data into a CSV."
11description = "Write a generator that exports chat data into a CSV."
12reward = 1
12reward = 1
13assignee = "~hosted-fornet"
13assignee = "~hosted-fornet"
14−completed = false
14+completed = true
15+canceled = false
15work_request_link = "https://airtable.com/shr4qt9t9kz7RaOIa?prefill_Grant+ID=B0015&prefill_Grant+Name=Analytics%20Script"
16work_request_link = "https://airtable.com/shr4qt9t9kz7RaOIa?prefill_Grant+ID=B0015&prefill_Grant+Name=Analytics%20Script"
16+++
17+++
17
18
content/grants/art-by-urbit.md+1
@@ -13,6 +13,7 @@ reward = 1
13assignee = "nartes-fasrum"
13assignee = "nartes-fasrum"
14id = "636838408"
14id = "636838408"
15completed = false
15completed = false
16+canceled = false
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/authenticate-with-urbit.mdnew file+36
@@ -0,0 +1,36 @@
1++++
2+title = "Authenticate with Urbit Gall App"
3+date = "2021-09-16"
4+[taxonomies]
5+grant_type = ["Proposal"]
6+grant_category = ["App Dev: Other"]
7+[extra]
8+image = ""
9+description = "Exernal service/websites can verify that a user is who they say they are"
10+reward = 1
11+assignee = "dcSpark"
12+grant_id = "P0081"
13+completed = false
14+canceled = false
15+link = ""
16++++
17+
18+## Authenticate with Urbit Gall App
19+
20+The authenticate with Urbit ID gall app will allow external services/websites to verify that a user is who they say they are via their running ship. In other words, the website will be able to integrate this gall app/exposed endpoints with their existing login process to allow users to "Login With Urbit".
21+
22+These websites need to be able to confirm with 100% certainty that a person owns the Urbit ship they claim to own, or else users can spoof and trick sites into thinking they are someone else. As such the gall app will enable identity verification via a streamlined process and will simply expose web server endpoints for the website back end to plug into (no airlock integration required).
23+
24+We are choosing to implement a gall app instead of using using cryptography and crypto keys explicitly because it narrows down the complexity, skips requiring websites being forced to follow the Ethereum chain, and improves the UX considerably for end users. If we used crypto keys to check for identity, users would be required to have an Ethereum wallet installed in their web browser, ensure it has their software wallet keys or hardware wallet connected with their Urbit ID, and have to go through a multi-step process to sign a message to prove their identity every single time they want to login.
25+
26+Furthermore with naive rollups on the way, this would leave out everyone on the rollups from being able to login using this scheme. This likewise would also be the case for users who jump into the Urbit ecosystem via an Urbit hosting service. As such we ruled out going down said route.
27+
28+Instead we will be using the user’s running ship to authenticate them over the Urbit network itself. This will provide users a simple experience for logging themselves in to standard database-driven websites securely.Expected completion:
29+
30+## Milestones
31+
32+### Milestone 1 - A gall application named %hermes which allows external applications to authenticate user identities
33+
34+Expected Completion: Mid-October 2021
35+
36+Payment: 1 star
content/grants/azimuth-cli.mdnew file+164
@@ -0,0 +1,164 @@
1++++
2+title = "Azimuth CLI"
3+date = "2021-09-20"
4+[taxonomies]
5+grant_type = ["Proposal"]
6+grant_category = ["App Dev: Other"]
7+[extra]
8+image = ""
9+description = "Bridge for the command line"
10+reward = 6
11+assignee = "~lavlyn-litmeg"
12+grant_id = "P0080"
13+completed = false
14+canceled = false
15+link = ""
16++++
17+
18+## Azimuth CLI
19+
20+The azimuth-cli is "Bridge for the command line." It should allow ship owners and operators to do the same things that they can in Bridge but via the command line, and in batch mode. For example, it should be possible to batch-spawn 10 planets from a star, or transfer ownership of several stars or planets with one command.
21+
22+## Background
23+
24+Azimuth is a set of Ethereum smart contracts that handle most things related to Urbit ID. The primary way of interacting with Azimuth, right now, is via Bridge, a dApp. However, hosting providers and people who run stars frequently need to automate their interactions with Azimuth, but there is currently not an easy way to do that.
25+
26+There is the excellent azimuth-js library that makes most bridge functions available as a JavaScript API, but it still requires substantial effort to automate things. Additionally, not all the features available in Bridge are currently accessible via npm package, requiring quite a bit of reverse engineering.
27+
28+Finally, with the upcoming Layer 2 (L2) solution, the need and desire to automate batch operations will likely increase.
29+
30+## Goals
31+
32+1. Implement a CLI that supports the most important Azimuth and Eliptic operations, such as list points, spawn points, set network keys, set proxy addresses, and transfer ownership.
33+2. Improve the current Urbit ID related JS projects, such as azimuth-js, and urbit-key-generation.
34+3. Support the new L2 solution.
35+4. Since most operations will require the private key or master ticket, there needs to be a way to keep them secure.
36+5. Design the CLI in such a way that it is safe to script operations. E.g., there is little risk of spawning too many planets.
37+
38+## Design
39+
40+### Node.JS CLI
41+
42+The CLI will be implemented in Node.js because most libraries that the project relies on are in JavaScript themselves.
43+
44+The CLI will initially support the following commands:
45+
46+- List: list points that an address controls; list child points of a point; list unspawned points
47+- Spawn: spawn a certain amount of child points from a parent. This can be provided as a list of patps or just a spawn count that will select points randomly from the unspawned list.
48+- Network Keys: Set the Arvo network keys
49+- Management Proxy: Set the management proxy of ships
50+- Spawn Proxy: Set the spawn proxy of ships
51+- Transfer: Transfer either to another address or to master tickets.
52+- Accept transfers: Accept incoming transfers on a certain address.
53+- Report: Generate an easy to use and easy to import CSV report of the current directory. E.g., a list of ship names, owner address, spawn cost in ETH and USD, and so on.
54+
55+### Idempotent Commands
56+
57+All commands that modify on-chain state should be able to run idempotently. That is, it should be safe to repeatedly call a command with a certain set of arguments. For example, calling the CLI multiple times to spawn 10 planets, should only spawn 10 planets exactly, even if it fails intermittently. This will make it possible to use the CLI to script and automate actions much more easily.
58+
59+To achieve this, each command should always operate in a working directory. Things like master tickets, network seeds, Ethereum transaction receipts are saved in this directory to ensure that all operations are deterministic once the relevant files have been created. For example, if the CLI is used to set the network keys, the program first generates a random seed (or uses the seed from an existing master ticket) and then saves that seed to the working directory. It then tries to set the network key for one or more points on Elliptic. If the Ethereum transaction fails (e.g., because of too high gas prices) then the command can just be rerun making sure that it eventually succeeds, trying until the on-chain key matches what is saved in the working directory.
60+
61+### Libraries
62+
63+The CLI will make use of several existing Urbit libraries, such as azimuth-js, urbit-ob, and urbit-key- generation. But there is also some code in the current bridge application that is needed, for example, the functions to generate the Arvo key file. Ideally, all code making use of cryptography should live upstream, in an Urbit org owned repository. Hence part of this grant is to make PRs for some of the existing libraries and push relevant code upstream. Of course, talking to the relevant owners and developers first.
64+
65+Some of the functions that the CLI needs can be made into its own library too, conceivably allowing developers to build on the functionality of the CLI for their own projects.
66+
67+### Security and Vetting
68+
69+Once the CLI is completed, it should be vetted by Tlon and then be taken under the Urbit org GitHub account. Many of the CLI operations will have access to the private keys of valuable Urbit address space. Hence the CLI repository is a likely target for someone trying to inject malicious code. The repository being owned by Urbit or Tlon should mitigate some of that.
70+
71+Moreover, the tool should try to integrate with some of the hardware wallets so that the transactions of CLI operations can be signed from an external wallet. Another option would be to load the private keys from a key chain, such as the MacOS key chain.
72+Nonetheless, if someone wants to fully automate operations with the CLI then the private key needs to be provided via command line argument or environment variable. This will have to be made clear via documentation, and users need to be made aware of the dangers.
73+
74+### Ethereum Gas Fees
75+
76+There should be an option to define the maximum gas fees for a command or operation. Or even provide something like a percentage of the 10 day moving average of gas fees. A CLI user can then script an operation and schedule the script to run, say, every hour. Since the operations are idempotent this will be safe to do. The script will then run every hour until the gas prices are low enough or affordable and will then succeed. This will be very helpful when doing larger batch operation, such as spawning several planets and keying them, because the Ethereum gas fees can vary by a factor of 10.
77+
78+### Layer 2
79+
80+The CLI should work with both the current Azimuth contracts and the new Layer 2 solution.
81+
82+### CSV Reports
83+
84+Since this tool will be used by power users, who want to import the data into different systems or keep track of cost, there should also be a CLI command that converts the raw data in a working directory to an easy consumable CSV report. This report should contain a list of p and patp, addresses (ownership, management, etc.), master tickets, Ethereum transaction costs, timestamps, and so on.
85+
86+## About Me (~lavlyn-litmeg)
87+
88+I am the maker of [UrbitHost](https://urbithost.com/). In the process of building that provider, I have already written many Node.js scripts that do approximately what this specification proposes. There are almost no unknowns, here, except, perhaps, the Layer 2 solution. To write this CLI, I would have essentially do a complete rewrite of all the scripts that I have developed over time, but it is very likely that I will be able to accomplish most tasks outline here.
89+
90+As someone who is running a hosting provider, I will be major user of the CLI as an automation tool myself. Consequently, I will likely maintain this project in the foreseeable future and will also be able to help people with support requests.
91+
92+## Milestones
93+
94+### Milestone 1 - First Working Version of the CLI
95+
96+Expected Completion: 2 months
97+
98+Payment: 2 stars
99+
100+The first milestone is to create the whole CLI framework and implement the first set of commands.
101+
102+Deliverables:
103+
104+- Node.JS project and CLI framework (based on yargs)
105+- Deployable npm package
106+- Work directory framework
107+- Extract relevant code from Bridge, for the time being, copied to the CLI repo
108+- Master ticket and Arvo key generation
109+- List command
110+- Spawn command
111+- Network Key command
112+- Management Proxy command
113+- Transfer command
114+- Document the project
115+- Document usage, give usage examples
116+
117+### Milestone 2 - Vetting and Second Phase of CLI
118+
119+Expected Completion: 1 month
120+
121+Payment: 1 star
122+
123+Having a working tool now, the question will be what parts to merge upstream. Also figure out what parts or projects should be taken under the Urbit umbrella (assuming people start using the CLI).
124+
125+Deliverables:
126+
127+- Merge high risk code (e.g., anything related to cryptography) upstream to Urbit org repositories, focusing on making as many CLI functions also usable as a library.
128+- Possibly move the CLI project under the Urbit org
129+- Ethereum Gas handling and configuration, allowing the automation of on chain transactions at a low cost.
130+- Report generation command.
131+
132+### Milestone 3 - Layer 2 Support
133+
134+Expected Completion: 2 months
135+
136+Payment: 2 stars
137+
138+As soon as the Layer 2 solution is released, the CLI should also support actions on that layer. With rollups, address owners are likely to do larger batch operations. The CLI will be a good tool for that.
139+
140+Deliverables:
141+
142+- Move points that are on Azimuth to L2, or move just the spawn proxy of stars.
143+- Connect to a Roller instead of an ETH node
144+- Spawn points on L2
145+- Set Network Keys on L2
146+- Set Proxies on L2
147+- Transfer points on L2
148+
149+### Milestone 4 - Additional Features
150+
151+Expected Completion: 1 month
152+
153+Payment: 1 star
154+
155+Adding a set of features that will make the CLI much more usable and secure
156+
157+Deliverables:
158+
159+- Hardware Wallet support (signing transactions on the wallet not using the web3 lib)
160+- Retrieving private keys from key-chains, at least MacOS or Linux
161+- More point list/search functionality
162+- Search for unspawned planets (for example, by English language worlds, like Venetia, or custom strings)
163+- Query Azimuth (and L2) for ship state: is it spawned, is it keyed, etc. (this is helpful to check if, say, a galaxy is likely to be alive when buying a star).
164+- Utils (p to patp)
content/grants/bridge-l2-revamp.md+1
@@ -12,6 +12,7 @@ description = "Our Layer 2 scaling solution is nearing completion, and the Bridg
12reward = 5
12reward = 5
13assignee = "~datder-sonnet"
13assignee = "~datder-sonnet"
14completed = false
14completed = false
15+canceled = false
15link = ""
16link = ""
16+++
17+++
17
18
content/grants/calendar-ui.md+1
@@ -13,6 +13,7 @@ reward = 2
13assignee = "finled-bansel"
13assignee = "finled-bansel"
14id = "1555464949"
14id = "1555464949"
15completed = false
15completed = false
16+canceled = true
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/comprehensive-local-server-and-mum-explanation-video.md+2−1
@@ -10,9 +10,10 @@ grant_category = [ "Community" ]
10image = ""
10image = ""
11description = "Series of three videos:1) Purchase planet, install and run on a local machine2) nginx setup3) Explaining Urbit to my tech illiterate mum "
11description = "Series of three videos:1) Purchase planet, install and run on a local machine2) nginx setup3) Explaining Urbit to my tech illiterate mum "
12reward = 1
12reward = 1
13−assignee = "mislyr-midnyt"
13+assignee = "mislyr-misnyt"
14id = "2020133197"
14id = "2020133197"
15completed = false
15completed = false
16+canceled = false
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/contacts.md+1
@@ -13,6 +13,7 @@ reward = 1
13mentor = "~timluc-miptev"
13mentor = "~timluc-miptev"
14assignee = ""
14assignee = ""
15completed = false
15completed = false
16+canceled = false
16work_request_link = "https://airtable.com/shr4qt9t9kz7RaOIa?prefill_Grant+ID=B0034&prefill_Grant+Name=Contacts%20App"
17work_request_link = "https://airtable.com/shr4qt9t9kz7RaOIa?prefill_Grant+ID=B0034&prefill_Grant+Name=Contacts%20App"
17+++
18+++
18
19
content/grants/content-producer.md+1
@@ -13,6 +13,7 @@ reward = 3
13assignee = "~sitful-hatred"
13assignee = "~sitful-hatred"
14id = ""
14id = ""
15completed = false
15completed = false
16+canceled = false
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/cross-platform-desktop-urbit-app.md+2−1
@@ -12,7 +12,8 @@ description = "A native app that makes running Urbit near friction-less for ever
12reward = 10
12reward = 10
13assignee = "nocsyx-lassul"
13assignee = "nocsyx-lassul"
14id = "740109059"
14id = "740109059"
15−completed = false
15+completed = true
16+canceled = false
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/educational-guide-todomvc-urbit-edition.md+1
@@ -13,6 +13,7 @@ reward = 10
13assignee = "~rabsef-bicrym"
13assignee = "~rabsef-bicrym"
14id = "1372696624"
14id = "1372696624"
15completed = false
15completed = false
16+canceled = false
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/feed-aggregator.md+1
@@ -13,6 +13,7 @@ reward = 5
13assignee = "~mirtyl-wacdec"
13assignee = "~mirtyl-wacdec"
14grant_id = "P0043"
14grant_id = "P0043"
15completed = false
15completed = false
16+canceled = false
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/graph-store-documentation-guide.md+1
@@ -13,6 +13,7 @@ reward = 4
13assignee = "~sipfyn-pidmex"
13assignee = "~sipfyn-pidmex"
14id = "1888977136"
14id = "1888977136"
15completed = false
15completed = false
16+canceled = false
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/guide-to-s3.md+1
@@ -13,6 +13,7 @@ reward = 1
13assignee = "~tomnyr-tirsyr"
13assignee = "~tomnyr-tirsyr"
14id = ""
14id = ""
15completed = false
15completed = false
16+canceled = false
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/host-two-urbit-meetups-12.md+2−1
@@ -10,10 +10,11 @@ grant_category = [ "Community" ]
10image = ""
10image = ""
11description = "Urbit needs champions! The Urbit Foundation is looking for community members to host local or online meetups to spread the word."
11description = "Urbit needs champions! The Urbit Foundation is looking for community members to host local or online meetups to spread the word."
12reward = 1
12reward = 1
13−assignee = ""
13+assignee = "~tillys-fasryp"
14id = ""
14id = ""
15work_request_link = "https://airtable.com/shr4qt9t9kz7RaOIa?prefill_Grant+ID=B0031&prefill_Grant+Name=Host%20Two%20Urbit%20Meetups%20%2812%29"
15work_request_link = "https://airtable.com/shr4qt9t9kz7RaOIa?prefill_Grant+ID=B0031&prefill_Grant+Name=Host%20Two%20Urbit%20Meetups%20%2812%29"
16completed = false
16completed = false
17+canceled = false
17link = ""
18link = ""
18+++
19+++
19
20
content/grants/host-two-urbit-meetups-13.mdnew file+59
@@ -0,0 +1,59 @@
1++++
2+title = "Host Two Urbit Meetups (13)"
3+date = "2021-09-14"
4+
5+[taxonomies]
6+grant_type = [ "Bounty" ]
7+grant_category = [ "Community" ]
8+
9+[extra]
10+image = ""
11+description = "Urbit needs champions! The Urbit Foundation is looking for community members to host local or online meetups to spread the word."
12+reward = 1
13+assignee = "~mogmyr-talrus"
14+id = ""
15+work_request_link = "https://airtable.com/shr4qt9t9kz7RaOIa?prefill_Grant+ID=B0083&prefill_Grant+Name=Host%20Two%20Urbit%20Meetups%20%2813%29"
16+completed = false
17+canceled = false
18+link = ""
19+
20++++
21+
22+#### Background
23+
24+Urbit needs champions! The Urbit Foundation is looking for community members to host local or online meetups to spread the word.
25+
26+#### Bounty Description
27+
28+This bounty is to host an Urbit meetup in your city. The meetup should meet the following criteria:
29+
30+- The meetup must be public, and there must be a public web link for joining (like meetup.com)
31+- The meetup must have a presentation or talk about Urbit.
32+- The presentation or talk must be recorded and posted publicly online.
33+- You must promote the event vigorously; social media, a website, etc. Email support@urbit.org if you want a signal boost.
34+- You must host at least two meetups.
35+
36+You should go into this bounty with the mindset of creating a regularly scheduled meetup, one that might become the nucleus of your city's Urbit community. Also, email support@tlon.io once you've hosted a meetup, and we will add you to your [list of active meetups](https://urbit.org/community/meetups/)!
37+
38+#### Resources
39+
40+Check out our [guide](https://urbit.org/community/hosting-a-meetup/) to best practices for Urbit meetups.
41+
42+#### Contribution Guidelines
43+
44+- Do not begin work until your request to claim this bounty is accepted.
45+- When applying to work on the bounty, tell us a little about yourself and mention which city you'd be hosting the meetups in.
46+- Proof of the meetups happening will be determined by the recordings of the presentations. Email links to these recordings to grants@urbit.org.
47+- You have 100 days from the time of approval to complete this bounty.
48+
49+## Milestones
50+
51+### The first meetup is held
52+
53+0 stars
54+The first meetup is held, and a recording of that meetup's talk or presentation is sent to grants@urbit.org.
55+
56+### The second meetup is held
57+
58+1 stars
59+The second meetup is held, and a recording of that meetup's talk or presentation is sent to grants@urbit.org.
content/grants/host-two-urbit-meetups-14.mdnew file+59
@@ -0,0 +1,59 @@
1++++
2+title = "Host Two Urbit Meetups (14)"
3+date = "2021-09-21"
4+
5+[taxonomies]
6+grant_type = [ "Bounty" ]
7+grant_category = [ "Community" ]
8+
9+[extra]
10+image = ""
11+description = "Urbit needs champions! The Urbit Foundation is looking for community members to host local or online meetups to spread the word."
12+reward = 1
13+assignee = "~sarlev-sarsen"
14+id = ""
15+work_request_link = "https://airtable.com/shr4qt9t9kz7RaOIa?prefill_Grant+ID=B0083&prefill_Grant+Name=Host%20Two%20Urbit%20Meetups%20%2814%29"
16+completed = false
17+canceled = false
18+link = ""
19+
20++++
21+
22+#### Background
23+
24+Urbit needs champions! The Urbit Foundation is looking for community members to host local or online meetups to spread the word.
25+
26+#### Bounty Description
27+
28+This bounty is to host an Urbit meetup in your city. The meetup should meet the following criteria:
29+
30+- The meetup must be public, and there must be a public web link for joining (like meetup.com)
31+- The meetup must have a presentation or talk about Urbit.
32+- The presentation or talk must be recorded and posted publicly online.
33+- You must promote the event vigorously; social media, a website, etc. Email support@urbit.org if you want a signal boost.
34+- You must host at least two meetups.
35+
36+You should go into this bounty with the mindset of creating a regularly scheduled meetup, one that might become the nucleus of your city's Urbit community. Also, email support@tlon.io once you've hosted a meetup, and we will add you to your [list of active meetups](https://urbit.org/community/meetups/)!
37+
38+#### Resources
39+
40+Check out our [guide](https://urbit.org/community/hosting-a-meetup/) to best practices for Urbit meetups.
41+
42+#### Contribution Guidelines
43+
44+- Do not begin work until your request to claim this bounty is accepted.
45+- When applying to work on the bounty, tell us a little about yourself and mention which city you'd be hosting the meetups in.
46+- Proof of the meetups happening will be determined by the recordings of the presentations. Email links to these recordings to grants@urbit.org.
47+- You have 100 days from the time of approval to complete this bounty.
48+
49+## Milestones
50+
51+### The first meetup is held
52+
53+0 stars
54+The first meetup is held, and a recording of that meetup's talk or presentation is sent to grants@urbit.org.
55+
56+### The second meetup is held
57+
58+1 stars
59+The second meetup is held, and a recording of that meetup's talk or presentation is sent to grants@urbit.org.
content/grants/host-two-urbit-meetups-15.mdnew file+59
@@ -0,0 +1,59 @@
1++++
2+title = "Host Two Urbit Meetups (15)"
3+date = "2021-09-21"
4+
5+[taxonomies]
6+grant_type = [ "Bounty" ]
7+grant_category = [ "Community" ]
8+
9+[extra]
10+image = ""
11+description = "Urbit needs champions! The Urbit Foundation is looking for community members to host local or online meetups to spread the word."
12+reward = 1
13+assignee = ""
14+id = ""
15+work_request_link = "https://airtable.com/shr4qt9t9kz7RaOIa?prefill_Grant+ID=B0083&prefill_Grant+Name=Host%20Two%20Urbit%20Meetups%20%2815%29"
16+completed = false
17+canceled = false
18+link = ""
19+
20++++
21+
22+#### Background
23+
24+Urbit needs champions! The Urbit Foundation is looking for community members to host local or online meetups to spread the word.
25+
26+#### Bounty Description
27+
28+This bounty is to host an Urbit meetup in your city. The meetup should meet the following criteria:
29+
30+- The meetup must be public, and there must be a public web link for joining (like meetup.com)
31+- The meetup must have a presentation or talk about Urbit.
32+- The presentation or talk must be recorded and posted publicly online.
33+- You must promote the event vigorously; social media, a website, etc. Email support@urbit.org if you want a signal boost.
34+- You must host at least two meetups.
35+
36+You should go into this bounty with the mindset of creating a regularly scheduled meetup, one that might become the nucleus of your city's Urbit community. Also, email support@tlon.io once you've hosted a meetup, and we will add you to your [list of active meetups](https://urbit.org/community/meetups/)!
37+
38+#### Resources
39+
40+Check out our [guide](https://urbit.org/community/hosting-a-meetup/) to best practices for Urbit meetups.
41+
42+#### Contribution Guidelines
43+
44+- Do not begin work until your request to claim this bounty is accepted.
45+- When applying to work on the bounty, tell us a little about yourself and mention which city you'd be hosting the meetups in.
46+- Proof of the meetups happening will be determined by the recordings of the presentations. Email links to these recordings to grants@urbit.org.
47+- You have 100 days from the time of approval to complete this bounty.
48+
49+## Milestones
50+
51+### The first meetup is held
52+
53+0 stars
54+The first meetup is held, and a recording of that meetup's talk or presentation is sent to grants@urbit.org.
55+
56+### The second meetup is held
57+
58+1 stars
59+The second meetup is held, and a recording of that meetup's talk or presentation is sent to grants@urbit.org.
content/grants/json-jet.md+1
@@ -13,6 +13,7 @@ reward = 1
13mentor = "~timluc-miptev"
13mentor = "~timluc-miptev"
14assignee = "~finmep-lanteb"
14assignee = "~finmep-lanteb"
15completed = false
15completed = false
16+canceled = false
16work_request_link = "https://airtable.com/shr4qt9t9kz7RaOIa?prefill_Grant+ID=B0036&prefill_Grant+Name=JSON%20Parsing%2FSerialization%20Jet"
17work_request_link = "https://airtable.com/shr4qt9t9kz7RaOIa?prefill_Grant+ID=B0036&prefill_Grant+Name=JSON%20Parsing%2FSerialization%20Jet"
17+++
18+++
18
19
content/grants/links-in-urbit-reference-docs.md+2−1
@@ -12,7 +12,8 @@ description = "Add links to our reference doc pages so that people can easily di
12reward = 1
12reward = 1
13assignee = "alecbrick"
13assignee = "alecbrick"
14id = "45608361"
14id = "45608361"
15−completed = false
15+completed = true
16+canceled = false
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/login-with-urbit.md+1
@@ -13,6 +13,7 @@ reward = 8
13assignee = "dcSpark"
13assignee = "dcSpark"
14id = ""
14id = ""
15completed = false
15completed = false
16+canceled = false
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/machine-learning.md+1
@@ -11,6 +11,7 @@ reward = 7
11assignee = "~tamdev-nocdun"
11assignee = "~tamdev-nocdun"
12grant_id = "P0075"
12grant_id = "P0075"
13completed = false
13completed = false
14+canceled = false
14link = ""
15link = ""
15+++
16+++
16
17
content/grants/minimal-urbit-os.md+1
@@ -13,6 +13,7 @@ reward = 6
13assignee = "~forfel-norfel"
13assignee = "~forfel-norfel"
14id = "1935638429"
14id = "1935638429"
15completed = false
15completed = false
16+canceled = false
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/network-explorer-data-pipeline-http-api.md+1
@@ -13,6 +13,7 @@ reward = 5
13assignee = "Christopher King"
13assignee = "Christopher King"
14id = "1101665172"
14id = "1101665172"
15completed = false
15completed = false
16+canceled = true
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/network-explorer.mddeleted−233
@@ -1,233 +0,0 @@
1−+++
2−title = "Network Explorer: Data Pipeline and HTTP API"
3−date = "2021-03-11"
4−
5−[taxonomies]
6−grant_type = [ "Bounty" ]
7−grant_category = [ "App Dev: Other" ]
8−
9−[extra]
10−image = ""
11−description = "Build a public, open HTTP API for exploring metrics about the Urbit network."
12−reward = 5
13−assignee = "Christopher King"
14−id = ""
15−completed = false
16−link = ""
17−+++
18−
19−## Overview
20−
21−![network explorer screenshot](https://wolref-podlex.s3.us-west-2.amazonaws.com/wolref-podlex/2021.2.23..20.58.30-Screen%20Shot%202021-02-23%20at%209%2C01%2C03%20AM.png)
22−
23−### Goal
24−
25−Build a public, open HTTP API for exploring metrics about the Urbit network.
26−
27−### Background
28−
29−The project known as the **Network Explorer** has been in the works at Tlon for
30−quite some time. The idea is to build a publicly-accessible tool (hosted on
31−https://network.urbit.org) that provides key metrics and insights into the state
32−of the Urbit network. A series of high-fidelity designs have been produced.
33−
34−### Scope
35−
36−This bounty covers the creation of the:
37−
38−- **data pipeline**: we're concerned with data from the PKI (Azimuth) and
39− the Urbit network itself. These two datasets will need to be aggregated and
40− indexed for efficient querying.
41−- **HTTP API**: the interface for querying data from a client, like the Network
42− Explorer.
43−
44−The Network Explorer interface will be covered in a separate bounty.
45−
46−## Implementation
47−
48−### Data Model
49−
50−Let's start with the data model. There are two sources of data that we need:
51−
52−- **PKI (Azimuth)**: The public-key infrastructure, currently known as Azimuth,
53− is our primary source of data. This information is currently found on Ethereum
54−- **Radar output**: [`radar`](https://github.com/urbit/urbit/blob/2c412d658a74dca3b3f584b92f8b390f38a05ba1/pkg/arvo/app/radar.hoon) is a program run from within an Urbit
55− ship that pings (`|hi`) every Urbit ship and records the results. This data is exposed in a single JSON file that is added to over time as the script runs.
56−
57−Most of the required information in the Network Explorer will come from Azimuth.
58−It's important to know though that the source of PKI information will likely
59−change in the near future in light of [ongoing work to reduce the
60−cost](https://groups.google.com/a/urbit.org/g/dev/c/p6rP_WsxLS0) of bringing
61−nodes onto the network.
62−
63−The below [entity-relationship
64−diagram](https://en.wikipedia.org/wiki/Entity%E2%80%93relationship_model)
65−defines a data model in terms of a relational database:
66−
67−![erd diagram](https://wolref-podlex.s3.us-west-2.amazonaws.com/wolref-podlex/2021.2.23..20.58.39-Network%20Explorer%20ERD.png)
68−
69−Some notes about the above diagram:
70−
71−- The data model should be _agnostic to any particular PKI storage
72− infrastructure_ to future-proof it against PKI changes.
73−- For non-`ping` data, it should be possible to compute the table of `node` from
74− a time-ordered traversal of `pki_event` (kind of like Arvo!). This means that
75− many fields listed on the `node` table could instead be derived from analysis
76− of the `pki_event` table. The implementer will be responsible for determining
77− which fields should be represented on the `node` directly and which should be
78− determined from `pki_event` for performance purposes.
79−- We don't have data for comets or moons, because they're not registered on
80− Azimuth and `radar` only checks for activity from ships with keys that have
81− been set on Azimuth. There will likely be a future in which we'll have a way
82− to provide data about these ship types though.
83−
84−### Data Ingestion
85−
86−Data from Azimuth and `radar` will need to be regularly extracted, parsed, and
87−persisted to the local database for querying.
88−
89−For Azimuth, using a tool like [infura](https://infura.io) should be used.. Tlon
90−currently uses infura, so it should be possible to use a free account for
91−development and Tlon's pre-existing service in production.
92−
93−The output of the `radar` script is saved to a JSON file that can be found
94−[here](http://35.247.74.19:8080/~radar.json). This file is updated as new ping
95−information is obtained, so data ingestion from this service should happen on
96−some regular schedule.
97−
98−### API
99−
100−The following are are necessary API endpoints for the Network Explorer UI to
101−function properly. It's likely that some details have been missed, so apply your
102−own judgement when designing the API.
103−
104−This interface is meant to be agnostic to the API mechanism you choose, which
105−could be either REST or GraphQL.
106−
107−#### get-node
108−
109−Produce the details for a single node.
110−
111−**Parameters**
112−
113−- `urbit_id`: `@p`
114−
115−**Returns**
116−
117−- `urbit_id`: `@p`
118−- `node_type`: `#{galaxy,star,planet,moon,comet}`
119−- `status`: `#{locked,unlocked,spawned,activated,online}`
120−- `continuity`: `int`, current continuity
121−- `key_revision`: `int`, current revision of keys
122−- `num_owners`: `int`, number of owners
123−- `sponsors`: `[node]` (sponsor and sponsor's sponsor, if applicable)
124−- `kids`: `[node]` (nodes sponsored by this one)
125−- `proxy_addresses`:
126− - `ownership`
127− - `spawn`
128− - `transfer`
129− - `voting`
130− - `management`
131−
132−#### get-nodes
133−
134−Produce a list of nodes, optionally with parameters. Absence of parameters queries all nodes.
135−
136−**Parameters**
137−
138−- `q`: `string` (optional: query term to search for)
139−- `node_types`: `[node_type]` (optional: produce just events for specific node types)
140−- `limit`: `int` (number of results to return)
141−- `offset`: `int` (number of results to offset by)
142−
143−**Returns**
144−An array of `node` in ascending order by `point`.
145−
146−#### get-pki-events
147−
148−Produce the stream of PKI events for a specific Urbit ID, or globally in descending order of `time`.
149−
150−**Parameters**
151−
152−- `urbit_id`: `@p` (optional: unspecified implies global)
153−- `since`: `timestamp` (optional: unspecified implies all events)
154−- `node_types`: `[node_type]` (optional: produce just events for specific node types)
155−- `limit`: `int` (number of results to return)
156−- `offset`: `int` (number of results to offset by\*\*
157−
158−**Returns**
159−An array of `pki_event` in descending order of `time`.
160−
161−#### get-activity
162−
163−Produce the network activity of a node or nodes.
164−
165−**Parameters**
166−
167−- `urbit_id`: `@p` (optional: specific ship to pull activity for)
168−- `since`: `timestamp` (optional: activity since provided time)
169−- `until`: `timestamp` (optional: activity up until the provided time)
170−
171−If `urbit_id` is unspecified, implies all ships.
172−
173−If `since` and `until` are unspecified, produces all activity for all time. If
174−only `since` is provided, produces activity from `since` to the present. If only
175−`until` is provided, produces activity for all of time up until `until`. If both
176−are provided, queries activity within a range.
177−
178−**Returns**
179−Array of:
180−
181−- `urbit_id`: `@p`
182−- `date`: `date` (no time)
183−- `active`: `boolean` (active or inactive)
184−
185−### Technology Requirements/Guidelines
186−
187−That which is not explicitly specified here is up to the choice of the
188−implementer.
189−
190−- **Database**: PostgreSQL
191−- **Ethereum Interaction**: Infura
192−- **HTTP API methodology**: GraphQL or REST
193−- **ORM**: None. Implementer should be sufficiently familiar with SQL.
194−- **API Hosting**: The API will be hosted on `api.network.urbit.org` or
195− `network.urbit.org/api`.
196−
197−## Requirements
198−
199−- 2+ years of experience with developing HTTP APIs
200−- 2+ years of experience working with relational databases
201−- Code hosted at https://github.com/urbit/network-api
202−- Attend regular (weekly or bi-weekly) checkin meetings with the director of
203− urbit.org to provide status updates
204−
205−## Resources
206−
207−- A complete set of high-fidelity designs in Figma will be made available to the
208− worker.
209−- The director of urbit.org will ensure access to other resources or personnel
210− as needed.
211−
212−## Milestones
213−
214−### Data ETL
215−
216−2 stars
217−The database has been designed and data from both sources is ingested
218−(extracted, transformed and loaded) on a regular schedule. Analysis can be
219−performed at the database layer.
220−
221−### HTTP API
222−
223−2 stars
224−An HTTP API is written per the above specification and deployed to
225−`https://api.network.urbit.org`.
226−
227−### UI Integration
228−
229−1 star
230−The Network Explorer UI will be a separate proposal, but integration with an
231−interface inevitably surfaces oversights in the original design. An additional
232−star will be awarded for providing ongoing maintenance as-needed during
233−front-end integration.
content/grants/nuck-jet.md+1
@@ -13,6 +13,7 @@ reward = 1
13mentor = "~timluc-miptev"
13mentor = "~timluc-miptev"
14assignee = ""
14assignee = ""
15completed = false
15completed = false
16+canceled = true
16work_request_link = "https://airtable.com/shr4qt9t9kz7RaOIa?prefill_Grant+ID=B0035&prefill_Grant+Name=Nuck%20Jet"
17work_request_link = "https://airtable.com/shr4qt9t9kz7RaOIa?prefill_Grant+ID=B0035&prefill_Grant+Name=Nuck%20Jet"
17+++
18+++
18
19
content/grants/overhaul-the-urbitorg-website.md+1
@@ -13,6 +13,7 @@ reward = 6
13assignee = "~radbur-sivmus"
13assignee = "~radbur-sivmus"
14id = "246698762"
14id = "246698762"
15completed = false
15completed = false
16+canceled = false
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/planet-sales.md+1
@@ -11,6 +11,7 @@ reward = 6
11assignee = "~tacryt-socryp"
11assignee = "~tacryt-socryp"
12grant_id = "P0071"
12grant_id = "P0071"
13completed = false
13completed = false
14+canceled = false
14link = ""
15link = ""
15+++
16+++
16
17
content/grants/pokur.mdnew file+90
@@ -0,0 +1,90 @@
1++++
2+title = "Pokur: Texas Holdem on Urbit"
3+date = "2021-09-16"
4+[taxonomies]
5+grant_type = ["Proposal"]
6+grant_category = ["App Dev: Other"]
7+[extra]
8+image = ""
9+description = "Multiplayer Poker App on Urbit"
10+reward = 2
11+assignee = "~hodzod-walrus"
12+grant_id = "P0084"
13+completed = false
14+canceled = false
15+link = ""
16++++
17+
18+## Pokur: Texas Hold 'em on Urbit
19+
20+## Purpose
21+
22+The goal of this project is to release a multiplayer Poker app on Urbit. Most users understand Urbit as an excellent communication tool, but so far there are few apps which showcase Urbit’s full potential as a general networked OS. Games are an excellent way to introduce people to this, and poker’s turn-based gameplay is ideal for development on Urbit in its current state. This project will also lay the groundwork for future financial transactions on Urbit in the form of BTC wagering for cash games and tournaments. For now, though, this facet of the app will wait for future payment rails.
23+
24+## Background
25+
26+I was first motivated to build a game on Urbit after seeing ~ponrep build a chess app. I’m also a casual poker fan, so seeing it as a suggested apprenticeship project was great.
27+
28+I’ve spent the last several weeks working on an apprenticeship grant, which was extremely successful --I was able to become proficient in Hoon and app development using Gall. I now have a [basic poker app](https://github.com/benmcc100/pokur). There are several tasks required to get this program release-ready, and this grant is intended to cover that.
29+
30+## Implementation
31+
32+I intend to follow the same general structure of my apprenticeship app. Pokur exists as two Gall apps, a client and a server. While there exist fully-p2p algorithms for playing trustless poker, marking one ship as a server has many benefits for ease-of-play (notably turn timers), and remains an effective decentralized implementation of the game. Players can select a server of their choosing when creating a new game, or host a game themselves. When it comes to fairness, players are only required to trust the ship hosting the server. This model of trust is similar to someships acting as btc-providers, and the Urbit address space is well-designed for marking stars as high-trust nodes capable of providing services such as poker hosting.
33+
34+I’ve already implemented the basic game logic. There are a few edge cases that remain unresolved, notably the logic surrounding side pots in a situation with multiple all-ins. I’m aware of these issues and will be able to manage them easily. My primary development task is now to build on this basic logic to create tournament and cash game modes, and add useful features such as rule customization, invite management, and messaging in-game.I’ll probably need to refactor certain elements of my apprenticeship code. As I wrote it, I learned much more about Hoon, so older parts of the codebase arenaturally lower-quality. I’d like to rewrite these parts to make the app more extensible. Everything works in its current state, but I think this will allow me to more easily build the aforementioned features.
35+
36+One of the key reasons for this proposal is ensuring that Pokur can have an extended open beta process. I think this is a good way, as a solo developer, to ensure every in-game scenario is bug-free. This is critical if ships are to play for ‘real money’ in the future.
37+
38+For this reason I intend to release a beta version of Pokur that does not include BTC integration. After publicising the beta release, I hope to get lots of community feedback on gameplay, any bug reports, and use these to push improvements.
39+
40+## User Stories
41+
42+● As a user, I can create a newtable and specify the hosting server and the game rules (tournament/cash, buy-in, timers, etc.)
43+
44+● I can invite other users to play with me, who can then invite their friends before the game begins
45+
46+● Once in-game, I can play poker within the rules specified for the table, and concede if I so choose
47+
48+● If I install the Pokur server app, I can use it for my own games or invite others to use it for theirs
49+
50+● I can look at a history of the games I’ve played in
51+
52+## Milestones
53+
54+### Milestone 1 - Development & Polish
55+
56+Expected completion: Nov 2021
57+
58+Payment: 1 star
59+
60+● I’ll start by refactoring some elements of the codebase from my apprenticeship and fixing the known gameplay issues (main one is lack of proper side-pot logic).
61+
62+● Next I’ll polish the game, adding features including but not limited to:
63+
64+\* Tournament vs cash mode
65+
66+\* In-game turn timers
67+
68+\* Invite management (decline game invite, cancel invite, etc)
69+
70+\* Custom user-designed game rules (starting stack size, turn time limit, etc)
71+
72+\* In-game chat
73+
74+● Also included in ‘polish’ will be a cleaner and nicer looking UI.
75+
76+### Milestone 2: Release and testing
77+
78+Expected completion: 2022
79+
80+Payment: 1 star
81+
82+● Will begin by publicising the github repo to the Urbit community and dedicating a star to hosting a Pokur server for people to use. I will also host a group for installation help, organizing tournaments, reporting bugs, and generally encouraging the use of Pokur beta.
83+
84+● Pokur is also a prime candidate for an Urbit software distribution system. I will take any steps required to publish Pokur on that platform and hope to be one of the first independent apps available there.
85+
86+● Reward for this phase is to cover all maintenance and upgrades required to:
87+
88+\* Reveal latent gameplay bugs and fix them
89+
90+\* Ensure Pokur is available on any future Urbit software distribution platform(c)establish a Pokur-playing community on Urbit and maintain a Pokur server on a dedicated ship for at least a year or until at least 2 others are active.
content/grants/search-in-groups.md+1−1
@@ -12,7 +12,7 @@ description = "Implement a basic text search in groups channels"
12reward = 2
12reward = 2
13assignee = "@nrtxrmnd"
13assignee = "@nrtxrmnd"
14id = "835369230"
14id = "835369230"
15−completed = false
15+completed = true
16link = ""
16link = ""
17+++
17+++
18
18
content/grants/slaw-scot-jets.md+1−1
@@ -11,7 +11,7 @@ image = ""
11description = "Tune slaw/scot jets for better perfomance."
11description = "Tune slaw/scot jets for better perfomance."
12reward = 1
12reward = 1
13mentor = "~timluc-miptev"
13mentor = "~timluc-miptev"
14−assignee = ""
14+assignee = "~lagrev-nocfep"
15completed = false
15completed = false
16work_request_link = "https://airtable.com/shr4qt9t9kz7RaOIa?prefill_Grant+ID=B0042&prefill_Grant+Name=Tune%20slaw%2Fscot%20jets"
16work_request_link = "https://airtable.com/shr4qt9t9kz7RaOIa?prefill_Grant+ID=B0042&prefill_Grant+Name=Tune%20slaw%2Fscot%20jets"
17+++
17+++
content/grants/-smol-future-sustained-knowledge-sharing-and-marketing.md → content/grants/smol-future-sustained-knowledge-sharing-and-marketing.mdrenamed

The content is the same.

content/grants/speech-recognition.md+1
@@ -11,6 +11,7 @@ reward = 2
11assignee = "~hosted-fornet"
11assignee = "~hosted-fornet"
12grant_id = "P0053"
12grant_id = "P0053"
13completed = false
13completed = false
14+canceled = false
14link = ""
15link = ""
15+++
16+++
16
17
content/grants/translate-key-parts-of-urbitorg-into-german.md+1
@@ -13,6 +13,7 @@ reward = 1
13assignee = "~hocdep-labtel"
13assignee = "~hocdep-labtel"
14id = "1163466965"
14id = "1163466965"
15completed = false
15completed = false
16+canceled = false
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/translate-key-parts-of-urbitorg-into-korean.md+1
@@ -13,6 +13,7 @@ reward = 1
13assignee = "~sibped-dabdul, 홍송이"
13assignee = "~sibped-dabdul, 홍송이"
14id = "1921641407"
14id = "1921641407"
15completed = false
15completed = false
16+canceled = false
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/translate-key-parts-of-urbitorg-into-spanish.md+1
@@ -13,6 +13,7 @@ reward = 1
13assignee = "Tom Holford"
13assignee = "Tom Holford"
14id = "446864346"
14id = "446864346"
15completed = false
15completed = false
16+canceled = false
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/try-urbit-website.md+2−1
@@ -10,9 +10,10 @@ grant_category = [ "App Dev" ]
10image = ""
10image = ""
11description = "A website where prospective Martians can experience the Landscape interface without any technical chops."
11description = "A website where prospective Martians can experience the Landscape interface without any technical chops."
12reward = 2
12reward = 2
13−assignee = "mikeosborne"
13+assignee = "~taller-ravnut"
14id = "1413934727"
14id = "1413934727"
15completed = false
15completed = false
16+canceled = true
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/ucal-google-and-outlook-integration.md+1
@@ -13,6 +13,7 @@ reward = 2
13assignee = ""
13assignee = ""
14id = ""
14id = ""
15completed = false
15completed = false
16+canceled = false
16work_request_link = "https://airtable.com/shr4qt9t9kz7RaOIa?prefill_Grant+ID=B0014&prefill_Grant+Name=ucal%20Google%20and%20Outlook%20Integration"
17work_request_link = "https://airtable.com/shr4qt9t9kz7RaOIa?prefill_Grant+ID=B0014&prefill_Grant+Name=ucal%20Google%20and%20Outlook%20Integration"
17+++
18+++
18
19
content/grants/urbian-a-customized-linux-distribution-for-urbit-appliances.md+1
@@ -13,6 +13,7 @@ reward = 2
13assignee = "~botter-nidnul"
13assignee = "~botter-nidnul"
14id = "337545546"
14id = "337545546"
15completed = false
15completed = false
16+canceled = false
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/urbit-community-concierge-east-coast-2q2021.md+2−1
@@ -12,7 +12,8 @@ description = "Provide concierge service assisting new users in the Urbit Commun
12reward = 1
12reward = 1
13assignee = "tocrex"
13assignee = "tocrex"
14id = "427340266"
14id = "427340266"
15−completed = false
15+completed = true
16+canceled = false
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/urbit-community-concierge-east-coast.md+2−1
@@ -12,7 +12,8 @@ description = "Provide concierge service assisting new users in the Urbit Commun
12reward = 1
12reward = 1
13assignee = "tocrex"
13assignee = "tocrex"
14id = "928966814"
14id = "928966814"
15−completed = false
15+completed = true
16+canceled = false
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/urbit-community-concierge-west-coast-2q2021.md+2−1
@@ -12,7 +12,8 @@ description = "Provide concierge service assisting new users in the Urbit Commun
12reward = 1
12reward = 1
13assignee = "~sibhul-soctul"
13assignee = "~sibhul-soctul"
14id = "1693084001"
14id = "1693084001"
15−completed = false
15+completed = true
16+canceled = false
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/urbit-community-concierge-west-coast.md+2−1
@@ -12,7 +12,8 @@ description = "Provide concierge service assisting new users in the Urbit Commun
12reward = 1
12reward = 1
13assignee = "~sibhul-soctul"
13assignee = "~sibhul-soctul"
14id = "669964979"
14id = "669964979"
15−completed = false
15+completed = true
16+canceled = false
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/urbit-event-series.md+1
@@ -13,6 +13,7 @@ reward = 6
13assignee = "~naplet-hildec"
13assignee = "~naplet-hildec"
14id = "1751024973"
14id = "1751024973"
15completed = false
15completed = false
16+canceled = false
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/urbit-explainer-video.md+1
@@ -13,6 +13,7 @@ reward = 2
13assignee = "~rivpyl-sidfyl, ~minder-folden"
13assignee = "~rivpyl-sidfyl, ~minder-folden"
14id = "1350087489"
14id = "1350087489"
15completed = true
15completed = true
16+canceled = false
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/urbit-http-api-for-emacs-elisp.md+1
@@ -13,6 +13,7 @@ reward = 3
13assignee = "~winduc-dozser"
13assignee = "~winduc-dozser"
14id = "1206158911"
14id = "1206158911"
15completed = false
15completed = false
16+canceled = true
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/urbit-http-api-for-kotlin.md+1
@@ -13,6 +13,7 @@ reward = 3
13assignee = "@nrtxrmnd"
13assignee = "@nrtxrmnd"
14id = "865786150"
14id = "865786150"
15completed = false
15completed = false
16+canceled = true
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/urbit-http-api-for-python.md+1
@@ -13,6 +13,7 @@ reward = 1
13assignee = "novbyr-miclux"
13assignee = "novbyr-miclux"
14id = "P0029"
14id = "P0029"
15completed = false
15completed = false
16+canceled = false
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/urbit-http-api-for-rust.md+1
@@ -13,6 +13,7 @@ reward = 3
13assignee = "~mocrux-nomdep"
13assignee = "~mocrux-nomdep"
14id = "1120978319"
14id = "1120978319"
15completed = false
15completed = false
16+canceled = false
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/urbit-http-interface-java-edition.md+1
@@ -13,6 +13,7 @@ reward = 3
13assignee = "~sipfyn-pidmex"
13assignee = "~sipfyn-pidmex"
14id = "288224550"
14id = "288224550"
15completed = false
15completed = false
16+canceled = true
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/urbit-http-library-for-ruby.md+1
@@ -13,6 +13,7 @@ reward = 3
13assignee = "~winter-paches"
13assignee = "~winter-paches"
14id = "227255220"
14id = "227255220"
15completed = false
15completed = false
16+canceled = true
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/urbit-irc-bridge.md+1
@@ -13,6 +13,7 @@ reward = 1
13assignee = "~fitnub-basbud"
13assignee = "~fitnub-basbud"
14id = ""
14id = ""
15completed = false
15completed = false
16+canceled = false
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/urbit-lfs-filehosting.md+1
@@ -13,6 +13,7 @@ reward = 4
13assignee = "tabnus-fondeg"
13assignee = "tabnus-fondeg"
14id = "1736585775"
14id = "1736585775"
15completed = false
15completed = false
16+canceled = false
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/urbit-react-cookbook.md+1
@@ -13,6 +13,7 @@ reward = 3
13assignee = "~witfyl-ravped"
13assignee = "~witfyl-ravped"
14id = "1312404336"
14id = "1312404336"
15completed = false
15completed = false
16+canceled = false
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/video-content-manager.md+1
@@ -13,6 +13,7 @@ reward = 3
13assignee = "~wolnyl-pasreg"
13assignee = "~wolnyl-pasreg"
14id = "790269488"
14id = "790269488"
15completed = false
15completed = false
16+canceled = false
16link = ""
17link = ""
17+++
18+++
18
19
content/grants/volt-lightning-on-urbit.md+1
@@ -12,6 +12,7 @@ description = "An Urbit-native Lightning client and integration with `lnd` on 'p
12reward = 7
12reward = 7
13assignee = "~martyr-binbex, ~dasrun-fadben"
13assignee = "~martyr-binbex, ~dasrun-fadben"
14completed = false
14completed = false
15+canceled = false
15link = ""
16link = ""
16+++
17+++
17
18
content/grants/webrtc-gall-agent-and-external-app.md+15−17

This diff is too big to show here.

content/grants/webrtc.mddeleted−80

This diff is too big to show here.

lib/glossary.js+665−532

This diff is too big to show here.

next.config.js−8

This diff is too big to show here.

package-lock.json+865−3153

This diff is too big to show here.

package.json+1−5

This diff is too big to show here.

pages/events.js+15−4

This diff is too big to show here.

pages/events/[slug].js+2−2

This diff is too big to show here.

pages/index.js+11−6

This diff is too big to show here.

yarn.lockdeleted−1865

This diff is too big to show here.