35 karma · joined June 9, 2010
But Google is worth billions of dollars and is succeeding wildly at innovating and changing the world, and I'm a lone developer. I can't very well stand here and tell Google, "hey you billionaire company, you're doing it all wrong; I've got the magic bullet right here."
Part of the dichotomy is whether to define success as financial wealth or as some kind of more abstract software quality. And I think that's a legitimate variable; if Google is wealthy but has lower-quality software for it, then they and I just have different priorities.
I stand for my opinion by investing all of my spare time into FP language development and research, but until I see a billion-dollar company using it, I'm not going to call anyone a loser for choosing Java.
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.
I used a binary split and due to the sparseness of the data (and the uninsightfulness of my algorithm) didn't run into too many spurious drop cases. But the implementation I posted is very basic and shows my lack of background in NLP-related pursuits -- I'm lucky it did anything useful at all :)
The basic mechanism is to call f.toString() on some function, then construct a new one the way you want it using either eval() (for non-IE browsers), or new Function(code) (for all browsers). Caterwaul leverages this by implementing a JS parser, defining a macro syntax, and letting you determine how the code gets rewritten. (So you can do things like let[x = 5] in x + 1, which is valid JS to begin with but nobody would ever use it :) )