Announcement

Collapse
No announcement yet.

April Fools' Or Should Wayland Switch Away From Using C?

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

  • #21
    PASCAL for the win !!

    Comment


    • #22
      Interesting thread! It is puzzling that C was used for Wayland in the first place. Now this is coming from an old person but it strikes me as decision making by an old person that can't adapt to new tech. It is very much a 1980's dolution to systrm development.

      Now adays C & COBOL programmers have a lot in common.

      Comment


      • #23
        Does anybody here believe that the quality of software depends on the features of a programming language rather than on the abilities of the developers?

        Comment


        • #24
          Originally posted by wizard69 View Post
          Interesting thread! It is puzzling that C was used for Wayland in the first place. Now this is coming from an old person but it strikes me as decision making by an old person that can't adapt to new tech. It is very much a 1980's dolution to systrm development.

          Now adays C & COBOL programmers have a lot in common.
          Can you elaborate a bit further on that, as you seem to have great knowledge of system development, much more for instance that that bearded Finn that developed a kernel in C in as late as 1991. It's always great to learn from such experienced experts that fully embrace new technology everywhere and always, at all costs.

          Comment


          • #25
            Originally posted by uid313 View Post
            Haskell is a good way to alienate developers. It is rarely used outside academia. Most programmers are not familiar with it.
            Oh it's true that it's used extensively in academia. One reason being that academia created Haskell as lazy language to focus research on (instead of spliting efforts on various popular-back-then lazy languages). But the other reason why Haskell is popular in akademia is that most commonly used programming languages not good for research, and by extension bad for deadly serious development (like developing apps human life's depend on).

            Alas Haskell and Your claim of lack of commercial usage...

            https://www.tiobe.com/tiobe-index/
            TIOBE rank it at the same bucket as Scheme or Groovy, quite popular languages in commercial development.

            http://pypl.github.io/PYPL.html
            PYPLY would give it 20th place, in line with Rust or Go, both also quite popular in commercial development.

            http://sogrady-media.redmonk.com/sog...16.plot-WM.png
            Red Monk would put Haskell in most popular quadran on github.

            Ergo, Haskell is in use in software that's not necessary facing wide audience.
            (heck even Facebook spam filter... is unknow to anyone apart from facebook devs, but hey it's haskell!


            Comment


            • #26
              This is great. It brings out all the people who don't have a clue of what they're talking about.

              Wayland is a protocol. It's written in XML.

              The Wayland XML can be used to generate bindings in any number of languages, including libwayland-client, which is generated C code. Generating bindings for Haskell or Rust is just as easy.

              The Wayland XML is also used to generate some server code for a display server written to use the Wayland protocol, like libwayland-server. There are a number of Wayland display servers written using C, such as Weston (a non-production reference display server) and Mutter (the display server invented here by the Gnome people). There's C++ bindings invented here for Kwin by the KDE people. Nothing's to stop anyone from inventing here their own display server written in Haskell or Rust, and the beauty of a protocol like Wayland is you can intermix them all: a Rust client binding will talk to a C/glib Mutter just as readily as a KDE client will talk to a fanciful display server written in Rust. Go forth and do it people.

              So, really, the question raised in the feature article is non-nonsensical. Wayland already doesn't use C, so it can't switch away.

              Comment


              • #27
                Originally posted by cipri View Post
                The c example of wayland clients/servers could look in c++ easier to follow with less code, better structured....
                There is a good reason why you barely find applications based on wayland directly! Gnome and KDE are working since years on wayland support and it's still not ready.
                The "reason why you barely find applications based on wayland directly" is the same as the "reason why you barely find applications based on X11 directly".

                Originally posted by cipri View Post
                If lib-wayland would be done with c++14 and being well designed, writing wayland clients would be a triviality! It would be easier than using QT [since QT has old style c++ api].
                "If lib-wayland would be done with c++14" people would still be using SDL/GTK+/Qt for writing Wayland clients.

                Originally posted by cipri View Post
                cipri
                elephant_in_the_room

                Comment


                • #28
                  Originally posted by bregma View Post
                  Wayland already doesn't use C, so it can't switch away.
                  The talk is not about the wayland protocol! The problem is that if you want to write a wayland client [without writing your own server] you have to use lib-wayland which is written in c. The problem is, you have to choose between: using a c-library with all the pitfalls , or use kde/gnome.... which might not be your choice because of their license and their dependencies (i.e. QT])! This is the reason why I cannot use kde/gnome. So the only choices I have left is writing my own framework... based on the c-library lib-wayland which is forcing me to introduce ugly "time-bombs" (i.e. reinterpret_cast) in the code.
                  The other option would be to write everything myself starting from just the protocol. All this just because I want a f.... window on the screen without having to rely on the bad framework of others [bad license or even code - ancient api which forces bad (internal) design]!!

                  cipri
                  Last edited by cipri; 04-02-2017, 12:14 PM.

                  Comment


                  • #29
                    Originally posted by cipri View Post

                    The talk is not about the wayland protocol! The problem is that if you want to write a wayland client [without writing your own server] you have to use lib-wayland which is written in c. The problem is, you have to choose between: using a c-library with all the pitfalls , or use kde/gnome.... which might not be your choice because of their license and their dependencies (i.e. QT])! This is the reason why I cannot use kde/gnome. So the only choices I have left is writing my own framework... based on the c-library lib-wayland which is forcing me to introduce ugly "time-bombs" (i.e. reinterpret_cast) in the code.
                    The other option would be to write everything myself starting from just the protocol. All this just because I want a f.... window on the screen without having to rely on the bad framework of others [bad license or even code - ancient api which forces bad (internal) design]!!

                    cipri
                    I wonder what kind wayland client you want to write? If you want to just write a GUI program, I suggest you go for gtk+, whose license should be tolerable to you. There are even c++ bindings to it. A lot of application programmers go this way, you might give it a try. You don't have to go fully gnome for this, look at transmission-gtk, firefox and some xfce4 application for examples. And by choosing a higher level toolkit, you even get legacy x11 support on top, which will increase your user base.
                    Last edited by timtas; 04-02-2017, 01:02 PM.

                    Comment


                    • #30
                      Originally posted by cipri View Post

                      The talk is not about the wayland protocol! The problem is that if you want to write a wayland client [without writing your own server] you have to use lib-wayland which is written in c. The problem is, you have to choose between: using a c-library with all the pitfalls , or use kde/gnome.... which might not be your choice because of their license and their dependencies (i.e. QT])! This is the reason why I cannot use kde/gnome. So the only choices I have left is writing my own framework... based on the c-library lib-wayland which is forcing me to introduce ugly "time-bombs" (i.e. reinterpret_cast) in the code.
                      The other option would be to write everything myself starting from just the protocol. All this just because I want a f.... window on the screen without having to rely on the bad framework of others [bad license or even code - ancient api which forces bad (internal) design]!!
                      If you want to write a Wayland client, you do not have to use the C bindings. If you choose to write a Wayland client using libwayland-client, you do have to use the C bindings, because libwayland-client is the C-language bindings library generated from the Wayland protocol spec.

                      Wayland is language-neutral. Language agnostic. It is not written in C. You do not have to use C. The C bindings have been provided for you for free. Some others are working on other language bindings (the subject of the article) for you for free. That's great. You get a lot of choice for free. If you're not getting exactly what you want, maybe you should demand all your money back. If you choose to avoid using the work of others for whatever reasons, you need to accept that you will need to replace their work with your own effort, and there will be a cost and any complain about your choice is only a complaint about your choice.

                      Wayland is a wire protocol. A mutually-agreed-upon way of encoding information packages sent between independent processes. You do not have to write your own server to write a client. You do not have to write your own server to generate language bindings for a client. Client and server are independent, decoupled through the use of a wire protocol defined using an implementation-neutral language called XML. That's the whole point of having a wire protocol defined separately from an implementation.

                      Comment

                      Working...
                      X