Live data from Hacker News

Node v4.0.0

nodejs.org

221–230 of 277 posts

Re: Node v4.0.0

#221
post #19

Guys, does V8 still deoptimize on ES6 features? For example, would using say const/lets in a function prevent V8 from optimizing it as a whole? That was the case some time ago when these features were still under a flag.

Can I ask for a link on that? Thanks!

Re: Node v4.0.0

#222
post #176

Earlier quoted context omitted.

Now that we have ES6 generators, this is much less of an issue.

Generators don't help with the sync/async split. Generators are just iterators, and are synchronous. The consumer asks for a value with next() and the value must be computable (even if that value is a Promise). If you have an async function (one that returns a Promise or in the future a Stream), and you need to call it from a sync function, and somehow incorporate the future value into the return value of the sync fu…

In my experience in practice there is no big difference, really, its just a matter of a few keywords.

As for "having to change an entire call stack", that just stopped happening after a while. The rule of thumb was that if the function is impure (e.g. relying on mutable state) then it will likely become async, too. That lets me plan ahead.

Re: Node v4.0.0

#223
post #198

Earlier quoted context omitted.

that's not what he meant

> where a new major version number indicates backwards-compatible changes lucio was probably referring to this part, where "incompatible" is indeed correct.

lol

Re: Node v4.0.0

#224
post #28

Earlier quoted context omitted.

It promises a stable future, so let's say I'm being cautiously optimistic.

> It promises a stable future, so let's say I'm being cautiously optimistic. This doesn't make sense in light of your initial comment. One of the big goals of IO was to move to semver and address unpredictability/instability that you describe. If anything, the merging of Node and IO should give you confidence that project governance will be on the right track moving forward. Also, when you consider the advancements i…

"On the right track" does not mean "production ready now". Some time needs to pass in order to create the confidence necessary.

Re: Node v4.0.0

#225
post #76
post #35

Earlier quoted context omitted.

I mean, Ruby was created in 1995, Python in 1991. Node was first released in 2009. That's not an entirely fair comparison since, of course, JavaScript was created long before Node, but Node introduced the language to a new environment, and a lot of complications needed (and in some cases, still need) to be sorted out. As for no recommend approach - that's deliberate. I don't think most people working on Node want a R…

> I don't think most people working on Node want a Rails equivalent It wouldn't really be possible anyway. Async programming is hard and the shortcuts one can take with synchronous Ruby are impossible with Async Javascript. Nodejs has a "fibers" lib though , but it doesn't look like it is widely popular, but AFAIK it is the only to truly abstract async programming.

With async functions you interface with everything using promises, it's great.

Re: Node v4.0.0

#226
post #19

Guys, does V8 still deoptimize on ES6 features? For example, would using say const/lets in a function prevent V8 from optimizing it as a whole? That was the case some time ago when these features were still under a flag.

Can I ask for a link on that? Thanks!

The one readily available on search: https://github.com/petkaantonov/bluebird/wiki/Optimization-k...

Otherwise the fact that engines bailout on optimizing ES6 features was kind of common knowledge when engines started to implement them.

Re: Node v4.0.0

#227
post #35

Earlier quoted context omitted.

I mean, Ruby was created in 1995, Python in 1991. Node was first released in 2009. That's not an entirely fair comparison since, of course, JavaScript was created long before Node, but Node introduced the language to a new environment, and a lot of complications needed (and in some cases, still need) to be sorted out. As for no recommend approach - that's deliberate. I don't think most people working on Node want a R…

> ... Ruby was created in 1995, Python in 1991. Node was first released in 2009. That's not an entirely fair comparison since, of course, JavaScript was created long before Node, but Node introduced the language to a new environment... Actually, no, it didn't. JavaScript was first introduced "on the server side" about 20 years ago in the Netscape web server[1]. We learn from history that we learn nothing from history…

Sure, and after that we had Rhino and Adobe has been using JavaScript for a very long time as a scripting language (ExtendScript) and there are probably many other examples of JavaScript outside of a browser. But I don't see what that has to do with untog's main point.

Re: Node v4.0.0

#228
post #35

Earlier quoted context omitted.

I mean, Ruby was created in 1995, Python in 1991. Node was first released in 2009. That's not an entirely fair comparison since, of course, JavaScript was created long before Node, but Node introduced the language to a new environment, and a lot of complications needed (and in some cases, still need) to be sorted out. As for no recommend approach - that's deliberate. I don't think most people working on Node want a R…

> ... Ruby was created in 1995, Python in 1991. Node was first released in 2009. That's not an entirely fair comparison since, of course, JavaScript was created long before Node, but Node introduced the language to a new environment... Actually, no, it didn't. JavaScript was first introduced "on the server side" about 20 years ago in the Netscape web server[1]. We learn from history that we learn nothing from history…

How long have you been waiting to use this pedantic comment and the obnoxious condescending quote about it to prove someone wrong and make yourself feel smart?

This has nothing to do with the parent comment about node deliberately differing from rails, it's typical hn/reddit pedantry.

Re: Node v4.0.0

#229

Earlier quoted context omitted.

> ... Ruby was created in 1995, Python in 1991. Node was first released in 2009. That's not an entirely fair comparison since, of course, JavaScript was created long before Node, but Node introduced the language to a new environment... Actually, no, it didn't. JavaScript was first introduced "on the server side" about 20 years ago in the Netscape web server[1]. We learn from history that we learn nothing from history…

How long have you been waiting to use this pedantic comment and the obnoxious condescending quote about it to prove someone wrong and make yourself feel smart? This has nothing to do with the parent comment about node deliberately differing from rails, it's typical hn/reddit pedantry.

Living up to his username.

Re: Node v4.0.0

#230
post #86
post #81

Earlier quoted context omitted.

nvm install 4.0 works, do we really need the "v"?

Since it's the first and only release so far in 4.x.y, I got away with `nvm install 4`. ;)

Using `stable` is also another way.

  > nvm install stable
  v4.0.0 is already installed.
  Now using node v4.0.0 (npm v2.14.2)
Post reply on HN