Announcement

Collapse
No announcement yet.

GTK 4.0 Toolkit Officially Released

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Originally posted by klapaucius View Post

    I presume that your real question is "why is still written in C?" but just in case:
    https://gtk.org/docs/language-bindings/
    They could theoretically use Rust since you can create C libraries (including headers) in Rust, i.e. see https://www.ultrasaurus.com/2020/01/...brary-in-rust/ . Firefox is also evidence of a project that has successfully integrated Rust into a predominantly C/C++ project

    Comment


    • #12
      Originally posted by Baguy View Post
      Will GTK4's GPU acceleration support OpenGL 2.0 that the Pinephone's GPU supports?

      QT already supports full GPU acceleration on the Mali 400 with GL 2.0... But if GTK4 can too, then phosh will finally be competitive in performance.
      Apparently, no: The context creation still requires OpenGL ES 3.0

      Comment


      • #13
        Originally posted by zxy_thf View Post
        There is an interesting post about Gnome (not only Gtk): https://hpjansson.org/blag/2020/12/1...ying-of-gnome/
        I'm guessing having* to use C is the main factor of "Although recruitment is stable, newcomers don’t seem to be hitting their stride in terms of commits."

        * Yes I know there is no formal requirement that you must write something in C, but I also don't think newcomers will feel easy in a C dormant community when their main PL is something else - especially when they're trying to contribute to an existing project.
        i think the bigger issue is release cycles. As a newcomer you will be willing to fix bugs in the stable release if they annoy you. but will you be willing on something bigger that may take multiple years before it is ready for consumption.

        In web development, Drupal faced a similar issue until recently, where the major releases were getting farther and farther apart. Now they have minor feature releases every 6 months and major releases (which simply remove deprecated API and nothing more) schedules every couple of years, I cannot recall reading similar complaints for a long time.

        C might be a harder language, but i suspect that having faster releases will help with contirbutors.

        With Rust, having new components written in it will be interesting, but it will have the side efffect of no longer being compilable in GCC, which is the major toolchain used on linux. They would also need to drop most of the Rust packaging nice to haves as they play havoc with this type of stuff.

        Comment


        • #14
          Originally posted by mdedetrich View Post

          They could theoretically use Rust since you can create C libraries (including headers) in Rust, i.e. see https://www.ultrasaurus.com/2020/01/...brary-in-rust/ . Firefox is also evidence of a project that has successfully integrated Rust into a predominantly C/C++ project
          Rust is quite popular in the Gnome community from what I understand, for this very reason. An example is librsvg that was migrated to rust, by gradually replace the code. Now I think it is almost only rust code in librsvg. This also means that the Rust bindings probably will be very solid. So for anyone writing Gnome programs, I recommend looking at Rust instead of C.

          Comment


          • #15
            Originally posted by You- View Post

            i think the bigger issue is release cycles. As a newcomer you will be willing to fix bugs in the stable release if they annoy you. but will you be willing on something bigger that may take multiple years before it is ready for consumption.

            In web development, Drupal faced a similar issue until recently, where the major releases were getting farther and farther apart. Now they have minor feature releases every 6 months and major releases (which simply remove deprecated API and nothing more) schedules every couple of years, I cannot recall reading similar complaints for a long time.
            Hmm this explains part of the phenomena. However that blog post is about the whole Gnome project, and I'm not sure if all projects follow the similar release cycles.
            (I'm guessing it's the case? Everytime I upgraded Fedora, apps all changed a little bit.)

            Originally posted by You- View Post
            C might be a harder language, but i suspect that having faster releases will help with contirbutors.
            Whenever I use C, I found string is the most annoying part.
            Although I think printf is easier to use than std::cout, strcat two strings is really tedious.

            Originally posted by You- View Post
            With Rust, having new components written in it will be interesting, but it will have the side efffect of no longer being compilable in GCC, which is the major toolchain used on linux. They would also need to drop most of the Rust packaging nice to haves as they play havoc with this type of stuff.
            I'm not a huge fan of Rust. Moving from C to C++ will be smoother IMO, and this process already has success stories (gcc).
            In addition, smarter pointers and RAII can address quite a few memory management issues.

            Comment


            • #16
              The real question is... Will adopt XFCE4 the GTK4 before the GTK6 will be released?

              Comment


              • #17
                Originally posted by zxy_thf View Post
                Moving from C to C++ will be smoother IMO.
                This is very unlikely to happen. some of the most prolific contributors are very much against using C++. Another one wants to use some of its features, but I doubt they will go for it ever.

                Comment


                • #18
                  Originally posted by zxy_thf View Post
                  I'm not a huge fan of Rust. Moving from C to C++ will be smoother IMO, and this process already has success stories (gcc).
                  In addition, smarter pointers and RAII can address quite a few memory management issues.
                  C++ is a terrible choice for a general purpose GUI library because the C++ ABI breaks all of the time. Even though C has its fair share of problems, one of its redeeming features is having an ultra stable ABI (talking decade, or even more here).

                  You could just expose C bindings in your C++ library, but in this case you have to limit yourself to a big subset of C++ anyways making the effort kinda pointless.

                  Comment


                  • #19
                    C++ is garbage and for lazy programmers C is much more stable and people who program with C are much better programmers

                    Comment


                    • #20
                      Originally posted by zxy_thf View Post
                      There is an interesting post about Gnome (not only Gtk): https://hpjansson.org/blag/2020/12/1...ying-of-gnome/
                      I'm guessing having* to use C is the main factor of "Although recruitment is stable, newcomers don’t seem to be hitting their stride in terms of commits."

                      * Yes I know there is no formal requirement that you must write something in C, but I also don't think newcomers will feel easy in a C dormant community when their main PL is something else - especially when they're trying to contribute to an existing project.
                      I'm not sure this is a programming language problem. It looks like there's no community around the gtk/gnome project, it's just red hat employees with a few contributions by canonical, debian and collabora. I guess it's fine as long as red hat is alive, but this doesn't look that great beyond that. Very disappointing, by looking at these figures I don't even see the point of making gtk4 in the first place.
                      Anarchy
                      Senior Member
                      Last edited by Anarchy; 16 December 2020, 06:21 PM.

                      Comment

                      Working...
                      X