From 722b6c556bbf6ce6543358d774ea224b8179a71d Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Mon, 4 Aug 2014 20:23:29 -0700 Subject: [PATCH 1/3] Some renamings. --- arvo/ford.hoon | 12 ++++++------ main/{mac => mar}/down/door.hook | 0 main/{mac => mar}/html/door.hook | 0 main/{mac => mar}/hymn/door.hook | 0 main/{mac => mar}/json/door.hook | 0 main/{mac => mar}/md/door.hook | 0 main/{mac => mar}/mime/door.hook | 0 main/{mac => mar}/user/door.hook | 0 main/{mac => mar}/users/door.hook | 0 main/{mac => mar}/zing/door.hook | 0 main/{mac => mar}/zong/door.hook | 0 main/{mac => mar}/zongs/door.hook | 0 main/{mac => mar}/zung/door.hook | 0 13 files changed, 6 insertions(+), 6 deletions(-) rename main/{mac => mar}/down/door.hook (100%) rename main/{mac => mar}/html/door.hook (100%) rename main/{mac => mar}/hymn/door.hook (100%) rename main/{mac => mar}/json/door.hook (100%) rename main/{mac => mar}/md/door.hook (100%) rename main/{mac => mar}/mime/door.hook (100%) rename main/{mac => mar}/user/door.hook (100%) rename main/{mac => mar}/users/door.hook (100%) rename main/{mac => mar}/zing/door.hook (100%) rename main/{mac => mar}/zong/door.hook (100%) rename main/{mac => mar}/zongs/door.hook (100%) rename main/{mac => mar}/zung/door.hook (100%) diff --git a/arvo/ford.hoon b/arvo/ford.hoon index aaa403d12..2db05e1cb 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -19,13 +19,13 @@ == :: ++ hood :: assembly plan $: zus=@ud :: zuse kelvin - sur=(list hook) :: structures + sur=(list hoot) :: structures lib=(list hoof) :: libraries fan=(list horn) :: resources src=(list hoop) :: program == :: ++ hoof (pair term (unit (pair case ship))) :: resource reference -++ hook (pair bean hoof) :: structure gate/core +++ hoot (pair bean hoof) :: structure gate/core ++ hoop :: source in hood $% [%& p=twig] :: direct twig [%| p=beam] :: resource location @@ -409,7 +409,7 @@ ++ fang :: protocol door |= [cof=cafe for=mark bek=beak] ^- (bolt vase) - =+ pax=/door/[for]/mac + =+ pax=/door/[for]/mar =+ ^= bem ^- beam :_ pax ?: =(p.bek our) bek @@ -443,7 +443,7 @@ == :: ;~ pose - (ifix [;~(plug fas hep gap) gap] (most ;~(plug com gaw) hook)) + (ifix [;~(plug fas hep gap) gap] (most ;~(plug com gaw) hoot)) (easy ~) == :: @@ -467,7 +467,7 @@ == == :: - ++ hook + ++ hoot ;~ pose (stag %| ;~(pfix tar hoof)) (stag %& hoof) @@ -1057,7 +1057,7 @@ == :: ++ head :: consume structures - |= [cof=cafe bir=(list hook)] + |= [cof=cafe bir=(list hoot)] |- ^- (bolt ,_..head) ?~ bir (fine cof ..head) diff --git a/main/mac/down/door.hook b/main/mar/down/door.hook similarity index 100% rename from main/mac/down/door.hook rename to main/mar/down/door.hook diff --git a/main/mac/html/door.hook b/main/mar/html/door.hook similarity index 100% rename from main/mac/html/door.hook rename to main/mar/html/door.hook diff --git a/main/mac/hymn/door.hook b/main/mar/hymn/door.hook similarity index 100% rename from main/mac/hymn/door.hook rename to main/mar/hymn/door.hook diff --git a/main/mac/json/door.hook b/main/mar/json/door.hook similarity index 100% rename from main/mac/json/door.hook rename to main/mar/json/door.hook diff --git a/main/mac/md/door.hook b/main/mar/md/door.hook similarity index 100% rename from main/mac/md/door.hook rename to main/mar/md/door.hook diff --git a/main/mac/mime/door.hook b/main/mar/mime/door.hook similarity index 100% rename from main/mac/mime/door.hook rename to main/mar/mime/door.hook diff --git a/main/mac/user/door.hook b/main/mar/user/door.hook similarity index 100% rename from main/mac/user/door.hook rename to main/mar/user/door.hook diff --git a/main/mac/users/door.hook b/main/mar/users/door.hook similarity index 100% rename from main/mac/users/door.hook rename to main/mar/users/door.hook diff --git a/main/mac/zing/door.hook b/main/mar/zing/door.hook similarity index 100% rename from main/mac/zing/door.hook rename to main/mar/zing/door.hook diff --git a/main/mac/zong/door.hook b/main/mar/zong/door.hook similarity index 100% rename from main/mac/zong/door.hook rename to main/mar/zong/door.hook diff --git a/main/mac/zongs/door.hook b/main/mar/zongs/door.hook similarity index 100% rename from main/mac/zongs/door.hook rename to main/mar/zongs/door.hook diff --git a/main/mac/zung/door.hook b/main/mar/zung/door.hook similarity index 100% rename from main/mac/zung/door.hook rename to main/mar/zung/door.hook From 93ee3f741dbdb96bc71db45de9f30c89207fd868 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Tue, 5 Aug 2014 13:24:26 -0700 Subject: [PATCH 2/3] Various fixes and improvements. --- arvo/ford.hoon | 4 ++-- main/sur/down/gate.hook | 1 + main/sur/markdown/core.hook | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arvo/ford.hoon b/arvo/ford.hoon index 31d74ed47..8b6836efd 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -489,7 +489,7 @@ ;~ pose (stag %toy ;~(sfix sym fas)) (stag %ape ;~(pfix ape:sign ape:read)) - (stag %arg ;~(pfix arg:sign and:read)) + (stag %arg ;~(pfix arg:sign ape:read)) (stag %day ;~(pfix day:sign day:read)) (stag %dub ;~(pfix dub:sign dub:read)) (stag %fan ;~(pfix fan:sign fan:read)) @@ -1018,7 +1018,7 @@ |= [cof=cafe bax=vase hon=horn] ^- (bolt vase) ?- -.hon - %and (maim cof bax p.hon) + %ape (maim cof bax p.hon) %arg %+ cope (maim cof bax p.hon) |= [cof=cafe gat=vase] diff --git a/main/sur/down/gate.hook b/main/sur/down/gate.hook index 5581fa713..f807577fd 100644 --- a/main/sur/down/gate.hook +++ b/main/sur/down/gate.hook @@ -4,3 +4,4 @@ /? 314 /- *markdown down + diff --git a/main/sur/markdown/core.hook b/main/sur/markdown/core.hook index 53d35cf23..a6bba3726 100644 --- a/main/sur/markdown/core.hook +++ b/main/sur/markdown/core.hook @@ -19,3 +19,4 @@ [%tex p=tape] :: text == :: -- + From 715bb37cc2d7de4e1fd1c207f6324a9681165b3c Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Tue, 5 Aug 2014 14:00:48 -0700 Subject: [PATCH 3/3] Various example files. --- main/lib/example/core.hook | 5 +++++ main/pub/fab/fun/five/hymn.hook | 12 ++++++++++++ main/pub/fab/fun/four/hymn.hook | 19 +++++++++++++++++++ main/pub/fab/fun/one.md | 1 + main/pub/fab/fun/three/hymn.hook | 11 +++++++++++ main/pub/fab/fun/two/down.hook | 5 +++++ main/pub/fab/mad/five/down.hook | 9 +++++++++ main/pub/fab/mad/four/hymn.hook | 21 +++++++++++++++++++++ main/pub/fab/mad/one/hymn.hook | 25 +++++++++++++++++++++++++ main/pub/fab/mad/res/bible/1.html | 1 + main/pub/fab/mad/res/bible/2.html | 1 + main/pub/fab/mad/res/bible/3.html | 1 + main/pub/fab/mad/res/bible/4.html | 1 + main/pub/fab/mad/res/hello/hymn.hook | 1 + main/pub/fab/mad/six/hymn.hook | 23 +++++++++++++++++++++++ main/pub/fab/mad/three/hymn.hook | 17 +++++++++++++++++ main/pub/fab/mad/two/hymn.hook | 25 +++++++++++++++++++++++++ main/pub/src/mad/fib.hoon | 3 +++ main/pub/src/mad/tools/fib.hoon | 1 + 19 files changed, 182 insertions(+) create mode 100644 main/lib/example/core.hook create mode 100644 main/pub/fab/fun/five/hymn.hook create mode 100644 main/pub/fab/fun/four/hymn.hook create mode 100644 main/pub/fab/fun/one.md create mode 100644 main/pub/fab/fun/three/hymn.hook create mode 100644 main/pub/fab/fun/two/down.hook create mode 100644 main/pub/fab/mad/five/down.hook create mode 100644 main/pub/fab/mad/four/hymn.hook create mode 100644 main/pub/fab/mad/one/hymn.hook create mode 100644 main/pub/fab/mad/res/bible/1.html create mode 100644 main/pub/fab/mad/res/bible/2.html create mode 100644 main/pub/fab/mad/res/bible/3.html create mode 100644 main/pub/fab/mad/res/bible/4.html create mode 100644 main/pub/fab/mad/res/hello/hymn.hook create mode 100644 main/pub/fab/mad/six/hymn.hook create mode 100644 main/pub/fab/mad/three/hymn.hook create mode 100644 main/pub/fab/mad/two/hymn.hook create mode 100644 main/pub/src/mad/fib.hoon create mode 100644 main/pub/src/mad/tools/fib.hoon diff --git a/main/lib/example/core.hook b/main/lib/example/core.hook new file mode 100644 index 000000000..614952169 --- /dev/null +++ b/main/lib/example/core.hook @@ -0,0 +1,5 @@ +|% +++ fib |=(x=@ ~+(?:((lth x 2) 1 (add $(x (dec x)) $(x (sub x 2)))))) +-- + + diff --git a/main/pub/fab/fun/five/hymn.hook b/main/pub/fab/fun/five/hymn.hook new file mode 100644 index 000000000..ec639a03d --- /dev/null +++ b/main/pub/fab/fun/five/hymn.hook @@ -0,0 +1,12 @@ +/= ctx /$ |=([p=beam q=path] +<) +:: +;html + ;head + ;title: Fun Experiment Five + == + ;body + ;p: This page was built at {<(tope p.ctx)>}. + ;br; + ;p: The remainder path was {}. + == +== diff --git a/main/pub/fab/fun/four/hymn.hook b/main/pub/fab/fun/four/hymn.hook new file mode 100644 index 000000000..b1f580920 --- /dev/null +++ b/main/pub/fab/fun/four/hymn.hook @@ -0,0 +1,19 @@ +/= gas /$ fuel +:: +=+ arg=(biff (~(get by qix.gas) %number) (slat %ud)) +=+ fib=|=(x=@ ~+(?:((lth x 2) 1 (add $(x (dec x)) $(x (sub x 2)))))) +:: +;html + ;head + ;title: Fun Experiment Four + == + ;body + ;p: Welcome, {}! + ;+ ?~ arg + ;p: Usage: ?number=x + ;p ; This is an ;{i "HTML file"} which + ; computes the Fibonacci number + ; of {}: {<(fib u.arg)>}. + == + == +== diff --git a/main/pub/fab/fun/one.md b/main/pub/fab/fun/one.md new file mode 100644 index 000000000..da60c9d95 --- /dev/null +++ b/main/pub/fab/fun/one.md @@ -0,0 +1 @@ +This is a *fun experiment* in markdown. diff --git a/main/pub/fab/fun/three/hymn.hook b/main/pub/fab/fun/three/hymn.hook new file mode 100644 index 000000000..6474e1f20 --- /dev/null +++ b/main/pub/fab/fun/three/hymn.hook @@ -0,0 +1,11 @@ +=+ fib=|=(x=@ ?:((lth x 2) 1 (add $(x (dec x)) $(x (sub x 2))))) +;html + ;head ;title: Fun Experiment Three + == + ;body + ;p ; This is an ;{i "HTML file"} which + ; computes the Fibonacci number + ; of 12: {<(fib 12)>}. + == + == +== diff --git a/main/pub/fab/fun/two/down.hook b/main/pub/fab/fun/two/down.hook new file mode 100644 index 000000000..ad0730342 --- /dev/null +++ b/main/pub/fab/fun/two/down.hook @@ -0,0 +1,5 @@ +:~ :- %par + :~ tex/"This is a " + emp/bent/~[tex/"fun experiment "] + tex/"in markdown; 2 + 2 is {<(add 2 2)>}." +== == diff --git a/main/pub/fab/mad/five/down.hook b/main/pub/fab/mad/five/down.hook new file mode 100644 index 000000000..b01b026bc --- /dev/null +++ b/main/pub/fab/mad/five/down.hook @@ -0,0 +1,9 @@ +/- down +^- down +:~ :- %par + :~ tex/"This is a " + emp/bent/~[tex/"fun experiment "] + tex/"in markdown; 2 + 2 is {<(add 2 2)>}." +== == + + diff --git a/main/pub/fab/mad/four/hymn.hook b/main/pub/fab/mad/four/hymn.hook new file mode 100644 index 000000000..4d1441643 --- /dev/null +++ b/main/pub/fab/mad/four/hymn.hook @@ -0,0 +1,21 @@ +:: This fourth experiment is profoundly biblical. +:: +:::: /hoon/four/mad/fab/pub + :: +/= bible /: /======/res/bible + /; |= a=(list (pair ,@ manx)) + (turn a |=([* b=manx] b)) + /@ + /hymn/ +:: +:::: ~tasfyn-partyv + :: +!: +;html + ;head + ;title: Mad Experiment Four + == + ;body + ;* bible + == +== diff --git a/main/pub/fab/mad/one/hymn.hook b/main/pub/fab/mad/one/hymn.hook new file mode 100644 index 000000000..bbd3a73ec --- /dev/null +++ b/main/pub/fab/mad/one/hymn.hook @@ -0,0 +1,25 @@ +:: Our first experiment with major hood runes. +:: +:::: /hoon/one/mad/src/pub + :: +/= gas /$ fuel +// /===/pub/src/mad/fib +:: +:::: ~tasfyn-partyv + :: +=+ arg=(biff (~(get by qix.gas) %number) (slat %ud)) +:: +;html + ;head + ;title: Mad Experiment One + == + ;body + ;+ ?~ arg + ;p: Usage: ?number=x + ;p ; This is an ;{i "HTML file"} which + ; computes the Fibonacci number + ; of {}: {<(fib u.arg)>}. + == + == +== + diff --git a/main/pub/fab/mad/res/bible/1.html b/main/pub/fab/mad/res/bible/1.html new file mode 100644 index 000000000..43824a4df --- /dev/null +++ b/main/pub/fab/mad/res/bible/1.html @@ -0,0 +1 @@ +

The earth was without form, and void.

diff --git a/main/pub/fab/mad/res/bible/2.html b/main/pub/fab/mad/res/bible/2.html new file mode 100644 index 000000000..57da8bcbd --- /dev/null +++ b/main/pub/fab/mad/res/bible/2.html @@ -0,0 +1 @@ +

Then Cain slew Abel.

diff --git a/main/pub/fab/mad/res/bible/3.html b/main/pub/fab/mad/res/bible/3.html new file mode 100644 index 000000000..e6e8d8abe --- /dev/null +++ b/main/pub/fab/mad/res/bible/3.html @@ -0,0 +1 @@ +

I bring not peace, but a sword.

diff --git a/main/pub/fab/mad/res/bible/4.html b/main/pub/fab/mad/res/bible/4.html new file mode 100644 index 000000000..9c628a449 --- /dev/null +++ b/main/pub/fab/mad/res/bible/4.html @@ -0,0 +1 @@ +

And I saw a pale horse, and upon him a pale rider.

diff --git a/main/pub/fab/mad/res/hello/hymn.hook b/main/pub/fab/mad/res/hello/hymn.hook new file mode 100644 index 000000000..161b00caf --- /dev/null +++ b/main/pub/fab/mad/res/hello/hymn.hook @@ -0,0 +1 @@ +;p: Hello, world. diff --git a/main/pub/fab/mad/six/hymn.hook b/main/pub/fab/mad/six/hymn.hook new file mode 100644 index 000000000..85603dcf5 --- /dev/null +++ b/main/pub/fab/mad/six/hymn.hook @@ -0,0 +1,23 @@ +:: Our sixth experiment with major hood runes. +:: +:::: /hoon/six/mad/fab/pub + :: +/+ example +/= gas /$ fuel +:: +:::: ~tasfyn-partyv + :: +=+ arg=(biff (~(get by qix.gas) %number) (slat %ud)) +;html + ;head + ;title: Mad Experiment Two + == + ;body + ;+ ?~ arg + ;p: Usage: ?number=x + ;p ; This is an ;{i "HTML file"} which + ; computes the Fibonacci number + ; of {}: {<(fib u.arg)>}. + == + == +== diff --git a/main/pub/fab/mad/three/hymn.hook b/main/pub/fab/mad/three/hymn.hook new file mode 100644 index 000000000..9655eeaac --- /dev/null +++ b/main/pub/fab/mad/three/hymn.hook @@ -0,0 +1,17 @@ +:: This third experiment wears the horns. +:: +:::: /hoon/three/mad/fab/pub + :: +/= hello /^ manx /:/======/res/hello:/hymn/ +:: +:::: ~tasfyn-partyv + :: +;html + ;head + ;title: Mad Experiment Three + == + ;body + ;+ hello + == +== + diff --git a/main/pub/fab/mad/two/hymn.hook b/main/pub/fab/mad/two/hymn.hook new file mode 100644 index 000000000..08c8bdd9a --- /dev/null +++ b/main/pub/fab/mad/two/hymn.hook @@ -0,0 +1,25 @@ +:: Our second experiment with major hood runes. +:: +:::: /hoon/two/mad/src/pub + :: +/= gas /$ fuel +// /===/pub/src/mad/tools +:: +:::: ~tasfyn-partyv + :: +=+ arg=(biff (~(get by qix.gas) %number) (slat %ud)) +:: +;html + ;head + ;title: Mad Experiment Two + == + ;body + ;+ ?~ arg + ;p: Usage: ?number=x + ;p ; This is an ;{i "HTML file"} which + ; computes the Fibonacci number + ; of {}: {<(fib u.arg)>}. + == + == +== + diff --git a/main/pub/src/mad/fib.hoon b/main/pub/src/mad/fib.hoon new file mode 100644 index 000000000..ceacdcb1c --- /dev/null +++ b/main/pub/src/mad/fib.hoon @@ -0,0 +1,3 @@ +|% +++ fib |=(x=@ ~+(?:((lth x 2) 1 (add $(x (dec x)) $(x (sub x 2)))))) +-- diff --git a/main/pub/src/mad/tools/fib.hoon b/main/pub/src/mad/tools/fib.hoon new file mode 100644 index 000000000..2c77e5b21 --- /dev/null +++ b/main/pub/src/mad/tools/fib.hoon @@ -0,0 +1 @@ +|=(x=@ ~+(?:((lth x 2) 1 (add $(x (dec x)) $(x (sub x 2))))))