Merge branch 'master' of https://github.com/urbit/urbit into pittyp

This commit is contained in:
Anton Dyudin 2015-09-17 13:57:38 -07:00
commit 6310b2495c
36 changed files with 1067 additions and 205 deletions

View File

@ -139,11 +139,40 @@
;~(plug (cold %http lus) (easy %post) auri:epur ;~(pfix ace dp-source))
;~(plug (cold %http hep) (easy %put) auri:epur ;~(pfix ace dp-source))
;~(plug (cold %verb tis) sym (punt ;~(pfix ace dp-source)))
=< ;~(plug (cold %verb fas) (cook . dp-poor))
|=(a=(list twig) [%dir ~ [0 %ex %clsg a]])
;~ plug (cold %verb fas)
;~ pose
;~(plug (cold %arc hep) (punt ;~(pfix gap dp-hooves)))
;~(plug (cold %lib lus) (punt ;~(pfix gap dp-hooves)))
(stag %dir :(stag ~ 0 %ex %clsg dp-poor))
==
==
::
(stag %show dp-source)
==
++ dp-hooves :: hoof list
:(stag 0 %ex %clsg (cook |=(a=tusk a) (most ;~(plug com gaw) dp-hoof)))
::
++ dp-hoof :: ++ford-hoof twig
%+ cook |*(a=* ~!(+.a `twig`a))
;~ plug
:(stag %dtzy %tas sym)
%- dp-twig-punt
;~ (glue fas)
;~(pfix fas (sear dp-case-twig nuck:so))
(stag %dtzy ;~(plug (cold %p sig) fed:ag))
==
==
::
++ dp-twig-punt :: twig of unit
|*(a=_rule ;~(pose (stag [%bczp %null] a) (easy [%bczp %null])))
::
++ dp-case-twig
|= a=coin ^- (unit twig)
?. ?=([~ case] a) ~
%+ some
[%dtzz %tas p.p.a]
[%dtzy p.a]
::
++ dp-source (stag 0 dp-build) :: ++dojo-source
++ dp-build :: ++dojo-build
%+ knee *dojo-build |. ~+
@ -166,7 +195,7 @@
;~(pose sym (easy dp-default-app))
==
++ dp-beam :: ++beam
%+ sear tome
%+ cook |=(a=path =+((tome a) ?^(- u [he-beak (flop a)])))
=+ vez=(vang & dp-path)
(sear plex:vez (stag %clsg poor:vez))
::

View File

@ -1686,10 +1686,10 @@
(weld " " txt)
::
%app
"[{(trip p.sep)}]: {(trip q.sep)}"
(trim 62 "[{(trip p.sep)}]: {(trip q.sep)}")
::
%tax
" {(rend-work-duty p.sep)}"
(trim 62 " {(rend-work-duty p.sep)}")
==
--
::
@ -1791,14 +1791,19 @@
++ log-to-file
|= man=span
^- move
=+ paf=/(scot %p our.hid)/home/(scot %da now.hid)/talk/[man]/talk-telegrams
=+ ^- paf=path
=+ day=(year %*(. (yore now.hid) +.t +:*tarp))
%+ tope [our.hid %home da/now.hid]
/talk-telegrams/(scot %da day)/[man]/talk
=+ grams:(~(got by stories) man)
[ost.hid %info /jamfile our.hid (foal paf [%talk-telegrams !>(-)])]
::
++ poke-save
|= man=span
^- (quip move +>)
[[(log-to-file man) ~] +>.$]
=+ paf=/(scot %p our.hid)/home/(scot %da now.hid)/talk/[man]/talk-telegrams
=+ grams:(~(got by stories) man)
[[ost.hid %info /jamfile our.hid (foal paf [%talk-telegrams !>(-)])]~ +>.$]
::
++ poke-load
|= man=span
@ -1816,6 +1821,12 @@
:- [(log-to-file man) ~]
+>.$(log (~(put by log) man count:(~(got by stories) man)))
::
++ poke-unlog
|= man=span
^- (quip move +>)
:- ~
+>.$(log (~(del by log) man))
::
++ prep
|= [old=(unit house-any)]
^- (quip move +>)

View File

@ -1495,17 +1495,17 @@
|= [cof=cafe bax=vase doe=term hon=horn]
^- (bolt vase)
%+ cope (lash cof how (flux (slat doe)))
|= [cof=cafe yep=(map ,@ span)]
=+ ^= poy ^- (list (pair ,@ span))
|= [cof=cafe yep=(map span ,@)]
=+ ^= poy ^- (list (pair span ,@))
%+ sort (~(tap by yep) ~)
|=([a=[@ *] b=[@ *]] (lth -.a -.b))
|=([[* a=@] [* b=@]] (lth a b))
%+ cope
|- ^- (bolt (list (pair ,@ vase)))
?~ poy (flue cof)
%+ cope $(poy t.poy)
|= [cof=cafe nex=(list (pair ,@ vase))]
%+ cope (chap(s.how [q.i.poy s.how]) cof bax hon)
(flux |=(elt=vase [[p.i.poy elt] nex]))
%+ cope (chap(s.how [p.i.poy s.how]) cof bax hon)
(flux |=(elt=vase [[q.i.poy elt] nex]))
%- flux
|= yal=(list (pair ,@ vase)) ^- vase
?~ yal [[%cube 0 [%atom %n]] 0]

View File

@ -6585,6 +6585,7 @@
^- (list term)
?+ typ ~
[%hold *] $(typ ~(repo ut typ))
[%bull *] $(typ ~(repo ut typ))
[%core *]
(turn (~(tap by q.r.q.typ) ~) |=([a=term *] a))
==

View File

@ -12,10 +12,10 @@
:- %tang %- flop
|- ^- tang
=+ ark=;;(arch .^(cy/pax))
=- ?~ q.ark -
=- ?~ fil.ark -
[(rend pax) -]
%- zing
%+ turn
(sort (~(tap by r.ark)) aor)
(sort (~(tap by dir.ark)) aor)
|= [a=@t ~]
^$(pax (welp pax /[a]))

View File

@ -70,113 +70,552 @@
font-weight: 500;
font-style: normal;
}
@font-face {
font-family: "scp";
src: url("//storage.googleapis.com/urbit-extra/scp-bold.woff");
font-weight: 600;
font-style: normal;
body,
html {
font-family: "bau", "Helvetica Neue", helvetica, arial, sans-serif;
}
@font-face {
font-family: "scp";
src: url("//storage.googleapis.com/urbit-extra/scp-black.woff");
font-weight: 700;
font-style: normal;
}
html,
body {
margin: 0;
padding: 0;
}
html,
input,
button,
body {
font-family: "bau";
font-size: 18px;
}
pre,
code,
.mono {
font-family:"scp";
pre,
li:before,
.spin,
#bred a,
h3.time {
font-family: "scp", "Courier New", courier, monospace;
}
#c {
width: 32rem;
margin-left: -16rem;
position: absolute;
left: 50%;
body,
html {
font-size: 18px;
font-weight: 400;
line-height: 1.6rem;
-webkit-text-size-adjust: none;
}
a {
color: #000;
text-decoration: none;
border-bottom: 2px solid #000;
display: inline-block;
line-height: 0.8rem;
}
hr {
display: inline-block;
width: 6rem;
border: 0;
border-top: 2px solid #f4f4f4;
}
h1 {
font-size: 1.6rem;
font-weight: 500;
margin-top: 4rem;
}
h1:after {
content: "\2014";
margin-left: 1rem;
}
#c pre {
font-size: .6rem;
h2,
h3 {
margin: 0;
margin-top: 2rem;
}
#pass {
width: 32rem;
}
button {
border: .3rem solid #000;
background-color: #fff;
font-size: 1rem;
padding: .3rem;
h1,
h2,
h3,
h4,
strong {
font-weight: 500;
}
.sig {
font-weight: 400;
font-size: 2rem;
display: inline;
vertical-align: middle;
h4 {
margin-bottom: 0.3rem;
}
span#ship {
font-family: 'bau';
font-weight: 400;
font-size: 1.2rem;
text-transform: uppercase;
letter-spacing: .1rem;
h5 {
font-style: italic;
font-weight: 200;
margin: 0;
}
h1 code,
h2 code,
h3 code {
font-size: inherit;
padding: 0.3rem;
}
pre,
code {
font-size: 0.8rem;
}
pre {
background-color: #f5f5f5;
padding: 0.3rem;
margin-left: -0.3rem;
}
code {
line-height: 1.2rem;
background-color: #f4f4f4;
margin-top: -0.05rem;
padding: 0.2rem;
display: inline-block;
min-width: 1rem;
}
input {
font-family: 'scp';
ul {
list-style: none;
padding: 0;
}
li:before {
content: "+";
padding-right: 0.3rem;
font-size: 0.8rem;
font-weight: 600;
}
#nav,
#cont {
left: 50%;
}
#cont {
width: 42rem;
margin-left: -21rem;
background-color: #fff;
z-index: 1;
}
#nav {
position: fixed;
top: 0rem;
width: 57rem;
padding-top: 1rem;
z-index: 0;
margin-left: -32rem;
overflow: hidden;
opacity: 0;
transition: opacity 1s ease-in-out;
}
#nav.moving {
opacity: 1;
transition: opacity 0.3s ease-in-out;
}
#nav:hover {
opacity: 1;
transition: opacity 0.3s ease-in-out;
}
#cont {
position: absolute;
top: 0;
margin-bottom: 9rem;
}
.loading {
display: inline-block;
}
.spin {
color: #fff;
padding: 0.6rem;
font-size: 0.7rem;
font-weight: 600;
letter-spacing: 0.1rem;
z-index: 3;
}
.loading > .spin {
background-color: #555;
}
#body .loading > .spin {
background-color: #000;
}
.spin.state-0:before {
content: "\2599";
}
.spin.state-1:before {
content: "\259B";
}
.spin.state-2:before {
content: "\259C";
}
.spin.state-3:before {
content: "\259F";
}
#load.load {
display: inline-block;
font-weight: 500;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(10,10,10,0.4);
opacity: 1;
transition: opacity 1s ease-in-out;
z-index: 4;
}
img.logo {
height: 2rem;
width: 2rem;
}
h3.time {
margin-top: 0.3rem;
font-size: 0.7rem;
font-weight: 200;
}
#nav .links > div {
display: inline-block;
vertical-align: top;
}
#nav #sibs {
width: 8rem;
transition: margin-top 0.3s ease-in-out;
overflow: hidden;
}
#nav #sibs > div {
height: 20px;
margin-bottom: 4px;
}
.focus #sibs {
margin-top: 0 !important;
transition: margin-top 0.3s ease-in-out;
}
#nav a,
.list > li > a {
text-transform: uppercase;
font-size: 0.7rem;
font-weight: 200;
letter-spacing: 1px;
white-space: nowrap;
}
.list > li > a {
border-bottom: none;
margin-bottom: 0.3rem;
}
#nav a,
.list > li > a h1 {
border-bottom: 1px solid #000;
margin-right: 0.3rem;
}
#nav .active a {
font-weight: 500;
text-decoration: none;
}
#up {
padding-right: 1rem;
margin-top: -0.3rem;
}
#sides {
float: right;
}
#sides a {
margin-right: 0.6rem;
}
#nav .arow-up,
#nav .arow-next,
#nav .arow-prev {
width: 0;
height: 0;
border: 0.4rem solid transparent;
}
#nav .arow-up {
border-bottom: 0.6rem solid #000;
}
#nav .arow-next {
border-left: 0.6rem solid #000;
}
#nav .arow-prev {
border-right: 0.6rem solid #000;
}
#bred {
width: 5rem;
padding-right: 1rem;
text-align: right;
font-size: 0.6rem;
white-space: nowrap;
overflow: hidden;
}
#bred a {
text-transform: lowercase;
vertical-align: top;
}
#bred > div {
float: right;
}
#bred > div > div {
display: inline-block;
margin-top: -0.2rem;
}
#bred a,
#kids a {
margin-right: 0.3rem;
}
#bred a {
margin-left: 0.3rem;
}
.short {
width: 32rem;
}
.list h1,
.list li a > div p {
margin: 0;
}
.list li a > div,
.list li a > div p {
display: inline;
}
span#ship,
input {
border: none;
padding: .3rem;
outline: none;
border-bottom: 3px solid #555;
.list li a > div p {
margin-left: 0.3rem;
}
.list li a > div p:first-child {
margin-left: 0;
}
.list li a > div p code {
font-size: 0.7rem;
font-weight: 400;
text-transform: none;
}
.list li a h1 code {
text-transform: lowercase;
border-bottom: 1px solid #000;
}
.list li a code {
padding: 0.2rem;
}
.list h1,
.list li a > div div {
display: inline;
}
.list li a > div div {
margin-left: 0.6rem;
overflow: hidden;
}
.list h1 {
font-size: 0.7rem;
}
.list.posts .post {
margin-bottom: 2rem;
}
.list.posts .post h1 {
text-transform: none;
font-size: 1.6rem;
line-height: 1.8rem;
margin-bottom: 1rem;
display: block;
}
.list.posts .post h2 {
font-size: 0.7rem;
font-weight: 400;
line-height: 1rem;
margin-top: 0;
}
.list.posts li.post:before {
content: "";
}
div.root h1 {
margin-bottom: 2rem;
}
div.root .list .sub {
margin-left: 0;
margin-right: 0.6rem;
}
div.root > p {
width: 27rem;
margin-top: 2rem;
}
h2.sub {
font-size: 0.7rem;
font-weight: 400;
line-height: 1rem;
letter-spacing: 1px;
margin-top: 0;
text-transform: uppercase;
}
div.post h1 {
font-size: 2.8rem;
line-height: 4rem;
display: block;
margin-top: 1rem;
margin-bottom: 1rem;
}
div.post h2 {
line-height: 1rem;
letter-spacing: 1px;
}
div.post h2 {
margin-top: 4rem;
}
div.post h2 {
font-size: 1.2rem;
font-weight: 500;
}
div.post p {
font-size: 1.2rem;
line-height: 2.2rem;
}
div.post li p {
display: inline;
}
div.toc {
margin-top: 3rem;
margin-bottom: 3rem;
}
div.toc h1,
div.toc h2,
div.toc h3,
div.toc h4 {
font-weight: 400;
cursor: pointer;
text-decoration: underline;
font-size: 1.2rem;
margin-top: 0.3rem;
margin-bottom: 0.3rem;
}
div.toc h2 {
margin-left: 1rem;
}
div.toc h3 {
margin-left: 2rem;
}
div.toc h4 {
margin-left: 3rem;
}
div.toc h1.t {
font-weight: 500;
font-size: 2rem;
text-decoration: none;
margin-bottom: 2rem;
}
#body .CodeMirror {
font-size: 0.8rem;
line-height: 1rem;
}
#body .CodeMirror .cm-header {
font-weight: 200;
}
#body .CodeMirror-gutters {
background-color: #fff;
padding-right: 1rem;
margin-left: -1rem;
}
.error {
color: #f91733;
}
.warning {
background-color: #ff3537;
padding: 1rem;
width: 18rem;
margin: 2rem 0;
color: #fff;
}
.warning a {
color: inherit;
border-color: #fff;
}
.warning h1 {
font-size: 1rem;
}
.warning h1,
.warning p {
margin: 0 0.3rem;
}
.warning.w {
width: auto;
}
@media only screen and (max-width: 1170px) {
#nav,
#nav > div,
#nav.up,
#nav.top,
#nav > .focus {
transform: translate3d(0, 0, 0);
-webkit-transform: translate3d(0, 0, 0);
}
#nav {
position: fixed;
top: 0;
opacity: 1;
width: 42rem;
margin-left: -21rem;
background-color: #fff;
z-index: 2;
}
#nav.m-down,
#nav.m-up {
position: absolute;
}
#nav.m-down.m-fixed {
position: fixed;
top: 0;
}
#nav > div {
max-height: 1rem;
overflow: hidden;
transition: max-height 0.3s ease-in-out;
}
#nav > .focus {
max-height: 40rem;
transition: max-height 0.3s ease-in-out;
}
#cont {
top: 3rem;
}
}
@media only screen and (min-width: 320px) and (max-width: 1024px) {
body,
html {
font-size: 21px;
}
#nav,
#cont {
width: 94%;
padding-left: 3%;
margin-left: 0;
}
#nav {
position: fixed;
padding-top: 0;
opacity: 1;
left: 0;
background-color: #fff;
z-index: 2;
}
#nav > div {
max-height: 1.4rem;
}
#nav > div {
padding-top: 0.6rem;
}
#nav #sibs {
width: 18rem;
}
#nav #sibs > div {
height: 20px;
line-height: 20px;
}
#nav a {
display: inline-block;
font-size: 0.7rem;
}
#nav #sides {
float: right;
}
#nav .arow-up,
#nav .arow-next,
#nav .arow-prev {
margin-right: 0;
border: 0.4rem solid transparent;
}
#nav .arow-up {
border-bottom: 0.6rem solid #000;
}
#nav .arow-next {
border-left: 0.6rem solid #000;
}
#nav .arow-prev {
margin-right: 1rem;
border-right: 0.6rem solid #000;
}
#cont {
top: 3rem;
left: 0;
padding-bottom: 9rem;
}
#cont h1:first-child {
margin-top: 0;
}
.short {
width: 100%;
}
}
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
#c {
width: 16rem;
margin-left: -8rem;
#nav > div {
max-height: 1.6rem;
}
#pass {
width: 16rem;
#nav a {
font-size: 0.7rem;
}
input {
-webkit-appearance: none;
border-radius: 0;
#nav #sibs > div {
height: 20px;
line-height: 20px;
}
}
}

View File

@ -17,4 +17,3 @@
::
++ print sing
--
=*(down-jet . .)

View File

@ -844,4 +844,3 @@
?:(=(0 len) ~ [`@c`'*' $(len (dec len))])
--
--
=*(drum . .)

View File

@ -174,4 +174,3 @@
|= [way=wire her=ship cop=coop] =< abet
(emit %flog ~ %text "woot: {<[way cop]>}")
--
=*(helm . .)

View File

@ -29,4 +29,3 @@
[%get headers ~]
[%post headers ~ (tact (pojo p.req-type))]
--
=*(http . .)

View File

@ -483,4 +483,3 @@
==
--
--
=*(kiln . .)

View File

@ -41,4 +41,3 @@
++ voy ": {<~[(icon who)]>} (row/col): " :: print prompt
--
--
=*(oct1 . .)

View File

@ -57,4 +57,3 @@
?.(ept " ({-}'s turn) " ": {-} (row/col): ")::
--
--
=*(oct2 . .)

View File

@ -58,4 +58,3 @@
?.(ept " ({-}'s turn) " ": {-} (row/col): ")::
--
--
=*(oct3 . .)

View File

@ -58,4 +58,3 @@
?.(ept " ({-}'s turn) " ": {-} (row/col): ")::
--
--
=*(oct4 . .)

View File

@ -129,4 +129,3 @@
")"
==
--
=*(react . .)

View File

@ -105,4 +105,3 @@
^- [(list ,_mof) _con]
(ref +<)
--
=*(sh-utils . .)

View File

@ -139,4 +139,3 @@
?> ?=(%ins -.dat)
p.dat
--
=*(sole . .)

View File

@ -34,15 +34,26 @@
=+ work-stuff
|^ |= due=duty ^- tape
?- -.due
%archive =+(due " -{(tr-id id)} {(trip -.due)}.")
%create =+(due " -{(tr-id id.tax)} {(trip -.due)}: {<title.tax>}")
%change =+(due " -{(tr-id id)} {(trip -.due)}: {(tr-meat meat)}")
%archive =+(due " -{(tr-id id)} fin.")
%create =+(due " -{(tr-id id.tax)} new: {<title.tax>}")
%change =+(due " -{(tr-id id)} mod {(tr-meat meat)}")
%update
=+ due
" -{(tr-id id)} {(trip -.due)} {<version>} by {<her>}: {(tr-meat meat.due)}"
" -{(tr-id id)} v{<version>} by {<her>} {(tr-meat meat.due)}"
==
++ tr-id |=(a=@uv (scow %uv (rsh 2 25 a)))
++ tr-term |=(a=term (rash a (star ;~(pose (cold ' ' hep) next))))
++ tr-term
|= a=term
=+ ^- [typ=tape key=tape]
%+ rash a
;~ (glue hep)
(plus aln)
(plus ;~(pose (cold ' ' hep) next))
==
?+ (crip typ) "{typ} {key}"
%set ":{key}"
%add "+{key}"
==
++ tr-meat
|= feh=flesh ^- tape
?- -.feh
@ -56,4 +67,3 @@
==
--
--
=*(talk . .)

View File

@ -62,4 +62,3 @@
acc(r $(acc r.acc))
--
--
=*(tree . .)

View File

@ -542,4 +542,3 @@
(mold %get /statuses/lookup ,[us ~])
--
--
=*(twitter . .)

1
mar/helm/reload.hoon Normal file
View File

@ -0,0 +1 @@
|*(* ~)

View File

@ -3,19 +3,153 @@
::
/? 314
/- talk
/+ talk
!:
=+ talk
|_ gam=(list telegram)
::
++ grab-work-duty => [jo work-stuff]
|^ dute
++ as
:: |*(a=fist (cu sa (ar a))) :: XX types
|* a=fist
%- cu :_ (ar a)
~(gas in *(set ,_(need *a)))
++ ot
|* a=(pole ,[@tas fist])
|= b=json
%. ((^ot a) b)
%- slog
?+ b ~
[%o *]
%+ murn `(list ,[@tas fist])`a
|= [c=term d=fist] ^- (unit tank)
=+ (~(get by p.b) c)
?~ - (some >[c (turn (~(tap by p.b)) head)]<)
=+ (d u)
?~ - (some >[c u]<)
~
==
++ of
|* a=(pole ,[@tas fist])
|= b=json
%. ((of:jo a) b)
%- slog
?+ b ~
[%o *]
%+ murn `(list ,[@tas fist])`a
|= [c=term d=fist] ^- (unit tank)
=+ (~(get by p.b) c)
?~ - ~
=+ (d u)
?~ - (some >[c u]<)
~
==
++ id (ci (slat %uv) so)
++ ship (su fed:ag)
++ dute
%- of :~
create/task change/(ot id/id meat/uppd ~)
archive/id update/(ot id/id version/ni her/(su fed:ag) meat/uppd ~)
==
++ task
%- ot :~
id/id 'date_created'^di
version/ni 'date_modified'^di
creator/ship doer/(mu ship)
tags/(as so) 'date_due'^(mu di)
done/(mu di) title/so
description/so discussion/(ar (ot date/di ship/ship body/so ~))
==
++ audi (as stan)
++ stan (su ;~((glue fas) ;~(pfix sig fed:ag) urs:ab))
++ uppd
%- of :~
set-doer/(mu (su fed:ag))
set-date-due/(mu di)
set-tags/(as so)
set-title/so
set-description/so
set-done/bo
add-comment/so
==
--
++ grow-work-duty
=> work-stuff
=+ jope=|=(a=ship [%s (rsh 3 1 (scot %p a))])
=+ jove=|=(a=@uvI [%s (scot %uv a)])
=< |= duty
%+ joba +<-
?- +<-
%create (task tax)
%archive (jove id)
%change (jobe id/(jove id) meat/(flesh meat) ~)
%update
%- jobe :~
id/(jove id)
version/(jone version)
her/(jope her)
meat/(flesh meat)
==
==
|%
++ tags
|= a=(set ,@t)
[%a (turn (sort (~(tap in a)) aor) |=(b=cord s/b))]
::
++ task
|= ^task
%- jobe :~ id/[%s (scot %uv id)]
tags/(^tags tags)
doer/?~(doer ~ (jope u.doer))
title/[%s title]
creator/(jope creator)
version/(jone version)
'date_created'^(jode date-created)
'date_modified'^(jode date-modified)
description/[%s description]
=< discussion/[%a (turn discussion .)]
|=(comment (jobe date/(jode date) ship/(jope ship) body/[%s body] ~))
'date_due'^?~(date-due ~ (jode u.date-due))
done/?~(done ~ (jode u.done))
==
++ flesh
|= ^flesh
%+ joba +<-
?- +<-
%set-doer ?~(her ~ (jope u.her))
%set-date-due ?~(wen ~ (jode u.wen))
%set-tags (tags tag)
%set-title [%s til]
%set-description [%s des]
%set-done [%b don]
%add-comment [%s com]
==
--
++ grab
|%
++ noun (list telegram)
++ mime |=(^mime (json (rash q.q apex:poja)))
++ json
=> [jo ..telegram]
=> [jo ..telegram dute=grab-work-duty]
|= a=json ^- (list telegram)
=- (need ((ar (ot ship/(su fed:ag) thought/thot ~)) a))
|%
++ of
|* a=(pole ,[@tas fist])
|= b=json
%. ((of:jo a) b)
%- slog
?+ b ~
[%o *]
%+ murn `(list ,[@tas fist])`a
|= [c=term d=fist] ^- (unit tank)
=+ (~(get by p.b) c)
?~ - ~
=+ (d u)
?~ - (some >[c u]<)
~
==
++ op :: parse keys of map
|* [fel=_rule wit=fist]
%+ cu mo
@ -30,14 +164,14 @@
%- cu :_ (ar a)
~(gas in *(set ,_(need *a)))
::
++ lake |*(a=_,* $+(json (unit a)))
++ peach
|* a=_[rule rule]
|= tub=nail
^- (like (each ,_(wonk (-.a)) ,_(wonk (+.a))))
%. tub
;~(pose (stag %& -.a) (stag %| +.a))
++ ke :: callbacks
|* [gar=* sef=_|.(fist)]
|= jon=json
^- (unit ,_gar)
=- ~! gar ~! (need -) -
((sef) jon)
::
++ lake |*(a=_,* $+(json (unit a)))
++ head-rush
|* a=_rule
|* [b=cord c=*]
@ -61,28 +195,34 @@
::
++ parn
^- $+(nail (like partner))
%+ peach
%+ pick
;~((glue fas) ;~(pfix sig fed:ag) urs:ab)
%+ sear (soft passport)
;~((glue fas) sym urs:ab) :: XX [a-z0-9_]{1,15}
::
++ eval
|= a=(trel ,@da bouquet ?(speech [%eval p=@t])) ^- statement
?. ?=(%eval -.r.a) a
=+ pax=[&1:% &2:% (scot %da p.a) |3:%]
=- a(r [%fat tank/- %exp p.r.a])
p:(mule |.([(sell (slap !>(..zuse) (rain pax p.r.a)))]~))
::
++ stam
^- $+(json (unit statement))
%+ cu eval
=- (ot date/di bouquet/(as (ar so)) speech/(of -) ~)
:~ lin/(ot say/bo txt/so ~)
url/(su aurf:urlp)
eval/so
:: exp/(cu |=(a=cord [a ~]) so)
:: inv/(ot ship/(su fed:ag) party/(su urs:ab) ~)
++ stam (ot date/di bouquet/(as (ar so)) speech/spec ~)
++ spec
%+ ke *speech |. ~+
%- of :~
lin/(ot say/bo txt/so ~)
url/(ot txt/(su aurf:urlp) ~)
exp/(ot txt/so ~)
tax/(ot xat/dute ~)
app/(ot txt/so src/so ~)
fat/(ot tor/tors taf/spec ~)
ext/(ot nom/so txe/blob ~)
non/ul
:: inv/(ot ship/(su fed:ag) party/(su urs:ab) ~)
==
++ tors
%+ ke *torso |. ~+
%- of :~
name/(ot nom/so mon/tors ~)
text/(cu lore so)
tank/(ot dat/(cu (hard (list tank)) blob) ~)
==
::
++ blob (cu cue (su fel:ofis))
--
--
::
@ -148,11 +288,13 @@
%+ joba -.a
?+ -.a ~|(stub/-.a !!)
%lin (jobe txt/[%s q.a] say/[%b p.a] ~)
%url (joba txt/[%s (crip (earf p.a))])
%url (joba txt/(jape (earf p.a)))
%exp (joba txt/[%s p.a])
%tax (joba txt/(jape <p.a>))
%tax (jobe txt/(jape (rend-work-duty p.a)) xat/(grow-work-duty p.a) ~)
%app (jobe txt/[%s q.a] src/[%s p.a] ~)
%fat (jobe tor/(tors p.a) taf/$(a q.a) ~)
%ext (jobe nom/[%s p.a] txe/(jape (sifo (jam +.a))) ~)
%non ~
:: %inv (jobe ship/(jope p.a) party/[%s q.a] ~)
==
::
@ -161,7 +303,7 @@
%+ joba -.a
?- -.a
%text [%s (role +.a)]
%tank [%a (turn +.a joke)]
%tank (jobe txt/[%a (turn +.a joke)] dat/(jape (sifo (jam +.a))) ~)
%name (jobe nom/s/p.a mon/$(a q.a) ~)
==
::

11
mar/unlog.hoon Normal file
View File

@ -0,0 +1,11 @@
::
:::: /hoon/core/unlog/mar
::
!:
|_ man=span
++ grab
|% :: convert from
++ noun span :: clam from %noun
--
--

View File

@ -1,11 +0,0 @@
<div class="root">
# Log —
<search/>
<list dataPreview="true" dataType="post"></list>
Please direct all questions or inquiries to [urbit@urbit.org](mailto:urbit@urbit.org). You can also subscribe to the [urbit-dev]() mailing list or follow [@urbit_]() on twitter.
</div>

View File

@ -1,10 +0,0 @@
<div class="post">
# Technical demo — Part ii
<h2 class="sub">2015 07 16</h2>
<h2 class="sub">Curtis, Galen, Philip, Anton and Henry</h2>
<iframe src="https://player.vimeo.com/video/133395510?color=fff&amp;title=0&amp;byline=0&amp;portrait=0" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>

View File

@ -1,10 +0,0 @@
<div class="post">
# Technical demo — Part i
<h2 class="sub">2015-07-17</h2>
<h2 class="sub">Curtis, Galen, Philip, Anton and Henry</h2>
<iframe src="https://player.vimeo.com/video/133395510?color=fff&amp;title=0&amp;byline=0&amp;portrait=0" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen=""></iframe>
</div>

View File

@ -1,14 +0,0 @@
---
title: Advantages
---
<div class="post">
# Concrete advantages of urbit
<h2 class="sub">2015-7-18</h2>
<h2 class="sub">Philip Monk</h2>
# Item 1
# Item 2
</div>

37
pub/talklog/hymn.hook Normal file
View File

@ -0,0 +1,37 @@
:: Talk log front-end
::
:::: /hook/hymn/talklog/pub
::
/? 310
/= mez
/: /===/talk
/% 2
/; pojo
/; |=(a=(list ,[@ p=json]) =.(a (flop a) ?~(a [%a ~] p.i.a)))
/& /json/
|%
++ cdnj |=(a=tape ;script(src "//cdnjs.cloudflare.com/ajax/libs/{a}");)
--
::
::::
::
^- manx
;html
;head
;title: Talk Log
;* %- turn :_ cdnj ^- wall
:~ "jquery/2.1.1/jquery.min.js"
"lodash.js/2.4.1/lodash.min.js"
"react/0.13.0/react.js"
== ==
;body
;div#cont;
;script(type "text/javascript", src "/~/at/home/lib/urb.js");
;link/"/home/pub/talk/src/css/main.css"(type "text/css", rel "stylesheet");
;script: window.MessageData = {mez}
;script@"src/MessagesComponent.coffee"(type "text/coffeescript");
;script@"src/util.coffee"(type "text/coffeescript");
;script@"src/main.coffee"(type "text/coffeescript");
;+ (cdnj "coffee-script/1.7.1/coffee-script.min.js")
==
==

View File

@ -0,0 +1,82 @@
recl = React.createClass
{div,pre,br,input,textarea,a} = React.DOM
Message = recl
lz: (n) -> if n<10 then "0#{n}" else "#{n}"
convTime: (time) ->
d = new Date time
h = @lz d.getHours()
m = @lz d.getMinutes()
s = @lz d.getSeconds()
"~#{h}.#{m}.#{s}"
render: ->
# pendingClass = if @props.pending isnt "received" then "pending" else ""
delivery = _.uniq _.pluck @props.thought.audience, "delivery"
klass = if delivery.indexOf("received") isnt -1 then " received" else " pending"
speech = @props.thought.statement.speech
attachments = []
while speech.fat?
attachments.push pre {}, speech.fat.tor.tank.txt.join("\n")
speech = speech.fat.taf # XX
if !speech? then return;
if speech.lin?.say is false then klass += " say"
if speech.url then klass += " url"
name = if @props.name then @props.name else ""
aude = _.keys @props.thought.audience
audi = window.util.clipAudi(aude).map (_audi) -> (div {}, _audi.slice(1))
type = ['private','public']
type = type[Number(aude.indexOf(window.util.mainStationPath(window.urb.ship)) is -1)]
mess = switch
when (con = speech.lin) or (con = speech.app) or
(con = speech.exp) or (con = speech.tax)
con.txt
when (con = speech.url)
(a {href:con.txt,target:"_blank"}, con.txt)
else "Unknown speech type:" + (" %"+x for x of speech).join ''
klass += switch
when speech.app? then " say"
when speech.exp? then " exp"
else ""
{ship} = @props
if ship[0] is "~" then ship = ship.slice(1)
div {className:"message#{klass}"}, [
(div {className:"attr"}, [
div {className:"type #{type}"}, ""
div {className:"iden"}, div {className:"ship"}, ship
div {className:"audi"}, audi
div {className:"time"}, @convTime @props.thought.statement.date
])
div {className:"mess"}, mess,
if attachments.length
div {className:"fat"}, attachments
]
window.MessagesComponent = recl
pageSize: 50
paddingTop: 100
getInitialState: -> {station:window.location.pathname.split("/").reverse()[0]}
sortedMessages: (messages) ->
_.sortBy messages, (_message) ->
_message.pending = false
_message.thought.statement.date
render: ->
_messages = @sortedMessages @props.messages
messages = _messages.map (_message,k) =>
if _message.thought.statement.speech?.app
_message.ship = "system"
_message.station = @state.station
React.createElement Message,_message
div {id: "messages"}, messages

View File

@ -0,0 +1,3 @@
$ ->
rend = React.render; rele = React.createElement
rend (rele window.MessagesComponent, messages: window.MessageData), ($ '#cont')[0]

View File

@ -0,0 +1,85 @@
if not window.util then window.util = {}
_.merge window.util,
mainStations: ["court","floor","porch"]
mainStationPath: (user) -> "~#{user}/#{window.util.mainStation(user)}"
mainStation: (user) ->
if not user then user = window.urb.ship
switch user.length
when 3
return "court"
when 6
return "floor"
when 13
return "porch"
clipAudi: (audi) ->
audi = audi.join " "
ms = window.util.mainStationPath window.urb.ship
regx = new RegExp "/#{ms}","g"
audi = audi.replace regx,""
audi.split " "
expandAudi: (audi) ->
audi = audi.join " "
ms = window.util.mainStationPath window.urb.ship
if audi.indexOf(ms) is -1
if audi.length > 0
audi += " "
audi += "#{ms}"
audi.split " "
create: (name) ->
window.talk.StationPersistence.createStation name, (err,res) ->
subscribe: (name) ->
window.talk.StationPersistence.addSource "main",window.urb.ship,["~zod/#{name}"]
uuid32: ->
str = "0v"
str += Math.ceil(Math.random()*8)+"."
for i in [0..5]
_str = Math.ceil(Math.random()*10000000).toString(32)
_str = ("00000"+_str).substr(-5,5)
str += _str+"."
str.slice(0,-1)
populate: (station,number) ->
c = 0
send = ->
if c < number
c++
else
console.log 'done'
return true
_audi = {}
_audi[station] = "pending"
_message =
serial:window.util.uuid32()
audience:_audi
statement:
speech:
say:"Message "+c
time: Date.now()
now: Date.now()
window.talk.MessagePersistence.sendMessage _message,send
send()
getScroll: ->
@writingPosition = $('#c').outerHeight(true)+$('#c').offset().top-$(window).height()
setScroll: ->
window.util.getScroll()
$(window).scrollTop($("#c").height())
isScrolling: ->
if not window.util.writingPosition
window.util.getScroll()
return ($(window).scrollTop()+$('#writing').outerHeight() < window.util.writingPosition)
checkScroll: ->
if window.util.isScrolling()
$('body').addClass 'scrolling'
else
$('body').removeClass 'scrolling'

View File

@ -102,10 +102,13 @@ hr {
border: 0;
border-top: 2px solid #f4f4f4;
}
h1 {
margin-top: 4rem;
}
h2,
h3 {
margin: 0;
margin-top: 1rem;
margin-top: 2rem;
}
h1,
h2,
@ -433,8 +436,8 @@ div.post li p {
display: inline;
}
div.toc {
margin-top: 6rem;
margin-bottom: 6rem;
margin-top: 3rem;
margin-bottom: 3rem;
}
div.toc h1,
div.toc h2,
@ -444,6 +447,8 @@ div.toc h4 {
cursor: pointer;
text-decoration: underline;
font-size: 1.2rem;
margin-top: 0.3rem;
margin-bottom: 0.3rem;
}
div.toc h2 {
margin-left: 1rem;
@ -458,6 +463,7 @@ div.toc h1.t {
font-weight: 500;
font-size: 2rem;
text-decoration: none;
margin-bottom: 2rem;
}
#body .CodeMirror {
font-size: 0.8rem;
@ -474,6 +480,27 @@ div.toc h1.t {
.error {
color: #f91733;
}
.warning {
background-color: #ff3537;
padding: 1rem;
width: 18rem;
margin: 2rem 0;
color: #fff;
}
.warning a {
color: inherit;
border-color: #fff;
}
.warning h1 {
font-size: 1rem;
}
.warning h1,
.warning p {
margin: 0 0.3rem;
}
.warning.w {
width: auto;
}
@media only screen and (max-width: 1170px) {
#nav,
#nav > div,

View File

@ -32,10 +32,13 @@ hr
border 0
border-top 2px solid #f4f4f4
h1
margin-top 4rem
h2
h3
margin 0
margin-top 1rem
margin-top 2rem
h1
h2
@ -361,8 +364,8 @@ div.post
display inline
div.toc
margin-top 6rem
margin-bottom 6rem
margin-top 3rem
margin-bottom 3rem
h1
h2
@ -372,6 +375,8 @@ div.toc
cursor pointer
text-decoration underline
font-size 1.2rem
margin-top .3rem
margin-bottom .3rem
h2
margin-left 1rem
@ -386,6 +391,7 @@ div.toc
font-weight 500
font-size 2rem
text-decoration none
margin-bottom 2rem
#body .CodeMirror
font-size .8rem
@ -402,4 +408,25 @@ div.toc
.error
color rgba(249,23,51,1)
.warning
background-color rgb(255,53,55)
padding 1rem
width 18rem
margin 2rem 0
color #fff
a
color inherit
border-color #fff
h1
font-size 1rem
h1
p
margin 0 .3rem
.warning.w
width auto
@import 'mobile'

View File

@ -35,6 +35,7 @@ module.exports = {
};
},{"../dispatcher/Dispatcher.coffee":13,"../persistence/TreePersistence.coffee":19}],2:[function(require,module,exports){
var BodyComponent, CLICK, Links, TreeActions, TreeStore, a, clas, div, query, reactify, recl, ref;
@ -288,6 +289,7 @@ module.exports = query({
}));
},{"../actions/TreeActions.coffee":1,"../stores/TreeStore.coffee":20,"./Async.coffee":3,"./BodyComponent.coffee":4,"./Reactify.coffee":10,"classnames":15}],3:[function(require,module,exports){
var TreeActions, TreeStore, _load, code, div, recl, ref, span;
@ -389,6 +391,7 @@ module.exports = function(queries, Child, load) {
};
},{"../actions/TreeActions.coffee":1,"../stores/TreeStore.coffee":20,"./LoadComponent.coffee":9}],4:[function(require,module,exports){
var div, query, reactify, recl;
@ -414,6 +417,7 @@ module.exports = query({
}));
},{"./Async.coffee":3,"./Reactify.coffee":10}],5:[function(require,module,exports){
var div, recl, ref, textarea;
@ -437,6 +441,7 @@ module.exports = recl({
});
},{}],6:[function(require,module,exports){
var div, recl;
@ -458,6 +463,7 @@ module.exports = {
};
},{"./CodeMirror.coffee":5,"./KidsComponent.coffee":7,"./ListComponent.coffee":8,"./SearchComponent.coffee":11,"./TocComponent.coffee":12}],7:[function(require,module,exports){
var a, div, hr, li, query, reactify, recl, ref, ul;
@ -497,6 +503,7 @@ module.exports = query({
}));
},{"./Async.coffee":3,"./Reactify.coffee":10}],8:[function(require,module,exports){
var a, clas, div, h1, li, query, reactify, recl, ref, ul;
@ -592,6 +599,7 @@ module.exports = query({
}));
},{"./Async.coffee":3,"./Reactify.coffee":10,"classnames":15}],9:[function(require,module,exports){
var div, input, recl, ref, textarea;
@ -632,6 +640,7 @@ module.exports = recl({
});
},{}],10:[function(require,module,exports){
var Virtual, div, load, reactify, recl, ref, rele, span, walk;
@ -699,6 +708,7 @@ module.exports = _.extend(reactify, {
});
},{"./LoadComponent.coffee":9}],11:[function(require,module,exports){
var a, div, input, query, reactify, recl, ref,
slice = [].slice;
@ -837,6 +847,7 @@ module.exports = query({
}));
},{"./Async.coffee":3,"./Reactify.coffee":10}],12:[function(require,module,exports){
var div, query, reactify, recl;
@ -967,6 +978,7 @@ module.exports = query({
}));
},{"./Async.coffee":3,"./Reactify.coffee":10}],13:[function(require,module,exports){
var Dispatcher;
@ -988,6 +1000,7 @@ module.exports = _.extend(new Dispatcher(), {
});
},{"flux":16}],14:[function(require,module,exports){
var rend;
@ -1134,6 +1147,7 @@ $(function() {
});
},{"./actions/TreeActions.coffee":1,"./components/AnchorComponent.coffee":2,"./components/BodyComponent.coffee":4,"./components/Components.coffee":6,"./persistence/TreePersistence.coffee":19}],15:[function(require,module,exports){
/*!
Copyright (c) 2015 Jed Watson.
@ -1521,7 +1535,7 @@ module.exports = {
encode: function(obj) {
var _encode, delim;
delim = function(n) {
return ('_'.repeat(n)) || '.';
return Array(n + 1).join('_') || '.';
};
_encode = function(obj) {
var _dep, dep, k, res, sub, v;
@ -1554,6 +1568,7 @@ module.exports = {
};
},{}],20:[function(require,module,exports){
var EventEmitter, MessageDispatcher, QUERIES, TreeStore, _curr, _data, _tree, clog;
@ -1789,6 +1804,7 @@ TreeStore.dispatchToken = MessageDispatcher.register(function(payload) {
module.exports = TreeStore;
},{"../dispatcher/Dispatcher.coffee":13,"events":21}],21:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//

View File

@ -3,7 +3,7 @@ module.exports =
url = "#{window.tree.basepath(path)}.json?q=#{@encode query}"
$.get url, {}, (data) -> if cb then cb null,data
encode: (obj)->
delim = (n)-> ('_'.repeat n) || '.'
delim = (n)-> Array(n+1).join('_') || '.'
_encode = (obj)->
if typeof obj isnt 'object'
return [0,obj]