From: Elias Athanasopoulos Date: 2004-01-12T05:09:47+09:00 Subject: Re: convert a C/C++ array to a Ruby array On Fri, Jan 09, 2004 at 06:46:40AM +0900, Phil Tomson wrote: > > The generated code is quite readable and can be altered by a human, but > > I want to eliminate as much as I can the human intervation, so as the majority of the > > C++ prototypes to be compiled in the Ruby API without human editing. > > > > I checked SWIG and it returns a special SWIG object in that case... > > > I'm just curious, why didn't you use SWIG for this? Sounds sort of > like you're recreating SWIG. Because SWIG doesn't produce readable by human C++ code. Also, there are things in the extension that I prefer to port to Ruby in a different way from the one SWIG uses. I know that using SWIG's internal scripting language can do almost everything I do, but I already know C++ and it is easiest to do it in my way. I don't recreate SWIG. My auto-generated code is specific for my extension and the compiler I create is less than 500 lines of Ruby code (I don't parse the prototypes, because the original C++ code has RTTI related functions i.e. 'bring me the arguments foo() takes as input'). Regards, -- University of Athens I bet the human brain Physics Department is a kludge --Marvin Minsky