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

GTK+ 3.8.0 released

GTK+ 3.8.0 released

Posted Mar 26, 2013 14:30 UTC (Tue) by hp (subscriber, #5220)
Parent article: GTK+ 3.8.0 released

after 11 years (https://mail.gnome.org/archives/gnome-announce-list/2002-...) it might be time to remove the mention of Perl from the GTK+ release boilerplate ;-)


(Log in to post comments)

GTK+ 3.8.0 released

Posted Mar 26, 2013 14:48 UTC (Tue) by hummassa (subscriber, #307) [Link]

Why, did it stop working?

GTK+ 3.8.0 released

Posted Mar 26, 2013 14:52 UTC (Tue) by hp (subscriber, #5220) [Link]

I don't think it would be most people's current recommendation for how to write a gtk app

GTK+ 3.8.0 released

Posted Mar 26, 2013 15:09 UTC (Tue) by niner (subscriber, #26151) [Link]

Well, you may also just be wrong.

GTK+ 3.8.0 released

Posted Mar 26, 2013 18:34 UTC (Tue) by robert_s (subscriber, #42402) [Link]

You may find it similarly difficult to find a lot of people who think it's a good idea to write UI code in C, but that doesn't seem to stop the gtk developers.

GTK+ 3.8.0 released

Posted Mar 26, 2013 19:14 UTC (Tue) by rahulsundaram (subscriber, #21946) [Link]

Most GTK apps (not libraries themselves) use Javascript, Python or Vala these days.

GTK+ 3.8.0 released

Posted Mar 26, 2013 19:35 UTC (Tue) by khc (guest, #45209) [Link]

maybe you meant most new GTK apps? Many (if not most or close to all) GTK apps I use day to day are written in C.

GTK+ 3.8.0 released

Posted Mar 26, 2013 21:02 UTC (Tue) by rahulsundaram (subscriber, #21946) [Link]

"these days" does mean "new apps", so yes, thats what I meant.

GTK+ 3.8.0 released

Posted Mar 26, 2013 21:28 UTC (Tue) by drag (subscriber, #31333) [Link]

Hey now. Let's be nice to everybody.

GTK+ 3.8.0 released

Posted Mar 27, 2013 9:25 UTC (Wed) by Company (guest, #57006) [Link]

What does one use today according to that lot of people? Because I have a hard time matching your statement with reality...

GTK+ 3.8.0 released

Posted Mar 27, 2013 10:57 UTC (Wed) by HelloWorld (guest, #56129) [Link]

> What does one use today according to that lot of people?
Pretty much anything is better than C for UI code. Vala is fairly suitable as it provides language support for GObject and does automatic refcounting. C is actually among the worst legacy programming languages besides Cobol and Bourne Shell.

GTK+ 3.8.0 released

Posted Mar 27, 2013 11:57 UTC (Wed) by robert_s (subscriber, #42402) [Link]

Geez, anything almost.

C++ can be very pleasant in this field. I hesitate to mention Qt here.

Hell, even javascript (and I am no javascript lover) is better for UI code. And a scary amount of UI code is being written in javascript these days.

GTK+ 3.8.0 released

Posted Mar 27, 2013 12:31 UTC (Wed) by Company (guest, #57006) [Link]

Apps yes, but nobody writes serious applications or toolkits in Javascript or similarly high-level languages. Qt, WebKit, Mozilla and Cocoa just like GTK use some sort of C with classes. And large applications such as Photoshop, Libreoffice or MS Office are the same thing.

The highest level languages you get for large applications and toolkits is Java with Android or Eclipse. But even those frameworks often have a lot of code still written in C-like languages (like SWT). Even large web applications use things like GWT to get away from Javascript onto the Java level.

So I'm not sure your argument holds much ground.

GTK+ 3.8.0 released

Posted Mar 27, 2013 13:16 UTC (Wed) by Cyberax (✭ supporter ✭, #52523) [Link]

Are Google Apps somehow 'unserious'?

GTK+ 3.8.0 released

Posted Mar 27, 2013 16:29 UTC (Wed) by boudewijn (subscriber, #14185) [Link]

Erm... I would hesitate to say that C++ is just some sort of C with classes, just like GTK uses. It's quite a bit more, and makes life quite a bit easier and high-level for the developer. Also, big, professional apps like Mari are written in Python (and use Qt, but that as an aside).

GTK+ 3.8.0 released

Posted Mar 27, 2013 18:05 UTC (Wed) by HelloWorld (guest, #56129) [Link]

> Erm... I would hesitate to say that C++ is just some sort of C with classes, just like GTK uses. It's quite a bit more, and makes life quite a bit easier and high-level for the developer.
It isn't quite as simple. GObject offers quite a few things that the C++ object model doesn't: signals, introspection and an all-encompassing type hierarchy (GType/GValue) that, unlike the C++ object model, includes primitive types.

Of course it's a horrible pain to use all that from C, but that's why Vala exists.

GTK+ 3.8.0 released

Posted Mar 27, 2013 19:41 UTC (Wed) by boudewijn (subscriber, #14185) [Link]

"Some sort of C with classes" is a quote from the original poster. I know that gobject offers stuff that has been available to Java developers from the start and to C++ developers since Qt appeared -- but that doesn't make the original claim that C++ or Objective C is "just some sort of C with classes, comparable to GTK" sensible.

GTK+ 3.8.0 released

Posted Mar 28, 2013 2:27 UTC (Thu) by tetley80 (guest, #88691) [Link]

    It isn't quite as simple. GObject offers quite a few things that the C++ object model doesn't: signals, introspection and an all-encompassing type hierarchy (GType/GValue) that, unlike the C++ object model, includes primitive types. Of course it's a horrible pain to use all that from C, but that's why Vala exists.

On a related note, there seems to be a decent C++ wrapper for GTK+, called gtkmm (which also has signals).

Does anybody have experience with it? How does it compare to using Vala, or Qt ?

GTK+ 3.8.0 released

Posted Mar 28, 2013 4:43 UTC (Thu) by talisein (subscriber, #31829) [Link]

I've made a few toy apps with it. It works very well in my experience. Where Glib or Gtk give something like a GList, Gtkmm transforms it into a standard library object such as a std::vector, and also accepts standard objects where expected. So its much more of a standard C++ experience than you would get with Qt. If some C library, like say libchamplain, isn't wrapped, you can just access it with C functions; you always have access to the underlying C GObject. You can also directly subclass Glib::Object and give it properties and such.

I can't really say how it compares to Vala, other than I suspect it is more straightforward to use a non-GObject C or C++ library in Gtkmm than it is with Vala.

GTK+ 3.8.0 released

Posted Mar 26, 2013 22:21 UTC (Tue) by atai (subscriber, #10977) [Link]

gtk+ is a toolkit and it is not gtk+'s business to recommend (or not to recommend) a language

GTK+ 3.8.0 released

Posted Mar 26, 2013 14:52 UTC (Tue) by guillomovitch (subscriber, #58314) [Link]

Why ? According to http://gtk2-perl.sourceforge.net, the perl bindings seem to be still maintained.

GTK+ 3.8.0 released

Posted Mar 26, 2013 17:55 UTC (Tue) by patrick_g (subscriber, #44470) [Link]

And there is at least one superb application using it.
I really like gmusicbrowser because you can define the look and feel (with just one click) to mimic other applications (Rhythmbox, Exaile, etc).

GTK+ 3.8.0 released

Posted Mar 27, 2013 17:24 UTC (Wed) by Su-Shee (guest, #11056) [Link]

The Gtk3.x bindings with Perl are a nice example of what you get with GObject bindings.

Also, if one compares Gtk2 code in Perl, Ruby and Python, the differences are seriously minor - after all you deal with widgets and callbacks. No reason why Perl couldn't deal with it nicely.

Example in C, ported to Python:

http://mikehearn.wordpress.com/2006/03/26/gtk-windows-wit...

which was the inspiration for a port 1:1 in Ruby:

http://pastie.org/343287

which I ported to Perl:

https://github.com/Su-Shee/perlsnippets/blob/master/alpha...

If you don't like Perl, don't use it.

GTK+ 3.8.0 released

Posted Mar 27, 2013 18:11 UTC (Wed) by HelloWorld (guest, #56129) [Link]

Perl, unlike Ruby or Python, isn't able to collect reference cycles. That's a deal-breaker for me and many others.

GTK+ 3.8.0 released

Posted Mar 28, 2013 16:06 UTC (Thu) by whilteheat (guest, #90114) [Link]

In practise I have found Perl to leak memory far less than Python and especially Ruby VMs. So not a deal breaker :)

GTK+ 3.8.0 released

Posted Mar 29, 2013 15:47 UTC (Fri) by ebassi (subscriber, #54855) [Link]

that's not entirely correct: you can override DESTROY to release cycles. or you can use the 'weaken' function from Scalar::Util.

GTK+ 3.8.0 released

Posted Apr 2, 2013 11:03 UTC (Tue) by whilteheat (guest, #90114) [Link]

It is true in my experience....

- This time last year I had to constantly restart (sometimes daily!) a Ruby background process because it kept memory leaking :(

- While I have multiple Perl background processes I've written that continue to run without a restart for over 5 years :)

So yes you have to be careful and not leave something silly around with Perl (re: DESTROY / weaken) but I've had far more success with Perl compared to Ruby (libs/VM) on this!


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