Quantcast

Lua Cookbook

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Lua Cookbook

Luiz Henrique de Figueiredo
One thing that may be quite useful for the whole Lua community is a
cookbook with idiomatic Lua recipes for common tasks.

This has been discussed here before. See for instance this thread and
other threads around the same time:
        http://lua-users.org/lists/lua-l/2011-01/msg00325.html

That message points to
        https://github.com/lua-cookbook/
which seems to be abandoned...

Perhaps this project was too ambitious and it'd better to settle for
pure Lua solutionsto real-life problems. These solutions may need to use
external libraries and it'd be a good opportunity for collecting a list
of useful libraries.

hz
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Lua Cookbook

hz
hi, Luiz,

It’s hard to define a set of real-life problems with proper size. I’d prefer a book focused on advanced language features/paradigms with some semi-real-life examples. 

“Practical Common Lisp” is a good example. While “Beautiful Racket” (http://beautifulracket.com) does not balance well (though the example is well sized, but the tools/libs it relies on are kind of too complex to fit in my head). 

/hz

在 2017年5月6日,上午6:34,Luiz Henrique de Figueiredo <[hidden email]> 写道:

One thing that may be quite useful for the whole Lua community is a
cookbook with idiomatic Lua recipes for common tasks.

This has been discussed here before. See for instance this thread and
other threads around the same time:
http://lua-users.org/lists/lua-l/2011-01/msg00325.html

That message points to
https://github.com/lua-cookbook/
which seems to be abandoned...

Perhaps this project was too ambitious and it'd better to settle for
pure Lua solutionsto real-life problems. These solutions may need to use
external libraries and it'd be a good opportunity for collecting a list
of useful libraries.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Lua Cookbook

Martin
On 05/06/2017 09:39 AM, hz wrote:

> It’s hard to define a set of real-life problems with proper size. I’d
> prefer a book focused on advanced language features/paradigms with some
> semi-real-life examples.
>> 在 2017年5月6日,上午6:34,Luiz Henrique de Figueiredo
>> <[hidden email] <mailto:[hidden email]>> 写道:
>>
>> One thing that may be quite useful for the whole Lua community is a
>> cookbook with idiomatic Lua recipes for common tasks.
>>
>> Perhaps this project was too ambitious and it'd better to settle for
>> pure Lua solutions to real-life problems. These solutions may need to use
>> external libraries and it'd be a good opportunity for collecting a list
>> of useful libraries.
>>

I feel need for both approaches.

So one part of book may illustrate using Lua itself to handle flow:
  * vararg "..." for chaining,
  * tables for wrapping results of C functions and graph representation,
  * metatables for memoizing and creating languages (like LPEG),
  * dynamically loaded fuctions for business logic)

This topics are already described in PiL but I think alternative
descriptions are always good.

And the other part may demonstrate useful libraries for some custom
tasks (luaexpat, dkjson, ltokenp, LPEG, torch, etc). This part probably
may have infinite size.

-- Martin

Loading...