Re: [Proto-Scripty] Re: Where is ver. 2.0 is coming?

2011-12-01 Thread Phil Petree
Hysterical!!!  Thanks for that laugh!!!
On Dec 1, 2011 9:01 AM, "Victor"  wrote:

> 1. Declaration with value assignment
> 2. Declare loop variables and cache length inside of for() - this can
> increase performance  -
> caching length outside of for() is slower in almost all results (all
> Firefox and Safari, IE9 and some Chrome results)
> 3. Unnecessary return values
>
> Example can be rewritten as:
>   SelectParser.select_to_array = function(select) {
> var parser = new SelectParser(), _ref = select.childNodes;
> for (var _i = 0, _len = _ref.length; _i < _len; _i++) {
>   parser.add_node(_ref[_i]);
> }
> return parser.parsed;
>   };
>
> yet another real example:
>
> CoffeeScript (with use of Prototype):
> class Chosen extends AbstractChosen
> ...
>   no_results_clear: ->
> nr = null
> nr.remove() while nr = @search_results.down(".no-results")
>
> CoffeeScript translated to JavaScript:
> Chosen.prototype.no_results_clear = function() {
>   var nr, _results;
>   nr = null;
>   _results = [];
>   while (nr = this.search_results.down(".no-results")) {
> _results.push(nr.remove());
>   }
>   return _results;
> };
>
> and pure JavaScript:
> var Chosen = Class.create(AbstractChosen, {
> ...
>   no_results_clear: function() {
> this.search_results.select(".no-results").invoke("remove");
>   },
> ...
> });
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Prototype & script.aculo.us" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/prototype-scriptaculous/-/FBTDmhOjgWoJ.
> To post to this group, send email to
> prototype-scriptaculous@googlegroups.com.
> To unsubscribe from this group, send email to
> prototype-scriptaculous+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Re: Where is ver. 2.0 is coming?

2011-11-29 Thread Victor
Also CoffeeScript sometimes generates very ugly code. Example:

CoffeeScript:
SelectParser.select_to_array = (select) ->
  parser = new SelectParser()
  parser.add_node( child ) for child in select.childNodes
  parser.parsed

Generated JavaScript:
  SelectParser.select_to_array = function(select) {
var child, parser, _i, _len, _ref;
parser = new SelectParser();
_ref = select.childNodes;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
  child = _ref[_i];
  parser.add_node(child);
}
return parser.parsed;
  };

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/prototype-scriptaculous/-/deEMCdQYgz0J.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Re: Where is ver. 2.0 is coming?

2011-11-29 Thread Walter Lee Davis
CoffeeScript is nothing more than a compact and terse programming language to 
generate JavaScript. Think of it as HAML for JavaScript. When you use 
CoffeeScript, it gets compiled into JavaScript before it is served to the 
browser. It's not a framework, although there are some goodies to make certain 
constructions less painful to write, in the end, those painful constructions 
are generated in full (I'm looking at you, for loops). 

In contrast, Prototype extends the JavaScript language to give it those terse 
methods that we love, and under the hood, actually writes a whole shed-load of 
compatibility shims so we don't have to write such defensive code, even when 
faced with the beast that is IE. There is nothing like that in CoffeeScript.

Walter

On Nov 28, 2011, at 3:41 PM, Pablo Aravena wrote:

> Is an object oriented language, and you can combine it with a selector engine 
> like jquery. I think is a good match for a migration, just my point of view.
> 
> Regards
> Pablo
> 
> 
> 
> 
> On Mon, Nov 28, 2011 at 11:57 AM, buda  wrote:
> But it's only new syntax sugar - not framework like Prototype with
> many features!!
> 
> On 28 ноя, 18:48, Pablo Aravena  wrote:
> > Hi buda
> >
> > I think there will be no new releases of prototype in the near future. That
> > is sad, but some months ago I began looking at CoffeScript and I began
> > thinking that it will be the natural replace for prototype library. Also
> > many of the original creators of the prototype library are working on that
> > project.
> >
> > See this presentation:
> >
> > https://sstephenson.s3.amazonaws.com/presentations/fowa-2011-coffeesc...
> >
> > Saludos
> > Pablo
> >
> >
> >
> >
> >
> >
> >
> > On Mon, Nov 28, 2011 at 8:30 AM, buda  wrote:
> > > Who knows when is early code ver.2.0 of the library will appear?
> >
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "Prototype & script.aculo.us" group.
> > > To post to this group, send email to
> > > prototype-scriptaculous@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > prototype-scriptaculous+unsubscr...@googlegroups.com.
> > > For more options, visit this group at
> > >http://groups.google.com/group/prototype-scriptaculous?hl=en.
> 
> --
> You received this message because you are subscribed to the Google Groups 
> "Prototype & script.aculo.us" group.
> To post to this group, send email to prototype-scriptaculous@googlegroups.com.
> To unsubscribe from this group, send email to 
> prototype-scriptaculous+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Prototype & script.aculo.us" group.
> To post to this group, send email to prototype-scriptaculous@googlegroups.com.
> To unsubscribe from this group, send email to 
> prototype-scriptaculous+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/prototype-scriptaculous?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Re: Where is ver. 2.0 is coming?

2011-11-29 Thread Victor
Take a look at RightJS  - it is very close to 
Prototype+Scripty, and (still) has very operative support at Google 
groups 

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/prototype-scriptaculous/-/_PGxK7wwpb8J.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Re: Where is ver. 2.0 is coming?

2011-11-29 Thread Pablo Aravena
Is an object oriented language, and you can combine it with a selector
engine like jquery. I think is a good match for a migration, just my point
of view.

Regards
Pablo




On Mon, Nov 28, 2011 at 11:57 AM, buda  wrote:

> But it's only new syntax sugar - not framework like Prototype with
> many features!!
>
> On 28 ноя, 18:48, Pablo Aravena  wrote:
> > Hi buda
> >
> > I think there will be no new releases of prototype in the near future.
> That
> > is sad, but some months ago I began looking at CoffeScript and I began
> > thinking that it will be the natural replace for prototype library. Also
> > many of the original creators of the prototype library are working on
> that
> > project.
> >
> > See this presentation:
> >
> > https://sstephenson.s3.amazonaws.com/presentations/fowa-2011-coffeesc...
> >
> > Saludos
> > Pablo
> >
> >
> >
> >
> >
> >
> >
> > On Mon, Nov 28, 2011 at 8:30 AM, buda  wrote:
> > > Who knows when is early code ver.2.0 of the library will appear?
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Prototype & script.aculo.us" group.
> > > To post to this group, send email to
> > > prototype-scriptaculous@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > prototype-scriptaculous+unsubscr...@googlegroups.com.
> > > For more options, visit this group at
> > >http://groups.google.com/group/prototype-scriptaculous?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prototype & script.aculo.us" group.
> To post to this group, send email to
> prototype-scriptaculous@googlegroups.com.
> To unsubscribe from this group, send email to
> prototype-scriptaculous+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.