lua-users home
lua-l archive

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


On Sat, Apr 22, 2017 at 8:41 PM, Martin <eden_martin_fuhrspam@gmx.de> wrote:
>   There about half dozen JSON codecs in LuaRocks. Package 'lua-cjson'
>   is fastest but depends on C and have problems with decoding integers
>   (they returned as floats). 'dkjson' is OK (but has spooky code).

Exactly. Your new user wants to get an overview from someone who has
experience with JSON and (as the English say) have no horse in the
race. JSON is a little tricky because the original spec is probably
too restrictive (No comments?) and carries too many Javascript
assumptions (all numbers are floats!). So there are extended parsers
all over the place. Plus, it _appears_ to be a simple problem and it's
fun doing the first 80%.

> It would be fine is there will be some voting for "best answer" as
> in StackOverflow.

That makes sense. I hope Leaf implements something like this for the
LuaRocks website (was part of original LuaTookit site) so that our new
user can get a list sorted by points and downloads. It only gets worse
the more packages are available, e.g. Rust has nearly 9000 crates
already and finding the needle in the hackstack gets hard.

> Lua does not enforce you to any good or bad programming habits.

And that is what a good tool should do, stay out of the way and let
you be a grown-up. But that new user would like some guidance and some
pointers to 'good' code out there in the wild.