lua-users home
lua-l archive

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


The reference manual, really. I can see the use of a guide, however... in fact, there was mention of a Lua Documentation project on the mailing list earlier. I wonder if that would be the best place to -- for each API function -- put out a short, small, complete example demonstrating a use for it, much like the way cppreference has short examples that show off the type or function being explained.

That's beyond the scope of my expertise, however, and smarter people will have to tackle that beast. I already get into quite the tussle writing documentation for sol2, and even the amount of examples and code I've put in my docs is still not enough to help "noobs" get going quickly when they want to do something less trivial (as evidenced by the staggering, jaw-dropping amount of `Helpdesk`-labeled issues in the repository and the questions that come through the Gitter).

On Fri, Dec 22, 2017 at 3:06 PM, Gregg Reynolds <dev@mobileink.com> wrote:


On Dec 22, 2017 1:39 PM, "ThePhD" <jm3689@columbia.edu> wrote:
I like the fifth approach. I'm a bit biased because I'm the one who wrote sol2, but higher-level abstractions are almost always infinitely more useful.

But, the main objective of this thread (I believe) is moreso something that teaches you about the ins and outs of using the Lua C API, and any quirks that come with it. In my opinion, the manual is your best friend here

Which manual? The ref man or PIL? Both are great but neither does much hand holding. OTH the Lua implementation itself has great examples. That's prolly your best best friend.
...
 Any higher-level tutorial likely won't serve you as well as just knowing the manual.

In the Humanities this is known as the Hermeneutical Circle. You cannot understand the whole until you understand the parts. But you cannot understand the parts until you understand the whole. That's what guides are for. A ref manual is great for experts, not so much for noobs.

The only thing I found missing in the manual is some of the behavior of the default Lua's Coroutines. 

Yeah.  Having just started reading PIL 4 the use of coroutines with c is very interesting but not so easy to grok.

Thanks,
G