Language::SIMPLE - The Portable Integrated Scripting System
Introducing SIMPLE
SIMPLE is an experimental attempt to integrate end user scripting into Perl applications. It actually stands for Simple Integrated Modular Programming Language Experiment. The idea is that an application one develops might allow an end-user to run scripts they have made, in a custom language targeting the application's operations. Sounds silly? A script parsing utility written in another scripting language? I do a lot of silly stuff.
Some time ago, I attempted to use a Raspberry pi for robotic and other IO applications. To save time and allow for flexibility, I had developed piGears, a scripting tool that could handle the GPIO and also have some basic flow control as well as support for I2C devices. It had been useful for my experiments with electronics, but was a rather niche utility.
Fast forward a few years and I am working on GUIDeFATE (probably the world's simplest GUI designer). I wanted a way to integrate drawing vector images to a canvas and manipulating them, and perhaps exporting them. GUIDeFATE was designed to handle a number of back-end graphical toolkits, and each had had quite different ways of handling the canvas.
Now, I confess, my coding skills are rather mediocre. Complex graphical manipulations would require a certain degree of struggling from me. But all the existing backends for GUIDeFATE can potentially handle SVG. If only I could create a way for the user to produce SVG graphics simply...
I realised I could rejig the ancient code I had written to make a more generic scripting module. All this module would need to do is to be a script interpreter allowing simple variables, subroutines and flow control, onto which anyone could bolt on customised commands and bingo your end-user can control robots, draw pictures programmatically or do anything, Now does that make sense? For many, probably not. But if you were going to parse a text script, the best language to do that in is probably Perl.
Enter Language::SIMPLE. It contains elements necessary to make a programming language without actually any components that make the programming language do anything useful. It can parse a set of instructions. It understands some variables, although technically all its variables are global. It understands subroutines, some limited flow control and code folding. With a little bit of flesh on this skeleton more sophisticated tasks can be performed from end-user scripts. SIMPLE is not on CPAN, and wont be at least until version 0.05, and only if there is some demand for such a utility. With the demo extension it is trivial to make a vector drawing program using LOGO-esque scripts.
Wow. You've come a long way since the first version of GUIDeFATE. Sorry I wasn't able to use and beta it for you, but glad to see you've taken off with it!
Thanks Matthew, and no worries about beta thing...your input was still useful. Perl graphics and graphical interfaces are pretty much a hidden entities nowadays, so any feedback is valuable and encouraging.