lua-users home
lua-l archive

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

2017-05-11 18:23 GMT+02:00 Luiz Henrique de Figueiredo <>:

> To resume the thread on curated libraries for Lua, I'd like to start with
> math libraries. This is a niche that is dear to me and which is probably
> easier to handle than a comprehensive list of libraries for all purposes.
> The goal is to produce a curated list of math libraries for Lua that
> can serve as a reference to the community. I'm not sure how much demand
> there is for math libraries for Lua, but a one-stop place would be nice.
> Ideally, the list will contain reasons for selecting a given library,
> with comments about why other libraries for the same task are not as good.
> *  One, biased, starting point are my own libraries:
>    Are they any good?

They are very good. I use:

   complex mathx xml ltokenp

and I have srlua downloaded in case I need it (not yet, so far).

Not all mathematical, of course, but they are good models to follow
when building one's own. The documentation is sparse but adequate
for people that have enough skills to adapt the Makefiles to their own

>    Which ones are worth keeping?

1. All the ones I mentioned.
2. Exactly one of the infinite-precision integer libraries, but I
don't know which.
3. Code inspector.

>    Which ones are missing?

A patched Lua that

(a) preloads 'complex'
(b) preloads 'mathx' and monkeypatches it into math.
(c) lexes and parses complex literals
(d) has a modified math.type that returns 'complex' if appropriate

>    Besides the ones in my page I have unpublished bindings for
>    cephes, filib, a tiny fraction of freetype enough to get the
>    geometric data for glyphs,  Shewchuk's Triangle, hpalib,
>    gcc libquadmath.

The freetype looks interesting. libquadmath sounds pretty essential
too, especially if the patched Lua referred to above can support it
in the same way.

> *  The other natural starting point is luarocks:

>    Which ones are any good?

They mainly seem to be wrappings of yours :-

lgsl looked interesting, but it would not install on 5.3. If it needs
LuaJIT, why would one use it when gsl-shell offers so much more?