4 ms·
Narwhal - a flexible javascript standard library
- geuis 17y agoReally happy to see this being released. Have been following along the group since the beginning. Must say this is quite a lot of work for only having started at the beginning of the year.
- tlrobinson 17y agoThis is still very much a work in progress but feel free to start tinkering (and contributing!)
- aston 17y agoI like that it's sort of inspired by the WSGI model, but it seems like it's missing a key piece: I want to return a 'generator' as the last object in the response list so that I can stream content. I guess the JS version of that would be a function?
- tlrobinson 17y agoCurrently the body of the response can be any object that has a "forEach" method. For example: return [200, {}, { forEach : function(block) { block("a"); sleep(1000); block("b"); sleep(1000); block("c"); }]; Would output "a", wait 1000ms, output "b", etc. The Response helper object (part of the "Jack" implementation not "JSGI" specification) makes it even easier: return response.finish(function(block) { // etc } Still working on an async API though. The Jack/JSGI site is currently at http://jackjs.org http://jackjs.org
- pufuwozu 17y agoIt seems like the package manager mentioned (getjs) has been deprecated for Narwhal's built-in Tusk script. Also, Nitro looks very promising. Hopefully it will help get more Javascript into the server space! http://github.com/gmosx/nitro/tree/master http://github.com/gmosx/nitro/tree/master
- jamesbritt 17y agoGeorge Moschovitis is a very smart guy. Nitro started off as a Ruby app some years ago, and it rocked (as does its descendant, Ramaze). I need to find some time to check out Nitro/js.
- dtf 17y agoIsn't Nitro also Apple's new name for their JS engine (aka SquirrelFish Extreme, JavaScriptCore etc)?