From: ptkwt@...1.aracnet.com (Phil Tomson) Date: 2001-02-16T15:10:02+09:00 Subject: [ruby-talk:10955] Re: Borrowing some Perl infrastructure In article , Conrad Schneiker wrote: >Phil Tomson wrote: > ># I was looking at some Win32 perl modules on CPAN recently - ># specifically, I need some functionality that is provided by perl's ># Win32::GuiTest module. From what I can tell, most of the code ># involved is actually C code - they have C wrappers of some Win32 ># system calls, etc. and then they build on them - mostly all in C, ># only one of the funtions was actually written in Perl. But there's ># a catch, the code they provide is actually not the original C code , ># but the .xs files which are presumably read by XS (kind of like ># SWIG, but specifically for extending Perl). ># ># Now, I could be wrong, but the XS code (somecode.xs) looks mostly ># like C code with some added tags. Might it not be possible (and ># somebody who is more familiar with XS than I could shed some light ># here) to take the .xs files and munge them somehow to create Ruby ># extentions - or at least to make them readable from SWIG and then ># create Ruby modules from that direction. It seems like doing this ># could get us a good number of Perl modules (at least where the ># modules rely heavily on C code) fairly quickly. > >Well, I strongly object to calling that stealing, even in jest. As I'm >sure Larry Wall would be quick to point out, it's *open* *source* >software! It was in jest (should have used a ;-) I should probably say 'borrow' some perl modules. Note that I changed the subject heading for this thread. > >But anyway, what you suggest seems like a Great Idea (tm), IMHO (albeit an >uninformed one in this case). Yes, I'll be the first to admit to being uninformed ;-) I primarily wanted to throw out the idea for discussion. If we can come up with a way to do it, it could be a quick way to add to available Ruby modules - I'm particulary interested in some of Perl's Win32 modules (especially Wi32::TestGui) which are mostly C code. Phil