Archive for May 2009
Introduction
One of the things added to the yavascript compiler, but not completed by the time I had to hand the project in to uni, was a debug mode. Because the compiler reads all the code in syntactically it can output it in whatever form it likes, including an experimental full debug mode. Basically your code goes from:
a += /search/i;
To:
$Y._addAss( /* target */ $Y._ref( /* name */ 'a', /* original code */ 'a', /* original line */ 42, /* original file */ 'my_code.js'), /* expression */ $Y._regex( /* pattern */ 'search', /* modifiers */ 'i', /* original code */ '/search/i', /* original line */ 43, /* original file */ 'my_code.js'), /* original code */ 'a +=\n\t/search/i;', /* original line */ 42, /* original file */ 'my_code.js');
The obvious question is WHY? But if you examine this code carefully you will see that it makes run-time debugging information a snap to collect and use to find problems.
(more…)
No tags
Sprockets is a tool from the makers of the “Prototype” Javascript library designed to ease the integration of multiple files via an inclusion system. yavascript is that and so much more, integrating syntax-aware minification and conditional compilation. While writing up my report on yavascript as part os my third year project I had to justify why I chose not to use Sprocket’s way of doing things. The simple answer is I didn’t want to, I like C and wanted to do it C’s way, but I figured that wouldn’t cut it in a technical report, so this led to a serious critical analysis of both systems.
(more…)
API · javascript · Prototype · Sprockets · yavascript
Update
NoScript v1.9.2.5 added the a prompt to ask if you wanted to add the list on initial installation. Personally I would have been perfectly happy with this, but v1.9.2.6 removed the white-list altogether. Also apparently as a result of this there are discussions under way for a change in AMO (addons.mozilla.org) policy.
(more…)
