Something like [curry-this](http://nmotw.in/curry-this) would be nice to
have, so we could do something like:
```js
const add = (
(a, b, c) => a + b + c
)::curry();
```
On Mon, Oct 19, 2015 at 1:00 PM, Bob Myers wrote:
> Of course, faster is always better, and native is
Holy goodness http://www.collectionsjs.com/
On Jun 9, 2014 10:33 PM, Tab Atkins Jr. jackalm...@gmail.com wrote:
On Mon, Jun 9, 2014 at 8:33 AM, Erik Arvidsson erik.arvids...@gmail.com
wrote:
Most of these could just be methods of iterators and then they could be
used
for different data
Would it be useful to implement basic set operations as below?
* merge
* subset?
* superset?
* union
* intersection
* complements
* difference
* cartesian
* copy
So on?
--
*'I am what I am because of who we all are'*
h3manth.com http://www.h3manth.com
*-- Hemanth HM *
of collections down the line like queues, trees, tries, etc
On Jun 7, 2014 3:13 PM, Barronville, Jonathan jonat...@belairlabs.com
wrote:
Yes ... +++1.
- Jonathan
—
Sent from Mailbox https://www.dropbox.com/mailbox
On Sat, Jun 7, 2014 at 9:05 AM, Hemanth H.M hemanth...@gmail.com wrote:
Would
Something like:
```js
Number.compare = (n1, n2) - (n1 - n2) / Math.abs(n1 - n2) || 0;
```
On Fri, Jun 6, 2014 at 12:40 PM, Mathias Bynens mathi...@opera.com wrote:
On 6 Jun 2014, at 01:15, Axel Rauschmayer a...@rauschma.de wrote:
It’d be nice to have a built-in way for comparing numbers,
My bad! Miss read it. ^That still sorts in ascending order only.
On Fri, Jun 6, 2014 at 5:08 PM, Hemanth H.M hemanth...@gmail.com wrote:
Something like:
```js
Number.compare = (n1, n2) - (n1 - n2) / Math.abs(n1 - n2) || 0;
```
On Fri, Jun 6, 2014 at 12:40 PM, Mathias Bynens mathi
I do understand Arrow functions are like built-in functions in that both
lack .prototype and any [[Construct]] internal method.
But why does the scope refer to the global in case of :
```
String.prototype.repeat = (n) = Array(+n+1).join(this);
ES6 .repeat(3);
// will result in [object
-in String.prototype.repeat instead.
:P
10.02.2014, 12:54, Hemanth H.M hemanth...@gmail.com:
I do understand Arrow functions are like built-in functions in that both
lack .prototype and any [[Construct]] internal method.
But why does the scope refer to the global in case
So to finalize: There is no way to do this with fat arrow, rather fat arrow
is not meant for this?
On Feb 10, 2014 6:38 PM, Claude Pache claude.pa...@gmail.com wrote:
Le 10 févr. 2014 à 09:53, Hemanth H.M hemanth...@gmail.com a écrit :
I do understand Arrow functions are like built
On Mon, Feb 10, 2014 at 10:13 PM, Allen Wirfs-Brock
al...@wirfs-brock.comwrote:
Object.assign(String.prototype, {
repeat(n) {return Array(+n+1).join(this)}
});
Roger that!
--
*'I am what I am because of who we all are'*
h3manth.com http://www.h3manth.com
*-- Hemanth HM *
Something like `var foo = {}; foo.bar ||= 3` would be very useful.
But not sure how something like `obj['name']['maxlength']` be reduced to
shorthand check if 'name' is not defined.
--
*'I am what I am because of who we all are'*
h3manth.com http://www.h3manth.com
*-- Hemanth HM *
Giammarchi
Sent: Sunday, February 9, 2014 15:29
To: Hemanth H.M
Cc: es-discuss
Subject: Re: shorthand notation for attribute creation?
Unless I misunderstood your idea, `||=` makes me naturally think about
`+=` so if
`i += n;` means `i = i + n`
then
`o.name ||= value` means `o.name
Thank you, for making it clear :-)
On Tue, Dec 10, 2013 at 5:03 AM, Brendan Eich bren...@mozilla.com wrote:
Hemanth H.M wrote:
Can this be a pattern in itself or is there any specific name for this
paradigm ?
Python folks call it coroutines but it's not the canonical meaning
Ah! Sweet :)
Makes sense of why send() method was implemented for generators.
Can this be a pattern in itself or is there any specific name for this
paradigm ?
On Sun, Dec 8, 2013 at 3:11 PM, Brendan Eich bren...@mozilla.com wrote:
Brendan Eich wrote:
How about something like this?
Yes, I'm aware of taskjs.
So it's not a good idea to mix streams and generators!
Thanks :)
On Sun, Dec 8, 2013 at 10:41 AM, Brendan Eich bren...@mozilla.com wrote:
Hemanth H.M wrote:
Yes, that's where I'm stuck.
Here are the few variations I tired :
```
function* FileReader
:
Hemanth H.M wrote:
Yes, I'm aware of taskjs.
So it's not a good idea to mix streams and generators!
No, it's important not to think yield from a generator function nested in
another will yield from the *outer* one. That seems to be what you thought,
in all the variations.
Passing a function
```
function* FileReader(){
// Some stream code on node;
stream.on('data',function*(data) {
yield data;
});
}
```
Now :
```
var reader = FileReader();
console.log(reader.next()); // Would say { value: undefined, done: true }
```
The question being, where will the anonymous
Hello Hackers,
This might be silly, but let the code speak :
var param1,param2 = window.location.search.replace('?','').split('')
undefined
param1
undefined
param2
[foo=bar, hello=world]
a=1
1
b=2
2
a,b=b,a
1
a
1
b
2
Why not param1 be equal to foo=bar and param2 be equal to hello=world?
ReferenceError: Invalid left-hand side in assignment on chrome
On Wed, Jul 4, 2012 at 10:46 PM, Jussi Kalliokoski
jussi.kallioko...@gmail.com wrote:
[param1, param2] = window.location.search.replace('?','').split('')
--
*'I am what I am because of who we all are'*
h3manth.com
not quite there yet.
--Oliver
On Jul 4, 2012, at 10:08 AM, Hemanth H.M wrote:
Hello Hackers,
This might be silly, but let the code speak :
var param1,param2 = window.location.search.replace('?','').split('')
undefined
param1
undefined
param2
[foo=bar, hello=world]
a=1
1
b=2
Thank you all, for your fantastic feedback!
On Thu, Jul 5, 2012 at 6:17 AM, Ariya Hidayat ariya.hida...@gmail.comwrote:
This might be silly, but let the code speak :
var param1,param2 = window.location.search.replace('?','').split('')
a,b=b,a
To see how a JavaScript parser understands
Hello Hackers,
If there was a easy way to wrap an asynchronous in a synchronous API would
it not be easy? Because we can wrap it that way any API will need to accept
a callback to return proceed values.
I bit be speaking absolute non sense here, but just felt something like
that might makes
WOW! Ok, thank you.
On Thu, Jun 21, 2012 at 8:32 PM, Brendan Eich bren...@mozilla.org wrote:
See dherman's http://taskjs.org/ for one way that ES6 will support, but
which requires expliciti 'yield' usage when you wrap to make the
preemption point clear.
/be
Hemanth H.M wrote:
Hello
As there is no keyword as 'or' so far, does something like *x = x.value or
5 *sound better?
On Tue, Jun 19, 2012 at 3:00 PM, David Bruant bruan...@gmail.com wrote:
What about a more generic operator that would be able to silently absorb
any error?
let greedy = obj.hints?.greedy;
would
Hoping to see that day soon! :)
On Tue, Jun 19, 2012 at 10:01 PM, Erik Arvidsson
erik.arvids...@gmail.comwrote:
On Tue, Jun 19, 2012 at 8:37 AM, Allen Wirfs-Brock
al...@wirfs-brock.com wrote:
Actual API design is probably an orthogonal issue. What the Object
Model Reformation proposal
Was just wondering if something like *Object.inspect(myObj) *would give all
the attributes of that particular object.
--
*'I am what I am because of who we all are'*
h3manth.com http://www.h3manth.com
*-- Hemanth HM *
___
es-discuss mailing list
No there is no proposal of that I'm aware of in Strawman, just asking the
group if it's useful?
On Thu, Jun 14, 2012 at 3:23 PM, T.J. Crowder t...@crowdersoftware.comwrote:
On 14 June 2012 10:42, Hemanth H.M hemanth...@gmail.com wrote:
Was just wondering if something like *Object.inspect
The inspect module provides functions for introspecting on live objects and
their source code.
On Thu, Jun 14, 2012 at 6:21 PM, Russell Leggett
russell.legg...@gmail.comwrote:
On Thu, Jun 14, 2012 at 5:42 AM, Hemanth H.M hemanth...@gmail.com wrote:
Was just wondering if something like
that give o/p like :
('__delslice__', method-wrapper '__delslice__' of list object at
0x1005252d8)
On Thu, Jun 14, 2012 at 10:41 PM, Allen Wirfs-Brock
al...@wirfs-brock.comwrote:
On Jun 14, 2012, at 9:49 AM, Hemanth H.M wrote:
The inspect module provides functions for introspecting on live objects
WOW! Thanks a ton for the clarification.
On Thu, Jun 14, 2012 at 10:52 PM, Brendan Eich bren...@mozilla.com wrote:
ES5 has plural Object.defineProperties for defining more than one property
on an object, and of course Object.create that defines all the properties
on a new object from a
Would something like :
obj[prop] ||= NewProp
be useful?
--
*'I am what I am because of who we all are'*
h3manth.com http://www.h3manth.com
*-- Hemanth HM *
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
Would it be useful to have something like sum[value] = sum.get(value, 0) + 1
--
*'I am what I am because of who we all are'*
h3manth.com http://www.h3manth.com
*-- Hemanth HM *
___
es-discuss mailing list
es-discuss@mozilla.org
Kool, well was looking into use caseswell my first frustration was [1]
I'm new to this, how does one write proposals? Is it a wiki?
[1] https://twitter.com/GNUmanth/status/208555914733682690
On Tue, Jun 12, 2012 at 8:36 PM, Rick Waldron waldron.r...@gmail.comwrote:
True! It will be confusing; || is uber kool :)
On Tue, Jun 12, 2012 at 9:37 PM, David Bruant bruan...@gmail.com wrote:
Le 12/06/2012 18:02, Tab Atkins Jr. a écrit :
On Tue, Jun 12, 2012 at 7:36 AM, David Bruantbruan...@gmail.com wrote:
Le 12/06/2012 16:19, Hemanth H.M a écrit :
Would
[].forEach.call(NodeList,function(elm) {}) why that? Why not treat it like
an [] ?
--
*'I am what I am because of who we all are'*
h3manth.com http://www.h3manth.com
*-- Hemanth HM *
___
es-discuss mailing list
es-discuss@mozilla.org
Thank you very much for the clarification! Also noticed 'Extending the DOM
is dangerous.'
On Mon, Jun 11, 2012 at 4:16 PM, David Bruant bruan...@gmail.com wrote:
Hi,
Le 11/06/2012 12:30, Hemanth H.M a écrit :
[].forEach.call(NodeList,**function(elm) {}) why that? Why not treat it
like
--
*'I am what I am because of who we all are'*
h3manth.com http://www.h3manth.com
*-- Hemanth HM *
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
Well, I came looking for sugar, was reading few of the proposal which
already covers my needs, will update as soon as I get anything either than
those in the proposal.
/me understands that just a video link is too very wage, but, felt it made
few strong suggestions.
How can one contribute ( as
Wow, that's interesting. When will that be implemented?
On Mon, Jun 11, 2012 at 5:59 PM, Rick Waldron waldron.r...@gmail.comwrote:
On Monday, June 11, 2012 at 6:30 AM, Hemanth H.M wrote:
[].forEach.call(NodeList,function(elm) {}) why that? Why not treat it like
an [] ?
ES6 draft specifies
Uber kool! Thanks a ton David!
npm install es6-shim # wow :) Shall blog about this!
Well, Map() and Set() is already there is FF13, it's an experimental API
right? Experimental means it can be chucked off or it shall be modified
drastically ? ( More Java like APIs :\ )
Well {} behaved liked
Ha Hmm, yet to iterate sets.
On Mon, Jun 11, 2012 at 6:48 PM, David Bruant bruan...@gmail.com wrote:
http://productforums.google.com/forum/#!topic/docs/0hQWeOvCcHU
--
*'I am what I am because of who we all are'*
h3manth.com http://www.h3manth.com
*-- Hemanth HM *
Just came across that, thanks :)
On Mon, Jun 11, 2012 at 7:17 PM, Rick Waldron waldron.r...@gmail.comwrote:
On Mon, Jun 11, 2012 at 6:59 AM, Hemanth H.M hemanth...@gmail.com wrote:
The current spec draft is available here:
http://wiki.ecmascript.org/doku.php?id
Thank you Rick Waldron :)
BTW tired 'es6-shim' on node.js and :
Math.sign(-0)
-1
Should it give an error?
On Mon, Jun 11, 2012 at 7:14 PM, Rick Waldron waldron.r...@gmail.comwrote:
On Mon, Jun 11, 2012 at 9:09 AM, Tom Ellis tellis...@gmail.com wrote:
ES6 draft specifies a new Array
Sugar, I want more sugar! http://vimeo.com/43380467
--
*'I am what I am because of who we all are'*
h3manth.com http://www.h3manth.com
*-- Hemanth HM *
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
discussion: https://twitter.com/zedshaw/status/211591843899654144
Anton
On Sunday, June 10, 2012 at 5:27 AM, Hemanth H.M wrote:
Sugar, I want more sugar! http://vimeo.com/43380467
--
*'I am what I am because of who we all are'*
h3manth.com http://www.h3manth.com
*-- Hemanth HM
45 matches
Mail list logo