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."
Hate in 3, 2, 1... (Score:1)
Can't wait to read all about the hate slashdot has for node.. again.
Re:Hate in 3, 2, 1... (Score:5, Insightful)
I think it is JavaScript hate, not Node hate.
Re: (Score:1)
I thought it was just the written language he uses to command his minions...and one of them just tried to automate his task using his computer...and now he has assigned Google to try to make a better version...
Re: (Score:1)
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.
Re:Hate in 3, 2, 1... (Score:5, Funny)
> 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.
Re: (Score:2)
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]
Re: (Score:2)
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.
Re: (Score:1)
You do that because there are cases where you don't want it to add semicolons.
Re: (Score:2)
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
Re: (Score:3)
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"]
Re: (Score:3)
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.
Re: (Score:2)
> Idiotic is an understatement. The entire language is one Pit of Failure followed by another.
Any alternative suggestions? Decent languages that run in the browser and have some semblance of a user base (e.g. ClojureScript) require a transpilation step, which is either around 10s or more with a nontrivial system, or you need to manually set up some dependency hierarchy so as to recompile only the changed file, so the latency is sub-second. UI development is so much easier if there's essentially no latenc
Re: (Score:2)
Re: (Score:1)
In your YouTube link, seconds after your quote, Crockford follows on with this:
Re:Hate in 3, 2, 1... (Score:5, Insightful)
> 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
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
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:
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:
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
Re: (Score:1)
Re: (Score:2)
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
Re: (Score:2)
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.
Re: (Score:2)
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
Re: (Score:2)
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.
Re: Hate in 3, 2, 1... (Score:2)
TypeScript + a good IDE solves most of JavaScripts problems.
Re: (Score:2)
> Then perhaps this should not have been allowed by the language?
Here's the thing. JS is in the browser and other languages aren't similarly embedded and supported. So once you accept this part of what surrounds us (i.e. reality) maybe your enquiry will shift from asking and bizarrely insisting on how many ways there are to shoot yourself on the foot. Many of the JS weirdness comes from an early decision to avoid runtime code failure, and just return something, for the obvious reason that it's better for
Re: (Score:2)
You intentionally misrepresent the GP. He didn't say, exclusively or fully FP. If it is possible and convenient to do FP in JS, then I think what the GP said is fair - and it is. Doesn't matter that if you so choose, you can program fully imperatively as well. A programming language shouldn't mainly be used as a straightjacket, but as a tool that empowers you to make things. Sure you can use a hammer to open jars but it's not necessarily the tool's inherent fault.
Re: (Score:1)
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)
Re: (Score:2)
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.
Re: (Score:2)
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.
Re: (Score:2)
Large parts of the of the user-facing websites of Walmart are running on node.js
That's also a popular website ;-)
Re: (Score:2)
Ohh, and Paypal too: https://www.paypal-engineering... [paypal-engineering.com]
Also not a small website.
Re: (Score:1)
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.
Re: (Score:2)
...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
Re: (Score:2)
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]
Re: (Score:3)
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.
Re: (Score:1)
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.
Re: (Score:3)
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.
Re: (Score:2)
Re:Hate in 3, 2, 1... (Score:5, Insightful)
Node.js is webscale. It has the efficiency of javscript with the complexity of assembler [youtube.com].
Re: (Score:2)
Not saying it's the best thing since sliced bread. Just saying some large websites made it work well for them and they kept using it. They didn't go back to how they were doing it before.
Re: (Score:2)
Never noticed that problem.
But I hear people say the same thing about Chrome. But only on machines that have the RAM available.
And they both share the same V8 Javascript engine. So I assume V8 just keeps RAM if it's available.
Re: (Score:2)
Hmmm... Never heard of Visual Studio?
Re: (Score:2)
Actually, not even that. It's not hate against node.js per se, but against the hordes of slobbering dev teams who will immediately demand that it go right into production without so much as a QA pass, because, you know, it's got electrolytes!
Okay, only mildly exaggerating, but seriously, let's at least prove it in the dev environment first, campers. ;)
That's the problem with scripting languages. You can hack out something that looks like a finished product in a day or 2.
Actually making an app fit for human consumption, however, takes just about as long as it does for any product. It has been demonstrated over and over that the time to produce a fully-finished app is pretty much the same for any language or platform and the only real difference is which part of the lifecycle that time is spent in. By front-loading the visible parts of the process, the ill
Node (Score:5, Funny)
Re: (Score:2, Insightful)
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?
I don't know, do you prefer Toyota or 4-lane motorways?
(They're kind of not the same thing.)
Re:Node (Score:4, Funny)
XML already contains Nodes, duh
Re: (Score:2)
I was thinking the same thing. 4.0 broke NPM though :(
Re: (Score:3)
Re: (Score:2)
In one sense, this is the magic of the open source community and work: differences erupt, forks are drawn and then things cool down and a single code base emerges. The creation of the Node Foundation and uniting into a single code base means that we can torture Slashdot with stories of server-side Javascript for years to come.
Countless? (Score:2)
Well, maybe, especially if you don't bother counting...
Re: (Score:2)
Re: (Score:2)
Countless means literally "without count". Magnitude has no bearing on it except insomuch as it may affect how practical it might be to count it in the first place.
Consider that if X < Y, and Y is not too many to count, then X cannot actually be too many to count either.
For example, while the number of breaths you will have taken in your lifetime before you die can easily be said to be countless... that number is certain to be far less than, for example, the number of times a cesium 133 atom oscil
Quite a version jump (Score:2)
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
Re:Quite a version jump (Score:4, Informative)
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.
Re: (Score:2)
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!
Re: (Score:3)
Good luck with you IPv5 setup.
Re: (Score:2)
Re: (Score:2)
Actually, that's so that apps searching for "Windows 9" to match "Windows 95" or "Windows 98" wouldn't get a positive match.
You Missed the BEST One (Score:2)
Apparently, according to this PHP 6/7 RFC, version 6 of software is bad
Re: (Score:2)
Firefox paved the way for absurd version numbering schemes. What are they up to now, version 4004?
Re: (Score:1)
Re: (Score:2)
Re: (Score:2)
They will have to version even harder to catch up with Windows, which is already at version 10. Even Android is ahead!
Re: (Score:1)
It's parallelism in version increments; catch the non-blocking wave!
Re: (Score:1)
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.
Re: (Score:2)
Exactly. Node is a solution looking for a problem, the problem being that people who only know JS only want to know JS. In their near total lack of wisdom they see everything as a nail, being armed with a Fisher-Price hammer. JS should stay quarantined in the browser.
Re: (Score:2)
As a web developer, it's attractive to me because it would let me write my server-side and client-side code in the same language. It's a small nicety, not an earth-shattering advantage, which is why I haven't used Node yet.
In fact, I've grown so accustomed to Apache, with all its modules and short-and-sweet "programming" with just a few lines of declarative-language directives, that it's going to be hard to pull me to Node, or even Nginx for that matter. I guess maybe if I were writing a real-time chat or v
Re: (Score:1)
Unless one thinks JS is a POS language and doesn't want it on the server either.
Any other event driven scripted HTTP servers? (Score:2)
Thanks.
Re: (Score:1)
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
Re: (Score:2)
I hear EcmaScript is pretty popular these days, and it has a standard.
Re: (Score:2)
Sure you can find one right here [youtube.com]
Re: (Score:1)
Undoing accidental mod
Node exists on /. ? (Score:2)
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
Re: (Score:2)
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
OMG Erlang on Rails aka Pyschobitch is here!! (Score:3)
Hey hipsters there is something waay soo cool in Erlang 2.0 aka OTP Pyschobith [youtube.com] beats Node.JS anyday!!!
Crazy Idea (Score:1)
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
Re: Crazy Idea (Score:2)
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.
Re: (Score:2, Interesting)
There was a call for you on the EU cloning ban thread, be sure to stop there before you log out.
Re: (Score:2)
It's funny how much slashdot hates javascript, yet it is still the most popular and most used language.
JavaScript isn't even close to the most used language [tiobe.com].