-
Notifications
You must be signed in to change notification settings - Fork 116
Conversation
|
||
``` | ||
:- %say | ||
|= [^ {to=@p message=?($~ [text=@t $~])} $~} |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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` |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
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` |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this 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 |
There was a problem hiding this comment.
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`. |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
Alright, finally merging this. Thanks @mattlevan! |
Actually, going to make a few of those commented changes, then merge it. |
Cool! Thanks for fixing those last few things I never got around to, @keatondunsford! |
Updated code blocks and explanations to comply with Hoon %143 using urbit/examples:retrofit branch. Progress up through
security-driver.md
. I thinkapp/gh.hoon
needs to be fixed before I can continue work on theapi.md
doc as the GitHub issues exploration doesn't work correctly for me. I'll be looking into that further soon...