On Nov 14, 2007 5:48 PM, Michele Simionato <[EMAIL PROTECTED]> wrote: > On Nov 14, 2007 4:30 PM, <[EMAIL PROTECTED]> wrote: [...] > Well, if a language has an interactive toplevel (or a very fast compiler) I > don't see why not to use it a scripting language. [...]
Right. Poly/ML has a very fast compiler (thousands of lines per second). > You don't need to change the syntax of SML. Right again. > You just need to put a front-end stripping the first line if it begins with > #! and dispatching the code to the interactive interpreter. Indeed. I just wrote a toy/kludge script like that for experimenting with writing Poly/ML scripts. You could probably adapt it for Alice ML. Note, however, that the script "polyscript" is definitely klunky and doesn't handle all kinds of input properly. In particular, the way it passes the parameters to the script is totally ugly and fragile. The same goes for the kludge to strip of unwanted output performed by Poly/ML. It would be better to extend the Poly/ML compiler with an option to stop processing arguments (and make "CommandLine.arguments ()" return the rest of the arguments), another option to not print any prompt and one more option to set the print_depth (these options should not be too difficult to implement). -Vesa Karvonen
args.sml
Description: application/smil
polyscript
Description: Binary data
_______________________________________________ alice-users mailing list [email protected] http://www.ps.uni-sb.de/mailman/listinfo/alice-users
