Re: [nodejs] Wind.js : An elegant approach to asynchronies JavaScript

2012-08-24 Thread Jeffrey Zhao
Bruno Jouhier Sent: Friday, August 24, 2012 2:43 PM To: nodejs@googlegroups.com Subject: Re: [nodejs] Wind.js : An elegant approach to asynchronies JavaScript Jeffrey, Can you give a small example of a Wind function that calls fs functions in sync style, without wrapper (but with the other bu

Re: [nodejs] Wind.js : An elegant approach to asynchronies JavaScript

2012-08-23 Thread Bruno Jouhier
Jeffrey, Can you give a small example of a Wind function that calls fs functions in sync style, without wrapper (but with the other builder). I'm still puzzled about how this can work. The "complete" event answers the other side of my question. Regarding eval, I agree that they it will be cal

Re: [nodejs] Wind.js : An elegant approach to asynchronies JavaScript

2012-08-23 Thread Jeffrey Zhao
about “eval”s. Thanks. Jeffrey Zhao From: Andy Sent: Friday, August 24, 2012 4:14 AM To: nodejs@googlegroups.com Subject: Re: [nodejs] Wind.js : An elegant approach to asynchronies JavaScript yeah, google groups can get a bit annoying at times Regarding eval, I'm pretty wary of running

Re: [nodejs] Wind.js : An elegant approach to asynchronies JavaScript

2012-08-23 Thread Jeffrey Zhao
(); There’s no recompilation during the execution. There’s only one compilation and eval for each single method definition. Thanks Jeffrey Zhao From: Bruno Jouhier Sent: Friday, August 24, 2012 1:48 AM To: nodejs@googlegroups.com Subject: Re: [nodejs] Wind.js : An elegant approach to asynchronies

Re: [nodejs] Wind.js : An elegant approach to asynchronies JavaScript

2012-08-23 Thread Bruno Jouhier
Hi Stu, Scrolled too fast and I missed your last name (I need a bigger laptop). Hope you're doing well :-) Bruno On Thursday, August 23, 2012 10:43:49 PM UTC+2, Stuart Carnie wrote: > > Bruno, > > Have you experimented with IcedCoffeeScript? The await / defer syntax is > just great. > > Cheer

Re: [nodejs] Wind.js : An elegant approach to asynchronies JavaScript

2012-08-23 Thread Bruno Jouhier
I know it but TameJS/IcedCoffeeScript came after streamline (I released streamline in January 2011, 5 months before tameJS). We were already using streamline heavily in our project when tameJS came out. Last time I looked at IcedCoffeeScript, it had limited support for await/defer in subexpress

Re: [nodejs] Wind.js : An elegant approach to asynchronies JavaScript

2012-08-23 Thread Stuart Carnie
Bruno, Have you experimented with IcedCoffeeScript? The await / defer syntax is just great. Cheers, Stuart -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to th

Re: [nodejs] Wind.js : An elegant approach to asynchronies JavaScript

2012-08-23 Thread Bruno Jouhier
I see 2 issues here: 1) optimiz-ability of the code generated by eval. 2) the fact that you have to eval every time if the async function is inside a closure. I don't know how real 1) is but 2) is problematic if you use lots of closures. Streamline does not have this problem because it transf

Re: [nodejs] Wind.js : An elegant approach to asynchronies JavaScript

2012-08-23 Thread Andy
yeah, google groups can get a bit annoying at times Regarding *eval*, I'm pretty wary of running your entire async code through it as a string. During this talk on v8 internals at JSConf US, this Russian v8 developer with a long name t

Re: [nodejs] Wind.js : An elegant approach to asynchronies JavaScript

2012-08-23 Thread Bruno Jouhier
Sorry for that, I'm responding through the web interface and the entire message is automatically quoted. The quote shows up in collapsed form with just a tiny "-show quoted text-" link at the bottom of the reply, so I didn't think it was harmful. But maybe some other readers (email clients) sh

Re: [nodejs] Wind.js : An elegant approach to asynchronies JavaScript

2012-08-23 Thread Brett Ritter
To all and sundry - PLEASE trim your quotes. This was a particularly long (said without complaint!) message, but many replies have left it quoted intact for no purpose. -- Brett Ritter / SwiftOne swift...@swiftone.org -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com

Re: [nodejs] Wind.js : An elegant approach to asynchronies JavaScript

2012-08-23 Thread Bruno Jouhier
> *To:* nod...@googlegroups.com > *Subject:* Re: [nodejs] Wind.js : An elegant approach to asynchronies > JavaScript > > If your EntityStore interface uses standard callbacks: > > EntityStore.prototype = { > get: function(id, cb) { ... }, > save: function(en

Re: [nodejs] Wind.js : An elegant approach to asynchronies JavaScript

2012-08-23 Thread Jeffrey Zhao
elegant approach to asynchronies JavaScript If your EntityStore interface uses standard callbacks: EntityStore.prototype = { get: function(id, cb) { ... }, save: function(entity, cb) { ... } }; Streamline will let you use it "as is". You will be able to write your wear

Re: [nodejs] Wind.js : An elegant approach to asynchronies JavaScript

2012-08-23 Thread Bruno Jouhier
If your EntityStore interface uses standard callbacks: EntityStore.prototype = { get: function(id, cb) { ... }, save: function(entity, cb) { ... } }; Streamline will let you use it "as is". You will be able to write your wearEquipement function as: function wearEquipment(character

Re: [nodejs] Wind.js : An elegant approach to asynchronies JavaScript

2012-08-23 Thread Tony Huang
sorry for a small mistake On Thu, Aug 23, 2012 at 11:31 PM, Tony Huang wrote: > I'm transforming my game server into Wind.js style. And it's really > painless and smooth. > > Wind.js has already provided the Wind.Async.Bindings.fromStandard and > Wind.Async.Bindings.fromCallback stubs to help yo

Re: [nodejs] Wind.js : An elegant approach to asynchronies JavaScript

2012-08-23 Thread Tony Huang
I'm transforming my game server into Wind.js style. And it's really painless and smooth. Wind.js has already provided the Wind.Async.Bindings.fromStandard and Wind.Async.Bindings.fromCallback stubs to help you integrate existing codes. For instance, I already have a EntityStore class which provid

Re: [nodejs] Wind.js : An elegant approach to asynchronies JavaScript

2012-08-22 Thread Bruno Jouhier
On Wednesday, August 22, 2012 12:55:41 PM UTC+2, Dominic wrote: > > this is all very clever, but do code transformations really make callbacks > easier? > Take the streamline tutorial (doc: https://github.com/Sage/streamlinejs/blob/master/tutorial/tutorial.md source: https://github.com/Sage/st

Re: [nodejs] Wind.js : An elegant approach to asynchronies JavaScript

2012-08-19 Thread Axel Kittenberger
> 2) Compared to CoffeeScript/IcedCoffeeScript/Streamline, Wind.js doesn't > need pre-compilation process One of the most awesome feature of node.js is it > doesn't need compilation. Seriously it makes a pre-compilation just like the other tools, the only difference is you call it in an eval righ

Re: [nodejs] Wind.js : An elegant approach to asynchronies JavaScript

2012-08-19 Thread Axel Kittenberger
On Sun, Aug 19, 2012 at 3:24 AM, Jeffrey Zhao wrote: > 1) I don’t know there’s a transform API in streamline, sorry. If > there’s one then using a eval() can do exactly the samething with Wind.js > For example using callbacks: - var transform = require('streamline/lib/callbacks/transform'

Re: [nodejs] Wind.js : An elegant approach to asynchronies JavaScript

2012-08-18 Thread Tony Huang
I prefer Wind.js for following reasons: 1) Compared to Streamline, Wind.js has better syntax It's easy to compare which one is more readable or native: Streamline uses a lot of underlines which makes program less readable. Instead, The await syntax of Wind.js is more like native language. 2) Comp

Re: [nodejs] Wind.js : An elegant approach to asynchronies JavaScript

2012-08-18 Thread Marcel Laverdet
As far as I can tell, the differences between Jsex/Wind and Streamline (and for that matter IcedCoffeeScript and TameJS) are largely superficial. The tough part is the compiler, which you can only do so many ways; all other features are just bells and whistles which could be implemented by a user o

Re: [nodejs] Wind.js : An elegant approach to asynchronies JavaScript

2012-08-18 Thread Axel Kittenberger
On Sat, Aug 18, 2012 at 6:53 PM, Bruno Jouhier wrote: > Regarding your point 1), there is no difference in the browser: streamline > provides a transform API which is just equivalent to the Wind.compile API. > I don't understand your point. > I consider more diversity generally a good sign. For