However, I must say I'm not particularly enamored of NSIS's scripting language. Yeah, it gets the job done, but I feel it could be better.
But! It is better to light a single candle than curse the darkness. In my spare time, I've cobbled together a prototype for a replacement language. I called it "Angstrom". Its runtime engine is essentially a lightweight FORTH; the current parser also looks like FORTH, but I would probably hide that before it saw the light of day.
Angstrom currently supports:
- Arbitrarily-named global variables, all-you-can-eat!
- User functions, with named arguments and local variables (also all-you-can-eat), and recursion
- Expanding variables inside strings, like "My name is $foo"
- Built-in flow control with if/else/endif and begin/while/repeat; no more labels, real structured programming!
- A variable can be numeric (3) or a string ("foo"), and they are handled differently
- A couple odds and ends thrown in (addition, subtraction, equals, less-than)
- Separate "compiler" and "executor" modules, to minimize runtime size
- Calling out to C functions for easy embeddability
As a proof-of-concept, it's already pretty usable. F'r instance, it can tell you how to solve Tower Of Hanoi puzzles 🙂
So how big is it? Angstrom currently adds 2290 bytes to my test program. But it's hard to say how much it would change EXEHEAD (the NSIS installer runtime component.) First of all, I can probably squeeze that down a little. Also, keep in mind also that your compiled scripts would probably be smaller with Angstrom (as it's more space-conscious). And there's also a bunch of special-case code in EXEHEAD that I could streamline (like the N different versions of if/else/endif).
So. How interested would you folks be in such a thing? Should I take the plunge and try and integrate it into NSIS? If Nullsoft weren't interested in the diffs, should I bother making my own alternate release?
Cheers,
larry