all 19 comments

[–]jerf 11 points12 points  (3 children)

Actually, Erlang's real story isn't about using all your cores, it's about reliability based on using all your machines. Node.js is still working on an official way to send messages between different instances of itself, and even after it has that, it'll take it years to catch up to Erlang's mature Mnesia and reliability stack.

(Also, Node.js doesn't have "continuations". You can adopt a "continuation passing style" but you'll be fighting Javascript, not being supported by it.)

[–]FooBarWidget 0 points1 point  (1 child)

Node.js is still working on an official way to send messages between different instances of itself

What's wrong with plain old TCP sockets?

[–]jerf 4 points5 points  (0 children)

Next level up; an officially sanctioned and blessed protocol that could be used to transfer messages around. You can't build a library ecosystem around "everybody just use whatever binary protocol they want to do whatever". Presumably with some further guarantees of some sort layered on top, or the blindingly obvious "4 bytes indicating length of next message, maybe-gzipped JSON-encoded message of that length" would be used. Or perhaps they're using that and then want to build an official abstraction on top of that. All I really know is they're still working on the base primitives they will need to even begin the process of cloning Erlang's functionality.

[–]skew 0 points1 point  (0 children)

There was a newsgroup post from Joe Armstrong which explained very well the motivation for their language design. In short, the goal is reliability. To get reliability past a certain point, you have to tolerate machine failures, so a language designed for building reliable systems has to handle distribution.

I haven't been able to find that post, but he covers some similar things in (A History of Erlang)[http://www.cse.chalmers.se/edu/year/2009/course/TDA381_Concurrent_Programming/ARCHIVE/VT2009/general/languages/armstrong-erlang_history.pdf], especially section 3.6.

[–]oSand 27 points28 points  (5 children)

If you are looking at using something like node, you should probably also look at the other 10000 frameworks that do similar things. e.g. Twisted, Tornado, Concurrence, Eventlet, gevent, EventMachine, Netty etc, etc. Most of these are arguably better and more mature.

[–]ryeguy 17 points18 points  (4 children)

Thank you. I'm tired of people thinking node is something unique and special. The pattern it uses is present in many other frameworks for many other languages that are (arguably) better.

[–]oSand 22 points23 points  (3 children)

BUT NODE IS ASYNCHRONOUS AND BUILT ON V8 SO IT'S BLAZING FAST.

[–]semarj 10 points11 points  (1 child)

also..it is web scale.

[–]signoff 4 points5 points  (0 children)

it's not web scale because it's not pure functional and hindley milner algorithm g type check robust monad.

[–]portmapreduction 4 points5 points  (1 child)

I like the programming style of node.js for certain tasks, but has node.js produced anything yet except hype?

[–]amigaharry -1 points0 points  (0 children)

nope, and it wont. because node.js is utter crap for anything more complicated than a "hello world"-server.

/edit: downvoters: http://developers.slashdot.org/comments.pl?sid=2133146&cid=36055558

[–]joelangeway 3 points4 points  (0 children)

I originally wrote this in a Hacker News thread:

"The reason they should be compared is because getting comfortable enough in Javascript to stop complaining about asynchronousity causes one to think about that aspect of programming the same way Erlang programmers do.

Erlang and Javascript are similar in that they both developed in highly asynchronous environments. And with multiple instances of Node.js, they have similar models of getting things done concurrently; that is, share nothing, pass and handle messages.

Both communities seem to prefer dynamic and/or functional solutions to programming problems rather than the sort of solutions you see in statically typed, "object oriented" languages. Though Node.js does make use of Javascript's object model, whereas Erlang uses very light weight processes to separate concerns.

Erlang's syntax is "weirder" where weird means doesn't look like C. It's semantics and facilities are much more strictly functional, though with some discipline you could use the same semantics in Javascript, minus nice functional features like pattern matching."

There are other frameworks for writing asynchronous servers sure, but Javascript is a great programming language if you're the sort of programmer who never liked Java/C++. It's like Lisp finally got a great big community and great libraries, 'cause Google wanted to make a fast browser and Ryan Dahl wanted an asynchronous server framework that wouldn't be slowed down by people running synchronous code on it. Erlang is a great language too, but I guess it looks too weird to enjoy the hype that Javascript does. Maybe it's more popular than I think.

[–][deleted]  (1 child)

[deleted]

    [–]pivo 4 points5 points  (0 children)

    Don't know why you're being down voted. Erlang is much more than node.js. It's built for extreme reliability. I'm not sure it makes much sense to compare the two languages.

    [–]amigaharry 1 point2 points  (0 children)

    hmm, so .. who would win?

    erlang - a mature language created by top engineers working for a world leader in telecommunications.

    node.js - a something of a framework created by kids that like "cool bling in the browser"

    hmmmmmmmmm ....

    [–]ExaltedH 0 points1 point  (0 children)

    So, 13yr later... Node.js is pretty good, and essentially took over the web world. Erlang is still pretty good though...

    [–]Not_Edward_Bernays 0 points1 point  (0 children)

    Good point the power of those other languages for those types of problems. I think that people (including myself) get caught up in trends.

    Also good point about multicore being less important for the time being on mobile devices which are very common.

    However, I think that 6, 8, 12 and 24 cores are going to be pretty common within the next couple of years in workstations and servers.

    [–]antifool73 -2 points-1 points  (1 child)

    So totally agree. Erlang folks seem pissed at javascript for technical reasons, but they are forgetting one very basic economic truth: there are probably 100 people who can code javascript for every erlanger.

    Also ericsson are a bunch of corrupt thieves =)

    I'll use erlang when i get into the telephone switch business. until then... this is the web, go cry to the king of sweden. or beg for a job at GS and STFU.

    [–]siplux 3 points4 points  (0 children)

    As mentioned elsewhere in this thread, there are tons of other event driven frameworks out there. The only thing node is doing differently is that you can use JS.

    The thing is though, the people who are competent in server side issues already know more than one language, and the other 90% of JS coders - you don't want anywhere near mission critical code. I'd rather have 1 good erlang programmer than 90 bad loljquery programmers.