Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
ANN: Spoon
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  13 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Fedor Indutny  
View profile  
 More options Oct 1 2012, 3:11 pm
From: Fedor Indutny <fe...@indutny.com>
Date: Mon, 1 Oct 2012 23:11:28 +0400
Local: Mon, Oct 1 2012 3:11 pm
Subject: ANN: Spoon

Hey people,

Let me introduce you The Spoon: https://github.com/indutny/spoon

It's a JavaScript to CFG (Control-Flow Graph) transpiler and additionally a
CPS (Continuation Passing Style) transpiler too.

Basically, it lets you to rewrite code like this:

var data = 'prefix: ' + fs.read('file')

To this:

var data;
fs.read('file', function(err, result) {
  data = 'prefix: ' + result;

});

Please check the readme, if you're interested.

Cheers,
Fedor.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marcel Laverdet  
View profile  
 More options Oct 1 2012, 5:43 pm
From: Marcel Laverdet <mar...@laverdet.com>
Date: Mon, 1 Oct 2012 16:42:56 -0500
Local: Mon, Oct 1 2012 5:42 pm
Subject: Re: [nodejs] ANN: Spoon

You have no idea what you've done.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Hahn  
View profile  
 More options Oct 1 2012, 5:56 pm
From: Mark Hahn <m...@hahnca.com>
Date: Mon, 1 Oct 2012 14:55:20 -0700
Local: Mon, Oct 1 2012 5:55 pm
Subject: Re: [nodejs] ANN: Spoon

@Marcel just meant that you have started an infinite discussion thread.  He
wasn't insulting your module.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fedor Indutny  
View profile  
 More options Oct 2 2012, 2:28 am
From: Fedor Indutny <fe...@indutny.com>
Date: Tue, 2 Oct 2012 10:28:21 +0400
Local: Tues, Oct 2 2012 2:28 am
Subject: Re: [nodejs] ANN: Spoon

"I'm just doing my job".


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ted Young  
View profile  
 More options Oct 2 2012, 2:43 pm
From: Ted Young <t...@radicaldesigns.org>
Date: Tue, 2 Oct 2012 11:43:00 -0700
Subject: Re: [nodejs] ANN: Spoon

Just wondering, what were your use cases when writing spoon? Was it to solve production problems you were facing? Are you using it at nodejitsu?

Cheers,
Ted

On Oct 1, 2012, at 11:28 PM, Fedor Indutny <fe...@indutny.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fedor Indutny  
View profile  
 More options Oct 2 2012, 2:50 pm
From: Fedor Indutny <fe...@indutny.com>
Date: Tue, 2 Oct 2012 22:49:28 +0400
Local: Tues, Oct 2 2012 2:49 pm
Subject: Re: [nodejs] ANN: Spoon

No, we ain't using this at nodejitsu.

I'm coauthor of xjst module, which is compiling templates to a
highly-recursive javascript code. However some javascript VMs like
Spidermonkey doesn't support that recursion well, and here comes spoon! It
can translate any recursive calls into fake asynchronous ones. And then
using tricky dispatch function I can run those calls one-by-one without any
recursion at all:
https://github.com/veged/xjst/blob/master/lib/xjst/utils.js#L68


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fedor Indutny  
View profile  
 More options Oct 2 2012, 2:56 pm
From: Fedor Indutny <fe...@indutny.com>
Date: Tue, 2 Oct 2012 22:56:05 +0400
Local: Tues, Oct 2 2012 2:56 pm
Subject: Re: [nodejs] ANN: Spoon

I'll write a blog post about it on http://blog.indutny.com/ soon,
describing everything in details.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rick Waldron  
View profile  
 More options Oct 2 2012, 3:05 pm
From: Rick Waldron <waldron.r...@gmail.com>
Date: Tue, 2 Oct 2012 15:03:55 -0400
Local: Tues, Oct 2 2012 3:03 pm
Subject: Re: [nodejs] ANN: Spoon

Fedor,

Is xjst meant to run in a browser at all? I ask because I see code where
objects with a property named "default" are accessing like...

obj["default"]

which isn't necessary in runtimes that correctly implement ES5.1. "default"
is a reserved word, but property names are IdentifierNames, not
Identifiers, so "default" is valid when used like...

obj.default;

eg.

$ node

> var o = {default: "hi!"}
undefined
> o.default
'hi!'

Anyway, no big deal, I just happened to notice it and figured I'd mention.

Rick


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fedor Indutny  
View profile  
 More options Oct 2 2012, 3:07 pm
From: Fedor Indutny <fe...@indutny.com>
Date: Tue, 2 Oct 2012 23:07:03 +0400
Local: Tues, Oct 2 2012 3:07 pm
Subject: Re: [nodejs] ANN: Spoon

Well, it supposed to work in all browsers, and it supposed to be
optimizable by all optimizers including uglifyjs, closure compiler and yui
compressor (that's why I'm using "escaped" property names sometimes).

On Tue, Oct 2, 2012 at 11:03 PM, Rick Waldron <waldron.r...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rick Waldron  
View profile  
 More options Oct 2 2012, 3:11 pm
From: Rick Waldron <waldron.r...@gmail.com>
Date: Tue, 2 Oct 2012 15:10:23 -0400
Local: Tues, Oct 2 2012 3:10 pm
Subject: Re: [nodejs] ANN: Spoon

On Tue, Oct 2, 2012 at 3:07 PM, Fedor Indutny <fe...@indutny.com> wrote:
> Well, it supposed to work in all browsers, and it supposed to be
> optimizable by all optimizers including uglifyjs, closure compiler and yui
> compressor (that's why I'm using "escaped" property names sometimes).

Ah, got it, this makes sense :)

Rick


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bruno Jouhier  
View profile  
 More options Oct 3 2012, 4:14 pm
From: Bruno Jouhier <bjouh...@gmail.com>
Date: Wed, 3 Oct 2012 13:14:03 -0700 (PDT)
Local: Wed, Oct 3 2012 4:14 pm
Subject: Re: ANN: Spoon

Hi Fedor,

This looks really promising.

I tried to integrate it as an alternate transformation engine for
streamline (a fourth one) and the first results are encouraging: I got the
first diskUsage example running.

I had to make a few changes to align spoon on the node.js callback format
(error as first callback parameter + testing for err in callback and
propagating it through __$callback).

My unit test suite is not running yet because of some unimplemented
features: switch, try/finally, labelled statement. But I like the approach.
The CGG intermediate representation is cool and can probably produce more
efficent code than my pattern based approach.

My changes are here:
https://github.com/bjouhier/spoon/commit/83910ee1a4b4036fa1ca38b4f197...

Bruno


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bruno Jouhier  
View profile  
 More options Oct 3 2012, 4:16 pm
From: Bruno Jouhier <bjouh...@gmail.com>
Date: Wed, 3 Oct 2012 13:16:34 -0700 (PDT)
Local: Wed, Oct 3 2012 4:16 pm
Subject: Re: ANN: Spoon

s/CGG/CFG/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fedor Indutny  
View profile  
 More options Oct 3 2012, 4:44 pm
From: Fedor Indutny <fe...@indutny.com>
Date: Thu, 4 Oct 2012 00:43:47 +0400
Local: Wed, Oct 3 2012 4:43 pm
Subject: Re: ANN: Spoon

Very nice, Bruno!

Looking forward for getting this back into main repo!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »