User: Password:
|
|
Subscribe / Log in / New account

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

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

Posted Feb 5, 2013 16:41 UTC (Tue) by heijo (guest, #88363)
Parent article: Reitter: Answering the question: "How do I develop an app for GNOME?"

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.


(Log in to post comments)

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]

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]

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 (subscriber, #4012) [Link]

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 (subscriber, #4165) [Link]

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]

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 (subscriber, #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]

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]

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]

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

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]

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]

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]

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]

...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 (guest, #30858) [Link]

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]

"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 (guest, #2330) [Link]

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 (subscriber, #31333) [Link]

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 (subscriber, #63097) [Link]

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 (subscriber, #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]

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]

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]

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 (subscriber, #23785) [Link]

> 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 (subscriber, #15413) [Link]

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]

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 (subscriber, #165) [Link]

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 (guest, #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 (subscriber, #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 (subscriber, #4165) [Link]

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]

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]

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]

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]

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]

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]

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]

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 (subscriber, #27950) [Link]

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]

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]

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]

> 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 (subscriber, #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]

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

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]

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]

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]

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]

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]

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]

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]

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]

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]

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]

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]

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

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

"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 (subscriber, #68295) [Link]

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 (subscriber, #64513) [Link]

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

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


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