|
|
Subscribe / Log in / New account

Reitter: Answering the question: "How do I develop an app for GNOME?"

Travis Reitter reports that the GNOME project has settled on JavaScript as the primary language for application development. "It's critical that everyone understands this decision as a plan to elevate the language, bindings, tools, and documentation to a level of quality we have not yet achieved. It is not a decision to abandon any other language bindings. We will continue to distribute other bindings and documentation as we do now and compatibility for the other languages will continue to be developed as they are today by the developers involved with those modules."

to post comments

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 16:41 UTC (Tue) by heijo (guest, #88363) [Link] (84 responses)

If they are doing this, why not just make HTML + JavaScript the main UI technology?

I mean, the only reason to adopt JavaScript is that it is popular due to the web, since it is otherwise a poor language, but then why not apply the same reasoning to preferring HTML to GtkBuilder XML?

What's the point of having system-specific desktop UI libraries when you can do everything either with portable web APIs, or with portable low level APIs like OpenGL?

Also, as a side bonus, the GNOME and KDE projects could eventually be completely eliminated, finally solving the community divisions and incompetence issues they have.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 16:44 UTC (Tue) by bronson (subscriber, #4806) [Link] (7 responses)

Please don't troll.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 16:54 UTC (Tue) by HelloWorld (guest, #56129) [Link] (1 responses)

You're the one who's trolling. heijo's question is a perfectly legitimate one, even though opinions about the answer may differ.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 16:59 UTC (Tue) by mpr22 (subscriber, #60784) [Link]

Also, as a side bonus, the GNOME and KDE projects could eventually be completely eliminated, finally solving the community divisions and incompetence issues they have.

The rest of the comment might well be legitimate, but the paragraph I've quoted here takes it firmly into "lives under a bridge snacking on goats" territory.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 16:59 UTC (Tue) by amtota (guest, #4012) [Link] (4 responses)

Typical gnome reaction, I got accused of trolling every time I commented.

The lesson has not be learnt yet. And I find that even more worrying that the technology issues.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 19:54 UTC (Tue) by Frej (guest, #4165) [Link] (1 responses)

Please stop generalizing.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 21:34 UTC (Tue) by nix (subscriber, #2304) [Link]

In general, everyone always overgeneralizes.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 6:30 UTC (Wed) by bronson (subscriber, #4806) [Link] (1 responses)

You obviously haven't seen my previous posts (probably got me killfiled a bunch). I loathe gnome 3. It made me realize the year of the Linux desktop is never -- the nerdery is just too strong. Talk about depressing.

I just don't want to see obvious flamebait floating around on LWN.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 14:51 UTC (Wed) by ovitters (guest, #27950) [Link]

Seeing you being dismissed as a gnomer made me laugh out loud :P

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 17:19 UTC (Tue) by FranTaylor (guest, #80190) [Link] (60 responses)

When you say "since otherwise it is a poor language" you are just injecting your own opinion. As was explicitly stated, every language has its issues, and anyone can grandstand that their pet peeve issue is the most important one.

There can be endless debate over which language is better. It's never going to end. And you certainly aren't doing yourself any favor by just throwing out unsubstantiated opinions.

The stated intention was to pick a language with traction that they could stick with, one that is already familiar to people and doesn't need a sales pitch or a learning curve, not pick an obscure upstart "perfect" language that dies on the vine.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 17:23 UTC (Tue) by FranTaylor (guest, #80190) [Link] (56 responses)

As a reply to my own comment I will point out that the previous language to hold this position was guile scheme. It failed in its role not for its technical inferiority, but for its lack of popularity. Javascript is scheme in C's clothing, so at some level this is not really such a big change.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 18:32 UTC (Tue) by oldtomas (guest, #72579) [Link] (37 responses)

"Javascript is scheme in C's clothing"

If it only were true. For one thing, they forgot "let", thus leading to quite "interesting" constructs. And since they forgot macros too, there's no help available.

No. JavaScript's core is fine, but it was frozen too early. One of the biggest failures of all things Web: no backtracking in the design process. Things get thrown out while still immature and when there'd be a chance to fine-tune, everyone and its Microsoft are actually using it and would rise a stink if anything changed.

A sad state of affairs, IMHO.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 19:39 UTC (Tue) by khim (subscriber, #9252) [Link] (25 responses)

JavaScript's core is fine, but it was frozen too early.

Not even close.

> test = Array(8, 9, 10)
  [8, 9, 10]
> test.sort()
  [10, 8, 9]

Looks logical? Let's fix it:

> test.sort(function(a,b){return a-b})
  [8, 9, 10]

Cool. What about strings?

> test = Array("8", "9", "10", "b", "a")
  ["8", "9", "10", "b", "a"]
> test.sort(function(a,b){return a-b})
  ["8", "9", "10", "b", "a"]

Hmm... That's strange. Looks like we'll need to check types of variables. Can we at least compare few variables?

> a = 10
  10
> b = "11"
  "11"
> c = "9"
  "9"
> a < b
  true
> b < c
  true
> c < a
  true

Apparently not. Can we at least compare two?

> a = "a"
  "a"
> b = 10
  10
> a <= b
  false
> b <= a
  false

Looks like the answer is still "not".

And final example.

test = "Hello"
  "Hello"
j = 0; for (i in test) j+=i; j
  "001234"

Can you understand WFT goes on here and why the following fix works?

j = 0; for (i in test) j-=-i; j
  10

PHP is known as fractal of bad design but JavaScript is close second. It's not even close to scheme in this regard: scheme is sane language JavaScript and PHP are not.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 21:38 UTC (Tue) by nix (subscriber, #2304) [Link] (1 responses)

There is only one possible response to the tidal wave of lunacy in that post of yours: WAT.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 8:21 UTC (Wed) by osma (subscriber, #6912) [Link]

For a slightly expanded WAT in video format, also covering some absurdities in other programming languages besides JavaScript, see Gary Bernhardt's talk.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 22:25 UTC (Tue) by smokeing (guest, #53685) [Link]

Thank you for such a clear exposition of JavaScript absurdity.

One can indeed live a long, happy and rich life as a programmer and have no regrets at the end -- all without knowing what JavaScript is.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 0:03 UTC (Wed) by FranTaylor (guest, #80190) [Link] (8 responses)

What's funny about your comment is that it can be repeated almost verbatim in any computer language. Really I challenge you to find a computer language where you CANNOT make absurd constructs like this.

"Look at me, I can create create syntactic constructs that seem to make no sense! Wow how clever is that?"

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 6:09 UTC (Wed) by Cyberax (✭ supporter ✭, #52523) [Link] (7 responses)

Do it with built-in types in Haskell, OCaml or even Java.

Thanks in advance.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 15:12 UTC (Wed) by randomguy3 (subscriber, #71063) [Link] (6 responses)

...and you'll find it won't compile. Your examples mostly just made no sense - they worked in an unexpected way because there was really no sane expected behaviour (why should "a" be in any way comparable to 10, for example? What does it mean to add up the contents of a string?).

Not that I don't think that JS is a bit mad in places, or that functional languages aren't a good thing, mind. I just think your examples were somewhat disingenuous.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 15:37 UTC (Wed) by adobriyan (subscriber, #30858) [Link] (4 responses)

Examples are fine. It is the programming language which allows both "a <= b" and "b <= a" to be true or false simultaneously is not.

Sane programming languages do not have this property.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 15:53 UTC (Wed) by mpr22 (subscriber, #60784) [Link] (3 responses)

"a <= b" and "b <= a" being simultaneously true is fine because of the '=' part; I presume you mean that "a < b" and "b < a" being simultaneously true is indicative of a problem (which it is).

On the other hand, "a <= b" and "b <= a" being simultaneously false is sometimes compulsory (IEC 60559 floating point requires that all comparisons involving NaNs, including comparing a NaN to itself, return false.)

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 19:05 UTC (Wed) by JoeBuck (subscriber, #2330) [Link] (2 responses)

Well, yes; it's OK if < is a partial ordering with incomparible values (there can exist a,b such that neither a<b nor b<a are true).
<p>
But data structures and algorithms that depend on sorting break if there exist a,b,c such that a<b, b<c, and c<a are all true, so warts like this are a significant source of bugs.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 19:13 UTC (Wed) by drag (guest, #31333) [Link] (1 responses)

I am a bit confused about all the above.

Especially the parts about using great-than and less-than to compare strings. Trying to program this way seems broken no matter what the language.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 7, 2013 9:25 UTC (Thu) by micka (subscriber, #38720) [Link]

There are orders over the strings. One of them is even a total order, and is even understandable and useful (well, for alphabetic ones, it's sometimes a bit hard to generalize to even US-ASCII, and worse for UTF-8+locale), the lexicographic order (the one you learn when one gives you a dictionary).

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 20:34 UTC (Wed) by khim (subscriber, #9252) [Link]

Your examples mostly just made no sense - they worked in an unexpected way because there was really no sane expected behaviour (why should "a" be in any way comparable to 10, for example? What does it mean to add up the contents of a string?).

Of course the examples made no sense! That's exactly the point!

You see, there are statically typed languages (Java, with some limitations C/C++, etc: if you don't use floating point values you are pretty safe there): errors like these will be detected at compile time and you'll fix them before program will be even started for the first time.

There are dynamically typed languages (Lisp, Python, etc): errors like these will be detected at runtime and end-user will see cryptic error message - embarrassing, to be sure, but not the end of the world.

And finally there are languages like PHP or JavaScript: errors like these will be detected when your applications it cracked and is happily sending spam all over the internet (or, alternatively, when your credit card info is stolen and your account is emptied).

Yes, JavaScript [...] [is] surprisingly good considering the speed at which it was created, I fully agree. It's still a crazy language which would never be used for anything serious in a better world. In our world it must be avoided as much as possible: there are cases where you are forced to use it, but there are no need to propagate this insanity further then necessary.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 2:00 UTC (Wed) by waucka (guest, #63097) [Link] (1 responses)

Hint: in C-like languages (like Javascript!), testing for equality is typically done with "==".

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 2:01 UTC (Wed) by waucka (guest, #63097) [Link]

Err...never mind. I can't read.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 9:15 UTC (Wed) by epa (subscriber, #39769) [Link] (1 responses)

There are a few restricted subsets of Javascript, sometimes with different syntax, such as CoffeeScript. They fix some of the more obvious warts in the language but still get the benefit of its wide adoption and high quality runtimes. I imagine GNOME programming could be done in one of those.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 19:27 UTC (Wed) by mathstuf (subscriber, #69389) [Link]

I tried CoffeeScript for a bit, but ended up just using JavaScript directly. JS has one rule that I get tripped up on (though much less so these days): the semicolon insertion. I kept getting mixed up with CoffeeScript's whitespacing and other magicallisms that I decided making sure the JS was clean and ensuring "use strict" was being used was going to be less of a burden.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 11:04 UTC (Wed) by canatella (subscriber, #6745) [Link] (7 responses)

Indeed and on the same vain in C

int add(int a, int b) { return a + b; }

has undefined behavior due to a possible signed integer overflow.

If you read the ecmascript spec, you'll see that the language behavior is well defined. Fyi, the <= operator is explained at 11.8.5. It's all clearly documented.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 20:16 UTC (Wed) by Cyberax (✭ supporter ✭, #52523) [Link] (5 responses)

Integer overflow is expected, that's a well-known problem after all.

>Fyi, the <= operator is explained at 11.8.5. It's all clearly documented.
That doesn't make it less bogus.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 21:11 UTC (Wed) by renox (guest, #23785) [Link] (4 responses)

> Integer overflow is expected, that's a well-known problem after all.

Yes, well known as it has created quite a few security vulnerabilities!

Javascript's craziness doesn't excuse C's own craziness: undefined behavior for integer overflow by default is a *premature optimization*..

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 22:00 UTC (Wed) by k8to (guest, #15413) [Link] (3 responses)

I disagree.

It's sort of a crazy language to the programmer but the cause is not premature optimization, but rather an attempt to be a very thin layer of helpful syntax over the system's native behavior. Since systems behave differently, you don't know what will happen, so it's undefined.

You can argue this was a bad design goal, but that's a different kind of error.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 7, 2013 6:00 UTC (Thu) by khim (subscriber, #9252) [Link] (2 responses)

Since systems behave differently, you don't know what will happen, so it's undefined.

If systems behave differently then it begs for “implementation-defined behavior”, not for “undefined behavior”. Much simpler and safer to deal with these. Indeed, the fact that C has so many “undefined behaviors” is a premature optimization - but the fact that someone made such error many years before is not an excuse to propagate this madness in newer, more modern languages.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 7, 2013 9:24 UTC (Thu) by ncm (guest, #165) [Link] (1 responses)

Implementation-defined behavior is worse than undefined behavior. The next version of the implementation will define a different behavior, and your previously well-defined program becomes wrong.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 7, 2013 11:46 UTC (Thu) by khim (subscriber, #9252) [Link]

You assume people write program to the spec. Well, newsflash to you: they don't. The very fact that both GCC and LLVM are trying (and failing) to catch a lot of undefined behaviors shows that people don't write to the spec. People write code, they write tests, if they pass - they are happy. That's it.

If program triggers implementation-defined behavior then tests are usually enough to catch problems (because compiler may do different thing from what the programmer expects but it consistently does different thing) while with undefined behavior compiler is absolutely free to do one thing in one case and completely different thing in another case. Which means that program may suddenly crash after compiler upgrade - and you have no idea why.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 8, 2013 14:41 UTC (Fri) by jwakely (subscriber, #60262) [Link]

> has undefined behavior due to a possible signed integer overflow.

No, the possibility of overflow does not make adding two integers undefined. It only has undefined behaviour if the overflow actually occurs.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 13:49 UTC (Wed) by sorpigal (guest, #36106) [Link]

You may not like JavaScript, and it certainly has some issues, but comparing it to PHP is totally uncalled for. JS has a spec, well defined behavior, fairly consistent behavior and a fairly small set of gotchas. PHP is far, FAR worse

# php
function foo(){
return array('a', 'b');
}

print foo()[0]; // SYNTAX ERROR. Intermediate variable required.

// JS:
function foo(){
return ['a', 'b'];
}
alert(foo()[0]); // Of course this works!

The difference in levels of crazy is impossible to under-emphasize!

There are a lot worse languages than JS. PHP is inescapably broken and thoroughly unsalvageable without creating what is effectively a brand new language. All JS needs is typing, a package or module system, and maybe some improvements to its standard library. Its other flaws are no more serious than those of pick-your-favorite-language.

The main issue with JS is that for a long time serious programmers ignored it and as a result it was only used by the ignorant and the short sighted. The second worst problem with JS is the DOM, which really has nothing to do with it. The third is that a lack of packages has made large and inter-connected JS code pointlessly painful. I fail to see what of any of this is as intractable as PHP's broken type system, broken object system, broken parser, etc., etc..

So, please, bash JS all you like, but don't be vulgar and bring PHP in to it.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 20:02 UTC (Tue) by Frej (guest, #4165) [Link] (2 responses)

Last i read some of it, the code was littered with let (as in immutable values). I think the mozilla js interpreter has quite a few extensions.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 0:18 UTC (Wed) by HelloWorld (guest, #56129) [Link] (1 responses)

Let has nothing to do with immutability, you can use set! to modify a let binding. The point of let is that you can give a value a name within an expression. (f (let ((a 0)) a)) is valid scheme. f(var a = 1; a) is not valid JavaScript. The whole idea of separating expressions and statements is completely backwards.

That said, I wouldn't like to program in scheme either. Syntax does matter and I also want a good static type system.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 0:36 UTC (Wed) by hummassa (subscriber, #307) [Link]

the equivalent to

> (f (let ((a 0)) a))

in javascript is written like

> f( (function() { var a = 0; return a })() )

and it works.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 0:24 UTC (Wed) by HelloWorld (guest, #56129) [Link] (1 responses)

You can actually emulate let in JavaScript. (let ((foo bar)) baz) would translate to (function(foo) { return baz; })(bar) Well, that's probably the kind of construct you'd call "interesting".

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 7, 2013 20:50 UTC (Thu) by oldtomas (guest, #72579) [Link]

Yes, that's what I was referring to

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 10:00 UTC (Wed) by canatella (subscriber, #6745) [Link] (5 responses)

You shall not be speaking about what you do not know:

https://developer.mozilla.org/en-US/docs/JavaScript/Refer...

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 10:38 UTC (Wed) by canatella (subscriber, #6745) [Link] (4 responses)

Sorry the link is not visible, javascript do have a let construct, see the previous link.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 17:28 UTC (Wed) by HelloWorld (guest, #56129) [Link] (1 responses)

It still doesn't do what scheme's let can do, i. e. give a value a name within an expression.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 8, 2013 2:24 UTC (Fri) by idupree (guest, #71169) [Link]

Firefox JS console:
> 2 + (let (x = 3) x+x) + 5
13

(I didn't know that until I read the MDN page linked above.)

I think JS compatibility is the reason people aren't using it; even V8 doesn't like that syntax (tested in Chromium JS console and node.js REPL).

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 7, 2013 20:57 UTC (Thu) by oldtomas (guest, #72579) [Link] (1 responses)

Yes, thanks for the link. At last -- this makes the language quite a bit more usable.

How's it that people is still using (function (foo) {blah blah}) (42)? Inertia?

Note that I *do* understand the construction, having read SICP, but then I'd take Scheme over Javascript any day).

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 8, 2013 4:02 UTC (Fri) by mathstuf (subscriber, #69389) [Link]

I use it in some JS I've written (see uzbl) to minimize the public API of the JS code:

uzbl.follow = (function () { /* private implementation */ return { /* api object */ }; })();

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 18:50 UTC (Tue) by pboddie (guest, #50784) [Link] (5 responses)

Maybe Scheme/Guile was historically the "official" GNOME scripting language/interpreter - I don't remember - although I actually thought it was the "official" GNU scripting language/interpreter, which is a separate matter. Meanwhile, the traditional languages for GNOME development appear to be C, Vala and Python, mostly, although as everyone has pointed out, with the right set of bindings you could develop in almost anything.

The problem with KDE and GNOME, as far as I have seen, has been the unwillingness to embrace high-level languages as first-class citizens. So although there have been some pretty good bindings for Python in both environments, there has been a tendency to push development in such languages to the margins, and the emphasis on supporting and documenting usage of such languages has been even less than for the languages favoured by the core developers.

Although I can understand that people don't want the core of a system to be a chaotic multi-language mess, the result of these policies seems to have been a reduced level of interest in developing the core components and even the accompanying applications. After all, doing stuff in C or C++ doesn't appeal to everyone. But the mindset that labels people who won't write C or C++ as "scripters", believing that they will be happy writing JavaScript on some impoverished API, is merely a continuation of the mindset that refuses to accept that people write entire systems in high-level languages and will gladly write applications for their platform if properly supported.

Instead, one gets the impression that the message is, "We hear JavaScript is cool these days, so how about you use that?" I think that people who have been pretty good at rejecting change over the years should perhaps spend a bit more time understanding their community before encouraging others to switch bandwagon, especially when those others weren't basing their choice of technology on how cool it may or may not be, anyway.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 20:15 UTC (Tue) by ovitters (guest, #27950) [Link] (2 responses)

You do know that various things have already been written in Javascript, for instance something like gnome-shell? This pretty much invalidates your assumptions about GNOME IMO.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 11:02 UTC (Wed) by pboddie (guest, #50784) [Link] (1 responses)

I'm especially willing to be corrected about GNOME when it comes to which languages are used in which parts of the system. However, I feel that my point about the languages people have wanted to use pervasively in these systems still stands. My impression is that it has been like someone having a driving licence for a car going into a dealership and being offered a motorcycle or truck because the dealership isn't interested in what most of their customers want or need.

I used to be more interested in writing desktop applications, and I would have wanted to do this in Python. Admittedly, you could do this with PyQt/PyKDE and the corresponding Gtk/GNOME offering, but despite the best efforts of the project maintainers concerned (specifically referring to PyQt/PyKDE here), things never seemed to settle enough to support those projects fully in the underlying system. There were some attempts to make "official" bindings for KDE 3, and Kubuntu did introduce some Python-based components, but I perceive those things to be too little, too late.

Offering me JavaScript is like offering me a motorcycle. I could certainly learn how to ride one properly, but as others have pointed out, by the time I have done that my interests may be better served elsewhere.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 11:28 UTC (Wed) by drago01 (subscriber, #50715) [Link]

Support for other languages is not going away. You can still write code in python, C, vala etc.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 20:23 UTC (Tue) by kragil (guest, #34373) [Link] (1 responses)

Well, JS is the new machine code. What I am trying to say is that for every language there is a compiler that compiles to JS.

And any ways with the additions in ECMAScript6 JS will eventually be a decent language and it is small and fast and flexible.

At the moment it has a lot of warts, but you can use CoffeeScript or TypeScript to get around those now.

Javascript momentum will only increase in the future IMO, so betting on it now isn't that stupid.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 22:44 UTC (Tue) by atai (subscriber, #10977) [Link]

Do you know if ECMAScript6 JS will be small and fast?

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 18:50 UTC (Tue) by Kit (guest, #55925) [Link] (11 responses)

> As a reply to my own comment I will point out that the previous language to hold this position was guile scheme.

I thought that was Vala? Whatever happened to Vala, anyways?

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 20:54 UTC (Tue) by drag (guest, #31333) [Link]

There are quite a few good programs written in Vala. It probably will continue as well as it has been.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 21:05 UTC (Tue) by marduk (subscriber, #3831) [Link] (9 responses)

> I thought that was Vala? Whatever happened to Vala, anyways?

Vala is still there. I can't speak for those guys but if I were to guess I'd say they didn't pick Vala for 2 reasons:

1) It's not "done" yet. There are still some TODOs on Vala. Although it's obviously mature enough that people are using it for complex stuff, I guess they wanted something a bit more "mature"

2) It's not well-known/popular/standard/what-have-you. Like it or not, many people already know JavaScript (at least they think they do :). Vala is a lot like C# (and Java), but it isn't. Whereas GJS is (apparently) "pure" JavaScript.

3) Perhaps because of all the C#/Mono in GNOME outcry, they wanted to avoid that flame war in favor of fresher flames.

One only wishes we could see/hear/read the full discussions that went preceded the decision.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 8, 2013 5:52 UTC (Fri) by dashesy (guest, #74652) [Link] (8 responses)

It makes sense to use high level languages when defining the behaviors of components, and it has precedence too; in Unity3d one can choose between JS and C#/Mono, and thinking about it application development and game development have a lot in common (more recently because of the 3d compositing desktop). Can you point out to the flame war related to C#/Mono? It is a very nice *real* language as opposed to JS, so there should be some specific reason for selecting JS.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 8, 2013 9:00 UTC (Fri) by khim (subscriber, #9252) [Link] (6 responses)

Can you point out to the flame war related to C#/Mono?

C# is nice language but it's dead-end because it's developed by Microsoft. It's not that Microsoft can only ever develop bad things, far from it, but the fact that Microsoft is all-too-ready to sue everyone over it's creations (see FAT patents) means that they must be avoided as much as possible. Which is sad (C# is a better language then JavaScript), but that's the world we live in.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 8, 2013 15:20 UTC (Fri) by raven667 (subscriber, #5198) [Link] (5 responses)

One should point out that there are explicit patent grants related to C# so that it's probably less likely for Mono or its users to be sued than for them to get a wild hair about suing Oracle over Java or someone else. And that's pretty unlikely given that they suport other open source projects, like IronPython and ActiveState Perl

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 8, 2013 15:48 UTC (Fri) by marduk (subscriber, #3831) [Link]

> One should point out that there are explicit patent grants related to C# so that it's probably less likely for Mono or its users to be sued than for them to get a wild hair about suing Oracle over Java or someone else. And that's pretty unlikely given that they suport other open source projects, like IronPython and ActiveState Perl.

Oh, you mean like how Oracle supports projects like Linux, BTRFS, Java, MySQL et al. (see Oracle v. Google)?

Mono is a nich market. I have few doubts that if Mono ever got too big (à la Android) then Microsoft would arm their torpedos.

All kidding aside, one of the points of my original comment was to inform that their was already an outcry about C#/Mono (and Java as well now that we mention it), so C# was perhaps in some minds passed over as "been there. done that."

So while JS was certainly going to start a forest fire (as any language would to some degree), C# (and Java) would have as well, as well as flames of a different forest.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 8, 2013 16:07 UTC (Fri) by khim (subscriber, #9252) [Link] (3 responses)

Explicit patent grants only cover small piece of C# (basically only the part which were proposed to become an ISO standard). Large parts of contemporary C# are not covered by these grants. This means that either you'll be forced to use obsolete version of C# (which will irritate many users) or you'll need to try to sidestep patents and implement the functionality in non-infringing way (as was done with FAT). Add the fact that this stuff is produced by a company with known history of such bait-and-switch tactic (FAT patents, again) and the only conclusion is: never.

As I've said: C# is nicer language then many other contenders but for legal reason it's non-starter.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 8, 2013 17:26 UTC (Fri) by dashesy (guest, #74652) [Link] (2 responses)

All I can say is that is a shame, such a nice language is inflicted with software patent warts, that goes for "to promote the Progress of Science and useful Arts". We are lucky then that Shakespeare's work is not patented, if only some lawyers knew how much money they could make to let people speak.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 8, 2013 18:12 UTC (Fri) by raven667 (subscriber, #5198) [Link] (1 responses)

I'm not sure it's more or less patented than any other language, common techniques for language, compiler, JIT, VM and interpreter design are likely to be patented by someone such as MS regardless of which language you are actually using.

I think underlying most of the anti-C# sentiment is a an anti-MS sentiment and is more political than technical or legal. It doesn't matter if code is open sourced or if there are patent grants or whatever, if it has been touched by MS it has software cooties. 8-)

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 8, 2013 21:56 UTC (Fri) by khim (subscriber, #9252) [Link]

I'm not sure it's more or less patented than any other language, common techniques for language, compiler, JIT, VM and interpreter design are likely to be patented by someone such as MS regardless of which language you are actually using.

Anything and everything is covered by patents novadays, but this is somewhat different case.

I think underlying most of the anti-C# sentiment is a an anti-MS sentiment and is more political than technical or legal. It doesn't matter if code is open sourced or if there are patent grants or whatever, if it has been touched by MS it has software cooties. 8-)

Not "cooties". Legal threats. You need huge amount of money and effort to protect themselves from someone who wants to sue you (see Google's Android and Oracle - and Java was covered by a lot of "promises", too) and Microsoft is a company with a known track record of pushing something as a "standard" then suing people over said "standard" later.

P.S. People often use "it's just a business, nothing personal" justification, and this is good justification. Good enough to avoid such "business" as much a possible, that is. Because this means that you can not ever accept anything from such a "business" without lawyers help - and this help is expensive.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 9, 2013 2:49 UTC (Sat) by Cyberax (✭ supporter ✭, #52523) [Link]

I can start a new one - Mono's garbage collector is shitty and JIT compiler is not that great either.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 23:07 UTC (Tue) by robert_s (subscriber, #42402) [Link] (2 responses)

No - it really is a terrible language. I could go on for a long (long) time about it.

And yes, Crockford is very convincing, but the fact remains that I have never seen a sanely written javascript project of any significant size.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 0:05 UTC (Wed) by FranTaylor (guest, #80190) [Link] (1 responses)

You aren't looking, check out node.js.

Of course you would not be able to see all the internal apps that are being written in node.js. It's like the desktop developers who think that java doesn't exist because they don't see any java apps, when in fact java is all over the server, calculating your bills and your paychecks.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 16, 2013 12:58 UTC (Sat) by robert_s (subscriber, #42402) [Link]

node.js is precisely the sort of thing I was talking about.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 17:27 UTC (Tue) by raven667 (subscriber, #5198) [Link] (3 responses)

That has been tried and while HTML+JS makes for a good rapid app development environment, especially when the back end of the app is a remote service, for more complex local apps developers and users prefer a native widget toolkit. HTML is a little clunky, native widgets have more rich interfaces, lower latency and better integration with system services.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 17:38 UTC (Tue) by FranTaylor (guest, #80190) [Link] (2 responses)

Why is it that Qt is migrating away from widget-style development and toward layout-based development? Because it makes for better application design, it does a better job of abstracting the user environment from the program. Layout based applications can run unmodified in all three of today's user interface environments: desktop, mobile, and web.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 17:57 UTC (Tue) by aseigo (guest, #18394) [Link] (1 responses)

QML is ~nothing like HTML+CSS. With QML we are getting the best of both worlds: fast development, platform independent code, JS and web-friendly technologies as with HTML5; but also the power and richness of native apps (via Qt Components).

QML's declarative model is also rather different (and more sane) than HTML+CSS. It's what the web-for-apps should be imo: designed for the developer and for performance without sacrifice.

So I wouldn't personally use QML as supporting evidence for HTML. :) For the power of the declarative model and to see how Javascript can be used as part of complex application development without making you want to pluck your eyes out (or retreating into the arms of a toolkit-on-top-of-the-language-that-is-running-in-a-toolkit..), yes ...

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 0:11 UTC (Wed) by FranTaylor (guest, #80190) [Link]

So you agree with me that widget-based development is obsolete, this is the point I was driving at. It's basically unchanged technology since "Dan Bricklin's Demo Program" and "EA Pinball Construction Set" from the 1980s.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 18:05 UTC (Tue) by tjc (guest, #137) [Link] (10 responses)

> I mean, the only reason to adopt JavaScript is that it is popular due to the web, since it is otherwise a poor language

Rubbish! JavaScript suffers from a few questionable design decisions, but it's surprisingly good considering the speed at which it was created. It's delightfully eclectic, with its non-constructor based objects. And it has anonymous functions and closures, so it's a little bit lispy too.

I think a lot of people who pan JavaScript are really criticizing the HTML DOM (or the web browser application development environment (which is a lot better than it used to be)) without realizing it.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 23:12 UTC (Tue) by robert_s (subscriber, #42402) [Link] (3 responses)

>I think a lot of people who pan JavaScript are really criticizing the HTML DOM (or the web browser application development environment (which is a lot better than it used to be)) without realizing it.

I think you're rather glibly dismissing javascript's critics, most of whom (I've met) tend to be rather experienced programmers.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 23:54 UTC (Tue) by FranTaylor (guest, #80190) [Link] (1 responses)

"experienced programmers"

Cobol programmers are experienced programmers. Nintendo DS programmers are experienced programmers. They can have vast experience and yet they can also be very poor judges of languages that they haven't been paid to write in.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 11:07 UTC (Wed) by pboddie (guest, #50784) [Link]

Some of the criticism of JavaScript comes from experienced programmers who have a reasonable number of languages in their portfolio and who have the insight to make informed observations about language design. I don't think anyone was using "experienced" as a euphemism here.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 1:04 UTC (Wed) by tjc (guest, #137) [Link]

I was thinking more of unexperienced programmers who copy and paste JavaScript snippets from the Internet and them deride JavaScript as a bad language when they can't get them to work correctly with their code.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 13:04 UTC (Wed) by KSteffensen (guest, #68295) [Link] (1 responses)

As someone who works with software testing, the words "delightfully eclectic" used to describe a programming language are very scary....

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 7, 2013 23:39 UTC (Thu) by tjc (guest, #137) [Link]

Sorry, I didn't mean to frighten you. :)

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 16:33 UTC (Wed) by ThinkRob (guest, #64513) [Link] (1 responses)

> Rubbish! JavaScript suffers from a few questionable design decisions, but it's surprisingly good considering the speed at which it was created. It's delightfully eclectic, with its non-constructor based objects. And it has anonymous functions and closures, so it's a little bit lispy too.

And there's the problem. Not the lisp-y part. I dig that. But the "surprisingly good considering the speed with which it was created" and the "delightfully eclectic" bits. Those aren't good things. Or at least they aren't in this context.

Yes, if Javascript were something that were a quick prototype it would be impressive. It's not. It may have started as a fast way to get some client-side scriptability for use in the Web, but once it steps outside of that arena and starts competing against languages that benefited from a longer development time its rushed nature becomes evident.

And "delightfully eclectic"? I like obscure and quirky tech as much as the next geek -- it's the sort of thing that I'll happily spend a weekend learning because it's fun -- but when it comes to actually getting things done I don't want a language which can be praised by saying it's "delightfully eclectic". I want "unsurprisingly uniform" or "mundanely conventional."

> I think a lot of people who pan JavaScript are really criticizing the HTML DOM (or the web browser application development environment (which is a lot better than it used to be)) without realizing it.

Well, yes, those parts suck too. But the former can be abstracted into the realm of "doesn't suck", and the latter -- while still nowhere near having a proper development environment -- is as you say a lot better than it used to be.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 7, 2013 23:51 UTC (Thu) by tjc (guest, #137) [Link]

> And "delightfully eclectic"? ... I want "unsurprisingly uniform" or "mundanely conventional."

I guess I should at least correct the bad example I gave, i.e. "non-constructor based objects." Scratch the "non-" part; I should have said something like "constructor-based objects," or maybe "prototype-based objects" -- I'm not really sure what the correct term is.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 18:15 UTC (Wed) by oldtomas (guest, #72579) [Link] (1 responses)

> JavaScript [...] [is] surprisingly good considering the speed at which it was created

That *was* my very point. If half of the Crockford legend is true, I tip my hat in admiration. It should have had more time to mature, thugh.

> It's delightfully eclectic, with its non-constructor based objects

That's specifically one part I *do* like about Javascript. But then there's Lua...

> And it has anonymous functions and closures, so it's a little bit lispy too

And that's another part I do like about Javascript. The core is good, but it got frozen without a chance of shedding all the mess of design mistakes it should have thrown away. No, I'm not clamoring for types. I don't particularly appreciate static types "the Java way". Maybe "the Haskell way" -- not enough experience with that.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 23:49 UTC (Wed) by mathstuf (subscriber, #69389) [Link]

> Maybe "the Haskell way" -- not enough experience with that.

Haskell can typically figure out what you want for types (type declarations on functions are typically "make sure I didn't screw up" or "don't generalize too much"[1]). Think of it of C++11's 'auto', but with the ability to use it pretty much everywhere if you want (argument types, template types, return values, etc.). And you wouldn't have to type 'auto'.

[1]I'm pretty sure that (length :: [a] -> Int) is usually optimized better than a (genericLength :: (Num b) => [a] -> b).

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 18:20 UTC (Tue) by epa (subscriber, #39769) [Link] (16 responses)

Next question: why should I develop for GNOME/Javascript rather than using Qt 5 and its first-class Javascript support?

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 20:56 UTC (Tue) by drag (guest, #31333) [Link] (12 responses)

Because by the time you finish writing your QT5 program they will be on QT7 and you will have to rewrite it from scratch again using Ruby or some such thing.

Why bother ask such a question?

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 9:19 UTC (Wed) by epa (subscriber, #39769) [Link] (9 responses)

And this compares how to GNOME's record of backwards compatibility in its libraries? As I understand it Qt has a much better record of not breaking third party programs, because they have (or had) paying customers.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 14:46 UTC (Wed) by ovitters (guest, #27950) [Link] (8 responses)

Please show that we broke backwards compatibility. We have loads of experience in API and ABI stability. Suggest at least providing some data when you make claims.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 15:17 UTC (Wed) by epa (subscriber, #39769) [Link] (1 responses)

It's out of date now but I was thinking of Miguel's blog post where he points out that many third parties (ISVs) develop against Qt but few against KDE; many against GTK+ but few against GNOME; and that lack of backward compatibility is the main reason for this.

While there are programs written against GTK+ 1.x which needed porting work to 2.x, and some (such as my former preferred web browser, Dillo) which were 'lost' to the GTK+ world in this way, that's not really a fair point to make in a comparison against Qt because Qt 1.x is equally obsolete.

So I take back what I wrote; I really meant to defend Qt as having a good backwards-compatibility track record, rather than denigrate GTK+ and GNOME.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 15:33 UTC (Wed) by pboddie (guest, #50784) [Link]

I thought the lack of permissive licensing was the principal reason given by De Icaza for a lack of ISV support for Desktop Linux, although there was a much more recent blog post that also mentioned backwards-compatibility as well, as I recall (and to which you are probably referring).

Certainly, lots of people still seem to develop against Qt (despite Nokia trying to eliminate the business of supporting and developing it sustainably), and backwards-compatibility has a lot to do with that, alongside a long track-record of support for the technology actually being available.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 19:33 UTC (Wed) by mathstuf (subscriber, #69389) [Link] (1 responses)

It's not GNOME exactly (AFAIK), but webkitgtk removed the "enable-default-context-menu" property on the WebKitWebViewSettings class in 1.9.0 (I track webkitgtk fairly closely for uzbl's benefit). Not to mention that things get deprecated all the time and the replacements do not necessarily match features of the deprecated ways. Not to mention that webkit2 is missing some support for things webkit1 supports (though I understand that webkit2 isn't "ready" yet, I don't know if it will be before these differences are addressed).

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 7, 2013 9:17 UTC (Thu) by ovitters (guest, #27950) [Link]

We deprecate things and then change it during a major version only. All libraries should be parallel installable though. Not sure what the problem is here.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 7, 2013 6:29 UTC (Thu) by paulj (subscriber, #341) [Link] (3 responses)

The rather useful and good, but not maintained, "Referencer" programme is no longer runnable on modern distros like Fedora 16. This is because it depends on a GNOME library whose functionality was deprecated and replaced with additions to GLib. GNOME doesn't ship that library anymore I think. Further, even building the library on a modern system is hard, at least using the distro based SRPM functionality on Fedora.

I mentioned it before here: https://lwn.net/Articles/526428/

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 7, 2013 9:16 UTC (Thu) by ovitters (guest, #27950) [Link] (2 responses)

We deprecated those libraries ages ago. Your comment actually proves my point exactly, we deprecated that library and still kept it around and maintain it.

We then changed the major version many years later.

Only *now* you're having difficulties only because your distribution does not ship the library anymore. In your other comment you suggest that somehow there are conflicts between the 2.x libraries and the 3.x. That is not the case, please show where it is.

From what I can gather, you're only running into difficulties building libraries. That your distribution does not ship this library anymore (mainly because all maintained programs did move over to gvfs) does not imply backwards compatibility was broken.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 7, 2013 9:32 UTC (Thu) by paulj (subscriber, #341) [Link] (1 responses)

The reason it's hard to build, at least using the distro SRPMs, is because it depends on other, older GNOME libraries. I'd effectively have to rebuild a whole slew of old libraries and install them somewhere, before I could build this library, before I could run my app. These slew of dependencies across a set of libraries possibly were also a significant factor in the distro no longer shipping them.

I mention this not to dispute your point that GNOME maintains binary compatibility in libraries, but to provide a data-point that suggests that this is not sufficient for functional compatibility from the users' point of view. GNOME developers could look into that and see if anything could be done, if they felt it important.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 7, 2013 15:58 UTC (Thu) by raven667 (subscriber, #5198) [Link]

This whole thread is indicative of a real problem and I would look to the kernel for guidance. The kernel deprecates APIs but maintains and ships the old ABI, usually by having it be a shim layer to the new API. If GNOME 3 were to do the same thing then they would ship all of the GNOME 2 libraries or at least compatible stubs and consider them all part of the ABI, indefinitely. They wouldn't rely on the downstream distributors to individually package the pieces and parts and would make it easy for them to maintain ABI compatibility.

That's not the world we live in though, user space, long term compatibility isn't the biggest priority.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 9:36 UTC (Wed) by BlueLightning (subscriber, #38978) [Link] (1 responses)

What a load of rot. Qt 4.0 was released in June 2005 and the 4.x series is still being maintained. Qt 4 even contains the Qt3Support classes for easier migration of code from Qt 3.x. Not to mention that migrating from Qt 4 to the just-released Qt 5 has been made intentionally easy.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 16:47 UTC (Wed) by drag (guest, #31333) [Link]

I was being sarcastic.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 1:08 UTC (Wed) by tjc (guest, #137) [Link] (2 responses)

It's curious that both Qt and Gnome decided that JavaScript is the way to go. I wonder who influenced whom. Qt 5 was out first, but the Gnome project has been talking about this since 2009, if memory serves.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 3:16 UTC (Wed) by Sho (subscriber, #8956) [Link]

You could write KDE apps in JS via kjsembed since at least a decade ago, fwiw (remember, KDE's JavaScript interpreter ended up in WebKit).

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 13:35 UTC (Wed) by macson_g (guest, #12717) [Link]

Qt introduced native JavaScript support in Qt-4.3, which was released in May 2007.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 18:52 UTC (Tue) by keithcu (guest, #58738) [Link] (1 responses)

I wrote a dissent here: http://keithcu.com/wordpress/?p=3101

Here are the first few paragraphs:

Yesterday I read a blog post / announcement about how Gnome is moving to Javascript and I wanted to write some feedback.

It is great that they are using a garbage-collected language for as much code as possible. For a component-based shell UI, Javascript is a reasonable choice, and surely better than C, C++, or Java. I realize they started down this road towards Javascript years ago, but I think it is worth re-considering whether they are on the right path.

With big decisions, it is nice to have a paper trail. I can find no supporting documentation backing up the decision and the reasons other than one blog post written after the fact, which doesn’t give very much information.

It appears the decision was made in a meeting. It is great to have meetings to discuss things, and it is great to make decisions in meetings, but oftentimes the results are about moving the decision-making process forward, not actually committing to big things. Even if there were many in that room, there are surely facts they didn’t have, and other interested parties who were not there. There is the risk of “tyranny” by a self-selected cabal. Hopefully the decision wasn’t made at a bar ;-)

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 20:22 UTC (Tue) by ovitters (guest, #27950) [Link]

The decision was made during the GNOME developer experience hackfest. I'm pretty sure that this was documented. During the hackfest people committed to making things happen, plus they actually did a lot of work.

So it was not made in a meeting, everyone who wanted to join could've, the hackfest was pretty widely announced, you could get sponsored to go to the hackfest, people with intimate knowledge about various languages attended (incl Python for instance).

Seems you like Python. Cool. You might want to read Planet GNOME. For instance this blog post by one of the people who worked on the Python bindings: http://www.j5live.com/2013/02/04/gnome-and-languages/

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 21:19 UTC (Tue) by atai (subscriber, #10977) [Link] (1 responses)

What is the impact of this on non Javascript apps? For example, can pure C GNOME apps (and Vala ones) can still be written without dragging a Javascript VM into the app?

The most extreme scenario is like Android, where it is impossible to write an app without involving Java (if using native system UI facilities). I hope this will not be the scenario with GNOME and Jaavscript

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 21:43 UTC (Tue) by drag (guest, #31333) [Link]

The people that supported the Gnome bindings for various languages will continue to support them as they see fit. Nothing has changed. People programming 'system libraries' (ie: anything meant to be used by multiple programs) will want to continue to program in C.

They really want to make one a first class 'this is what you use' language for Gnome so they can concentrate on improving the stuff that matters... development tools, test cases, documentation, etc etc.

Javascript is just about the most commonly used and understood programming language on Earth right now. GJS is based on SeaMonkey so that it's fast, well supported, mature, and modern garbage collected language, and other happy stuff. Apparently the bindings are good even though it's relatively new for Gnome. Makes sense to pick it despite the natural snobbery you see from language lawyers you'd expect to see. :P

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 23:06 UTC (Tue) by zlynx (guest, #2285) [Link] (26 responses)

I surely hope the Javascript programmers are better than the Python programmers. I doubt it.

The problem is, dynamic languages make lazy programmers. They don't know or care what values a function might return. They only care about what it returns on success.

You might think that a Python library would return with an exception if it hit an error. How wrong. No, Python libraries return whatever the programmer felt like that day. If it returns a string in normal operation it might return an empty string on failure. Or False. Or None. Or a tuple of error code and description string. Or a custom Error object of some sort. Sometimes an exception. Pretty much at random, and the interpreter won't help you with a warning of any sort until an error actually happens.

This leads to the really annoying Python programs I keep running into on the Linux desktop where they work fine most of the time, but if you try to open a file on a network share and it returns some unexpected error the entire program exits with a stack trace.

Or the lovely errors and crashes the Fedora installer likes to return because it got an unexpected return value from probing LVM or RAID settings.

The VERY BEST THING for these programmers is to lock them into a C, C++ or Java straight-jacket and throw away the key. Hide the dynamic languages somewhere they can't find them. They might be allowed to use Go or Scala if they ask nicely.

Javascript is a horrible idea.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 5, 2013 23:59 UTC (Tue) by FranTaylor (guest, #80190) [Link] (7 responses)

"dynamic languages make lazy programmers"

They also make programs that are easier to maintain by other developers because they are not overburdened with type information that is either redundant or irrelevant.

Have you ever worked in QA? Do you know where bugs come from? Many many bugs come from statically typed languages when square pegs are pushed into round holes by implied casts. You can say "experienced developers should not fall for this" but the simple fact is that even the most experienced developers create far more bugs per LOC in static languages than they do in dynamic ones.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 0:50 UTC (Wed) by HelloWorld (guest, #56129) [Link]

> They also make programs that are easier to maintain by other developers because they are not overburdened with type information that is either redundant or irrelevant.
Modern languages have type inference.

> Have you ever worked in QA? Do you know where bugs come from? Many many bugs come from statically typed languages when square pegs are pushed into round holes by implied casts.
The issue here isn't static typing but what you call "implied casts". And in fact, sensible languages don't have those except in cases where they're guaranteed to work (i. e. subtype to supertype conversions, integer widening).

> You can say "experienced developers should not fall for this" but the simple fact is that even the most experienced developers create far more bugs per LOC in static languages than they do in dynamic ones.
Bollocks.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 3:21 UTC (Wed) by mathstuf (subscriber, #69389) [Link] (1 responses)

> They also make programs that are easier to maintain by other developers because they are not overburdened with type information that is either redundant or irrelevant.

I understand "redundant" but irrelevant? Care to give an example?

> Do you know where bugs come from? Many many bugs come from statically typed languages when square pegs are pushed into round holes by implied casts.

IME, at least I can get a static-typed language's compiler to warn me about cases. Python, PHP, JS, etc. just chug along merrily without a peep.

> You can say "experienced developers should not fall for this" but the simple fact is that even the most experienced developers create far more bugs per LOC in static languages than they do in dynamic ones.

I believe the research that I heard about[1] last found that bugs per LOC is about the same in every language[2]. It's just that "scripting" languages (which tend to be dynamic-typed) typically need fewer lines to do what they need.

[1]I'll try to find it.
[2]I'd be interested to see if PHP and bash are outliers in this and if so, by how much.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 18:11 UTC (Wed) by mathstuf (subscriber, #69389) [Link]

> I'll try to find it.

It seems that this[1] StackOverflow post is a place to launch from.

[1]http://stackoverflow.com/questions/2898571/basis-for-clai...

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 21:17 UTC (Wed) by khim (subscriber, #9252) [Link] (3 responses)

They also make programs that are easier to maintain by other developers because they are not overburdened with type information that is either redundant or irrelevant.

Care to offer an example of a sizable program which is 10+ years old, not maintained by the people who've written it 10 years ago and which is written in a dynamic language?

There are many such programs in C and enough in Java, but I'm yet to see anything like this in a dynamic language. When people who designed stuff are moving from project programs in dynamic languages quickly turn to unmaintainable mess and are usually rewritten. This is direct opposite to "easier to maintain" in my book. Programs in statically typed languages are kept around for decades (Cobol jokes aside there are a lot of programs in statically typed languages which are still in use).

Have you ever worked in QA? Do you know where bugs come from? Many many bugs come from statically typed languages when square pegs are pushed into round holes by implied casts.

Have you ever worked with security teams? Do you know where bugs unnoticed by QA but actively exploited in the wild come from? Many many bugs come from dynamically typed languages (primarily JavaScript and PHP, of course) which "do the right thing" in hothouse QA testing but then break apart in the wild.

If you want to create program which will frustrate QA but which which will work reliable once released - use statically typed languages, if you want to create program which easily passes QA but then guarantees lifelong job insurance because someone needs to plug security holes again and again - use dynamic languages.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 7, 2013 1:17 UTC (Thu) by dirtyepic (guest, #30178) [Link] (1 responses)

>Care to offer an example of a sizable program which is 10+ years old, not maintained by the people who've written it 10 years ago and which is written in a dynamic language?

Portage.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 7, 2013 6:10 UTC (Thu) by khim (subscriber, #9252) [Link]

Portage is great example of the phenomenon described above: it had few serious instances of typical dynamic languages crises of "we don't understand what goes on here and don't know how to fix that" variety, large pieces of it were rewritten in not-really-backward-compatible-manner because noone knew what goes in some pieces of it... and it's still a PITA for a Gentoo developers because of all these problems.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 7, 2013 5:05 UTC (Thu) by bronson (subscriber, #4806) [Link]

sysvinit :)

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 9:23 UTC (Wed) by epa (subscriber, #39769) [Link] (16 responses)

I feel your pain and of course I would like to set up some Inquisition where programmers are tortured until they carefully handle and document every error case and return condition in every line of their program. However, I think you are being unfair in attributing this to dynamic languages. There is a huge amount of C code which doesn't handle error cases well, resulting in your application going kaboom when using network shares and so on. C++ and Java give you a richer toolset for handling error conditions but they still can't force programmers to use it sanely; and again, there is plenty of code in those languages with terrible error handling.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 17:22 UTC (Wed) by HelloWorld (guest, #56129) [Link] (15 responses)

Well, actually it's pretty hard to screw up exception handling in Java due to checked exceptions. You have to write additional code to ignore an error, there's not much more a language can do.

(and no, you shouldn't take this to mean that I somehow endorse Java. I don't, it plain sucks as a language.)

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 21:45 UTC (Wed) by zlynx (guest, #2285) [Link] (7 responses)

And for C/C++ there is usually a compiler option to warn/error about ignored function return values. This is incredibly useful and should be required.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 21:58 UTC (Wed) by mpr22 (subscriber, #60784) [Link]

Unfortunately, C code that meticulously collects the return value of everything that can fail essentially-harmlessly is a real pain in the neck to read, because it's salted either with cast-to-void or with piles of pointless error-checking logic. (I hate reading C code where some coding-standards martinet has insisted that all printf() calls must be cast to void.)

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 8, 2013 14:51 UTC (Fri) by jwakely (subscriber, #60262) [Link] (5 responses)

> And for C/C++ there is usually a compiler option to warn/error about ignored function return values.

What's GCC's option for that?

You can use __attribute__((warn_unused_result)) but putting that on every function returning non-void is hardly practical, let alone portable.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 12, 2013 19:51 UTC (Tue) by mgedmin (subscriber, #34497) [Link] (3 responses)

-Wno-unused-result exists, according to the gcc(1) manual page.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 12, 2013 20:21 UTC (Tue) by nybble41 (subscriber, #55106) [Link] (2 responses)

The -Wno-unused-result option does exactly the opposite of what is wanted: it turns off the warning which would otherwise be issued for functions which have been tagged with __attribute__((warn_unused_result)). You still have to tag specific functions whose results should not be ignored. There does not appear to be an option to enable the warning for all non-void functions by default.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 12, 2013 21:03 UTC (Tue) by mpr22 (subscriber, #60784) [Link] (1 responses)

Enabling the warning for all non-void functions by default leads to code being liberally salted with futile error-checking and/or casts-to-void.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 12, 2013 22:56 UTC (Tue) by Cyberax (✭ supporter ✭, #52523) [Link]

Futile?

Nope. Apart from maybe printf() - most of the error checking is necessary for secure code.

It just shows that exception handling is really much better than return codes when you want something that's reliable _and_ easy to read.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 12, 2013 21:04 UTC (Tue) by zlynx (guest, #2285) [Link]

You are right that there is no global option in GCC. I was thinking of the per-function attribute.

Warnings about unused results are also common in code analysers like Splint and others.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 7, 2013 1:44 UTC (Thu) by ThinkRob (guest, #64513) [Link] (5 responses)

> Well, actually it's pretty hard to screw up exception handling in Java due to checked exceptions. You have to write additional code to ignore an error, there's not much more a language can do.

Oh no, there are ways.

Like someone deciding to make a base exception class that extends RuntimeException thus does not need explicit 'try'/'catch' handling or 'throws' declarations.

Sadly, this is not purely hypothetical. I've worked on codebases where this was the case; damn near everything was a runtime exception. It was very explodey.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 7, 2013 6:15 UTC (Thu) by khim (subscriber, #9252) [Link] (4 responses)

It was still relatively safe. Explodey programs are bad, but programs which are silently doing the wrong thing are worse. And languages like Javacript or PHP tend to produce exactly such a thing.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 7, 2013 8:23 UTC (Thu) by ekj (guest, #1524) [Link] (3 responses)

PHP is indeed fucked up, but most of that is just a case of "we made dumb choices once upon a time, and now we can't fix it because then we'd not be backwards compatible".

Nobody really thinks it's a good idea, for example that "0.0" == 0 is true but if(0) and if("0.0") has opposite effects. (i.e. despite the fact that "0.0" is claimed to be equal to 0, nevertheless one of these is considered "true" in a boolean context, while the other is false.

if ( $a == $b && $a && !$b) is potentially true in PHP, and that's just *one* example of the mistakes made while designing this language.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 7, 2013 11:58 UTC (Thu) by khim (subscriber, #9252) [Link] (2 responses)

if ( $a == $b && $a && !$b) is potentially true in PHP, and that's just *one* example of the mistakes made while designing this language.

Well, it look like we are in violent agreement, then. JavaScript's analogue:

> a = "0"
  "0"
> b = 0
  0
> a == b && a && !b
  true

JavaScript is fucked up for the very same reason PHP is fucked up: they try to "silently fix novice's errors" - and in real programs this tends to lead to security holes sooner or later (usually sooner). Neither PHP not JavaScript should be used directly "as is". Never. Solution for PHP: don't. Just forget about PHP and use some other languages if posible. There are many of them: Java, Python, even C or Perl are better then PHP. Just don't. Solution for JavaScript: use some higher-level language which is compiled to JavaScript. There are quite a few contenders at this time: CoffeeScript, TypeScript, even subset of Java (if you use GWT).

To add JavaScript to your desktop environment as a primary development tool? Gosh, what are they thinking? Do they hate developers this much?

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 7, 2013 13:38 UTC (Thu) by ekj (guest, #1524) [Link] (1 responses)

Yeah. We appear to agree. I'm just tired of those people who think that these problems can only be solved (or atleast improved upon) by having a statically typed language.

Python is, IMHO proof that it's possible to solve many of these problems and have a cleaner, safer language while remaining dynamically typed.

In Python 0 == "0" is False (indeed 0 == any_string_whatsoever is False)

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 7, 2013 16:25 UTC (Thu) by khim (subscriber, #9252) [Link]

Yeah. We appear to agree. I'm just tired of those people who think that these problems can only be solved (or atleast improved upon) by having a statically typed language.

These programs can not be ever be solved (you can write Fortran in any language) but they can be reduced. Statically typed languages are on one side of the spectrum (and there there are different shades of gray, too): a lot of problems are detected when you try to compile program. Dynamically typed languages are the next best thing: problems are detected in runtime and end user observes see "[x is out of range]" instead of "there are no page to edit" message, but the PHP is at the other end of spectrum: user does not see anything wrong while it's data is slowly corrupted beyond repair. JavaScript is close behind.

Python is, IMHO proof that it's possible to solve many of these problems and have a cleaner, safer language while remaining dynamically typed.

Sure. But it still does not make it usable for an industrial projects. Which are defined not by size but by staff turnover: it's not uncommon to see project handled by 4 or 5 generations of programmers in the course of 10 years in a commercial environment - and each generation start with the code but without help from the previous generation. Dynamically typed languages almost wholly unsuitable for such a development, statically typed languages fare much better.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 7, 2013 12:11 UTC (Thu) by epa (subscriber, #39769) [Link]

Well, actually it's pretty hard to screw up exception handling in Java due to checked exceptions.
Including out of memory conditions?

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 11:11 UTC (Wed) by pboddie (guest, #50784) [Link]

Kids these days, huh?

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 1:18 UTC (Wed) by russell (guest, #10458) [Link] (4 responses)

Javascript is the new Perl. When the hype dies out, people will realize it's ugly, difficult and impossible to maintain large code bases.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 4:00 UTC (Wed) by jgon (guest, #89199) [Link] (1 responses)

Amen. Javascript is a great language if you:

1) Hate doing math with anything other than floats, that can overflow or truncate silently. Even though everything is an object, why would we want a numeric tower in the first place?

2) Hate modularity. Luckily in one of his responses the Gnome dev said that they are targeting apps the same size as you might find on your smartphone.

3) Related to 2, apparently enjoy the idea of using apps that are small due to screen and power constraints as your model for desktop apps. Angry Birds Gnome here we come, LibreOffice get lost. Why should any app be greater than 10,000 LOC? Luckily with javascript you'll have a hard time getting there anyway.

4) Hate using a language that allows a program to pay for only what it needs. Tree-shaking is impossible so even if you aren't using it, you'll bring it along anyway. Luckily you can minimize and gzip your libraries just like in web development! Also, this way you can spend your development time deciding if the convenience function you want to add provides more utility than it costs in library size and start-up time. What else are you going to spend your time doing?

5) Hate apps that start-up quickly. Luckily in Javascript you have to parse and run the code that creates your structures and functions, because Javascript mutates your environment state as you parse it! Declarative definitions be-gone! This is also super helpful if you hate the ability to provide tooling for your environment, because you only know what code does once you run it with the full state of the program and run-time behind it!

6) Hate sensible lexical scope. No big deal, it's only been 50+ years since Algol introduced it, why would we need it in 2013? For loops should always be confusing to deal with.

7) Hate languages that are responsive to user complaints. Javascript has managed to go ~13 years since it had any substantive changes made to it, and the committee is working as hard as it can to ignore user input for at least another year or two. Luckily, even if they are forced to put out a new standard, it will still be years before you can expect widespread adoption. If I play my cards right I can probably go another decade before being able to count on ints and lexical scoping.

In summary, this seems to be another attempt by Gnome to chase after the mythical "mainstream" although this time it's mainstream developers they're chasing and not users. I can't see any sort of technical grounds on which this decision could have been made, so it must be another popularity contest that the Gnome devs have decided to wade into. I wish them luck, and I can't wait for the hundreds of todo apps, and pomodoro timers this decision will surely lead to.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 19:08 UTC (Wed) by mathstuf (subscriber, #69389) [Link]

> 6) Hate sensible lexical scope. No big deal, it's only been 50+ years since Algol introduced it, why would we need it in 2013? For loops should always be confusing to deal with.

To be fair, Python also has function scoping. Though it is saved in that variables are local by default.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 21:23 UTC (Wed) by khim (subscriber, #9252) [Link] (1 responses)

It depends on the availability of ways to deploy code written in other languages. Today you can only use JavaScript if you want to create application which works in browser and does not require installation. Java is basically dead (because Sun/Oracle were unable to make it adequately safe), Flash is dying (Apple succeeded in killing it) so what's left? JavaScript.

There are some interesting projects in development, but I'm not sure we'll have a choice of anything besides JavaScript any time soon. But to use JavaScript outside of web development? That's insanity, pure and simple.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 8, 2013 6:07 UTC (Fri) by dashesy (guest, #74652) [Link]

There is also C#/Mono

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 7:50 UTC (Wed) by lkundrak (subscriber, #43452) [Link] (11 responses)

Is there a good example of a significant GNOME application written in Javascript?

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 10:12 UTC (Wed) by dgm (subscriber, #49227) [Link]

Not yet, AFAIK. That's what they are supposed to be doing from now on. We can only hope that they dog-feed themselves, and try to develop the development tools in JS.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 11:39 UTC (Wed) by drago01 (subscriber, #50715) [Link] (9 responses)

gnome-shell (ins't really an application in the classical sense). gnome-documents would be the other one.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 18:19 UTC (Wed) by droundy (subscriber, #4559) [Link] (8 responses)

This is a pretty sad example of apps written in javascript. I don't know about gnome-documents, but in my experience gnome-shell makes fast computers seem slow, and slow computers unbearable. While it might not be the language at fault, it would be nice to have an example of a good gnome program written in javascript before committing the future of gnome to it.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 7, 2013 9:22 UTC (Thu) by ovitters (guest, #27950) [Link] (5 responses)

GNOME shell does not make fast computers slow. Secondly, Javascript will be the preferred language. As such, committing the future of GNOME to it? There will still be Vala, C, Python, etc.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 7, 2013 15:03 UTC (Thu) by paulj (subscriber, #341) [Link] (4 responses)

GNOME shell definitely has significantly higher resource needs than the previous Metacity/Compiz environments. Worse, it seems to leak memory. It's RSS expands and expands with time, until it starts causing the machine to have to swap. At which point you have to kill gnome-shell to have it restarted and get a useable desktop back.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 7, 2013 15:14 UTC (Thu) by ovitters (guest, #27950) [Link] (3 responses)

I responded to making fast computers slow.

You bring up something different, higher resource usage compared to metacity/compiz. GNOME shell is based on clutter, etc. Totally different than metacity.

The higher usage vs metacity is partly because of compositing and at the moment there is a binding bug with clutter (IIRC). Not much to do with Javascript. It would have been exposed in any binding. That bug was unfortunately only fixed in unstable, not in 3.6.x. In any case, you would've seen the same in Python, etc.

Of course, you can judge a Javascript decision on whether or not that bug is fixed at the moment. But actually we also fix memory leaks in other programs. Be it C (lots), Python, etc.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 7, 2013 15:43 UTC (Thu) by paulj (subscriber, #341) [Link]

Well, my laptop has fast enough CPUs (pretty much any x86 CPU made in the last 5 odd years is "fast"). Unfortunately, it doesn't have that much memory (1.5GB). This was sufficient prior to GNOME shell, except that I couldn't keep as many browser tabs open as on my desktop, and it was better to minimise swapping between LibreOffice and my browser, when using the former. GNOME shell's memory usage, its tendency to expand quite quickly, has put an additional pressure on memory, such that it's regularly much slower than before, as it's using swap much more heavily than before.

If bugs relating to leaks have been fixed, and things are due to improve in future releases, that's great.

I didn't place any blame on Javascript. ;) Though, for whatever it's worth, my experience is that it can be even harder to avoid or fix leaks in GCed languages than in ones with explicit semantics for managing ownership of memory.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 11, 2013 15:25 UTC (Mon) by droundy (subscriber, #4559) [Link] (1 responses)

Interestingly, I didn't say it made fast computers slow, I said it made fast computers <i>seem</i> slow, which is quite a different statement. I also didn't say that javascript was to blame, more likely it was javascript developers who were to blame. But the correlation is not encouraging.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 11, 2013 15:42 UTC (Mon) by ovitters (guest, #27950) [Link]

Not sure how you see the correlation. Why pick javascript and not the compositing? Or maybe gtk+3.x, dconf, etc?

In practice the slowness is often combination of compositing and drivers btw (aside from just outright gnome-shell bugs :P). Use gnome-shell on another system or with another driver and you'll see a huge difference.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 7, 2013 10:05 UTC (Thu) by ncm (guest, #165) [Link]

It depends on your goals. Switching your "emphasis" to an untried language makes exactly as much sense as eliminating everything people liked about your product. When the goal is to become irrelevant, every choice gets easy. Likewise, when the goal is to make every choice easy, each easy choice makes you less relevant.

Staying relevant is the exception. Linux still is. C++ and even C still are. Intel, astonishingly, still is. TCP/IP is. Things don't look too good for Java or for habeas corpus. One of those will be missed even by people who say we never really had it.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 7, 2013 12:22 UTC (Thu) by kigurai (guest, #85475) [Link]

I don't remember noticing that Gnome-Shell would be slower than any other *composited* desktop environment.
I have a netbook that runs it quite well.

gnome-documents is pretty fast. Try it.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 10:32 UTC (Wed) by canatella (subscriber, #6745) [Link] (2 responses)

As someone developing and maintaining a javascript application roughly the size of xfwm4 (30K sloc) and multiple C library/application, I can say that Javascript is no a bad language per se, even though any person with enough wisdom could tell you that. You have to know how to work with it and how to organize it, as any other language. It is certainly clearer then Perl (much less magic). Go read the spec:

http://www.ecma-international.org/publications/standards/...

You'll see it's a well constructed and thought of language. It has its quirks, but any language has some. Then there is the statically vs dynamically typed language battle which is not only related to javascript. I do like both, you just have to use the right tool for the job. I find that higher level stuff is best written and maintained in dynamic stuff while libs and frameworks needs the constraint of statically typed languages (fyi, I've been also programming in perl, ruby and java).

People complaining about javascript should first learn about it, write a real applications and then express themselves. I'm convinced a _good_ C programmer can also write good and maintainable application in javascript.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 21:31 UTC (Wed) by khim (subscriber, #9252) [Link]

I find that higher level stuff is best written and maintained in dynamic stuff while libs and frameworks needs the constraint of statically typed languages (fyi, I've been also programming in perl, ruby and java).

It's not "high-level" is "low-level". It's "few knowledgeable maintainers who really know what they are doing" vs "bunch of random fixes from all around the place brought together by people who've not participated in the initial design".

High-level stuff just more often falls in the first category and libraries more often fall into the second category.

Dynamically-typed languages are nice and fast to program in if you know what you are doing, statically-typed languages provide guarantee that at least the most awful atrocities will be caught right away.

From a fan

Posted Feb 7, 2013 0:01 UTC (Thu) by man_ls (guest, #15091) [Link]

First, I like the language a lot: it has finally brought functional programming to the masses, something that neither Lisp nor Scheme and arguably not even Python managed to do.

But frankly, it lacks a few things. There are no provisions for modularization; nothing to make big modules out of small pieces. There is not even a mechanism to include one file in another, something so basic that even pseudo-languages like XSL manage to do (and that all implementations have to invent on their own). The object-oriented model is pathetic; prototypes just don't cut it. Inheritance is a joke. Callbacks can get hellish quickly; I have heard people rooting for promises, but I am not sure they will solve anything. And so on.

The good side: you can build all of these pieces yourself since the building blocks are so basic. And they can be added to the spec later on (perhaps even decent inheritance?). We can only hope.

Some details

Posted Feb 6, 2013 12:59 UTC (Wed) by man_ls (guest, #15091) [Link] (3 responses)

I expected to see some technical questions in the discussion, instead of rehashing the usual complaints about the language.
  • What virtual machine is this thing running on? Apparently GJS, which is based on Mozilla's SpiderMonkey; at least we can expect good performance.
  • Will they try to tackle the rich ecosystem (and momentum) around node.js? At least, retrofitting a web server (which was in turn adapted from a browser) for desktop usage would be a fun experiment.
  • What level of language compatibility can be expected? JavaScript is a dangerous minefield of incompatible implementations.
  • What about compatibility with other languages? Right now C is chosen because it is the most compatible: most languages can access C libraries. Will it suffer?
There is surprisingly more discussion of this type in the blog post, something I would not have expected on LWN.net. Some of these points are tackled, some not.

Some details

Posted Feb 6, 2013 15:01 UTC (Wed) by nye (subscriber, #51576) [Link] (2 responses)

>What level of language compatibility can be expected? JavaScript is a dangerous minefield of incompatible implementations.

I've only really come across complaint from people talking about the DOM, not the language itself.

Are there deeper implementation incompatibilities that I'm not aware of?

Some details

Posted Feb 6, 2013 16:28 UTC (Wed) by man_ls (guest, #15091) [Link] (1 responses)

There are incompatibilities at all levels across JavaScript implementations: In practice web devs often assume that the latest version of all browsers have all the standard features -- until they find a feature (or a stupid implementation detail) that completely breaks some old IE version and have to back up. Real world example: IE 6 does not accept trailing commas in object definitions, and it refuses to render any page that contains them.
var object = {
  attr1: 'cheese',
  attr2: 'runny',
}
Note the comma after 'runny'; a pretty core language feature, and useful I would say. Even the much-hyped node.js has pretty serious limitations in support for ECMAScript 5.

Some details

Posted Feb 6, 2013 18:15 UTC (Wed) by nye (subscriber, #51576) [Link]

I don't really see this as being particularly different to other languages. Most of that seems to be about trying to use newer features in older implementations, which isn't something I'd really expect to work (rather like trying to use C++11 features in GCC2.95).

IE6 is always the anomaly in this kind of thing, in that it had so many bugs even at the time, but I think if anyone is currently considering developing for Gnome but only willing to write in the specific JS dialect available in IE6 then they probably have bigger problems.

Obviously if the implementation they're using only supports older language versions that people are used to using then there is a problem, but if anything it's likely to be the other way around.

A bigger potential for problems would be if there are certain language constructs that work in different JS versions but do *different things*; I have no idea if that could be the case.

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 6, 2013 19:37 UTC (Wed) by klapauzius (guest, #89215) [Link] (1 responses)

Question: How can you make a language your "primary language" if there isn't even a usable debugger let alone a usable development environment for it ?

Answer from a GNOME developer:

Excuse me, but may i ask very politely: What exactly is a "de-bugga" ?

Although i have no idea what you're talking about i looked up this webpage and it says there's a program called "looking glass" that seems to be that de-beggar thing you're missing. From what i understood it basically does nothing and crashes most of the time, which brings me to my second point: What in the world should such a de-bigger thing be for ? Anyway, i didn't need a "dee-bagga" for my latest business app that shows the words "Hello World" in a reeeeeeeally awesome animation if you touch a 4-pixel wide area of the screen edge with the mouse and press a certain key-combo simultaneously. So i have to assume that a de-bogger is simply one of those remnants of the past, of days of programming "programs" gone by that we at GNOME simply did away with a long time ago. We don't do that. We develop apps. No dee-bagger here. Move on. Live with it. If that's not for you, well, get lost. Which makes me believe that your absurd question about this "dao-bugga" is just another attempt at trolling, at pouring the nasty liquid of the GNOME-haters on our beloved desktop environment that does very well without duh-biggers, thank you very much ! I therefore recommend you move on to some other, de-baggo-containing DE like KDE, CDE or whatever and de-bag as long as you may wish !

Get lost !

Reitter: Answering the question: "How do I develop an app for GNOME?"

Posted Feb 11, 2013 23:41 UTC (Mon) by nix (subscriber, #2304) [Link]

With a name like *that*, I think we can say this is obviously a trurl account.

(sorry sorry the devil made me say it, and if you don't get it google either Trurl or Klapaucius...)


Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds