Slashdot Mirror


Gnome Goes JavaScript

mikejuk writes "Much to most programmers' shock and dismay Gnome has made JavaScript its main language for apps. It will still support other languages and it still supports C for libraries, but for apps it is JavaScript that rules. JavaScript seems to be a good choice for Gnome 3, as the shell UI is written in the language. It is also consistent with the use of JavaScript in WinRT, Chrome Apps, and FirefoxOS apps, and generally the rise of web apps. As you might expect, the initial reactions are of horror at the idea that JavaScript has been selected rather than the favorite language of the commenter. There is a great deal of ignorance about (and prejudice against) JavaScript, which is often regarded as an incomplete toy language rather than the elegant and sparse language that it actually is."

64 of 387 comments (clear)

  1. Aprils Fools? by Anonymous Coward · · Score: 5, Funny

    Some body misplaced a calendar?
    Aprils Fools is in two months time.

    1. Re:Aprils Fools? by marsu_k · · Score: 2, Insightful

      Uhh, what? You're not making any sense. It's debatable whether Javascript is an ideal language for this kind of usage (personally, I'm quite liking Qt Quick/QML), but if your browser has a hole that allows an attacker to run arbitrary commands on your desktop you're screwed, no matter what language your desktop is written with.

    2. Re:Aprils Fools? by TheRaven64 · · Score: 3, Insightful
      JavaScript, as TFS said, has some nice features. It's a pure object-oriented language with first-class closures, prototype-based inheritance and introspection. It's very flexible and really great for rapid prototyping and scripting. The problem is not that JavaScript sucks, it's that JavaScript sucks as an application development language. It has no concept of modularity: everything lives in the global namespace and must be parsed and executed as a linear sequence (modulo web workers). It has no declarative structure: your program imperatively builds the run-time structures. It has weak support for arithmetic: double-precision floating point values are the only numeric type.

      Writing complex applications in JavaScript is possible, but so is writing complex applications in assembly. That doesn't make it a good idea.

      --
      I am TheRaven on Soylent News
  2. Read more facts here by Anonymous Coward · · Score: 5, Informative

    Read more about the reasoning and decisionprocess here:

    http://treitter.livejournal.com/14871.html

    1. Re:Read more facts here by MrEricSir · · Score: 5, Informative

      What the summary seems to be leaving out is this: Javascript will be the language they suggest n00bs who want to learn Gnome programming start with.

      That's really the only change being made here. They're not re-writing apps in Javascript, they're not removing existing language support. This is purely an advisory statement for first-time Gnome programmers.

      --
      There's no -1 for "I don't get it."
    2. Re:Read more facts here by Anonymous Coward · · Score: 5, Funny

      Its clear that x86 asm is the predfered language for noobs to write proper Gnome Apps.

    3. Re:Read more facts here by Anonymous Coward · · Score: 3, Informative

      This kind of false reporting seems to be occurring more frequently around here. Either the editors really are as incompetent as their grammar typically suggests, or they are deliberately misleading us in order to generate traffic.

      I say we have a slashdot poll on it.

    4. Re:Read more facts here by Xtifr · · Score: 2

      It's cyclic, and nothing new. There's some standard line I'm supposed to use here. Get off my lawn...no, that's not it. Oh yeah--you must be new around here. :)

    5. Re:Read more facts here by Yetihehe · · Score: 2

      Ok, NOW I know how this could happen: http://thedailywtf.com/Articles/Stargate-Code-of-the-Replicators.aspx. Looks like JavaScript is the future.

      --
      Extreme Programming - Redundant Array of Inexpensive Developers
    6. Re:Read more facts here by hackula · · Score: 3, Interesting

      Hmmm... javascript is pretty much the exact opposite of lock in. It is the closest a language has really come to being "write once run anywhere". Even most node.js stuff runs in the browser and vis versa with ease.

    7. Re:Read more facts here by Ceriel+Nosforit · · Score: 4, Funny

      Why is this funny? Assembler was the first programming language I really understood because it's so simple to see what's going on in it. What I struggled with was object orientation because I thought objects were redundant with classes. It seemed philosophical compared to how concrete a stack and an arithmetic unit is. I knew what the circuits of the latter looked like and even knew about electrons and holes.

      Unless you've been living under a rock the past decade you know the Internet runs on Javascript because it is non-blocking. I don't expect most of the Slashdot crowd to know what that means anymore, nor why halting is a problem. I'll appeal to authority instead and tell you that it is what Google uses and Google cares about the responsiveness of the UI. Slashdot's favorite mobile phone, the N9, uses QML and Javascript for the UI and wow have you been happy with it until now!

      People complain about how it's easy it is to screw things up in Javascript. It's pretty easy to write a recursive loop in C and mess up the exit too. Javascript has frameworks, and if you use the Chrome Inspector you can actually see the variables update at a high FPS and then drop to a crawl when the tab loses focus. You don't need to compile anything. With just CSS and jQuery you can start doing useful things in your daily environment.

      IMO an example of a truly monstrous language is Java. It just seems idiotic that that by writing the same thing in three slightly different ways you'll somehow come up with more robust code. It's like a language that was never meant for humans to write, but for some reason we were supposed to read it. Yet it's ECMAscript that's considered harmful??

      --
      All rites reversed 2010
    8. Re:Read more facts here by MrEricSir · · Score: 2

      It's a subtle play for platform lockin using the next generation of coders as tools.

      Right, because if they learn Javascript they'll NEVER move to Qt! ...oh wait.

      --
      There's no -1 for "I don't get it."
  3. Enough rope by Anathem · · Score: 3, Interesting

    Javascript is fine, it just give you enough rope to hang yourself. (and a little extra, as it turns out) The language itself has some patterns that allow for terrible patterns, and ambiguity, but all in all, I don't think it's bad. Waiting for someone to disagree...

    1. Re:Enough rope by SQLGuru · · Score: 5, Insightful

      TypeScript (http://www.typescriptlang.org/) adds some rigor on top of JavaScript that helps keep you from shooting your foot as often. It "compiles" down to JavaScript, so it shouldn't limit what you can do, but it makes it feel a little more like a real language.

      But I'm fine with JavaScript. I think that it's a decent first language since the bare minimum tools you need are on all of the devices you can buy today (you just need a text editor and a browser to get started).

    2. Re:Enough rope by Austerity+Empowers · · Score: 5, Interesting

      You could argue C gives you all the rope you need as well.

      I keep asking myself "what language should I learn that's accepted everywhere, doesn't have to be compiled for a particular processor, and has a truly cross platform UI". Javascript is it, with C coming in a heavily qualified second, Java most 3rd except for that fruit company (and I know Java, but hate it passionately).

    3. Re:Enough rope by jythie · · Score: 4, Informative

      Python has also made some good advances for those criteria, esp if you couple it with something like wxPython.

    4. Re:Enough rope by serviscope_minor · · Score: 5, Funny

      You could argue C gives you all the rope you need as well.

      C gives you all the rope you could ever want, wraps it wround your neck and encourages you to run very fast across a long, wobbly plank.

      Oh, and don't forget to free() the rope when you're done with it.

      --
      SJW n. One who posts facts.
    5. Re:Enough rope by hobarrera · · Score: 2

      While I really like C, I think it doesn't remotely qualify as "doesn't have to be compiled for a particular processor".

    6. Re:Enough rope by elucido · · Score: 2

      You could argue C gives you all the rope you need as well.

      I keep asking myself "what language should I learn that's accepted everywhere, doesn't have to be compiled for a particular processor, and has a truly cross platform UI". Javascript is it, with C coming in a heavily qualified second, Java most 3rd except for that fruit company (and I know Java, but hate it passionately).

      Python is a better language than Javascript. Why did they choose Javascript over Python?

    7. Re:Enough rope by hobarrera · · Score: 3, Informative

      PySide is quite powerful as well, and can be used for both desktop and mobile development.

    8. Re:Enough rope by gstoddart · · Score: 5, Insightful

      C gives you all the rope you could ever want, wraps it wround your neck and encourages you to run very fast across a long, wobbly plank.

      I always like to think of it as being more that C leaves ropes, cliffs, pointy objects, and a few angry bears wandering around -- and it's up to the user to to look out for themselves.

      If you know how to navigate it, and keep your wits about you, you'll mostly be fine. But if you're running around with your eyes closed or don't have adult supervision, you could really get hurt.

      It doesn't actively come after you, but there's no safety nets either.

      --
      Lost at C:>. Found at C.
    9. Re:Enough rope by Anonymous Coward · · Score: 5, Funny

      Because then people would be bitching endlessly about The Whitespace Thing, whereas JS has the curly braces that God and Dennis Ritchie intended.

    10. Re:Enough rope by Cro+Magnon · · Score: 3, Funny

      I've heard that C++ gives you all the rope you need to string yourself up and bind and gag everyone in the neighborhood.

      --
      Slow down, cowboy! It has been 4 hours since you last posted. You must wait another few hours.
    11. Re:Enough rope by Anonymous Coward · · Score: 4, Insightful

      C gives you all the rope you could ever want, wraps it wround your neck and encourages you to run very fast across a long, wobbly plank.

      I'd rather take the OP's version.

      You could argue C gives you all the rope you need as well.

      with the qualifier that far too many people do not know how to handle that much rope, so in the process they get it knotted and accidentally wrapped around various things, neck included. But otherwise C does not actively wrap rope around necks, it just doesn't have anti-neck-wrapping safeties for ropes.

    12. Re:Enough rope by ohnocitizen · · Score: 2

      wxPython is unfortunately a bit of a mess. Platform specific bugs make it unusable as a cross platform toolkit, imo.

    13. Re:Enough rope by Dcnjoe60 · · Score: 4, Informative

      Python has also made some good advances for those criteria, esp if you couple it with something like wxPython.

      The developers talked about python quite a bit, but what caused them to go javascript as the recommendation for n00b gnome developers is that is (javascript) is so pervasive in other systems that it is likely they will already be exposed to it and can build upon that. If you are doing web, iOS or Android programming, chances are you are or have used javascript. That plus all of the gnome-shell stuff being done in it makes it kind of a no-brainer as that is what a lot of new developers are interested in extending.

      The gnome developers went out of their way to explain that python, c and are all still fully supported and that javascript is just what they are steering new developers to when asked the question about what language.

    14. Re:Enough rope by the_B0fh · · Score: 3, Funny

      Obviously that's because anyone who uses C++ is heavily into BDSM.

    15. Re:Enough rope by rs79 · · Score: 2, Interesting

      I learned C when it was two years old and have touched the mimeograph Bell Labs C manual with dmr's penciled in notes (yes, I'm bragging). I did computer languages at Waterloo and have written a few at least one of which is still in use today. So I make a point of trying all these new languages that come out and I've tried them all from Snobol to Erlang. They're all fucking retarded.

      JavaScript rawks. Utterly. Among my friends I've noticed they've all quietly moved to js and node.js independently, as I have. It's really that good, so this is an obvious and wise choice.

      It's just a pity about the name, Java is so bad and JavaScript so good; ECMAscript doesn't exactly roll off the tongue though. It this point I think it would be most prudent to kill off the current Java (or rename it LarryScript) and rename Javascript as Java so Java can finally live up to it's promise.

      --
      Need Mercedes parts ?
    16. Re:Enough rope by rs79 · · Score: 4, Informative

      If you're unclear why, watch the 8 hours of doug crockford's videos about and and you'll get it. there's a lot more academic rigor in js than most people have any idea about. it's good stuff.

      --
      Need Mercedes parts ?
    17. Re:Enough rope by jythie · · Score: 4, Informative

      Yeah, that produces a bit of a barrier. Once one has a good feel for what works everywhere and what does not it can make a good tool (I develop wxPython apps for Linux/Windows/OSX) but the 'oh wait, that doesn't work here' traps can be discouraging. Their documentation has improved significantly in that regard though.

    18. Re:Enough rope by jythie · · Score: 2

      I am not sure I completely agree at this point. The cases where you get significantly better performance out of other languages are very task specific. Sometimes thing like manual control over memory allocation can make a huge difference, but most of the time it comes out pretty even.. and no language really escapes big O, which when your sets get large enough, the differences between languages can quickly become trivial.

    19. Re:Enough rope by Chemisor · · Score: 4, Funny

      Don't worry: the rope is automatically freed when you are terminated.

    20. Re:Enough rope by jones_supa · · Score: 2

      Java packs you inside a robust, protective suit, which avoids some of the problems. Unfortunately the suit is kind of heavy so you move around slowly.

    21. Re:Enough rope by theskipper · · Score: 2

      and no language really escapes big O

      Agreed, it sounds like my wife is screaming in 10 languages combined at that particular moment.

  4. Before someone starts pulling out hair by eksith · · Score: 3, Informative

    This bit is kinda important :

    For system libraries the language of choice is still C.

    The Gnome folks don't have a deaf ear, it seems, since they proactively acknowledge JS isn't a lot of developers' cup of tea... And the anti-JS vitriol is something that doesn't make sense to me, but whatever (note: I don't use it in app work, but that's only because I found another language I know).

    As you might expect, the initial reactions are of horror at the idea that JavaScript has been selected rather than the favorite language of the commenter.

    --
    If computers were people, I'd be a misanthrope.
  5. Sign of the Times by halfkoreanamerican · · Score: 3, Insightful

    It's not another sign that javascript is taking over the world, but rather a sign that gnome is making bad decisions.

  6. There shall be only one? by mike.mondy · · Score: 5, Informative

    From the TFA and the blog linked from the TFA:

    During the GNOME Developer Experience Hackfest this week, one of the major goals we identified was the need to pick a *single* language to give a simple answer to "how do I write a GNOME app?". [emphasis added]

    Why only one?

    * It allows us to focus when we write developer documentation, fixing bugs in the development environment and the development of tools. This reduces our maintanence costs and enables us to be vastly more efficient.
    * It enables code and knowledge sharing to occur, so that people can easily copy and paste code from existing applications, or find information about common problems and challenges.
    * It provide a coherent and easy-to-follow path for new developers.
    * It allows us to include the full GNOME framework within the language itself.

    But also:

    We will continue to write documentation for other languages, but we will also prioritize JavaScript when deciding what to work on.

    I wonder how much harder it would be to support LUA, python, tcl, and some of the other common languages. Or whatever comes next...

    1. Re:There shall be only one? by mike.mondy · · Score: 2

      I'm not sure that they're even saying JS is preferred. (Not sure that they aren't because I just skimmed the blog.) However, the whole context might be

      "how do I write a GNOME app?".

      Only using a single language in noob/intro examples isn't quite the same thing as deprecating other languages...

    2. Re:There shall be only one? by ardeez · · Score: 2

      Where does this leave Vala? I thought they wanted to make that the default language instead of C.

      --
      don't be a spelling loser
  7. Javascript == annoying by sanosuke001 · · Score: 5, Interesting

    loosely typed language without declaration requirements for methods/variables makes it such a huge pain in the ass to debug/understand/update source that I want to have nothing to do with it.

    --
    -SaNo
  8. Gnome is officially dead. KDE has won. by elucido · · Score: 3, Insightful

    I went from using KDE exclusively to using Gnome exclusively back to using KDE exclusively.

    The latest Gnome 3x sucks and is worse than the 2x series. The KDE 4x series is far superior to the flawed 3x series. KDE is on the right track with 5x while Gnome continues to stay on the wrong track doing things it's userbase isn't wanting it to do, taking features away which users love, "improving" the interface by making it harder to use or reducing flexibility.

    Whoever is designing the Gnome interface sucks and this decision to choose Javascript over a language like Python, Ruby, or C#? Wtf are they thinking?

    1. Re:Gnome is officially dead. KDE has won. by oGMo · · Score: 5, Interesting

      Gnome has always been on the wrong track from day 1. It was a political response to KDE's use of Qt (which was QPL back then) and always a mishmash of libraries and utility applications rather than a fundamentally solid desktop environment. That it might have been usable at some point is more luck than anything.

      I don't use KDE (or GNOME, I prefer RiscOS On X because it's insanely fast and powerful), but at least KDE has had a solid vision from the get-go, if sometimes flawed.

      --

      Don't think of it as a flame---it's more like an argument that does 3d6 fire damage

  9. Elegant? by Tridus · · Score: 4, Insightful

    Javascript is about as elegant as an oil tanker. Considerable effort has gone into tools and libraries to make working in it suck less, but it's hard to wipe away the problems inherent in the design.

    --
    -- "So they told me that using the download page to download something was not something they anticipated." - Bill Gates
  10. Use the Farce, Gnome... by Remus+Shepherd · · Score: 4, Funny

    JavaScript is the programming language of a Gnome programmer; an elegant language for a more civilized age.

    But hokey nonstandard libraries and ancient browser syntaxes are no match for a good object class at your side, kid.

    --
    Genocide Man -- Life is funny. Death is funnier. Mass murder can be hilarious.
  11. Untyped Languages Are Ill-Suited for This by Maltheus · · Score: 3, Interesting

    Javascript is fine, once you divorce it from all of the browser peculiarities, but it's an untyped language and untyped languages suck for refactoring. They should never be used for complex apps requiring maintainability. And yes, that goes for python too.

    Yeah, I know they said "apps," but even most apps quickly grow beyond the comfort zone of a script.

    1. Re:Untyped Languages Are Ill-Suited for This by lattyware · · Score: 3, Interesting

      Comparing Python to Javascript and saying they are both the same is just wrong - for one, Python is strongly typed, but dynamic, not weakly typed like JavaScript.

      While I agree static typing makes maintaining complex applications easier, Python does a lot to reduce the issue. The language and culture are built around code being readable and maintainable, it's strongly typed, it follows the idea that nothing should ever fail silently, which greatly reduces the chance of issues cropping up. This makes Python completely usable for a wide range of applications. Yes, in some cases, a statically typed language will be easier to manage, but that's not the case in 'anything beyond the comfort zone of a script'.

      JavaScript, on the other hand, is full of awkward stuff that makes it hard to program in. Things fail and return random values, stuff like that. Add to that a poor syntax for readability and JavaScript is pretty hard to maintain.

      --
      -- Lattyware (www.lattyware.co.uk)
    2. Re:Untyped Languages Are Ill-Suited for This by lattyware · · Score: 4, Informative

      It's mainly a product of the weak typing - doing [] + {} gives you an object, while {} + [] gives you 0. That's not useful when you have a problem you are trying to debug. Python follows the idea that things should fail loudly so that bugs are made clear. The indentation thing is overstated - text editors are not that terrible, and if they are, use a different one. It makes the code far nicer to work with and read.

      Firstly, don't blame the language for the programmer - anyone can be a rubbish programmer in any language. As to your examples, I find it funny you manage to pick an incredibly hard thing to do in Python - if you open a file and iterate over it, the default method (without any special work from the programmer) is to do so lazily, so there is not a massive file read into memory. The whole Python core library is built around the iterator interface, which means most data is processed lazily without having to even think about it.

      As to your last comment, Really? PHP has a host of problems - mainly due to the way they update the language without removing old stuff, and add features haphazardly. This leaves you with twenty different ways to access a database, etc..., etc... Python, on the other hand, has specifically avoided this. 3.x has gone back and fixed core language problems where they existed, and made the experience much more consistent. This is a sign the language is being curated and nurtured, not hacked on like JavaScript or PHP.

      --
      -- Lattyware (www.lattyware.co.uk)
  12. Re:They should have gone with Python by squiggleslash · · Score: 4, Insightful

    If only they'd picked ${my favorite language} instead of ${language I don't like} - all of Slashdot.

    --
    You are not alone. This is not normal. None of this is normal.
  13. why not guile? by larry+bagina · · Score: 2

    GNOME is an official GNU project (damned if I know why... GNUStep was there first). Guile is an official GNU Project. So why not Guile?

    Riddle me this -- what's the official GNU javascript interpreter? Bueller? Bueller?

    Exactly.

    --
    Do you even lift?

    These aren't the 'roids you're looking for.

    1. Re:why not guile? by Chris+Mattern · · Score: 4, Funny

      So why not Guile?

      Personally, I prefer Chun Li.

    2. Re:why not guile? by squiggleslash · · Score: 2

      Guile is an official GNU Project. So why not Guile?

      Because nobody has ever used it, and hardly anyone has ever heard of it.

      Javascript is the most ubiquitous scripting language on the planet. There are implementations for virtually every platform. It's fast, modern, and it uses curly braces. And virtually anyone who's ever done any programming outside of Excel macrowriting has encountered it. It's the number one language used for cross platform mobile apps. It's a first class language for Windows 8 development.

      While today's story is full of whiners who think that their favorite language should have been picked, the fact is that on every objective level, by every objective criteria, the GNOME people could not have made a more sane and level headed decision.

      --
      You are not alone. This is not normal. None of this is normal.
  14. Well it's better than mono by DrXym · · Score: 3, Insightful

    I can't say I like Javascript as a language but at least its ubquitous and more modern, lightweight and flexible than some other candidates. It's also far better than something heavy like Java or god forbid Mono which bring a lot of baggage in terms of runtime size and potential lawsuits.

  15. Re:They should have gone with Python by Dcnjoe60 · · Score: 5, Informative

    Python is a language which makes app writing very easy. It's very easy to write, read, debug. It's also very fast when used right or modified.

    This decision in my opinion is one of the boneheaded decisions which will be Gnomes final nail on the coffin. They had a chance to rule the Linux desktop with Ubuntu and since Gnome 3.0 have threw it all away. Everything that made Gnome great with the 2x series seems to have been lost at 3x and their release schedule is so slow that we are probably going to be stuck on 3x for 10 years. Goodbye Gnome and welcome back KDE.

    You are welcome to your opinion, but since gnome-shell is written in JS and most new developers want to work on things that tie into gnome-shell, it seems to make a lot of sense to steer them to JS. If you took the time to actually read what the gnome developers are putting forward, you would find that they are officially recommending JS for new developers who are looking how to quickly become productive in developing for gnome. They are still fully supporting c (libraries still are in c) python, vala and any other language that has bindings to the gnome libraries.

    Obviously, if you are a C programmer, you will probably continue to program in C, even in gnome. That is, unless you want to write extensions for gnome-shell, in which case, you will program in JS as that is the language gnome-shell is written in. The same is true for C++, python or any other language.

    Once people get past the knee-jerk reaction to the work "javascript" and look at what gnome developers are proposing, it makes a lot of sense. Basically, they realize the entry bar to developing in gnome is quite high, so since so much of gnome already uses JS they are going to make tutorials for beginning developers on how to use JS to develop for gnome and recommend new developers use JS to develop for gnome. Experienced developers, or any developer for that matter, are still free to use any language they want.

  16. Do not forget about XFCE by houghi · · Score: 4, Interesting

    XFCE is the new Gnome. I hate both KDE and GNOME. Luckily there is XFCE (and LXDE).

    --
    Don't fight for your country, if your country does not fight for you.
  17. Jeez, Louise... by Chris+Mattern · · Score: 5, Funny

    At this point, I can only envision somebody at the head of Gnome saying, "Dammit, people are still using Gnome! Well, what else can we do to kill this thing?"

  18. Accessibility, Democracy, Theoretical Purity by nhavar · · Score: 2

    I think that more organizations switching to JavaScript is reflective of what the internet is and the market space that organizations have to live and compete within. While JS isn't a great language, robust, elegant, or [insert your adjective here], what it is is accessible. Anyone can start programming in JS today, with no special tools and little to no knowledge. It means that anyone can participate in the conversation (which is both good and bad). It's like Democracy, everyone can have their say whether or not their opinion is informed or not. Similarly, people who might not have a ton of programming experience or might not know the "right" language can and will be able to take their ideas to market more readily than before. Even if their idea doesn't succeed, it may end up spurring more seasoned programmers to do something similar or improving the idea or even helping newcomers build up their products and abilities. I think this is much more important than the theoretical purity of a language or the right or wrong way to program something. It's about conversations and it's about bringing people into the fold versus excluding them. It's about equality versus the typical snobbishness that can occur as the "elite" developers look down their nose at you because of the choice of languages versus the value of the idea you are attempting to promote.

    --
    "Do not be swept up in the momentum of mediocrity." - anon
  19. Re:JS will be what ASM is now? by rs79 · · Score: 2

    " But I would never call JS elegant. "

    When you do, then you can grab the stone from my hand, grasshopper.

    --
    Need Mercedes parts ?
  20. Re:What's the problem? by HalWasRight · · Score: 2

    Like languages (pick one) with strong typing so you know at compile time of trivial bugs that you'll never discover with JavaScript until you have exercised every path of execution that can reach your function.

    --
    "This mission is too important to allow you to jeopardize it." -- HAL
  21. Re:They should have gone with Python by Bill_the_Engineer · · Score: 2

    I'm one of the first C programmers and I've switched to js and node.js. it's better and faster than C.

    What is your definition of fast?

    --
    These comments are my own and do not necessarily reflect the views or opinions of my employer or colleagues...
  22. Re:They should have gone with Python by lattyware · · Score: 2

    it's better and faster than C

    That's such a non-statement. Better in what way? Faster in what sense? In what situations?

    --
    -- Lattyware (www.lattyware.co.uk)
  23. Re:They should have gone with Python by BitZtream · · Score: 3, Interesting

    I'm one of the first C programmers and I've switched to js and node.js. it's better and faster than C.

    Then you're doing it wrong. And if you had half as much experience as you claim to have in this and your other post, you would understand that.

    Just because you've written some C, doesn't mean you know what you're doing. I've worked with plenty of 'programmers' who have been 'doing it all their life' or better yet, 'longer than you've been alive' (refering to me) and those statements universally come from people who suck and are too stupid to realize it.

    You go on to further my point about you not really knowing what you're talking about when in other posts you talk about the x86 emulator written JavaScript as if thats supposed to be something to show how awesome it is. When you make that awesome emulator there out run my copy of QEMU without kmod, then perhaps I'll give you a listen, but you've got to be absolutely retarded to actually think JavaScript as a language has a technical reason for it to be faster than compiled C in reality, you being unable to write quality C withstanding.

    Yes, decent Javascript can out run really really shitty C, but only if you stack the deck so that C doesn't have a chance first. Just because you've seen a porn, doesn't mean you know how to be a parent.

    --
    Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
  24. Re:Still doesn't answer "Why" by Bill_the_Engineer · · Score: 2

    Actually Perl with its CPAN.

    --
    These comments are my own and do not necessarily reflect the views or opinions of my employer or colleagues...
  25. Re:Still doesn't answer "Why" by Anonymous Coward · · Score: 2, Interesting

    Python... heh. COBOL meets perl, they have a baby, BOOM, Python. Awesome. You were joking right?

    These statements make it clear that you don't know very much about Python, and much of what you do know is probably wrong. That or else you are trolling.

    Python was designed by Guido van Rossum (GvR), a computer geek who was also a math geek. He designed it to be clean and regular; there aren't a lot of weird punctuation operators like in Perl. It's a lot more terse than COBOL... well, anything designed later than 1960 is. I'll just bet the reason you even mentioned COBOL is the significant whitespace thing... oh wow, you're so smart, I'm impressed, really.

    GvR based Python on a teaching language called ABC, and to some extent the C language. Regular expressions are credited as being copied from Perl but that's about it.

    The Python community agrees that this is a good summary of the philosophy of Python:

    The Zen of Python, by Tim Peters

    Beautiful is better than ugly.
    Explicit is better than implicit.
    Simple is better than complex.
    Complex is better than complicated.
    Flat is better than nested.
    Sparse is better than dense.
    Readability counts.
    Special cases aren't special enough to break the rules.
    Although practicality beats purity.
    Errors should never pass silently.
    Unless explicitly silenced.
    In the face of ambiguity, refuse the temptation to guess.
    There should be one-- and preferably only one --obvious way to do it.
    Although that way may not be obvious at first unless you're Dutch.
    Now is better than never.
    Although never is often better than *right* now.
    If the implementation is hard to explain, it's a bad idea.
    If the implementation is easy to explain, it may be a good idea.
    Namespaces are one honking great idea -- let's do more of those!

    Perl folks are proud of saying "there's more than one way to do it" and Python explicitly rejects this philosophy.

    Isn't the selling point of Python that it has so many libraries and so much stuff in them you don't even need to do any programming?

    The Python community does say "Batteries Included"... Python has a lot of useful stuff you can use. You said the above like it's a bad thing and I'm not seeing it.

    The worst thing about Python is that it is a lot slower than other languages. I don't like Java as much as I like Python, but Java is at least fast. You can get a lot of useful work done in Python and it can even be fast, but the fastest Python is the code that relies on built-in features and C library code, so the fastest Python is the Python you didn't write.

    Python is a much cleaner design than JavaScript. There are fewer land mines for newbies to step on. I'm a Python fan, but I'm not that worked up about the GNOME guys picking JavaScript.

    But Python as a bastard offspring of COBOL and Perl? Nope.

  26. Re:They should have gone with Python by rs79 · · Score: 3, Interesting

    Well, the first metric I saw when when a web server written in node was faster than Apache.

    I know there's a lot of variables there, but still, when an interpreted language beats C for something like this, that's impressive.

    TO be sure, you can do the kind of I/O js does in C, but it's a real pain and usually platform dependant in some way, even the difference between linux and bsd can start the ifdefs popping up, but js brings asynchronous I/O to the 10 GOTO 10 crowd. That, and the fact the js x86 emulator not only works but runs linux under which you can edit, compile a real program no slower than unix used to be on an 11/45 and you're doing this in a browser tab.

    That's the metric I use for me to consider it fast. Obviously this is a contentious and complex topic, but as a rough approximation, I think it's fast.

    Or at least it CAN be. The loops FB makes it jump through are insane and they manage to kill any js interpreter they throw at it and even the mighty V8 is now starting to strain so something will have to change there. But if they knew what they were doing it'd be as slick as it was performance wise 3 years ago, this isn't the fault of js, just bad (or no) performance profiling and tuning in Palo Alto.

    So, while this may not mean any code you write will be fast, if you're used to real-time programming you'll love the language and the stuff you can do now with css3/html5 (gradients, css-masks) may not have the underpinnings of the next Pixar like NeXt did, there's still enough there to, say, keep the molbio crowd happy for the next decade with very fast real time renderings of molecules they can play with to cite one example.

    I agree the success of is tied to the web, but so what, that's like saying the success of C was only because of Unix.

    --
    Need Mercedes parts ?