Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
GNOME Programming News

Gnome Goes JavaScript 387

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."
This discussion has been archived. No new comments can be posted.

Gnome Goes JavaScript

Comments Filter:
  • by Anonymous Coward on Monday February 04, 2013 @02:28PM (#42787311)

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

  • Read more facts here (Score:5, Informative)

    by Anonymous Coward on Monday February 04, 2013 @02:28PM (#42787313)

    Read more about the reasoning and decisionprocess here:

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

    • by MrEricSir ( 398214 ) on Monday February 04, 2013 @02:36PM (#42787389) Homepage

      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.

      • by jythie ( 914043 )
        Damn, and I am out of mod points.

        Though thinking back to 'what first language should I learn in order to XYZ', people get just as religious about that type of question as they do about single language support.
        • by Anonymous Coward on Monday February 04, 2013 @02:42PM (#42787459)

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

          • by Ceriel Nosforit ( 682174 ) on Monday February 04, 2013 @05:48PM (#42789767)

            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??

      • Re: (Score:3, Informative)

        by Anonymous Coward

        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.

        • by Xtifr ( 1323 )

          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. :)

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

  • Enough rope (Score:3, Interesting)

    by Anathem ( 1983388 ) on Monday February 04, 2013 @02:29PM (#42787317)
    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...
    • Re:Enough rope (Score:5, Insightful)

      by SQLGuru ( 980662 ) on Monday February 04, 2013 @02:34PM (#42787373) Homepage Journal

      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).

    • Re:Enough rope (Score:5, Interesting)

      by Austerity Empowers ( 669817 ) on Monday February 04, 2013 @02:36PM (#42787387)

      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).

      • Re:Enough rope (Score:5, Informative)

        by jythie ( 914043 ) on Monday February 04, 2013 @02:41PM (#42787451)
        Python has also made some good advances for those criteria, esp if you couple it with something like wxPython.
        • Re:Enough rope (Score:4, Informative)

          by hobarrera ( 2008506 ) on Monday February 04, 2013 @02:52PM (#42787597) Homepage

          PySide [qt-project.org] is quite powerful as well, and can be used for both desktop and mobile development.

        • wxPython is unfortunately a bit of a mess. Platform specific bugs make it unusable as a cross platform toolkit, imo.
          • Re:Enough rope (Score:5, Informative)

            by jythie ( 914043 ) on Monday February 04, 2013 @03:38PM (#42788145)
            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.
        • Re:Enough rope (Score:5, Informative)

          by Dcnjoe60 ( 682885 ) on Monday February 04, 2013 @03:12PM (#42787809)

          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.

          • by jythie ( 914043 )
            Which actually makes a lot of sense. When choosing a language, often the biggest issues are not ones of language features but of community and familiarity.
      • by serviscope_minor ( 664417 ) on Monday February 04, 2013 @02:45PM (#42787519) Journal

        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.

        • Re:Enough rope (Score:5, Insightful)

          by gstoddart ( 321705 ) on Monday February 04, 2013 @02:54PM (#42787623) Homepage

          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.

          • 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.
        • Re:Enough rope (Score:4, Insightful)

          by Anonymous Coward on Monday February 04, 2013 @02:58PM (#42787675)

          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.

        • by Chemisor ( 97276 ) on Monday February 04, 2013 @04:04PM (#42788461)

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

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

      • by elucido ( 870205 )

        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?

      • by Cro Magnon ( 467622 ) on Monday February 04, 2013 @02:58PM (#42787667) Homepage Journal

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

      • Re: (Score:3, Interesting)

        by rs79 ( 71822 )

        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.

  • by eksith ( 2776419 ) on Monday February 04, 2013 @02:33PM (#42787361) Homepage

    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.

  • Sign of the Times (Score:3, Insightful)

    by halfkoreanamerican ( 2566687 ) on Monday February 04, 2013 @02:34PM (#42787371) Homepage
    It's not another sign that javascript is taking over the world, but rather a sign that gnome is making bad decisions.
  • Saying JS is an awesome language isn't a good enough reason to switch. Next year are they going to switch to Python coz like thats awesome too? Or Dart?
    • by elucido ( 870205 )

      A switch to python at least would make sense. Python is the best language for apps. Who uses javascripts to write apps?

      • Re: (Score:2, Interesting)

        Comment removed based on user account deletion
        • 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?

          No, that's Java.

        • It's popular on the mobile side because it's cross-platform. That's it. JavaScript isn't easy to use, it's a mess of a language that has been hacked into something vaguely usable because it's the only option there.

          And yeah, who wants to actually write relevant code? Let's spend all our time re-implementing the wheel, because that's effective. Python has excellent design behind it, and it's perfect for this kind of thing. Small to medium sized applications that need to be made fast, while remaining maintaina

      • A switch to python at least would make sense. Python is the best language for apps. Who uses javascripts to write apps?

        Says you.

      • by rs79 ( 71822 )

        Does that mean you've never written a serious app in js? If so what makes you qualified to compare?

        Have you see the x86 emulator written in javascript?

        http://bellard.org/jslinux/tech.html [bellard.org]

        It only runs one program I've seen - Linux. It boots, I can vi, cc, run it and it's not slow. And it's doing all this in a browser tab. Or as many as you want.

        Have a go doing this in python and let us know when we can compare the two.

        Or do this: http://osjs.0o.no/ [0o.no]

    • Saying JS is an awesome language isn't a good enough reason to switch. Next year are they going to switch to Python coz like thats awesome too? Or Dart?

      They didn't say JS is an awesome language, exactly. They said a lot of new developers coming to gnome already know JS. In addition gnome-shell and a number of components are written in JS. Therefore it makes sense to write some tutorials and recommend to new developers to build on what they already know from their work with other operating systems, which is -- JS.

      They are not telling existing developers to change to JS. They are not telling new developers not to develop in something else. They are only sayi

  • by mike.mondy ( 524326 ) on Monday February 04, 2013 @02:38PM (#42787425)

    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...

    • 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...

    • by Xtifr ( 1323 )

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

      You mean for documentation purposes? Since most, if not all of those are already supported for development?

      Anyway, I'm just glad they're no longer pushing Mono/C#! Gnome has enough overhead by itself without adding in a huge, mandatory VM; especially one with the sort of dubious connections that Mono has. (Not that Java's VM has much better connections these days.) I guess they really have finally broken with Miguel.

  • by sanosuke001 ( 640243 ) on Monday February 04, 2013 @02:40PM (#42787445)
    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.
  • by elucido ( 870205 ) on Monday February 04, 2013 @02:44PM (#42787499)

    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?

    • Unfortunately, as much as it sucks... there will remain a healthy supply of GNOME-based distributions, for whatever reason. And as long as people continue to put out shitty GNOME distributions, they will inevitably have users and GNOME will continue to have an audience. The environment is still garbage even now, yet there continue to be GNOME-based distributions released.

    • Comment removed (Score:5, Interesting)

      by account_deleted ( 4530225 ) on Monday February 04, 2013 @03:25PM (#42787979)
      Comment removed based on user account deletion
    • by oGMo ( 379 ) on Monday February 04, 2013 @03:41PM (#42788177)

      Gnome has always been on the wrong track from day 1. It was a political response [linuxtoday.com] to KDE's use of Qt (which was QPL [wikipedia.org] 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 [sourceforge.net] because it's insanely fast and powerful), but at least KDE has had a solid vision from the get-go, if sometimes flawed.

  • Elegant? (Score:5, Insightful)

    by Tridus ( 79566 ) on Monday February 04, 2013 @02:44PM (#42787505) Homepage

    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.

  • You can write desktop and mobile in plenty of languages already, yet most people still uses whathever is native for the platform. Be it ObjC for iOS, Java for Android, or C/C++ for desktop.
    The reason? Maybe JS is easier to write for unexperimenced developers (do you really want that anyway? are they that desperate for more developers?), but truth is, when you have a layer of abstraction there is always some functionality missing and the only way to access it is via bindings to native anyway. When you writ
  • Python or Ruby? (Score:2, Insightful)

    by RedHackTea ( 2779623 )
    I know choosing a language is usually subjective, but most Linux fanboys like Python (or even Ruby or PHP). Why not these? IMO, these are better languages and more suited for Apps and scripting. JavaScript's either original intention or main intention from history has been for client-side Web Browser scripting. Most tutorials, questions, and hacks will be for the Web Browser when searching for JavaScript in a search engine. I really don't get why people are pushing JS. Spend a day each coding in Ruby,
  • by Remus Shepherd ( 32833 ) <remus@panix.com> on Monday February 04, 2013 @02:50PM (#42787575) Homepage

    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.

  • From the article: "Gnome, the graphical desktop environment for Linux, may not be as influential as it once was."
    Add to it, "use of JavaScript in WinRT, Chrome Apps, and FirefoxOS apps" and you probably get a lot of the reason for the decision.

    Pity they didn't use the Hackfest to design something innovative to energize their base and make working with Gnome cutting edge. Instead it appears that they settling into comfortable middle age.

  • Why bother with Gnome for your apps, when you can target what might become a broader standard? http://www.mozilla.org/en-US/firefoxos/ [mozilla.org]
    • Why bother with Gnome for your apps,

      Because Gnome exists, and has been/is used by lots and lots of people.

      when you can target what might become a broader standard?

      You just answered your own question.

  • I can see there reasoning for selecting javascript. But I would never call JS elegant. It lacks so many basic language constructs, that you everyone has to be intimately familiar with a mess of boiler plate code to make it object oriented or make your code easily reusable.

    It's somewhat like programming in ASM because that's what every processor requires, even though it is tedious and redundant.

    Similarly, with the pervasiveness of javascript, we will probably so TypeScript or something similar become the d

    • by rs79 ( 71822 )

      " But I would never call JS elegant. "

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

  • by Maltheus ( 248271 ) on Monday February 04, 2013 @03:04PM (#42787729)

    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.

    • 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.

    • by rs79 ( 71822 )

      They said the same thing about Assembler, C, Perl and PhP.

      If you have a clear mind and know what you're dong, js is a godsend. No computer language will help the lazy though.

      Ok, maybe BASIC will, but you get the point.

  • Even if there are some gnome specific JS bindings, your basic code logic and flow should be easily portable to other new platforms all supporting JS as well. There are a ton of applications out there now, and while JS may have been supported before; this announcement will hopefully get some existing developers for other platforms to port their JS apps to gnome. Also anxious to see how jQuery will tie itself into this.
  • 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.

  • by DrXym ( 126579 ) on Monday February 04, 2013 @03:14PM (#42787843)
    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.
  • by Chris Mattern ( 191822 ) on Monday February 04, 2013 @03:30PM (#42788041)

    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?"

  • by nhavar ( 115351 ) on Monday February 04, 2013 @03:48PM (#42788249) Homepage

    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.

"Protozoa are small, and bacteria are small, but viruses are smaller than the both put together."

Working...