Hi! This is Curtis Yarvin, writer and director. I also played `~tasfyn-partyv`. I'm here with Galen Wolfe-Pauly - dramaturge, producer, editor, `~firput-miplex`. Hi, Galen!
#### GWP
Hi! We definitely didn't do this alone. Philip Monk (`~wictuc-folrex`), Anton Dyudin (`~sondel-forsut`) and Henry Ault all helped a lot. Not to mention everyone who has committed to the repo...
#### CY
This is the urbit demo known officially as ~2015.6.26. Or informally, as "Russian Nock."
In this commentary track, we'll step you through the film line by line and show you the awesome that is urbit. And of course we'll exchange snarky remarks about the shoot.
Galen, why "Russian Nock?"
#### GWP
(laughs). Well, nock is urbit's VM, of course. But it's from a movie, "Russian Ark," which was shot in one take.
#### CY
Nontrivial for a 13-minute demo of alpha software.
#### GWP
We actually gave up. We put in a screen clear.
#### CY
One. At the act break.
Also, truth in advertising! urbit is alpha and still pretty slow. A lot of the footage is sped up. But almost nothing is actually *faked*.
And we never used the reload button. Everything that looks reactive is.
#### GWP
It looks like the input lines are pasted in, but we actually typed them. Then I took the footage and
#### CY
And edited the keystrokes together. One cut per line. Yes, this workflow was my brilliant idea, thank you.
I'm in my urbit, `~tasfyn-partyv`. This is of course a VM running on my laptop.
I have an urbit ticket for another planet, `~firput-miplex`. I want to send it to my friend Aldo van Eyck.
#### GWP
Actually, he's a '50s Dutch architect from Team 10. Maybe we'll start getting email for him!
#### CY
From my `:dojo` agent, basically the urbit shell, I'm going to run the `|invite` command, which tells `~tasfyn-partyv` to email Aldo the secret he needs to create `~firput-miplex`.
Via an HTTP API to a mail delivery service, of course. But - the invite is actually the one fake thing in this video.
#### GWP
The Mailgun API connector wasn't quite together yet.
I use a shell terminal to create the markdown file, edit it in vim, save it, and -
#### GWP
And my browser immediately loads it as a web page.
#### CY
Your error page is long-polling my server, which tracks dependencies for every page, good or bad.
When I saved the markdown file, my urbit was watching the unix directory and committed my save as a change. That change event goes to the filesystem, `%clay`.
`%clay` applies it and sees that the build system, `%ford`, is watching this subtree. `%ford` gets the notification and reports a dependency change to the web server `%eyre`, which returns 200 on the long-poll.
Your browser then requests the new version of this url. `%eyre` forwards the request to `%ford`, which figures out that it can build an appropriate response by converting the markdown file to an HTML tree, then injecting the reload script, then printing the HTML.
#### GWP
This isn't even a dev tool. It works in production.
#### CY
Not that it scales! But it works fine behind an nginx cache.
#### GWP
If we edit this commentary transcript right now, it'll change on the reader's screen.
Here I go and edit the same file again, and we see your refresh script do its work. Ho hum, boring already.
#### GWP
Imagine living in a world where everyone assumed it should just work this way - why wouldn't the browser update? Why would you not track dependencies on the page build?
#### CY
Of course it's not just the page content we're tracking. If I changed the markdown parser, you'd reload again. It's everything local and time-versioned used in the build.
Here I send you the magic long-form url that lets you specify version numbers directly. So you can see the old version of the poem.
#### CY
There are two schools of web server url handling. There's the open-minded school that let you parse a path your own way, and the closed-minded school that hardcodes its own semantics into the url. urbit's -
#### GWP
urbit's is the closed-minded school.
#### CY
Exactly. Your url goes mostly undigested to the `%ford` build system. If these aren't the urls you want the user to see, wrap it in an nginx rewrite rule.
What's really going on here is that the whole subtree of urls under `/home/tree` is being rendered by one `tree.hoon` file, which defines a function that maps the url suffix to an HTML document.
This `tree` function is pretty simple - it just uses the url suffix, `/pub/verse/bunting`, as a path in the filesystem `%clay`.
Since there's no file on that arch, we just show the list of children. Just like Apache `public_html`.
Definitely don't throw away your Wordpress just yet.
#### CY
Galen wrote and designed this tree renderer. It's actually not bad for the amount of work he put in.
#### GWP
Well, me and Anton mostly. It's a good start.
#### CY
We should have demoed the navigation controls at the top, which let you move up or to the next sibling. There's no excuse for tree-structured content without uniform tree navigation affordances.
Note that you're now surfing `firput-miplex.urbit.org`. That's your own urbit, of course.
You're using an application, not just a functional renderer. So you need to log in with an identity. The default is you. And your password is that secret you got in the email - your ticket.
#### GWP
We're not demoing single sign-on here, but we do it.
#### CY
If I logged into `~firput-miplex` as `~tasfyn-partyv`, it would redirect me to `tasfyn-partyv.urbit.org` with a challenge. If I was already logged into my own urbit, logging in to yours would be automatic.
We set a cleartext `*.urbit.org` cookie with your urbit base, so within `urbit.org` login is generally automatic.
#### GWP
Obviously this login system is application-independent. It's a part of urbit, not a part of `:talk.`
Nice little recovery there. Of course, in "Russian Ark"
#### CY
They'd have reshot the whole movie. They had standards.
Anyway, `:talk` is really our flagship app. It weighs in at almost 2000 lines of code counting the protocols. It's a genuine distributed system and it's being used right now.
To make a long story short, `:talk` is basically Usenet slumming as a chat server. Well, it could use a few more bells and whistles. But the bones of NNTP are there. A chat line is just one type of message...
Here I start lecturing you a bunch. Anyway, this argument is a little cryptic. Of course an evil or compromised host can look at any of your data on the service, barring some kind of breakthrough in efficient homomorphic encryption. And this is true whether you're a VM or a database row. The Linode hack, for instance, was an attack on cloud VMs.
But it still makes a lot more sense to keep valuable secrets in a cloud-hosted VM than a cloud-hosted application database - because there are all sorts of ways that database can be queried. Nobody queries a VM.
When the line between hosting provider and hosted computer is drawn at the edge of the VM, it's a very precise line. It would be outrageous if amazon was peeking into AWS VMs, stealing their data and using it to sell more ads. So logically you're not safer, but in practice you are.
Too many printfs! But you see that there's only one level of storage in urbit. At least logically, all data persists.
#### GWP
My iPhone pretends to work this way. But I'm not sure it does.
#### CY
Practically, the way we create this abstraction is the way all databases work: a checkpoint and a log. Logging is easy - there are all kinds of great cloud tools for it.
If you look at the printfs, you have a checkpoint at event 9616. but the log goes up to 9624. You load this checkpoint, then rerun the last 8 events.
The only rule is that you can't execute the actions caused by an event until you've logged the event. For example, if an incoming packet causes an outgoing packet, you can't send the outgoing packet until you've logged the incoming.
#### GWP
So every event is a transaction. Watch out, Oracle!
Oh, hardly. First, the nock spec was somehow not in `%clay`. So we had to add it back in from another window. Second, you said `+cat` in `:talk`, so you `:talk`ed the cat command rather than `:dojo`ing it.
And third, your browser hung up and reconnected. Just typical printf noise from alpha code.