4 ms·
Any ideas what is this good for? I'm sure it's a nice intellectual exercise, but does it simplify something or make some cool tricks possible?
by Quiark 15y ago
Any ideas what is this good for? I'm sure it's a nice intellectual exercise, but does it simplify something or make some cool tricks possible?
- spencertipping 15y agoI originally wrote it for that reason: it's sort of a mind-bending exercise and I wanted to see if it could be done. (The first attempt was actually in Bash, but that didn't work at all.) Since refining the implementation a bit, I've found these scripts to be unexpectedly useful. I mainly use them to encapsulate things like build rules, though now they have an inheritance hierarchy and some standard library functions that I reuse. Because these scripts are self-contained, I can upgrade library code without breaking old projects. The coolest thing about these files, I think, is that they support inheritance from one another and are fairly smart about it. (This feature didn't exist at first, and as a result they were impossible to manage.) If you locally modify one to differ from one of its parents, it makes a note of this and preserves your changes to the modified attributes during upgrades. I use this on the Caterwaul page to provide custom HTML -- most scripts load some Javascript that shows you the attribute table.