Re: yield and Promises

2011-10-21 Thread Kris Zyp
. On 10/21/2011 10:34 AM, John J Barton wrote: Can anyone summarize how these proposals relate to Kris Kowal / Kris Zyp / Mark Miller Q library: https://github.com/kriskowal/q The proposal was designed such that it should work smoothly with Kowal's Q originating promises as well (acting like Q.when

yield and Promises

2011-10-19 Thread Kris Zyp
The topic of single-frame continuations has been discussed here before, with the current state of ES.next moving towards generators that are based on and similar to Mozilla's JS1.7 implementation. Generators are a powerful addition to the language and welcome (at least by me). However, I

Re: yield and Promises

2011-10-19 Thread Kris Zyp
On 10/19/2011 12:29 PM, Dean Landolt wrote: This is a really great idea, Kris! A few comments inline... [snip] If the value is not an object with a then property that is a function, the operand value is the immediate result of the evaluation of the yield expression and execution

Re: promises | Communicating Event-Loop Concurrency and Distribution

2011-01-29 Thread Kris Zyp
On 1/28/2011 8:43 PM, Mark S. Miller wrote: On Fri, Jan 28, 2011 at 6:05 AM, Kris Zyp k...@sitepen.com mailto:k...@sitepen.com wrote: Exactly. On the NodeJS mailing list there is constant, never-ending stream of messages from (generally new users) who are complaining about

Re: promises | Communicating Event-Loop Concurrency and Distribution

2011-01-28 Thread Kris Zyp
On 1/27/2011 10:37 PM, Mark S. Miller wrote: On Thu, Jan 27, 2011 at 8:23 PM, Kris Zyp k...@sitepen.com mailto:k...@sitepen.com wrote: This looks like a case of creating in-language for a library. This was done with json2.js because it was one of the most widely used libraries

Re: promises | Communicating Event-Loop Concurrency and Distribution

2011-01-27 Thread Kris Zyp
This looks like a case of creating in-language for a library. This was done with json2.js because it was one of the most widely used libraries in existence and similar JSON handlers were used in numerous libraries. The ref_send library and sibling Q style implementations are not anywhere close to

Re: New private names proposal

2010-12-16 Thread Kris Zyp
___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss - -- Kris Zyp SitePen (503) 806-1841 http://sitepen.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http

Re: natively negotiating sync vs. async...without callbacks

2010-12-09 Thread Kris Zyp
conceptually be like a yield/continuation localized to ONLY the statement in question, not affecting the linear execution of the rest of the program. This reminds me of a proposal by Kris Zyp a couple of months ago (single frame continuations) https://mail.mozilla.org/pipermail/es-discuss

Re: Simple Modules and Current Modules

2010-11-05 Thread Kris Zyp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Another idea that might provide the extensibility to deal with loading various resources and alternate/older modules, what if we added the ability to specify the loader to use for a module: module myApp { module Template = load template.html with

Re: Simple Modules and Current Modules

2010-11-05 Thread Kris Zyp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/5/2010 12:31 PM, Sam Tobin-Hochstadt wrote: On Fri, Nov 5, 2010 at 2:25 PM, Kris Zyp k...@sitepen.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Another idea that might provide the extensibility to deal with loading various

Re: Simple Modules and Current Modules

2010-11-05 Thread Kris Zyp
? - -- Kris Zyp SitePen (503) 806-1841 http://sitepen.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzUVkkACgkQ9VpNnHc4zAxkxQCeM5mIrcgpa1jvF2figilZI/zT RmIAn22y0f2ARJspYFRPffy8nW4Zl4C7 =a4xO -END PGP

Simple Modules and Current Modules

2010-11-04 Thread Kris Zyp
something together. [1] http://wiki.commonjs.org/wiki/Modules/AsynchronousDefinition - -- Kris Zyp SitePen (503) 806-1841 http://sitepen.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

Re: Simple Modules and Current Modules

2010-11-04 Thread Kris Zyp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/4/2010 8:02 AM, Sam Tobin-Hochstadt wrote: On Thu, Nov 4, 2010 at 9:22 AM, Kris Zyp k...@sitepen.com wrote: I believe it should be a requirement that harmony modules (or at least a subset of them) should be desugarable into ES5 code

Re: Simple Modules and Current Modules

2010-11-04 Thread Kris Zyp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/4/2010 11:13 AM, Alex Russell wrote: On Nov 4, 2010, at 6:22 AM, Kris Zyp wrote: I've been meaning to make some comments about simple modules and in last minute with Brendan, he noted that he wanted to work with CommonJS to make

Re: Single frame continuations proposal

2010-04-17 Thread Kris Zyp
on a `yield'-like construct. But I wouldn't be surprised if it ended up looking a lot like JS 1.7 / Python generators. If that approach is still of interest, I'll throw out some ideas on the other thread. - -- Kris Zyp SitePen (503) 806-1841 http://sitepen.com -BEGIN PGP SIGNATURE

Re: Single frame continuations proposal

2010-04-14 Thread Kris Zyp
a normal function call that Waldemar noted. Thanks, - -- Kris Zyp SitePen (503) 806-1841 http://sitepen.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkvF6

Re: Single frame continuations proposal

2010-04-05 Thread Kris Zyp
proposal)? I don't follow you. Non-latin? Dave I just meant yield vs -(). - -- Kris Zyp SitePen (503) 806-1841 http://sitepen.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

Re: Single frame continuations proposal

2010-04-04 Thread Kris Zyp
syntax instead of using the yield keyword (hadn't realized it was already reserved in ES5 strict-mode when I did the first proposal)? - -- Kris Zyp SitePen (503) 806-1841 http://sitepen.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http

Re: Single frame continuations proposal

2010-04-01 Thread Kris Zyp
); But we established in step 5 that there's no $result.continueWith function. You are right, once the continuation is resumed the algorithm is completed. - -- Kris Zyp SitePen (503) 806-1841 http://sitepen.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG

Single frame continuations using yield keyword with generators compatibility proposal

2010-04-01 Thread Kris Zyp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David Herman's comment about JS1.7 generators spurred me to consider if we could achieve the goals stated for single-frame continuations as a broadly useful mechanism for replacing CPS code with more natural flow for constructs like promises and

Single frame continuations proposal

2010-03-30 Thread Kris Zyp
); } }; }; }; if(typeof StopIteration === undefined){ StopIteration = {}; } })(); - -- Thanks, Kris - -- Kris Zyp SitePen (503) 806-1841 http://sitepen.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http

Re: Single frame continuations proposal

2010-03-30 Thread Kris Zyp
to preserve debuggability. Anyway, thanks for the corrections and compelling suggestions. - -- Kris Zyp SitePen (503) 806-1841 http://sitepen.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

Re: Revisiting Decimal

2009-01-15 Thread Kris Zyp
in the decision process. As far as JSON goes, Dojo will encode decimals to numbers, there is really no coherent alternative (encoding to strings would be even more bizarre, and I can't think of any other option). Kris Brendan Eich wrote: On Jan 14, 2009, at 9:32 PM, Kris Zyp wrote: Of course

Re: Revisiting Decimal

2009-01-15 Thread Kris Zyp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bob Ippolito wrote: On Thu, Jan 15, 2009 at 5:49 AM, Kris Zyp k...@sitepen.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bob Ippolito wrote: On Wed, Jan 14, 2009 at 9:32 PM, Kris Zyp k...@sitepen.com wrote: -BEGIN PGP

Re: obsoleting the new keyword

2009-01-14 Thread Kris Zyp
keyword. Many people don't like the use of the new keyword. Although new is here to stay, could we obsolete it when using a class sugar? Peter ___ Es-discuss mailing list Es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss - -- Kris

Re: Revisiting Decimal

2009-01-14 Thread Kris Zyp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brendan Eich wrote: On Jan 9, 2009, at 3:08 PM, Kris Zyp wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The counter-argument is strong: typeof x == typeof y = (x == y = x === y) but 1.1 != 1.1m for fundamental reasons. I

Re: Revisiting Decimal

2009-01-14 Thread Kris Zyp
real world JS is that much different than Dojo's? Kris /be - -- Kris Zyp SitePen (503) 806-1841 http://sitepen.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

Re: Revisiting Decimal

2009-01-14 Thread Kris Zyp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brendan Eich wrote: On Jan 14, 2009, at 7:38 PM, Kris Zyp wrote: You need to change this in any case, since even though the JSON RFC allows arbitrary precision decimal literals, real-world decoders only decode into IEEE doubles. You'd have

Re: Revisiting Decimal

2009-01-09 Thread Kris Zyp
___ Es-discuss mailing list Es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss - -- Kris Zyp SitePen (503) 806-1841 http://sitepen.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla

Re: Revisiting Decimal

2009-01-09 Thread Kris Zyp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The counter-argument is strong: typeof x == typeof y = (x == y = x === y) but 1.1 != 1.1m for fundamental reasons. I understand the counter-argument, but with such an overwhelming number of typeof uses having far easier migration with number,

strawman: Harmonious Classes and Typing

2008-11-26 Thread Kris Zyp
to provide a more detailed description of the mechanics of this class system. Thanks, Kris Kris Zyp wrote: - Original Message - *From:* Kris Zyp mailto:[EMAIL PROTECTED] *To:* es4-discuss Discuss mailto:[EMAIL PROTECTED] ; [EMAIL PROTECTED] mailto:[EMAIL PROTECTED

Re: strawman:names

2008-11-19 Thread Kris Zyp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Arg, I responded to wrong email :/, I meant to reply to the one on catchalls, that is the one I think is a very valuable feature. Kris Kris Zyp wrote: +1, I think this was one of the most valuable features from ES4. Kris Peter Michaux wrote

Re: In what ways does the following eval regularity break?

2008-10-30 Thread Kris Zyp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 FWIW, a little empirical data: I think we should even consider banning local eval from strict mode. In light of the examples I gave above, and more that are pretty easy to find, I think this would make strict mode unused in practice. In Dojo,

Re: Decimal comparisons

2008-09-19 Thread Kris Zyp
+1 for typeof 1m === 'number'. As an example of breakage, I believe Crockford's current version of his JSON library would not do as I would desire with decimals: JSON.stringify({foo:1m}) - {\foo\:undefined} Why is that worse than producing '{foo:1}'? The fact that you know what I was

Re: Look Ma, no this (was: ECMAScript Harmony)

2008-08-24 Thread Kris Zyp
On Tue, Aug 19, 2008 at 9:15 PM, Kris Zyp [EMAIL PROTECTED] wrote: Why do you freeze the functions? Is this just to cater to mutable function critics, or is there actually a reason tied class semantics? It is to cater to mutable function critics, since they're right ;). That may be, but it seems