on master help sign in
Merge branch 'master' of github.com:urbit/urbit.org into ga/events-metadata
commit788614878cac25cf67e53db1f565ee2e41a7e1aa authorGavin Atkinson <gvnatknsn@protonmail.com> dateMon 16 Aug 2021, 16:36 (5 years ago) parent72ac700bfc4382
54 files changed+1031−915
components/Contact.js+8−8 components/ContentArea.js+3−3 components/EventPreview.js+2−2 components/Footer.js+32−25 components/GrantPreview.js+9−9 components/Header.js+6−6 components/MenuTray.js+3−3 components/NewletterSignup.js+2−2 components/Pagination.js+2−2 components/PostPreview.js+2−2 components/Search.js+10−8 components/Sidebar.js+3−3 components/TableOfContents.js+3−1 content/blog/why-hoon.md+7−6 content/docs/arvo/behn/_index.md+16 content/docs/arvo/behn/behn-api.md−246 content/docs/arvo/behn/behn.md+11−13 content/docs/arvo/behn/examples.md+95 content/docs/arvo/behn/scry.md+46 content/docs/arvo/behn/tasks.md+155 content/docs/arvo/clay/examples.md+21−22 content/docs/arvo/clay/scry.md+27−54 content/docs/arvo/clay/tasks.md+101−153 content/docs/arvo/overview.md+56−79 content/docs/hoon/reference/stdlib/2c.md+91−13 content/docs/hoon/reference/stdlib/2j.md+52−32 content/docs/hoon/reference/stdlib/2n.md+22−13 content/docs/hoon/reference/stdlib/table-of-contents.md+2 content/docs/userspace/threads/basics/bind.md+13−13 content/docs/userspace/threads/basics/input.md+28−28 content/docs/userspace/threads/basics/output.md+19−19 content/docs/userspace/threads/basics/summary.md+17−11 content/faq.md+1−1 content/getting-started/_index.md+1−1 content/understanding-urbit/interface.md−2 pages/blog.js+2−2 pages/blog/[slug].js+2−2 pages/community/[[...slug]].js+4−4 pages/docs/[[...slug]].js+11−10 pages/events.js+5−5 pages/events/[slug].js+6−4 pages/getting-started/[[...slug]].js+8−7 pages/grants.js+17−16 pages/grants/[slug].js+10−8 pages/index.js+22−20 pages/media/[slug].js+5−3 pages/understanding-urbit/[[...slug]].js+7−7 pages/updates.js+4−4 pages/updates/[slug].js+3−3 pages/using/[[...slug]].js+8−7 styles/globals.css+6−5 styles/markdown.css+7−7 styles/prism.css+5−5 tailwind.config.js+33−16
components/Contact.js+8−8
@@ -53,8 +53,8 @@ export default function Contact({ emphasize }) {
5353 </svg>
5454 );
5555
56− const linkText = emphasize ? "text-green" : "text-black";
57− const border = emphasize ? "green" : "black";
56+ const linkText = emphasize ? "text-green-400" : "text-wall-600";
57+ const border = emphasize ? "border-green-400" : "border-wall-600";
5858
5959 return (
6060 <div>
@@ -65,32 +65,32 @@ export default function Contact({ emphasize }) {
6565 </h4>
6666 </div>
6767 <NewsletterSignup color={border} />
68− <h4 className="mt-12 text-gray">
68+ <h4 className="mt-12 text-wall-500">
6969 Follow us on{" "}
7070 <a className={linkText} href={contact.twitter}>
7171 Twitter
7272 </a>
7373 </h4>
74− <h4 className="mt-6 text-gray">
74+ <h4 className="mt-6 text-wall-500">
7575 Explore code on{" "}
7676 <a className={linkText} href={contact.github}>
7777 Github
7878 </a>
7979 </h4>
80− <h4 className="mt-6 text-gray">
80+ <h4 className="mt-6 text-wall-500">
8181 Ask questions in our{" "}
8282 <a className={linkText} href={contact.discord}>
8383 Discord
8484 </a>
8585 </h4>
86− <h4 className="mt-6 text-gray flex items-baseline flex-wrap">
86+ <h4 className="mt-6 text-wall-500 flex items-baseline flex-wrap">
8787 Boot Urbit and join{" "}
8888 <div className="md:ml-2 rounded-lg flex items-stretch">
89− <code className="rounded-l-lg px-2 md:px-4 py-2 bg-wall flex items-center h-full">
89+ <code className="rounded-l-lg px-2 md:px-4 py-2 bg-wall-100 flex items-center h-full">
9090 {contact.urbitCommunity}
9191 </code>
9292 <button
93− className="rounded-r-lg px-4 bg-wall ml-0.5 flex-1 flex justify-center items-center"
93+ className="rounded-r-lg px-4 bg-wall-100 ml-0.5 flex-1 flex justify-center items-center"
9494 onClick={() => copy()}
9595 >
9696 {buttonIcon}
components/ContentArea.js+3−3
@@ -47,16 +47,16 @@ export default function ContentArea(props) {
4747 className="px-4 md:px-12 lg:px-24 pb-24 pt-8 md:pt-10 lg:pt-16 flex flex-col w-full max-w-screen-xl max-h-screen h-screen overflow-y-scroll"
4848 >
4949 <div className="flex justify-between w-full items-center flex-shrink-0">
50− <div className="type-ui text-gray">{props.breadcrumbs}</div>
50+ <div className="type-ui text-wall-500">{props.breadcrumbs}</div>
5151 <div className="hidden md:block">
5252 <button
5353 onClick={(e) => {
5454 e.stopPropagation();
5555 props.search.toggleSearch();
5656 }}
57− className="bg-wall text-gray flex px-4 py-1 rounded-lg type-ui"
57+ className="bg-wall-100 text-wall-500 flex px-4 py-1 rounded-lg type-ui"
5858 >
59− Search<div className="ml-4 text-lightGray">{shortcut}</div>
59+ Search<div className="ml-4 text-wall-400">{shortcut}</div>
6060 </button>
6161 </div>
6262 </div>
components/EventPreview.js+2−2
@@ -3,8 +3,8 @@ import { formatDateWithTime } from "../lib/lib";
33
44export default function EventPreview({ event, className, rsvp }) {
55 // Event tiles have a 'dark mode' used when their background images are dark and white text is needed for legibility.
6− const grayText = event.extra?.dark ? "text-midWhite" : "text-gray";
7− const blackText = event.extra?.dark ? "text-white" : "text-black";
6+ const grayText = event.extra?.dark ? "text-midWhite" : "text-wall-500";
7+ const blackText = event.extra?.dark ? "text-white" : "text-wall-600";
88
99 return (
1010 <div className={`cursor-pointer ${className}`}>
components/Footer.js+32−25
@@ -5,41 +5,43 @@ import { contact } from "../lib/constants";
55
66export default function Footer() {
77 return (
8− <footer className="bg-wall w-full mt-48 flex justify-center">
8+ <footer className="bg-wall-100 w-full mt-48 flex justify-center">
99 <SingleColumn>
1010 <Section short className="flex flex-row flex-wrap">
1111 <div className="w-1/2 md:w-1/3 flex flex-col flex-shrink">
1212 <h4 className="mt-16 mb-8">Use Urbit</h4>
1313 <Link href="/getting-started">
1414 <div>
15− <a className="type-bold text-gray">Getting Started</a>
15+ <a className="type-bold text-wall-500">Getting Started</a>
1616 </div>
1717 </Link>
1818 <Link href="/using">
1919 <div>
20− <a className="type-bold text-gray">Operator's Manual</a>
20+ <a className="type-bold text-wall-500">Operator's Manual</a>
2121 </div>
2222 </Link>
2323 <Link href="https://github.com/urbit/port/releases">
2424 <div>
25− <a className="type-bold text-gray">Urbit Client</a>
25+ <a className="type-bold text-wall-500">Urbit Client</a>
2626 </div>
2727 </Link>
2828 <Link href="https://github.com/urbit/urbit/releases">
2929 <div>
30− <a className="mt-2 type-bold text-gray">Urbit Binaries</a>
30+ <a className="mt-2 type-bold text-wall-500">Urbit Binaries</a>
3131 </div>
3232 </Link>
3333 {
3434 // <Link href="">
3535 // <div>
36− // <a className="mt-2 type-bold text-gray">Urbit Apps</a>
36+ // <a className="mt-2 type-bold text-wall-500">Urbit Apps</a>
3737 // </div>
3838 // </Link>
3939 }
4040 <Link href="/getting-started/planet/#hosting-providers">
4141 <div>
42− <a className="mt-2 type-bold text-gray">Hosting Providers</a>
42+ <a className="mt-2 type-bold text-wall-500">
43+ Hosting Providers
44+ </a>
4345 </div>
4446 </Link>
4547 </div>
@@ -47,22 +49,22 @@ export default function Footer() {
4749 <h4 className="mt-16 mb-8">About</h4>
4850 <Link href="/understanding-urbit">
4951 <div>
50− <a className="type-bold text-gray">What's Urbit?</a>
52+ <a className="type-bold text-wall-500">What's Urbit?</a>
5153 </div>
5254 </Link>
5355 <Link href="/understanding-urbit/urbit-id">
5456 <div>
55− <a className="mt-2 type-bold text-gray">Urbit ID</a>
57+ <a className="mt-2 type-bold text-wall-500">Urbit ID</a>
5658 </div>
5759 </Link>
5860 <Link href="/understanding-urbit/urbit-os">
5961 <div>
60− <a className="mt-2 type-bold text-gray">Urbit OS</a>
62+ <a className="mt-2 type-bold text-wall-500">Urbit OS</a>
6163 </div>
6264 </Link>
6365 <Link href="/faq">
6466 <div>
65− <a className="mt-2 type-bold text-gray">FAQ</a>
67+ <a className="mt-2 type-bold text-wall-500">FAQ</a>
6668 </div>
6769 </Link>
6870 </div>
@@ -70,17 +72,17 @@ export default function Footer() {
7072 <h4 className="mt-16 mb-8">News</h4>
7173 <Link href="/blog">
7274 <div>
73− <a className="type-bold text-gray">Blog</a>
75+ <a className="type-bold text-wall-500">Blog</a>
7476 </div>
7577 </Link>
7678 <Link href="/events">
7779 <div>
78− <a className="mt-2 type-bold text-gray">Events</a>
80+ <a className="mt-2 type-bold text-wall-500">Events</a>
7981 </div>
8082 </Link>
8183 <Link href="/updates">
8284 <div>
83− <a className="mt-2 type-bold text-gray">Updates</a>
85+ <a className="mt-2 type-bold text-wall-500">Updates</a>
8486 </div>
8587 </Link>
8688 </div>
@@ -89,17 +91,17 @@ export default function Footer() {
8991 <h4 className="mt-16 mb-8">Develop</h4>
9092 <Link href="/docs">
9193 <div>
92− <a className="type-bold text-gray">Documentation</a>
94+ <a className="type-bold text-wall-500">Documentation</a>
9395 </div>
9496 </Link>
9597 <Link href="https://github.com/urbit">
9698 <div>
97− <a className="mt-2 type-bold text-gray">Github</a>
99+ <a className="mt-2 type-bold text-wall-500">Github</a>
98100 </div>
99101 </Link>
100102 <Link href="https://github.com/urbit/awesome-urbit#http-apis-airlock">
101103 <div>
102− <a className="mt-2 type-bold text-gray">Airlock APIs</a>
104+ <a className="mt-2 type-bold text-wall-500">Airlock APIs</a>
103105 </div>
104106 </Link>
105107 </div>
@@ -107,12 +109,12 @@ export default function Footer() {
107109 <h4 className="mt-16 mb-8">Contribute</h4>
108110 <Link href="https://github.com/urbit/urbit/issues">
109111 <div>
110− <a className="type-bold text-gray">Issue Tracker</a>
112+ <a className="type-bold text-wall-500">Issue Tracker</a>
111113 </div>
112114 </Link>
113115 <Link href="/grants">
114116 <div>
115− <a className="mt-2 type-bold text-gray">Urbit Grants</a>
117+ <a className="mt-2 type-bold text-wall-500">Urbit Grants</a>
116118 </div>
117119 </Link>
118120 </div>
@@ -121,17 +123,22 @@ export default function Footer() {
121123 <h4 className="mt-16 mb-8">Community</h4>
122124 <Link href="https://groups.google.com/a/urbit.org/g/dev?pli=1">
123125 <div>
124− <a className="type-bold text-gray">Dev Mailing List</a>
126+ <a className="type-bold text-wall-500">Dev Mailing List</a>
127+ </div>
128+ </Link>
129+ <Link href="https://discord.gg/CfSKKaB2ep">
130+ <div>
131+ <a className="mt-2 type-bold text-wall-500">Support Discord</a>
125132 </div>
126133 </Link>
127134 <Link href="https://github.com/urbit/azimuth">
128135 <div>
129− <a className="mt-2 type-bold text-gray">Governance</a>
136+ <a className="mt-2 type-bold text-wall-500">Governance</a>
130137 </div>
131138 </Link>
132139 <Link href="https://twitter.com/urbit">
133140 <div>
134− <a className="mt-2 type-bold text-gray">Twitter</a>
141+ <a className="mt-2 type-bold text-wall-500">Twitter</a>
135142 </div>
136143 </Link>
137144 </div>
@@ -140,14 +147,14 @@ export default function Footer() {
140147 <div className="md:w-1/3">
141148 <Link href="/privacy">
142149 <div>
143− <a className="type-bold text-gray">Privacy Policy</a>
150+ <a className="type-bold text-wall-500">Privacy Policy</a>
144151 </div>
145152 </Link>
146153 </div>
147154 <div className="md:w-1/3">
148155 <Link href="/terms-of-service">
149156 <div>
150− <a className="type-bold text-gray">Terms of Service</a>
157+ <a className="type-bold text-wall-500">Terms of Service</a>
151158 </div>
152159 </Link>
153160 </div>
@@ -155,7 +162,7 @@ export default function Footer() {
155162 <div>
156163 <a
157164 href={"mailto:" + contact.email}
158− className="type-bold text-gray"
165+ className="type-bold text-wall-500"
159166 >
160167 {contact.email}
161168 </a>
components/GrantPreview.js+9−9
@@ -8,14 +8,14 @@ export default function GrantPreview({ grant }) {
88
99 const className = classnames({
1010 "bg-lightBlue": type.includes("Proposal") && isOpen,
11− "bg-lightGreen": type.includes("Apprenticeship") && isOpen,
12− "bg-lightYellow": type.includes("Bounty") && isOpen,
11+ "bg-green-200": type.includes("Apprenticeship") && isOpen,
12+ "bg-yellow-100": type.includes("Bounty") && isOpen,
1313 });
1414
1515 return (
1616 <div
1717 key={grant.slug}
18− className={`mb-4 cursor-pointer bg-wall rounded-lg ${className}`}
18+ className={`mb-4 cursor-pointer bg-wall-100 rounded-lg ${className}`}
1919 >
2020 <Link href={`/grants/${grant.slug}`}>
2121 <div className="p-8">
@@ -23,13 +23,13 @@ export default function GrantPreview({ grant }) {
2323 <h3 className="type-ui" id={grant.slug}>
2424 {grant.title}
2525 </h3>
26− <div className={`bg-gray text-wall badge-sm ml-2`}>
26+ <div className={`bg-wall-500 text-wall-100 badge-sm ml-2`}>
2727 {!isCompleted ? (isOpen ? "Open" : "In Progress") : "Completed"}
2828 </div>
2929 </div>
3030 <p className="mb-4">{grant.extra.description}</p>
3131 <div className="flex w-full flex-col md:flex-row md:items-center justify-between">
32− <p className="text-gray">
32+ <p className="text-wall-500">
3333 <strong>Reward: </strong>
3434 {grant.extra.reward} star
3535 {grant.extra.reward === 1 ? "" : "s"}
@@ -37,9 +37,9 @@ export default function GrantPreview({ grant }) {
3737 <div className="flex items-center flex-wrap md:mt-0 mt-4">
3838 {grant.taxonomies.grant_type.map((category) => {
3939 const className = classnames({
40− "bg-blue text-white": category === "Proposal",
41− "bg-green text-white": category === "Apprenticeship",
42− "bg-yellow": category === "Bounty",
40+ "bg-blue-400 text-white": category === "Proposal",
41+ "bg-green-400 text-white": category === "Apprenticeship",
42+ "bg-yellow-300": category === "Bounty",
4343 });
4444 return (
4545 <div className={`${className} badge-sm mr-1 my-1`}>
@@ -48,7 +48,7 @@ export default function GrantPreview({ grant }) {
4848 );
4949 })}
5050 {grant.taxonomies.grant_category.map((category) => (
51− <div className="bg-gray text-wall badge-sm mr-1 my-1">
51+ <div className="bg-wall-500 text-wall-100 badge-sm mr-1 my-1">
5252 {category}
5353 </div>
5454 ))}
components/Header.js+6−6
@@ -11,8 +11,8 @@ function ActiveLink({ children, href, className, currentPath }) {
1111 const firstCrumb = currentPath.split("/")[1];
1212
1313 const activeClassName = classnames({
14− "text-black": "/" + firstCrumb === href,
15− "text-gray": "/" + firstCrumb !== href,
14+ "text-wall-600": "/" + firstCrumb === href,
15+ "text-wall-500": "/" + firstCrumb !== href,
1616 });
1717
1818 return (
@@ -55,7 +55,7 @@ export default function Header(props) {
5555 </Link>
5656 {routeDepth > 2 ? (
5757 <Link href={`/${firstCrumb}`}>
58− <a className="inline md:hidden type-ui text-gray ml-2">
58+ <a className="inline md:hidden type-ui text-wall-500 ml-2">
5959 {capitalize(firstCrumb)}
6060 </a>
6161 </Link>
@@ -88,7 +88,7 @@ export default function Header(props) {
8888 </ActiveLink>
8989 <ActiveLink
9090 currentPath={currentPath}
91− className="mr-5 text-green type-ui button-text"
91+ className="mr-5 text-green-400 type-ui button-text"
9292 href="/getting-started"
9393 >
9494 Get Started
@@ -98,10 +98,10 @@ export default function Header(props) {
9898 e.stopPropagation();
9999 props.search.toggleSearch(e);
100100 }}
101− className="bg-wall text-gray flex px-4 py-1 rounded-lg type-ui"
101+ className="bg-wall-100 text-wall-500 flex px-4 py-1 rounded-lg type-ui"
102102 >
103103 <div>Search</div>
104− <div className="ml-4 text-lightGray">{shortcut}</div>
104+ <div className="ml-4 text-wall-400">{shortcut}</div>
105105 </button>
106106 </nav>
107107
components/MenuTray.js+3−3
@@ -44,7 +44,7 @@ export default function MenuTray({ isOpen, setTray, search, children }) {
4444 className={`bg-washedWhite w-screen h-screen ${overlayClasses}`}
4545 />
4646 <div
47− className={`absolute bg-wall h-screen top-0 left-0 tray-menu-width overflow-y-scroll mb-24 ${trayClasses}`}
47+ className={`absolute bg-wall-100 h-screen top-0 left-0 tray-menu-width overflow-y-scroll mb-24 ${trayClasses}`}
4848 >
4949 <div
5050 {...handlers}
@@ -59,7 +59,7 @@ export default function MenuTray({ isOpen, setTray, search, children }) {
5959 e.stopPropagation();
6060 search.toggleSearch(e);
6161 }}
62− className={`z-10 fixed px-4 items-center justify-center type-ui rounded-xl h-16 bg-white text-gray left-4 right-4 bottom-4 mobile-search-button-width ${
62+ className={`z-10 fixed px-4 items-center justify-center type-ui rounded-xl h-16 bg-white text-wall-500 left-4 right-4 bottom-4 mobile-search-button-width ${
6363 isOpen ? "flex" : "hidden"
6464 }`}
6565 >
@@ -68,7 +68,7 @@ export default function MenuTray({ isOpen, setTray, search, children }) {
6868 </nav>
6969 <button
7070 onClick={() => setTray(!isOpen)}
71− className="z-10 fixed bottom-4 right-4 w-16 h-16 bg-ultraDeepWall flex items-center justify-center rounded-full md:hidden"
71+ className="z-10 fixed bottom-4 right-4 w-16 h-16 bg-wall-600 flex items-center justify-center rounded-full md:hidden"
7272 >
7373 {isOpen ? (
7474 <svg
components/NewletterSignup.js+2−2
@@ -12,7 +12,7 @@ export default function NewsletterSignup(props) {
1212 <div className="input-group" id="mc_embed_signup_scroll">
1313 <div className="mc-field-group w-full relative">
1414 <input
15− className={`appearance-none outline-none text-gray type-ui black border-${
15+ className={`appearance-none outline-none text-wall-500 type-ui black border-${
1616 props.color || "black"
1717 } border-4 px-3 w-full mb-2 h-16 rounded-xl`}
1818 type="email"
@@ -23,7 +23,7 @@ export default function NewsletterSignup(props) {
2323 <div className="flex h-16 items-center justify-center absolute top-0 right-6">
2424 <button
2525 id="mc-embedded-subscribe"
26− className="type-ui text-gray bg-transparent"
26+ className="type-ui text-wall-500 bg-transparent"
2727 type="submit"
2828 name="subscribe"
2929 >
components/Pagination.js+2−2
@@ -8,11 +8,11 @@ export default function Pagination(props) {
88 key={`post-${props.post.slug}`}
99 >
1010 <div
11− className="bg-wall cursor-pointer font-semibold p-2 px-4 rounded-xl flex"
11+ className="bg-wall-100 cursor-pointer font-semibold p-2 px-4 rounded-xl flex"
1212 style={{ maxWidth: "45%" }}
1313 >
1414 <p className="flex-shrink-0 pr-1">{props.previous ? "<- " : ""}</p>
15− <p className="text-black truncate">{props.post.title}</p>
15+ <p className="text-wall-600 truncate">{props.post.title}</p>
1616 <p className="flex-shrink-0 pl-1">{props.next ? " ->" : ""}</p>
1717 </div>
1818 </Link>
components/PostPreview.js+2−2
@@ -26,12 +26,12 @@ export default function PostPreview(props) {
2626 </div>
2727 ) : null}
2828 {props.post.extra.ship ? (
29− <div className="type-sub-bold text-gray font-mono">
29+ <div className="type-sub-bold text-wall-500 font-mono">
3030 {props.post.extra.ship}
3131 </div>
3232 ) : null}
3333 </div>
34− <div className="text-gray type-sub mt-1">
34+ <div className="text-wall-500 type-sub mt-1">
3535 {formatDate(new Date(props.post.date))}
3636 </div>
3737 </div>
components/Search.js+10−8
@@ -98,7 +98,7 @@ class Search extends Component {
9898 >
9999 <input
100100 autoFocus
101− className="text-lg md:text-xl lg:text-2xl font-medium text-green bg-transparent py-2 px-4 outline-none relative w-full"
101+ className="text-lg md:text-xl lg:text-2xl font-medium text-green-400 bg-transparent py-2 px-4 outline-none relative w-full"
102102 placeholder="Search..."
103103 type="text"
104104 onClick={(e) => e.stopPropagation()}
@@ -121,7 +121,7 @@ class Search extends Component {
121121 return (
122122 <li
123123 className={`cursor-pointer flex text-left w-full ${
124− selected ? "bg-green" : ""
124+ selected ? "bg-green-400" : ""
125125 }`}
126126 {...getItemProps({
127127 key: item.content.slug + "-" + index,
@@ -133,13 +133,15 @@ class Search extends Component {
133133 <div className="font-semibold p-3">
134134 <p
135135 className={`text-base ${
136− selected ? "text-white" : "text-black"
136+ selected ? "text-white" : "text-wall-600"
137137 }`}
138138 >
139139 {item.content.symbol.length > 0 && (
140140 <code
141141 className={`mr-1 rounded px-1 py-0.5 ${
142− selected ? "bg-washedWhite" : "bg-wall"
142+ selected
143+ ? "bg-washedWhite"
144+ : "bg-wall-100"
143145 }`}
144146 >
145147 {item.content.symbol}
@@ -149,7 +151,7 @@ class Search extends Component {
149151 </p>
150152 <p
151153 className={`font-normal text-base mt-1 ${
152− selected ? "text-white" : "text-black"
154+ selected ? "text-white" : "text-wall-600"
153155 }`}
154156 >
155157 {item.content.desc}
@@ -162,7 +164,7 @@ class Search extends Component {
162164 return (
163165 <li
164166 className={`cursor-pointer flex text-left w-full ${
165− selected ? "bg-green" : ""
167+ selected ? "bg-green-400" : ""
166168 }`}
167169 {...getItemProps({
168170 key: item.content.link + "-" + index,
@@ -174,7 +176,7 @@ class Search extends Component {
174176 <div className="p-3">
175177 <p
176178 className={`font-medium text-base ${
177− selected ? "text-white" : "text-black"
179+ selected ? "text-white" : "text-wall-600"
178180 }`}
179181 >
180182 {item.content.parent !== "Content"
@@ -184,7 +186,7 @@ class Search extends Component {
184186 </p>
185187 <p
186188 className={`text-base font-regular text-small ${
187− selected ? "text-midWhite" : "text-gray"
189+ selected ? "text-midWhite" : "text-wall-500"
188190 }`}
189191 >
190192 {item.content.content}
components/Sidebar.js+3−3
@@ -6,10 +6,10 @@ export default function Sidebar(props) {
66 const [isOpen, setTray] = useState(false);
77 return (
88 <>
9− <div className="hidden md:flex flex-col w-96 bg-wall max-h-screen h-screen">
9+ <div className="hidden md:flex flex-col w-96 bg-wall-100 max-h-screen h-screen">
1010 <header className="flex flex-shrink-0 justify-between items-center pl-6 pt-12 mt-5 pb-8">
1111 <Link href="/">
12− <a className="type-ui text-gray">Urbit</a>
12+ <a className="type-ui text-wall-500">Urbit</a>
1313 </Link>
1414 </header>
1515 <div className="overflow-y-auto p-6 pt-16">
@@ -21,7 +21,7 @@ export default function Sidebar(props) {
2121 <MenuTray isOpen={isOpen} setTray={setTray} search={props.search}>
2222 <header className="flex flex-shrink-0 justify-between items-center pb-8">
2323 <Link href="/">
24− <a className="type-ui text-gray">Urbit</a>
24+ <a className="type-ui text-wall-500">Urbit</a>
2525 </Link>
2626 </header>
2727 {props.children}
components/TableOfContents.js+3−1
@@ -62,7 +62,9 @@ const Headings = ({ headings, activeId }) => (
6262 {heading.items.map((child) => (
6363 <li
6464 key={child.id}
65− className={child.id === activeId ? "text-green" : "text-gray"}
65+ className={
66+ child.id === activeId ? "text-green-400" : "text-wall-500"
67+ }
6668 >
6769 <a href={`#${child.id}`}>{child.title}</a>
6870 </li>
content/blog/why-hoon.md+7−6
@@ -19,6 +19,7 @@ sense.
1919
2020In particular, the problems Hoon solves that aren't solved by other
2121functional languages are:
22+
2223- Compile and run other code in a typesafe manner at full speed,
2324- Typesafe metaprogramming, and
2425- Hot code reload and online data migration.
@@ -125,15 +126,15 @@ Hoon and Nock have several unusual properties:
125126 environment are just Nock trees. We even have a statically typed
126127 metacircular interpreter called <code>+mule</code>. We run userspace code
127128 metacircularly with negligible performance overhead because of Urbit's
128− jet system. In Lisp "eval is evil" is a common saying but, in Urbit,
129+ jet system. In Lisp, "eval is evil" is a common saying, but in Urbit,
129130 eval is a first-class feature.
130131
131132- **Universally serializable**. There's one serialization format, called
132133 "jam", for any piece of code or data in the system. This makes it so
133134 that deserialization has just one function, a few hundred lines of C,
134135 as its security attack surface. It also facilitates portability of
135− the virtual machine state, and it turns out to be useful in a bunch of
136− places in the system.
136+ the virtual machine state, since this function can be called on the
137+ top-level VM state itself to generate a portable snapshot.
137138
138139- **Jetted**. A jet is a piece of code that the Nock interpreter has that
139140 reimplements a Nock function in some other, faster language. The `+dec`
@@ -143,7 +144,7 @@ Hoon and Nock have several unusual properties:
143144 the runtime has a matching jet, it will use that instead of the Nock
144145 implementation. Nock isn't as slow as you might think, especially
145146 considering it's a minimal, dynamic, axiomatic language.
146−<br/><br/>
147+ <br/><br/>
147148 This arrangement has the deeper implication that all code written in
148149 Nock is best considered as a specification for a program, which can be
149150 executed directly but might never run at all due to being jetted.
@@ -183,8 +184,8 @@ Hoon and Nock have several unusual properties:
183184 consists of the standard library (itself a stack of cores), and
184185 possibly a "sample" (function argument).
185186
186−- **The type system has several unusual features**. It's intentional, in
187− the sense that all constructs are first-class and can be down-cast to
187+- **The type system has several unusual features**. It's intensional, in
188+ the sense that all constructs are first-class and can be up-cast to
188189 `noun`, Hoon's "any" or "top" type that matches all Nock nouns. Types
189190 are also used as scopes, so they store all of Hoon's variable names
190191 and docstrings. The type system uses an unusual macro-like feature
content/docs/arvo/behn/_index.md+16
@@ -5,3 +5,19 @@ sort_by = "weight"
55template = "sections/docs/chapters.html"
66insert_anchor_links = "right"
77+++
8+
9+## [Overview](/docs/arvo/behn/behn)
10+
11+An overview of Behn, Urbit's timer vane.
12+
13+## [API Reference](/docs/arvo/behn/tasks)
14+
15+The `task`s Behn takes and the `gift`s it returns.
16+
17+## [Scry Reference](/docs/arvo/behn/scry)
18+
19+The scry endpoints of Behn.
20+
21+## [Examples](/docs/arvo/behn/examples)
22+
23+Practical examples of using Behn's `task`s.
content/docs/arvo/behn/behn-api.mddeleted−246
@@ -1,246 +0,0 @@
1−+++
2−title = "API Reference"
3−weight = 10
4−template = "doc.html"
5−+++
6−
7−In this document we describe the public interface for Behn. Namely, we describe
8−each `task` that Behn can be `pass`ed, and which `gift`(s) Behn can `give` in return.
9−
10−
11−## Tasks
12−
13−### `%born`
14−
15−Each time you start your Urbit, the Arvo kernel calls the `%born` task for Behn. When
16−called, Behn gets the current time from Unix and updates its list of timers
17−accordingly.
18−
19−#### Accepts
20−
21−```hoon
22−[~]
23−```
24−
25−#### Returns
26−
27−`%born` does not return a `gift`.
28−
29−
30−### `%crud`
31−
32−`%crud` is called whenever an error involving Behn occurs, such as trying to
33−`%wake` a program that has crashed.
34−
35−When called, it checks to see if the set of timers is empty. If so, it prints
36−an error report containing `error`, otherwise it passes the error to `+wake`.
37−
38−#### Accepts
39−
40−```hoon
41−[tag=@tas error=tang]
42−```
43−Here, `tag` is a `@tas` denoting the type of error, and `error` is an error message.
44−
45−#### Returns
46−
47−```hoon
48−[%wake %behn-crud-no-timer tag error]
49−```
50−
51−If the set of timers is nonempty when Behn is `%pass`ed a `%crud` `task`, Behn
52−`%give`s a `%wake` `card` containing the error to the next client in the set of timers.
53−
54−
55−#### Example
56−
57−The most common error that occurs is when Behn tries to `%wake` up a program that has crashed. When this happens
58−the entire event (i.e. sequence of `move`s) that led up to the `%wake` is thrown
59−away, and Vere then causes the kernel to `pass` Behn a `%crud` `task` containing
60−the stack trace.
61−
62−
63−### `%drip`
64−
65−`%drip` allows one to delay a `gift` until a timer set for `now` fires.
66−
67−A Client `%slip`s Behn a `%drip` task wrapping a `gift` to be `give`n to a Target.
68−This launches a sequence of `move`s as written here:
69−
70−```
71−Client -- %slip %drip --> Behn -- %pass %wait --> Behn -- %give %wake --> Behn -- %give %meta --> Target
72−```
73−Here the `%meta` `move` is a wrapper for the `%gift` inside of the initial `%drip` wrapper.
74−
75−`%drip` only handles `gift`s, and can only schedule `gift`s for as soon as
76−possible after the prescribed timer fires.
77−
78−
79−#### Accepts
80−
81−```hoon
82−mov=vase
83−```
84−
85−`%drip` takes in a `%give` `move` in a `vase`.
86−
87−#### Returns
88−
89−In response to a `%drip` `task`, Behn will `%pass` a `%wait` to itself, which
90−then triggers a `%wake` `gift` to itself, which then causes Behn to `%give` a `%meta` `gift` containing
91−the `gift` originally `%give`n to Behn when `%drip` was first called. That makes
92−Behn its own client for `%drip`.
93−
94−#### Example
95−
96−
97−Say an app (the Target) is subscribed to updates from Clay (the Client). If Clay `%give`s
98−updates to the app directly and the app crashes, this may cause Clay to crash as
99−well. If instead Clay `%pass`es Behn a `%drip` `task` wrapping the update
100−`gift`, Behn will set a timer for `now` that, when fired, will cause the update
101−`gift` to be given. If it causes a crash then it will have been in response to
102−the `%drip` move, thereby isolating Clay from the crash. Thus `%drip` acts as a sort of buffer against cascading
103−sequences of crashes.
104−
105−
106−
107−### `%huck`
108−
109−Immediately gives back an input move.
110−
111−#### Accepts
112−
113−```hoon
114−mov=vase
115−```
116−
117−Behn takes in a `move` contained in a `vase`.
118−
119−#### Returns
120−
121−```hoon
122−[%give %meta mov]
123−```
124−
125−Behn returns the input `move` as a `%meta` `gift`.
126−
127−
128−
129−### `%rest`
130−
131−Cancels a timer that was previously set.
132−
133−Behn takes in a `@da` and cancels the timer at that time if it exists, then
134−adjusts the next wakeup call from Unix if necessary.
135−
136−#### Task
137−
138−```hoon
139−@da
140−```
141−
142−
143−#### Gift
144−
145−This `task` returns no `gift`s.
146−
147−
148−
149−### `%trim`
150−
151−This `task` is sent by the interpreter in order to free up memory.
152− This `task` is empty for Behn, since it is not a good idea to forget your timers.
153−
154−#### Accepts
155−
156−This `task` has no arguments.
157−
158−#### Returns
159−
160−This task returns nothing.
161−
162−### `%vega`
163−
164−This `task` informs the vane that the kernel has been upgraded. Behn does not do
165−anything in response to this.
166−
167−#### Accepts
168−
169−This `task` has no arguments.
170−
171−#### Returns
172−
173−This `task` returns nothing.
174−
175−
176−
177−### `%wait`
178−
179−This `task` takes in a `@da` which Behn then adds to `timers.state`, the list of timers.
180−
181−#### Accepts
182−
183−```hoon
184−@da
185−```
186−
187−#### Returns
188−
189−This `task` returns a `%wake` `gift` once the timer has fired.
190−
191−
192−### `%wake`
193−
194−This `task` is sent by the kernel when the Unix timer tells the kernel that it
195−is time for Behn to wake up. This is often caused by a `%doze` `gift` that
196−Behn originally sent to the kernel that is then forwarded to Unix, which is
197−where the real timekeeping occurs.
198−
199−Upon receiving this `task`, Behn processes the elapsed timer and then sets
200−`:next-wake`.
201−
202−`%wake` is also a `gift` that Behn can `%give`. This is done to inform other
203−vanes or apps that a timer has expired, and may include an error message.
204−
205−#### Accepts
206−
207−As a `task`, `%wake` takes in `~`.
208−
209−As a `gift`, `%wake` may include an error message.
210−
211−```hoon
212−error=(unit tang)
213−```
214−
215−
216−#### Returns
217−
218−In response to receiving this `task`, Behn may `%give` a `%doze` `gift`
219−containing the `@da` of the next timer to elapse. Behn may also `%give` a
220−`%wake` `gift` to itself.
221−
222−
223−
224−### `%wegh`
225−
226−This `task` asks Behn to product a memory usage report.
227−
228−#### Accepts
229−
230−This `task` has no arguments.
231−
232−#### Returns
233−
234−```hoon
235−:_ state :_ ~
236− :^ duct %give %mass
237− :+ %behn %|
238− :~ timers+&+timers.state
239− dot+&+state
240−```
241−
242−When Behn is `%pass`ed this `task`, it will `%give` a `%mass` `gift` in response
243−containing Behn's current memory usage.
244−
245−
246−
content/docs/arvo/behn/behn.md+11−13
@@ -3,19 +3,17 @@ title = "Overview"
33weight = 1
44template = "doc.html"
55+++
6−Our simple timer.
76
8−It allows vanes and applications to set and timer events, which are
9−managed in a simple priority queue. `%behn` produces effects to start
10−the unix timer, and when the requested `%behn` passes, unix sends wake
11−events to `%behn`, which time routes back to original sender. We don't
12−guarantee that a timer event will happen at exactly the `%behn` it was
13−set for, or even that it'll be particularly close. A timer event is a
14−request to not be woken until after the given time.
7+Urbit's timer vane.
158
16−`%eyre` uses `%behn` for timing out sessions, and `%clay` uses `%behn`
17−for keeping track of time-specified file requests. `%ames` should
18−probably use `%behn` to keep track of things like network timeouts and
19−retry timing, but it currently uses its own alarm system.
9+Behn manages timers in a simple priority queue. Other vanes and applications ask Behn to set a timer to go off at the given time, and Behn produces effects that start the timers on Unix. When the timer goes off, Unix sends an event to Behn, which then notifies the original requester. We don't gurantee that a timer event will happen at exactly the time it was set for, or even that it'll be particularly close. A timer event is a request to not be woken until after the given time.
2010
21−This article is a stub. For more information, see either `behn.hoon` or [Lesson 2.6 - Behn](/docs/hoon/hoon-school/behn) of the Hoon tutorial.
11+Additional information about Behn is included in [Lesson 2.6 - Behn](/docs/hoon/hoon-school/behn) of the Hoon tutorial.
12+
13+## Sections
14+
15+[API Reference](/docs/arvo/behn/tasks) - The `task`s Behn takes and the `gift`s it returns.
16+
17+[Scry Reference](/docs/arvo/behn/scry) - The scry endpoints of Behn.
18+
19+[Examples](/docs/arvo/behn/examples) - Practical examples of using Behn's `task`s.
content/docs/arvo/behn/examples.mdnew file+95
@@ -0,0 +1,95 @@
1++++
2+title = "Examples"
3+weight = 4
4+template = "doc.html"
5++++
6+
7+Here are a couple of practical examples of using Behn's `%wait` and `%rest` `task`s.
8+
9+## %wait
10+
11+Here we'll look at setting a timer by passing Behn a `%wait` `task` and taking the `%wake` `gift` it returns when the timer fires.
12+
13+Below is a thread which will take a `@dr` as its argument and `%pass`es Behn a `%wait` `task` to fire `@dr` in the future. When the timer fires, it'll then take the `%wake` `gift` and print it to the terminal along with the time that has elapsed.
14+
15+`wait.hoon`
16+
17+```hoon
18+/- spider
19+/+ *strandio
20+=, strand=strand:spider
21+^- thread:spider
22+|= arg=vase
23+=/ m (strand ,vase)
24+^- form:m
25+=/ delay=@dr (need !<((unit @dr) arg))
26+;< t1=@da bind:m get-time
27+=/ =task:behn [%wait (add delay t1)]
28+=/ =card:agent:gall [%pass /timer %arvo %b task]
29+;< ~ bind:m (send-raw-card card)
30+;< res=(pair wire sign-arvo) bind:m take-sign-arvo
31+?> ?=([%timer ~] p.res)
32+?> ?=([%behn %wake *] q.res)
33+%- (slog ~[leaf+"Gift: {<+.q.res>}"])
34+?~ error.q.res
35+ ;< t2=@da bind:m get-time
36+ %- (slog ~[leaf+"Time elapsed: {<`@dr`(sub t2 t1)>}"])
37+ (pure:m !>(~))
38+%- (slog u.error.q.res)
39+(pure:m !>(~))
40+```
41+
42+Save the thread to `/ted/wait.hoon` and `|commit %home`. Then we can try running the thread with a `@dr` of `~s2`:
43+
44+```
45+> -wait ~s2
46+Gift: [%wake error=~]
47+Time elapsed: ~s2..0154
48+```
49+
50+As you can see, the timer has fired successfully after `~s2` and Behn has given us a `%wake` `gift`.
51+
52+## %rest
53+
54+Here we'll look at cancelling a previously set timer by passing Behn a `%rest` `task`.
55+
56+Below is a variation on the [%wake](#wake) thread. It takes a `@dr` as its argument and sets a timer that far in the future, as before. However, it also sets a second timer twice the `@dr` in the future, and then cancels the first with a `%rest` `task`. If the `%rest` `task` succeeds in cancelling the first timer, the `%wake` `gift` will arrive after double the specified delay.
57+
58+`rest.hoon`
59+
60+```hoon
61+/- spider
62+/+ *strandio
63+=, strand=strand:spider
64+^- thread:spider
65+|= arg=vase
66+=/ m (strand ,vase)
67+^- form:m
68+=/ delay=@dr (need !<((unit @dr) arg))
69+;< t1=@da bind:m get-time
70+=/ timer1=@da (add t1 delay)
71+=/ timer2=@da (add t1 (mul delay 2))
72+;< ~ bind:m (send-raw-card [%pass /timer %arvo %b %wait timer1])
73+;< ~ bind:m (send-raw-card [%pass /timer %arvo %b %wait timer2])
74+;< ~ bind:m (send-raw-card [%pass /timer %arvo %b %rest timer1])
75+;< res=(pair wire sign-arvo) bind:m take-sign-arvo
76+?> ?=([%timer ~] p.res)
77+?> ?=([%behn %wake *] q.res)
78+%- (slog ~[leaf+"Gift: {<+.q.res>}"])
79+?~ error.q.res
80+ ;< t2=@da bind:m get-time
81+ %- (slog ~[leaf+"Time elapsed: {<`@dr`(sub t2 t1)>}"])
82+ (pure:m !>(~))
83+%- (slog u.error.q.res)
84+(pure:m !>(~))
85+```
86+
87+Save the above thread to `/ted/rest.hoon`, and `|commit %home`. Let's try run it with an argument of `~s2`:
88+
89+```
90+> -rest ~s2
91+Gift: [%wake error=~]
92+Time elapsed: ~s4..00d4
93+```
94+
95+As you can see, the timer fired after four seconds, which means the two second timer was successfully cancelled by the `%rest` `task`.
content/docs/arvo/behn/scry.mdnew file+46
@@ -0,0 +1,46 @@
1++++
2+title = "Scry Reference"
3+weight = 3
4+template = "doc.html"
5++++
6+
7+Here are Behn's scry endpoints. There's only a few and they're mostly just useful for debugging. All of Behn's scries take a `%x` `care` and require the `desk` in the path prefix be empty, so the general format is `.^([type] %bx /=//=/[some-path])`.
8+
9+## /debug/timers
10+
11+A scry with a `%x` `care` and a `path` of `/debug/timers` will return the timestamp and `duct` of all timers which are currently set. The type returned is a `(list [@da duct])`.
12+
13+```
14+> .^((list [@da duct]) %bx /=//=/debug/timers)
15+~[
16+ [~2021.8.9..16.16.30..9d49 ~[/ames/pump/~wet/0 /ames]]
17+ [~2021.8.9..16.17.58..597d ~[/ames/pump/~nes/0 /ames]]
18+]
19+```
20+
21+## /timers
22+
23+A scry with a `%x` `care` and a `path` of `/timers` will return the timestamps of all timers currently set. The type returned is a `(list @da)`.
24+
25+```
26+> .^((list @da) %bx /=//=/timers)
27+~[~2021.8.9..16.17.02..9de6 ~2021.8.9..16.17.58..597d]
28+```
29+
30+## /timers/next
31+
32+A scry with a `%x` `care` and a `path` of `/timers/next` will return the timestamp of the timer set to fire next, or null if there's none. The type returned is a `(unit @da)`.
33+
34+```
35+> .^((unit @da) %bx /=//=/timers/next)
36+[~ ~2021.8.9..16.17.58..597d]
37+```
38+
39+## /timers/[da]
40+
41+A scry with a `%x` `care` and a `path` of `/timers/[da]` (where `[da]` is an absolute date) will return all timers which are scheduled to fire between now and the specified date (inclusive). The type returned is a `(list @da)`.
42+
43+```
44+> .^((list @da) %bx /=//=/timers/(scot %da (add now ~d1)))
45+~[~2021.8.9..16.17.58..597d ~2021.8.9..16.18.06..a24b]
46+```
content/docs/arvo/behn/tasks.mdnew file+155
@@ -0,0 +1,155 @@
1++++
2+title = "API Reference"
3+weight = 2
4+template = "doc.html"
5++++
6+
7+In this document we describe the public interface for Behn. Namely, we describe each `task` that Behn can be `pass`ed, and which `gift`(s) Behn can `give` in return.
8+
9+Most of Behn's `task`s are only used by the kernel or runtime. The two `task`s you're likely to use from userspace are [%wait](#wait) for setting a timer and [%rest](#rest) for cancelling a timer.
10+
11+## `%born`
12+
13+```hoon
14+[%born ~]
15+```
16+
17+Each time you start your urbit, the Arvo kernel calls the `%born` task for Behn. When called, Behn gets the current time from Unix and updates its list of timers accordingly.
18+
19+You would not use this `task` from userspace.
20+
21+#### Returns
22+
23+Behn does not return any `gift` in response to a `%born` `task`.
24+
25+## `%rest`
26+
27+```hoon
28+[%rest p=@da]
29+```
30+
31+Cancel a timer.
32+
33+Behn takes in a `@da` and cancels the timer at that time if it exists, then adjusts the next wakeup call from Unix if necessary.
34+
35+#### Returns
36+
37+Behn does not return any `gift` in response to a `%rest` `task`.
38+
39+#### Example
40+
41+See the [%rest](/docs/arvo/behn/examples#rest) section of the Examples document.
42+
43+## `%drip`
44+
45+```hoon
46+[%drip p=vase]
47+```
48+
49+`%drip` allows one to delay a `gift` until a timer set for `now` fires.
50+
51+A Client `%slip`s Behn a `%drip` task wrapping a `gift` to be `give`n to a Target. This launches a sequence of `move`s as written here:
52+
53+```
54+Client -- %slip %drip --> Behn -- %pass %wait --> Behn -- %give %wake --> Behn -- %give %meta --> Target
55+```
56+
57+Here the `%meta` `move` is a wrapper for the `%gift` inside of the initial `%drip` wrapper.
58+
59+`%drip` only handles `gift`s, and can only schedule `gift`s for as soon as possible after the prescribed timer fires.
60+
61+`%drip` takes in a `%give` `move` in a `vase`.
62+
63+A `%drip` `task` is not likely to be used from userspace.
64+
65+#### Returns
66+
67+In response to a `%drip` `task`, Behn will `%pass` a `%wait` to itself, which then triggers a `%wake` `gift` to itself, which then causes Behn to `%give` a `%meta` `gift` containing the `gift` originally `%give`n to Behn when `%drip` was first called. That makes Behn its own client for `%drip`.
68+
69+#### Example
70+
71+Say an app (the Target) is subscribed to updates from Clay (the Client). If Clay `%give`s updates to the app directly and the app crashes, this may cause Clay to crash as well. If instead Clay `%pass`es Behn a `%drip` `task` wrapping the update `gift`, Behn will set a timer for `now` that, when fired, will cause the update `gift` to be given. If it causes a crash then it will have been in response to the `%drip` move, thereby isolating Clay from the crash. Thus `%drip` acts as a sort of buffer against cascading sequences of crashes.
72+
73+## `%huck`
74+
75+```hoon
76+[%huck syn=sign-arvo]
77+```
78+
79+Immediately gives back a `sign-arvo`.
80+
81+You would not use this `task` from userspace.
82+
83+#### Returns
84+
85+Behn returns the input `sign-arvo` as a `%heck` `gift`:
86+
87+```hoon
88+[%heck syn=sign-arvo]
89+```
90+
91+## `%trim`
92+
93+```hoon
94+[%trim p=@ud]
95+```
96+
97+This `task` is sent by the interpreter in order to free up memory. Behn does not do anything with this `task`, since it is not a good idea to forget your timers.
98+
99+You would not use this `task` from userspace.
100+
101+#### Returns
102+
103+Behn does not return any `gift` in response to a `%trim` `task`.
104+
105+## `%vega`
106+
107+```hoon
108+[%vega ~]
109+```
110+
111+This `task` informs the vane that the kernel has been upgraded. Behn does not do anything in response to this.
112+
113+You would not use this `task` from userspace.
114+
115+#### Returns
116+
117+Behn does not return any `gift` in response to a `%vega` `task`.
118+
119+## `%wait`
120+
121+```hoon
122+[%wait p=@da]
123+```
124+
125+Set timer.
126+
127+This `task` sets a timer to fire at the `@da` specified in `p`.
128+
129+#### Returns
130+
131+Behn returns a `%wake` `gift` in response to a `%wait` `task`, once the timer has fired. A `%wake` `gift` looks like:
132+
133+```hoon
134+[%wake error=(unit tang)]
135+```
136+
137+The `error` `unit` will be `~` if successful, or contain a traceback in the `tang` if the timer failed for some reason.
138+
139+#### Example
140+
141+See the [%wait](/docs/arvo/behn/tasks#wait) section of the Examples document.
142+
143+## `%wake`
144+
145+```hoon
146+[%wake ~]
147+```
148+
149+This `task` is sent by the kernel when the Unix timer tells the kernel that it is time for Behn to wake up. This is often caused by a `%doze` `gift` that Behn originally sent to the kernel that is then forwarded to Unix, which is where the real timekeeping occurs.
150+
151+You would not use this `task` from userspace.
152+
153+#### Returns
154+
155+In response to receiving this `task`, Behn may `%give` a `%doze` `gift` containing the `@da` of the next timer to elapse. Behn may also `%give` a `%wake` `gift` to itself.
content/docs/arvo/clay/examples.md+21−22
@@ -8,31 +8,31 @@ template = "doc.html"
88
99- [Introduction](#introduction)
1010- [%warp](#warp) - Read and Subscribe.
11− - [%sing](#sing) - Read a file or directory.
12− - [%next](#next) - Subscribe for the next change to a file or directory.
13− - [%mult](#mult) - Subscribe for the next change to a set of files and/or directories.
14− - [%many](#many) - Track changes to a `desk` for the specified range of revisions.
15− - [Cancel Subscription](#cancel-subscription)
11+ - [%sing](#sing) - Read a file or directory.
12+ - [%next](#next) - Subscribe for the next change to a file or directory.
13+ - [%mult](#mult) - Subscribe for the next change to a set of files and/or directories.
14+ - [%many](#many) - Track changes to a `desk` for the specified range of revisions.
15+ - [Cancel Subscription](#cancel-subscription)
1616- [%info](#info) - Write and Modify.
17− - [%ins](#ins) - Add a file.
18− - [%del](#del) - Delete a file.
19− - [%mut](#mut) - Change a file.
20− - [Multiple Changes](#multiple-changes) - Change multiple files.
17+ - [%ins](#ins) - Add a file.
18+ - [%del](#del) - Delete a file.
19+ - [%mut](#mut) - Change a file.
20+ - [Multiple Changes](#multiple-changes) - Change multiple files.
2121- [Manage Mounts](#manage-mounts)
22− - [%boat](#boat) - List mounts.
23− - [%mont](#mont) - Mount something.
24− - [%ogre](#ogre) - Unmount something.
25− - [%dirk](#dirk) - Commit changes.
22+ - [%boat](#boat) - List mounts.
23+ - [%mont](#mont) - Mount something.
24+ - [%ogre](#ogre) - Unmount something.
25+ - [%dirk](#dirk) - Commit changes.
2626- [Merge Desks](#merge-desks)
27− - [%merg](#merg)
27+ - [%merg](#merg)
2828- [Permissions](#permissions)
29− - [%perm](#perm) - Set file permissions.
30− - [%cred](#cred) - Add permission group.
31− - [%crew](#crew) - Get permission groups.
32− - [%crow](#crow) - Get group usage.
29+ - [%perm](#perm) - Set file permissions.
30+ - [%cred](#cred) - Add permission group.
31+ - [%crew](#crew) - Get permission groups.
32+ - [%crow](#crow) - Get group usage.
3333- [Foreign Ships](#foreign-ships)
34− - [%warp](#warp-remote) - Read a file on a foreign ship.
35− - [%merg](#merg-remote) - Merge from a foreign `desk`.
34+ - [%warp](#warp-remote) - Read a file on a foreign ship.
35+ - [%merg](#merg-remote) - Merge from a foreign `desk`.
3636
3737# Introduction
3838
@@ -63,13 +63,12 @@ Most examples will either use `|pass` to just send a `task` or the following thr
6363
6464# `%warp`
6565
66−See the [Read and Subscribe](/docs/arvo/clay/tasks#warp) section of the [API Reference](/docs/arvo/clay/tasks) document for general details.
66+See the [Read and Subscribe](/docs/arvo/clay/tasks#warp---read-and-track) section of the [API Reference](/docs/arvo/clay/tasks) document for general details.
6767
6868## `%sing`
6969
7070Here we'll look at reading files by passing Clay a `%warp` `task` with a `%sing` `rave` and receiving a `%writ` `gift` containing the data in response.
7171
72−
7372Using the `send-task-take-gift.hoon` thread, let's try reading `gen/hood/hi.hoon`:
7473
7574```
content/docs/arvo/clay/scry.md+27−54
@@ -11,33 +11,7 @@ The various Clay scries are specified by a `care`, which is a single character c
1111[~.~zod ~.home ~.~2021.4.26..02.29.03..d31b ~]
1212```
1313
14−## Contents
15−
16−- [%a](#a) - Build a `hoon` file.
17−- [%b](#b) - Dynamic `mark`.
18−- [%c](#c) - Dynamic `mark` conversion.
19−- [%d](#d) - List `desk`s.
20−- [%e](#e) - Static `mark`.
21−- [%f](#f) - Static `mark` conversion.
22−- [%p](#p) - File permissions.
23−- [%r](#r) - Vase-wrapped file data.
24−- [%s](#s) - Miscellaneous scries:
25− - [%yaki](#yaki) - `yaki:clay` of the specified commit.
26− - [%blob](#blob) - `blob:clay` of file.
27− - [%hash](#hash) - Content hash of the specified commit.
28− - [%cage](#cage) - `cage` of the data of a file.
29− - [%open](#open) - Compile prelude of file.
30− - [%late](#late) - Most recent `case` of `desk`.
31− - [%base](#base) - Mergebase of two `desk`s.
32−- [%t](#t) - List files in directory.
33−- [%u](#u) - Check for existence of file.
34−- [%v](#v) - Desk state.
35−- [%w](#w) - Revision number of the given `desk` `case`.
36−- [%x](#x) - Raw data of file.
37−- [%y](#y) - `arch` of a file or directory.
38−- [%z](#z) - Content hash of a file or directory.
39−
40−## %a
14+## %a - Build hoon.
4115
4216A scry with a `care` of `%a` will build a `hoon` file and return it as a `vase`.
4317
@@ -47,7 +21,7 @@ Example:
4721.^(vase %ca /===/lib/strandio/hoon)
4822```
4923
50−## %b
24+## %b - Dyn. mark core.
5125
5226A scry with a `care` of `%b` will produce a `dais:clay` processed `mark` core for the specified `mark`. The `path` in the scry is a `mark`.
5327
@@ -57,9 +31,9 @@ Example:
5731.^(dais:clay %cb /===/txt)
5832```
5933
60−## %c
34+## %c - Dyn. mark convert.
6135
62−A scry with a `care` of `%c` will produce a `tube:clay` dynamically typed `mark` conversion gate. The `path` specifies two `mark`s - *from* and *to*, like `/txt/noun`.
36+A scry with a `care` of `%c` will produce a `tube:clay` dynamically typed `mark` conversion gate. The `path` specifies two `mark`s - _from_ and _to_, like `/txt/noun`.
6337
6438Example:
6539
@@ -69,7 +43,7 @@ Example:
6943[p=/text/plain q=[p=3 q=7.303.014]]
7044```
7145
72−## %d
46+## %d - List desks.
7347
7448A scry with a `care` of `%d` will return a `(set desk)` of the `desk`s that exist on your ship.
7549
@@ -80,19 +54,19 @@ Example:
8054{%home %kids}
8155```
8256
83−## %e
57+## %e - Static mark core.
8458
85−A scry with a `care` of `%e` will return a statically typed `nave:clay` `mark` core in a `vase`. The `path` in the scry specifies the `mark`.
59+A scry with a `care` of `%e` will return a statically typed `nave:clay` `mark` core. The `path` in the scry specifies the `mark`. The type returned is a `(nave:clay {type} {diff})`, where `{type}` is the type the `mark` takes and `{diff}` is the type taken by the `mark` specified in `+form:grad`.
8660
8761Example:
8862
8963```
90−.^(vase %ce /===/noun)
64+.^((nave:clay noun noun) %ce /===/noun)
9165```
9266
93−## %f
67+## %f - Stat. mark convert.
9468
95−A scry with a `care` of `%f` will return a static `mark` conversion gate. The `path` specifies two `mark`s - *from* and *to*, like `/txt/mime`.
69+A scry with a `care` of `%f` will return a static `mark` conversion gate. The `path` specifies two `mark`s - _from_ and _to_, like `/txt/mime`.
9670
9771```
9872> =a .^($-(text mime) %cf /===/txt/mime)
@@ -100,7 +74,7 @@ A scry with a `care` of `%f` will return a static `mark` conversion gate. The `p
10074[p=/text/plain q=[p=3 q=7.303.014]]
10175```
10276
103−## %p
77+## %p - File permissions.
10478
10579A scry with a `care` of `%p` will return the permissions of the file or directory in question. The type returned is a `[dict:clay dict:clay]` where the head is read permissions and the tail is write permissions.
10680
@@ -113,7 +87,7 @@ Example:
11387[[src=/ rul=[mod=%white who=[p={} q={}]]] src=/ rul=[mod=%white who=[p={} q={}]]]
11488```
11589
116−## %r
90+## %r - File as vase.
11791
11892A scry with a `care` of `%r` will return the data of the given file wrapped in a `vase` or crash if it's a directory. It's basically just a vase-wrapped `%x` scry.
11993
@@ -137,13 +111,13 @@ Examples:
137111Crash!
138112```
139113
140−## %s
114+## %s - Misc. scries.
141115
142116A scry with a `care` of `%s` is for miscellaneous internal and debug functions and is liable to change in the future.
143117
144118Rather than just a `path` to a file, the head of the `path` is tagged with one of `%yaki %blob %hash %cage %open %late %base` and the tail depends on which tag you use. We'll look at each in turn.
145119
146−### %yaki
120+### %yaki - Commit.
147121
148122This will return the [yaki:clay](/docs/arvo/clay/data-types#yaki-clay-commit) of the specified commit. It takes a [tako:clay](/docs/arvo/clay/data-types#tako-clay-commit-reference).
149123
@@ -168,7 +142,7 @@ Here we scry the [dome:clay](/docs/arvo/clay/data-types#dome-desk-data) for `/==
168142]
169143```
170144
171−### %blob
145+### %blob - File blob.
172146
173147This will return the [blob:clay](/docs/arvo/clay/data-types#blob-clay-data) of some file. It takes a [lobe:clay](/docs/arvo/clay/data-types#lobe-clay-data-reference).
174148
@@ -191,7 +165,7 @@ Here we grab the `lobe:clay` of `/gen/hood/hi/hoon` with a `%y` scry, then use i
191165]
192166```
193167
194−### %hash
168+### %hash - Commit hash.
195169
196170This will return the `@uvI` content hash of the specified commit. It takes a `tako:clay`.
197171
@@ -206,7 +180,7 @@ Here we grab the `dome:clay` for `/===` with a `%v` scry, get the latest `tako:c
2061800v16.er7uq.oke4u.cru7u.nglu9.q3su7.6ub1o.bh4qk.r5uav.ut12d.5rdl5
207181```
208182
209−### %cage
183+### %cage - File as cage.
210184
211185This will return a `cage` of the data of some file. It takes a `lobe:clay`.
212186
@@ -228,11 +202,11 @@ Here we grab the `lobe:clay` of `/gen/hood/hi/hoon` with a `%y` scry, then use i
228202]
229203```
230204
231−### %open
205+### %open - Build prelude.
232206
233207This is like a `%a` scry but it only compiles the prelude to the file, e.g. the Ford rune imports. Proper documentation for this will be done as part of Ford documentaton at a later date.
234208
235−### %late
209+### %late - Latest case.
236210
237211This will return the most recent revision number of a `desk` that has been fully downloaded. The type it returns is a `cass:clay`. The `case` in the `beak` must be a revision number rather than a date. You can just provide a case of `1` since it returns the latest regardless. If we have nothing for the specified `desk`, this will just return the bunt of a `cass:clay` like `cass=[ud=0 da=~2000.1.1]`.
238212
@@ -248,7 +222,7 @@ cass=[ud=50 da=~2021.4.22..10.38.50..57a8]
248222cass=[ud=0 da=~2000.1.1]
249223```
250224
251−### %base
225+### %base - Merge-base.
252226
253227This will return the mergebase (i.e. most recent common ancestor) between two `desk`s. The type it returns is a `(list tako:clay)`. The first `desk` will just be the one in the `beak` `path` prefix and the second will be specified like `/ship/desk` at the end of the scry `path`. If there is no common ancestor between the two `desk`s, this will just produce an empty `list`.
254228
@@ -264,7 +238,7 @@ Examples:
264238~
265239```
266240
267−## %t
241+## %t - List files.
268242
269243A scry with a `care` of `%t` will return a `(list path)` of all files in the given directory, or just a `(list path)` of the single file if it's a file. This is done recursively so will provide files in subdirectories as well. The paths will be fully qualified except for the `ship`, `desk` and `case`. If the directory or file specified does not exist, it will return an empty `list`.
270244
@@ -292,7 +266,7 @@ Examples:
292266~
293267```
294268
295−## %u
269+## %u - Check exists.
296270
297271A scry with a `care` of `%u` will return a `?` depending on whether the file exists. It will produce `%.n` if it's a directory or doesn't exist and will produce `%.y` if it's a file and exists.
298272
@@ -313,7 +287,7 @@ Examples:
313287%.n
314288```
315289
316−## %v
290+## %v - Desk state.
317291
318292A scry with a care of `%v` will return the entire state of a `desk` as a `dome:clay`.
319293
@@ -327,7 +301,7 @@ Example:
327301
328302Note: If you try printing this it will take forever and probably OOM your ship.
329303
330−## %w
304+## %w - Revision number.
331305
332306A scry with a `care` of `%w` will return the revision number and date of a given `case`. The type returned is a `cass:clay` like `[ud=@ud da=@da]` where `ud` is the revision number and `da` is the date.
333307
@@ -338,11 +312,10 @@ Example:
338312[ud=2 da=~2021.4.13..19.12.49..3389]
339313```
340314
341−## %x
315+## %x - Read file.
342316
343317A scry with a `care` of `%x` will return the raw data of a file as an `@` or crash if it's a directory.
344318
345−
346319Examples:
347320
348321```
@@ -360,7 +333,7 @@ Examples:
360333Crash!
361334```
362335
363−## %y
336+## %y - Read arch.
364337
365338A scry with a `care` of `%y` will return the `arch` of a file or directory.
366339
@@ -401,7 +374,7 @@ Examples:
401374[fil=~ dir={}]
402375```
403376
404−## %z
377+## %z - Content hash.
405378
406379A scry with a `care` of `%z` will return the hash of a file or the recursive hash of a directory. If the file or directory doesn't exist it will return a null value.
407380
content/docs/arvo/clay/tasks.md+101−153
@@ -4,49 +4,18 @@ weight = 6
44template = "doc.html"
55+++
66
7−# Contents
8−
9−- [Introduction](#introduction)
10−- [%warp](#warp) - Read and Subscribe.
11− - [%sing](#sing) - Read a file or directory.
12− - [%next](#next) - Subscribe for the next change to a file or directory.
13− - [%mult](#mult) - Subscribe for the next change to a set of files and/or directories.
14− - [%many](#many) - Track changes to a `desk` for the specified range of revisions.
15− - [Cancel Subscription](#cancel-subscription)
16−- [Write and Modify](#write-and-modify)
17− - [%info](#info)
18−- [Manage Mounts](#manage-mounts)
19− - [%boat](#boat) - List mounts.
20− - [%mont](#mont) - Mount something.
21− - [%ogre](#ogre) - Unmount something.
22− - [%dirk](#dirk) - Commit changes.
23−- [Merge Desks](#merge-desks)
24− - [%merg](#merg)
25−- [Permissions](#permissions)
26− - [%perm](#perm) - Set file permissions.
27− - [%cred](#cred) - Add permission group.
28− - [%crew](#crew) - Get permission groups.
29− - [%crow](#crow) - Get group usage.
30−- [Foreign Ships](#foreign-ships)
31− - [%warp](#warp-remote) - Read a file on a foreign ship.
32− - [%merg](#merg-remote) - Merge from a foreign `desk`.
33−
34−# Introduction
35−
36−This document details all the `task`s you're likely to use to interact with Clay, as well as the `gift`s you'll receive in response. Each section has a corresponding practical example in the [Examples](/docs/arvo/clay/examples) document. Many of the types referenced are detailed in the [Data Types](/docs/arvo/clay/data-types) document. It may also be useful to look at the `++ clay` section of `/sys/lull.hoon` in Arvo where these `task`s, `gift`s and data structures are defined.
7+This document details all the `task`s you're likely to use to interact with Clay, as well as the `gift`s you'll receive in response. Each section has a corresponding practical example in the [Examples](/docs/arvo/clay/examples) document. Many of the types referenced are detailed in the [Data Types](/docs/arvo/clay/data-types) document. It may also be useful to look at the `++ clay` section of `/sys/lull.hoon` in Arvo where these `task`s, `gift`s and data structures are defined.
378
389The focus of this document is on interacting with Clay from userspace applications and threads, so it doesn't delve into the internal mechanics of Clay from a kernel development perspective.
3910
40−# `%warp`
41−
42−A `%warp` `task` is for reading a subscribing to files and directories.
43−
44−### Accepts
11+## `%warp` - Read and track
4512
4613```hoon
47−[wer=ship rif=riff]
14+[%warp wer=ship rif=riff]
4815```
4916
17+A `%warp` `task` is for reading and subscribing to files and directories.
18+
5019The `wer` field is the target ship. The `(unit rave)` of the [riff](/docs/arvo/clay/data-types#riff-clay-request-desist) is null to cancel an existing subscription, otherwise the [rave](/docs/arvo/clay/data-types#rave-clay-general-subscription-request) is tagged with one of:
5120
5221- `%sing` - Read a single file or directory.
@@ -56,7 +25,7 @@ The `wer` field is the target ship. The `(unit rave)` of the [riff](/docs/arvo/c
5625
5726We'll look at each of these in more detail below.
5827
59−### Returns
28+#### Returns
6029
6130Clay responds to a `%mult` request with a `%wris` `gift`, and the rest with a `%writ` `gift`.
6231
@@ -76,7 +45,7 @@ The `unit` of the [riot](/docs/arvo/clay/data-types#riot-clay-response) will be
7645
7746Now we'll look at each of the `rave` request types in turn.
7847
79−## `%sing`
48+### `%sing` - Read
8049
8150```hoon
8251[%sing =mood]
@@ -88,11 +57,11 @@ The `care` of the [mood](/docs/arvo/clay/data-types#mood-clay-single-subscriptio
8857
8958The [case](/docs/arvo/clay/data-types#case-specifying-a-commit) specifies the `desk` revision and you can use whichever kind you prefer. The `path` will usually be a path to a file or directory like `/gen/hood/hi/hoon` but may be something else depending on the `care`.
9059
91−### Example
60+#### Example
9261
9362[See here for an example of using %sing.](/docs/arvo/clay/examples#sing)
9463
95−## `%next`
64+### `%next` - Await next
9665
9766```hoon
9867[%next =mood] :: await next version
@@ -102,19 +71,19 @@ This subscribes to the next version of the specified file. See [here](/docs/arvo
10271
10372If you subscribe to the current `case` of the `desk`, Clay will not respond until the file changes. If you subscribe to a previous `case` of the `desk` and the file has changed in between then and now, it will immediately return the first change it comes across in that range. For example, if you're currently at `case` `100`, subscribe to case `50` and the file in question has been modified at both `60` and `80`, clay will immediately return the version of the file at `case` `60`.
10473
105−### Example
74+#### Example
10675
10776[See here for an example of using %next.](/docs/arvo/clay/examples#next)
10877
109−## `%mult`
78+### `%mult` - Next of any
11079
11180```hoon
112−[%mult =mool] :: next version of any
81+[%mult =mool]
11382```
11483
115−This subscribes to the next version of a `set` of files or directories. Clay will only send a single response, and it will send it when *any* of the specified files change. For example, if you subscribe to both `/foo/txt` and `/bar/txt`, and only `/foo/txt` changes, Clay will send a response indicating a change to `/foo/txt`. If `/bar/txt` changes subsequently, it will not tell you. If more than one file changes at once, it will tell you about each of the changes in the one response.
84+This subscribes to the next version of a `set` of files or directories. Clay will only send a single response, and it will send it when _any_ of the specified files change. For example, if you subscribe to both `/foo/txt` and `/bar/txt`, and only `/foo/txt` changes, Clay will send a response indicating a change to `/foo/txt`. If `/bar/txt` changes subsequently, it will not tell you. If more than one file changes at once, it will tell you about each of the changes in the one response.
11685
117−The behaviour with respect to requesting old `case`s is the same as explained in the [`%next`](#next) section above.
86+The behaviour with respect to requesting old `case`s is the same as explained in the [`%next`](#next---await-next) section above.
11887
11988The `mool` specified in the request is this structure:
12089
@@ -122,16 +91,16 @@ The `mool` specified in the request is this structure:
12291+$ mool [=case paths=(set (pair care path))] :: requests in desk
12392```
12493
125−You can use a different `care` for each of the files specified by the `path` if you like. Significantly, the `care` will determine whether Clay sends a response for a given change. For example, if you subscribe to an existing `/foo/txt` with a `%u` `care` and `/foo/txt` is modified but isn't deleted, Clay will *not* tell you. However, if you subscribe with an `%x` `care`, it *will* tell you.
94+You can use a different `care` for each of the files specified by the `path` if you like. Significantly, the `care` will determine whether Clay sends a response for a given change. For example, if you subscribe to an existing `/foo/txt` with a `%u` `care` and `/foo/txt` is modified but isn't deleted, Clay will _not_ tell you. However, if you subscribe with an `%x` `care`, it _will_ tell you.
12695
127−### Example
96+#### Example
12897
12998[See here for an example of using %mult.](/docs/arvo/clay/examples#mult)
13099
131−## `%many`
100+### `%many` - Track range
132101
133102```hoon
134−[%many track=? =moat] :: track range
103+[%many track=? =moat]
135104```
136105
137106This subscribes to all changes to a `desk` for the specified range of `case`s. Note that you're unlikely to use this directly, it's mostly used implicitly if you make a `%sing` or `%next` request with a `%v` `care` to a foreign `desk`. Regardless, we'll have a look at it for completeness.
@@ -146,7 +115,7 @@ If the `track` is `%.y` it will just return a `%writ` like:
146115
147116If the `track` is `%.n`, the `cage` of the `%writ` will contain a [nako](/docs/arvo/clay/data-types#nako-subscription-response-data) with the relevant data for all changes to a desk between what you have and the `case` requested. It is very large and fairly complicated. The `nako` structure is defined in the `clay.hoon` source file itself rather than in `lull.hoon` or elsewhere since you're unlikely to work with it yourself.
148117
149−The `from` and `to` fields of the [moat](/docs/arvo/clay/data-types#moat-clay-range-subscription-request) specify the range of `case`s for which to subscribe. The range is *inclusive*. It can be specified by date or by revision number, whichever you prefer.
118+The `from` and `to` fields of the [moat](/docs/arvo/clay/data-types#moat-clay-range-subscription-request) specify the range of `case`s for which to subscribe. The range is _inclusive_. It can be specified by date or by revision number, whichever you prefer.
150119
151120The `path` in the `moat` is a path to a file or directory. If it's `~` it refers to the root of the `desk` in question. This lets you say "only inform me of changes to the `desk` if the specified file or directory exists". If it doesn't exist, Clay will not send you anything.
152121
@@ -156,30 +125,28 @@ When you reach the end of the subscribed range of `case`s, Clay will send you a
156125[%writ p=~]
157126```
158127
159−### Example
128+#### Example
160129
161130[See here for an example of using %many.](/docs/arvo/clay/examples#many)
162131
163−## Cancel Subscription
132+### Cancel Subscription
164133
165134To cancel a subscription, you just send a `%warp` with a null `(unit rave)` in the `riff`. Clay will cancel the subscription based on the `wire`. The request is exactly the same regardless of which type of `rave` you subscribed with originally.
166135
167−### Example
136+#### Example
168137
169138[See here for an example of cancelling a subscription.](/docs/arvo/clay/examples#cancel-subscription)
170139
171−# Write and Modify
140+## Write and Modify
172141
173−## `%info`
174−
175−To write or modify a file, we send Clay a `%info` `task`.
176−
177−### Accepts
142+### `%info` - Write
178143
179144```hoon
180−[des=desk dit=nori]
145+[%info des=desk dit=nori]
181146```
182147
148+To write or modify a file, we send Clay a `%info` `task`.
149+
183150The `%|` tag in the [nori](/docs/arvo/clay/data-types#nori-clay-repository-action) is not currently supported and will crash with a `%labelling-not-implemented` if used, so you can focus on the `%&` part. The [soba](/docs/arvo/clay/data-types#soba-clay-delta) in the `nori` is just a list of changes so you can make more than one change in one request. Its `path` is just the path to a file like `/gen/hood/hi/hoon` and the [miso](/docs/arvo/clay/data-types#miso-clay-ankh-delta) is one of these types of requests:
184151
185152- `%del` - Delete a file.
@@ -187,11 +154,11 @@ The `%|` tag in the [nori](/docs/arvo/clay/data-types#nori-clay-repository-actio
187154- `%dif` - This has not yet been implemented so will crash with a `%dif-not-implemented` error.
188155- `%mut` - Change a file. At the time of writing this behaves identically to `%ins` so its use merely informs the reader.
189156
190−### Returns
157+#### Returns
191158
192159Clay does not give any response to an `%info` `task` so don't expect a `sign` back.
193160
194−### Example
161+#### Example
195162
196163Here are examples of using each of these as well as making multiple changes in one request:
197164
@@ -200,31 +167,26 @@ Here are examples of using each of these as well as making multiple changes in o
200167- [%mut](/docs/arvo/clay/examples#mut)
201168- [Multiple Changes](/docs/arvo/clay/examples#multiple-changes)
202169
203−
204−# Manage Mounts
170+## Manage Mounts
205171
206172Here we'll look at managing Clay unix mounts programmatically.
207173
208174There are four Clay `task`s relevant to mounts:
209175
210−- [%boat](#boat) - List mounts.
211−- [%mont](#mont) - Mount something.
212−- [%ogre](#ogre) - Unmount something.
213−- [%dirk](#dirk) - Commit changes.
214−
215−## `%boat`
216−
217−A `%boat` `task` requests the list of existing mounts.
176+- [%boat](#boat---list-mounts) - List mounts.
177+- [%mont](#mont---mount) - Mount something.
178+- [%ogre](#ogre---unmount) - Unmount something.
179+- [%dirk](#dirk---commit) - Commit changes.
218180
219−### Accepts
181+### `%boat` - List mounts
220182
221183```hoon
222−~
184+[%boat ~]
223185```
224186
225−A `%boat` `task` does not take any arguments.
187+A `%boat` `task` requests the list of existing mounts and does not take any arguments.
226188
227−### Returns
189+#### Returns
228190
229191The type it returns is a `%hill` `gift`, which looks like:
230192
@@ -234,21 +196,18 @@ The type it returns is a `%hill` `gift`, which looks like:
234196
235197...where the `@tas` is the name of the mount point.
236198
237−### Example
199+#### Example
238200
239201[See here for an example of using %boat.](/docs/arvo/clay/examples#boat)
240202
241−## `%mont`
242−
243−
244−A `%mont` `task` mounts the specified `beam` to the specified `term` mount point.
245−
246−### Accepts
203+### `%mont` - Mount
247204
248205```hoon
249−[pot=term bem=beam]
206+[%mont pot=term bem=beam]
250207```
251208
209+A `%mont` `task` mounts the specified `beam` to the specified `term` mount point.
210+
252211A `beam:clay` is the following structure:
253212
254213```hoon
@@ -257,73 +216,69 @@ A `beam:clay` is the following structure:
257216
258217You can mount the whole desk with a `path` of `/`, and you can also mount subdirectories or even individual files. If you want to mount an individual file, you must exclude its `mark` from the path. For example, if you want to mount `/gen/hood/hi/hoon`, you'd specify `/gen/hood/hi`. It will automatically be given the correct file extension when mounted. If you include the `hoon` mark it will crash (and currently crash your ship).
259218
260−### Returns
219+#### Returns
261220
262221Clay does not return a `gift` in response to a `%mont` `%task`.
263222
264−### Example
223+#### Example
265224
266225[See here for an example of using %mont.](/docs/arvo/clay/examples#mont)
267226
268−## `%ogre`
269−
270−A `%ogre` `task` unmounts the specified mount.
271−
272−### Accepts
227+### `%ogre` - Unmount
273228
274229```hoon
275−[pot=$@(desk beam)]
230+[%ogre pot=$@(desk beam)]
276231```
277232
233+A `%ogre` `task` unmounts the specified mount.
234+
278235It's defined in `lull.hoon` as taking `$@(desk beam)` but in fact it will only unmount the target when specified as a `term` mount name. Passing it a `desk` will incidentally work if the mount is named the same as the `desk` but otherwise it won't work. Passing it a `beam:clay` will simply not work.
279236
280−### Returns
237+#### Returns
281238
282239Clay does not return a `gift` in response to a `%ogre` `task`.
283240
284−### Example
241+#### Example
285242
286243[See here for an example of using %ogre.](/docs/arvo/clay/examples#ogre)
287244
288−## `%dirk`
289−
290−A `%dirk` `task` commits changes in the target mount.
291−
292−### Accepts
245+### `%dirk` - Commit
293246
294247```hoon
295−des=desk
248+[%dirk des=desk]
296249```
297250
298−It's defined in `lull.hoon` as taking a `desk` but like [%ogre](#ogre), it actually takes the name of a mount point rather than a `desk` as is specified.
251+A `%dirk` `task` commits changes in the target mount.
252+
253+It's defined in `lull.hoon` as taking a `desk` but like [%ogre](#ogre---unmount), it actually takes the name of a mount point rather than a `desk` as is specified.
299254
300−### Returns
255+#### Returns
301256
302257Clay does not return a `gift` in response to a `%dirk` `task`.
303258
304−### Example
259+#### Example
305260
306261[See here for an example of using %dirk.](/docs/arvo/clay/examples#dirk)
307262
308−# Merge Desks
263+## Merge Desks
309264
310−## `%merg`
311−
312−A `%merg` `task` will merge the specified source `desk` into the target local `desk`.
313−
314−### Accepts
265+### `%merg` - Merge
315266
316267```hoon
317−$: des=desk :: target
268+$: %merg
269+ des=desk :: target
318270 her=@p dem=desk cas=case :: source
319271 how=germ :: method
320272==
321273```
274+
275+A `%merg` `task` will merge the specified source `desk` into the target local `desk`.
276+
322277The `germ` specifies the merge strategy. You can refer to the [Strategies](/docs/arvo/clay/using#strategies) section of the [Using Clay](/docs/arvo/clay/using) document for details of each `germ`.
323278
324279If you're merging into a new `desk` you must use `%init`, all other strategies will fail. If the desk already exists, you cannot use `%init`. Otherwise, you're free to use whichever you'd like.
325280
326−### Returns
281+#### Returns
327282
328283Clay will respond to the request with a `%mere` `gift` which looks like:
329284
@@ -344,15 +299,15 @@ If the merge failed, `p` will have a head of `%.n` and then a `[term tang]` wher
344299]
345300```
346301
347−### Example
302+#### Example
348303
349304[See here for an example of using %merg.](/docs/arvo/clay/examples#merg)
350305
351−# Permissions
306+## Permissions
352307
353308For each file or directory, there is both a read permission and a write permission. Each may be set separately and is either a whitelist or a blacklist (but not both). The whitelist/blacklist contains a `set` of ships and/or groups which are allowed or banned respectively. If it's an empty whitelist it means all foreign ships are denied. If it's an empty blacklist it means all foreign ships are allowed.
354309
355−If permissions are not set for a particular file, they will be inherited from the directory in which it resides. If *that* directory has no permissions set, they will be inherited from another level up, and so on to the `desk`'s root directory. If the root directory has no permissions set, it will have the default permissions of an empty whitelist, meaning "deny all".
310+If permissions are not set for a particular file, they will be inherited from the directory in which it resides. If _that_ directory has no permissions set, they will be inherited from another level up, and so on to the `desk`'s root directory. If the root directory has no permissions set, it will have the default permissions of an empty whitelist, meaning "deny all".
356311
357312A group is called a `crew` and is just a `set` of ships with a `@ta` name.
358313
@@ -390,18 +345,16 @@ A `%perm` `task` is for setting permissions, and the other three are for managin
390345
391346We'll look at each of these in turn.
392347
393−## `%perm`
348+### `%perm` - Set perms
349+
350+```hoon
351+[%perm des=desk pax=path rit=rite]
352+```
394353
395354A `%perm` `task` sets permissions for the target file or directory.
396355
397356Note this will replace existing permissions rather than add to them, so if you want to add a ship to an existing whitelist or whatever you'll have to first read the existing permissions, add the ship, then send the whole lot back.
398357
399−### Accepts
400−
401−```hoon
402−[des=desk pax=path rit=rite]
403−```
404−
405358The `pax` path is the file or directory whose permissions you want to change, and the `rite` is this structure:
406359
407360```hoon
@@ -409,6 +362,7 @@ The `pax` path is the file or directory whose permissions you want to change, an
409362 $% [%r red=(unit rule)] :: for read
410363 [%w wit=(unit rule)] :: for write
411364 [%rw red=(unit rule) wit=(unit rule)] :: for read and write
365+ ==
412366```
413367
414368Where a `rule` is this structure:
@@ -425,51 +379,47 @@ Where a `rule` is this structure:
425379
426380As the comment suggests, the `@ta` is the name of a `crew` (group).
427381
428−### Returns
382+#### Returns
429383
430384Clay does not return a `gift` in response to a `%perm` `task`.
431385
432−### Example
386+#### Example
433387
434388[See here for an example of using %perm.](/docs/arvo/clay/examples#perm)
435389
436−## `%cred`
437−
438−This simply creates a permission group.
439−
440−### Accepts
390+### `%cred` - Add group
441391
442392```hoon
443−[nom=@ta cew=crew]
393+[%cred nom=@ta cew=crew]
444394```
445395
396+This simply creates a permission group.
397+
446398The `nom` is a name for the group and the `crew` is just a `(set ship)`:
447399
448400```hoon
449401+$ crew (set ship) :: permissions group
450402```
451403
452−### Returns
404+#### Returns
453405
454406Clay does not return a `gift` in response to a `%cred` `task`.
455407
456−### Example
408+#### Example
457409
458410[See here for an example of using %cred.](/docs/arvo/clay/examples#cred)
459411
460−## `%crew`
461−
462−This retrieves all permission groups.
463−
464−### Accepts
412+### `%crew` - Get groups
465413
466414```hoon
467−~
415+[%crew ~]
468416```
469417
418+This retrieves all permission groups.
419+
470420A `%crew` `task` takes no arguments.
471421
472−### Returns
422+#### Returns
473423
474424Clay wil return a `%cruz` `gift`. It looks like:
475425
@@ -479,23 +429,21 @@ Clay wil return a `%cruz` `gift`. It looks like:
479429
480430The `cez` is just a map from group name to `crew` which is just a `(set ship)`.
481431
482−### Example
432+#### Example
483433
484434[See here for an example of using %crew.](/docs/arvo/clay/examples#crew)
485435
486−## `%crow`
487−
488−A `%crow` `task` retrieves all files and directories in all `desk`s which have permissions set for the group in question. It will not return inherited permissions, only those explicitly set.
489−
490−### Accepts
436+### `%crow` - Group files
491437
492438```hoon
493−nom=@ta
439+[%crow nom=@ta]
494440```
495441
442+A `%crow` `task` retrieves all files and directories in all `desk`s which have permissions set for the group in question. It will not return inherited permissions, only those explicitly set.
443+
496444The `nom` is the name of a `crew`.
497445
498−### Returns
446+#### Returns
499447
500448The `gift` you get back is a `%croz` which looks like:
501449
@@ -509,19 +457,19 @@ The `gift` you get back is a `%croz` which looks like:
509457+$ regs (map path rule) :: rules for paths
510458```
511459
512−### Example
460+#### Example
513461
514462[See here for an example of using %crow.](/docs/arvo/clay/examples#crow)
515463
516−# Foreign Ships
464+## Foreign Ships
517465
518466Here we'll looking at making Clay requests to a foreign ship.
519467
520468As it currently stands, it's not possible to write to a foreign `desk`. Additionally, remote scries are not implemented. That leaves requests to read files (`%warp`) and merge desks (`%merg`), which we'll look at next.
521469
522−## `%warp` - Remote
470+### `%warp` - Remote
523471
524−To read files on a foreign `desk`, you just send Clay a `%warp` `task` (as you would for a local read) and specify the target ship in the `wer` field. For details on making such requests, see the [Read and Subscribe](#warp) section.
472+To read files on a foreign `desk`, you just send Clay a `%warp` `task` (as you would for a local read) and specify the target ship in the `wer` field. For details on making such requests, see the [Read and Subscribe](#warp---read-and-track) section.
525473
526474Clay only allows a subset of `care`s to be used remotely. They are:
527475
@@ -538,11 +486,11 @@ The foreign ship will respond only if correct permissions have been set. See the
538486
539487Note that if you're reading a whole `desk` or directory, all subfolders and files must also permit reading. If even a single file does not permit you reading it, the foreign ship will not respond to the request.
540488
541−### Example
489+#### Example
542490
543491[See here for examples of requests to foreign ships.](/docs/arvo/clay/examples#foreign-ships)
544492
545−## `%merg` - Remote
493+### `%merg` - Remote
546494
547495To merge a foreign `desk` into a local one, you just send Clay a `%merg` `task` (as you would for a local merge) and specify the foreign ship in the `her` field. For details on making such requests, see the [Merge Desks](#merge-desks) section.
548496
@@ -550,6 +498,6 @@ The foreign ship will respond only if correct permissions have been set. See the
550498
551499Note that all subfolders and individual files within the `desk` must permit your reading in order for the merge to succeed. If even one file does not permit you reading it, the remote ship will not respond to the request at all.
552500
553−### Example
501+#### Example
554502
555503[See here for examples of requests to foreign ships.](/docs/arvo/clay/examples#foreign-ships)
content/docs/arvo/overview.md+56−79
@@ -20,7 +20,7 @@ companion to this document, and some segments are direct quotes or paraphrases,
2020
2121## Prerequisites
2222
23−The conceptual section titled [What is Arvo?](#what-is-arvo-) can be understood
23+The conceptual section titled [What is Arvo?](#what-is-arvo) can be understood
2424without knowing Hoon, the Urbit programming language. The technical section
2525titled [The kernel](#the-kernel) will require Chapter One of the [Hoon
2626tutorial](/docs/hoon/hoon-school/) for full understanding, and some
@@ -30,26 +30,6 @@ Overview](/docs/system-overview/).
3030
3131We also suggest to the reader to peruse the [glossary](/docs/glossary/) before diving into this article. It will provide the initial scaffolding that you will be able to gradually fill in as you read this article and go deeper into the alternate universe of computing that is Urbit.
3232
33−
34−# Table of Contents
35−
36−- [What is Arvo?](#what-is-arvo)
37− * [An operating function](#an-operating-function)
38− + [Determinism](#determinism)
39− + [Event log](#event-log)
40− * [Solid state interpreter](#solid-state-interpreter)
41− + [Over-the-air updates](#over-the-air-updates)
42− + [ACID Database](#acid-database)
43− + [Single-level store](#single-level-store)
44− + [Non-preemptive](#non-preemptive)
45−- [The kernel](#the-kernel)
46− * [Overall structure](#overall-structure)
47− + [Formal interface](#formal-interface)
48− + [Types](#types)
49− + [Arvo cores](#arvo-cores)
50− * [The state](#the-state)
51− * [Vanes](#vanes)
52−
5333# What is Arvo?
5434
5535Arvo is a [non-preemptive](#non-preemptive)
@@ -139,9 +119,7 @@ the larval stage in more detail in the [larval stage](#larval-stage-core) sectio
139119
140120More information on the structure of the Arvo event log and the Arvo state is given in the section on [the kernel](#the-kernel).
141121
142−
143−
144−## Solid state interpreter
122+## Solid state interpreter
145123
146124Arvo is a _solid state interpreter_. In this section we describe what is meant
147125by this new term, and how this behavior derives from the fact that Arvo is an [ACID database](#acid-database) and a [single-level store](#single-level-store).
@@ -165,7 +143,6 @@ it as a chip. Plug this chip into power and network; packets go in and
165143out, sometimes changing its state. The chip never loses data and has
166144no concept of a reboot; every packet is an [ACID transaction](#acid-database).
167145
168−
169146### Over-the-air updates
170147
171148Arvo can hotpatch any other semantics at any layer in the system (apps, vanes, Arvo or Hoon itself) with automatic over-the-air updates.
@@ -194,22 +171,22 @@ In order to dismantle the client-server model and build a peer-to-peer internet,
194171
195172Database theory studies in precise terms the possible properties of anything that could be considered to be a database. In this context, Arvo has the properties of an [ACID database](https://en.wikipedia.org/wiki/ACID), and the Ames network could be thought of as network of such databases. ACID stands for _atomicity_, _consistency_, _isolation_, and _durability_. We review here how Arvo satisfies these properties.
196173
197− - Atomicity: Events in Arvo are _atomic_, meaning that they either succeed completely or fail completely. In other words, there are no transient periods in which something like a power failure will leave the operating system in an invalid state. When an event occurs in Arvo, e.g. [the kernel](#the-kernel) is `poke`d, the effects of an event are computed, the event is [persisted](https://en.wikipedia.org/wiki/Persistence_(computer_science)) by writing it to the event log, and only then are the actual effects applied.
174+- Atomicity: Events in Arvo are _atomic_, meaning that they either succeed completely or fail completely. In other words, there are no transient periods in which something like a power failure will leave the operating system in an invalid state. When an event occurs in Arvo, e.g. [the kernel](#the-kernel) is `poke`d, the effects of an event are computed, the event is [persisted](<https://en.wikipedia.org/wiki/Persistence_(computer_science)>) by writing it to the event log, and only then are the actual effects applied.
198175
199− - Consistency: Every possible update to the database puts it into another valid state. Given that Arvo is purely functional, this is easier to accomplish than it would be in an imperative setting.
176+- Consistency: Every possible update to the database puts it into another valid state. Given that Arvo is purely functional, this is easier to accomplish than it would be in an imperative setting.
200177
201− - Isolation: Transactions in databases often happen concurrently, and isolation
202− ensures that the transactions occur as if they were performed sequentially,
203− making it so that their effects are isolated from one another. Arvo ensures
204− this simply by the fact that it only ever performs events sequentially. While
205− Arvo
206− transactions are sequential and performed by the daemon, persistence and effect application are performed
207− in parallel by the worker; see [worker and
208− daemon](/docs/vere/) for more detail.
178+- Isolation: Transactions in databases often happen concurrently, and isolation
179+ ensures that the transactions occur as if they were performed sequentially,
180+ making it so that their effects are isolated from one another. Arvo ensures
181+ this simply by the fact that it only ever performs events sequentially. While
182+ Arvo
183+ transactions are sequential and performed by the daemon, persistence and effect application are performed
184+ in parallel by the worker; see [worker and
185+ daemon](/docs/vere/) for more detail.
209186
210− - Durability: Completed transactions will survive permanently. In other words,
211− since the event log is stored on disk, if power is lost you are guaranteed
212− that no transactions will be reversed.
187+- Durability: Completed transactions will survive permanently. In other words,
188+ since the event log is stored on disk, if power is lost you are guaranteed
189+ that no transactions will be reversed.
213190
214191It is easy to think that "completed transaction will survive permanently"
215192along with "the state of Arvo is pure function of its event log" implies that
@@ -239,11 +216,9 @@ This is known as
239216[non-preemptive](https://en.wikipedia.org/wiki/Cooperative_multitasking) or
240217cooperative multitasking.
241218
242−
243219> Parts of the remainder of this document are out of date as of 2020.07.20, please use information here with
244220> caution. This message will be removed once it is up to date.
245221
246−
247222# The kernel
248223
249224The Arvo kernel, stored in `sys/arvo.hoon`, is about 1k lines of Hoon whose primary purpose is to implement the transition function, `+poke`. In this section we point out the most important parts of `arvo.hoon` and describe their role in the greater system. We also give brief descriptions of Arvo's kernel modules, known as vanes, and how Arvo interfaces with them.
@@ -257,12 +232,13 @@ which applies many of the concepts covered below.
257232## Overall structure
258233
259234`arvo.hoon` contains five top level cores as well as a "formal interface" consisting of a single [gate](/docs/glossary/gate/) that implements the transition function. They are nested with the `=<` and `=>` runes like so, where items lower on the list are contained within items higher on the list:
260− + Types
261− + Section 3bE Arvo Core
262− + Implementation core
263− + Structural interface core, or adult core
264− + Larval stage core
265− + Formal interface
235+
236+- Types
237+- Section 3bE Arvo Core
238+- Implementation core
239+- Structural interface core, or adult core
240+- Larval stage core
241+- Formal interface
266242
267243See [Section 1.7](/docs/hoon/hoon-school/arms-and-cores) of the Hoon tutorial for further explanation of what is meant here by "nesting". We now describe the functionality of each of these components.
268244
@@ -331,7 +307,6 @@ initial element of the empty span, so this is routed to Unix, which applies the
331307
332308This is a call stack, with a crucial feature: the stack is a first-class citizen. You can respond over a `duct` zero, one, or many times. You can save `duct`s for later use. There are definitely parallels to Scheme-style continuations, but simpler and with more structure.
333309
334−
335310#### `wire`
336311
337312```hoon
@@ -439,31 +414,31 @@ described within the current type system. Then the `wire` here is the default Un
439414
440415A short summary of the purpose of each these arms are as follows:
441416
442− - `+poke` is the transition function that `move`s Arvo from one state to the
443− next. It is the most fundamental arm in the entire system. It is a typed
444− transactional message that is processed at most once. If the `+poke` causes
445− Arvo to send an message over [Ames](/docs/arvo/ames/ames) Ames
446− guarantees that the message will be delivered exactly once. This is sometimes said
447− to be impossible, and it is for standard operating systems, but that is not the case for single-level stores engaged in
448− a permanent session, as is the case among Arvo ships.
449− - `+peek` is an arm used for inspecting things outside of the kernel. It grants
450− read-only access to `scry` Arvo's global referentially transparent namespace.
451− It takes in a `path` and returns a `unit (unit)`. If the product is `~`, the
452− path is unknown and its value cannot be produced synchronously. If its
453− product is `[~ ~]` the `path` is known to be unbound and can never become
454− bound. Otherwise the product is a `mark` and a noun.
455− - `+wish` is a function that takes in a core and then parses and compiles it
456− with the standard library, `zuse`. It is useful from the outside if you ever
457− want to run code within. One particular way in which it is used is by the
458− runtime to read out the version of `zuse` so that it knows if it is
459− compatible with this particular version of the kernel.
460− - `+load` is used when upgrading the kernel. It is only ever called by Arvo
461− itself, never by the runtime. If upgrading to a kernel where types are
462− compatible, `+load` is used, otherwise `+come` is used.
463− - `+come` is used when the new kernel has incompatible types, but ultimately
464− reduces to a series of `+load` calls.
465−
466− The [Section 3bE core](#section-3be-core) does not follow this pattern.
417+- `+poke` is the transition function that `move`s Arvo from one state to the
418+ next. It is the most fundamental arm in the entire system. It is a typed
419+ transactional message that is processed at most once. If the `+poke` causes
420+ Arvo to send an message over [Ames](/docs/arvo/ames/ames) Ames
421+ guarantees that the message will be delivered exactly once. This is sometimes said
422+ to be impossible, and it is for standard operating systems, but that is not the case for single-level stores engaged in
423+ a permanent session, as is the case among Arvo ships.
424+- `+peek` is an arm used for inspecting things outside of the kernel. It grants
425+ read-only access to `scry` Arvo's global referentially transparent namespace.
426+ It takes in a `path` and returns a `unit (unit)`. If the product is `~`, the
427+ path is unknown and its value cannot be produced synchronously. If its
428+ product is `[~ ~]` the `path` is known to be unbound and can never become
429+ bound. Otherwise the product is a `mark` and a noun.
430+- `+wish` is a function that takes in a core and then parses and compiles it
431+ with the standard library, `zuse`. It is useful from the outside if you ever
432+ want to run code within. One particular way in which it is used is by the
433+ runtime to read out the version of `zuse` so that it knows if it is
434+ compatible with this particular version of the kernel.
435+- `+load` is used when upgrading the kernel. It is only ever called by Arvo
436+ itself, never by the runtime. If upgrading to a kernel where types are
437+ compatible, `+load` is used, otherwise `+come` is used.
438+- `+come` is used when the new kernel has incompatible types, but ultimately
439+ reduces to a series of `+load` calls.
440+
441+The [Section 3bE core](#section-3be-core) does not follow this pattern.
467442
468443#### Section 3bE core
469444
@@ -481,10 +456,10 @@ This core could be thought of as the primary "adult core" - the one that is in o
481456
482457This core is in use only during the larval stage of Arvo, which is after the Arvo kernel has compiled itself but before it has "broken symmetry" by acquiring identity and entropy, the point at which the larval stage has concluded. We call this breaking symmetry because prior to this point, every Urbit is completely identical. The larval stage performs the following steps in order:
483458
484− + The standard library, `zuse`, is installed.
485− + Entropy is added
486− + Identity is added
487− + Metamorph into the next stage of Arvo
459+- The standard library, `zuse`, is installed.
460+- Entropy is added
461+- Identity is added
462+- Metamorph into the next stage of Arvo
488463
489464Once the larval stage has passed its functionality will never be used again.
490465
@@ -517,6 +492,7 @@ Let's investigate the state piece by piece.
517492```hoon
518493=/ pit=vase !>(..is) ::
519494```
495+
520496This `vase` is part of the state but does not get directly migrated when `+poke`
521497is called. `!>(..is)` consists of the code in `arvo.hoon` written above this core contained in
522498a `vase`. Thus this part of the state changes only when that code changes in an
@@ -526,6 +502,7 @@ update.
526502=/ vil=vile (viol p.pit) :: cached reflexives
527503
528504```
505+
529506This is a cache of specific types that are of fundamental importance to Arvo -
530507namely `type`s, `duct`s, `path`s, and `vase`s. This is kept because it is
531508unnecessarily wasteful to recompile these fundamental types on a regular basis.
@@ -539,6 +516,7 @@ Again, this part of the state is never updated directly by `+poke`.
539516 vanes=(list [label=@tas =vane]) :: modules
540517 ==
541518```
519+
542520This is where the real state of the Arvo kernel is kept. `lac` detemines whether
543521Arvo's output is verbose, which can be set using the `|verb` command in the
544522dojo. `eny` is the current entropy. `our` is the ship, which is permanently
@@ -548,7 +526,6 @@ is of course the list of vanes, which have their own internal states.
548526As you can see, the state of Arvo itself is quite simple. Its primary role is that of
549527a traffic cop, and most of the interesting part of the state lies in `vanes`.
550528
551−
552529## Vanes
553530
554531The Arvo kernel can do very little on its own. Its functionality is extended in a careful and controlled way with vanes, also known as kernel modules.
@@ -567,8 +544,8 @@ As of this writing, we have nine vanes, which each provide the following service
567544- [Ford](/docs/arvo/ford/ford): a build system also utilized for marks
568545 (file types) and debugging.
569546- [Gall](/docs/userspace/gall/gall): manages our userspace applications. `%gall` keeps state and manages subscribers.
570−- `Iris`: an http client.
571−- `Jael`: storage for Azimuth information.
547+- [Iris](/docs/arvo/iris/iris): an http client.
548+- [Jael](/docs/arvo/jael/jael): storage for Azimuth information.
572549
573550#### Applying your knowledge
574551
content/docs/hoon/reference/stdlib/2c.md+91−13
@@ -43,6 +43,7 @@ An atom.
4343```
4444
4545---
46+
4647### `++can`
4748
4849Assemble
@@ -101,6 +102,7 @@ An atom.
101102```
102103
103104---
105+
104106### `++cat`
105107
106108Concatenate
@@ -164,6 +166,7 @@ An atom.
164166```
165167
166168---
169+
167170### `++cut`
168171
169172Slice
@@ -222,8 +225,8 @@ An atom.
222225 0b10.0001
223226```
224227
225−
226228---
229+
227230### `++end`
228231
229232Tail
@@ -242,7 +245,6 @@ with optional block count.
242245
243246An atom.
244247
245−
246248#### Source
247249
248250```hoon
@@ -293,8 +295,8 @@ An atom.
293295 'ab'
294296```
295297
296−
297298---
299+
298300### `++fil`
299301
300302Fill bloqstream
@@ -345,8 +347,8 @@ An atom.
345347 0b1.0001.0001.0001.0001.0001
346348```
347349
348−
349350---
351+
350352### `++lsh`
351353
352354Left-shift
@@ -400,8 +402,8 @@ An atom.
400402 65.280
401403```
402404
403−
404405---
406+
405407### `++met`
406408
407409Measure
@@ -446,8 +448,8 @@ Computes the number of blocks of size `a` in `b`, producing an atom.
446448 5
447449```
448450
449−
450451---
452+
451453### `++rap`
452454
453455Assemble non-zero
@@ -509,6 +511,7 @@ An atom.
509511Any element of the value `0` is not included in concatenation.
510512
511513---
514+
512515### `++rep`
513516
514517Assemble single
@@ -584,8 +587,77 @@ An atom.
584587 'abcd'
585588```
586589
590+---
591+
592+### `++rev`
593+
594+Reverses block order, accounting for leading zeroes.
595+
596+Produces an atom from the bits of `dat` in reverse order according to a block
597+size `boz` and a size `len`.
598+
599+If the total size is less than the length of `dat`, then only the first
600+bits of `dat` up to the total size will be taken and reversed. If the total size
601+is longer, trailing zeroes will be added.
602+
603+#### Accepts
604+
605+`boz` is a block size with optional block count (see
606+[`$bloq`](/docs/hoon/reference/stdlib/1c#bloq)).
607+
608+`len` is a `@ud` of the number of blocks of size `boz` to be reversed.
609+
610+`dat` is an atom.
611+
612+#### Produces
613+
614+An atom.
615+
616+#### Source
617+
618+```hoon
619+++ rev
620+ ~/ %rev
621+ |= [boz=bloq len=@ud dat=@]
622+ ^- @
623+ =. dat (end [boz len] dat)
624+ %+ lsh
625+ [boz (sub len (met boz dat))]
626+ (swp boz dat)
627+```
628+
629+#### Examples
630+
631+```
632+> =a 0b1111.0000.1111.1010.0011
633+
634+> `@ub`(rev 0 20 a)
635+0b1100.0101.1111.0000.1111
636+
637+> `@ub`(rev 0 12 a)
638+0b1100.0101.1111
639+
640+> `@ub`(rev 2 5 a)
641+0b11.1010.1111.0000.1111
642+
643+> `@ub`(rev 2 4 a)
644+0b11.1010.1111.0000
645+
646+> `@ub`(rev 2 6 a)
647+0b11.1010.1111.0000.1111.0000
648+
649+> (rev 1 10 1.000)
650+179.200
651+
652+> (rev 2 5 1.000)
653+582.400
654+
655+> (rev 1 5 1.000)
656+175
657+```
587658
588659---
660+
589661### `++rip`
590662
591663Disassemble
@@ -649,8 +721,8 @@ A list of atoms.
649721 "abcd"
650722```
651723
652−
653724---
725+
654726### `++rsh`
655727
656728Right-shift
@@ -719,8 +791,8 @@ An atom.
719791 0x6362
720792```
721793
722−
723794---
795+
724796### `++run`
725797
726798`++turn` into atom.
@@ -761,8 +833,8 @@ An atom.
761833 0xeeee
762834```
763835
764−
765836---
837+
766838### `++rut`
767839
768840`++turn` into list.
@@ -803,8 +875,8 @@ A list.
803875 ~[0xe 0xe 0xe 0xe]
804876```
805877
806−
807878---
879+
808880### `++swp`
809881
810882Reverse block order
@@ -812,7 +884,6 @@ Reverse block order
812884Switches little-endian to big-endian and vice versa: produces an atom by
813885reversing the block order of `b` using block size `a`.
814886
815−
816887#### Accepts
817888
818889`a` is a block size (see [`++bloq`](/docs/hoon/reference/stdlib/1c)).
@@ -848,8 +919,8 @@ An atom
848919 1
849920```
850921
851−
852922---
923+
853924### `++xeb`
854925
855926Binary logarithm
@@ -896,8 +967,8 @@ An atom.
896967 2
897968```
898969
899−
900970---
971+
901972### `++fe`
902973
903974Modulo bloq
@@ -915,6 +986,7 @@ Core that contains arms for `bloq` and modular integer operations.
915986```
916987
917988---
989+
918990### `++dif:fe`
919991
920992Produces the difference between two atoms in the modular basis
@@ -967,6 +1039,7 @@ A `@s`
9671039```
9681040
9691041---
1042+
9701043### `++inv:fe`
9711044
9721045Inverse
@@ -1010,6 +1083,7 @@ An atom.
10101083```
10111084
10121085---
1086+
10131087### `++net:fe`
10141088
10151089Flip endianness
@@ -1099,6 +1173,7 @@ An atom.
10991173```
11001174
11011175---
1176+
11021177### `++out:fe`
11031178
11041179Max integer value
@@ -1148,6 +1223,7 @@ An atom.
11481223```
11491224
11501225---
1226+
11511227### `++rol:fe`
11521228
11531229Roll left
@@ -1198,6 +1274,7 @@ An atom.
11981274```
11991275
12001276---
1277+
12011278### `++ror:fe`
12021279
12031280Roll right
@@ -1251,6 +1328,7 @@ An atom.
12511328```
12521329
12531330---
1331+
12541332### `++sit:fe`
12551333
12561334Enforce modulo
content/docs/hoon/reference/stdlib/2j.md+52−32
@@ -18,11 +18,15 @@ A container arm for `++jar` operation arms. A `++jar` is a `++map` of
1818`a` is a jar.
1919
2020```
21− > ~(. ja (mo (limo a/"ho" b/"he" ~)))
22− <2.dgz [nlr([p={%a %b} q=""]) <414.fvk 101.jzo 1.ypj %164>]>
21+> ~(. ja (my [a+1 b+2 ~]))
22+< 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])])
24+ <123.zao 45.xig 1.pnw %140>
25+ ]
2326```
2427
2528---
29+
2630### `++get:ja`
2731
2832Grab value by key
@@ -47,21 +51,22 @@ A list retrieved from jar `a` using the key `b`.
4751Examples
4852
4953```
50− > =l (mo `(list ,[@t (list ,@)])`[['a' `(list ,@)`[1 2 3 ~]] ['b' `(list ,@)`[4 5 6 ~]] ~])
51− > l
52− [[p='a' q=~[1 2 3]] [p='b' q=~[4 5 6]]}
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]]]}]
5357
54− > (~(get ja l) 'a')
55− ~[1 2 3]
58+> (~(get ja l) 'a')
59+[i=1 t=[i=2 t=~[3]]]
5660
57− > (~(get ja l) 'b')
58− ~[4 5 6]
61+> (~(get ja l) 'b')
62+[i=4 t=[i=5 t=~[6]]]
5963
60− > (~(get ja l) 'c')
61− ~
64+> (~(get ja l) 'c')
65+~
6266```
6367
6468---
69+
6570### `++add:ja`
6671
6772Prepend to list
@@ -86,25 +91,30 @@ Prepend to list
8691#### Examples
8792
8893```
89− > =l (mo `(list ,[@t (list ,@)])`[['a' `(list ,@)`[1 2 3 ~]] ['b' `(list ,@)`[4 5 6 ~]] ~])
90− > l
91− {[p='a' q=~[1 2 3]] [p='b' q=~[4 5 6]]}
92−
93− > (~(add ja l) 'b' 7)
94− {[p='a' q=~[1 2 3]] [p='b' q=~[7 4 5 6]]}
95−
96− > (~(add ja l) 'a' 100)
97− {[p='a' q=~[100 1 2 3]] [p='b' q=~[4 5 6]]}
98−
99− > (~(add ja l) 'c' 7)
100− {[p='a' q=~[1 2 3]] [p='c' q=~[7]] [p='b' q=~[4 5 6]]}
101−
102− > (~(add ja l) 'c' `(list ,@)`[7 8 9 ~])
103− ! type-fail
104− ! exit
94+> =l (my [['a' (ly 1 2 3 ~)] ['b' (ly 4 5 6 ~)]~])
95+> l
96+[n=[p='b' q=[i=4 t=~[5 6]]] l={} r={[p='a' q=[i=1 t=~[2 3]]]}]
97+> (~(add ja l) 'a' 100)
98+[ n=[p='b' q=[i=4 t=[i=5 t=~[6]]]]
99+ l=~
100+ r=[n=[p='a' q=[i=100 t=[i=1 t=~[2 3]]]] l=~ r=~]
101+]
102+> (~(add ja l) 'a' 100)
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
105114```
106115
107−**
116+\*\*
117+
108118### `++ju`
109119
110120Jug operations
@@ -120,15 +130,24 @@ Container arm for jug operation arms. A `++jug` is a `++map` of
120130`a` is a jug.
121131
122132```
123− > ~(. ju (mo (limo a=(sa "ho") b=(sa "he") ~)))
124− <2.dgz [nlr([p={%a %b} q={nlr(^$1{@tD $1}) nlr(^$3{@tD $3})}]) <414.fvk 101.jzo 1.ypj %164>]>
133+> ~(. ju (my [[a (sy 1 ~)] [b (sy 2 ~)] ~]))
134+< 5.cws
135+ [ a
136+ ?(
137+ %~
138+ [ n=[p=@ub ?(q=%~ q=[?(n=@ud #!) l=nlr(?(@ud #!)) r=nlr(?(@ud #!))])]
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+ ]
125145```
126146
127147### `++del:ju`
128148
129149Remove
130150
131−
132151#### Source
133152
134153```hoon
@@ -193,6 +212,7 @@ Produces a set retrieved from jar `a` using key `b`.
193212```
194213
195214---
215+
196216### `++has:ju`
197217
198218Check contents
@@ -229,6 +249,7 @@ with jar `a`. Produces a loobean.
229249 > (~(has ju s) 'c' 7)
230250 %.n
231251```
252+
232253---
233254
234255### `++put:ju`
@@ -265,5 +286,4 @@ Produces jar `a` with `c` added to the set value located at key `b`.
265286 {[p='a' q={1 3 2}] [p='c' q={7}] [p='b' q={5 4 6}]}
266287```
267288
268−
269289---
content/docs/hoon/reference/stdlib/2n.md+22−13
@@ -19,7 +19,7 @@ Build `f` such that `(f x) .= (b (a x))`.
1919#### Source
2020
2121```hoon
22− ++ cork |*([a=_|=(* **) b=gate] (corl b a))
22+++ cork |*([a=$-(* *) b=$-(* *)] (corl b a))
2323```
2424
2525#### Examples
@@ -28,15 +28,15 @@ Build `f` such that `(f x) .= (b (a x))`.
2828 > (:(cork dec dec dec) 20)
2929 17
3030
31− > =mal (mo (limo a+15 b+23 ~))
32− > ((cork ~(got by mal) dec) %a)
33− 14
31+ > `@ub`(bex (met 0 23))
32+ 0b10.0000
3433
35− > ((cork ~(got by mal) dec) %b)
36− 22
34+ > `@ub`((cork (cury met 0) bex) 23)
35+ 0b10.0000
3736```
3837
3938---
39+
4040### `++corl`
4141
4242Compose backward
@@ -52,11 +52,12 @@ Build `f` such that
5252#### Source
5353
5454```hoon
55− ++ corl
56− |* [a=gate b=_|=(* **)]
57− =< +:|.((a (b))) :: span check
58− |* c=_+<.b
59− (a (b c))
55+++ corl :: compose backwards
56+ |* [a=$-(* *) b=$-(* *)]
57+ =< +:|.((a (b))) :: type check
58+ =+ c=+<.b
59+ |@ ++ $ (a (b c))
60+ --
6061```
6162
6263#### Examples
@@ -67,6 +68,7 @@ Build `f` such that
6768```
6869
6970---
71+
7072### `++curr` {#curry}
7173
7274Right curry
@@ -104,6 +106,7 @@ A gate.
104106```
105107
106108---
109+
107110### `++cury`
108111
109112Curry left
@@ -141,6 +144,7 @@ A gate.
141144```
142145
143146---
147+
144148### `++hard`
145149
146150Force remold
@@ -173,8 +177,8 @@ not.
173177 ! exit
174178```
175179
176−
177180---
181+
178182### `++soft`
179183
180184Maybe remold
@@ -211,8 +215,8 @@ is not.
211215 ~
212216```
213217
214−
215218---
219+
216220### `++head`
217221
218222Get head
@@ -247,6 +251,7 @@ An atom.
247251```
248252
249253---
254+
250255### `++same`
251256
252257Identity
@@ -281,6 +286,7 @@ A noun.
281286```
282287
283288---
289+
284290### `++slog`
285291
286292Deify printf
@@ -319,6 +325,7 @@ calls that string a piece of data through them, so that an error message will be
319325printed if there's one to print.
320326
321327---
328+
322329### `++mean`
323330
324331Crash and printf
@@ -352,6 +359,7 @@ A crash.
352359```
353360
354361---
362+
355363### `++tail`
356364
357365Get tail
@@ -386,6 +394,7 @@ A noun.
386394```
387395
388396---
397+
389398### `++test`
390399
391400Test for equality
content/docs/hoon/reference/stdlib/table-of-contents.md+2
@@ -504,6 +504,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
504504<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#rep' title="Assemble single"><code>++rep</code></a>
505505<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#repby' title="Replace by product (map)"><code>++rep:by</code></a>
506506<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>
507508<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#rfat' title="(Undocumented)"><code>++rf:at</code></a>
508509<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#ribby' title="Replace values with accumulator (map)"><code>++rib:by</code></a>
509510<a class="tooltip" href='/docs/hoon/reference/stdlib/4c/#rigre' title="Wrap tape in / (tank)"><code>++rig:re</code></a>
@@ -918,6 +919,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
918919<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#rap' title="Assemble nonzero"><code>++rap</code></a>
919920<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#rep' title="Assemble single"><code>++rep</code></a>
920921<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>
921923<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#rsh' title="Rightshift"><code>++rsh</code></a>
922924<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#swp' title="Reverse block order"><code>++swp</code></a>
923925<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#xeb' title="Binary logarithm"><code>++xeb</code></a>
content/docs/userspace/threads/basics/bind.md+13−13
@@ -4,12 +4,11 @@ weight = 2
44template = "doc.html"
55+++
66
7−
87Having looked at `form` and `pure`, we'll now look at the last `strand` arm `bind`. Bind is typically used in combination with micgal (`;<`).
98
109## Micgal
1110
12−Micgal takes four arguments like `spec hoon hoon hoon`. Given `;< a b c d`, it composes them like `((b ,a) c |=(a d))`. So, for example, these two expressions are equivalent:
11+Micgal takes four arguments like `spec hoon hoon hoon`. Given `;< a b c d`, it composes them like `((b ,a) c |=(a d))`. So, for example, these two expressions are equivalent:
1312
1413```hoon
1514;< ~ bind:m (sleep:strandio ~s2)
@@ -30,20 +29,21 @@ Micgal exists simply for readability. The above isn't too bad, but consider this
3029;< g h i
3130j
3231```
32+
3333...as opposed to this monstrosity: `((b ,a) c |=(a ((e ,d) f |=(d ((h ,g) i |=(g j))))))`
3434
3535## bind
3636
37−Bind by itself must be specialised like `(bind:m ,<type>)` and it takes two arguments:
37+Bind by itself must be specialised like `(bind:m ,&lt;type>)` and it takes two arguments:
3838
39−- The first argument is a function that returns the `form` of a strand which produces `<type>`.
40−- The second argument is a gate whose sample is `<type>` and which returns a `form`.
39+- The first argument is a function that returns the `form` of a strand which produces `&lt;type>`.
40+- The second argument is a gate whose sample is `&lt;type>` and which returns a `form`.
4141
42−Since you'll invariably use it in conjunction with micgal, the `<type>` in `;< <type> bind:m ...` will both specialise `bind` and specify the gate's sample.
42+Since you'll invariably use it in conjunction with micgal, the `&lt;type>` in `;< &lt;type> bind:m ...` will both specialise `bind` and specify the gate's sample.
4343
4444Bind calls the first function then, if it succeeded, calls the second gate with the result of the first as its sample. If the first function failed, it will instead just return an error message and not bother calling the next gate. So it's essentially "strand A then strand B".
4545
46−Since the second gate may itself contain another `;< <type> bind:m ...`, you can see how this allows you to glue together an arbitrarily large pipeline, where subsequent gates depend on the previous ones.
46+Since the second gate may itself contain another `;< &lt;type> bind:m ...`, you can see how this allows you to glue together an arbitrarily large pipeline, where subsequent gates depend on the previous ones.
4747
4848## strandio
4949
@@ -67,10 +67,10 @@ Here's a simple thread with a couple of `strandio` functions:
6767```hoon
6868/- spider
6969/+ strandio
70−=, strand=strand:spider
71−^- thread:spider
72−|= arg=vase
73−=/ m (strand ,vase)
70+=, strand=strand:spider
71+^- thread:spider
72+|= arg=vase
73+=/ m (strand ,vase)
7474^- form:m
7575;< t=@da bind:m get-time:strandio
7676;< s=ship bind:m get-our:strandio
@@ -86,11 +86,11 @@ Save it as `/ted/mythread.hoon`, `|commit` it and run it with `-mythread`. You s
8686
8787## Analysis
8888
89−To use `strandio` functions we've imported the library with `/+ strandio`.
89+To use `strandio` functions we've imported the library with `/+ strandio`.
9090
9191`get-time` and `get-our` get the current time & ship from the bowl in `strand-input`. We'll discuss `strand-input` in more detail later.
9292
93−Note how we've specified the face and return type of each strand like `t=@da`, etc.
93+Note how we've specified the face and return type of each strand like `t=@da`, etc.
9494
9595You can see how `pure` has access to the results of previous strands in the pipeline. Note how we've wrapped `pure`'s argument in a `!>` because the thread must produce a `vase`.
9696
content/docs/userspace/threads/basics/input.md+28−28
@@ -10,40 +10,40 @@ The input to a `strand` is defined in `/lib/strand/hoon` as:
1010+$ strand-input [=bowl in=(unit input)]
1111```
1212
13−When a thread is first started, spider will populate the `bowl` and provide it along with an `input` of `~`. If/when new input comes in (such as a poke, sign or watch) it will provide a new updated bowl along with the new input.
13+When a thread is first started, spider will populate the `bowl` and provide it along with an `input` of `~`. If/when new input comes in (such as a poke, sign or watch) it will provide a new updated bowl along with the new input.
1414
1515For example, here's a thread that gets the time from the bowl, runs an IO-less function that takes one or two seconds to compute, and then gets the time again:
1616
1717```hoon
18− /- spider
19− /+ *strandio
20− =, strand=strand:spider
21− |%
22− ++ ackermann
23− |= [m=@ n=@]
24− ?: =(m 0) +(n)
25− ?: =(n 0) $(m (dec m), n 1)
26− $(m (dec m), n $(n (dec n)))
27− --
28− ^- thread:spider
29− |= arg=vase
30− =/ m (strand ,vase)
31− ^- form:m
32− ;< t1=@da bind:m get-time
33− =/ ack (ackermann 3 8)
34− ;< t2=@da bind:m get-time
35− (pure:m !>([t1 t2]))
18+/- spider
19+/+ *strandio
20+=, strand=strand:spider
21+|%
22+++ ackermann
23+ |= [m=@ n=@]
24+ ?: =(m 0) +(n)
25+ ?: =(n 0) $(m (dec m), n 1)
26+ $(m (dec m), n $(n (dec n)))
27+--
28+^- thread:spider
29+|= arg=vase
30+=/ m (strand ,vase)
31+^- form:m
32+;< t1=@da bind:m get-time
33+=/ ack (ackermann 3 8)
34+;< t2=@da bind:m get-time
35+(pure:m !>([t1 t2]))
3636```
3737
3838Since it never does any IO, `t1` and `t2` are the same: `[~2021.3.17..07.47.39..e186 ~2021.3.17..07.47.39..e186]`. However, if we replace the ackermann function with a 2 second `sleep` from strandio:
3939
4040```hoon
41−/- spider
41+/- spider
4242/+ *strandio
43−=, strand=strand:spider
44−^- thread:spider
45−|= arg=vase
46−=/ m (strand ,vase)
43+=, strand=strand:spider
44+^- thread:spider
45+|= arg=vase
46+=/ m (strand ,vase)
4747^- form:m
4848;< t1=@da bind:m get-time
4949;< ~ bind:m (sleep ~s2)
@@ -90,7 +90,7 @@ You can also write a function with a gate whose sample is `strand-input:strand`
9090```hoon
9191/- spider
9292/+ strandio
93−=, strand=strand:spider
93+=, strand=strand:spider
9494=>
9595|%
9696++ bowl-stuff
@@ -99,9 +99,9 @@ You can also write a function with a gate whose sample is `strand-input:strand`
9999 |= tin=strand-input:strand
100100 `[%done [wex.bowl.tin sup.bowl.tin]]
101101--
102−^- thread:spider
103−|= arg=vase
104−=/ m (strand ,vase)
102+^- thread:spider
103+|= arg=vase
104+=/ m (strand ,vase)
105105^- form:m
106106;< res=[boat:gall bitt:gall] bind:m bowl-stuff
107107(pure:m !>(res))
content/docs/userspace/threads/basics/output.md+19−19
@@ -4,7 +4,7 @@ weight = 4
44template = "doc.html"
55+++
66
7−A strand produces a `[(list card) <response>]`. The first part is a list of cards to be sent off immediately, and `<response>` is one of:
7+A strand produces a `[(list card) &lt;response>]`. The first part is a list of cards to be sent off immediately, and `&lt;response>` is one of:
88
99- `[%wait ~]`
1010- `[%skip ~]`
@@ -16,7 +16,7 @@ So, for example, if you feed `2 2` into the following function:
1616
1717```hoon
1818 |= [a=@ud b=@ud]
19− =/ m (strand ,vase)
19+ =/ m (strand ,vase)
2020 ^- form:m
2121 =/ res !>(`@ud`(add a b))
2222 (pure:m res)
@@ -36,12 +36,12 @@ Since a strand is a function from the previously discussed `strand-input` to the
3636So this is a valid thread:
3737
3838```hoon
39−/- spider
40−=, strand=strand:spider
41−^- thread:spider
42−|= arg=vase
43−=/ m (strand ,vase)
44−^- form:m
39+/- spider
40+=, strand=strand:spider
41+^- thread:spider
42+|= arg=vase
43+=/ m (strand ,vase)
44+^- form:m
4545|= strand-input:strand
4646[~ %done arg]
4747```
@@ -49,8 +49,8 @@ So this is a valid thread:
4949As is this:
5050
5151```hoon
52−/- spider
53−=, strand=strand:spider
52+/- spider
53+=, strand=strand:spider
5454|%
5555++ my-function
5656 =/ m (strand ,@t)
@@ -58,9 +58,9 @@ As is this:
5858 |= strand-input:strand
5959 [~ %done 'foo']
6060--
61−^- thread:spider
62−|= arg=vase
63−=/ m (strand ,vase)
61+^- thread:spider
62+|= arg=vase
63+=/ m (strand ,vase)
6464^- form:m
6565;< msg=@t bind:m my-function
6666(pure:m !>(msg))
@@ -69,12 +69,12 @@ As is this:
6969As is this:
7070
7171```hoon
72−/- spider
73−=, strand=strand:spider
74−^- thread:spider
75−|= arg=vase
76−=/ m (strand ,vase)
77−^- form:m
72+/- spider
73+=, strand=strand:spider
74+^- thread:spider
75+|= arg=vase
76+=/ m (strand ,vase)
77+^- form:m
7878|= strand-input:strand
7979=/ umsg !< (unit @tas) arg
8080?~ umsg
content/docs/userspace/threads/basics/summary.md+17−11
@@ -14,6 +14,7 @@ Now here's a quick recap of the main points covered:
1414- Details of interacting with threads via spider can be seen [here](/docs/userspace/threads/reference).
1515
1616## Threads
17+
1718- are like transient gall agents
1819- are used mostly to chain a series of IO operations
1920- can be used by gall agents to spin out IO operations
@@ -24,12 +25,12 @@ Now here's a quick recap of the main points covered:
2425#### Example
2526
2627```hoon
27−/- spider
28−=, strand=strand:spider
29−^- thread:spider
30−|= arg=vase
31−=/ m (strand ,vase)
32−^- form:m
28+/- spider
29+=, strand=strand:spider
30+^- thread:spider
31+|= arg=vase
32+=/ m (strand ,vase)
33+^- form:m
3334(pure:m arg)
3435```
3536
@@ -42,15 +43,20 @@ Now here's a quick recap of the main points covered:
4243- are a core that has three main arms - `form`, `pure` and `bind`:
4344
4445#### form
46+
4547- is the mold of the strand suitable for casting
4648- is the type returned by the other arms
49+
4750#### pure
51+
4852- simply returns the `form` of a `strand` that produces pure's argument without doing any IO
53+
4954#### bind
55+
5056- is used to chain strands together like javascript promises
5157- is used in conjunction with micgal (`;<`)
52−- must be specialised to a type like `;< <type> bind:m ...`
53−- takes two arguments. The first is a function that returns the `form` of a `strand` that produces `<type>`. The second is a gate whose sample is `<type>` and which returns a `form`.
58+- must be specialised to a type like `;< &lt;type> bind:m ...`
59+- takes two arguments. The first is a function that returns the `form` of a `strand` that produces `&lt;type>`. The second is a gate whose sample is `&lt;type>` and which returns a `form`.
5460- calls the first and then, if it succeeded, calls the second with the result of the first as its sample.
5561
5662## Strand input
@@ -62,9 +68,9 @@ Now here's a quick recap of the main points covered:
6268
6369## Strand output
6470
65−- contains `[cards=(list card:agent:gall) <response>]`
66−- `cards` are any cards to be sent immediately
67−- `<response>` is something like `[%done value]`, `[%fail err]`, etc.
71+- contains `[cards=(list card:agent:gall) &lt;response>]`
72+- `cards` are any cards to be sent immediately
73+- `&lt;response>` is something like `[%done value]`, `[%fail err]`, etc.
6874- `%done` will contain the result
6975- responses are only used internally to manage the flow of the thread and are not returned to subscribers.
7076
content/faq.md+1−1
@@ -403,7 +403,7 @@ The standard library and naming is something we’ve discussed changing, and it
403403
404404The right way to think about Hoon is as the ‘C of Urbit’. It’s a bare bones language that gets you pretty close to Nock. Eventually, we’ll probably implement more expressive languages that compile to Urbit. But for now, satisfy your curiosity and [sign up for Hooniversity](https://hooniversity.org/), a community led Hoon educational organization.
405405
406−Another option is to treat [Urbit as an API](/docs/arvo/eyre/using-eyre), which allows one to use common languages such as Python and Javascript to build userspace programs. For now this option is not as powerful as Hoon, but there is still a lot that a developer without the time or inclination to learn Hoon can do.
406+Another option is to treat [Urbit as an API](/docs/arvo/eyre/external-api-ref), which allows one to use common languages such as Python and Javascript to build userspace programs. For now this option is not as powerful as Hoon, but there is still a lot that a developer without the time or inclination to learn Hoon can do.
407407
408408### What is the point of Nock? {#why-nock}
409409
content/getting-started/_index.md+1−1
@@ -19,7 +19,7 @@ If you run Windows, or just want to give it a shot without worrying about the gr
1919 <label for="port-macos">MacOS</label>
2020 <div class="tab">
2121 <p>To install <strong>Port</strong> on MacOS simply download and open the <code>.dmg</code> file.</p>
22− <a href="https://github.com/urbit/port/releases/latest/download/Port.dmg" class="badge-sm bg-green text-white" style="width: 12rem;">
22+ <a href="https://github.com/urbit/port/releases/latest/download/Port.dmg" class="badge-sm bg-green-400 text-white" style="width: 12rem;">
2323 Download Port
2424 </a>
2525 </div>
content/understanding-urbit/interface.md−2
@@ -44,8 +44,6 @@ We built OS 1 for ourselves. We were sick of using centralized, mainstream softw
4444
4545If you’re curious to get a complete overview of OS 1, check out [this post](https://urbit.org/blog/introducing-os1/), watch the [release event](https://www.youtube.com/watch?v=71ViyftPkGk&feature=youtu.be&t=3963) or feel free to [boot a node](/getting-started/) to come talk to us.
4646
47−(Running Urbit still requires a little fiddling around in the command-line, so it’s not for everyone—but we do have [plans for that to improve](https://urbit.org/blog/providers/).)
48−
4947Our target with OS 1 was to produce the [Nokia 3310](https://en.wikipedia.org/wiki/Nokia_3310) of cloud computers. Something bordering on simplistic, but still nice to use. We hit that target, but it’s just the first milestone. Let’s talk a bit about how Landscape grows and matures at a high level (for more specifics on the near-to-medium term, check out [the roadmap](https://urbit.org/understanding-urbit/roadmap/)).
5048
5149![](https://storage.googleapis.com/media.urbit.org/site/understanding-urbit/uu-interface-4.png)
pages/blog.js+2−2
@@ -60,12 +60,12 @@ export default function Blog({ posts, search }) {
6060 </div>
6161 ) : null}
6262 {post.extra.ship ? (
63− <div className="type-sub-bold text-gray font-mono">
63+ <div className="type-sub-bold text-wall-500 font-mono">
6464 {post.extra.ship}
6565 </div>
6666 ) : null}
6767 </div>
68− <div className="text-gray type-sub">
68+ <div className="text-wall-500 type-sub">
6969 {formatDate(new Date(post.date))}
7070 </div>
7171 </div>
pages/blog/[slug].js+2−2
@@ -46,12 +46,12 @@ export default function Post({
4646 <div className="type-sub-bold mr-2">{post.extra.author}</div>
4747 ) : null}
4848 {post.extra.ship ? (
49− <div className="type-sub-bold text-gray font-mono">
49+ <div className="type-sub-bold text-wall-500 font-mono">
5050 {post.extra.ship}
5151 </div>
5252 ) : null}
5353 </div>
54− <div className="text-gray type-sub">
54+ <div className="text-wall-500 type-sub">
5555 {formatDate(new Date(post.date))}
5656 </div>
5757 </Section>
pages/community/[[...slug]].js+4−4
@@ -43,11 +43,11 @@ const pageTree = (thisLink, tree, level = 0) => {
4343 const isThisPage = router.asPath === thisLink;
4444
4545 const pageItemClasses = classnames({
46− "pl-4 text-black text-base hover:text-green": level === 0,
47− "pl-8 text-black text-base hover:text-green": level === 1,
48− "pl-12 text-black text-base hover:text-green": level === 2,
46+ "pl-4 text-wall-600 text-base hover:text-green-400": level === 0,
47+ "pl-8 text-wall-600 text-base hover:text-green-400": level === 1,
48+ "pl-12 text-wall-600 text-base hover:text-green-400": level === 2,
4949 "dot relative": isThisPage,
50− "text-green": isThisPage,
50+ "text-green-400": isThisPage,
5151 });
5252
5353 return (
pages/docs/[[...slug]].js+11−10
@@ -57,16 +57,17 @@ const pageTree = (thisLink, tree, level = 0) => {
5757 });
5858
5959 const headingItemClasses = classnames({
60− "pl-0 text-black text-base font-semibold hover:text-green leading-relaxed":
60+ "pl-0 text-wall-600 text-base font-semibold hover:text-green-400 leading-relaxed":
6161 level === 0,
62− "pl-4 text-black text-base font-semibold hover:text-green": level === 1,
63− "pl-8 text-black text-base hover:text-green": level === 2,
62+ "pl-4 text-wall-600 text-base font-semibold hover:text-green-400":
63+ level === 1,
64+ "pl-8 text-wall-600 text-base hover:text-green-400": level === 2,
6465 });
6566
6667 const pageItemClasses = classnames({
67− "pl-4 text-black text-base hover:text-green": level === 0,
68− "pl-8 text-black text-base hover:text-green": level === 1,
69− "pl-12 text-black text-base hover:text-green": level === 2,
68+ "pl-4 text-wall-600 text-base hover:text-green-400": level === 0,
69+ "pl-8 text-wall-600 text-base hover:text-green-400": level === 1,
70+ "pl-12 text-wall-600 text-base hover:text-green-400": level === 2,
7071 });
7172
7273 return (
@@ -81,7 +82,7 @@ const pageTree = (thisLink, tree, level = 0) => {
8182 const isSelected = router.asPath === href;
8283 const selectedClasses = classnames({
8384 dot: isSelected,
84− "text-green": isSelected,
85+ "text-green-400": isSelected,
8586 });
8687 return (
8788 <li>
@@ -116,10 +117,10 @@ export default function DocsLayout({
116117 const isSelected = "/docs".includes(router.asPath);
117118 const selectedClasses = classnames({
118119 dot: isSelected,
119− "text-green": isSelected,
120− "text-black": !isSelected,
120+ "text-green-400": isSelected,
121+ "text-wall-600": !isSelected,
121122 });
122− const rootClasses = "pl-0 text-base hover:text-green";
123+ const rootClasses = "pl-0 text-base hover:text-green-400";
123124 return (
124125 <>
125126 <Head>
pages/events.js+5−5
@@ -11,13 +11,13 @@ import { contact } from "../lib/constants";
1111
1212export function EventCard({ event, dir, className }) {
1313 // Event tiles have a 'dark mode' used when their background images are dark and white text is needed for legibility.
14− const grayText = event.extra?.dark ? "text-midWhite" : "text-gray";
15− const blackText = event.extra?.dark ? "text-white" : "text-black";
14+ const grayText = event.extra?.dark ? "text-midWhite" : "text-wall-500";
15+ const blackText = event.extra?.dark ? "text-white" : "text-wall-600";
1616
1717 return (
1818 <div
1919 key={event.slug}
20− className={`mb-24 cursor-pointer bg-wall rounded-xl h-96 bg-cover bg-center bg-no-repeat ${className}`}
20+ className={`mb-24 cursor-pointer bg-wall-100 rounded-xl h-96 bg-cover bg-center bg-no-repeat ${className}`}
2121 style={{
2222 backgroundImage:
2323 `${
@@ -94,7 +94,7 @@ export default function Events({ pastEvents, comingSoon, search }) {
9494 {comingSoon.length > 0 ? (
9595 <>
9696 <div className="mb-8 table">
97− <h3 className="text-gray">Coming Soon</h3>
97+ <h3 className="text-wall-500">Coming Soon</h3>
9898 </div>
9999 {comingSoon.map((post) => {
100100 return <EventCard event={post} />;
@@ -102,7 +102,7 @@ export default function Events({ pastEvents, comingSoon, search }) {
102102 </>
103103 ) : null}
104104 <div className="mb-8 table">
105− <h3 className="text-gray">Past Events</h3>
105+ <h3 className="text-wall-500">Past Events</h3>
106106 </div>
107107 {pastEvents.map((post) => {
108108 return <EventCard event={post} />;
pages/events/[slug].js+6−4
@@ -38,21 +38,23 @@ export default function Event({
3838 <h1>{post.title}</h1>
3939
4040 {post.extra.author ? (
41− <div className="type-ui text-gray mt-4 md:mt-8 lg:mt-10">
41+ <div className="type-ui text-wall-500 mt-4 md:mt-8 lg:mt-10">
4242 {post.extra.author}
4343 </div>
4444 ) : null}
4545 {post.extra.ship ? (
46− <div className="type-ui text-gray font-mono">{post.extra.ship}</div>
46+ <div className="type-ui text-wall-500 font-mono">
47+ {post.extra.ship}
48+ </div>
4749 ) : null}
4850
4951 <div className="mt-16">
50− <p className="type-ui text-gray">
52+ <p className="type-ui text-wall-500">
5153 {formatDate(new Date(post.date))} {", " + post.extra.time}
5254 </p>
5355 {post.registration_url && post.pinned ? (
5456 <a
55− className="button-sm bg-green text-white flex-0 mt-4"
57+ className="button-sm bg-green-400 text-white flex-0 mt-4"
5658 href={post.extra.registration_url}
5759 >
5860 RSVP
pages/getting-started/[[...slug]].js+8−7
@@ -43,11 +43,12 @@ const pageTree = (thisLink, tree, level = 0) => {
4343 const isThisPage = router.asPath === thisLink;
4444
4545 const pageItemClasses = classnames({
46− "pl-0 font-semibold text-gray text-base hover:text-green": level === 0,
47− "pl-8 text-black text-base hover:text-green": level === 1,
48− "pl-12 text-black text-base hover:text-green": level === 2,
46+ "pl-0 font-semibold text-wall-500 text-base hover:text-green-400":
47+ level === 0,
48+ "pl-8 text-wall-600 text-base hover:text-green-400": level === 1,
49+ "pl-12 text-wall-600 text-base hover:text-green-400": level === 2,
4950 "dot relative": isThisPage,
50− "text-green": isThisPage,
51+ "text-green-400": isThisPage,
5152 });
5253
5354 return (
@@ -64,10 +65,10 @@ export default function UsingLayout({ posts, data, params, search, markdown }) {
6465 const isSelected = "/getting-started".includes(router.asPath);
6566 const selectedClasses = classnames({
6667 dot: isSelected,
67− "text-green": isSelected,
68− "text-gray": !isSelected,
68+ "text-green-400": isSelected,
69+ "text-wall-500": !isSelected,
6970 });
70− const rootClasses = "pl-0 font-semibold text-base hover:text-green";
71+ const rootClasses = "pl-0 font-semibold text-base hover:text-green-400";
7172
7273 return (
7374 <>
pages/grants.js+17−16
@@ -157,17 +157,17 @@ export default function Grants({
157157 </div>
158158 <div className="flex flex-wrap">
159159 <Link href="#find-a-grant">
160− <button className="button-lg bg-green text-white mr-2">
160+ <button className="button-lg bg-green-400 text-white mr-2">
161161 View Grants
162162 </button>
163163 </Link>
164164 <Link href="#proposals">
165− <button className="button-lg bg-blue text-white mr-2">
165+ <button className="button-lg bg-blue-400 text-white mr-2">
166166 Submit a Proposal
167167 </button>
168168 </Link>
169169 <Link href="#gifts">
170− <a className="button-lg bg-ultraDeepWall text-white mr-2">
170+ <a className="button-lg bg-wall-600 text-white mr-2">
171171 Recent Gifts
172172 </a>
173173 </Link>
@@ -190,9 +190,9 @@ export default function Grants({
190190 {featuredGrants.map((grant) => {
191191 return (
192192 <Link href={"/grants/" + grant.slug}>
193− <div className="p-8 bg-washedGreen rounded-lg w-full md:w-1/3 cursor-pointer">
193+ <div className="p-8 bg-green-100 rounded-lg w-full md:w-1/3 cursor-pointer">
194194 <h4 className="pb-4">{grant.title}</h4>
195− <p className="text-green pb-4">
195+ <p className="text-green-400 pb-4">
196196 {grant.extra.reward} star
197197 {grant.extra.reward === 1 ? "" : "s"}{" "}
198198 {grant.extra.completed ? "awarded" : "pending"}
@@ -223,7 +223,7 @@ export default function Grants({
223223
224224 <Link href="#find-a-grant">
225225 <button
226− className="button-lg bg-blue text-white mr-2"
226+ className="button-lg bg-blue-400 text-white mr-2"
227227 onClick={() => {
228228 setIncludeInProgress(true);
229229 setIncludeCompleted(true);
@@ -247,7 +247,7 @@ export default function Grants({
247247 {/* Uncomment once people added to content/gifts folder. */}
248248 {/* {gifts.map((e) => {
249249 return (
250− <div className="bg-wall rounded-xl p-4 my-8 flex justify-between">
250+ <div className="bg-wall-100 rounded-xl p-4 my-8 flex justify-between">
251251 <p className="font-semibold">
252252 {e.name}
253253 </p>
@@ -278,7 +278,7 @@ export default function Grants({
278278 <h2 id="find-a-grant" className="pb-8">
279279 Find a Grant
280280 </h2>
281− <h5 className="text-black font-semibold my-2">Work Programs</h5>
281+ <h5 className="text-wall-600 font-semibold my-2">Work Programs</h5>
282282 <div className="flex flex-wrap items-center pb-2">
283283 <button
284284 onClick={() => {
@@ -286,18 +286,19 @@ export default function Grants({
286286 setTypes(types);
287287 }}
288288 className={`badge-lg my-2 mr-2 ${
289− tab === 0 ? "text-white bg-black" : "text-gray bg-wall"
289+ tab === 0 ? "text-white bg-black" : "text-wall-500 bg-wall-100"
290290 }`}
291291 >
292292 All <div className="opacity-50 ml-2">{allCount}</div>
293293 </button>
294294 {types.map((type, index) => {
295295 const className = classnames({
296− "bg-blue text-white": tab === index + 1 && type === "Proposal",
297− "bg-green text-white":
296+ "bg-blue-400 text-white":
297+ tab === index + 1 && type === "Proposal",
298+ "bg-green-400 text-white":
298299 tab === index + 1 && type === "Apprenticeship",
299− "bg-yellow": tab === index + 1 && type === "Bounty",
300− "bg-wall text-gray": tab !== index + 1,
300+ "bg-yellow-300": tab === index + 1 && type === "Bounty",
301+ "bg-wall-100 text-wall-500": tab !== index + 1,
301302 });
302303 return (
303304 <button
@@ -313,13 +314,13 @@ export default function Grants({
313314 );
314315 })}
315316 </div>
316− <h5 className="text-black font-semibold my-2">Work Categories</h5>
317+ <h5 className="text-wall-600 font-semibold my-2">Work Categories</h5>
317318 <div className="flex flex-wrap mb-12">
318319 {categories.map((category) => {
319320 const isActive = activeTags.includes(category);
320321 const activeClasses = classnames({
321− "bg-green text-white": isActive,
322− "bg-wall text-gray": !isActive,
322+ "bg-green-400 text-white": isActive,
323+ "bg-wall-100 text-wall-500": !isActive,
323324 });
324325 return (
325326 <button
pages/grants/[slug].js+10−8
@@ -37,22 +37,24 @@ export default function Grant({ post, markdown, search, similarGrants }) {
3737 <Section narrow short>
3838 <h1>{post.title}</h1>
3939 {post.extra.assignee ? (
40− <div className="type-ui text-gray mt-4">
40+ <div className="type-ui text-wall-500 mt-4">
4141 Grantee: {post.extra.assignee}
4242 </div>
4343 ) : null}
4444 {post.extra.ship ? (
45− <div className="type-ui text-gray font-mono">{post.extra.ship}</div>
45+ <div className="type-ui text-wall-500 font-mono">
46+ {post.extra.ship}
47+ </div>
4648 ) : null}
47− <div className="type-ui text-gray mt-4 md:mt-8 lg:mt-10">
49+ <div className="type-ui text-wall-500 mt-4 md:mt-8 lg:mt-10">
4850 {formatDate(new Date(post.date))}
4951 </div>
5052 <div className="flex items-center flex-wrap mt-4 md:mt-8 lg:mt-10">
5153 {post.taxonomies.grant_type.map((category) => {
5254 const className = classnames({
53− "bg-blue text-white": category === "Proposal",
54− "bg-green text-white": category === "Apprenticeship",
55− "bg-yellow": category === "Bounty",
55+ "bg-blue-400 text-white": category === "Proposal",
56+ "bg-green-400 text-white": category === "Apprenticeship",
57+ "bg-yellow-300": category === "Bounty",
5658 });
5759 return (
5860 <div className={`${className} badge-sm mr-1 my-1`}>
@@ -61,7 +63,7 @@ export default function Grant({ post, markdown, search, similarGrants }) {
6163 );
6264 })}
6365 {post.taxonomies.grant_category.map((category) => (
64− <div className="bg-gray text-wall badge-sm mr-1 my-1">
66+ <div className="bg-wall-500 text-wall-100 badge-sm mr-1 my-1">
6567 {category}
6668 </div>
6769 ))}
@@ -72,7 +74,7 @@ export default function Grant({ post, markdown, search, similarGrants }) {
7274 </Section>
7375 {canApply && (
7476 <a
75− className="bg-green text-white badge-sm"
77+ className="bg-green-400 text-white badge-sm"
7678 href={post?.extra?.work_request_link}
7779 target="_blank"
7880 >
pages/index.js+22−20
@@ -22,21 +22,21 @@ export default function Home({ posts, events, openGrantsCount, search }) {
2222 const agent = window.navigator.appVersion;
2323 if (agent.includes("Win")) {
2424 return (
25− <span className="button-lg type-ui mb-5 bg-ultraDeepWall text-white">
25+ <span className="button-lg type-ui mb-5 bg-wall-600 text-white">
2626 Coming soon for Windows
2727 </span>
2828 );
2929 } else if (agent.includes("Mac")) {
3030 return (
3131 <a href="https://github.com/urbit/port/releases/latest/download/Port.dmg">
32− <button className="button-lg type-ui mb-5 bg-green text-white">
32+ <button className="button-lg type-ui mb-5 bg-green-400 text-white">
3333 Download For macOS
3434 </button>
3535 </a>
3636 );
3737 } else if (agent.includes("Linux")) {
3838 return (
39− <code className="button-lg type-ui mb-5 bg-ultraDeepWall text-white">
39+ <code className="button-lg type-ui mb-5 bg-wall-600 text-white">
4040 sudo snap install port
4141 </code>
4242 );
@@ -70,11 +70,11 @@ export default function Home({ posts, events, openGrantsCount, search }) {
7070 // Introducing Port
7171 }
7272 <Section className="hidden md:flex">
73− <div className="bg-wall w-11/12 port-hero-card-height rounded-3xl flex">
73+ <div className="bg-wall-100 w-11/12 port-hero-card-height rounded-3xl flex">
7474 <div className="pt-20 pl-12 w-7/12">
7575 <div className="pb-8">
7676 <h2 className="p-0 m-0 pb-2 leading-none">Introducing</h2>
77− <h2 className="text-green p-0 m-0 leading-none">Port</h2>
77+ <h2 className="text-green-400 p-0 m-0 leading-none">Port</h2>
7878 </div>
7979 <h4 className="pb-8">The Urbit client, now in beta.</h4>
8080 <p className="pb-24">
@@ -84,7 +84,7 @@ export default function Home({ posts, events, openGrantsCount, search }) {
8484 {heroButton}
8585 <a
8686 href="https://github.com/urbit/port"
87− className="type-ui text-gray"
87+ className="type-ui text-wall-500"
8888 >
8989 View on GitHub
9090 </a>
@@ -100,29 +100,31 @@ export default function Home({ posts, events, openGrantsCount, search }) {
100100 <div className="flex items-center pb-12">
101101 <h2 className="m-0 p-0 mr-4">Grants</h2>
102102 <Link href="/grants#find-a-grant">
103− <a className="bg-green text-white badge-lg">
103+ <a className="bg-green-400 text-white badge-lg">
104104 {openGrantsCount} Open
105105 </a>
106106 </Link>
107107 </div>
108− <div className="flex flex-col md:flex-row w-full items-center md:items-start bg-washedGreen px-8 py-8 rounded-xl">
108+ <div className="flex flex-col md:flex-row w-full items-center md:items-start bg-green-100 px-8 py-8 rounded-xl">
109109 <div className="flex items-center flex-col p-4 w-full">
110− <h2 className="text-green">200+</h2>
111− <h4 className="text-green text-center pt-2">
110+ <h2 className="text-green-400">200+</h2>
111+ <h4 className="text-green-400 text-center pt-2">
112112 Urbit stars awarded
113113 </h4>
114114 </div>
115− <div className="h-0 w-0 md:h-24 md:w-4 bg-lightGreen self-center" />
115+ <div className="h-0 w-0 md:h-24 md:w-4 bg-green-200 self-center" />
116116 <div className="flex items-center flex-col p-4 w-full">
117− <h2 className="text-green">400+</h2>
118− <h4 className="text-green text-center pt-2">
117+ <h2 className="text-green-400">400+</h2>
118+ <h4 className="text-green-400 text-center pt-2">
119119 Different Contributors
120120 </h4>
121121 </div>
122− <div className="h-0 w-0 md:h-24 md:w-4 bg-lightGreen self-center" />
122+ <div className="h-0 w-0 md:h-24 md:w-4 bg-green-200 self-center" />
123123 <div className="flex items-center flex-col p-4 w-full">
124− <h2 className="text-green">45+</h2>
125− <h4 className="text-green text-center pt-2">Active Projects</h4>
124+ <h2 className="text-green-400">45+</h2>
125+ <h4 className="text-green-400 text-center pt-2">
126+ Active Projects
127+ </h4>
126128 </div>
127129 </div>
128130 <div className="measure py-12">
@@ -133,7 +135,7 @@ export default function Home({ posts, events, openGrantsCount, search }) {
133135 </p>
134136 <div className="table">
135137 <Link href="/grants">
136− <a className="button-lg bg-green text-white">View Grants</a>
138+ <a className="button-lg bg-green-400 text-white">View Grants</a>
137139 </Link>
138140 </div>
139141 </div>
@@ -175,7 +177,7 @@ export default function Home({ posts, events, openGrantsCount, search }) {
175177 for building on Urbit using the languages you already know.
176178 </p>
177179 <Link href="/docs">
178− <button className="button-lg type-ui text-white bg-ultraDeepWall">
180+ <button className="button-lg type-ui text-white bg-wall-600">
179181 Read the Developer Docs
180182 </button>
181183 </Link>
@@ -203,7 +205,7 @@ export default function Home({ posts, events, openGrantsCount, search }) {
203205 />
204206 </div>
205207 <Link href="/blog">
206− <button className="button-lg type-ui text-white bg-green">
208+ <button className="button-lg type-ui text-white bg-green-400">
207209 See More
208210 </button>
209211 </Link>
@@ -232,7 +234,7 @@ export default function Home({ posts, events, openGrantsCount, search }) {
232234 />
233235 </div>
234236 <Link href="/events">
235− <button className="button-lg type-ui text-white bg-ultraDeepWall">
237+ <button className="button-lg type-ui text-white bg-wall-600">
236238 More Events
237239 </button>
238240 </Link>
pages/media/[slug].js+5−3
@@ -29,14 +29,16 @@ export default function MediaPage({ post, markdown, search }) {
2929 <Section narrow short>
3030 <h1>{post.title}</h1>
3131 {post.extra.author ? (
32− <div className="type-ui text-gray mt-4 md:mt-8 lg:mt-10">
32+ <div className="type-ui text-wall-500 mt-4 md:mt-8 lg:mt-10">
3333 {post.extra.author}
3434 </div>
3535 ) : null}
3636 {post.extra.ship ? (
37− <div className="type-ui text-gray font-mono">{post.extra.ship}</div>
37+ <div className="type-ui text-wall-500 font-mono">
38+ {post.extra.ship}
39+ </div>
3840 ) : null}
39− <div className="type-ui text-gray mt-16">
41+ <div className="type-ui text-wall-500 mt-16">
4042 {formatDate(new Date(post.date))}
4143 </div>
4244 </Section>
pages/understanding-urbit/[[...slug]].js+7−7
@@ -49,11 +49,11 @@ const pageTree = (thisLink, tree, level = 0) => {
4949 const isThisPage = router.asPath === thisLink;
5050
5151 const pageItemClasses = classnames({
52− "pl-4 text-black text-base hover:text-green": level === 0,
53− "pl-8 text-black text-base hover:text-green": level === 1,
54− "pl-12 text-black text-base hover:text-green": level === 2,
52+ "pl-4 text-wall-600 text-base hover:text-green-400": level === 0,
53+ "pl-8 text-wall-600 text-base hover:text-green-400": level === 1,
54+ "pl-12 text-wall-600 text-base hover:text-green-400": level === 2,
5555 "dot relative": isThisPage,
56− "text-green": isThisPage,
56+ "text-green-400": isThisPage,
5757 });
5858
5959 return (
@@ -78,10 +78,10 @@ export default function UnderstandingLayout({
7878 const isSelected = "/understanding-urbit".includes(router.asPath);
7979 const selectedClasses = classnames({
8080 dot: isSelected,
81− "text-green": isSelected,
82− "text-black": !isSelected,
81+ "text-green-400": isSelected,
82+ "text-wall-600": !isSelected,
8383 });
84− const rootClasses = "pl-4 text-base hover:text-green";
84+ const rootClasses = "pl-4 text-base hover:text-green-400";
8585 return (
8686 <>
8787 <Head>
pages/updates.js+4−4
@@ -38,21 +38,21 @@ export default function Updates({ posts, search }) {
3838 <h3 className="mt-4">{post.title}</h3>
3939 <div className="flex items-baseline">
4040 {post?.extra.author ? (
41− <div className="type-ui text-gray mt-4">
41+ <div className="type-ui text-wall-500 mt-4">
4242 {post?.extra.author}
4343 </div>
4444 ) : null}
4545 {post?.extra.author && post?.extra.ship ? (
46− <div className="mx-1 text-gray">•</div>
46+ <div className="mx-1 text-wall-500">•</div>
4747 ) : null}
4848 {post?.extra.ship ? (
49− <div className="type-ui text-gray font-mono">
49+ <div className="type-ui text-wall-500 font-mono">
5050 {post.extra.ship}
5151 </div>
5252 ) : null}
5353 </div>
5454
55− <div className="type-ui text-gray mt-2">
55+ <div className="type-ui text-wall-500 mt-2">
5656 {formatDate(new Date(post.date))}
5757 </div>
5858 </div>
pages/updates/[slug].js+3−3
@@ -41,14 +41,14 @@ export default function Post({
4141 <Section short narrow>
4242 <h1>{post.title}</h1>
4343 {post.author ? (
44− <div className="type-ui text-gray mt-4 md:mt-8 lg:mt-10">
44+ <div className="type-ui text-wall-500 mt-4 md:mt-8 lg:mt-10">
4545 {post.author}
4646 </div>
4747 ) : null}
4848 {post.ship ? (
49− <div className="type-ui text-gray font-mono">{post.ship}</div>
49+ <div className="type-ui text-wall-500 font-mono">{post.ship}</div>
5050 ) : null}
51− <div className="type-ui text-gray mt-4 md:mt-8 lg:mt-10">
51+ <div className="type-ui text-wall-500 mt-4 md:mt-8 lg:mt-10">
5252 {formatDate(new Date(post.date))}
5353 </div>
5454 </Section>
pages/using/[[...slug]].js+8−7
@@ -51,16 +51,17 @@ const pageTree = (thisLink, tree, level = 0) => {
5151 });
5252
5353 const headingItemClasses = classnames({
54− "pl-0 text-gray text-base font-semibold hover:text-green leading-relaxed":
54+ "pl-0 text-wall-500 text-base font-semibold hover:text-green-400 leading-relaxed":
5555 level === 0,
56− "pl-4 text-gray text-base font-semibold hover:text-green": level === 1,
57− "pl-8 text-gray text-base hover:text-green": level === 2,
56+ "pl-4 text-wall-500 text-base font-semibold hover:text-green-400":
57+ level === 1,
58+ "pl-8 text-wall-500 text-base hover:text-green-400": level === 2,
5859 });
5960
6061 const pageItemClasses = classnames({
61− "pl-4 text-black text-base hover:text-green": level === 0,
62− "pl-8 text-black text-base hover:text-green": level === 1,
63− "pl-12 text-black text-base hover:text-green": level === 2,
62+ "pl-4 text-wall-600 text-base hover:text-green-400": level === 0,
63+ "pl-8 text-wall-600 text-base hover:text-green-400": level === 1,
64+ "pl-12 text-wall-600 text-base hover:text-green-400": level === 2,
6465 dot: isThisPage,
6566 });
6667
@@ -76,7 +77,7 @@ const pageTree = (thisLink, tree, level = 0) => {
7677 const isSelected = router.asPath === href;
7778 const selectedClasses = classnames({
7879 dot: isSelected,
79− "text-green": isSelected,
80+ "text-green-400": isSelected,
8081 });
8182 return (
8283 <li>
styles/globals.css+6−5
@@ -9,6 +9,7 @@ html,
99body {
1010 padding: 0;
1111 margin: 0;
12+ @apply text-wall-600;
1213}
1314
1415a {
@@ -18,7 +19,7 @@ a {
1819}
1920
2021p a {
21− @apply text-green;
22+ @apply text-green-400 font-semibold;
2223}
2324
2425button {
@@ -29,7 +30,7 @@ button {
2930
3031h1,
3132.type-h1 {
32− @apply text-3xl md:text-4xl lg:text-5xl font-bold leading-tight;
33+ @apply text-3xl md:text-4xl lg:text-5xl font-bold leading-tight text-wall-600;
3334}
3435
3536h2,
@@ -69,7 +70,7 @@ p,
6970}
7071
7172code .type-code {
72− @apply bg-wall p-4 font-mono;
73+ @apply bg-wall-100 p-4 font-mono;
7374}
7475
7576/* Utils */
@@ -95,7 +96,7 @@ code .type-code {
9596.bg-img {
9697 background-repeat: no-repeat;
9798 background-position: center center;
98− @apply bg-wall;
99+ @apply bg-wall-100;
99100}
100101
101102.button-sm {
@@ -190,7 +191,7 @@ a:hover {
190191 position: absolute;
191192 left: -0.75rem;
192193 top: 0.4rem;
193− @apply bg-green;
194+ @apply bg-green-400;
194195}
195196
196197.sidebar figure,
styles/markdown.css+7−7
@@ -92,12 +92,12 @@
9292
9393.markdown code,
9494.markdown code[class*="language-"] {
95− @apply px-2 py-0.5 bg-wall rounded-md;
95+ @apply px-2 py-0.5 bg-wall-100 rounded-md;
9696}
9797
9898.markdown a code,
9999.markdown a code[class*="language-"] {
100− @apply bg-washedGreen text-green;
100+ @apply bg-green-100 text-green-400;
101101}
102102
103103.markdown pre code,
@@ -118,11 +118,11 @@
118118.markdown li a,
119119.markdown h3 a,
120120.markdown h2 a {
121− @apply text-green;
121+ @apply text-green-400;
122122}
123123
124124.markdown blockquote {
125− @apply border-l-4 border-deepWall pl-6 italic;
125+ @apply border-l-4 border-wall-500 pl-6 italic;
126126}
127127.markdown blockquote cite {
128128 @apply not-italic font-semibold;
@@ -141,14 +141,14 @@
141141 border-bottom-width: 2px;
142142 border-bottom-style: solid;
143143 padding: 8px !important;
144− @apply border-wall;
144+ @apply border-wall-100;
145145}
146146
147147.markdown table tr th:first-child,
148148.markdown table tr td:first-child {
149149 border-left-width: 2px;
150150 border-left-style: solid;
151− @apply border-wall;
151+ @apply border-wall-100;
152152}
153153
154154.markdown table tr th {
@@ -157,7 +157,7 @@
157157 border-top-style: solid;
158158 text-align: left;
159159 vertical-align: middle;
160− @apply border-wall;
160+ @apply border-wall-100;
161161}
162162
163163/* top-left border-radius */
styles/prism.css+5−5
@@ -8,7 +8,7 @@ https://prismjs.com/download.html#themes=prism-coy&languages=markup+css+clike+ja
88
99code[class*="language-"],
1010pre[class*="language-"] {
11− @apply text-ultraDeepWall;
11+ @apply text-wall-600;
1212 background: none;
1313 font-family: "Source Code Pro", monospace;
1414 font-size: 1em;
@@ -75,7 +75,7 @@ code[class*="language-"] {
7575
7676.token.function-name,
7777.token.function {
78− @apply text-black;
78+ @apply text-wall-600;
7979}
8080
8181.token.selector,
@@ -84,20 +84,20 @@ code[class*="language-"] {
8484.token.char,
8585.token.builtin,
8686.token.inserted {
87− @apply text-green;
87+ @apply text-green-400;
8888}
8989
9090.token.operator,
9191.token.entity,
9292.token.url,
9393.token.variable {
94− @apply text-gray;
94+ @apply text-wall-500;
9595}
9696
9797.token.atrule,
9898.token.attr-value,
9999.token.class-name {
100− @apply text-blue;
100+ @apply text-blue-400;
101101}
102102
103103.token.keyword {
tailwind.config.js+33−16
@@ -3,26 +3,43 @@ module.exports = {
33 darkMode: false, // or 'media' or 'class'
44 theme: {
55 colors: {
6+ // Wall
7+ "wall-100": "#F3F2F0", // Primary
8+ "wall-200": "#E3E0DB",
9+ "wall-300": "#C8C4BD",
10+ "wall-400": "#918C84",
11+ "wall-500": "#5A564F",
12+ "wall-600": "#24221E",
13+ washedWall: "rgba(240, 239, 236, .8)", // for overlays
14+ // Greens (Theme Primary Color)
15+ "green-100": "#E5F7F1",
16+ "green-200": "#BFEBDB",
17+ "green-300": "#80D8B8",
18+ "green-400": "#00B171", // Primary
19+ "green-500": "#006842",
20+ "green-600": "#001F13",
21+ // Yellows
22+ "yellow-100": "#FFFCF1",
23+ "yellow-200": "#FEEBAA",
24+ "yellow-300": "#FCDB63", // Primary
25+ "yellow-400": "#CE9645",
26+ "yellow-500": "#A15A2D",
27+ "yellow-600": "#602010",
28+ // Blues
29+ "blue-100": "#F1F9FF",
30+ "blue-200": "#BAE9FF",
31+ "blue-300": "#7ED8FF",
32+ "blue-400": "#219DFF", // Primary
33+ "blue-500": "#193C90",
34+ "blue-600": "#070821",
35+ // Util
636 black: "#000",
737 white: "#FFF",
8− gray: "rgba(0, 0, 0, 0.6)",
9− lightGray: "rgba(0, 0, 0, 0.2)",
10− wall: "rgba(244, 243, 241, 1)",
11− deepWall: "#E8E4DD",
12− ultraDeepWall: "#32302D",
13− washedWall: "rgba(240, 239, 236, .8)",
14− yellow: "#FCDB63",
15− midYellow: "rgba(255, 199, 0, 0.6)",
16− lightYellow: "rgba(255, 199, 0, 0.3)",
17− washedYellow: "rgba(255, 199, 0, 0.05)",
18− green: "rgba(0, 177, 113, 1)",
19− midGreen: "rgba(0, 159, 101, 0.6)",
20− lightGreen: "rgba(0, 159, 101, 0.3)",
21− washedGreen: "rgba(0, 159, 101, 0.1)",
22− blue: "#219DFF",
38+ transparent: "rgba(0,0,0,0)",
39+ // Syntax highlighting
2340 purple: "rgba(157,82,255,0.8)",
2441 red: "#ff4136",
25− transparent: "rgba(0,0,0,0)",
42+ // White semi-opaques
2643 washedWhite: "rgba(255,255,255, 0.5)",
2744 midWhite: "rgba(255,255,255, 0.8)",
2845 },