Skip to content
This repository has been archived by the owner on Aug 24, 2021. It is now read-only.

Arvo retrofit #212

Merged
merged 16 commits into from
Dec 7, 2017
Merged

Arvo retrofit #212

merged 16 commits into from
Dec 7, 2017

Conversation

mattlevan
Copy link
Contributor

@mattlevan mattlevan commented Oct 26, 2017

Updated code blocks and explanations to comply with Hoon %143 using urbit/examples:retrofit branch. Progress up through security-driver.md. I think app/gh.hoon needs to be fixed before I can continue work on the api.md doc as the GitHub issues exploration doesn't work correctly for me. I'll be looking into that further soon...


```
:- %say
|= [^ {to=@p message=?($~ [text=@t $~])} $~}
Copy link

@xykj61 xykj61 Nov 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattlevan Want to fix these curly braces here?

lists in tail position (which are particularly annoying without generators).
`?(a b)` is the irregular form of `$?(a b)`, which is a union type. Thus,
`?(a b)` means the type of anything that's in either `a` or `b`. Thus, in our
case, `?($~ {text/@t $~})` is either null or a pair of text and null.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also here.

Additionally, all symbols like $foo and $~ can be switched to %foo and just ~. If you need to manually switch from "value/noun mode" to "pattern/mold mode", you can use ,, like ,%foo and ,~.

Apps](/developer/docs/arvo/web-apps) so that you can run
`:examples-click|poke` to poke it.
- Create a generator for `:click` from [Web
Apps](/docs/arvo/web-apps) so that you can run
Copy link

@xykj61 xykj61 Nov 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These can stay /developer/docs/... for now. Galen and I might change this back, but let's keep things consistent for now.

|% :: 7
+= move [bone card] :: 8
+= card :: 9
$% [$hiss wire $~ $httr [$purl p=purl:eyre]] :: 10
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot to go in and change all these symbols as per the above comment (i.e. $purl to %purl), so I'll do that soon and then you can just re-copy-paste in the updated examples.

code quoted above includes a bunch of otherwise unnecessary faces for
the purpose of illustration. Compare: `{$hiss p/(unit iden) q/mark
r/cage}` from `zuse`.
There's two kinds of cards we're sending to arvo. A `%hiss` move tells `%eyre`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a PSA, I'm going to try and normalize everywhere stopping the usage of %vane instead of Vane. It gets annoying when comparing to other symbol values in the same context, like right here.

I kind of want to do the same for :app instead of App (I've been doing that mostly everywhere with Talk and Dojo, because why not, and we'll have new Talk soon that allows capital letters), but that might be a slippery slope since we also have +generators, /+libraries and /-surfaces.

For `%wait`, you just pass a [`@da`]() (absolute date), and arvo will
produce a `%wake` when the time comes.
For `%wait`, you just pass a [`@da`](/../../hoon/library/3c/) (absolute date),
and arvo will produce a `%wake` when the time comes.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also capitalize Nock, Hoon and Arvo everywhere we see it. Not hugely important, but we should be consistent.

> shortcut for creating a list of a single element. It's part of a small
> family of creating a list of a single element. It's part of a small family
> of such shortcuts. `~[a b c]` is `[a b c ~]`, `[a b c]~` is `[[a b c] ~]`
> and `\`[a bc]` is `[~ a b c]`. These may be mixed and matched to create
Copy link

@xykj61 xykj61 Nov 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like `[a bc] is a small typo.

>=
~fintud-macrep:dojo> :examples-up &atom 'http://www.google.com'
~fintud-macrep:dojo/examples> :up &atom 'on'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's probably better style to pass in %on instead of 'on', though technically it doesn't matter.


Let's make a small "examples-cord" mark. "Cord" is a name we use for `@t`
Let's make a small "cord" mark. "Cord" is a name we use for `@t`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe link to ++cord in hoon.hoon, or point to the library section on strings.

`/? 314` is the required
version number, just like in apps. After that everything's in a
`|_`, which is a `|%` core, but with input arguments. In our
`/? 314` is the required version number, just like in apps. After that
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm actually not sure what the new Hoon+Zuse version number is, but we should check and change this as it's now something below 314.

:: :: 4
!: :: 5
|% :: 6
+= move {bone card} :: 7
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'll make the examples styling more consistent since now I think I actually know all the things to check/change. Then we can make all this code consistent with that.

xykj61
xykj61 previously requested changes Nov 8, 2017
Copy link

@xykj61 xykj61 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, added some comments. I think after some small changes this will be fine to merge. @galenwp and I are still trying to figure out some of this design stuff, but for now @mattlevan, let's just keep working off of this branch with current directory/design structure as planned.

!: :: 5
|% :: 6
+= move {bone card} :: 7
+= card $% $~ :: 8
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ same comment applies to symbols.


A few things have changed. Firstly, we no longer accept arbitrary nouns because
we can only square atoms (integers, in this case an unsigned one). Thus, our
argument is now `tom/@`. Secondly, it's `++poke-atom` rather than `++poke-noun`.
argument is now `tom=@`. Secondly, it's `++poke-atom` rather than `++poke-noun`.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should probably change these stupid names.


Replace `~sampel-sipnym` with another urbit. The easiest thing to do is to start
a comet, a free and disposable Urbit identity. If you don't know how to start a
comet, see [the user setup section](/developer/using/setup/). Don't forget to start
comet, see [the user setup section](/developer/docs/using/setup/). Don't forget to start
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, the above path is current, but Galen and I don't like that this breaks things, so we'll probably change all of these links back in a different commit.


Cheat sheet:

- `&` (pam) can either be the boolean true (as can `%.y`, `0`), or
the irregular wide form of the `?&`
([wutpam](../../hoon/twig/wut/pam)) rune, which computes
([wutpam](../../hoon/twig/wut-test/pam-and)) rune, which computes
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should go back to /foo/bar from /foo-word/bar-word.

~[[ost.bow %pull /subscribe [our.bow %source] ~]]
```
:_ +>.$(val &) :: 28
~[[ost.bow %pull /subscribe [our.bow %source] ~]] :: 29
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should change this to [foo bar baz]~ like the other apps for consistency.

@@ -147,8 +193,8 @@ Please pardon the awkwardness of the name 'examples-click-click', but we used it

# Frontend

That's all that's needed for the back end. The front end is just
some "sail" html (Hoon markup for XML) and javascript. Here's `/web/pages/examples/click.hoon`:
That's all that's needed for the backend. The frontend is just some "sail" html
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's capitalize and italicize Sail here.

@xykj61
Copy link

xykj61 commented Dec 7, 2017

Alright, finally merging this. Thanks @mattlevan!

@xykj61
Copy link

xykj61 commented Dec 7, 2017

Actually, going to make a few of those commented changes, then merge it.

@xykj61 xykj61 dismissed their stale review December 7, 2017 21:20

Dismissed

@xykj61 xykj61 merged commit 38f2a44 into urbit:developer Dec 7, 2017
@mattlevan
Copy link
Contributor Author

Cool! Thanks for fixing those last few things I never got around to, @keatondunsford!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants