From 15bcbb23e7b4f0f088d84bb47feb86894c017e55 Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Wed, 13 May 2015 18:13:13 -0700 Subject: [PATCH 01/11] cleaning up %base to %home --- base/ape/dojo/core.hook | 4 ++-- base/ape/octo/core.hook | 2 +- base/ape/sole/core.hook | 2 +- base/arvo/dill.hoon | 4 ++-- base/arvo/gall.hoon | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/base/ape/dojo/core.hook b/base/ape/dojo/core.hook index fbe96a538..e56599d47 100644 --- a/base/ape/dojo/core.hook +++ b/base/ape/dojo/core.hook @@ -278,7 +278,7 @@ ++ dy-amok +>(poy ~) :: terminate ++ dy-beak :: XX rethink ^- beak - [our.hid %base [%da lat.hid]] + [our.hid %home [%da lat.hid]] :: ++ dy-ford :: send work to ford |= [way=wire kas=silk] @@ -726,7 +726,7 @@ :- [ost ~] ^- session :* *sole-share :: say=sole-share - %base :: syd=desk + %home :: syd=desk ~ :: luc=(unit case) ~ :: poy=(unit dojo-project) ~ :: var=(map term cage) diff --git a/base/ape/octo/core.hook b/base/ape/octo/core.hook index e49722fae..1b6a2c61b 100644 --- a/base/ape/octo/core.hook +++ b/base/ape/octo/core.hook @@ -165,7 +165,7 @@ %0 +>(eye.+< eye.+>.old, gam.+< gam.+>.old):: == :: ++ pull-octo :: - |= [from ~] =< abet :: + |= [from *] =< abet :: (park(but ~) %0 `"dropped") :: ++ pull-sole :: disconnect console |= [from *] =< abet :: diff --git a/base/ape/sole/core.hook b/base/ape/sole/core.hook index fde899d5b..2dd6b1939 100644 --- a/base/ape/sole/core.hook +++ b/base/ape/sole/core.hook @@ -199,7 +199,7 @@ |= gyl=gill ^+ +> =. +> ?. =(p.gyl src) +> - (se-emit ost %conf (se-path gyl) gyl %load src %base) + (se-emit ost %conf (se-path gyl) gyl %load src %home) (se-join:(se-peer gyl /sole) gyl) :: ++ se-blit :: give output diff --git a/base/arvo/dill.hoon b/base/arvo/dill.hoon index 98426399c..2c4e7262b 100644 --- a/base/arvo/dill.hoon +++ b/base/arvo/dill.hoon @@ -184,7 +184,7 @@ =+ myt=(flop (need tem)) =. tem ~ =. moz :_(moz [hen %pass / %c %font our %home our %base]) - =. moz :_(moz [hen %pass ~ %g %conf [[our ram] %load our %base]]) + =. moz :_(moz [hen %pass ~ %g %conf [[our ram] %load our %home]]) =. moz :_(moz [hen %pass ~ %g %deal [our our] ram %peer ~]) |- ^+ +> ?~ myt +> @@ -200,7 +200,7 @@ %pass / %c - [%warp [our our] %base `[%sing %y [%ud 1] /]] + [%warp [our our] %home `[%sing %y [%ud 1] /]] == == :: diff --git a/base/arvo/gall.hoon b/base/arvo/gall.hoon index 750cd53b3..43d09368c 100644 --- a/base/arvo/gall.hoon +++ b/base/arvo/gall.hoon @@ -398,7 +398,7 @@ ^- beak :: =+ pup=pup:(~(got by bum) dap) :: [p.pup q.pup [%da now]] :: XX this is wrong; save the build case - [our %base %da now] :: XX really wrong + [our %home %da now] :: XX really wrong :: ++ mo-club :: local action |= [dap=dude pry=prey cub=club] From ab48a5f0f12598d460d80e8fd02bce52bd3a44f5 Mon Sep 17 00:00:00 2001 From: Galen Wolfe-Pauly Date: Thu, 14 May 2015 12:21:13 -0700 Subject: [PATCH 02/11] path out of talk --- base/pub/talk/fab/hymn.hook | 4 +- .../src/js/components/StationComponent.coffee | 2 +- base/pub/talk/src/js/main.js | 162 ++++++++++-------- 3 files changed, 98 insertions(+), 70 deletions(-) diff --git a/base/pub/talk/fab/hymn.hook b/base/pub/talk/fab/hymn.hook index d8c1cdebd..83357f06d 100644 --- a/base/pub/talk/fab/hymn.hook +++ b/base/pub/talk/fab/hymn.hook @@ -25,11 +25,11 @@ ;script(type "text/javascript", src "/~~/~/at/base/lib/urb.js"); ;meta(name "viewport", content "width=device-width, height=device-height, ". "initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0"); - ;link(type "text/css", rel "stylesheet", href "/base/pub/talk/src/css/main.css"); + ;link(type "text/css", rel "stylesheet", href "/home/pub/talk/src/css/main.css"); ;title: urbit talk == ;body ;div#c; - ;script(type "text/javascript", src "/base/pub/talk/src/js/main.js"); + ;script(type "text/javascript", src "/home/pub/talk/src/js/main.js"); == == diff --git a/base/pub/talk/src/js/components/StationComponent.coffee b/base/pub/talk/src/js/components/StationComponent.coffee index ed9d7200a..810d7d26c 100644 --- a/base/pub/talk/src/js/components/StationComponent.coffee +++ b/base/pub/talk/src/js/components/StationComponent.coffee @@ -95,7 +95,7 @@ module.exports = recl ]) (div {id:"where"},[ (div {className:"slat"},"talk") - (div {className:"path"},window.util.mainStation(window.urb.user)) + (div {className:"path"},"") #window.util.mainStation(window.urb.user)) (div {className:"caret"},"") ]) ] diff --git a/base/pub/talk/src/js/main.js b/base/pub/talk/src/js/main.js index 9c44f6add..9a30503a1 100644 --- a/base/pub/talk/src/js/main.js +++ b/base/pub/talk/src/js/main.js @@ -615,7 +615,7 @@ module.exports = recl({ className: "slat" }, "talk"), div({ className: "path" - }, window.util.mainStation(window.urb.user)), div({ + }, ""), div({ className: "caret" }, "") ]) @@ -2380,7 +2380,7 @@ moment.tz.load(require('./data/packed/latest.json')); },{"moment":"/Users/galen/Documents/src/urbit-test/urb/zod/base/pub/talk/src/js/node_modules/moment-timezone/node_modules/moment/moment.js"}],"/Users/galen/Documents/src/urbit-test/urb/zod/base/pub/talk/src/js/node_modules/moment-timezone/node_modules/moment/moment.js":[function(require,module,exports){ //! moment.js -//! version : 2.10.2 +//! version : 2.10.3 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com @@ -2403,28 +2403,12 @@ moment.tz.load(require('./data/packed/latest.json')); hookCallback = callback; } - function defaultParsingFlags() { - // We need to deep clone this object. - return { - empty : false, - unusedTokens : [], - unusedInput : [], - overflow : -2, - charsLeftOver : 0, - nullInput : false, - invalidMonth : null, - invalidFormat : false, - userInvalidated : false, - iso : false - }; - } - function isArray(input) { return Object.prototype.toString.call(input) === '[object Array]'; } function isDate(input) { - return Object.prototype.toString.call(input) === '[object Date]' || input instanceof Date; + return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'; } function map(arr, fn) { @@ -2461,21 +2445,45 @@ moment.tz.load(require('./data/packed/latest.json')); return createLocalOrUTC(input, format, locale, strict, true).utc(); } + function defaultParsingFlags() { + // We need to deep clone this object. + return { + empty : false, + unusedTokens : [], + unusedInput : [], + overflow : -2, + charsLeftOver : 0, + nullInput : false, + invalidMonth : null, + invalidFormat : false, + userInvalidated : false, + iso : false + }; + } + + function getParsingFlags(m) { + if (m._pf == null) { + m._pf = defaultParsingFlags(); + } + return m._pf; + } + function valid__isValid(m) { if (m._isValid == null) { + var flags = getParsingFlags(m); m._isValid = !isNaN(m._d.getTime()) && - m._pf.overflow < 0 && - !m._pf.empty && - !m._pf.invalidMonth && - !m._pf.nullInput && - !m._pf.invalidFormat && - !m._pf.userInvalidated; + flags.overflow < 0 && + !flags.empty && + !flags.invalidMonth && + !flags.nullInput && + !flags.invalidFormat && + !flags.userInvalidated; if (m._strict) { m._isValid = m._isValid && - m._pf.charsLeftOver === 0 && - m._pf.unusedTokens.length === 0 && - m._pf.bigHour === undefined; + flags.charsLeftOver === 0 && + flags.unusedTokens.length === 0 && + flags.bigHour === undefined; } } return m._isValid; @@ -2484,10 +2492,10 @@ moment.tz.load(require('./data/packed/latest.json')); function valid__createInvalid (flags) { var m = create_utc__createUTC(NaN); if (flags != null) { - extend(m._pf, flags); + extend(getParsingFlags(m), flags); } else { - m._pf.userInvalidated = true; + getParsingFlags(m).userInvalidated = true; } return m; @@ -2523,7 +2531,7 @@ moment.tz.load(require('./data/packed/latest.json')); to._offset = from._offset; } if (typeof from._pf !== 'undefined') { - to._pf = from._pf; + to._pf = getParsingFlags(from); } if (typeof from._locale !== 'undefined') { to._locale = from._locale; @@ -2558,7 +2566,7 @@ moment.tz.load(require('./data/packed/latest.json')); } function isMoment (obj) { - return obj instanceof Moment || (obj != null && hasOwnProp(obj, '_isAMomentObject')); + return obj instanceof Moment || (obj != null && obj._isAMomentObject != null); } function toInt(argumentForCoercion) { @@ -2996,7 +3004,7 @@ moment.tz.load(require('./data/packed/latest.json')); if (month != null) { array[MONTH] = month; } else { - config._pf.invalidMonth = input; + getParsingFlags(config).invalidMonth = input; } }); @@ -3080,7 +3088,7 @@ moment.tz.load(require('./data/packed/latest.json')); var overflow; var a = m._a; - if (a && m._pf.overflow === -2) { + if (a && getParsingFlags(m).overflow === -2) { overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : @@ -3090,11 +3098,11 @@ moment.tz.load(require('./data/packed/latest.json')); a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1; - if (m._pf._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { + if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { overflow = DATE; } - m._pf.overflow = overflow; + getParsingFlags(m).overflow = overflow; } return m; @@ -3107,10 +3115,12 @@ moment.tz.load(require('./data/packed/latest.json')); } function deprecate(msg, fn) { - var firstTime = true; + var firstTime = true, + msgWithStack = msg + '\n' + (new Error()).stack; + return extend(function () { if (firstTime) { - warn(msg); + warn(msgWithStack); firstTime = false; } return fn.apply(this, arguments); @@ -3155,7 +3165,7 @@ moment.tz.load(require('./data/packed/latest.json')); match = from_string__isoRegex.exec(string); if (match) { - config._pf.iso = true; + getParsingFlags(config).iso = true; for (i = 0, l = isoDates.length; i < l; i++) { if (isoDates[i][1].exec(string)) { // match[5] should be 'T' or undefined @@ -3435,7 +3445,7 @@ moment.tz.load(require('./data/packed/latest.json')); yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); if (config._dayOfYear > daysInYear(yearToUse)) { - config._pf._overflowDayOfYear = true; + getParsingFlags(config)._overflowDayOfYear = true; } date = createUTCDate(yearToUse, 0, config._dayOfYear); @@ -3531,7 +3541,7 @@ moment.tz.load(require('./data/packed/latest.json')); } config._a = []; - config._pf.empty = true; + getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC` var string = '' + config._i, @@ -3547,7 +3557,7 @@ moment.tz.load(require('./data/packed/latest.json')); if (parsedInput) { skipped = string.substr(0, string.indexOf(parsedInput)); if (skipped.length > 0) { - config._pf.unusedInput.push(skipped); + getParsingFlags(config).unusedInput.push(skipped); } string = string.slice(string.indexOf(parsedInput) + parsedInput.length); totalParsedInputLength += parsedInput.length; @@ -3555,27 +3565,29 @@ moment.tz.load(require('./data/packed/latest.json')); // don't parse if it's not a known token if (formatTokenFunctions[token]) { if (parsedInput) { - config._pf.empty = false; + getParsingFlags(config).empty = false; } else { - config._pf.unusedTokens.push(token); + getParsingFlags(config).unusedTokens.push(token); } addTimeToArrayFromToken(token, parsedInput, config); } else if (config._strict && !parsedInput) { - config._pf.unusedTokens.push(token); + getParsingFlags(config).unusedTokens.push(token); } } // add remaining unparsed input length to the string - config._pf.charsLeftOver = stringLength - totalParsedInputLength; + getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; if (string.length > 0) { - config._pf.unusedInput.push(string); + getParsingFlags(config).unusedInput.push(string); } // clear _12h flag if hour is <= 12 - if (config._pf.bigHour === true && config._a[HOUR] <= 12) { - config._pf.bigHour = undefined; + if (getParsingFlags(config).bigHour === true && + config._a[HOUR] <= 12 && + config._a[HOUR] > 0) { + getParsingFlags(config).bigHour = undefined; } // handle meridiem config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); @@ -3619,7 +3631,7 @@ moment.tz.load(require('./data/packed/latest.json')); currentScore; if (config._f.length === 0) { - config._pf.invalidFormat = true; + getParsingFlags(config).invalidFormat = true; config._d = new Date(NaN); return; } @@ -3630,7 +3642,6 @@ moment.tz.load(require('./data/packed/latest.json')); if (config._useUTC != null) { tempConfig._useUTC = config._useUTC; } - tempConfig._pf = defaultParsingFlags(); tempConfig._f = config._f[i]; configFromStringAndFormat(tempConfig); @@ -3639,12 +3650,12 @@ moment.tz.load(require('./data/packed/latest.json')); } // if there is any input that was not parsed add a penalty for that format - currentScore += tempConfig._pf.charsLeftOver; + currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens - currentScore += tempConfig._pf.unusedTokens.length * 10; + currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; - tempConfig._pf.score = currentScore; + getParsingFlags(tempConfig).score = currentScore; if (scoreToBeat == null || currentScore < scoreToBeat) { scoreToBeat = currentScore; @@ -3687,6 +3698,8 @@ moment.tz.load(require('./data/packed/latest.json')); configFromStringAndArray(config); } else if (format) { configFromStringAndFormat(config); + } else if (isDate(input)) { + config._d = input; } else { configFromInput(config); } @@ -3739,7 +3752,6 @@ moment.tz.load(require('./data/packed/latest.json')); c._i = input; c._f = format; c._strict = strict; - c._pf = defaultParsingFlags(); return createFromConfig(c); } @@ -4313,6 +4325,9 @@ moment.tz.load(require('./data/packed/latest.json')); } function from (time, withoutSuffix) { + if (!this.isValid()) { + return this.localeData().invalidDate(); + } return create__createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix); } @@ -4320,6 +4335,17 @@ moment.tz.load(require('./data/packed/latest.json')); return this.from(local__createLocal(), withoutSuffix); } + function to (time, withoutSuffix) { + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + return create__createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix); + } + + function toNow (withoutSuffix) { + return this.to(local__createLocal(), withoutSuffix); + } + function locale (key) { var newLocaleData; @@ -4422,11 +4448,11 @@ moment.tz.load(require('./data/packed/latest.json')); } function parsingFlags () { - return extend({}, this._pf); + return extend({}, getParsingFlags(this)); } function invalidAt () { - return this._pf.overflow; + return getParsingFlags(this).overflow; } addFormatToken(0, ['gg', 2], 0, function () { @@ -4577,7 +4603,7 @@ moment.tz.load(require('./data/packed/latest.json')); if (weekday != null) { week.d = weekday; } else { - config._pf.invalidWeekday = input; + getParsingFlags(config).invalidWeekday = input; } }); @@ -4702,7 +4728,7 @@ moment.tz.load(require('./data/packed/latest.json')); }); addParseToken(['h', 'hh'], function (input, array, config) { array[HOUR] = toInt(input); - config._pf.bigHour = true; + getParsingFlags(config).bigHour = true; }); // LOCALES @@ -4819,6 +4845,8 @@ moment.tz.load(require('./data/packed/latest.json')); momentPrototype__proto.format = format; momentPrototype__proto.from = from; momentPrototype__proto.fromNow = fromNow; + momentPrototype__proto.to = to; + momentPrototype__proto.toNow = toNow; momentPrototype__proto.get = getSet; momentPrototype__proto.invalidAt = invalidAt; momentPrototype__proto.isAfter = isAfter; @@ -5007,7 +5035,7 @@ moment.tz.load(require('./data/packed/latest.json')); } // Lenient ordinal parsing accepts just a number in addition to // number + (possibly) stuff coming from _ordinalParseLenient. - this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + /\d{1,2}/.source); + this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + (/\d{1,2}/).source); } var prototype__proto = Locale.prototype; @@ -5224,13 +5252,13 @@ moment.tz.load(require('./data/packed/latest.json')); // handle milliseconds separately because of floating point math errors (issue #1867) days = this._days + Math.round(yearsToDays(this._months / 12)); switch (units) { - case 'week' : return days / 7 + milliseconds / 6048e5; - case 'day' : return days + milliseconds / 864e5; - case 'hour' : return days * 24 + milliseconds / 36e5; - case 'minute' : return days * 24 * 60 + milliseconds / 6e4; - case 'second' : return days * 24 * 60 * 60 + milliseconds / 1000; + case 'week' : return days / 7 + milliseconds / 6048e5; + case 'day' : return days + milliseconds / 864e5; + case 'hour' : return days * 24 + milliseconds / 36e5; + case 'minute' : return days * 1440 + milliseconds / 6e4; + case 'second' : return days * 86400 + milliseconds / 1000; // Math.floor prevents floating point math errors here - case 'millisecond': return Math.floor(days * 24 * 60 * 60 * 1000) + milliseconds; + case 'millisecond': return Math.floor(days * 864e5) + milliseconds; default: throw new Error('Unknown unit ' + units); } } @@ -5431,7 +5459,7 @@ moment.tz.load(require('./data/packed/latest.json')); // Side effect imports - utils_hooks__hooks.version = '2.10.2'; + utils_hooks__hooks.version = '2.10.3'; setHookCallback(local__createLocal); From 6656d492830e567d1ca9cf83943693c16aed4712 Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Thu, 14 May 2015 13:13:45 -0700 Subject: [PATCH 03/11] switchable websole v1 --- base/arvo/dill.hoon | 2 +- base/lib/sole/core.hook | 2 +- base/pub/sole/fab/hymn.hook | 2 +- base/pub/sole/src/main.coffee | 77 +++++++++++++++++++++++++++-------- 4 files changed, 63 insertions(+), 20 deletions(-) diff --git a/base/arvo/dill.hoon b/base/arvo/dill.hoon index 2c4e7262b..1ff1c10b5 100644 --- a/base/arvo/dill.hoon +++ b/base/arvo/dill.hoon @@ -200,7 +200,7 @@ %pass / %c - [%warp [our our] %home `[%sing %y [%ud 1] /]] + [%warp [our our] %base `[%sing %y [%ud 1] /]] == == :: diff --git a/base/lib/sole/core.hook b/base/lib/sole/core.hook index 00b1af625..0f082cf1f 100644 --- a/base/lib/sole/core.hook +++ b/base/lib/sole/core.hook @@ -64,7 +64,7 @@ ?- -.dex %del ?:((lte p.sin p.dex) dex(p +(p.dex)) dex) %ins ?: =(p.sin p.dex) - ?:((gth q.sin q.dex) dex dex(p +(p.dex))) + ?:((lth q.sin q.dex) dex dex(p +(p.dex))) ?:((lte p.sin p.dex) dex(p +(p.dex)) dex) == == diff --git a/base/pub/sole/fab/hymn.hook b/base/pub/sole/fab/hymn.hook index 90e69afc4..51764f680 100644 --- a/base/pub/sole/fab/hymn.hook +++ b/base/pub/sole/fab/hymn.hook @@ -18,7 +18,7 @@ "mousetrap/1.4.6/mousetrap.js" "react/0.11.0/react.js" == - ;script(src "/~/at/base/lib/urb.js"); + ;script(src "{(spud /~~/~/at/[&2:%]/lib/'urb.js')}"); ;script: urb.appl = 'dojo' ;style:''' #term { diff --git a/base/pub/sole/src/main.coffee b/base/pub/sole/src/main.coffee index 3533418c7..a6c160af8 100644 --- a/base/pub/sole/src/main.coffee +++ b/base/pub/sole/src/main.coffee @@ -3,13 +3,17 @@ str = JSON.stringify Prompt = recl render: -> - [pro,cur,buf] = [@props.prompt, @props.cursor, @props.input + " "] + [pro,cur,buf] = [@props.appl+@props.prompt[@props.appl], @props.cursor, @props.input + " "] pre {}, pro, span {style: background: 'lightgray'}, buf.slice(0,cur), "\u0332", buf.slice(cur) Matr = recl render: -> lines = @props.rows.map (lin)-> pre {}, lin, " " - lines.push Prompt {prompt:@props.prompt, input:@props.input, cursor:@props.cursor} + lines.push Prompt + appl: @props.appl, + prompt: @props.prompt, + input: @props.input, + cursor: @props.cursor div {}, lines $ -> @@ -42,7 +46,8 @@ $ -> matr = rend (Matr rows:[] - prompt:"" + appl:"" + prompt:{"": "# "} input:"" cursor:0 history:[] @@ -51,17 +56,24 @@ $ -> update = (a) -> matr.setProps a buffer = new Share "" window.buffer = buffer + choose = (appl)-> urb.appl = appl; update {appl} + print = (txt)-> update rows: [matr.props.rows..., txt] sync = (ted)-> update input: buffer.buf, cursor: buffer.transpose ted, matr.props.cursor - - peer = (ruh) -> - if ruh.map then return ruh.map peer + updPrompt = (app,pro) -> + prompt = $.extend {}, matr.props.prompt + if pro? then prompt[app] = pro else delete prompt[app] + update {prompt} + + peer = (ruh,app) -> + app ?= urb.appl + if ruh.map then return ruh.map (rul)-> peer rul, app mapr = matr.props switch Object.keys(ruh)[0] - when 'txt' then update rows: [mapr.rows..., ruh.txt] - when 'tan' then ruh.tan.split("\n").reverse().map (txt)-> peer {txt} + when 'txt' then print ruh.txt + when 'tan' then ruh.tan.split("\n").reverse().map print + when 'pro' then updPrompt app, ruh.pro.cad when 'hop' then update cursor: ruh.hop; bell() # XX buffer.transpose? - when 'pro' then update prompt: ruh.pro.cad when 'blk' then console.log "Stub #{str ruh}" when 'det' then buffer.receive ruh.det; sync ruh.det.ted when 'act' then switch ruh.act @@ -77,11 +89,26 @@ $ -> # else throw "Unknown "+(JSON.stringify ruh) else v = Object.keys(ruh); console.log v, ruh[v[0]] - urb.bind "/sole", {wire:"/"}, (err,d)-> - if err then console.log err - else if d.data then peer d.data - - + join = (app)-> + if matr.props.prompt[app]? + return print '# already-joined: '+app + choose app + updPrompt "", null + urb.bind "/sole", {wire:"/"}, (err,d)-> + if err then console.log err + else if d.data then peer d.data, app + cycle = ()-> + apps = Object.keys matr.props.prompt + update appl: apps[1 + apps.indexOf matr.props.appl] ? apps[0] + part = (appl)-> + unless matr.props.prompt[app]? + return print '# not-joined: '+app + urb.unsubscribe {appl, path: "/sole", wire: "/"} + if appl is matr.props.appl then cycle() + updPrompt appl, null + join urb.appl + window.join = join; window.part = part + pressed = [] deltim = null #later = (data)-> @@ -96,9 +123,17 @@ $ -> # ), 500 sendAction = (data)-> - urb.send {mark: 'sole-action', data}, (e,res)-> + if urb.appl then urb.send {mark: 'sole-action', data}, (e,res)-> if res.status isnt 200 then $('#err')[0].innerText = res.data.mess - + else if data is 'ret' + app = /^[a-z-]+$/.exec(buffer.buf.slice(1)) + unless app? + return bell() + else switch buffer.buf[0] + when '+' then join app + when '-' then part app + else bell() + doEdit = (ted)-> det = buffer.transmit ted sync ted @@ -141,13 +176,21 @@ $ -> when 'a','left' then update cursor: 0 when 'e','right' then update cursor: mapr.input.length when 'l' then update rows: [] - when 'entr' then peer act: 'bel' + when 'entr' then bell() when 'w' then eatKyev ['alt'], act:'baxp' when 'p' then eatKyev [], act: 'up' when 'n' then eatKyev [], act: 'down' when 'b' then eatKyev [], act: 'left' when 'f' then eatKyev [], act: 'right' when 'g' then bell() + when 'x' then cycle() + when 'v' + if mapr.appl = "" + updPrompt "", null + cycle() + apps = Object.keys mapr.prompt + updPrompt "", (apps.join ", ")+'# ' + choose '' when 't' if mapr.cursor is 0 or mapr.input.length < 2 return bell() From ee4a39d600e3a6262c6f9a146ae8883f7ea35bab Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Thu, 14 May 2015 16:28:25 -0400 Subject: [PATCH 04/11] sped up merges --- base/arvo/clay.hoon | 64 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 54 insertions(+), 10 deletions(-) diff --git a/base/arvo/clay.hoon b/base/arvo/clay.hoon index e6b5de048..05ca6d1eb 100644 --- a/base/arvo/clay.hoon +++ b/base/arvo/clay.hoon @@ -865,8 +865,8 @@ !! :: %x - =< ?> ?=(^ ref) . - (rand-to-rant u.rut) + =< ?>(?=(^ ref) .) + (validate-x p.p.u.rut q.p.u.rut q.u.rut r.u.rut) :: %w =. haw.u.ref @@ -933,6 +933,27 @@ :: == :: == :: + ++ validate-x + |= [car=care cas=case pax=path peg=page] + ^+ +> + =- %_(+>.$ tag [- tag]) + :* hen %pass + [%foreign-x (scot %p who) (scot %p for) syd car (scot cas) pax] + %f %exec who [for syd cas] ~ + %vale p.peg for q.peg + == + :: + ++ take-foreign-x + |= [car=care cas=case pax=path res=(each gage tang)] + ^+ +> + ?> ?=(^ ref) + ?: ?=(%| -.res) + ~| "validate foreign plops failed" + ~| [%plop-fail (turn p.res |=(tank ~(ram re +<)))] + !! + ?> ?=(@ p.p.res) + wake(haw.u.ref (~(put by haw.u.ref) [car cas pax] `p.res)) + :: ++ validate-plops |= [cas=case pop=(set plop)] ^+ +> @@ -1572,7 +1593,7 @@ ^+ ..me ?: don ..me(mer (~(put by mer) ali dat)) - ..me(mer (~(del by mer) ali), reg :_(reg [hen %mere gon.dat])) + ze:wake(mer (~(del by mer) ali), reg :_(reg [hen %mere gon.dat])) :: ++ route |= [sat=term res=(each riot (each gage tang))] @@ -2097,7 +2118,7 @@ ?~ cay ~ `[pax u.cay] - =^ hat lat.ran :: new content + =^ hot lat.ran :: new content ^- [(map path lobe) (map lobe blob)] %+ roll (~(tap by can)) =< .(lat lat.ran) @@ -2112,13 +2133,13 @@ [(lobe-to-mark u.-) u.-] [p q.q]:cay [(~(put by hat) pax p.bol) (~(put by lat) p.bol bol)] - =. hat :: all the content + =+ ^- hat=(map path lobe) :: all the content %- ~(uni by old) %- ~(uni by new.dal.dat) %- ~(uni by new.dob.dat) %- ~(uni by cal.dal.dat) %- ~(uni by cal.dob.dat) - %- ~(uni by hat) + %- ~(uni by hot) cas =+ ^- del=(map path ,?) (~(run by (~(uni by old.dal.dat) old.dob.dat)) |=(~ %|)) @@ -2127,7 +2148,13 @@ (make-yaki [r.ali.dat r.bob.dat ~] hat now) =. hut.ran (~(put by hut.ran) r.new.dat new.dat) =. erg.dat %- ~(uni by del) - `(map path ,?)`(~(run by hat) |=(lobe %&)) + ^- (map path ,?) + %. |=(lobe %&) + %~ run by + %- ~(uni by new.dal.dat) + %- ~(uni by cal.dal.dat) + hot + ~& [%mate-erg erg.dat] checkout :: ++ checkout @@ -2594,8 +2621,7 @@ =* sud i.t.t.t.t.tea =* sat i.t.t.t.t.t.tea =+ une=(un our now hen ruf) - =+ wak=wake:une - =+ wex=(di:wak syd) + =+ wex=(di:une syd) =+ dat=?-(+<.q.hin %writ [%& p.q.hin], %made [%| q.q.hin]) =+ ^- kan=(unit ankh) %+ biff (~(get by fat.ruf) her) @@ -2605,7 +2631,7 @@ ank.dom =+ wao=abet:(route:(me:ze:wex [her sud] kan) sat dat) =+ woo=abet:wao - [(weld -.wak -.woo) ..^$(ruf abet:(pish:une syd +.woo ran.wao))] + [-.woo ..^$(ruf abet:(pish:une syd +.woo ran.wao))] ?: ?=([%auto @ @ @ @ ~] tea) =+ our=(slav %p i.t.tea) =* syd i.t.t.tea @@ -2764,6 +2790,24 @@ =+ zot=abet.zat [-.zot (posh her syd +.zot ruf)] [mos ..^$(ran.ruf ran.zat)] + :: + %foreign-x + ?> ?=([@ @ @ @ @ *] t.tea) + =+ our=(slav %p i.t.tea) + =+ her=(slav %p i.t.t.tea) + =+ syd=(slav %tas i.t.t.t.tea) + =+ car=((hard care) i.t.t.t.t.tea) + =+ ^- cas=case + =+ (slay i.t.t.t.t.t.tea) + ?> ?=([~ %$ case] -) + ->+ + =* pax t.t.t.t.t.t.tea + =+ zax=(do now hen [our her] syd ruf) + =+ zat=(take-foreign-x:zax car cas pax q.q.hin) + =^ mos ruf + =+ zot=abet.zat + [-.zot (posh her syd +.zot ruf)] + [mos ..^$(ran.ruf ran.zat)] == :: %mere !! From 64d6e9696ee0f720d9559371239fa4b5a1641fc4 Mon Sep 17 00:00:00 2001 From: Galen Wolfe-Pauly Date: Thu, 14 May 2015 13:57:12 -0700 Subject: [PATCH 05/11] full talk name --- base/pub/talk/src/css/main.css | 3 ++- base/pub/talk/src/css/main.styl | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/base/pub/talk/src/css/main.css b/base/pub/talk/src/css/main.css index 5594e515b..04e8b975a 100644 --- a/base/pub/talk/src/css/main.css +++ b/base/pub/talk/src/css/main.css @@ -471,7 +471,7 @@ a { display: block; } .iden > div { - max-width: 10rem; + max-width: 11rem; display: inline-block; } .iden > div, @@ -536,6 +536,7 @@ a { } .writing .iden .ship { margin-right: 0.3rem; + letter-spacing: 0; } #audi { display: inline-block; diff --git a/base/pub/talk/src/css/main.styl b/base/pub/talk/src/css/main.styl index dfe505843..5c9f488e7 100644 --- a/base/pub/talk/src/css/main.styl +++ b/base/pub/talk/src/css/main.styl @@ -421,7 +421,7 @@ a display block .iden > div - max-width 10rem + max-width 11rem display inline-block .iden > div @@ -491,6 +491,7 @@ a .writing .iden .ship margin-right .3rem + letter-spacing 0 #audi display inline-block From 94aa7c7678ab28f14e982ef0094b737d48c6ea23 Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Thu, 14 May 2015 14:59:45 -0700 Subject: [PATCH 06/11] switching sole --- base/arvo/eyre.hoon | 3 +- base/lib/urb.js | 3 +- base/pub/sole/src/main.coffee | 62 ++++++++++++++++++++--------------- 3 files changed, 39 insertions(+), 29 deletions(-) diff --git a/base/arvo/eyre.hoon b/base/arvo/eyre.hoon index 32e824a8c..741e2ed11 100644 --- a/base/arvo/eyre.hoon +++ b/base/arvo/eyre.hoon @@ -1133,7 +1133,8 @@ :: ++ del-subs :: XX per path? |= [a=dock %json b=wire c=path] ^+ ..ix - (hurl-note [a b] [%g %deal [him -.a] +.a %pull ~]) + =. ..ix (hurl-note [a b] [%g %deal [him -.a] +.a %pull ~]) + (nice-json:pop-duct:(ire-ix ire)) :: XX gall ack :: ++ get-rush |= [a=whir-of b=json] ^+ ..ix diff --git a/base/lib/urb.js b/base/lib/urb.js index bd528dc6f..215d39ef4 100644 --- a/base/lib/urb.js +++ b/base/lib/urb.js @@ -244,12 +244,11 @@ window.urb.unsubscribe = function(params,cb) { if(!params.path) throw new Error("You must specify a path for urb.unsubscribe.") if(!params.appl) throw new Error("You must specify an appl for urb.unsubscribe.") - if(!cb) throw new Error("You must supply a callback to urb.unsubscribe.") url = "/~/is/"+this.gsig(params)+".json" method = "delete" this.req("delete",url,params,true,function(err,res) { - cb(err,res) + if(cb) cb(err,res) }) } diff --git a/base/pub/sole/src/main.coffee b/base/pub/sole/src/main.coffee index a6c160af8..3a153e3fb 100644 --- a/base/pub/sole/src/main.coffee +++ b/base/pub/sole/src/main.coffee @@ -3,8 +3,8 @@ str = JSON.stringify Prompt = recl render: -> - [pro,cur,buf] = [@props.appl+@props.prompt[@props.appl], @props.cursor, @props.input + " "] - pre {}, pro, + [pro,cur,buf] = [@props.prompt[@props.appl] ? "X", @props.cursor, @props.input + " "] + pre {}, @props.appl+pro, span {style: background: 'lightgray'}, buf.slice(0,cur), "\u0332", buf.slice(cur) Matr = recl render: -> @@ -54,17 +54,28 @@ $ -> offset:0 ), term window.matr = matr update = (a) -> matr.setProps a - buffer = new Share "" + buffer = "": new Share "" window.buffer = buffer - choose = (appl)-> urb.appl = appl; update {appl} + choose = (appl)-> + urb.appl = appl + buffer[appl] ?= new Share "" + updPrompt '', null + update {appl, cursor: 0, input: buffer[appl].buf} print = (txt)-> update rows: [matr.props.rows..., txt] - sync = (ted)-> - update input: buffer.buf, cursor: buffer.transpose ted, matr.props.cursor + sync = (ted,app)-> + app ?= matr.props.appl + if app isnt matr.props.appl then return + b = buffer[app] + update input: b.buf, cursor: b.transpose ted, matr.props.cursor updPrompt = (app,pro) -> prompt = $.extend {}, matr.props.prompt if pro? then prompt[app] = pro else delete prompt[app] update {prompt} - + sysStatus = ()-> updPrompt '', ( + [app,pro] = [matr.props.appl, (k for k,v of matr.props.prompt when k isnt '')] + if app is '' then (pro.join ', ')+'# ' else null + ) + peer = (ruh,app) -> app ?= urb.appl if ruh.map then return ruh.map (rul)-> peer rul, app @@ -75,7 +86,7 @@ $ -> when 'pro' then updPrompt app, ruh.pro.cad when 'hop' then update cursor: ruh.hop; bell() # XX buffer.transpose? when 'blk' then console.log "Stub #{str ruh}" - when 'det' then buffer.receive ruh.det; sync ruh.det.ted + when 'det' then buffer[app].receive ruh.det; sync ruh.det.ted, app when 'act' then switch ruh.act when 'clr' then update rows:[] when 'bel' then bell() @@ -93,19 +104,21 @@ $ -> if matr.props.prompt[app]? return print '# already-joined: '+app choose app - updPrompt "", null urb.bind "/sole", {wire:"/"}, (err,d)-> if err then console.log err else if d.data then peer d.data, app cycle = ()-> apps = Object.keys matr.props.prompt - update appl: apps[1 + apps.indexOf matr.props.appl] ? apps[0] + if apps.length < 2 then return + choose apps[1 + apps.indexOf urb.appl] ? apps[0] part = (appl)-> - unless matr.props.prompt[app]? - return print '# not-joined: '+app + mapr = matr.props + unless mapr.prompt[appl]? + return print '# not-joined: '+appl urb.unsubscribe {appl, path: "/sole", wire: "/"} - if appl is matr.props.appl then cycle() + if appl is mapr.appl then cycle() updPrompt appl, null + sysStatus() join urb.appl window.join = join; window.part = part @@ -123,19 +136,19 @@ $ -> # ), 500 sendAction = (data)-> - if urb.appl then urb.send {mark: 'sole-action', data}, (e,res)-> + if matr.props.appl then urb.send {mark: 'sole-action', data}, (e,res)-> if res.status isnt 200 then $('#err')[0].innerText = res.data.mess else if data is 'ret' - app = /^[a-z-]+$/.exec(buffer.buf.slice(1)) - unless app? + app = /^[a-z-]+$/.exec(buffer[""].buf.slice(1)) + unless app? and app[0]? return bell() - else switch buffer.buf[0] - when '+' then join app - when '-' then part app + else switch buffer[""].buf[0] + when '+' then doEdit set: ""; join app[0] + when '-' then doEdit set: ""; part app[0] else bell() doEdit = (ted)-> - det = buffer.transmit ted + det = buffer[matr.props.appl].transmit ted sync ted sendAction {det} @@ -185,12 +198,9 @@ $ -> when 'g' then bell() when 'x' then cycle() when 'v' - if mapr.appl = "" - updPrompt "", null - cycle() - apps = Object.keys mapr.prompt - updPrompt "", (apps.join ", ")+'# ' - choose '' + appl = if mapr.appl isnt '' then '' else urb.appl + update {appl, cursor:0, input:buffer[appl].buf} + sysStatus() when 't' if mapr.cursor is 0 or mapr.input.length < 2 return bell() From 8ba1b0ccf399ff271386346957af1bc9d96d4c8e Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Thu, 14 May 2015 14:59:45 -0700 Subject: [PATCH 07/11] switching sole --- base/arvo/eyre.hoon | 3 +- base/lib/urb.js | 3 +- base/pub/sole/src/main.coffee | 62 ++++++++++++++++++++--------------- 3 files changed, 39 insertions(+), 29 deletions(-) diff --git a/base/arvo/eyre.hoon b/base/arvo/eyre.hoon index 32e824a8c..741e2ed11 100644 --- a/base/arvo/eyre.hoon +++ b/base/arvo/eyre.hoon @@ -1133,7 +1133,8 @@ :: ++ del-subs :: XX per path? |= [a=dock %json b=wire c=path] ^+ ..ix - (hurl-note [a b] [%g %deal [him -.a] +.a %pull ~]) + =. ..ix (hurl-note [a b] [%g %deal [him -.a] +.a %pull ~]) + (nice-json:pop-duct:(ire-ix ire)) :: XX gall ack :: ++ get-rush |= [a=whir-of b=json] ^+ ..ix diff --git a/base/lib/urb.js b/base/lib/urb.js index bd528dc6f..215d39ef4 100644 --- a/base/lib/urb.js +++ b/base/lib/urb.js @@ -244,12 +244,11 @@ window.urb.unsubscribe = function(params,cb) { if(!params.path) throw new Error("You must specify a path for urb.unsubscribe.") if(!params.appl) throw new Error("You must specify an appl for urb.unsubscribe.") - if(!cb) throw new Error("You must supply a callback to urb.unsubscribe.") url = "/~/is/"+this.gsig(params)+".json" method = "delete" this.req("delete",url,params,true,function(err,res) { - cb(err,res) + if(cb) cb(err,res) }) } diff --git a/base/pub/sole/src/main.coffee b/base/pub/sole/src/main.coffee index a6c160af8..3a153e3fb 100644 --- a/base/pub/sole/src/main.coffee +++ b/base/pub/sole/src/main.coffee @@ -3,8 +3,8 @@ str = JSON.stringify Prompt = recl render: -> - [pro,cur,buf] = [@props.appl+@props.prompt[@props.appl], @props.cursor, @props.input + " "] - pre {}, pro, + [pro,cur,buf] = [@props.prompt[@props.appl] ? "X", @props.cursor, @props.input + " "] + pre {}, @props.appl+pro, span {style: background: 'lightgray'}, buf.slice(0,cur), "\u0332", buf.slice(cur) Matr = recl render: -> @@ -54,17 +54,28 @@ $ -> offset:0 ), term window.matr = matr update = (a) -> matr.setProps a - buffer = new Share "" + buffer = "": new Share "" window.buffer = buffer - choose = (appl)-> urb.appl = appl; update {appl} + choose = (appl)-> + urb.appl = appl + buffer[appl] ?= new Share "" + updPrompt '', null + update {appl, cursor: 0, input: buffer[appl].buf} print = (txt)-> update rows: [matr.props.rows..., txt] - sync = (ted)-> - update input: buffer.buf, cursor: buffer.transpose ted, matr.props.cursor + sync = (ted,app)-> + app ?= matr.props.appl + if app isnt matr.props.appl then return + b = buffer[app] + update input: b.buf, cursor: b.transpose ted, matr.props.cursor updPrompt = (app,pro) -> prompt = $.extend {}, matr.props.prompt if pro? then prompt[app] = pro else delete prompt[app] update {prompt} - + sysStatus = ()-> updPrompt '', ( + [app,pro] = [matr.props.appl, (k for k,v of matr.props.prompt when k isnt '')] + if app is '' then (pro.join ', ')+'# ' else null + ) + peer = (ruh,app) -> app ?= urb.appl if ruh.map then return ruh.map (rul)-> peer rul, app @@ -75,7 +86,7 @@ $ -> when 'pro' then updPrompt app, ruh.pro.cad when 'hop' then update cursor: ruh.hop; bell() # XX buffer.transpose? when 'blk' then console.log "Stub #{str ruh}" - when 'det' then buffer.receive ruh.det; sync ruh.det.ted + when 'det' then buffer[app].receive ruh.det; sync ruh.det.ted, app when 'act' then switch ruh.act when 'clr' then update rows:[] when 'bel' then bell() @@ -93,19 +104,21 @@ $ -> if matr.props.prompt[app]? return print '# already-joined: '+app choose app - updPrompt "", null urb.bind "/sole", {wire:"/"}, (err,d)-> if err then console.log err else if d.data then peer d.data, app cycle = ()-> apps = Object.keys matr.props.prompt - update appl: apps[1 + apps.indexOf matr.props.appl] ? apps[0] + if apps.length < 2 then return + choose apps[1 + apps.indexOf urb.appl] ? apps[0] part = (appl)-> - unless matr.props.prompt[app]? - return print '# not-joined: '+app + mapr = matr.props + unless mapr.prompt[appl]? + return print '# not-joined: '+appl urb.unsubscribe {appl, path: "/sole", wire: "/"} - if appl is matr.props.appl then cycle() + if appl is mapr.appl then cycle() updPrompt appl, null + sysStatus() join urb.appl window.join = join; window.part = part @@ -123,19 +136,19 @@ $ -> # ), 500 sendAction = (data)-> - if urb.appl then urb.send {mark: 'sole-action', data}, (e,res)-> + if matr.props.appl then urb.send {mark: 'sole-action', data}, (e,res)-> if res.status isnt 200 then $('#err')[0].innerText = res.data.mess else if data is 'ret' - app = /^[a-z-]+$/.exec(buffer.buf.slice(1)) - unless app? + app = /^[a-z-]+$/.exec(buffer[""].buf.slice(1)) + unless app? and app[0]? return bell() - else switch buffer.buf[0] - when '+' then join app - when '-' then part app + else switch buffer[""].buf[0] + when '+' then doEdit set: ""; join app[0] + when '-' then doEdit set: ""; part app[0] else bell() doEdit = (ted)-> - det = buffer.transmit ted + det = buffer[matr.props.appl].transmit ted sync ted sendAction {det} @@ -185,12 +198,9 @@ $ -> when 'g' then bell() when 'x' then cycle() when 'v' - if mapr.appl = "" - updPrompt "", null - cycle() - apps = Object.keys mapr.prompt - updPrompt "", (apps.join ", ")+'# ' - choose '' + appl = if mapr.appl isnt '' then '' else urb.appl + update {appl, cursor:0, input:buffer[appl].buf} + sysStatus() when 't' if mapr.cursor is 0 or mapr.input.length < 2 return bell() From 53c01ebe812043fdfec5ece12ce71600b864a5c3 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Thu, 14 May 2015 18:45:22 -0400 Subject: [PATCH 08/11] removed bad printf --- base/arvo/clay.hoon | 2 -- 1 file changed, 2 deletions(-) diff --git a/base/arvo/clay.hoon b/base/arvo/clay.hoon index c05af6bc4..25c93445f 100644 --- a/base/arvo/clay.hoon +++ b/base/arvo/clay.hoon @@ -247,8 +247,6 @@ ?. ?=([%sing %v *] rav) rav [%many %| [%ud let.dom] `case`q.p.rav r.p.rav] =+ inx=nix.u.ref - ~? ?=([%sing %x *] vaw) - [%remote-x-ing vaw hen] %= +>+.$ say [[hen [(scot %ud inx) ~] for [inx syd ~ vaw]] say] nix.u.ref +(nix.u.ref) From 24f970eb4f73089b7913585f5cf38ef4676d4c0f Mon Sep 17 00:00:00 2001 From: Galen Wolfe-Pauly Date: Thu, 14 May 2015 16:06:56 -0700 Subject: [PATCH 09/11] not listening --- base/pub/talk/src/js/components/WritingComponent.coffee | 2 ++ base/pub/talk/src/js/main.js | 3 +++ 2 files changed, 5 insertions(+) diff --git a/base/pub/talk/src/js/components/WritingComponent.coffee b/base/pub/talk/src/js/components/WritingComponent.coffee index d83659a92..5ea01eeb5 100644 --- a/base/pub/talk/src/js/components/WritingComponent.coffee +++ b/base/pub/talk/src/js/components/WritingComponent.coffee @@ -46,6 +46,8 @@ module.exports = recl for s in listening if audi.indexOf(s) is -1 cc = true + if listening.length is 0 + cc = true if cc is true audi.push window.util.mainStationPath(window.urb.user) audi diff --git a/base/pub/talk/src/js/main.js b/base/pub/talk/src/js/main.js index 9a30503a1..54aef09c6 100644 --- a/base/pub/talk/src/js/main.js +++ b/base/pub/talk/src/js/main.js @@ -708,6 +708,9 @@ module.exports = recl({ cc = true; } } + if (listening.length === 0) { + cc = true; + } if (cc === true) { audi.push(window.util.mainStationPath(window.urb.user)); } From 9a60d48e210038eb8fd916368c45764bae7bfd44 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Thu, 14 May 2015 16:27:45 -0700 Subject: [PATCH 10/11] Various fixes and improvements. --- base/ape/hood/core.hook | 4 ++++ base/ape/talk/core.hook | 8 +++++--- base/arvo/ames.hoon | 1 - base/arvo/eyre.hoon | 1 + base/arvo/gall.hoon | 4 ++-- base/lib/helm/core.hook | 4 ++++ 6 files changed, 16 insertions(+), 6 deletions(-) diff --git a/base/ape/hood/core.hook b/base/ape/hood/core.hook index a037be6ae..dbd02a98b 100644 --- a/base/ape/hood/core.hook +++ b/base/ape/hood/core.hook @@ -96,6 +96,10 @@ |= [then @uvH (each gage tang)] (ably (take-made:(kiln-work [hid ost src] (able %kiln)) way +<+)) :: +++ note-helm :: + |= [then (pair ,@tD tank)] + (ably (take-note:(helm-work [hid ost src] (able %helm)) way +<+)) +:: ++ coup-kiln-fancy :: |= [then saw=(unit tang)] (ably (take-coup-fancy:(kiln-work [hid ost src] (able %kiln)) way +<+)) diff --git a/base/ape/talk/core.hook b/base/ape/talk/core.hook index 51038f566..78446c335 100644 --- a/base/ape/talk/core.hook +++ b/base/ape/talk/core.hook @@ -1549,7 +1549,7 @@ == == ++ ta-best :: most relevant - |=(two=partner ?:((ta-beat two) one two)) + |=(two=partner ?:((ta-beat two) two one)) :: ++ ta-full (ta-show ~) :: render full width ++ ta-show :: render partner @@ -1609,6 +1609,7 @@ == :: ++ te-whom :: render sender + ~& [%te-whom man lix te-best te-maud] (~(ta-show ta man (need te-best)) ~ te-maud) -- :: @@ -1658,6 +1659,7 @@ ++ peer :: accept subscription |= [from pax=path] ^- [(list move) _+>] + :: ~& [%talk-peer src ost pax] ?: ?=([%sole *] pax) ?> =(our.hid src) ?< (~(has by shells) ost) @@ -1714,9 +1716,9 @@ ra-abet:(~(ra-quit ra ost ~) man cuz) :: ++ pull :: - |= [from *] + |= [from pax=path] ^- [(list move) _+>] - :: ~& [%talk-pull `*`ost] + :: ~& [%talk-pull src ost pax] =^ moz +>.$ ra-abet:ra-ever:~(ra-cancel ra ost ~) [moz +>.$(shells (~(del by shells) ost))] :: diff --git a/base/arvo/ames.hoon b/base/arvo/ames.hoon index 7adecb07f..2a8f6b7c0 100644 --- a/base/arvo/ames.hoon +++ b/base/arvo/ames.hoon @@ -1648,7 +1648,6 @@ == :: %cake - ~& [%cake p.bon q.bon r.bon] :_ fox :~ [s.bon %give %woot q.p.bon r.bon] == diff --git a/base/arvo/eyre.hoon b/base/arvo/eyre.hoon index 741e2ed11..f549ac996 100644 --- a/base/arvo/eyre.hoon +++ b/base/arvo/eyre.hoon @@ -1133,6 +1133,7 @@ :: ++ del-subs :: XX per path? |= [a=dock %json b=wire c=path] ^+ ..ix + ~& [%eyre-del-subs +< hen] =. ..ix (hurl-note [a b] [%g %deal [him -.a] +.a %pull ~]) (nice-json:pop-duct:(ire-ix ire)) :: XX gall ack :: diff --git a/base/arvo/gall.hoon b/base/arvo/gall.hoon index 43d09368c..9b2f1923b 100644 --- a/base/arvo/gall.hoon +++ b/base/arvo/gall.hoon @@ -575,10 +575,10 @@ ++ ap-fill :: add to queue ^- [? _.] =+ suy=(fall (~(get by qel.ged) ost) 0) - ?: =(8 suy) + ?: =(20 suy) ~& [%ap-fill-full [our dap] q.q.pry ost] [%| +] - :: ~? !=(8 suy) [%ap-fill-add [[our dap] q.q.pry ost] +(suy)] + :: ~? !=(20 suy) [%ap-fill-add [[our dap] q.q.pry ost] +(suy)] [%& +(qel.ged (~(put by qel.ged) ost +(suy)))] :: ++ ap-find :: general arm diff --git a/base/lib/helm/core.hook b/base/lib/helm/core.hook index bab89d6d2..77c5523fe 100644 --- a/base/lib/helm/core.hook +++ b/base/lib/helm/core.hook @@ -149,6 +149,10 @@ %& [%flog ~ %text "<{}>"] == :: + ++ take-note :: result of %init + |= [way=wire chr=@tD tan=tank] =< abet + (emit %flog ~ %text chr ' ' ~(ram re tan)) + :: ++ take-went :: result of %want |= [way=path her=ship kay=cape] =< abet (emit %flog ~ %text "went: {<[way kay]>}") From 6b4f6a80f1a91a2d6e864c6d93fa835d0ebcb06e Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Fri, 15 May 2015 01:09:12 -0700 Subject: [PATCH 11/11] Various fixes. --- base/ape/acto/core.hook | 2 +- base/ape/hood/core.hook | 2 +- base/ape/talk/core.hook | 1 - base/lib/helm/core.hook | 1 - 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/base/ape/acto/core.hook b/base/ape/acto/core.hook index cab01db91..d681621e3 100644 --- a/base/ape/acto/core.hook +++ b/base/ape/acto/core.hook @@ -57,7 +57,7 @@ ++ colm (cook |=(a=@ (sub a '1')) (shim '1' '3')) :: row or column ++ come ;~(plug colm ;~(pfix fas colm)) :: coordinate -- :: -|_ [hid=hide moz=(list move) axle] :: per agent +|_ [hid=hide moz=(list move) axle] :: per server ++ et :: |_ [from say=sole-share] :: per console client ++ abet +>(q.eye (~(put by q.eye) ost say)) :: continue diff --git a/base/ape/hood/core.hook b/base/ape/hood/core.hook index dbd02a98b..3e11c40da 100644 --- a/base/ape/hood/core.hook +++ b/base/ape/hood/core.hook @@ -48,7 +48,7 @@ |= [from hood-begin] (ably (poke-begin:(helm-work [hid +<-] (able %helm)) +<+)) :: -++ poke-hood-init :: +++ poke-helm-init :: |= [from hood-init] (ably (poke-init:(helm-work [hid +<-] (able %helm)) +<+)) :: diff --git a/base/ape/talk/core.hook b/base/ape/talk/core.hook index 78446c335..458c8eb8d 100644 --- a/base/ape/talk/core.hook +++ b/base/ape/talk/core.hook @@ -1609,7 +1609,6 @@ == :: ++ te-whom :: render sender - ~& [%te-whom man lix te-best te-maud] (~(ta-show ta man (need te-best)) ~ te-maud) -- :: diff --git a/base/lib/helm/core.hook b/base/lib/helm/core.hook index 77c5523fe..5bbc618e8 100644 --- a/base/lib/helm/core.hook +++ b/base/lib/helm/core.hook @@ -131,7 +131,6 @@ ?> ?=(^ wil) =< abet %- emil(bur ~) - ~& [%poke-will wil] :~ [%cash /helm p.u.bur q.u.bur u.wil] [%plug /helm our %home (sein our) %kids] ==