- Urbit is a "solid-state interpreter" (SSI) that seamlessly integrates an interpreter with an ACID database π οΈ.
- Defined as an "operating function" (OF), Urbit serves as a versatile OS, meticulously designed as a pure function of its input stream π.
- Functionally, Urbit constitutes a comprehensive execution stack, encompassing a VM, compiler, OS, network, web server, and core applications π.
- The system is currently in an alpha-grade state, boasting a live, relatively stable network π.
- Urbit emerges as a fresh, clean-slate system software stack, departing from conventional paradigms π.
- At its core, it features a nonpreemptive OS (Arvo), meticulously crafted in a strict, typed functional language known as Hoon, which elegantly compiles into a combinator VM called Nock π§©.
- Additionally, Urbit boasts an encrypted packet network known as Ames and a global version-control system known as Clay π.
- The entire stack is an elegant, concise masterpiece, consisting of approximately 30,000 lines of Hoon π».
- Urbit represents an "operating function", wherein the entire lifecycle is encapsulated as a pure, unchanging, compact function that operates on its input stream π¦.
- This function, an interpreter, compiles an initial language, which subsequently boots an initial kernel π.
- Remarkably, everything aside from the lifecycle function can autonomously upgrade itself directly from source code in the input stream π.
- Urbit stands as a "solid-state interpreter", a distinctive feature that endows it with an interpreter devoid of transient state π§.
- Notably, the interpreter itself functions as an ACID database, and every event manifests as a transaction within a log-checkpoint system ποΈ.
- This sophisticated interpreter gracefully runs on a standard Unix server, facilitating seamless interactions with Unix users, fellow Urbit nodes, and the vast expanse of the Internet π.
- Urbit sets out to redefine security paradigms by learning from the shortcomings of 20th-century software π«.
- It meticulously addresses the heterogeneity and architectural mismatches prevalent in the current software stack π§±.
- Urbit effectively eradicates vulnerabilities and potential attack vectors π‘οΈ.
- Urbit is ingeniously designed to serve as a "personal server", a paradigm shift from the conventional model of hosting multiple developer-controlled web services on external servers π.
- This groundbreaking approach empowers users to host their own applications on a singular, personal server, offering unprecedented control and privacy πΆοΈ.
- Urbit is at the forefront of the "personal server" revolution, replacing multiple developer-hosted web services with a multitude of self-hosted applications on a singular, user-controlled server π.
- The ultimate goal is to grant individuals the power to possess their own personal servers, analogous to the ubiquity of personal clients (browsers) π₯οΈ.
A Clean-Slate Stack π±
- Urbit is forged from the ground up as a clean-slate system software stack, catering to the usability challenges of managing a Unix box on the public Internet π.
- Its user-friendly approach simplifies administration while enhancing overall efficiency πΌ.
Uniform Persistence π¦
- Storage within Urbit is streamlined and uniformly persistent, effectively eliminating the distinction between fast yet volatile memory and slower but stable disk storage π½.
- The entire system's state is elegantly encapsulated within a single, stable data structure ποΈ.
Source-Independent Packet Networking π
- Urbit proudly embraces unreliable and insecure packet networking as its primary I/O mechanism π€.
- It introduces a clear distinction between buses (responsible for transporting commands) and networks (tasked with packet transmission) π.
- Through the use of source-independent packet semantics, Urbit successfully separates semantics from network topology π§©.
- Computation within Urbit is defined as a high-level deterministic interpreter, where the operational computation takes the form of a function call rather than traditional clock cycles β°.
- The system's state is elegantly represented as a data structure, deviating from the conventional memory image approach π.
- Urbit sets out to combine Turing completeness with determinism and repeatability π.
- This ambitious goal is realized through the division of complex computations into fine-grained subtasks, effectively managing long-running computations through cooperative multitasking π€.
- Nock emerges as a non-lambda combinator interpreter, serving as the cornerstone of Urbit's VM and axiomatic definition π§©.
- This elegant interpreter employs combinator functions as its fundamental building blocks π οΈ.
Nock Operators
- Nock introduces a set of prefix operators:
- ? (depth test): Generates 0 for cell input and 1 for atom input β.
- + (increment): Increments the atom by 1 β.
- = (comparison): Yields 0 if the two inputs are identical nouns and 1 otherwise π§Ύ.
- / (tree addressing): Retrieves the subtree located at the specified address within the input π².
- * (interpreter function): Interprets the formula in conjunction with the subject, producing the resulting value π.
Regular Form
- Nock's twigs adhere to a regular form, initiating with either a keyword or a rune π.
- While tall twigs are multi-line and can encompass flat twigs, flat twigs are single-line and enclosed within parentheses π±.
- This regular format effectively addresses issues such as closing terminator piles and indentation inconsistencies π§Ό.
- Hoon takes center stage as a strict, higher-order typed functional language, seamlessly compiling itself into Nock π§ .
- It effectively acts as a "functional assembly language" tailored to Urbit's unique requirements π οΈ.
- Hoon adopts a span system to express data structures and protocols π.
- Spans are defined as idempotent functions, responsible for normalizing arbitrary nouns and validating untrusted network data π.
- A combination of auras (lightweight, advisory atom types) and pattern matching forms the foundation for defining and manipulating data structures π§©.
- Hoon's type inference diverges from traditional unification methods, opting for forward tracing π.
- This innovative type analysis algorithm traces through the code, carefully monitoring comparisons to be established, and efficiently prunes the search tree when necessary π±.
- The process encompasses expanding $hold spans and caching outcomes to bolster efficiency πΌ.
- Arvo assumes the role of a single-threaded event interpreter, bearing resemblance to other event dispatchers like node.js π.
- Its primary responsibility involves managing events and dispatching actions in response to the content of these events π―.
- Arvo's interface boasts two arms: poke and peek π€.
- poke invokes the next step in the event stream, producing a list of actions and a fresh Arvo core π.
- On the other hand, peek offers a globally referentially transparent namespace, delivering a mark and a general noun based on the provided path π.
- Arvo excels at decoding packets into meals, each representing distinct types of messages π§.
- Meals may assume the form of $bond (messages), $part (fragments), $back (acknowledgments), or $fore (forwarded packets) π.
- The decoding process involves data cueing based on encoding, culminating in the production of the appropriate output π.
- Pokes within Arvo are meticulously processed based on the vane specified within the path π οΈ.
- The path's prefix determines the relevant vane, such as %g for the app system %gall π.
- Each vane boasts a unique approach to handling pokes, tailored to its specific functionality π.
- Urbit stands as a groundbreaking solid-state interpreter, seamlessly merging an interpreter with an ACID database π.
- It introduces a clean-slate system software stack characterized by uniform persistence, source-independent packet networking, and high-level determinism π.
- Nock serves as the combinator interpreter and VM, while Hoon assumes the role of the typed functional language π.
- Arvo emerges as the event-driven kernel, proficiently managing events and dispatching actions π€.
- These integral components collectively form the bedrock of Urbit's extraordinary system architecture π°.
graph LR
subgraph Urbit
subgraph "Solid-State Interpreter"
A[Interpreter]
B[ACID Database]
end
subgraph "Operating Function (OF)"
C[Input Stream]
D[Initial Language]
E[Initial Kernel]
end
subgraph "Clean-Slate Stack"
F[VM]
G[Compiler]
H[OS]
I[Network]
J[Web Server]
K[Core Apps]
end
subgraph "Security & Productivity"
L[Security]
M[Productivity]
end
subgraph "Personal Server Revolution"
N[Self-Hosted Apps]
end
subgraph "Nock: Combinator Interpreter"
O[Combinator Functions]
P[Operators]
Q[Regular Form]
end
subgraph "Hoon: Typed Functional Language"
R[Self-Compilation]
S[Span System]
T[Type Inference]
end
subgraph "Arvo: Event-Driven Kernel"
U[Event Handling]
V[Kernel Interface]
W[Meal Decoding]
X[Poke Processing]
end
end
subgraph "Knowledge Graph"
subgraph "Key Concepts"
A --> C
D --> E
A --> B
L --> M
N --> M
O --> P
Q --> O
T --> S
R --> T
V --> W
X --> V
end
subgraph "Components"
A --> F
B --> A
C --> D
D --> E
F --> G
G --> H
H --> I
I --> J
J --> K
R --> O
O --> Q
U --> X
end
end