mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-04 02:49:42 +03:00
Merge branch 'master' of https://github.com/urbit/urbit
This commit is contained in:
commit
a6397f1e8e
@ -1,4 +1,4 @@
|
||||
!: :: %eyre, http servant
|
||||
:: :: %eyre, http servant
|
||||
!? 164
|
||||
::::
|
||||
|= pit=vase
|
||||
@ -327,6 +327,7 @@
|
||||
?: =(~ mog) luv
|
||||
?+ -.luv luv
|
||||
%mid
|
||||
?. =(/text/html p.luv) luv
|
||||
=+ str=(trip q.q.luv)
|
||||
=+ scr=|-(^-(tape ?~(mog "</body>" (xmlt & i.mog $(mog t.mog)))))
|
||||
=+ rep=(need (repg "</body>" str scr))
|
||||
|
@ -115,6 +115,7 @@
|
||||
++ calx :: concrete cache line
|
||||
$% [%hood p=calm q=(pair beam cage) r=hood] :: compile
|
||||
[%slap p=calm q=[p=vase q=twig] r=vase] :: compute
|
||||
[%slam p=calm q=[p=vase q=vase] r=vase] :: compute
|
||||
== ::
|
||||
++ task :: problem in progress
|
||||
$: nah=duct :: cause
|
||||
@ -129,6 +130,7 @@
|
||||
?+ sem !!
|
||||
%hood ?>(?=(%hood -.cax) r.cax)
|
||||
%slap ?>(?=(%slap -.cax) r.cax)
|
||||
%slam ?>(?=(%slam -.cax) r.cax)
|
||||
==
|
||||
::
|
||||
++ calk :: cache lookup
|
||||
@ -678,7 +680,9 @@
|
||||
++ lily :: translation targets
|
||||
|= [cof=cafe for=mark bek=beak]
|
||||
^- (bolt (list ,@tas))
|
||||
%+ cope (fang cof for bek)
|
||||
=+ raf=(fang cof for bek)
|
||||
?: =(%2 -.q.raf) (fine p.raf ~)
|
||||
%+ cope raf
|
||||
|= [cof=cafe vax=vase]
|
||||
%+ fine cof
|
||||
%+ weld
|
||||
@ -884,6 +888,8 @@
|
||||
++ maul :: slam
|
||||
|= [cof=cafe gat=vase sam=vase]
|
||||
^- (bolt vase)
|
||||
%+ (clef %slam) (fine cof gat sam)
|
||||
|= [cof=cafe gat=vase sam=vase]
|
||||
=+ top=(mule |.((slit p.gat p.sam)))
|
||||
?- -.top
|
||||
| (flaw cof p.top)
|
||||
|
@ -350,7 +350,7 @@
|
||||
::
|
||||
++ hmac :: HMAC-SHA1
|
||||
|= [key=@ mes=@]
|
||||
=+ ip=(fil 2 64 0x36)
|
||||
=+ ip=(fil 3 64 0x36)
|
||||
=+ op=(fil 3 64 0x5c)
|
||||
=+ ^= kex
|
||||
?: (gth (met 3 key) 64)
|
||||
|
@ -35,37 +35,37 @@
|
||||
;p:(h2:"Tutorial")
|
||||
;strong: Nock
|
||||
;ol
|
||||
;li:(p:(a/"/gen/main/pub/src/site/tut/nock1":"Intro to Nock"))
|
||||
;li:(p:(a/"/gen/main/pub/src/site/tut/nock2":"Nock is Easy"))
|
||||
;li:(p:(a/"/gen/main/pub/src/site/tut/nock3":"Using Nock"))
|
||||
;li:(p:(a/"/gen/main/pub/fab/site/tut/nock1":"Intro to Nock"))
|
||||
;li:(p:(a/"/gen/main/pub/fab/site/tut/nock2":"Nock is Easy"))
|
||||
;li:(p:(a/"/gen/main/pub/fab/site/tut/nock3":"Using Nock"))
|
||||
==
|
||||
;strong: Hoon
|
||||
;ol
|
||||
;li:(p:(a/"/gen/main/pub/src/site/tut/hoon1":"Intro to Hoon"))
|
||||
;li:(p:(a/"/gen/main/pub/src/site/tut/hoon2":"Types"))
|
||||
;li:(p:(a/"/gen/main/pub/src/site/tut/hoon3":"Hoon Computes"))
|
||||
;li:(p:(a/"/gen/main/pub/src/site/tut/hoon4":"Gates"))
|
||||
;li:(p:(a/"/gen/main/pub/src/site/tut/hoon5":"Tiles"))
|
||||
;li:(p:(a/"/gen/main/pub/src/site/tut/hoon6":"Type Inference"))
|
||||
;li:(p:(a/"/gen/main/pub/src/site/tut/hoon7":"Odds, Ends, Quirks"))
|
||||
;li:(p:(a/"/gen/main/pub/fab/site/tut/hoon1":"Intro to Hoon"))
|
||||
;li:(p:(a/"/gen/main/pub/fab/site/tut/hoon2":"Types"))
|
||||
;li:(p:(a/"/gen/main/pub/fab/site/tut/hoon3":"Hoon Computes"))
|
||||
;li:(p:(a/"/gen/main/pub/fab/site/tut/hoon4":"Gates"))
|
||||
;li:(p:(a/"/gen/main/pub/fab/site/tut/hoon5":"Tiles"))
|
||||
;li:(p:(a/"/gen/main/pub/fab/site/tut/hoon6":"Type Inference"))
|
||||
;li:(p:(a/"/gen/main/pub/fab/site/tut/hoon7":"Odds, Ends, Quirks"))
|
||||
==
|
||||
;strong: Arvo
|
||||
;ol
|
||||
;li:(p:(a/"/gen/main/pub/src/site/tut/arvo1":"Basic Arvo"))
|
||||
;li:(p:(a/"/gen/main/pub/src/site/tut/arvo2":"More Basic Arvo"))
|
||||
;li:(p:(a/"/gen/main/pub/fab/site/tut/arvo1":"Basic Arvo"))
|
||||
;li:(p:(a/"/gen/main/pub/fab/site/tut/arvo2":"More Basic Arvo"))
|
||||
==
|
||||
==
|
||||
;li
|
||||
;p:(h2:"Reference")
|
||||
;ul
|
||||
;li:(p:(a/"/gen/main/pub/src/site/ref/foreword":";{strong "Foreword"}: Nock"))
|
||||
;li:(p:(a/"/gen/main/pub/src/site/ref/preface":";{strong "Preface"}: Hoon Abstract"))
|
||||
;li:(p:(a/"/gen/main/pub/src/site/ref/vol0":";{strong "Volume 0"}: Version Stub"))
|
||||
;li:(p:(a/"/gen/main/pub/src/site/ref/vol1":";{strong "Volume 1"}: Hoon Structures"))
|
||||
;li:(p:(a/"/gen/main/pub/src/site/ref/vol2":";{strong "Volume 2"}: Hoon Compiler"))
|
||||
;li:(p:(a/"/gen/main/pub/src/site/ref/vol3":";{strong "Volume 3"}: Arvo Core"))
|
||||
;li:(p:(a/"/gen/main/pub/src/site/ref/vol4":";{strong "Volume 4"}: Arvo Vanes"))
|
||||
;li:(p:(a/"/gen/main/pub/src/site/ref/postface":";{strong "Postface"}"))
|
||||
;li:(p:(a/"/gen/main/pub/fab/site/ref/foreword":";{strong "Foreword"}: Nock"))
|
||||
;li:(p:(a/"/gen/main/pub/fab/site/ref/preface":";{strong "Preface"}: Hoon Abstract"))
|
||||
;li:(p:(a/"/gen/main/pub/fab/site/ref/vol0":";{strong "Volume 0"}: Version Stub"))
|
||||
;li:(p:(a/"/gen/main/pub/fab/site/ref/vol1":";{strong "Volume 1"}: Hoon Structures"))
|
||||
;li:(p:(a/"/gen/main/pub/fab/site/ref/vol2":";{strong "Volume 2"}: Hoon Compiler"))
|
||||
;li:(p:(a/"/gen/main/pub/fab/site/ref/vol3":";{strong "Volume 3"}: Arvo Core"))
|
||||
;li:(p:(a/"/gen/main/pub/fab/site/ref/vol4":";{strong "Volume 4"}: Arvo Vanes"))
|
||||
;li:(p:(a/"/gen/main/pub/fab/site/ref/postface":";{strong "Postface"}"))
|
||||
==
|
||||
==
|
||||
==
|
@ -1,6 +1,6 @@
|
||||
:: Top level of the Urbit documentation.
|
||||
::
|
||||
::
|
||||
::::
|
||||
:::: /hook/site/src/pub
|
||||
::
|
||||
/= bod /^ manx /: /===/pub/src/doc/intro /psal/
|
||||
/= sid /^ manx /: /===/pub/src/site/res/sidebar /hymn/
|
||||
@ -11,7 +11,7 @@
|
||||
::
|
||||
;html
|
||||
;head
|
||||
;title: Urbit: Personal Cloud Computing
|
||||
;title: Urbit
|
||||
;style:"{(trip sty)}"
|
||||
==
|
||||
;body
|
@ -1,6 +1,6 @@
|
||||
#What is Urbit?
|
||||
|
||||
We got tired of system software from the 1970s. So we wrote our own on top. From scratch.
|
||||
We got tired of system software from the 1970s. So we wrote our own. From scratch.
|
||||
|
||||
##Nock, a minimal virtual machine
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -33,8 +33,277 @@ the "real" data we know is stored; the rest is "just bookkeeping".
|
||||
|
||||
###`++room`, filesystem per domestic ship
|
||||
|
||||
```
|
||||
++ room :: fs per ship
|
||||
$: hun=duct :: terminal duct
|
||||
hez=(unit duct) :: sync duch
|
||||
dos=(map desk dojo) :: native desk
|
||||
== ::
|
||||
```
|
||||
|
||||
This is the representation of the filesystem of a ship on our pier.
|
||||
|
||||
`hun` is the duct that we use to send messages to dill to display notifications
|
||||
of filesystem changes. Only `%note` gifts should be produced along this duct.
|
||||
This is set by the `%init` kiss.
|
||||
|
||||
`hez`, if present, is the duct we use to send sync messages to unix so that
|
||||
they end up in the pier unix directory. Only `%ergo` gifts should be producd
|
||||
along this duct. This is set by `%into` and `%invo` gifts.
|
||||
|
||||
`dos` is a well-known operating system released in 1981. It is also the set of
|
||||
desks on this ship, mapped to their data.
|
||||
|
||||
###`++desk`, filesystem branch
|
||||
|
||||
```
|
||||
++ desk ,@tas :: ship desk case spur
|
||||
```
|
||||
|
||||
This is the name of a branch of the filesystem. The default desks are "arvo",
|
||||
"main", and "try". More may be created by simply referencing them. Desks have
|
||||
independent histories and states, and they may be merged into each other.
|
||||
|
||||
###`++dojo`, domestic desk state
|
||||
|
||||
```
|
||||
++ dojo ,[p=cult q=dome] :: domestic desk state
|
||||
```
|
||||
|
||||
This is the all the data that is specific to a particular desk on a domestic
|
||||
ship. `p` is the set of subscribers to this desk and `q` is the data in the
|
||||
desk.
|
||||
|
||||
###`++cult`, subscriptions
|
||||
|
||||
```
|
||||
++ cult (map duct rave) :: subscriptions
|
||||
```
|
||||
|
||||
This is the set of subscriptions to a particular desk. The keys are the ducts
|
||||
from where the subscriptions requests came. The results will be produced along
|
||||
these ducts. The values are a description of the requested information.
|
||||
|
||||
###`++rave`, general subscription request
|
||||
|
||||
```
|
||||
++ rave :: general request
|
||||
$% [& p=mood] :: single request
|
||||
[| p=moat] :: change range
|
||||
== ::
|
||||
```
|
||||
|
||||
This represents a subscription request for a desk. The request can be for
|
||||
either a single item in the desk or else for a range of changes on the desk.
|
||||
|
||||
###`++mood`, single subscription request
|
||||
|
||||
```
|
||||
++ mood ,[p=care q=case r=path] :: request in desk
|
||||
```
|
||||
|
||||
This represents a request for the state of the desk at a particular commit,
|
||||
specfied by `q`. `p` specifies what kind of information is desired, and `r`
|
||||
specifies the path we are requesting.
|
||||
|
||||
###`++moat`, range subscription request
|
||||
|
||||
```
|
||||
++ moat ,[p=case q=case] :: change range
|
||||
```
|
||||
|
||||
This represents a request for all changes between `p` and `q`. Note that there
|
||||
is currently no way to request to be notified only on changes to particular
|
||||
paths in the filesystem. You must subscribe to the entire desk.
|
||||
|
||||
###`++care`, clay submode
|
||||
|
||||
```
|
||||
++ care ?(%u %v %w %x %y %z) :: clay submode
|
||||
```
|
||||
|
||||
This specifies what type of information is requested in a subscription or a
|
||||
scry.
|
||||
|
||||
`%u` requests the `++rang` at the current moment. Because this information is
|
||||
not stored for any moment other than the present, we crash if the `++case` is
|
||||
not a `%da` for now.
|
||||
|
||||
`%v` requests the `++dome` at the specified commit.
|
||||
|
||||
`%w` requests the current revsion number of the desk.
|
||||
|
||||
`%x` requests the file at a specified path at the specified commit. If there
|
||||
is no node at that path or if the node has no contents (that is, if `q:ankh` is
|
||||
null), then this produces null.
|
||||
|
||||
`%y` requests a `++arch` of the specfied commit at the specified path.
|
||||
|
||||
`%z` requests the `++ankh` of the specified commit at the specfied path.
|
||||
|
||||
###`++arch`, shallow filesystem node
|
||||
|
||||
```
|
||||
++ arch ,[p=@uvI q=(unit ,@uvI) r=(map ,@ta ,~)] :: fundamental node
|
||||
```
|
||||
|
||||
This is analogous to `++ankh` except that the we have neither our contents nor
|
||||
the ankhs of our children. The other fields are exactly the same, so `p` is a
|
||||
hash of the associated ankh, `u.q`, if it exists, is a hash of the contents of
|
||||
this node, and the keys of `r` are the names of our children. `r` is a map to
|
||||
null rather than a set so that the ordering of the map will be equivalent to
|
||||
that of `r:ankh`, allowing efficient conversion.
|
||||
|
||||
###`++case`, specifying a commit
|
||||
|
||||
```
|
||||
++ case :: ship desk case spur
|
||||
$% [%da p=@da] :: date
|
||||
[%tas p=@tas] :: label
|
||||
[%ud p=@ud] :: number
|
||||
== ::
|
||||
```
|
||||
|
||||
A commit can be referred to in three ways: `%da` refers to the commit that was
|
||||
at the head on date `p`, `%tas` refers to the commit labeled `p`, and `%ud`
|
||||
refers to the commit numbered `p`. Note that since these all can be reduced
|
||||
down to a `%ud`, only numbered commits may be referenced with a `++case`.
|
||||
|
||||
###`++dome`, desk data
|
||||
|
||||
```
|
||||
++ dome :: project state
|
||||
$: ang=agon :: pedigree
|
||||
ank=ankh :: state
|
||||
let=@ud :: top id
|
||||
hit=(map ,@ud tako) :: changes by id
|
||||
lab=(map ,@tas ,@ud) :: labels
|
||||
== ::
|
||||
```
|
||||
|
||||
This is the data that is actually stored in a desk.
|
||||
|
||||
`ang` is unused and should be removed.
|
||||
|
||||
`ank` is the current state of the desk. Thus, it is the state of the
|
||||
filesystem at revison `let`. The head of a desk is always a numbered commit.
|
||||
|
||||
`let` is the number of the most recently numbered commit. This is also the
|
||||
total number of numbered commits.
|
||||
|
||||
`hit` is a map of numerical ids to hashes of commits. These hashes are mapped
|
||||
into their associated commits in `hut:rang`. In general, the keys of this map
|
||||
are exactly the numbers from 1 to `let`, with no gaps. Of course, when there
|
||||
are no numbered commits, `let` is 0, so `hit` is null. Additionally, each of
|
||||
the commits is an ancestor of every commit numbered greater than this one.
|
||||
Thus, each is a descendant of every commit numbered less than this one. Since
|
||||
it is true that the date in each commit (`t:yaki`) is no earlier than that of
|
||||
each of its parents, the numbered commits are totally ordered in the same way
|
||||
by both pedigree and date. Of course, not every commit is numbered. If that
|
||||
sounds too complicated to you, don't worry about it. It basically behaves
|
||||
exactly as you would expect.
|
||||
|
||||
`lab` is a map of textual labels to numbered commits. Note that labels can
|
||||
only be applied to numbered commits. Labels must be unique across a desk.
|
||||
|
||||
###`++ankh`, filesystem node
|
||||
|
||||
```
|
||||
++ ankh :: fs node (new)
|
||||
$: p=cash :: recursive hash
|
||||
q=(unit ,[p=cash q=*]) :: file
|
||||
r=(map ,@ta ankh) :: folders
|
||||
== ::
|
||||
```
|
||||
|
||||
This is a single node in the filesystem. This may be file or a directory or
|
||||
both. In earth filesystems, a node is a file xor a directory. On mars, we're
|
||||
inclusive, so a node is a file ior a directory.
|
||||
|
||||
`p` is a recursive hash that depends on the contents of the this file or
|
||||
directory and on any children.
|
||||
|
||||
`q` is the contents of this file, if any. `p.q` is a hash of the contents
|
||||
while `q.q` is the data itself.
|
||||
|
||||
`r` is the set of children of this node. In the case of a pure file, this is
|
||||
empty. The keys are the names of the children and the values are, recursively,
|
||||
the nodes themselves.
|
||||
|
||||
###`++cash`, ankh hash
|
||||
|
||||
```
|
||||
++ cash ,@uvH :: ankh hash
|
||||
```
|
||||
|
||||
This is a 128-bit hash of an ankh. These are mostly stored within ankhs
|
||||
themselves, and they are used to check for changes in possibly-deep
|
||||
hierarchies.
|
||||
|
||||
###`++rung`, filesystem per neighbor ship
|
||||
|
||||
```
|
||||
++ rung $: rus=(map desk rede) :: neighbor desks
|
||||
== ::
|
||||
```
|
||||
|
||||
This is the filesystem of a neighbor ship. The keys to this map are all the
|
||||
desks we know about on their ship.
|
||||
|
||||
###`++rede`, desk state
|
||||
|
||||
```
|
||||
++ rede :: universal project
|
||||
$: lim=@da :: complete to
|
||||
qyx=cult :: subscribers
|
||||
ref=(unit rind) :: outgoing requests
|
||||
dom=dome :: revision state
|
||||
== ::
|
||||
```
|
||||
|
||||
This is our knowledge of the state of a desk, either foreign or domestic.
|
||||
|
||||
`lim` is the date of the last full update. We only respond to requests for
|
||||
stuff before this time.
|
||||
|
||||
`qyx` is the list of subscribers to this desk. For domestic desks, this is
|
||||
simply `p:dojo`, all subscribers to the desk, while in foreign desks this is
|
||||
all the subscribers from our ship to the foreign desk.
|
||||
|
||||
`ref` is the request manager for the desk.
|
||||
|
||||
`dom` is the actual data in the desk.
|
||||
|
||||
###`++rind`, request manager
|
||||
|
||||
```
|
||||
++ rind :: request manager
|
||||
$: nix=@ud :: request index
|
||||
bom=(map ,@ud ,[p=duct q=rave]) :: outstanding
|
||||
fod=(map duct ,@ud) :: current requests
|
||||
haw=(map mood (unit)) :: simple cache
|
||||
== ::
|
||||
```
|
||||
|
||||
This is the request manager for a desk.
|
||||
|
||||
`nix` is one more than the index of the most recent request. Thus, it is the
|
||||
next available request number.
|
||||
|
||||
`bom` is the set of outstanding requests. The keys of this map are some subset
|
||||
of the numbers between 0 and one less than `nix`. The members of the map are
|
||||
exactly those requests that have not yet been fully satisfied.
|
||||
|
||||
`fod` is the same set as `bom`, but from a different perspective. In
|
||||
particular, the values of `fod` are the same as the values of `bom`, and the
|
||||
`p` out of the values of `bom` are the same as the keys of `fod`. Thus, we can
|
||||
map ducts to their associated request number and `++rave`, and we can map
|
||||
numbers to their associated duct and `++rave`.
|
||||
|
||||
`haw` is a map from simple requests to their values. This acts as a cache for
|
||||
requests that have already been made. Thus, the second request for a
|
||||
particular `++mood` is nearly instantaneous.
|
||||
|
||||
###`++rang`, data store
|
||||
|
||||
```
|
||||
|
@ -8,7 +8,7 @@
|
||||
</div>
|
||||
<ul class="sidebar-nav">
|
||||
<li class="sidebar-nav-item">
|
||||
<a href="/gen/main/pub/src/site/documentation/" class="">Documentation</a>
|
||||
<a href="/gen/main/pub/fab/site/documentation/" class="">Documentation</a>
|
||||
</li>
|
||||
<li class="sidebar-nav-item">
|
||||
<a href="/community/" class="">Community</a>
|
||||
|
Loading…
Reference in New Issue
Block a user