[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: A tutorial on turning a C structure into a Lua table
- From: Farzad Sadeghi <thabogre@...>
- Date: Wed, 3 Apr 2019 00:31:24 +0430
Thank you for taking the time and looking through the tutorial.
I did run the code. It works. I guess the confusion reinforces your
point on the tutorial being too complex for what it talks about. This
is pretty much my first time writing a tutorial
The script is in Python 3.0. The script is in Python because I'm a
little bit better in Python than in Lua. Though to be honest, I
realized the ridiculousness of plugging a Python script on the Lua
mailing list in a Lua tutorial after you asked why it is in Python and
not Lua. Sorry about that.
I'm working on a tool that embeds Lua as its scripting language(the
tool is a cli). Right now another code-generator pushes out code that
reads a binary file format(like WASM, ELF,...) and the script I
mentioned will wrap the resulting C structs for Lua.
Regarding the API changes being minimal from 5.1 to 5.3, you know
that, true, but someone new to Lua doesn't. To top it off, you get the
"different Lua versions are really different" line on lua.org, so not
knowing much, I had to assume things were very different. I had to
spend a lot of time to realize all of the things in the tutorial. The
point of the tutorial is to save beginners like myself the time(also
the self-plug tbh) that I had to spend going through old tutorials,
Stackoverflow and the Lua mailist to learn all of that. Besides, for
my particular use-case(structures having pointers to other structures)
I couldn't find any tutorials.