Received: by 10.52.64.141 with SMTP id o13mr783854vds.1.1349297056973; Wed, 03 Oct 2012 13:44:16 -0700 (PDT) X-BeenThere: nodejs@googlegroups.com Received: by 10.52.36.237 with SMTP id t13ls1767189vdj.3.gmail; Wed, 03 Oct 2012 13:44:07 -0700 (PDT) Received: by 10.58.117.41 with SMTP id kb9mr856089veb.27.1349297047805; Wed, 03 Oct 2012 13:44:07 -0700 (PDT) Received: by 10.58.117.41 with SMTP id kb9mr856088veb.27.1349297047790; Wed, 03 Oct 2012 13:44:07 -0700 (PDT) Return-Path: Received: from mail-vb0-f49.google.com (mail-vb0-f49.google.com [209.85.212.49]) by gmr-mx.google.com with ESMTPS id s13si291995vde.2.2012.10.03.13.44.07 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 03 Oct 2012 13:44:07 -0700 (PDT) Received-SPF: pass (google.com: domain of fedor.indu...@gmail.com designates 209.85.212.49 as permitted sender) client-ip=209.85.212.49; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of fedor.indu...@gmail.com designates 209.85.212.49 as permitted sender) smtp.mail=fedor.indu...@gmail.com; dkim=pass header...@gmail.com Received: by mail-vb0-f49.google.com with SMTP id fo1so8819818vbb.36 for ; Wed, 03 Oct 2012 13:44:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=6FLM9LGfA+7G8gejwNBME1T0+besqMNjGtIq/liCjjM=; b=mEiNbDkpDY/NlVVDlQhEiuumHkLJLIQHpyAUyS2QCYOKXKQYQ7b2XSFvrz5zotLh9y PQee9mwCucTShzOY1H7tHJP/Qh9fnumkLbqYlLKBUwc/3iv1zJz1wNmoJ76tFg5m/g07 fpzVAT97DYSebEKezeF8IXkar9h6j7OntOqvYuKY579FfU0UlEpsUzSzpPGa0cdvSUG0 HmLrcg03tTFuqeEszVpSoHJD/itQAjAZvVEXO4e47bA6eyhGeX7W6TBI/fBrm1RKqN2e nul+5rhCh0wzSCkyd6KxBApwGXwLetj2OM4cjECrqhzdCNLDUDy46R2bTVRy7jXZza7k ahfA== Received: by 10.58.201.73 with SMTP id jy9mr1894037vec.29.1349297047279; Wed, 03 Oct 2012 13:44:07 -0700 (PDT) MIME-Version: 1.0 Sender: fedor.indu...@gmail.com Received: by 10.220.154.7 with HTTP; Wed, 3 Oct 2012 13:43:47 -0700 (PDT) In-Reply-To: References: <08320a14-e585-4b7a-b13a-f463144e3067@googlegroups.com> From: Fedor Indutny Date: Thu, 4 Oct 2012 00:43:47 +0400 Message-ID: Subject: Re: ANN: Spoon To: Bruno Jouhier Cc: nodejs@googlegroups.com Content-Type: multipart/alternative; boundary=047d7b677afa33176e04cb2db325 --047d7b677afa33176e04cb2db325 Content-Type: text/plain; charset=ISO-8859-1 Very nice, Bruno! Looking forward for getting this back into main repo! On Thu, Oct 4, 2012 at 12:16 AM, Bruno Jouhier wrote: > s/CGG/CFG/ > > > On Wednesday, October 3, 2012 10:14:03 PM UTC+2, Bruno Jouhier wrote: >> >> 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/** >> 83910ee1a4b4036fa1ca38b4f19736**b136ace513 >> >> Bruno >> >> On Monday, October 1, 2012 9:11:57 PM UTC+2, Fedor Indutny wrote: >>> >>> 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. >>> >>> --047d7b677afa33176e04cb2db325 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Very nice, Bruno!

Looking forward for getting this back = into main repo!



On Thu, Oct 4, 2012 at 12:16 AM, Bruno J= ouhier <bjouh...@gmail.com> wrote:
s/CGG/CFG/


On Wednesday, Oct= ober 3, 2012 10:14:03 PM UTC+2, Bruno Jouhier wrote:
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 runnin= g.

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

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

My changes are here: https://githu= b.com/bjouhier/spoon/commit/83910ee1a4b4036fa1ca38b4f19736= b136ace513

Bruno

On Monday, October 1, 2012 9:11:57 PM UTC+2, Fedor Indutny= wrote:
Hey people,

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

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

Basically, it lets you to rewrite code like this:
=

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

To this:

var data;
fs.read('file', fun= ction(err, result) {
=A0 data =3D 'prefix: ' + result; });

Please check the readme, if you're interest= ed.

Cheers,
Fedor.


--047d7b677afa33176e04cb2db325--