From fd1719525efc289a5ea1ce1320e73e06a43ef9b5 Mon Sep 17 00:00:00 2001 From: Galen Wolfe-Pauly Date: Thu, 10 Sep 2015 19:35:20 -0700 Subject: [PATCH 01/15] warning class --- pub/tree/src/css/main.css | 33 ++++++++++++++++++++++++++++++--- pub/tree/src/css/main.styl | 33 ++++++++++++++++++++++++++++++--- 2 files changed, 60 insertions(+), 6 deletions(-) diff --git a/pub/tree/src/css/main.css b/pub/tree/src/css/main.css index 9576acc94..b86c52a96 100644 --- a/pub/tree/src/css/main.css +++ b/pub/tree/src/css/main.css @@ -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, diff --git a/pub/tree/src/css/main.styl b/pub/tree/src/css/main.styl index 03cf8716e..60f2f6d92 100644 --- a/pub/tree/src/css/main.styl +++ b/pub/tree/src/css/main.styl @@ -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' From 387ed3212fb55b823598ce791be32892f7611da1 Mon Sep 17 00:00:00 2001 From: Galen Wolfe-Pauly Date: Fri, 11 Sep 2015 07:38:37 -0700 Subject: [PATCH 02/15] no blog in test --- pub/blog.md | 11 ----------- pub/blog/~2015.7.16.md | 10 ---------- pub/blog/~2015.7.17.md | 10 ---------- pub/blog/~2015.7.18.mdy | 14 -------------- 4 files changed, 45 deletions(-) delete mode 100644 pub/blog.md delete mode 100644 pub/blog/~2015.7.16.md delete mode 100644 pub/blog/~2015.7.17.md delete mode 100644 pub/blog/~2015.7.18.mdy diff --git a/pub/blog.md b/pub/blog.md deleted file mode 100644 index 092989e6b..000000000 --- a/pub/blog.md +++ /dev/null @@ -1,11 +0,0 @@ -
- -# Log — - - - - - -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. - -
diff --git a/pub/blog/~2015.7.16.md b/pub/blog/~2015.7.16.md deleted file mode 100644 index e8893fe5c..000000000 --- a/pub/blog/~2015.7.16.md +++ /dev/null @@ -1,10 +0,0 @@ -
- -# Technical demo — Part ii - -

2015 07 16

-

Curtis, Galen, Philip, Anton and Henry

- - - -
diff --git a/pub/blog/~2015.7.17.md b/pub/blog/~2015.7.17.md deleted file mode 100644 index c729fa0d3..000000000 --- a/pub/blog/~2015.7.17.md +++ /dev/null @@ -1,10 +0,0 @@ -
- -# Technical demo — Part i - -

2015-07-17

-

Curtis, Galen, Philip, Anton and Henry

- - - -
diff --git a/pub/blog/~2015.7.18.mdy b/pub/blog/~2015.7.18.mdy deleted file mode 100644 index 85dd64b1c..000000000 --- a/pub/blog/~2015.7.18.mdy +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: Advantages ---- -
- -# Concrete advantages of urbit - -

2015-7-18

-

Philip Monk

- -# Item 1 -# Item 2 - -
From 4d2d972539d5afe15cf30559e77d84862347c943 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Mon, 14 Sep 2015 19:07:47 -0400 Subject: [PATCH 03/15] unlog --- ape/talk.hoon | 6 ++++++ mar/unlog.hoon | 11 +++++++++++ 2 files changed, 17 insertions(+) create mode 100644 mar/unlog.hoon diff --git a/ape/talk.hoon b/ape/talk.hoon index ae984f8ba..9a27e9e08 100644 --- a/ape/talk.hoon +++ b/ape/talk.hoon @@ -1816,6 +1816,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 +>) diff --git a/mar/unlog.hoon b/mar/unlog.hoon new file mode 100644 index 000000000..f368207e4 --- /dev/null +++ b/mar/unlog.hoon @@ -0,0 +1,11 @@ +:: +:::: /hoon/core/unlog/mar + :: +!: +|_ man=span +++ grab + |% :: convert from + ++ noun span :: clam from %noun + -- +-- + From e0b3f6b2b1d7d038d4ea37ea3cec7394d39a8b5f Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Mon, 14 Sep 2015 18:03:40 -0700 Subject: [PATCH 04/15] fixed telegrams serialization --- mar/helm/reload.hoon | 1 + mar/talk/telegrams.hoon | 200 ++++++++++++++++++++++++++++++++++------ 2 files changed, 171 insertions(+), 30 deletions(-) create mode 100644 mar/helm/reload.hoon diff --git a/mar/helm/reload.hoon b/mar/helm/reload.hoon new file mode 100644 index 000000000..32c7d046a --- /dev/null +++ b/mar/helm/reload.hoon @@ -0,0 +1 @@ +|*(* ~) \ No newline at end of file diff --git a/mar/talk/telegrams.hoon b/mar/talk/telegrams.hoon index 1c2d7c53a..60dc3d56d 100644 --- a/mar/talk/telegrams.hoon +++ b/mar/talk/telegrams.hoon @@ -7,15 +7,148 @@ =+ 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 +163,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 +194,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/(su aurf:urlp) + exp/so + tax/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/(cu (hard (list tank)) blob) + == + :: + ++ blob (cu cue (su fel:ofis)) -- -- :: @@ -105,7 +244,6 @@ == :: ++ jope |=(a=ship (jape +:)) ::[%s (crip +:(scow %p a))]) - ++ joke |=(a=tank [%s (role (turn (wash 0^80 a) crip))]) ++ jode |=(a=time (jone (div (mul (sub a ~1970.1.1) 1.000) ~s1))) ++ jome :: stringify keys |* [a=_cord b=_json] @@ -148,11 +286,13 @@ %+ joba -.a ?+ -.a ~|(stub/-.a !!) %lin (jobe txt/[%s q.a] say/[%b p.a] ~) - %url (joba txt/[%s (crip (earf p.a))]) - %exp (joba txt/[%s p.a]) - %tax (joba txt/(jape )) + %url (jape (earf p.a)) + %exp [%s p.a] + %tax (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 +301,7 @@ %+ joba -.a ?- -.a %text [%s (role +.a)] - %tank [%a (turn +.a joke)] + %tank (jape (sifo (jam +.a))) %name (jobe nom/s/p.a mon/$(a q.a) ~) == :: From 4c14bd845ab7a717c7adbdba0e6cdf5c32b9ca91 Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Tue, 15 Sep 2015 10:45:04 -0700 Subject: [PATCH 05/15] better task rendering for frontend --- mar/talk/telegrams.hoon | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/mar/talk/telegrams.hoon b/mar/talk/telegrams.hoon index 60dc3d56d..8f65092e1 100644 --- a/mar/talk/telegrams.hoon +++ b/mar/talk/telegrams.hoon @@ -3,6 +3,7 @@ :: /? 314 /- talk +/+ talk !: =+ talk |_ gam=(list telegram) @@ -204,9 +205,9 @@ %+ ke *speech |. ~+ %- of :~ lin/(ot say/bo txt/so ~) - url/(su aurf:urlp) - exp/so - tax/dute + 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 ~) @@ -286,9 +287,9 @@ %+ joba -.a ?+ -.a ~|(stub/-.a !!) %lin (jobe txt/[%s q.a] say/[%b p.a] ~) - %url (jape (earf p.a)) - %exp [%s p.a] - %tax (grow-work-duty p.a) + %url (joba txt/(jape (earf p.a))) + %exp (joba txt/[%s 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))) ~) From 1b6723071354779bed3d924e1650d57b6f54d25e Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Tue, 15 Sep 2015 10:50:30 -0700 Subject: [PATCH 06/15] tank handling --- mar/talk/telegrams.hoon | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mar/talk/telegrams.hoon b/mar/talk/telegrams.hoon index 8f65092e1..d8f3247cf 100644 --- a/mar/talk/telegrams.hoon +++ b/mar/talk/telegrams.hoon @@ -218,7 +218,7 @@ %+ ke *torso |. ~+ %- of :~ name/(ot nom/so mon/tors ~) - text/(cu lore so) + text/(ot dat/(cu lore so) ~) tank/(cu (hard (list tank)) blob) == :: @@ -245,6 +245,7 @@ == :: ++ jope |=(a=ship (jape +:)) ::[%s (crip +:(scow %p a))]) + ++ joke |=(a=tank [%s (role (turn (wash 0^80 a) crip))]) ++ jode |=(a=time (jone (div (mul (sub a ~1970.1.1) 1.000) ~s1))) ++ jome :: stringify keys |* [a=_cord b=_json] @@ -302,7 +303,7 @@ %+ joba -.a ?- -.a %text [%s (role +.a)] - %tank (jape (sifo (jam +.a))) + %tank (jobe txt/[%a (turn +.a joke)] dat/(jape (sifo (jam +.a))) ~) %name (jobe nom/s/p.a mon/$(a q.a) ~) == :: From 93a8121a7195b7a38c20fd5a95da892c61f67bcf Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Tue, 15 Sep 2015 11:41:01 -0700 Subject: [PATCH 07/15] talk log frontend v0.1 --- pub/talklog/hymn.hook | 32 +++++++++ pub/talklog/src/MessagesComponent.coffee | 82 +++++++++++++++++++++++ pub/talklog/src/main.coffee | 3 + pub/talklog/src/util.coffee | 85 ++++++++++++++++++++++++ 4 files changed, 202 insertions(+) create mode 100644 pub/talklog/hymn.hook create mode 100644 pub/talklog/src/MessagesComponent.coffee create mode 100644 pub/talklog/src/main.coffee create mode 100644 pub/talklog/src/util.coffee diff --git a/pub/talklog/hymn.hook b/pub/talklog/hymn.hook new file mode 100644 index 000000000..7067130d2 --- /dev/null +++ b/pub/talklog/hymn.hook @@ -0,0 +1,32 @@ +:: Talk log front-end +:: +:::: /hook/hymn/talklog/pub + :: +/? 310 +/= mez /: /===/talk /% /; pojo /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") + == +== diff --git a/pub/talklog/src/MessagesComponent.coffee b/pub/talklog/src/MessagesComponent.coffee new file mode 100644 index 000000000..3851ac251 --- /dev/null +++ b/pub/talklog/src/MessagesComponent.coffee @@ -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 diff --git a/pub/talklog/src/main.coffee b/pub/talklog/src/main.coffee new file mode 100644 index 000000000..e73f1ca27 --- /dev/null +++ b/pub/talklog/src/main.coffee @@ -0,0 +1,3 @@ +$ -> + rend = React.render; rele = React.createElement + rend (rele window.MessagesComponent, messages: window.MessageData), ($ '#cont')[0] diff --git a/pub/talklog/src/util.coffee b/pub/talklog/src/util.coffee new file mode 100644 index 000000000..984a63e53 --- /dev/null +++ b/pub/talklog/src/util.coffee @@ -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' From 6f4e65167bf7e842ae22953dd9ceb445f6b79e36 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Tue, 15 Sep 2015 18:13:43 -0400 Subject: [PATCH 08/15] timestamped talk logfiles --- ape/talk.hoon | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/ape/talk.hoon b/ape/talk.hoon index 9a27e9e08..38eca466c 100644 --- a/ape/talk.hoon +++ b/ape/talk.hoon @@ -1791,21 +1791,29 @@ ++ log-to-file |= man=span ^- move - =+ paf=/(scot %p our.hid)/home/(scot %da now.hid)/talk/[man]/talk-telegrams + =+ =+ =+ (yore now.hid) + %^ cat 3 man + `@t`(rsh 3 2 (scot %ui :(add d.t (mul 100 m) (mul 10.000 y)))) + paf=/(scot %p our.hid)/home/(scot %da now.hid)/talk/[-]/talk-telegrams =+ 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 =+ ^= grams %- (hard (list telegram)) .^ %cx - /(scot %p our.hid)/home/(scot %da now.hid)/talk/[man]/talk-telegrams + =+ =+ (yore now.hid) + %^ cat 3 man + `@t`(rsh 3 2 (scot %ui :(add d.t (mul 100 m) (mul 10.000 y)))) + /(scot %p our.hid)/home/(scot %da now.hid)/talk/[-]/talk-telegrams == =+ toy=(~(got by stories) man) [~ +>.$(stories (~(put by stories) man toy(grams grams, count (lent grams))))] From 8d10ee10d91cbdd3024bcfc888d12b029e84cedf Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Tue, 15 Sep 2015 16:26:22 -0700 Subject: [PATCH 09/15] fixed json tank reading --- mar/talk/telegrams.hoon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mar/talk/telegrams.hoon b/mar/talk/telegrams.hoon index d8f3247cf..94142098d 100644 --- a/mar/talk/telegrams.hoon +++ b/mar/talk/telegrams.hoon @@ -218,8 +218,8 @@ %+ ke *torso |. ~+ %- of :~ name/(ot nom/so mon/tors ~) - text/(ot dat/(cu lore so) ~) - tank/(cu (hard (list tank)) blob) + text/(cu lore so) + tank/(ot dat/(cu (hard (list tank)) blob) ~) == :: ++ blob (cu cue (su fel:ofis)) From fe05f3080c4fd10f08a0cf1daab66520839af88f Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Tue, 15 Sep 2015 16:27:19 -0700 Subject: [PATCH 10/15] /- /+ dojo syntax --- ape/dojo.hoon | 35 ++++++++++++++++++++++++++++++++--- arvo/hoon.hoon | 1 + 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/ape/dojo.hoon b/ape/dojo.hoon index beba41db4..dcc30ba4a 100644 --- a/ape/dojo.hoon +++ b/ape/dojo.hoon @@ -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)) :: diff --git a/arvo/hoon.hoon b/arvo/hoon.hoon index 208bbb7ad..daa11a05b 100644 --- a/arvo/hoon.hoon +++ b/arvo/hoon.hoon @@ -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)) == From 642b8da58e38a85bff6084f14722aa04832e5c17 Mon Sep 17 00:00:00 2001 From: Galen Wolfe-Pauly Date: Wed, 16 Sep 2015 12:04:51 -0700 Subject: [PATCH 11/15] not sure how that got reverted --- lib/base.css | 619 +++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 529 insertions(+), 90 deletions(-) diff --git a/lib/base.css b/lib/base.css index bf2f4752e..6a5cd5955 100644 --- a/lib/base.css +++ b/lib/base.css @@ -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; } -} +} \ No newline at end of file From 3b99a6083e3605ceff45b21dca8d231141d09d19 Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Wed, 16 Sep 2015 13:47:26 -0700 Subject: [PATCH 12/15] more compact rend-work-duty --- ape/talk.hoon | 4 ++-- lib/talk.hoon | 21 ++++++++++++++++----- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/ape/talk.hoon b/ape/talk.hoon index 38eca466c..ccb897ca3 100644 --- a/ape/talk.hoon +++ b/ape/talk.hoon @@ -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)}") == -- :: diff --git a/lib/talk.hoon b/lib/talk.hoon index 5bca4c30f..6962aeea6 100644 --- a/lib/talk.hoon +++ b/lib/talk.hoon @@ -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)}: {}") - %change =+(due " -{(tr-id id)} {(trip -.due)}: {(tr-meat meat)}") + %archive =+(due " -{(tr-id id)} fin.") + %create =+(due " -{(tr-id id.tax)} new: {}") + %change =+(due " -{(tr-id id)} mod {(tr-meat meat)}") %update =+ due - " -{(tr-id id)} {(trip -.due)} {} by {}: {(tr-meat meat.due)}" + " -{(tr-id id)} v{} by {} {(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 From 610cf1b95fc0d6718ab3a8dc2379e0c4d898d02c Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Wed, 16 Sep 2015 13:57:24 -0700 Subject: [PATCH 13/15] clean up pre-ford-refactor shims --- lib/down-jet.hoon | 1 - lib/drum.hoon | 1 - lib/helm.hoon | 1 - lib/http.hoon | 1 - lib/kiln.hoon | 1 - lib/oct1.hoon | 1 - lib/oct2.hoon | 1 - lib/oct3.hoon | 1 - lib/oct4.hoon | 1 - lib/react.hoon | 1 - lib/sh-utils.hoon | 1 - lib/sole.hoon | 1 - lib/talk.hoon | 1 - lib/tree.hoon | 1 - lib/twitter.hoon | 1 - 15 files changed, 15 deletions(-) diff --git a/lib/down-jet.hoon b/lib/down-jet.hoon index 215890de4..d51f9f51b 100644 --- a/lib/down-jet.hoon +++ b/lib/down-jet.hoon @@ -17,4 +17,3 @@ :: ++ print sing -- -=*(down-jet . .) diff --git a/lib/drum.hoon b/lib/drum.hoon index 0b5423803..e3121ac42 100644 --- a/lib/drum.hoon +++ b/lib/drum.hoon @@ -844,4 +844,3 @@ ?:(=(0 len) ~ [`@c`'*' $(len (dec len))]) -- -- -=*(drum . .) diff --git a/lib/helm.hoon b/lib/helm.hoon index 951007428..488176e75 100644 --- a/lib/helm.hoon +++ b/lib/helm.hoon @@ -174,4 +174,3 @@ |= [way=wire her=ship cop=coop] =< abet (emit %flog ~ %text "woot: {<[way cop]>}") -- -=*(helm . .) diff --git a/lib/http.hoon b/lib/http.hoon index 9b7fd12c6..deb8fa71c 100644 --- a/lib/http.hoon +++ b/lib/http.hoon @@ -29,4 +29,3 @@ [%get headers ~] [%post headers ~ (tact (pojo p.req-type))] -- -=*(http . .) diff --git a/lib/kiln.hoon b/lib/kiln.hoon index b291940e2..44c022ded 100644 --- a/lib/kiln.hoon +++ b/lib/kiln.hoon @@ -483,4 +483,3 @@ == -- -- -=*(kiln . .) diff --git a/lib/oct1.hoon b/lib/oct1.hoon index 061b202a3..01852ab25 100644 --- a/lib/oct1.hoon +++ b/lib/oct1.hoon @@ -41,4 +41,3 @@ ++ voy ": {<~[(icon who)]>} (row/col): " :: print prompt -- -- -=*(oct1 . .) diff --git a/lib/oct2.hoon b/lib/oct2.hoon index 80061b2bb..b1c543f54 100644 --- a/lib/oct2.hoon +++ b/lib/oct2.hoon @@ -57,4 +57,3 @@ ?.(ept " ({-}'s turn) " ": {-} (row/col): "):: -- -- -=*(oct2 . .) diff --git a/lib/oct3.hoon b/lib/oct3.hoon index d2ea6a929..4fcd49cd8 100644 --- a/lib/oct3.hoon +++ b/lib/oct3.hoon @@ -58,4 +58,3 @@ ?.(ept " ({-}'s turn) " ": {-} (row/col): "):: -- -- -=*(oct3 . .) diff --git a/lib/oct4.hoon b/lib/oct4.hoon index c50ff291e..e7efb507d 100644 --- a/lib/oct4.hoon +++ b/lib/oct4.hoon @@ -58,4 +58,3 @@ ?.(ept " ({-}'s turn) " ": {-} (row/col): "):: -- -- -=*(oct4 . .) diff --git a/lib/react.hoon b/lib/react.hoon index 06988f74e..6a67531c2 100644 --- a/lib/react.hoon +++ b/lib/react.hoon @@ -129,4 +129,3 @@ ")" == -- -=*(react . .) diff --git a/lib/sh-utils.hoon b/lib/sh-utils.hoon index 05a0f1731..0b4f09a58 100644 --- a/lib/sh-utils.hoon +++ b/lib/sh-utils.hoon @@ -105,4 +105,3 @@ ^- [(list ,_mof) _con] (ref +<) -- -=*(sh-utils . .) diff --git a/lib/sole.hoon b/lib/sole.hoon index f5f81aa9b..21324f410 100644 --- a/lib/sole.hoon +++ b/lib/sole.hoon @@ -139,4 +139,3 @@ ?> ?=(%ins -.dat) p.dat -- -=*(sole . .) diff --git a/lib/talk.hoon b/lib/talk.hoon index 6962aeea6..c3e8e1700 100644 --- a/lib/talk.hoon +++ b/lib/talk.hoon @@ -67,4 +67,3 @@ == -- -- -=*(talk . .) diff --git a/lib/tree.hoon b/lib/tree.hoon index a841133c5..4f4a67683 100644 --- a/lib/tree.hoon +++ b/lib/tree.hoon @@ -62,4 +62,3 @@ acc(r $(acc r.acc)) -- -- -=*(tree . .) diff --git a/lib/twitter.hoon b/lib/twitter.hoon index 1f2a1bd17..95d6f1d63 100644 --- a/lib/twitter.hoon +++ b/lib/twitter.hoon @@ -542,4 +542,3 @@ (mold %get /statuses/lookup ,[us ~]) -- -- -=*(twitter . .) From cf5a8c79c2ec66aa127c737c3a76b647f5590386 Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Wed, 16 Sep 2015 15:51:31 -0700 Subject: [PATCH 14/15] fix tree, per-day talk output format, rendering --- ape/talk.hoon | 13 +++++-------- arvo/ford.hoon | 10 +++++----- gen/tree.hoon | 4 ++-- pub/talklog/hymn.hook | 7 ++++++- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/ape/talk.hoon b/ape/talk.hoon index ccb897ca3..1fd6efed4 100644 --- a/ape/talk.hoon +++ b/ape/talk.hoon @@ -1791,10 +1791,10 @@ ++ log-to-file |= man=span ^- move - =+ =+ =+ (yore now.hid) - %^ cat 3 man - `@t`(rsh 3 2 (scot %ui :(add d.t (mul 100 m) (mul 10.000 y)))) - paf=/(scot %p our.hid)/home/(scot %da now.hid)/talk/[-]/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 !>(-)])] :: @@ -1810,10 +1810,7 @@ =+ ^= grams %- (hard (list telegram)) .^ %cx - =+ =+ (yore now.hid) - %^ cat 3 man - `@t`(rsh 3 2 (scot %ui :(add d.t (mul 100 m) (mul 10.000 y)))) - /(scot %p our.hid)/home/(scot %da now.hid)/talk/[-]/talk-telegrams + /(scot %p our.hid)/home/(scot %da now.hid)/talk/[man]/talk-telegrams == =+ toy=(~(got by stories) man) [~ +>.$(stories (~(put by stories) man toy(grams grams, count (lent grams))))] diff --git a/arvo/ford.hoon b/arvo/ford.hoon index aff8b8c2d..75a622e5e 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -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] diff --git a/gen/tree.hoon b/gen/tree.hoon index 5dadf46b0..94cfc6c6b 100644 --- a/gen/tree.hoon +++ b/gen/tree.hoon @@ -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])) diff --git a/pub/talklog/hymn.hook b/pub/talklog/hymn.hook index 7067130d2..e8648aca9 100644 --- a/pub/talklog/hymn.hook +++ b/pub/talklog/hymn.hook @@ -3,7 +3,12 @@ :::: /hook/hymn/talklog/pub :: /? 310 -/= mez /: /===/talk /% /; pojo /json/ +/= 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}");) -- From fc9c0181ff1a2703e102ce0d318c19a9c277618e Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Thu, 17 Sep 2015 13:50:10 -0700 Subject: [PATCH 15/15] FIxed '_'.repeat bug --- pub/tree/src/js/main.js | 18 +++++++++++++++++- .../src/js/persistence/TreePersistence.coffee | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/pub/tree/src/js/main.js b/pub/tree/src/js/main.js index 126996dad..3af4647c4 100644 --- a/pub/tree/src/js/main.js +++ b/pub/tree/src/js/main.js @@ -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. // diff --git a/pub/tree/src/js/persistence/TreePersistence.coffee b/pub/tree/src/js/persistence/TreePersistence.coffee index 7f6f17f19..becce7bea 100644 --- a/pub/tree/src/js/persistence/TreePersistence.coffee +++ b/pub/tree/src/js/persistence/TreePersistence.coffee @@ -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]