Re: Function apply and call (was RE: Bait taken: Arguments about arguments)

2009-01-15 Thread Brendan Eich
On Jan 15, 2009, at 10:18 PM, Mark S. Miller wrote: Wonderful! And Brendan, you said earlier you were open to freezing strict arguments, and that the joining of arguments should be severed by freezing. Yes. This is easy to implement with a few strict mode checks in existing arguments impl

Re: Function apply and call (was RE: Bait taken: Arguments about arguments)

2009-01-15 Thread Mark S. Miller
On Thu, Jan 15, 2009 at 7:35 PM, David-Sarah Hopwood < david.hopw...@industrial-designers.co.uk> wrote: > Brendan Eich wrote: > > On Jan 15, 2009, at 5:42 PM, David-Sarah Hopwood wrote: > >> Allen Wirfs-Brock wrote: > >>> I generally agree that it would be a good idea to specify apply (and > >>> c

RE: Function apply and call (was RE: Bait taken: Arguments about arguments)

2009-01-15 Thread Allen Wirfs-Brock
See below >-Original Message- >From: es3.x-discuss-boun...@mozilla.org [mailto:es3.x-discuss- >boun...@mozilla.org] On Behalf Of David-Sarah Hopwood [snip] > array length invariant...another ES3.1 bug] > >Yes, I think you're right here. Also, > - defining an array index property past the c

Re: JSON numbers (was: Revisiting Decimal)

2009-01-15 Thread Brendan Eich
On Jan 15, 2009, at 7:46 PM, David-Sarah Hopwood wrote: David-Sarah Hopwood wrote: Brendan Eich wrote: We are not condemned to repeat history if we pay attention to what went before. JSON implementations in future ES specs cannot by default switch either encoding or decoding to use decimal

Re: JSON numbers (was: Revisiting Decimal)

2009-01-15 Thread Brendan Eich
On Jan 15, 2009, at 7:16 PM, David-Sarah Hopwood wrote: See http://www.kohala.com/start/papers.others/rpc.comments.txt for more. This analogy fails to reflect the design of JSON. The design of JSON is fine in isolation from the "facts on the ground". You seem to be mistaking my argument ag

RE: Stale strict mode restrictions?

2009-01-15 Thread Allen Wirfs-Brock
Now, I'm scared as clearly remember deleting those sections from my copy yesterday. I need to do some digging to figure out whether it's the draft or my mind that is defective. allen From: es3.x-discuss-boun...@mozilla.org [mailto:es3.x-discuss-boun...@mozilla.org] On Behalf Of Mark S. Mille

Re: JSON numbers (was: Revisiting Decimal)

2009-01-15 Thread David-Sarah Hopwood
David-Sarah Hopwood wrote: > Brendan Eich wrote: >> We are not condemned to repeat history if we pay attention to what went >> before. JSON implementations in future ES specs cannot by default switch >> either encoding or decoding to use decimal instead of number. > > Of course not, but they can e

Re: Bait taken: Arguments about arguments

2009-01-15 Thread Brendan Eich
On Jan 15, 2009, at 7:27 PM, David-Sarah Hopwood wrote: Brendan Eich wrote: On Jan 15, 2009, at 4:54 PM, David-Sarah Hopwood wrote: Brendan Eich wrote: On Jan 15, 2009, at 9:50 AM, Erik Arvidsson wrote: Is there a reason why we need to restrict the argArray to apply this much? I think it

Re: Function apply and call (was RE: Bait taken: Arguments about arguments)

2009-01-15 Thread David-Sarah Hopwood
Brendan Eich wrote: > On Jan 15, 2009, at 5:42 PM, David-Sarah Hopwood wrote: >> Allen Wirfs-Brock wrote: >>> I generally agree that it would be a good idea to specify apply (and >>> call) >>> pretty much as proposed below by David-Sarah. The major reason that it >>> makes it explicit what happens

Re: JSON numbers (was: Revisiting Decimal)

2009-01-15 Thread Sam Ruby
On Thu, Jan 15, 2009 at 9:24 PM, Brendan Eich wrote: > > JSON's intended semantics may be arbitrary precision decimal (the RFC is > neither explicit nor specific enough in my opinion; it mentions only > "range", not "precision"), but not all real-world JSON codecs use arbitrary > precision decimal

Re: Bait taken: Arguments about arguments

2009-01-15 Thread David-Sarah Hopwood
Brendan Eich wrote: > On Jan 15, 2009, at 4:54 PM, David-Sarah Hopwood wrote: >> Brendan Eich wrote: >>> On Jan 15, 2009, at 9:50 AM, Erik Arvidsson wrote: >>> Is there a reason why we need to restrict the argArray to apply this much? I think it would be very useful to allow anything arra

JSON numbers (was: Revisiting Decimal)

2009-01-15 Thread David-Sarah Hopwood
Brendan Eich wrote: > Long ago in the '80s there was an RPC competition between Sun and Apollo > (defunct Massachusetts-based company, but the RPC approach ended up in > DCE), with both sides attempting to use open specs and even open source > to build alliances. Bob Lyons of Sun argued eloquently

Re: Function apply and call (was RE: Bait taken: Arguments about arguments)

2009-01-15 Thread Brendan Eich
On Jan 15, 2009, at 6:49 PM, Brendan Eich wrote: The issue here is that typical implementations do have a rather small limit on number of arguments. If the spec doesn't acknowledge this, then those implementations are clearly violating the spec. SpiderMonkey functions may have at most 65535 pa

Re: Function apply and call (was RE: Bait taken: Arguments about arguments)

2009-01-15 Thread Brendan Eich
On Jan 15, 2009, at 5:42 PM, David-Sarah Hopwood wrote: Allen Wirfs-Brock wrote: I generally agree that it would be a good idea to specify apply (and call) pretty much as proposed below by David-Sarah. The major reason that it makes it explicit what happens for most currently unspecified edg

Re: JSON numbers (was: Revisiting Decimal)

2009-01-15 Thread Brendan Eich
On Jan 15, 2009, at 6:07 PM, David-Sarah Hopwood wrote: That approximation might be good enough for a particular use of JSON; if it isn't, then the application programmer should use a different binding, or different options to the binding. To cut past all the preaching to the choir: the argume

JSON numbers (was: Revisiting Decimal)

2009-01-15 Thread David-Sarah Hopwood
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 to encode >>> decimals as strings and dec

Re: Function apply and call (was RE: Bait taken: Arguments about arguments)

2009-01-15 Thread David-Sarah Hopwood
Allen Wirfs-Brock wrote: > I generally agree that it would be a good idea to specify apply (and call) > pretty much as proposed below by David-Sarah. The major reason that it > makes it explicit what happens for most currently unspecified edge cases > such as a sparse argArray or argArray propertie

Array construction underspecified

2009-01-15 Thread Mark S. Miller
I see that the spec for constructing an array from an array literal has been clarified to ensure that, even if Array.prototype[3] is an accessor property, that it's setter is not invoked to initialize the corresponding element of the array. (This issue didn't arise in ES3 since it had no accessor p

Unnecessary qualifier?

2009-01-15 Thread Mark S. Miller
15.2.3.8 Object.seal(O) and 15.2.3.9 Object.freeze(O) both end with the qualification The above algorithm is specified as a set of sequential steps that include > the possibility of a exception > being thrown as various intermediate points. Rather than failing after a > partial update of O, this >

Re: Revisiting Decimal

2009-01-15 Thread Brendan Eich
On Jan 15, 2009, at 3:05 PM, Kris Zyp wrote: I more ambivalent on typeof 1.1m than on the what seems to me to be a more obvious mistake of throwing on JSON serialization of decimals. Good to hear. Ambivalence should not be a stable state, though. If we can get to typeof agreement, let's do s

Re: Stale strict mode restrictions?

2009-01-15 Thread Mark S. Miller
Likewise 12.11.1 On Thu, Jan 15, 2009 at 3:19 PM, Mark S. Miller wrote: > I'm reading the MTV spec, and first I'd like to complement all those who > contributed to it, especially Pratap and Allen who have done a monumental > job. Thanks guys! > > Before filing a bug, I wanted to double check: On

Stale strict mode restrictions?

2009-01-15 Thread Mark S. Miller
I'm reading the MTV spec, and first I'd like to complement all those who contributed to it, especially Pratap and Allen who have done a monumental job. Thanks guys! Before filing a bug, I wanted to double check: On the strict mode restrictions of 12.5.1 and 12.6; didn't we decide to drop these res

Re: Revisiting Decimal

2009-01-15 Thread Kris Zyp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > > >> You are saying there latent hard-to-find bugs because people believe >> that JSON somehow implies that the sum of {"p":1.1, "q":2.2} must be >> 3.3003 ? > > I never wrote any such thing. > > Please look at the previous messages aga

Function apply and call (was RE: Bait taken: Arguments about arguments)

2009-01-15 Thread Allen Wirfs-Brock
I generally agree that it would be a good idea to specify apply (and call) pretty much as proposed below by David-Sarah. The major reason that it makes it explicit what happens for most currently unspecified edge cases such as a sparse argArray or argArray properties that are accessors. It woul

Re: ES3.1 Draft: 15 Jan 2009 "MountainView" version available

2009-01-15 Thread Alex Russell
yep. My bad. Sorry all. On Jan 15, 2009, at 10:29 AM, Brendan Eich wrote: On Jan 15, 2009, at 9:43 AM, Anne van Kesteren wrote: On Thu, 15 Jan 2009 18:40:29 +0100, Alex Russell > wrote: On Jan 15, 2009, at 7:25 AM, Anne van Kesteren wrote: FWIW, it seems there is a mismatch between the draft

Re: Revisiting Decimal

2009-01-15 Thread Brendan Eich
On Jan 15, 2009, at 12:32 PM, Kris Zyp wrote: we can't switch JSON from double to decimal by default, when decoding *or* encoding. How do you switch to double or decimal by default on encoding? The input defines it, not any default setting. A JSON encoder in a current self-hosted or native ES

Re: Revisiting Decimal

2009-01-15 Thread Bob Ippolito
On Thu, Jan 15, 2009 at 12:44 PM, Bob Ippolito wrote: > On Thu, Jan 15, 2009 at 12:32 PM, Kris Zyp wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> >> >> Brendan Eich wrote: >>> On Jan 15, 2009, at 10:46 AM, Kris Zyp wrote: >>> -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 >>

Re: Revisiting Decimal

2009-01-15 Thread Bob Ippolito
On Thu, Jan 15, 2009 at 12:32 PM, Kris Zyp wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > > Brendan Eich wrote: >> On Jan 15, 2009, at 10:46 AM, Kris Zyp wrote: >> >>> -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 >>> >>> Brendan Eich wrote: On Jan 15, 2009, at 9:47 AM, Kris Z

Re: Revisiting Decimal

2009-01-15 Thread Kris Zyp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brendan Eich wrote: > On Jan 15, 2009, at 10:46 AM, Kris Zyp wrote: > >> -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 >> >> Brendan Eich wrote: >>> On Jan 15, 2009, at 9:47 AM, Kris Zyp wrote: >>> Where is the loss coming from? >>> >>> Decimal

RE: Bait taken: Arguments about arguments

2009-01-15 Thread Allen Wirfs-Brock
At Tuesday's ES3.1 conference call we discussed the three major outstanding issues regarding the arguments object that had been discussed on this list and made decisions for incorporation into the "Mountain View" draft that was released earlier today. These decisions were: Ticket #428: what do

Re: Bait taken: Arguments about arguments

2009-01-15 Thread Brendan Eich
On Jan 15, 2009, at 9:50 AM, Erik Arvidsson wrote: Sorry for being late to the party. Is there a reason why we need to restrict the argArray to apply this much? I think it would be very useful to allow anything array like here. Please define "array like" and give examples (possibly including

Re: ES3.1 Draft: 15 Jan 2009 "MountainView" version available

2009-01-15 Thread Brendan Eich
On Jan 15, 2009, at 10:53 AM, Allen Wirfs-Brock wrote: We know...I proposed the change to the ES3.1 (to make the terminology used by object literals and attribute descriptors consistent) and made sure that IE8 could and would digest the change before it reaches RTM... Thanks. /be ___

Re: Revisiting Decimal

2009-01-15 Thread Brendan Eich
On Jan 15, 2009, at 10:46 AM, Kris Zyp wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brendan Eich wrote: On Jan 15, 2009, at 9:47 AM, Kris Zyp wrote: Where is the loss coming from? Decimal-using peer S1 encodes {p:1.1, q:2.2} Double-using peer C1 decodes, adds, and returns {p:1.1

Re: Revisiting Decimal

2009-01-15 Thread Brendan Eich
On Jan 15, 2009, at 9:47 AM, Kris Zyp wrote: Where is the loss coming from? Decimal-using peer S1 encodes {p:1.1, q:2.2} Double-using peer C1 decodes, adds, and returns {p:1.1, q:2.2, r:3.3003} The sender then checks the result using decimal and finds an error. Meanwhile the

Re: Revisiting Decimal

2009-01-15 Thread Kris Zyp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brendan Eich wrote: > On Jan 15, 2009, at 9:47 AM, Kris Zyp wrote: > >> Where is the loss coming from? > > Decimal-using peer S1 encodes > > {p:1.1, q:2.2} > > Double-using peer C1 decodes, adds, and returns > > {p:1.1, q:2.2, r:3.3003}

Re: ES3.1 Draft: 15 Jan 2009 "MountainView" version available

2009-01-15 Thread Brendan Eich
On Jan 15, 2009, at 9:43 AM, Anne van Kesteren wrote: On Thu, 15 Jan 2009 18:40:29 +0100, Alex Russell wrote: On Jan 15, 2009, at 7:25 AM, Anne van Kesteren wrote: FWIW, it seems there is a mismatch between the draft and what Internet Explorer 8 appears to be shipping or maybe I am misund

RE: ES3.1 Draft: 15 Jan 2009 "MountainView" version available

2009-01-15 Thread Allen Wirfs-Brock
We know...I proposed the change to the ES3.1 (to make the terminology used by object literals and attribute descriptors consistent) and made sure that IE8 could and would digest the change before it reaches RTM... Allen >-Original Message- >From: es-discuss-boun...@mozilla.org [mailto:e

Re: Bait taken: Arguments about arguments

2009-01-15 Thread Erik Arvidsson
Sorry for being late to the party. Is there a reason why we need to restrict the argArray to apply this much? I think it would be very useful to allow anything array like here. -- erik 2009/1/15 Brendan Eich : > On Jan 14, 2009, at 9:16 PM, Mark S. Miller wrote: > > On Wed, Jan 14, 2009 at 7:0

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 wrote: > >> -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 >> >> >> >> Bob Ippolito wrote: >>> On Wed, Jan 14, 2009 at 9:32 PM, Kris Zyp >>> wrote: >>> -BEGIN PGP SIGNED MESSA

Re: ES3.1 Draft: 15 Jan 2009 "MountainView" version available

2009-01-15 Thread Anne van Kesteren
On Thu, 15 Jan 2009 18:40:29 +0100, Alex Russell wrote: On Jan 15, 2009, at 7:25 AM, Anne van Kesteren wrote: FWIW, it seems there is a mismatch between the draft and what Internet Explorer 8 appears to be shipping or maybe I am misunderstanding something. http://annevankesteren.nl/2009/0

Re: Revisiting Decimal

2009-01-15 Thread Bob Ippolito
On Thu, Jan 15, 2009 at 5:49 AM, Kris Zyp wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > > Bob Ippolito wrote: >> On Wed, Jan 14, 2009 at 9:32 PM, Kris Zyp wrote: >> >>> -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 >>> >>> >>> >>> Brendan Eich wrote: On Jan 14, 2009, at 7:38

Re: ES3.1 Draft: 15 Jan 2009 "MountainView" version available

2009-01-15 Thread Alex Russell
On Jan 15, 2009, at 7:25 AM, Anne van Kesteren wrote: On Thu, 15 Jan 2009 14:16:04 +0100, Pratap Lakshman (VJ#SDK) > wrote: I have uploaded to the wiki (link) the 15 Jan 2009 draft of the specification for ES3.1. This is

Re: ES3.1 Draft: 15 Jan 2009 "MountainView" version available

2009-01-15 Thread Anne van Kesteren
On Thu, 15 Jan 2009 14:16:04 +0100, Pratap Lakshman (VJ#SDK) wrote: I have uploaded to the wiki (link) the 15 Jan 2009 draft of the specification for ES3.1. This is in the form of in-place edits and markups to the E

Re: Revisiting Decimal

2009-01-15 Thread Kris Zyp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bob Ippolito wrote: > On Wed, Jan 14, 2009 at 9:32 PM, Kris Zyp wrote: > >> -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,

Re: Revisiting Decimal

2009-01-15 Thread Kris Zyp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Unfortunately, I don't have enough time to continue to point by point discussion. If the group feels typeof 1.1m -> "decimal", then so be it, we can certainly handle that. My point was to show empirical evidence that could hopefully be considered in t

ES3.1 Draft: 15 Jan 2009 "MountainView" version available

2009-01-15 Thread Pratap Lakshman (VJ#SDK)
I have uploaded to the wiki (link) the 15 Jan 2009 draft of the specification for ES3.1. This is in the form of in-place edits and markups to the ES3 specification. Revision history is at the end of the document. This s

Re: Revisiting Decimal

2009-01-15 Thread Sam Ruby
Kris Zyp wrote: Only if never compared to a double. How do you prevent this? We already agree that the decimal-double comparison will always be false. Not strictly true. (1m == 1) => true (1m === 1) => false It is only fractions which have denominators which are not a pure power of two

Re: Bait taken: Arguments about arguments

2009-01-15 Thread Brendan Eich
On Jan 14, 2009, at 9:16 PM, Mark S. Miller wrote: On Wed, Jan 14, 2009 at 7:08 PM, Brendan Eich wrote: When in doubt, use brute force. ES3 already did. Quoting from its spec for Function.prototype.apply: 15.3.4.3 Function.prototype.apply (thisArg, argArray) [...] Otherwise, if argArray