I know Lua is becoming a popular choice with game developers for similar applications - that is why I mentioned it.
I'm not familiar with game development, but I've heard good comments about Lua, in particular it has been designed as the embedded language of choice for what that if I understand correctly should be the successor to pdfTeX i.e. namely LuaTeX. I didn't even know about Inline::Lua but that definitely sounds as good news. Other than that another neat little language especially targeted at embedding which I personally find to be quite interesting is io, although in this case I see that there's no Inline::io nor Inline::Io, which suggests me that possible connections with Perl are much less explored, but of course I would be glad to be proven wrong.
| [reply] |
Except that Javascript and Lua (and other embedded scripting languages, like Guile and S-Lang) are full-featured, Turing-complete languages, so you don't get any protection against foot-shooting relative to Perl. If you're going to use a "real" language (like any of the above), you may as well choose one which has the simplest, most user-friendly syntax. That would rule out Javascript at least as much as Perl.
If by "logic" you mean something more declarative than procedural, you could consider Prolog, for which some modules exist: AI::Prolog and Language-Prolog.
We're building the house of the future together.
| [reply] |
Let me clarify.
I want a language that allows variable & method declaration, branching (if/elseif/else) loops (for/foreach/while), recursion and simple data structures (scalar, list, hash).
When I say "logic" I mean "branching, looping, variable-declaration and assignment, method-calls and return values".
Things I don't want are file- or socket-io operations, sleep() or exit(). Nor do I want the ability to import other modules.
I would use Inline::WSC and embed JavaScript and/or VBScript but it is only for Windows and the application I am writing is intended for Linux.
| [reply] |
Things I don't want are file- or socket-io operations...I would use Inline::WSC and embed JavaScript and/or VBScript
As someone who's supporting legacy VBScript apps, I can tell you that it does allow file operations; indeed, one of the first things I wrote for one app in question was a very basic logging tool. I suspect JS, outside of browser sandboxing, allows similar activities.
Indeed, I support the idea of you sandboxing the scripting language over trying to find a Turing-complete language with the attributes in question. Sandboxing seems to be "the way" to corral such users, esp. since few languages are restricted in the way you're looking for.
----Asim, known to some as Woodrow.
| [reply] |
If you'd like to allow Perl but are concerned users will do unsafe things, you could try using Safe to restrict what they can do.
| [reply] |
| [reply] |
| [reply] |