News for hackers. Stuff that matters.
Re:GTK has a new website by jtvjan on Sunday March 01, 2020 @05:24PM (#22459797)
The previous site, for comparison: https://web.archive.org/web/20200209181217/https://www.gtk.o...

I think it's pretty strange that the code example widget defaults to showing JavaScript code, considering that C is GTK's native language.

Re:GTK has a new website by tomtheelder on Sunday March 01, 2020 @05:34PM (#22459867)
I don't think that's strange at all. Having JS as your example has the potential to lure in a huge pool of developers who have no idea that this is even an option for GUI development in JS. On the other hand, C developers are almost certainly already aware of GTK.

I don't really think that C being the native language has any significance in this case.

Re:GTK has a new website by catblast on Sunday March 01, 2020 @05:33PM (#22459864)
No this seems appropriate. And isn’t too far off from project ideals. The somewhat retconned* argument for using C for GTK+ was that it was the most easy to produce bindings for. This was in the FAQ years ago as a mild discouragement from actually using C to produce apps. The verbiage was something akin to C is a library language not an application language. But this goes back nearly 20 years.

* this disclaimer because yes I know that gtk was a originally a quick hack to avoid Motif.. that definitely changed by 2.0.

Re:GTK has a new website by butz on Monday March 02, 2020 @03:25AM (#22462655)
That example lead me exploring how to build GTK app with JavaScript. Not sure how it compares to Python or Vala performance wise, but now I can quickly build simple apps with GUI for my own use. Here are some resources, if anyone else is interested:

https://developer.gnome.org/gnome-devel-demos/stable/js.html...

https://gjs-tutorial.readthedocs.io/en/latest/

Re:GTK has a new website by pengaru on Sunday March 01, 2020 @05:36PM (#22459874)
C is the native language because it's the lowest common denominator, not necessarily because they want everyone writing their front-end applications in C.

It's simply something that works everywhere and can easily have performant and ergonomic bindings for $your-favorite-language.

Re:GTK has a new website by snazz on Sunday March 01, 2020 @05:29PM (#22459834)
They’re trying to cater to people who would otherwise select Electron or something, assuming that it is impossible to get a cross-platform GUI written in JavaScript without bringing all of Chromium along with it.
Re:GTK has a new website by Sirikon on Sunday March 01, 2020 @05:29PM (#22459831)
Probably they are aiming at developers that want to use JavaScript for UIs but don't want Electron.