1 Dec 2004 01:05
Turing-incomplete Lua?
Ben Crowell <luacrowell04 <at> lightandmatter.com>
2004-12-01 00:05:18 GMT
2004-12-01 00:05:18 GMT
Is there any reasonably easy way to use Lua as a data- description language, while disallowing the features that make it a Turing-complete language? For instance, Unix and the apps that run on it have traditionally had lots and lots of configuration files, each of which had its own idiosyncratic syntax. It would be nice to be able to standardize them in terms of syntax. I believe MacOS X uses XML for a lot of its config files, for instance. However, sometimes it's nice to have a real programming language, and XML isn't a programming language per se. For instance, it would be nice to be able to use conditional constructs in a config file: if the operating system is FreeBSD, then X, else if it's Linux, ... But you probably don't want a Turing-complete language for this purpose, for reasons of reliability and trust; it's fundamentally impossible for a computer program to verify or manipulate another program written in a Turing-complete language. This is why I'm much more willing to accept an e-mail written in HTML (a Turing-incomplete language) than one that contains an executable program. Another interesting example is TeX, which is Turing-complete; spell-checkers for TeX are always full of weird heuristics for attempting to determine what should be spell-checked and what shouldn't, and the problem is fundamentally impossible to solve because of the Turing-complete nature of the language. So if you can see what I'm getting at --- is there a way to read a data description written in Lua, but make sure it's sufficiently limited in what it does that we know it's limited to a Turing-incomplete subset of Lua? A couple of(Continue reading)
Milano
>From: Ben Crowell <luacrowell04 <at> lightandmatter.com>
>Reply-To: Lua list <lua <at> bazar2.conectiva.com.br>
>To: lua <at> bazar2.conectiva.com.br
>Subject: Turing-incomplete Lua?
>Date: Tue, 30 Nov 2004 18:05:18 -0600
>
>Is there any reasonably easy way to use Lua as a data-
>description language, while disallowing the features
>that make it a Turing-complete language? For instance,
>Unix and the apps that run on it have traditionally had
>lots and lots of configuration files, each of which had
>its own idiosyncratic syntax. It would be nice to be able
>to standardize them in terms of syntax. I believe MacOS X
>uses XML for a lot of its config files, for instance.
>However, sometimes it's nice to have a real programming
>language, and XML isn't a programming language per se.
RSS Feed