This commit is contained in:
C. Guy Yarvin 2017-10-31 11:08:07 -07:00
commit b7c6567449
14 changed files with 112 additions and 39 deletions

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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)

13
gen/hood/wipe-ford.hoon Normal file
View File

@ -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 ~]

View File

@ -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+"" ~])

View File

@ -11,4 +11,6 @@
{{her/@p $~} $~}
==
:- %noun
~_ leaf+"can't ticket {<her>} (not a child of {<p.bec>})"
?> =(p.bec (sein her))
.^(@p /a/(scot %p p.bec)/tick/(scot %da now)/(scot %p her))

View File

@ -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}

11
mar/noun.hoon Normal file
View File

@ -0,0 +1,11 @@
::
:::: /hoon/noun/mar
::
/? 310
!:
:::: A minimal noun mark
|_ non/*
++ grab |%
++ noun *
--
--

View File

@ -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

View File

@ -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

View File

@ -2036,6 +2036,7 @@
?+ syd [~ ~]
$serv
``[%path !>((en-beam top))]
::
$host
%- (lift (lift |=(a/hart [%hart !>(a)])))
^- (unit (unit hart))

View File

@ -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 [];
}

View File

@ -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.');
}
}