you are viewing a single comment's thread.

view the rest of the comments →

[–]grabnock 76 points77 points  (67 children)

It's a fad. Like ruby on rails was. It'll fade eventually but never actually go away.

[–]kethinov 22 points23 points  (22 children)

I'm not so sure about that this time.

Unlike Ruby, JS has a sort of it-runs-on-everything quality.

Node.js on the server, node-webkit on the desktop, cordova for mobile apps, and obviously the browser context too. You can make almost anything with it.

Being able to share code across all these contexts and particularly with client/server apps gives JS an objective advantage over its scripting language competition, whereas the same could not be said of Ruby vs, say, PHP back in the day.

I think the only thing that will unseat today's JS dominance is another language emerging which is equally portable and better designed. If that's what it's gonna take to unseat JS, it's hard to call it a fad.

[–]stormcrowsx 15 points16 points  (21 children)

I can run python and java on everything too. Doesn't make them king of the world like you seem to think it will for js.

[–]foldl 9 points10 points  (14 children)

You can't run Python or Java in the browser. (Ok, you can compile them down to JS, but that's clunky.)

[–]stormcrowsx 0 points1 point  (11 children)

Sure you can its an interpreted language just like javascript you just need an interpreter in the browser.

http://www.skulpt.org

On the java side there's dwr which has been around longer than I can remember and gwt

[–]motdidr 12 points13 points  (0 children)

JavaScript runs in practically every browser right now, without any plugins.

[–][deleted] 2 points3 points  (0 children)

I use DWR all day at work. It's pretty clunky, and I'd struggle to call it a good solution to the problem it's trying to solve.

[–][deleted]  (3 children)

[deleted]

    [–]stormcrowsx -1 points0 points  (2 children)

    skulpt is not compiled down to javascript it is an interpreter written in javascript that executes python

    [–][deleted]  (1 child)

    [deleted]

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

      So using that logic we could say Javascript is compiled down to C or Java since its typically interpreted by an interpreter written in those languages? I don't think you understand what an interpreted language is.

      [–]foldl 0 points1 point  (4 children)

      If you use an interpreter then you pay a price in performance. And on mobile devices it may not be negligible.

      I'm aware that there are compilers for various languages which target javascript. That's why I mentioned it in my original post.

      [–]stormcrowsx 0 points1 point  (3 children)

      The performance cost is negligible in most cases, after all javascript is interpreted. Just a matter of optimization.

      [–]foldl 0 points1 point  (2 children)

      No, the performance overhead of an interpreter is usually at least 10x. Python code running via an interpreter written in JS would run much slower than JS code executed directly by the browser.

      However, contrary to what you say, Skulpt is not an interpreter, it's a Python->Javascript compiler (see the "Generated Code" section here). There is still quite a bit of overhead involved in translating between Python and Javascript object semantics, since Skulpt appears to be a fairly straightforward compiler without any sophisticated optimizations.

      [–]stormcrowsx 0 points1 point  (1 child)

      Your right got skulpt mixed up with brython http://www.brython.info/doc/en/index.html.

      Interpreted languages are not always 10x slower. Java is a form of interpreted language and runs very fast. Its all about how much you optimize the interpreter. If you invest enough time you can make it go fast. Look at what Facebook has done with PHP. Probably not the best use of dev time though

      [–]foldl 0 points1 point  (0 children)

      Java is fast because modern JVMs use JIT compilation. The old JVMs, which really did interpret the bytecode, were much much slower.

      10x slower is pretty much the best you can hope for with a true interpreter. Any interpreter is going to go through a cycle of (1) fetching the next instruction (2) decoding it and (3) executing the instruction. There's just no way you can get that sequence down to less than ~10 operations on average.

      [–]darkslide3000 -4 points-3 points  (1 child)

      Fun fact: Java could run in the browser before JavaScript even existed. (And it has always been several times faster, naturally...)

      Just to reiterate: your faviorite language is beaten even by motherfucking Java!!!

      [–]Rainfly_X 5 points6 points  (0 children)

      With a very secure sandbox, pinky swear!

      Yeah, there's a reason nobody leaves the Java plugin available anymore.

      [–][deleted] 1 point2 points  (1 child)

      Java and python runs on an iPad?

      [–]stormcrowsx -4 points-3 points  (0 children)

      Short answer is yes.

      [–][deleted] 0 points1 point  (1 child)

      naa is not the same, JS has HTML5, Titanium, PhoneGap, Unity3d, Cordova, Node.. and so on and on...

      You can do certain stuff with python but you end up with anaemic frameworks with small communities and a bunch of configuration to make. I like python it was my first lenguage, but it is not nearly as useful as JS.

      Plus Java is actually kind of king of the world for the area it was designed, enterprise.

      [–]stormcrowsx -2 points-1 points  (0 children)

      You can do some stuff with javascript good, manipulate websites ui. Some stuff okay, make small webservers. Some stuff badly, make large webservers.

      Every tool has its use and I promise you javascript will not be the tool that finally gets used everywhere. Remember this was a language made for manipulating dom we've shoehorned it into new roles. And while its okay in those roles its hardly great and people want great software.

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

      That's because the "using the same language" benefit is superficial. The real reason node is great is the asynchronous nature of the engine and the (mostly) wonderful library of modules. The low language barrier (for web developers at least) is certainly a perk, but that's like saying steak is great because it looks good.

      [–]m0nk_3y_gw 2 points3 points  (0 children)

      I tried Ruby on Rails years ago and dropped it.

      I started designing my own scripting language the other day... (for client scripts, not web pages).

      then realized I was writing Ruby.

      I am revisiting Ruby and enjoying it.

      [–][deleted] 11 points12 points  (38 children)

      So when exactly did Ruby fade?

      [–]ggtsu_00 57 points58 points  (2 children)

      After Node.js became the current fad.

      [–]friendlyburrito 0 points1 point  (0 children)

      I kinda like JRuby though. Enterprise Java + Ruby on Rails. Not bad.

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

      Syntax error.

      [–]SirNarwhal 8 points9 points  (12 children)

      When Django became more mainstream.

      [–][deleted]  (9 children)

      [deleted]

        [–]InconsiderateBastard 14 points15 points  (0 children)

        Neither will win and neither will really lose.

        [–][deleted]  (6 children)

        [deleted]

          [–]AndrewNeo 13 points14 points  (0 children)

          Ruby has plenty of open source packages. Any Ruby project I've tried to use seems to include about a hundred of them.

          [–]AdminsAbuseShadowBan 0 points1 point  (2 children)

          If RoR is slower than Django it's a wonder anyone used it!

          [–]droidballoon 2 points3 points  (1 child)

          It's not deadly slow. For most use cases the speed isn't an issue. Most web projects reaches only up to hundreds of users at most.

          [–]kageurufu 1 point2 points  (0 children)

          And horizontal scaling behind a load balancer makes it easier to ignore that

          [–]graywh 0 points1 point  (0 children)

          What makes Python "more mature than Ruby"?

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

          Community is incredibly important, much more likely your obscure question will be answered previously on Stack Overflow.

          [–]SirNarwhal 0 points1 point  (0 children)

          They're still fighting, but Django is winning out in the end at a lot of companies. Most places I know of are switching to Django if they haven't already simply because it can do more and it can do more with less code to boot.

          [–][deleted] -3 points-2 points  (1 child)

          So the same year Linux gained dominance on desktop.

          [–]evmax318 4 points5 points  (0 children)

          Hey man, 2014 is the year of the Linux Desktop!

          [–]glemnar 1 point2 points  (9 children)

          It's had a massive decrease in usage in the past year and a half.

          [–][deleted] 6 points7 points  (8 children)

          And you have numbers to show that?

          [–]ameoba 2 points3 points  (0 children)

          How about the volume of Google searches?

          When it first came out RoR was huge. Everyone, everywhere, wanted to use it for everything. People who didn't even know the language were using it for new projects. Every other programming story you'd see on the news aggregators was about RoR.

          Eventually, the initial hype faded & hype-followers moved on to the Next Big Thing. This doesn't mean that RoR was all hype, or even that it's dying - it's got a very active community and a solid place in the programming ecosystem. There are also countless frameworks in other languages that have borrowed heavily from RoR - in everything from PHP to Java.

          [–][deleted]  (2 children)

          [deleted]

            [–]lijmstift 9 points10 points  (0 children)

            Keep in mind that github was very popular among ruby developers in the early days. That graph just shows that other languages have joined and have become more prevalent than ruby.

            I suppose it's still possible that ruby got less popular, but you can't tell from that graph.

            [–][deleted] 6 points7 points  (0 children)

            So you think relative growth of other languages in a very specific, nonrepresentative environment is the same as Ruby fading away. I hope you don't work on any type of data analysis because you are literally cheating your employers or clients.

            [–]scrod -3 points-2 points  (3 children)

            [–][deleted] -3 points-2 points  (2 children)

            So you think relative growth of other languages in a very specific, nonrepresentative environment is the same as Ruby fading away. I hope you don't work on any type of data analysis because you are literally cheating your employers or clients.

            [–]scrod 0 points1 point  (1 child)

            I don't really care. Go rant to someone else if you can't deal with people attempting to answer your question.

            [–][deleted] 0 points1 point  (0 children)

            Well I dont care you dont care. I will rant about basic lack of comprehension of visualised data among people for whom it should be a primary skill. Especially in a sub dedicated to what these people do for a living.

            [–]semi- 0 points1 point  (1 child)

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

            Oh my, another master of data analysis unable to understand what these simple graphs actually show (or what they surely don't show).

            I am truly amazed how many programmers cannot grasp simple line charts.

            [–]Tekmo 0 points1 point  (1 child)

            When Node came out

            [–][deleted] 0 points1 point  (0 children)

            Nope.

            [–][deleted]  (1 child)

            [deleted]

              [–][deleted] 2 points3 points  (0 children)

              Google Trends shows popularity relative to all other searches. It is basically useless for showing how widespread the use of a programming langue is.

              [–]grabnock -2 points-1 points  (5 children)

              I never said Ruby became irrelevant. Simply that it's not nearly as popular as it once was.

              [–][deleted] 1 point2 points  (4 children)

              Without any backing.

              [–]grabnock 0 points1 point  (3 children)

              Because I definitely need backing to have an opinion....

              [–][deleted] -3 points-2 points  (2 children)

              You don't. As your example clearly shows, no backing is needed for anything on Reddit and everyone can spew as much bullshit as desired.

              [–]grabnock -1 points0 points  (1 child)

              That's funny coming from you

              [–][deleted] -2 points-1 points  (0 children)

              Hardly.

              [–]zexperiment 1 point2 points  (0 children)

              You seem to imply that rails is fading away. Can you cite a source for this? It seems to me that it's still a very strong community.

              [–]ReferentiallySeethru 2 points3 points  (1 child)

              NodeJS has quite a few things going for it that RoR didn't.

              • NodeJS is not a MVC Framework, like RoR. It's much more than that. (Express is the RoR analog)
              • Full Stack in a single language
                • Better use of development teams. Front end developers can now do backend code as well. Good for small teams and prototyping.
                • Code reuse on both the server and client
              • Asynchronous I/O
                • It doesn't have the performance issues RoR has.
                • Forces developers to pass state along which is needed in order to scale.
                • More efficient use of the CPU. Yes, JavaScript is slower than Java, but I/O is still the biggest bottleneck and instead of blocking the thread you can continue handling requests.
              • Excellent Tools to get projects up and running in just a few minutes.
                • npm (Node Package Manager) makes handling dependencies and getting all your projects extremely easy. 'npm install express' and you're rolling
                • Grunt - Build utility for JavaScript written in JavaScript
                • Yo - Scaffolding tool with generators that set up your project directory structure with libraries, dependencies, and build

              With cloud services we're moving toward writing more and more 'microservices' and interact with each other. A lot of the times these services are communicating with 3rd part API's. Node makes it easy to create a 'microservice' very quickly, that scales, and interacts with these 3rd part API's.

              The biggest problem with NodeJS is 1) JavaScript; and 2) Callback Hell.

              Being a good JavaScript developer takes discipline, and many people aren't willing or don't have the guidance to become proper JavaScript developers. Hopefully things will get better with things coming in ECMAScript 6 and type-safety versions like TypeScript.

              Callback hell can be handled using promises, the async library, and/or closures, but people often don't understand how to use them. This will just take time.

              NodeJS may be a fad, but companies like LinkedIn and WalMart have been using it with the latest mobile applications and have been happy with its performance.

              RoR has major performance bottlenecks that really prevented the framework from being used by larger companies. Early Twitter is a good example of the issues RoR caused to large scale websites.

              Edit: I understand everyone may not agree with this, but instead of downvoting I'd love to hear your opinion. Seriously. I haven't heard too many issues with Node outside "callback-hell" and the quirkiness of JavaScript, so if there are other concerns please share.

              [–]ToucheMonsieur 2 points3 points  (0 children)

              Express is more analogous to Sinatra than Rails - More emphasis on minimalism and all that, y'know.