Re: Re: Additional Math functions

2015-10-01 Thread Sebastian Zartner
While Math.sum() and Math.mean() currently don't exist, they can easily be polyfilled: See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce#Sum_all_the_values_of_an_array for summarizing the values of an array and the following code for building the aver

Re: Re: Additional Math functions

2015-10-01 Thread Eli Perelman
In case it didn't come across, this is the thread I'm reviving: https://mail.mozilla.org/pipermail/es-discuss/2015-April/042732.html Eli Perelman Mozilla On Thu, Oct 1, 2015 at 5:51 PM, Eli Perelman wrote: > Reviving this thread, doing any type of simple statistics is more verbose > than it pr

Re: Re: Additional Math functions

2015-10-01 Thread Eli Perelman
Reviving this thread, doing any type of simple statistics is more verbose than it probably needs to be as calculating sums, averages, etc. makes most resort to Array reduction. I understand the need for methods such as `Math.hypot(...values)`, but for ECMAScript to evolve to be useful in statistics

Re: Re: Alternative to Promise

2015-10-01 Thread Andrea Giammarchi
FWICT Promises and Generators aren't designed at all for best performance, which is why nobody cares much on the IoT world of micro controller where "5 objects" instead of just one callback makes practically no sense (Espruino or Duktape just to name few). Where there is a lot of RAM and a decentl

Re: Re: Alternative to Promise

2015-10-01 Thread Matthew Phillips
On Thu, Oct 01, 2015 at 01:57:01PM +0800, Yad Smood wrote: > To be frankly, I can't read your doc in just 5min, it's a little obscure to > me. Please don't stick on performance or internal complexity, it's not the > bottleneck. Performance could be a bottle neck in some situations. I'm particular

Fwd: Alternative to Promise

2015-10-01 Thread 韩冬
Great introduction on history of Promise, your suggestion are also very informative, thank you very much! ~winter > Begin forwarded message: > > From: Benjamin Gruenbaum > Subject: Re: Alternative to Promise > Date: October 1, 2015 at 4:42:35 PM GMT+8 > To: "es-discuss@mozilla.org" > > > >

Re: Alternative to Promise

2015-10-01 Thread Forbes Lindesay
You seem to be picking on q as the standard promise implementation, but it's actually one of the most complex implementation of a promise and does far more than just implement the standard. If you want to see how a simpler implementation (which just implements promises/A+) would look, I suggest

Re: Alternative to Promise

2015-10-01 Thread Thomas
>> There's only one variation that's standard, and every browser is or >> will soon be implementing that one. > > How can you said so? isn’t every Promise library pass A+ test considered > standard? There is a specific variation of promises in the ECMAScript standard which is compatible with p

Re: Alternative to Promise

2015-10-01 Thread Benjamin Gruenbaum
> Where do you get the courage to challenge every inventor that they have to learn everything you've learned before they making decisions? Can we please keep it civil? > the question is why not check other languages first, when there’re nice solutions already there. Promises are rooted in the 1

Re: Alternative to Promise

2015-10-01 Thread Yad Smood
> actually the questions are not which is faster, why use my library or your library…etc, and i did’t invent "some better idea”, the question is why not check other languages first, when there’re nice solutions already there. What is the definition of "check other languages"? Where do you get the