lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, Nov 3, 2011 at 17:18, Francesco Abbate <francesco.bbt@gmail.com> wrote:
> 2011/11/3 Leo Razoumov <slonik.az@gmail.com>:
>> Actually, according to
>> http://git.savannah.gnu.org/cgit/gsl-shell.git/tree/templates/qag.lua.in?h=gsl-shell-2
>> Francesco reimplemented quadrature in pure Lua (GSL's C version is
>> used as a guideline). FFI is used to pass an integrand function
>> implemented in C to the quadrature routine implemented in pure Lua.
>> Sort of of the exact opposite to traditional use of scripting
>> languages.
>
> uh ? not quite so, actually. I've implemented the quadrature routine
> in Lua using FFI and the resulting quadrature routine can integrate
> any Lua function.
>
> --

Auch, I should had chosen my words more carefully. Integrand can be
any Lua function including a C-function wrapped via FFI interface.

--Leo--