Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Open Source Programming The Internet

Node.js v4.0.0 Released 128

New submitter TFlan91 writes: The first merge of the popular Node.js and io.js repositories has been released! From the announcement: "The collaborators of the Node.js project and the members of the Node.js Foundation are proud to offer v4.0.0 for general release. This release represents countless hours of hard work encapsulated in both the Node.js project and the io.js project that are now combined in a single codebase. The Node.js project is now operated by a team of 44 collaborators, 15 of which form its Technical Steering Committee (TSC). Further, over 100 new individuals have been added to the list of people contributing code to core since v0.12.7."
This discussion has been archived. No new comments can be posted.

Node.js v4.0.0 Released

Comments Filter:
  • by Anonymous Coward

    Can't wait to read all about the hate slashdot has for node.. again.

    • by MobyDisk ( 75490 ) on Tuesday September 08, 2015 @04:15PM (#50481739) Homepage

      I think it is JavaScript hate, not Node hate.

      • by Anonymous Coward

        Some of it is Node hate. Node has all the hype of Ruby on Rails, minus the joy that is Ruby, minus the part where you can use it to create working websites. I've literally never heard anyone make anything that works using Node, whereas no matter how much I may hate Rails (and I do detest it) I can easily find working example of Rails apps.

        • by joss ( 1346 ) on Tuesday September 08, 2015 @04:44PM (#50481971) Homepage

          > I've literally never heard anyone make anything that works using Node

          I made a good chunk of the backend of http://www.manything.com/ [manything.com] using node, and it all works .. supporting 100,000 s of customers perpetually streaming stuff to a bunch of servers.

          Having said that.. Christ on a bike, I would not use that technology again: it's the most snake pit infested dangerzone I've ever encountered. Writing multiprocess c++ code for transputers with no tool support back in the early 90s was a fucking breeze compared to the extraordinary clusterfuck that is node. Node with javascript/coffeescript on the server gives you new and interesting ways to shoot yourself in the foot and then helps you wipe off the wound with a nice bloody rag you were donated from a leper who died of ebola. It's an exciting environment to be sure, but I'm done with that.

          • Re: (Score:3, Informative)

            Javascript, no matter how you try to make useful toolkits to assist in coding, is a horrible clusterfuck of a language. It's as good an example of how really fucking terrible languages can go on for years, despite every possible inferiority one can imagine, simply out of penetration and inertia. It's just a gawdawful shitty language.

            • Agree 100%. Automatic Semicolon Insertion makes Javascript look like it was designed by an idiot.

              Even Doug Crockford @34:31 "Why am I betting my career on this piece of crap?"

              https://www.youtube.com/watch?... [youtube.com]

              • Automatic Semicolon Insertion makes Javascript look like it was designed by an idiot.

                It does that? Huh. And there's me, typing semicolons like a sucker.

                • by Anonymous Coward

                  You do that because there are cases where you don't want it to add semicolons.

                • by robi5 ( 1261542 )

                  You still need the semicolon in the rare and easily avoidable case when you do something like

                  callSomething() ;(function() {doSomething})()

                  otherwise it'll be interpreted as callSomething()(function() {doSomething})()

                  In some other cases, even the semicolon insertion doesn't help, e.g. if you write the return value on a line different from the return line.

                  So all in all, one way is not intrinsically better than the other. On one hand, most code in the wild (open source and in-house) use semicolons, on the other

                  • by devent ( 1627873 )

                    Groovy is an example how to do it right. In Groovy, I don't need semicolons and even parenthesis are optional, but there is no pitfalls you can fall into like in JavaScript. That is because the Groovy compiler don't try to be intelligent and try to guess your intent.

                    In Groovy I can write
                    func "a", "b"
                    func "a" bar "b" baz "c"
                    func { closure }
                    return [func: "something"]

                    • by robi5 ( 1261542 )

                      I'm not saying that JS semicolon rules are good, just that semicolons are such an incredibly small issue in the grand scheme of things. A developer will write or alter millions of lines and fix thousands of bugs over his career and will probably run into the semicolon issue a handful of times or less.

              • by Anonymous Coward

                Agree 100%. Automatic Semicolon Insertion makes Javascript look like it was designed by an idiot.

                Even Doug Crockford @34:31 "Why am I betting my career on this piece of crap?"

                https://www.youtube.com/watch?... [youtube.com]

                In your YouTube link, seconds after your quote, Crockford follows on with this:

                "In fact, given its amazing success despite some of these obvious shortcomings, I think we got lucky. There's actually enough goodness, smartness, built into the language that if you can just avoid the bad parts, the good

                • by UnknownSoldier ( 67820 ) on Tuesday September 08, 2015 @09:16PM (#50483665)

                  > enough goodness, smartness, built into the language that if you can just avoid the bad parts,

                  That's incorrect. There a million and one ways JS can bite you in the ass.

                  When one is forced to use fucking hacks like

                  "use strict";

                  just so that one can get warnings about using mis-spelt variable names it tells me the designer learnt nothing from BASIC and all the shite that went along with it for the past 20 years.

                  I can't believe you're actually defending the retarded automatic semi-colon insertion. This is almost as stupid as Python. A language should NOT impose presentation (whitespace layout), only representation (semantics.) Mathematics doesn't. Spoken languages don't. So WTF should Javascript?? At the very least it should give you a WARNING about doing something "dangerous" or "unintended" like any good ol' C/C++ compiler will do with -Wall -Wextra. In JS? Nope, no errors / warnings / or diagnostic messages. This is one of the reasons Javascript sucks ass.

                  Javascript's automatic type coercion is likewise crap. When one is forced to do crap like

                  return "" + foo

                  in order to force the language to _actually_ return a string, it means you need to _manually_ inspect the _rest_ of the codebase for these undefined time bombs in your code. All this dumb shit could be easily be caught at "compile time" instead of blowing up, or worse, being silent at run-time.

                  More dumb shit like browsers treating leading zeros as octal (which NO one uses) in parseInt( "0#" ) is typical of how fucked up JS was. Mozilla and Chrome made excuses for years for why they didn't fix their broken crap:

                  * http://code.google.com/p/v8/is... [google.com]
                  * https://bugzilla.mozilla.org/s... [mozilla.org]

                  There is a reason we moved to statically type languages -- because they catch stupid mistakes. We moved away from retarded languages like BASIC for professional programming because we have better things to do then to hand-hold a broken interpreter written by a moron.

                  Javascript uses `double` internally. This means it is impossible to get a native 64-bit int. Oh look, I can bit-wise OR a number with ZERO to get a "native" int32. More stupid hacks to work around the lack of a proper type system:

                  return foo | 0; // cast to int

                  Javascript's equality operator is so broken it is fucking useless and complete joke. Gee, why doesn't == even work for array and objects ?? WTF is the point of having == when any sane programmer will just use === and !== ?? http://dorey.github.io/JavaScr... [github.io]

                  Javascript's 'scoping' is likewise dumb. Or I should say "complete lack of it." What the fuck is the point of braces if the language is just going to ignore block scope??

                  Every time you turn around the fucked up language adds yet another stupid "gotcha" that you have to be extra defensive about, and/or use a different work-around per-browser because the rational behavior is no where to be found. I means seriously:

                  typeof( [] + {} )

                  returns "string" ???

                  > But programmers can get used to anything, and it doesn't take any more or less discipline to work around these

                  The problem is that you don't _know_ about the quality of code written by the rest of the people on your team. There is no guarantee to catch broken JS code and that's even WITH running some sort of 'lint' and minifier program.

                  For the record, I _do_ use Javascript for my day job, which is WebGL.

                  Javascript is a the biggest piece of shit right before PHP; both languages are full of idiotic design kludges made by the typical beginner Co

                  • You sure are angry about programming languages!
                    • All programming languages suck. Some more then others.

                      Then you have complete clusterfucks like Javascript and PHP.

                      Javascript's lack of a standard "include" is a prime example of how retarded it is. Oh look "import" is supposedly being worked on, yet no browsers support it (yet.)

                      * https://developer.mozilla.org/... [mozilla.org]

                      At least with EcmaScript 6 "strict" mode is _finally_ enabled by default in classes, modules, etc.

                      * http://people.mozilla.org/~jor... [mozilla.org]

                      You can't fix retarded design(s) unless we first overcome ignora

                  • by AmiMoJo ( 196126 )

                    Javascript is a de-facto standard, it won because there was nothing else. Similar to PHP really, it was shite but it was first and there was demand so it gained popularity rapidly.

                    Nowadays smart people write code in languages like Dart, which compile down to Javascript but fix most of the problems you outline. So now we have this horrible hacky situation where you go Dart -> Javascript + asm.js -> compiler -> bytecode running on a VM.

                  • by robi5 ( 1261542 )

                    Having done JS and WebGL, I can also say, you can cherrypick all day long among examples that no Javascript developer would do except maybe novices or the curious, but at the end of the day, you still prefer JS at least just enough that it can be your tool of programming, and you still get to work with interesting technologies, and the result of that is probably visible by large parts of the population. You might as well switch to iOS or something else and use OpenGL, without any Javascript but you don't do

                    • Microsoft didn't even support WebGL until recently (IE11)

                      The fact that we had to rely on "popularity" to get cross platform basic native type support when it should have supported it from the beginning just points out how short sighted JS is and was.

                  • TypeScript + a good IDE solves most of JavaScripts problems.

            • by e r ( 2847683 )
              Agreed. check out this article about symbols in ES6 (which node.js v4 now supports) [2ality.com]

              In ECMAScript 5, one often represents concepts (think enum constants) via strings.

              var COLOR_RED = 'RED';
              var COLOR_ORANGE = 'ORANGE';
              var COLOR_YELLOW = 'YELLOW';
              var COLOR_GREEN = 'GREEN';
              var COLOR_BLUE = 'BLUE';
              var COLOR_VIOLET = 'VIOLET';

              However, strings are not as unique as we’d like them to be.
              (...)
              Interestingly, even though we do so, there can still be mix-ups. For example, someone may define a constant for a mood:

              var MOOD_BLUE = 'BLUE';

              Now the value of BLUE is not unique anymore and MOOD_BLUE can be mistaken for it.

              Symbols are a kludgey hack to try and reach this little thing called type safety which some people find to be really useful for y'know writing programs and libraries longer than "hello world".

              (Take note of this, Atom, Vivaldi, and the rest who think that JS + CSS + HTML will magically make everything super fast, responsive, and a glorious nirvana of such awesome code that you've probably never heard of)

            • You know, I used to think the same as you. Then I had to learn R.

              Guys. JavaScript is an awesome language. Why, it's practically sane! Cherish what you have, you never know all the painful ways in which it can be taken away.

          • I wrote a node-webkit ( since renamed to nwjs ) application for our salespeople last year, and node is pretty good, webkit seems out of date, but javascript is painful.

            It amazes me how many jobs have become web programming jobs, primarily in languages most programmers hate.

          • by Lennie ( 16154 )

            Large parts of the of the user-facing websites of Walmart are running on node.js

            That's also a popular website ;-)

          • by Anonymous Coward

            The annoying thing is that all this Node bruhaha has a negative effect on people developing web front-ends not in Node. Just about every javascript library nowadays, instead of providing you with a link to their JS files, gives you instructions for using Node toolchain commands to install and use their library. I basically have to have Node installed just to do client-side only stuff. It isn't that terrible, but it is annoying.

          • by sribe ( 304414 )

            ...the extraordinary clusterfuck that is node...

            Was investigating back-end options that will support streaming updates better than Ruby on Rails. Node.js quickly popped up as the hot alternative. Bought a couple of books on Node.js. Read them. Immediately sold them on eBay. End of story ;-)

            When advocates go on and on defending a twisted inside-out semantic model "because evented asynch", apparently oblivious to all the systems out there which offer much cleaner ways of achieving the same thing, that's the warning flag to be suspicious of everything havi

        • Node has all the hype of Ruby on Rails, minus the joy that is Ruby

          Plus the efficiency that Ruby doesn't have.

          minus the part where you can use it to create working websites.

          That seems wildly wrong. [clock.co.uk]

        • minus the joy that is Ruby

          Not sure if this is sarcastic or not...
          I absolutely loathe Ruby and can't wait for it to end up in the dustbin of stupid half-assed fads.

          • by Anonymous Coward

            Sure, as long as your preference isn't PHP, PERL, or some other worse scripting language. Also, Ruby isn't Rails. Rails the web framework is what got hyped. Ruby the language has been around since 1995, and some of us liked it before Rails.

        • by Lennie ( 16154 )

          https://popcorntime.io/ [popcorntime.io] which is used by a good chunk of people around the world is written in 'node-webkit'. So node.js with Webkit. Webkit is used for running the HTML-/CSS-/JS-frontend and node.js is used to start and run the Javascript code which for example has the bindings for the bittorrent library.

        • Hmmm... Never heard of Visual Studio?

  • Node (Score:5, Funny)

    by Anonymous Coward on Tuesday September 08, 2015 @04:18PM (#50481769)
    I've been trying to get started with Node for some time because I'm currently using XML. Is Node better or worse than XML?
  • Well, maybe, especially if you don't bother counting...

    • by mark-t ( 151149 )
      That is, generally, what the expression means... that nobody counted, and so nobody knows how many, exactly.
  • That's quite a jump in version numbers: from 0.12.7 to 4.0.0! Windows has got nothin' on that. From another article [medium.com]:

    Having a converged project means converged release numbers which is why Node.js is jumping to v4.0 and avoiding overlap with any existing io.js version numbers.

    This explanation doesn't persuade me. The version number is namespaced by the product name. It would have been Node 0.13, not io.js 0.13. I wouldn't have gotten confused.

    I never heard about much version-number skipping until recently: Windows 10, PHP 7, and now Node 4. Has this always happened every now and then? It seems like before, doing just a dubious major-number increment, like from 3.4

    • by Reemi ( 142518 ) on Tuesday September 08, 2015 @04:50PM (#50482029)

      If you want to know why PHP skipped 6, this is an interesting read: https://wiki.php.net/rfc/php6 [php.net]

      But the key reason seems to be (selective c&p from the page):
      - PHP 6 already existed and it was something completely different.
      - PHP 6, the original PHP 6, has been discussed in detail in many PHP conferences.
      - PHP 6 was widely known not only within the Internals community, but around the PHP community at large.
      - There's lots of PHP 6 information, about the original PHP 6, that exists around the web. Books are the smallest part of the problem.

      • Ha-ha, that's priceless !

        "What comes after version 5? Version 6, right? Not in Pretty pHucked uP land -- they had to have a *vote* to skip version 6 after version 5 and go right to version 7 !"

        Microsoft's marketing dept. must have been taking lesson from them when they skipped Windows 9 and went to Windows 10!

        • by Reemi ( 142518 )

          Good luck with you IPv5 setup.

          • IPv5 [wikipedia.org] aka ST2. Although in reading IPv5 is nothing more than experimental, it has been released and it still exists... Unlike PHP6 which was never publicly released and by and large backported into PHP5. When they did that, 6 should have been dropped until such time that a major version release was warranted...and then name that one PHP6 instead of coming up with so many arguments why they need to jump versions to 7.
        • by snadrus ( 930168 )

          Actually, that's so that apps searching for "Windows 9" to match "Windows 95" or "Windows 98" wouldn't get a positive match.

      • Version 6 is generally associated with failure in the world of dynamic languages. PHP 6 was a failure; Perl 6 was a failure. It's actually associated with failure also outside the dynamic language world - MySQL 6 also existed but never released. The perception of version 6 as a failure - not as a superstition but as a real world fact (similar to the association of the word 'Vista' with failure) - will reflect badly on this PHP version.

        Apparently, according to this PHP 6/7 RFC, version 6 of software is bad

    • Firefox paved the way for absurd version numbering schemes. What are they up to now, version 4004?

    • They will have to version even harder to catch up with Windows, which is already at version 10. Even Android is ahead!

    • by Tablizer ( 95088 )

      It's parallelism in version increments; catch the non-blocking wave!

    • by orudge ( 458780 )

      Microsoft of course has prior history with this - Office jumped from version 4.3 to version 7, as they bumped up Excel, PowerPoint and Access so they all matched Word (Word was previously v6, Excel v5, PowerPoint v4 and Access v2). Then they did the same thing with Visual Studio 6.0 to match VB6 - VC++ went from 4.2 to 6, J++ from 1.1, and InterDev was introduced with v6 being the first version.

      More recently, Microsoft has been skipping version 13 of both Office and Visual Studio.

  • I am genuinely looking for an alternative. Must be scripted for ease of deployment and event driven. Does anyone have any suggestions?

    Thanks.
    • by czehp ( 156215 )

      OK, the scripted part I get. You've got to pay for folks and scripted languages are traditionally cheaper to hire, fine. But the whole "must be event driven" bit sounds like a buzzword requirement, placed in there for no good reason. But hey, who am I to judge, you may actually have a real requirement. In that case the answer is that almost any scripting language can be "event driven" since it's a design pattern and not a feature. Off the top of my head I know there are multiple existing frameworks for py

    • Sure you can find one right here [youtube.com]

  • Amazing to see news on Node.js on slashdot. There has been many important developments with node over the last year but nothing at all on slashdot. Glad to see someone is paying attention to the developments of this very important project.

    Some important features added since v0.12 for instance around synchronous child process execution is essential for node to be utilized on non event based coding styles.

    Regarding merging of node.js and io.js into a common stack supported by the node foundation, this is an

    • The reason for the jump to version 4, semver policy aside, is because iojs consumed 1, 2, and 3 already.

      That matters because nodejs and iojs share the same userland/space/whatever, NPM, where modules can restrict themselves to certain engine versions for compatibility reasons.

      So if I wrote a module that was intended to work in iojs (before the merge) and had an engine property of >=3.0 and the merge of io/node went down to v1.0.0 or v0.13.0, my module is now broken.

      The merge is a bit misleading, Nodejs h

  • by Billly Gates ( 198444 ) on Wednesday September 09, 2015 @10:20AM (#50486319) Journal

    Hey hipsters there is something waay soo cool in Erlang 2.0 aka OTP Pyschobith [youtube.com] beats Node.JS anyday!!!

  • Here's a crazy idea.

    Since, unlike browsers, node.js doesn't have 2 decades of code demanding backward compatibility, why not use node.js to FIX JAVASCRIPT. The Node.js devs could write a pre-process that barfs up big, clear, helpful errors whenever it encounters the kind of risky code BS we all have come to despise.

    Just think, you could feed the typical garbage to node.js and it could spit back things like:

    ERROR: Potential scope conflicts on the following lines. Explicitly declare all variables using "var

    • You get most of that with TypeScript + Visual Studio + Resharper. I just started playing around with Node a couple of weeks ago. I like the simplicity of it. I am a full on MIcrosoft .Net backend developer and I'm a semi-competent web developer (Bootstrap, Jquery, Angular,TypeScript, etc). Before that I was a C and C++ bit twiddler.

Work is the crab grass in the lawn of life. -- Schulz

Working...