Hello Bob,
On Sun, 2005-06-05 at 08:22, Bob Doan wrote:
> Patch looks correct. Right now I only maintain the PHP bindings by
> hand.
>
> Right now there are a few things the Python(And other SWIG Interfaces)
> interface doesn't have, would you be willing to do any of these? I have
> manually done these in PHP
These all look doable, I will have to do a little research on how to
implement the callbacks though, I don't think it will be too hard.
> 1) Array Data Source: Use a 2D array as a data source
>
> 2) Signals/Callbacks: Right now in PHP we can attach to events in the
> RLIB engine and it will call back to a PHP function to do whatever...
>
> 3) "m.xxx" environment variables. In PHP it looks at the global symbol
> table for xxx and gets the value it needs
Should be easy.
>
> 4) Custom functions. Add custom functions to the engine that RLIB does
> not provide. So in PHP:
>
> rlib_add_function($rlib, "test", "test_function", 2);
>
> function mike_roth($a, $b) {
> return "pancakes are yummier then $a and $b";
> }
>
> Then in the RLIB XML:
>
> you would do: ..... value="test('bacon', 'eggs')"
>
If/when I get callbacks working this could naturally fall out of that.
>
> Obviously if you did these things I would start making the bindings by
> hand in the future (Normally it's a copy and paste job)
My experience with SWIG is that it can be a quick way to get a prototype
set of bindings however in the long run, for stability, it is best to
switch to an interface developed specifically for the library. The
pro-dominant reasons being object reference counting and memory
management. Boost did a better job however is C++ and then of course
there is the strange C+python meld of Pyrex.
> Also, just out of curiosity what are you trying to use RLIB for?
We are a small startup company doing electronic transaction processing
and because of my work load we just hired a programmer to develop
reporting however accounting was having a nightmare trying to reconcile
our bank transactions to daily processing. I was looking for a quick
way to get a report done, found rlib, and tried it. It worked great ;-)
I usually hack code on the weekends to keep me relaxed so I thought
I could offer to build a custom python interface for you.
Thanks,
William.
|