tech-userlevel archive

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

Re: proplib and the jet age



On Sat, 5 Jan 2013 00:25:19 +0000
David Holland <dholland-tech%netbsd.org@localhost> wrote:

> If you're talking about using Lua syntax as the transfer format, I
> don't see any advantage over e.g. JSON and the disadvantage of being
> much less widely used elsewhere.
> 
> If you're talking about using the Lua interpreter to receive data by
> executing incoming data as code and dumping out the Lua tables found
> in the interpreter afterwards... in addition to the obvious hazards of
> making things executable that shouldn't be, this is a very expensive
> and ass-backwards way to avoid writing 500 lines of parsing code, and
> I don't see the point.
Seconded.
I like Lua. I used it at work for some prototyping stuff. This also
included using the Lua C-API. It is quite cumbersome to use a full
blowen script interpreter API only to extract some data values.

An other point: If configuration is kept in Lua you _have_ to mangle it
through the Lua interpreter. There is no other way of retriving the
data then executing the script and extracting the data from the Lua
state afterwards. There is no way to process the configuration Lua
script in e.g. Perl, tcl, Java, Lisp, Haskell, Fortran, ... just by
parsing. You have to bind the Lua C-interpreter to that foregin language
or you have to reimplement the Lua language in that non-C language.
Sorry. I am not going to by this.

At work we use JSON and made good experience with it. It supports just
the right value types needed (number, string, bool, nil) and these can
be combined to arbitrary complex objects by enumeration (JSON-Object)
and iteration (JSON-Array). There are good JSON libraries for a
gazillion of different programming languages including bash...
-- 


\end{Jochen}

\ref{http://www.unixag-kl.fh-kl.de/~jkunz/}



Home | Main Index | Thread Index | Old Index