Re: new extension for pecl
| From: | Andrey Hristov | Date: | Sun, 29 Dec 2002 17:47:17 +0000 |
| Subject: | Re: new extension for pecl | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-11923@lists.php.net to get a copy of this message | ||
Jesus,
happy holidays and to you!
On 27th I went to see what is this stuff SWIG (I mentioned this acronym
in a weblog of Derick about Thies' thoughts in Paris).
I read the manual page for wrapping libraries for PHP. It is not finished
but as most software it is probably evolving. I will give it a try. However
for
now I am manually wrapping the library. There a few places where the
code may be optimized(lowered by using common handler and just passing
an pointer to the desired function). But you are right...this is very very
big
library that will cost me (and I hope in the future others will join)
efforts to
maintain.
I try to implement all functions even those not applicable in the
PHP enviroment. Unfortunately I don't know much about the Wez's streams
API and thus functions that work with files are emtpy. Today I faced
something weird for
me. Instead of returning error codes the library just dies in case of error
(and telling
what was wrong). So the wrapper won't be very applicable in web enviroment.
But with
CLI this won't . Unfortunately this library is too mathematical for even
with my
background in physics for 5 years in the High School and Calculus in the
university.
There are decisions to be made whether to implement some part of the API by
using
resources or with more native primitives like hashes. So far the api for
complex number
calculations use to pass around objects of type CComplex. The sum/ passes
around
hashes and the histogram/ (will finish it in day or two) resources.
Any comments are highly appreciated. Even I may give a link to the sources
for
those who wish to help in testing or in the developing.
Best wishes,
Andrey
----- Original Message -----
From: "Jesus M. Castagnetto" <jcastagnetto@yahoo.com>
To: "Andrey Hristov" <andrey@webgate.bg>; "Stig S. Bakken"
<ssb@fast.no>
Cc: <pear-dev@lists.php.net>
Sent: Friday, December 27, 2002 11:30 PM
Subject: Re: [PEAR-DEV] new extension for pecl
> Andrey,
>
> To ease the workload on implementing the GSL API, I will recommend using
SWIG.
> It is simpler to maintain updated interface description files and less
error
> prone.
>
> There might be some part of GSL that could need some hand-tooling to make
it
> work w/ the PHP types/structures/etc., but for what I've seen (about 10
months
> ago and again about 4-5 months ago) it appears like a sane API, so an
automated
> tool like SWIG will be great.
>
> The SWIG distribution has examples for wrapping libs to PHP, in case you
need
> them.
>
> Happy Holidays
>