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 10:28:44 +0100
Marc Balmer <> wrote:

> > 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.
> That full blown script interpreter is 64K, btw. 
$ uname -sr
$ ls -l /usr/lib/ /usr/lib/liblua.a
-r--r--r--  1 root  wheel  195860 Oct 16 00:02 /usr/lib/liblua.a
-r--r--r--  1 root  wheel  154285 Oct 16 00:02 /usr/lib/

> If you program, otoh, uses Lua anyway for scripting purposes,
> then this becomes a non-issue.
Yes. I know. I have this synergetic effect at work, actually with JSON,
because data is stored in JSON and processed in a web GUI that uses
JavaScript extensively. I can see the advantage of Lua in similar
situations that don't require web interoperability, clearly.

The problem arises when you wane interface an other programm to a Lua
using programm and this other programm (actually its programmer) is
agnostic about Lua. Lua is captive. There is no easy way out of it.

> Yes, there is no way around that executing it.  But we are talking
> about a configuration/data exchange system for NetBSD programs,
> and fortunately not many of them are written in e.g. Perl, tcl,
> Java, Lisp, Haskell, Fortran... 
> So this argument is nothing more than FUD in this context, it's
> actually irrelevant for the problem at hand, because those languages
> are just not used a lot in NetBSD.
FUD? Really?
The problem arises if you wane hook up somthing to NetBSD thats not
part of the NetBSD Base System itself. It may get quirky if you
wane add your homegrowen admin scripts without using Lua because you
are a Perl, tcl, ... bigot. 

> JSON is a practical thing as well. I would not be to much surprised
> if some programs would use JSON for data exchange (as much as I am
> convinced that some will go the Lua route).  It would even per
> interoperable, as Lua can, using a JSON module, easily parse JSON data.
Yes. Thats a (the?) point. Lua can process JSON easyly. But JSON (i.e.
JavaScript / ECMAScript) can not process Lua easyly.

By using Lua for data, people are forced to use Lua or at least the Lua
interpreter with its C API for processing. The data is tied to a
speciffic programming language. This is OK in many situations. But I
don't wane impose this policy on everyone by using Lua as the general
configuration file format for the entire operating system.

An other Point: Binary data. JSON is bad in that realm. IIRC Lua too.
Maybe BERT? (As of Erlang)

Don't get me wrong. I am with you. I like Lua. I'd love to see Lua used
as general configuration file format in NetBSD. But it has a fairly
strong taste and I fear that many people don't like it.

But as Martin pointed out elsewhere: The real question is not
configuration files. It is a data exchange format and primarily the API
of a library providing this facility. So this whole mail is just off
topic bike sheding. ;-)



Home | Main Index | Thread Index | Old Index