With Mark’s direction, the v2 branch of Q handles "vicious cycles" through
the WeakMap that maps promises to their underlying handler. Whenever a
promise is resolved with another promise, it walks forward through the
chain of promises that the promise handler "became" through resolution. The
first
Await yields to the event loop unconditionally. This is useful for
spreading CPU-bound work across multiple events. You can explicitly await
conditionally.
```
if (guard) { await guard; }
```
On Sun, Feb 7, 2016 at 1:39 PM /#!/JoePea wrote:
> I'm not sure where's the best
var iterator = range(0, 10, 1);
var iterations = iterator.forEach((x) => console.log(x));
console.log(iterations);
```
Kris Kowal
On Fri, Oct 16, 2015 at 7:30 AM, Andrea Giammarchi <
andrea.giammar...@gmail.com> wrote:
> That's usually a made-up issue ... the example code is using two
I believe you need to champion the issue. Create a Github repository and
start editing the fragment of the spec. I do not believe that the issue is
contentious. The color of the shed is obvious. The only thing missing is a
champion willing to do the writing.
On Fri, Jun 12, 2015 at 10:52 AM,
compatible with npm.
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
On Tue, May 27, 2014 at 3:04 PM, Ian Hickson i...@hixie.ch wrote:
On Tue, 27 May 2014, Kris Kowal wrote:
It would be lovely if HTML could be trained to resolve URL's through the
module system.
By HTML here I presume you mean the underlying Fetch mechanism. Could
you elaborate on exactly how
.
http://documentup.com/montagejs/frb/#tutorial/last
Kris Kowal
On Tue, May 13, 2014 at 11:54 AM, Dmitry Soshnikov
dmitry.soshni...@gmail.com wrote:
Hi,
Exactly at the moment I'm writing too many of
entries[entries.length - 1]
where `entries` is an array (with of course moving to a helper
Continuing a 2 year old thread.
http://esdiscuss.org/topic/regexp-escape
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
In this case, a half pursuit of type purity is a side quest at the expense
of users. Having two ways to resolve and two ways to observe a promise is
unnecessarily confusing. In my experience, one method like then, that
unwraps recursively, and one function, like Promise.cast, that
automatically
do
find a promise inspector compelling, one that will show an error until it
is handled, but even in this case, I think it is compelling to visually
elevate an unhandled error to a provably never-to-be-handled error, and
this is not possible, at least outside chrome-space, without WeakRef.
Kris
-origin iframes, and even show time sequence / Stevens
graphs for message passing between promises in multiple JavaScript
contexts, when promises are used as proxies for remote objects through a
facility like Q-Connection
https://github.com/kriskowal/q-connection
Kris Kowal
Perhaps the second argument of `contains`, `startsWith`, and `endsWith`
should be consistent with the second argument of the `RegExp` constructor.
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
and proposals that came out of
these discussions. I believe it is fair to interpret Brendan’s last
sentiment, “This again puts unsound warning types outside of the
standards track for a while. But carry on with TypeScript etc. — TC39 is
tracking”, not as “no”, but as “not yet”.
Kris Kowal
not be perturbed by `copy` and `clone` coexisting as such.
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
On Sat, Aug 10, 2013 at 3:19 AM, Forbes Lindesay for...@lindesay.co.uk
wrote:
I doubt you want to let it be indexed using `[]` and I see little reason
why it would need to be built into the language. It would make far more
sense as a nice little library, which creates a much smaller maintenance
I’ve found it satisfyingly idiomatic to call this `addEach` (for both maps
and other collections) in my work on Collections[1].
[1]: https://github.com/montagejs/collections
___
es-discuss mailing list
es-discuss@mozilla.org
both old and
new engines, the promise polyfill will simply have to patch a no-op done
onto the engine’s Promise.prototype.
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
it be more clear that it is intended for
monadic composition if the name were literally bind?
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
/design/README.js
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
in the
Mozilla Add-on toolkit, but the links have gone stale.
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
use case, this loses information about interleaving of
keys, which is usually unimportant except (perhaps) in making round
trips between parse and stringify.
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo
On Tue, Nov 20, 2012 at 10:57 AM, Mark S. Miller erig...@google.com wrote:
Since Map and Set will be in ES6 and MultiMap is trivially
implementable from these, we can wait until we see some experimental
implementations before standardizing. Hence the ES7 target.
Here’s my experimental
.
https://github.com/kriskowal/collections
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
?
CSP does forbid the Function constructor, by the edict “Code will not
be created from strings”.
http://www.w3.org/TR/CSP/ Section 4.2 “If unsafe-eval is not allowed…”
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org
namespaces,
and how a namespace can have a common ancestor prototype for each
instance.
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
({by:relation})
values.sort({by:relation,compare:altCompare})
values.sort({compare}) // if default compare is added in global scope
values.sort({}) // default comparator
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org
datastructure, an object that maps consistent
hashes - to array buckets - to values for Set or [key, value] pairs
for Map. I would also implement Map in terms of Set, just overriding
the hash and equals functions to operate on the key portion of each
pair in the set.
Kris Kowal
On Wed, Mar 21, 2012 at 4:05 PM, Axel Rauschmayer a...@rauschma.de wrote:
Honest question: Are nested modules really needed?
There is a chance that they would be useful for bundling. Modules
can’t be concatenated.
Kris Kowal
___
es-discuss mailing
make sense
as an alternative to +, where the result shadows instead of snapshots
the left hand side for the same effect until it changes.
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
On Sun, Jun 13, 2010 at 7:50 AM, Jordan Osete jordan.os...@yahoo.fr wrote:
Hello everybody.
How about standardizing something like RegExp.escape() ?
http://simonwillison.net/2006/Jan/20/escape/
It is trivial to implement, but it seems to me that this functionality
belongs to the language -
where items are explicitly collected.
http://wiki.ecmascript.org/doku.php?id=harmony:simple_maps_and_sets
As I recall, a variant of Map was considered in the ES4 timeline as well.
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
https
,
separating the signatures from the declarations.
Alex’s question is whether some subset of these ideas is suitable for
rapid consensus. I will refrain from speculating.
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org
, but it is true. I also want to
see careful and well-wrought steady progress. I remember a former
decade when this discussion was impossible to follow, too many bad
ideas were too thoroughly discussed, and much time was wasted.
Kris Kowal
___
es-discuss
cost.
A third use-case would be annotating the sources of statically bundled
Simple Modules or whatever succeeds them. I imagine that there would
be a need for tools that transform load directives into inline
modules, so it would be handy to annotate sources for debugging in
that case too.
Kris Kowal
position back to original text position.
And I find HOBD's use of # much more valuable. I do not think we should
have both uses of # coexist in one language.
Ah. With these givens, I agree.
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
.
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
method proposed in Simple Modules for
deterministically linearizing the evaluation order? Non-determinism is
definitely a greater evil than providing developers a means to
explicate the order in which they would like their side-effects to be
wrought.
Kris Kowal
that there are no
files that would be loaded that are not reachable through transitive
load directives. I suppose I've answered my question, if all my
assumptions are correct.
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es
] = y;
}
I tend to disagree with most developers, so take it with a grain of
salt that I find the latter form, with all the implied abilities,
easier to understand.
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org
there would be resistance to looking ahead.
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
On Mon, Jun 7, 2010 at 8:37 AM, Sam Tobin-Hochstadt sa...@ccs.neu.edu wrote:
On Sun, Jun 6, 2010 at 2:00 PM, Kris Kowal kris.ko...@cixar.com wrote:
...
Most of this is good clarification, particularly that load
interacts with the exports of the foreign script's implied,
anonymous module scope
On Mon, Jun 7, 2010 at 12:10 PM, Erik Arvidsson
erik.arvids...@gmail.com wrote:
On Mon, Jun 7, 2010 at 10:35, Kris Kowal kris.ko...@cixar.com wrote:
Another thing that Ihab clarified which merits a full
section on the wiki is the dynamic scoping of lexical module
names.
This is a common
/aQuery.js);
const $ = aQuery_.aQuery.$;
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
On Sat, Jun 5, 2010 at 3:40 AM, Sam Tobin-Hochstadt sa...@ccs.neu.edu wrote:
On Fri, Jun 4, 2010 at 9:48 PM, Kris Kowal kris.ko...@cixar.com wrote:
On Fri, Jun 4, 2010 at 5:17 PM, David Herman dher...@mozilla.com wrote:
By keeping modules second class, we get a number of benefits, not
just
we need
both layers.
Meanwhile, I would still like to see examples of how to compose
working sets of modules with other working sets of modules that were
not designed in coordination.
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
https
constructing applications and APIs by composing non-coherent groups of
name spaces produced by non-cooperating groups of developers.
In any case, that's my two bucks,
Kris Kowal
[1] http://wiki.commonjs.org/wiki/Packages/Mappings/B
[2] http://limi.net/articles/resource-packages/
[3] http
(1).join(/));
}
})
I think it might be best to organize the syntax around MRL's rather
than local short-names. MRL's can be reasonably short if they're
permitted to be relative paths, which requires the module loader
handler to receive the MRL of the requesting module.
Kris Kowal
be the norm, and explicit
linking can at least be deferred to the layer of packages, or
coherently designed sets of modules linking to other coherently
designed sets of modules. I presume that it is possible to isolate
and explicitly link groups of modules.
Kris Kowal
properties, but that would preclude meta-object hierarchies. I
suspect that these will be desirable and that exposing the base
handler prototype would be useful.
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es
getting such deeply
detailed attention. Thanks.
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
[moving this thread onto es-discuss]
On Tue, Mar 23, 2010 at 2:45 PM, Brendan Eich bren...@mozilla.org wrote:
On Mar 23, 2010, at 2:17 PM, Kris Kowal wrote:
Aside: I hope we can resolve MarkM's suspicions of composability
problems with generators; they are one of my very favorite features
the
context, in which case it would be appropriate to call the entire
entity a Context. However, I think that for the purpose of this
discussion, it is desirable to separate the layers and concerns so
that we can see the breadth of options.
Kris Kowal
[1] http://wiki.commonjs.org/wiki/Modules/Transport
On Wed, Feb 3, 2010 at 12:39 PM, Brendan Eich bren...@mozilla.com wrote:
On Feb 2, 2010, at 6:23 PM, Kris Kowal wrote:
This verbiage implies black-listing. It would be good to be clear
that the object formerly known as a module context should be
explicitly populated with a white-list
Would someone mind posting a summary of the current positions of the
active participants of this discussion, perhaps contrasting the
proposals?
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
this proposal suggest that there
is exactly one Context for every Sandbox and that any module
block statement evaluated in a context populates the corresponding
sandbox with a mapping from the given module identifier to the first
class exports object of that module?
Kris Kowal
. I think the various aligned
typed arrays are a good idea, but I think CommonJS would be satisfied
if we were to agree on the byte array buffer type initially.
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo
for numbers, in suffix. For example: 3ce for thrice or 1mm for one
millimeter, where ce and mm were constructors in scope.
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
you have the luxury of specifying [[Get]] and [[Put]].
The .get method in the CommonJS proposal is intended to serve as a
stop-gap for implementations that cannot provide properties.
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
https
The last paragraph of Annex E notes that getPropertyName is among
the divergences from ES3. I presume this is intended to be
getPropertyNames with plural infection.
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org
, we
can do a lot in libraries without native language support so it's
worth kicking off a discussion around that feature early.
Kris Kowal
[1] http://wiki.ecmascript.org/doku.php?id=strawman:modules
[2] http://wiki.commonjs.org/wiki/CommonJS
[3] http://narwhaljs.org/
[4] http://wiki.commonjs.org
options for producing the desired
performance. It might be better to have a compile() routine that
returns an opaque, engine-specific Program object that can in turn be
executed multiple times.
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
On Mon, May 11, 2009 at 4:21 PM, Brendan Eich bren...@mozilla.com wrote:
On May 11, 2009, at 4:10 PM, Kris Kowal wrote:
Perhaps I'm behind on the times, but I'm under the impression that
presently the behavior of this function foo declaration has no
standard behavior:
(function
On Mon, May 11, 2009 at 9:26 AM, Brendan Eich bren...@mozilla.com wrote:
On May 8, 2009, at 8:49 PM, Kris Kowal wrote:
(function (require, exports) { + text + /**/\n}
Nit-picking a bit on names: require : provide :: import : export -- so
mixing require and export mixes metaphors. Never stopped
hope we
can provide a switch on the sandbox machinery so the application
programmer can chose whether they want light-weight sandboxes or heavy
ones.
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es
testing system for layout, rendering, event, and other features and
quirks that might not be neatly distinguished based on the
availability of a module.
Kris Kowal
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es
great hope
for the fruit of this discussion.
Kris Kowal
___
Es-discuss mailing list
Es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
;
};
index.js
from ./sink.js import sink; // or
let sink = require(./sink.js).sink;
from http://jquery.com/dist/jQuery.10.1.js; import jQuery as $
from ./my-widget.js import MyWidget
sink($('#widget'), MyWidget());
Kris Kowal
___
Es-discuss mailing
67 matches
Mail list logo