lua-users home
lua-l archive

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


On Sun, 23 Jun 2019 at 03:08, Hugo Musso Gualandi
<hgualandi@inf.puc-rio.br> wrote:
>
> > It seems like creating a Cython clone for Lua might be a good idea.
> > Maybe someone is already doing this?
>
> Pallene/Titan[1] are being developed in a related space. They let you
> write extension modules in a language that is close to to Lua, but much
> faster. You can also define custom low-level struct-like data-types
> (built on top of userdata). The compiler produces the required Lua
> bindings and makes sure that garbage collection does the right thing.
>
> The main differences between Pallene/Titan and Cython are that Cython is
> a superset of Python, while Pallene/Titan is closer to a typed subset of
> Lua. Additionally, the Pallene compiler can optimize some code that uses
> Lua tables, as long as it has the appropriate type annotations. With
> Cython only the parts of the program that use the "C types" are
> optimized.
>
> > So it seems that writing a C/C++ binding for Python is actually less
> effort than writing one for Lua.
>
> This is definitely one of our goals with the project as well :)
>
>
> [1] https://github.com/pallene-lang/pallene
>

Cool.
Pallene does look a similar initiative, but creates a different
statically typed language from Lua, right?
I liked that Cython is a superset of Python. Another cool feature is
that it can wrap C++ code as well.

Of course I have been using it mainly to provide Python bindings to
existing C++ code rather than writing Python/Cython modules from
scratch.

Regards
Dibyendu