Re: [wmii] wmii-3 configuration - in Ruby

From: Anselm R. Garbe <garbeam_AT_wmii.de>
Date: Thu, 8 Jun 2006 09:17:57 +0200

On Wed, Jun 07, 2006 at 09:56:49PM -0400, Kris Maglione wrote:
> On Wed, Jun 07, 2006 at 06:37:16PM -0700, Suraj N. Kurapati wrote:
> >-----BEGIN PGP SIGNED MESSAGE-----
> >Hash: SHA1
> >
> >Kris Maglione wrote:
> >>On Sun, Jun 04, 2006 at 11:33:38AM -0700, Suraj N. Kurapati wrote:
> >>>Were you doing the port by hand? If so, SWIG[1] can totally
> >>>eliminate that task.
> >>Yes, I know of SWIG and decided against using it. In my experience, SWIG
> >>creates ugly, kludgy interfaces. I would very much prefer to have a
> >>clean ruby interface to the -l9p backend. The interface is very small,
> >>so it won't take much effort.
> >
> >Well, I'm going to try my luck with libixp & SWIG once my summer
> >vacation begins. I'll post again, once libixp emits that shiny red
> >sparkle we've all come to love. ;-)
> >
> >Also, I updated my Ruby wmii configuration according to everyone's
> >feedback and snippets and put them online[1].
>
> If I were you, I wouldn't waste my time. I can almost garuntee you that
> libixp+SWIG->ruby will give you a crufty interface. You'd be able to write
> an interface to ixp_client for ruby in less than a half hour's time with
> little effort. It's honestly not worth it, imo, though. It would be
> incredibly easy to just port the ixp_client code to ruby and have a
> portable library. There's really not that much code there, and it would be
> even less in ruby (if done right).

I can agree on that. The 9P (un)marshalling can be done much
easier with a high level language like ruby, because it contains
more useful data types. Defining some interface to this
marshalling code in conjunction with existent networking APIs in
ruby could also be done in few lines. You could even use threads
instead of a select() driven loop to implement a server API in
ruby (however select()-based loops are much much faster than
threads or libthread, the responsiveness of wmiiwm's 9P service
is incredible fast compared to lib9p/libthread based acme 9P
service)...

Regards,

-- 
 Anselm R. Garbe  ><><  www.ebrag.de  ><><  GPG key: 0D73F361
Received on Thu Jun 08 2006 - 09:17:57 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:08:40 UTC