diff --git a/LICENSE.txt b/LICENSE.txt index df03111ae..eed28e653 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 Urbit +Copyright (c) 2017 Urbit Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +SOFTWARE. \ No newline at end of file diff --git a/app/dojo.hoon b/app/dojo.hoon index 59db58883..256efa0e1 100644 --- a/app/dojo.hoon +++ b/app/dojo.hoon @@ -128,7 +128,7 @@ |= {gol/goal mod/dojo-model} ^- dojo-command [[%poke gol] [0 [%ge mod(q.p [q.gol q.p.mod])]]] :: - ++ dp-command-line ;~(sfix dp-command (just '\0a')) + ++ dp-command-line ;~(sfix dp-command (star ace) (just '\0a')) ++ dp-variable :: %verb or %brev |* {sym/rule src/rule} %+ cook diff --git a/app/hood.hoon b/app/hood.hoon index f8dce73b3..23a4ab313 100644 --- a/app/hood.hoon +++ b/app/hood.hoon @@ -158,6 +158,7 @@ ++ poke-kiln-sync (wrap poke-sync):from-kiln ++ poke-kiln-syncs (wrap poke-syncs):from-kiln ++ poke-kiln-start-autoload (wrap poke-start-autoload):from-kiln +++ poke-kiln-wipe-ford (wrap poke-wipe-ford):from-kiln ++ poke-kiln-autoload (wrap poke-autoload):from-kiln ++ poke-kiln-overload (wrap poke-overload):from-kiln ++ poke-kiln-unmount (wrap poke-unmount):from-kiln diff --git a/app/talk.hoon b/app/talk.hoon index 89e18a3ca..fa13fc407 100644 --- a/app/talk.hoon +++ b/app/talk.hoon @@ -1693,6 +1693,7 @@ :: ++ pa-report-group :: update presence |= vew/(set bone) + ?: [no-presence=&] +>.$ %^ pa-report vew %group :- %- ~(run by locals) |=({@ a/status} a) @@ -1936,7 +1937,18 @@ ++ pa-revise :: revise existing |= {num/@ud gam/telegram} =+ way=(sub count num) - ?: =(gam (snag (dec way) grams)) + =/ ole (snag (dec way) grams) + =. q.q.gam + ::REVIEW let old %received override different "new" states, in an + :: attempt to stem a stale-update loop + :: + %- ~(urn by q.q.gam) + |= {a/partner b/{envelope dev/delivery}} ^- {envelope delivery} + ?: ?=({$~ ^ $received} (~(get by q.q.ole) a)) + b(dev %received) + b + :: + ?: =(gam ole) +>.$ :: no change =. grams (welp (scag (dec way) grams) [gam (slag way grams)]) (pa-refresh num gam) diff --git a/gen/hood/wipe-ford.hoon b/gen/hood/wipe-ford.hoon new file mode 100644 index 000000000..c34b9d9e2 --- /dev/null +++ b/gen/hood/wipe-ford.hoon @@ -0,0 +1,13 @@ +:: Kiln: wipe ford cache +:: +:::: /hoon/wipe-ford/hood/gen + :: +/? 310 +:: +:::: + !: +:- %say +|= $: {now/@da eny/@uvJ bec/beak} + {arg/$~ $~} + == +[%kiln-wipe-ford ~] diff --git a/gen/moon.hoon b/gen/moon.hoon index 5378dc0aa..2d62c55a8 100644 --- a/gen/moon.hoon +++ b/gen/moon.hoon @@ -3,18 +3,35 @@ :::: /hoon/moon/gen :: /? 310 +/- sole +[. sole] :: :::: :: -:- %say +:- %ask |= $: {now/@da eny/@uvJ bec/beak} $~ $~ == -:- %tang :_ ~ :- %leaf -=+ ran=(clan p.bec) +=/ ran (clan p.bec) ?: ?=({?($earl $pawn)} ran) - "can't create a moon from a {?:(?=($earl ran) "moon" "comet")}" -=+ mon=(mix (lsh 5 1 (end 5 1 eny)) p.bec) -=+ tic=.^(@ /a/(scot %p p.bec)/tick/(scot %da now)/(scot %p mon)) -"moon: {<`@p`mon>}; ticket: {<`@p`tic>}" + %- sole-so + :- %tang :_ ~ + leaf+"can't create a moon from a {?:(?=($earl ran) "moon" "comet")}" +=/ mon (mix (lsh 5 1 (end 5 1 eny)) p.bec) +=/ tic .^(@ /a/(scot %p p.bec)/tick/(scot %da now)/(scot %p mon)) +%+ sole-yo + leaf+"(see https://github.com/urbit/arvo/issues/327 for details)" +%+ sole-yo + :- %leaf + ;: weld + "WARNING: linking a moon to your " + ?-(ran $czar "galaxy", $king "star", $duke "planet") + " can cause networking bugs" + == +%+ sole-lo + [& %$ "enter y/yes to continue: "] +|= inp/tape +?. |(=("y" inp) =("yes" inp)) + (sole-so [%tang leaf+"canceled" ~]) +(sole-so [%tang leaf+"moon: {<`@p`mon>}; ticket: {<`@p`tic>}" leaf+"" ~]) diff --git a/gen/ticket.hoon b/gen/ticket.hoon index 22a02409a..ea1cf372d 100644 --- a/gen/ticket.hoon +++ b/gen/ticket.hoon @@ -11,4 +11,6 @@ {{her/@p $~} $~} == :- %noun +~_ leaf+"can't ticket {} (not a child of {})" +?> =(p.bec (sein her)) .^(@p /a/(scot %p p.bec)/tick/(scot %da now)/(scot %p her)) diff --git a/lib/kiln.hoon b/lib/kiln.hoon index bcf6a066a..385494499 100644 --- a/lib/kiln.hoon +++ b/lib/kiln.hoon @@ -260,6 +260,8 @@ |= tym/@dr abet:(emit %wait /kiln/overload/(scot %dr tym) (add ~s10 now)) :: +++ poke-wipe-ford |=($~ abet:(emit %wipe /kiln our ~)) +:: ++ take |=(way/wire ?>(?=({@ $~} way) (work i.way))) :: general handler ++ take-mere :: |= {way/wire are/(each (set path) (pair term tang))} @@ -348,11 +350,14 @@ ++ start-sync |= reset/? =. +>.$ (spam (render "activated sync" sud her syd) ~) - %- blab - :~ :* ost %warp - [%kiln %sync syd (scot %p her) sud ?:(reset /reset /)] - [our her] sud ~ %sing %w [%da now] / - == == + =. +>.$ + %- blab + :~ :* ost %warp + [%kiln %sync syd (scot %p her) sud ?:(reset /reset /)] + [our her] sud ~ %sing %w [%da now] / + == == + ?. =(%home syd) +>.$ :: XX less hard-coding + (blab [ost %mont /mount syd our syd /]~) :: ++ writ |= {reset/? rot/riot} diff --git a/mar/noun.hoon b/mar/noun.hoon new file mode 100644 index 000000000..e80ac367b --- /dev/null +++ b/mar/noun.hoon @@ -0,0 +1,11 @@ +:: +:::: /hoon/noun/mar + :: +/? 310 +!: +:::: A minimal noun mark +|_ non/* +++ grab |% + ++ noun * + -- +-- diff --git a/mar/plan.hoon b/mar/plan.hoon index 162ab4e5a..eba209056 100644 --- a/mar/plan.hoon +++ b/mar/plan.hoon @@ -44,7 +44,8 @@ (malt (turn t.t.a |=(b/cord (rash b account)))) :: ++ user ;~(pfix (jest 'User ') (cook crip (star prn))) - ++ knot (sear (flit |=(a/^knot !=('' a))) urs:ab) + ++ knot %+ cook crip + (plus ;~(pose nud low hig hep dot sig cab)) ++ location ;~(pfix (jest 'Location ') (cook crip (star prn))) ++ account ;~ plug diff --git a/sys/vane/ames.hoon b/sys/vane/ames.hoon index 5e78a9963..62732c308 100644 --- a/sys/vane/ames.hoon +++ b/sys/vane/ames.hoon @@ -291,11 +291,11 @@ 0w0 :: 174, ~hut, Tlon 0w0 :: 175, ~tun, Tlon 0w0 :: 176, ~byl, Tlon - 0w0 :: 177, ~sud, Tlon - 0w0 :: 178, ~pem, Tlon + 0wq.wmRvk.V8tZ5.1lz5q.dbrYx :: 177, ~sud, Tlon + 0w3Q.0LYXy.LjTEu.~FjaT.OpTts :: 178, ~pem, Tlon 0wQ.uJzGo.M94yL.L7yw6.nGyfW :: 179, ~dev, Tlon - 0w0 :: 180, ~lur, Tlon - 0w0 :: 181, ~def, Tlon + 0w1B.LTLDt.3Yu~s.BuzYM.fjcS3 :: 180, ~lur, Tlon + 0w2B.9j6g-.q9DwV.tXzPz.DKEKq :: 181, ~def, Tlon 0w1m.CxbiW.SKF5E.11JQ6.yW~T4 :: 182, ~bus, Tlon 0w0 :: 183, ~bep, Tlon 0w0 :: 184, ~run, Tlon diff --git a/sys/vane/eyre.hoon b/sys/vane/eyre.hoon index 864f40d02..457762dd8 100644 --- a/sys/vane/eyre.hoon +++ b/sys/vane/eyre.hoon @@ -2036,6 +2036,7 @@ ?+ syd [~ ~] $serv ``[%path !>((en-beam top))] + :: $host %- (lift (lift |=(a/hart [%hart !>(a)]))) ^- (unit (unit hart)) diff --git a/web/talk/main.js b/web/talk/main.js index e8ae87584..29781559b 100644 --- a/web/talk/main.js +++ b/web/talk/main.js @@ -778,7 +778,10 @@ module.exports = recl({ case speech.url == null: return speechArr = speech.url.txt.split(/(\s|-)/); case speech.fat == null: - return speech.fat.taf.exp.txt.split(/(\s|-)/); + if (typeof speech.fat.taf.exp !== 'undefined') { return speech.fat.taf.exp.txt.split(/(\s|-)/); } + if (typeof speech.fat.taf.app !== 'undefined') { return speech.fat.taf.app.txt; } + if (typeof speech.fat.taf.lin !== 'undefined') { return speech.fat.taf.lin.txt; } + return "unsupported fat speech"; default: return []; } diff --git a/web/tree/main.js b/web/tree/main.js index d8d0bd5e9..c486548b4 100644 --- a/web/tree/main.js +++ b/web/tree/main.js @@ -470,8 +470,8 @@ extras = { "This page was made by Urbit. Feedback: ", a({ href: "mailto:urbit@urbit.org" }, "urbit@urbit.org"), " ", a({ - href: "https://twitter.com/urbit_" - }, "@urbit_") + href: "https://twitter.com/urbit" + }, "@urbit") ]) ]); }) @@ -1927,6 +1927,9 @@ module.exports = query({ }, onSubmit: function(e) { var comment, path, title; + this.setState({ + loading: true + }); title = this.refs["in"].title.value; comment = this.refs["in"].comment.value; path = this.props.path || "/"; @@ -1939,27 +1942,26 @@ module.exports = query({ }); }, render: function() { - var _attr, bodyTextArea, postButton, titleInput; - _attr = {}; - if (this.state.loading === true) { - _attr.disabled = "true"; - } - titleInput = input(_.create(_attr, { + var bodyTextArea, postButton, titleInput; + titleInput = input({ + disabled: this.state.loading ? "true" : void 0, type: "text", name: "title", placeholder: "Title" - })); - bodyTextArea = textarea(_.create(_attr, { + }); + bodyTextArea = textarea({ + disabled: this.state.loading ? "true" : void 0, type: "text", name: "comment", value: this.state.value, onChange: this.onChange - })); - postButton = input(_.create(_attr, { + }); + postButton = input({ + disabled: this.state.loading ? "true" : void 0, type: "submit", value: "Post", className: "btn btn-primary" - })); + }); return div({}, div({ className: "add-post" }, form({ @@ -2051,7 +2053,7 @@ Virtual = name("Virtual", function(arg) { }, function(str) { return str; }, function(arg1, key) { - var c, e, error, ga, gn, props, ref1; + var c, e, ga, gn, props, ref1; gn = arg1.gn, ga = arg1.ga, c = arg1.c; props = { key: key @@ -2476,7 +2478,7 @@ module.exports = query({ if (this.props.match) { comp = gn === this.props.match; } else { - comp = gn && gn[0] === 'h' && parseInt(gn[1]) !== NaN; + comp = gn && gn[0] === 'h' && parseInt(gn[1]) !== (0/0); } if (comp) { ga = _.clone(ga); @@ -3164,8 +3166,9 @@ module.exports = { if (hor != null) { d.setHours(hor); d.setMinutes(min); - return d.setSeconds(sec); + d.setSeconds(sec); } + return d; }, getKeys: function(kids, sortBy) { return _.map(this.sortKids(kids, sortBy), 'name'); @@ -3345,8 +3348,12 @@ EventEmitter.prototype.emit = function(type) { er = arguments[1]; if (er instanceof Error) { throw er; // Unhandled 'error' event + } else { + // At least give some kind of context to the user + var err = new Error('Uncaught, unspecified "error" event. (' + er + ')'); + err.context = er; + throw err; } - throw TypeError('Uncaught, unspecified "error" event.'); } }