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."
Some body misplaced a calendar?
Aprils Fools is in two months time.
Read more about the reasoning and decisionprocess here:
http://treitter.livejournal.com/14871.html
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...
I suspect most people are too lazy to write a scripting language that doesn't typically come with intellisense.
...would have been better.
But if they offer the right tools to make JS sufferable... Why not?
At least it's not VB
This bit is kinda important :
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).
If computers were people, I'd be a misanthrope.
Things created with JS are just as messy as with Perl so they might have used Perl as well..
Are apps in WinRT, ChromeOS, and "FirefoxOS" good? Anything people want so far?
Generally the "apps" which seem to be good quality are written in Objective-C on Mac and iOS. Of course much of this relates to libraries, but are we entirely sure there's no relation?
It's not another sign that javascript is taking over the world, but rather a sign that gnome is making bad decisions.
It's a good choice apart from situations where performance matters. These users aren't running Gnome or KDE anyway.
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?
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...
Isn't gnome slow enough? Why go to an interpreted language and make it slower?
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
KDE/Qt here I come.
To provide a true cross-OS portable app framework, the use of HTMl5, Javascript and CSS3 will become commonplace. This will make everyone's app completely portable and provide integration with cloud services.
The role of the OS will diminish, to be replaced with a mainly browser based UI as standard.
The only native apps in the future will be high performance applications such as databases. Other than that, everything will be delivered as Software as a Service.
It's certainly better than pointing fledgling developers to the GObject or GTKmm sludge.
It's sad to say it, but Javascript is probably a sweet spot of performance, ease of development and mindshare ATM.
What happened to Vala, though? Wasn't that supposed to become the GNOME language?
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?
So, do we at least get to use jQuery to select UI elements? it would be cool to do a //do something}
$(".buttons").each{
Libraries like that are as essential as collections are for Java.
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
What does this mean for the future of Vala? It does not sound like there is one...
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 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 write native, you know you have everything you can possibly do on the device available to you. Simple as that.
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, Python, and then JavaScript for non-web Apps. I bet most people won't pick JS.
The G
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.
Our GNAA troll found a Spanish phrasebook...
Linus Torvalds posted that.
Oh it isn't April 1 yet? Damn.
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.
Average Intelligence is a Scary Thing
Javascript programmer of seven years here. It's an incomplete language.
Why bother with Gnome for your apps, when you can target what might become a broader standard? http://www.mozilla.org/en-US/firefoxos/
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 defacto eventually, to hide a lot of the boiler plate code.
gmail and google docs seem to have a bit of a following...
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.
IMO, Gnome's reliance on C as a primary language is the main reason why the applications have been very poor, even compared with KDE. Few people have patience to develop GUI apps in C. Javascript seems like another extreme, however.
Perhaps all this is irrelevant anyway. Majority of apps I use on Linux (Gnome) is written in Java and the rest is migrating to the Web. I could easily throw away Gnome and use something like Fvwm instead. So, who cares, it's just a window manager and a crappy file manager which I don't use anyway. A few horribly crashy applets on top of it (the result of having been written in C no doubt). Who cares.
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.
http://interserver.net/
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.
I think you meant "dinghy". COBOL is about as elegant as the oil tanker. Javascript is about as elegant as a dinghy.
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.
Type:
free -m -s 1
In gnome-terminal and then start clicking in the activities area of Gnome Shell (or simply open the menus of the disableds accessibilty icon, clock, language switcher, gnome menu etc. Do this wuickly and you see it eat 500mb and more in less than a minute.
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.
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?"
Wait, let me check...nope, no relation.
Pity they didn't use the Hackfest to design something innovative to energize their base and make working with Gnome cutting edge.
Like what, vala?
Java is not native, even on Android. There's a separate NDK.
http://developer.android.com/tools/sdk/ndk/index.html
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
...
What's with the perverse fetish with Java on all these platforms? What freaking difference does it make? Everything runs on a virtual processor of a JRE, I suppose. :(
(-1: Post disagrees with my already-settled worldview) is not a valid mod option.
after all, these are the same folks that thought GObject was something other than a complete abomination.
For those that aren't aware, GObject is the Gnome folks idea of how to bolt on object orientated concepts on top of C, without actually making the fundamental changes to the compiler to support such things.
Leads to crazy shit like having to do manual name mangling and the need to do tons of copy&paste to roughly simulate inheritance.
That, instead of using one of the two reasonable and sane options for OO in C: C++ or Objective-C
JavaScript is an outstanding language. Spend some time building web applications with Node.js and AngularJS, and you will find yourself enjoying it immensely.
How's JavaScript not great, robust, or elegant?
Instead it appears that they settling into comfortable middle age.
Settling into middle age and getting a bunch of unnecessary cosmetic surgery that will leave it a freakish caricature of its former self. How long until it gets a few Windows 8-ish Metroll implants?
Mad as hatters, they are.
Warning: this article may contain humor, sarcasm, parody, and perhaps even irony. Read at your own risk.
Time to switch to KDE, or dig into the wayback machine and pull out "vtwm" to be able to get any work done without all the insane screen candy.
after they pissed off most of their fanbase, and app developers, they are looking for new ones.
Or make a fork from it. It's done either way.
Yes, they both deserve each other.
Why, when the script tag has a language= attribute, has NO ONE ever implemented a plugin for languages other than javascript? I mean, why even leave the attribute there in HTML5?
I'd love to see an easy-to-download (or bundled by default) plugin for Python client-side.
The thing I don't understand about using Javascript is the lack of interfaces to libraries. Is there even a 'C' foreign function interface? What if I need access to a database or numerical libraries or FFTs or whatever. I think Node.js is starting to change this a little. I think it has sockets and database access. But how is this functionality provided. I think that until Javascript has some solid method to work with external libraries and perhaps a module system, it just doesn't seem like a good choice.
..don't be so harsh to the youth. We should be happy they are off drugs and doing pointless JS instead. We C programmers would be taxed even higher if the kids were smashing windows and on rehab programs !
Sappeur ! Let me use this opportunity to be the shill for my own programming language. Efficient, real-time, strongly typed, memory safe and no GC whatsoever.
http://sourceforge.net/projects/sappeurcompiler/
You must be confusing that language with Sappeur. THAT is the best language for apps. Can you see the clear logic of all my arguments ?
"... 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."
Look, it's got "script" in its friggin' name. Mainstream consideration as an incomplete toy language has been sealed forever. You could be both a virtuoso concert violinist and a world-class acrobatic clown capable of giving the most entertaining children's birthday parties on the entire planet, but if you name yourself the "Kiddy Fiddler", it's simply not going to happen.
Basically, this pathetic move will atract thousands of bad programmers and n00bs all around, and the quality of the programs will quickly decrease. C++ shit was not shitty enough, now let's give them JavaScript.
You need Python! You'll just fly over all those obstacles...at least until the medicine runs out.
+1 to me for not using gnome!
Your thin skin doesn't make me a troll
You would think they'd take an example from NeWS. Then again, it's likely that no one currently working on Gnome is old enough to remember it.
Sit, Ubuntu, sit. Good dog.
Why not Commodore/PET BASIC?
"I believe in Karma. That means I can do bad things to people all day long and I assume they deserve it." : Dogbert
Remember this?
http://dot.kde.org/2001/04/01/kdeqt-switching-mozilla-and-javascript-technology
Kind of cool it's actually happening.
--
Andreas
As a software developer, I must vote that this is a very very interesting idea. I think there's great potential in this sort of move. Of course, the elegance of the actual implementation will likely make or break it. Javascript is full of potential. Great idea!
It's just the same as when you're doing a webpage. If you actually like things like ads following you up and down the page, or equivalently, rounded edges on windows and exquisitely shaded and rendered progress bars, then you go to where all the other wankers are working.
Don't worry, the rest of the world will keep a hold on reality.
For those who understand
Oh for pity's sake, will someone just flush this thing already ?
Just pull the damned chain and walk away.
If social webapps( facebook, yahoo, rss feeds, workpress, etc... ) are very well integrated into the Gnome Desktop and [dbus-like] services with Javascript + webkit-like engines, then Why Not ? Would be just cool! Making me have a look at Gnome this time :-)
On the other sides, WebApps that are touching your local private fs-data is VERY dangerous. In fact, I feel the WEB is about to blow in our face - Too much unsecure/security-brakes/bloated defenses that make servers crawling under heavy security-protocoles/CPU load...
[
My view on JAVA ( Sorry off-topic but couldn't resist):
Example: My wife's employer - a VERY BIG compagny - using SAP ( now with its UI totaly in JAVA !!! ) is sooo sloooooww compared to the previous system! Oh yeah it is real-time DB updates ( cough-cough!! almost .... )
I hate JAVA!! I don't care missing some $$$$ with JAVA!!!! I do not mention JSP with .net-like fucking heavy xml bibles of web configs!!!! WTF is that ?
]
Anyway, JavaScript is already doing its way into KDE ( KDE 5 QML in PLASMA and KWIN :-) )
Long live C/C++ !
Why the hell not one of the better variants, like dart, coffeescript, typescript or uniscript?
All compile down to efficient javascript.
Why not Perl? Every language sucks compared to it.
And by the time you've made your Yet Another Framework, your framework will have poorly reimplemented half of Common Lisp.
can you name an architecture that doesn't have a C compiler targeting it?
Windows Phone 7 (based on Silverlight) is one. Xbox Live Indie Games (based on XNA) is another. These platforms can use only verifiably type-safe, Emit-free, P/Invoke-free CIL, which in practice means C#.
God and Dennis Ritchie
-1, Redundant
Just because Dennis Ritchie is the Son of God doesn't make him God.
</jehovahs-witnesses>
Yes, Python has generators. Saying Python generators are like modern coroutines is like saying that C has garbage collection. Yes.. sorta of... but not really.
Could you elaborate on how Python generators are not enough to build an adequate substitute for coroutines?
C gives you just enough rope, to shoot yourself in the foot!
Then perhaps it's a good thing that the little guy with the gun that shoots ropes has no feet.
Who said anything about safe CIL?
PCs don't require safe CIL unless the system administrator has changed the policy to require safe CIL. Windows Phone 7 and Xbox Live Indie Games require safe CIL, and there's no way for an end user to change this policy. So if GNOME were using Mono, and you wanted a Windows Phone app and a GNOME app to share any code, you'd have to stick to safe CIL.
And standard C++ certainly does compile down to full CIL.
Standard C++ doesn't compile at all when you turn on /clr:safe. The syntax for code that compiles with /clr:safe differs for classes, pointers, references, and arrays.