Announcing Common Node

72 views
Skip to first unread message

Oleg Podsechin

unread,
Aug 30, 2011, 9:42:50 AM8/30/11
to CommonJS
Hello everyone,

I would like to announce Common Node, which I hope will be of interest
to members of this group.

http://olegp.github.com/common-node/

Common Node is a Node.js package that implements a number of CommonJS
proposals using node-fibers. It uses Google's Traceur compiler to add
JavaScript language features currently not natively supported by V8.
This allows for synchronous code written for e.g. Ringo and Narwhal to
run on Node.

I would really appreciate any feedback or comments you may have on
this.

Regards,
Oleg

Chris Brody

unread,
Aug 31, 2011, 4:27:36 AM8/31/11
to CommonJS
+1, it is nice to use Node.js functionality from a CommonJS API.

It would be nice if we could have a standardized API for fibers/
coroutines.

Chris

Mikeal Rogers

unread,
Aug 31, 2011, 12:49:00 PM8/31/11
to comm...@googlegroups.com
what commonjs spec requires fibers for the implementation?

> --
> You received this message because you are subscribed to the Google Groups "CommonJS" group.
> To post to this group, send email to comm...@googlegroups.com.
> To unsubscribe from this group, send email to commonjs+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/commonjs?hl=en.
>

Elijah Insua

unread,
Aug 31, 2011, 1:08:21 PM8/31/11
to comm...@googlegroups.com

They all do, if you own a hammer

Oleg Podsechin

unread,
Aug 31, 2011, 1:14:58 PM8/31/11
to CommonJS
IO, Filesystem & HttpClient use fibers directly. JSGI uses them
indirectly via the IO module.

Although not part of any CommonJS spec, the System module that mimics
the one in RingoJS uses fibers for spawn() and sleep().

I'm also working on a Subprocess and a Sockets module, which will both
use fibers.

To find all occurrences: grep 'yield' common-node/lib/*

Oleg

Tom Robinson

unread,
Sep 1, 2011, 12:00:54 AM9/1/11
to comm...@googlegroups.com
Very cool!

Isaac Schlueter

unread,
Sep 1, 2011, 12:42:56 AM9/1/11
to comm...@googlegroups.com
>> On Aug 31, 7:49 pm, Mikeal Rogers <mikeal.rog...@gmail.com> wrote:
>>> what commonjs spec requires fibers for the implementation?

Don't a bunch of them assume synchronous IO? You can't very easily
build that kind of API on Node without some sort of fiber/coro thing.

Mikeal Rogers

unread,
Sep 1, 2011, 4:39:51 PM9/1/11
to comm...@googlegroups.com
I thought we got rid of and/or evolved those, with the exception of Modules.

-Mikeal

Wes Garland

unread,
Sep 1, 2011, 4:45:32 PM9/1/11
to comm...@googlegroups.com
> I thought we got rid of and/or evolved those, with the exception of Modules.

More like we never came to any solid conclusions about those APIs.  There has been too much stall in here lately, bitching about semantics of module loaders for months on end has derailed the really interesting work.

This thread is a good reminder that we need to fix that.

Wes

--
Wesley W. Garland
Director, Product Development
PageMail, Inc.
+1 613 542 2787 x 102

Oleg Podsechin

unread,
Sep 1, 2011, 7:06:37 PM9/1/11
to CommonJS
RingoJS and Narwhal implement them, that's conclusive enough for me.
Reply all
Reply to author
Forward
0 new messages