Results 1 to 7 of 7

Thread: Perl Bindings Come For Wayland

  1. #1
    Join Date
    Jan 2007
    Posts
    14,770

    Default Perl Bindings Come For Wayland

    Phoronix: Perl Bindings Come For Wayland

    While the Perl scripting language normally isn't relied upon by Linux graphics driver developers, Perl bindings to Wayland have been published...

    http://www.phoronix.com/vr.php?view=MTUxNzA

  2. #2
    Join Date
    May 2012
    Posts
    803

    Default

    Why would one want running a Wayland client written in Perl?

  3. #3
    Join Date
    May 2012
    Posts
    803

    Default

    Quote Originally Posted by mark45 View Post
    Why would one want running a Wayland client written in Perl?
    The administrator has specified that you can only edit messages for 1 minutes after you have posted. This limit has expired, so you must contact the administrator to make alterations on your message.
    Administrator! Administrator! Where are thou? I wanna edit something.

  4. #4
    Join Date
    Aug 2011
    Posts
    523

    Default

    Couple things with this article.

    While the Perl scripting language normally isn't relied upon by Linux graphics driver developers
    I have no idea what this is supposed to mean. You don't write graphics drivers using libwayland. It's an IPC mechanism.

    Wayland is language-binding friendly and has already has Node.js JavaScript support, Java Android bindings, and other languages and the official C bindings.
    Interestingly (if I read the description right), this perl binding completely skips the recently added support for custom dispatchers that was written to alleviate language bindings (by making it easier to hook into the autogenerated, C based libraries) and instead directly parses the xml protocol descriptions. While the protocol events, interfaces etc. are standardizes, the actual wire marshalling is not (with wayland-scanner being the unwritten de facto standard) and Hoegsberg has expressed no desire in changing that. This is why the work on better binding support via the C libraries was done in the first place.

  5. #5
    Join Date
    Jun 2011
    Posts
    3

    Default

    Quote Originally Posted by mark45 View Post
    Why would one want running a Wayland client written in Perl?
    Who know? I don't even know.

    Maybe to discover and fix this Wayland crash or this Wayland resource leak or maybe this Weston crash?

    Take care!
    Lubo

  6. #6
    Join Date
    Jun 2011
    Posts
    3

    Default

    Quote Originally Posted by Ancurio View Post
    Interestingly (if I read the description right), this perl binding completely skips the recently added support for custom dispatchers that was written to alleviate language bindings (by making it easier to hook into the autogenerated, C based libraries) and instead directly parses the xml protocol descriptions. While the protocol events, interfaces etc. are standardizes, the actual wire marshalling is not (with wayland-scanner being the unwritten de facto standard) and Hoegsberg has expressed no desire in changing that. This is why the work on better binding support via the C libraries was done in the first place.
    You're somehow right.

    Please bear in mind that this is a toy. I seriously doubt someone would write an actual application using that. I highly doubt someone would directly interface with Wayland protocol; he'd likely be better off using an interface to a higher level toolkit, such as Gtk+. I don't even know of any GUI toolkit write in Perl, so he pretty much wouldn't have any other chance even if C-based Perl bindings to Wayland existed, unless he decides to write his own one.

    That said some, you're somehow wrong too.

    There are good reasons people code in Perl and not C, and one of those reasons is security or robustness. I'm sure you're aware that it's impossible to do certain errors in Perl code that occur in C. I'm using Perl to get familiar with Wayland and reimplementing the protocol in Perl I've already found flaws in the C implementation. I guess that somehow excuses existence of this thing.

    Take care!
    Lubo

  7. #7
    Join Date
    Aug 2011
    Posts
    523

    Default

    Quote Originally Posted by lkundrak View Post
    You're somehow right.

    Please bear in mind that this is a toy. I seriously doubt someone would write an actual application using that. I highly doubt someone would directly interface with Wayland protocol; he'd likely be better off using an interface to a higher level toolkit, such as Gtk+. I don't even know of any GUI toolkit write in Perl, so he pretty much wouldn't have any other chance even if C-based Perl bindings to Wayland existed, unless he decides to write his own one.

    That said some, you're somehow wrong too.

    There are good reasons people code in Perl and not C, and one of those reasons is security or robustness. I'm sure you're aware that it's impossible to do certain errors in Perl code that occur in C. I'm using Perl to get familiar with Wayland and reimplementing the protocol in Perl I've already found flaws in the C implementation. I guess that somehow excuses existence of this thing.

    Take care!
    Lubo
    I wasn't trying to criticize the approach by the way, just point out interesting facts. Personally, I was taken a bit aback when I learned that the marshalling is in fact not clearly embodied in a specification. In my opinion, the approach of being able to generate a guaranteed functioning marshal implementation from pure specification seems vastly superior to me. I think at this point, it is simply something the Wayland devs don't care about because they expect 99% of development to either happen directly at the C level, or via a higher level toolkit that itself is written in C/C++.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •