News for hackers. Stuff that matters.
Re:Python vs. Node vs. PyPy benchmarks by tferris on Sunday February 17, 2013 @04:50AM (#5234753)
Node/V8 is a beast and will dominate web development in few years.

EDIT: Downvote me, I don't care.

Re:Python vs. Node vs. PyPy benchmarks by pestaa on Sunday February 17, 2013 @05:30AM (#5234838)
If the web development industry moves from PHP to JavaScript as the main backend language... well, from quality perspective nothing will change. IMO.
Re:Python vs. Node vs. PyPy benchmarks by espadrine on Sunday February 17, 2013 @08:47AM (#5235167)
If one company gave you a PHP job, and another a JS backend job, and that'd be all you got, would you flip a coin to pick one?

Or is this a way to say that you feel more satisfied with your work in Python than with your work in node?

Re:Python vs. Node vs. PyPy benchmarks by pestaa on Sunday February 17, 2013 @11:15AM (#5235596)
This is my way to say several points:

- If the majority of our industry can make the switch to JavaScript, they'll ruin it in terms of average code quality.

- Even good, idiomatic JavaScript code sucks for reasons inherent in the language.

- I wish people wrote just good enough Python or Erlang or Haskell or whatever code instead of excellent PHP/JavaScript.

So yes, I treat PHP and JavaScript backend jobs equally.

[Edit: grammar.]

Re:Python vs. Node vs. PyPy benchmarks by tferris on Sunday February 17, 2013 @11:54AM (#5235733)
JS is a modern and beautiful language, comparing it with PHP is bold. People fighting Node are just afraid to change and to start from zero again, they fear the truth.

No other language offers C-class speed, that rich ecosystem (which is fully async) paired with such an easy approachability plus the best and most modern package manager around. Speed is not everything but users won't tolerate unresponsive web services based on sluggish language implementations and cumbersome frameworks anymore, it's not 2005.

Why do you think did Airbnb, LinkedIn and many more choose Node in production for high traffic apps?

Don't get me wrong, Python, Erlang, Haskell are great languages, I love them all but since V8/CrankshaftJIT/Node, JS is playing in a different league with an amazing cost-benefit ratio and I am confused by people ignoring this (however, I see rather Go and Clojure as real contenders to JS since they offer modern language concepts too paired with speed and real concurrency but they are again compiled and deploying JVM based stuff (Clojure) is no fun at all).

Re:Python vs. Node vs. PyPy benchmarks by rlander on Tuesday February 19, 2013 @12:31AM (#5242824)
> deploying JVM based stuff (Clojure) is no fun at all).

In what world is typing "lein uberjar" and moving the resulting file to your webserver considered hard?

Re:Python vs. Node vs. PyPy benchmarks by rgbrgb on Sunday February 17, 2013 @11:40AM (#5235672)
>> Even good, idiomatic JavaScript code sucks for reasons inherent in the language.

Care to elaborate?

Re:Python vs. Node vs. PyPy benchmarks by dguaraglia on Sunday February 17, 2013 @12:23PM (#5235866)
I'll just throw a couple pet-peeves of mine in here:

- No proper packaging/namespacing

- Completely idiosyncratic results when operating with mixed data types (10 + 'p' = '10p', 7/0 = 'infinity' and all that)

- Variables default to a pseudo-global scope

- Prototype based 'inheritance', while cool, is just cumbersome and inelegant compared to languages that have proper object oriented language constructs

- Take all those and a syntax that was partially taken from Java, and you end up with verbose code jumble that is way more difficult to read than equivalent Python/Ruby (even C#)

Re:Python vs. Node vs. PyPy benchmarks by tferris on Sunday February 17, 2013 @01:13PM (#5236076)
- No proper packaging/namespacing

http://nodejs.org/api/modules.html

- Completely idiosyncratic results when operating with mixed data types (10 + 'p' = '10p', 7/0 = 'infinity' and all that)

I wouldn't call it idiosyncratic but just use Underscore and you are fine.

- Variables default to a pseudo-global scope

just use 'var' when declaring them

- Prototype based 'inheritance', while cool, is just cumbersome and inelegant compared to languages that have proper object oriented language constructs

Any OO is cumbersome and should be used only when it makes sense. If you don't like prototype based inheritance you can still use traditional OO with extra libs.

- Take all those and a syntax that was partially taken from Java, and you end up with verbose code jumble that is way more difficult to read than equivalent Python/Ruby (even C#)

Sorry to disagree again but there are many people preferring bracket based languages over those omitting them. You can quickly identify blocks and navigate through the source. And JS isn't verbose like Java.

JS has its quirks like any other languages but these are just very few and you get tons of amenities in return.

Re:Python vs. Node vs. PyPy benchmarks by dguaraglia on Sunday February 17, 2013 @09:30PM (#5237817)
I don't mind languages using brackets. I used to do a lot of C and C# development and it never bothered me. The problem is that, at least to me, a Javascript code base of around 2000 lines already becomes unreadable, specially when you consider some common patterns like 'declare a function to define a namespace'. You normally end up with functions inside of functions, calling jQuery event handlers by declaring yet another inline function... By the time you use a 'for' loop, you already are 4 indentation levels/brackets in. Messy.

As you say, libraries work around a lot of these problems, but most of these workarounds are hacks. 'require.js', for example. And you shouldn't need to use underscore to get sane typing. About OO... It's debatable, I think languages like CoffeeScript and TypeScript have done a good job of abstracting the weirdness, but that's the thing: they are languages that compile to Javascript.

Anyway, I like Javascript, don't get me wrong, it's just that I don't think it's a great choice for big codebases. I know I get a lot of hate every time I say this, but to me Node.js is an excellent example of using the right tool for the wrong job. Had the energy been put behind developing the same concept as a library to a language with a decent standard library, so much work would've been saved 'catching up'.

Re:Python vs. Node vs. PyPy benchmarks by MostAwesomeDude on Sunday February 17, 2013 @07:48PM (#5237495)
I would rather be out on the street busking.
Re:Python vs. Node vs. PyPy benchmarks by lucian1900 on Monday February 18, 2013 @09:11AM (#5238326)
While JS is quite flawed, it's nowhere near as bad as PHP. If JS kills all usage of PHP, the world will be a better place.
Re:Python vs. Node vs. PyPy benchmarks by lucian1900 on Sunday February 17, 2013 @06:54AM (#5234963)
V8 and PyPy are similarly fast runtimes, but this benchmark tests libraries against each other. Not particularly relevant, especially as at least two of them are known to have slow IO.
Re:Python vs. Node vs. PyPy benchmarks by tferris on Sunday February 17, 2013 @11:11AM (#5235584)
As good as pypy is it's no replacement for python yet.

http://stackoverflow.com/questions/12867263/why-wasnt-pypy-i...

Re:Python vs. Node vs. PyPy benchmarks by malkarouri on Sunday February 17, 2013 @05:33AM (#5234844)
I actually don't think so, not that I have downvoted you. V8 was such a breakthrough at the time, it blew off the competition. Since then, many competitors have picked up the tricks and as shown in the bennchmark, uWSGI holds its own against Node/V8. As a result, the Node/V8 combination is not going to be so dominant in a few years in terms of performance. Another factors will come into play such as the language and the libraries available (the ecosystem). I would find it much harder to predict the dominance of the Noode/V8 ecosystem compared to that of Python or Java in a few years' time.
Re:Python vs. Node vs. PyPy benchmarks by jessedhillon on Sunday February 17, 2013 @12:06PM (#5235798)
I think this is it exactly. The pace at which infrastructure, support and tools in "competing" ecosystems can be improved will outpace the rate at which people's miss can be changed about JS. There are 10-15 years of the language's, most of which were a Very Bad time for it's reputation, and only recently has the community of developers begun to land on solid development principles -- and you can hardly call those universal. I think most people fear callback spaghetti when they think of diving into someone else's JS code.
Re:Python vs. Node vs. PyPy benchmarks by zokier on Sunday February 17, 2013 @05:14AM (#5234805)
That'd be true if performance would trump productivity in web development. On the other hand, I don't see a lot of web-apps written in C...
Re:Python vs. Node vs. PyPy benchmarks by tferris on Sunday February 17, 2013 @05:27AM (#5234833)
Give Node s try before judging, Node gives you same productivity as other popular languages used for web development but with C-class performance
Re:Python vs. Node vs. PyPy benchmarks by newman314 on Sunday February 17, 2013 @07:00AM (#5234981)
Ummm, where are you getting that node has C-class perf?
Re:Python vs. Node vs. PyPy benchmarks by NuZZ on Thursday February 21, 2013 @07:32AM (#5257002)
A quick google [1] results in this article. Look for JS:V8 - Node runs off of that. Most of the graphs I glanced at show it's very close to C. I glance because I've properly checked out other benchmarks which confirm this.

[1] http://attractivechaos.github.com/plb/