Choosing between database types
Nov 23 11:35:01
Askari and Java prototyping
Nov 22 4:48:43
Finding scarcity in the digital economy
Nov 10 12:17:27
Tornado - the web services server?
Sep 19 23:19:55
Quote of the week
Jul 18 9:18:44
The two most useful things I've found about my Rhino wrapper Askari are:
Recently, I came across a nice example which allowed me to exploit both benefits. I wanted to be able to extract data from a series of web pages, but which unfortunately were being presented in HTML format rather than XHTMl.
I've always kept half an eye on the progress of the long, long, LONG awaited Perl 6, and more specifically on its cross-platform, dynamically typed VM at its base, Parrot.
One of the more exciting features of Parrot is its advanced language parsing features which make implementing a new grammar almost trivial -- the Parrot Grammar Engine (PGE). A humorous, but practical example of using PGE can be found in this LOLCODE implementation.
A number of people have described methods for private variables and methods within JavaScript.
In that spirit, this is another possible template. The main difference between this version and most others is that it uses the concise JSON notation for variable and method declarations.
File.Writer = File.Writer || function (filename, append, binaryMode) { Unfortunately E4X documentation is very thin on the ground, even on the official Mozilla Rhino site, which has left a lot of developers either scrabbling through source code or relying on examples.
An invaluable article on the principles and practice of E4X can be found on the DevX site.
Note to self (since I keep forgetting the magic incantation) -- this is how you declare entities in E4X XML documents under Askari (my scripting-optimized version of Rhino):
js> var x =
<?xml version="1.0"?>
<!DOCTYPE x [<!ENTITY nbsp ' '>]>
<x>test non-breaking space</x>;
js> print(x);
test non-breaking space
js>
Askari is a custom version of the Mozilla Rhino Javascript Engine optimized for use in standalone applications and servlets. It is easily extensible either with Java libraries (SWT is bundled) or by adding to the included JavaScript library framework.
I have just released the very first public release version of the Askari system (0.1.2). It is very usable due to the maturity of the components used to assemble the system but far more still needs to be done.
Visit the Sourceforge Project site for more details.
This just seems like common sense to me. But I see people building applications that break pretty much all of these rules all too often. Whatever happened to be liberal in what you accept?