Kermit is impressive - but can library run outside the browser?
Fri, 2010-04-30 11:24
Just wanted to say how impressive the Kermit tool is. I was able to get this running with very little effort to prove the basic functionality of Ribbit.
Can you share your view on whether the javascript library could be used outside a browser, e.g. in a server-side javascript environment such as Jackjs or Ringojs, or simply using a raw javascript environment like Rhino, node.js, Qt Scripting, Spidermonkey etc.
I can see some issues in the code with the use of window as a global, but this can be worked around with something like this assuming there are no other dependencies on browser-oriented capabilities...
/** Universal access for global variable regardless of browser or non-browser environment. */function getGlobal(){ //from http://www.nczonline.net/blog/2008/04/20/get-the-javascript-global/return (function(){return this;})();}


We're doing some thinking about the js library.
I think there's a good case to turn it into a CommonJS module - this should be runnable by node out of the box. I've tried it in node, and entered a world of pain trying to get node crypto sorted so I can make calls to https clients - If i could get that done, or node made it easier, then it wouldn't be hard to extend the existing library.
And yes, we would take advantage of your getGlobal function.
In terms of support I'm thinking node and Rhino as top priority, spider monkey next, then others.