[jQuery] Re: Library showdowns

2007-04-19 Thread Scott Sauyet
Nathan Young -X (natyoung - Artizen at Cisco) wrote: > If I understand your problem statement this is something I'd currently > solve using closures, is there a way that using currying is > fundamentally different or is it a different way of thinking about the > same problem? At the risk of cont

[jQuery] Re: Library showdowns

2007-04-19 Thread Nathan Young -X \(natyoung - Artizen at Cisco\)
t;Nathan From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rhapidophyllum Sent: Tuesday, April 17, 2007 6:36 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Library showdowns There are some situations when you

[jQuery] Re: Library showdowns

2007-04-18 Thread Christof Donat
Hi, > > Currying doesn't give you > > > > float function(float a) { return mycallback(a,42); } > > Of course it does, you just have to clever. > > let us say you have this function: > divide = function(a){ return function(b){ return a/b; }} > > If you want to create the function a/3 you can do th

[jQuery] Re: Library showdowns

2007-04-18 Thread Sean Catchpole
On 4/18/07, Christof Donat <[EMAIL PROTECTED]> wrote: Currying doesn't give you float function(float a) { return mycallback(a,42); } Of course it does, you just have to clever. let us say you have this function: divide = function(a){ return function(b){ return a/b; }} If you want to create t

[jQuery] Re: Library showdowns

2007-04-18 Thread Christof Donat
Hi, > There are some situations when you can only pass a variable referring > to a function; with a curry function you can pass a variable that > refers to a function + arguments. That is not a big problem with annonymous functions: takingAFunction(function(a){return mycallback(5,a)}); That is

[jQuery] Re: Library showdowns

2007-04-17 Thread Rhapidophyllum
at Cisco)) wrote: Hi. Can you describe a problem whose solution becomes much easier by using currying? ->Nathan From: jquery-en@googlegroups.com [mailto:jquery- [EMAIL PROTECTED] On Behalf Of Sean Catchpole Sent: Monday, April 16, 2007 8:17 PM To: jquery-en@googlegroups.com Subject

[jQuery] Re: Library showdowns

2007-04-17 Thread Nathan Young -X \(natyoung - Artizen at Cisco\)
ery-en@googlegroups.com Subject: [jQuery] Re: Library showdowns Jeffrey and Glen, Allow me to explain currying. Imagine if you will the following function (written in javascript) add = function (a,b) { return a+b } I can now call add(

[jQuery] Re: Library showdowns

2007-04-17 Thread Rhapidophyllum
Dojo has a curry function. On Apr 17, 2007, at 8:30 AM, Klaus Hartl wrote: Glen Lipka schrieb: On 4/16/07, *Sean Catchpole* <[EMAIL PROTECTED] > wrote: Interesting find Karl, Thanks I'm still trying to see if I can find a graceful way to implement curr

[jQuery] Re: Library showdowns

2007-04-17 Thread Scott Sauyet
Sean Catchpole wrote: However, this can only be done through a tedious declaration of the function (all those return functions) and then the (arg1)(arg2)(...) format isn't the best. So I've been working on a curry function that will change any function in a curried one. I'll post it on the new

[jQuery] Re: Library showdowns

2007-04-17 Thread Sean Catchpole
Actually, I think this is quite easy in Javascript. If you look at the code listings in the Wikipedia article [1], Javascript has more succinct code than anything but scheme, and scheme's advantage mostly has to do with it's simpler syntax for functions. -- Scott [1] http://en.wikipedia.org/

[jQuery] Re: Library showdowns

2007-04-17 Thread Scott Sauyet
Sean Catchpole wrote: > [ ...] add = function (a) { return function (b) { return a+b } } Now I can call add(3) and it will return function (b) { return 3+b } [W]e can now call add(3)(7) and it will return 10. And more to the point, you can store and use the function returned by the call to ad

[jQuery] Re: Library showdowns

2007-04-17 Thread Klaus Hartl
Glen Lipka schrieb: On 4/16/07, *Sean Catchpole* <[EMAIL PROTECTED] > wrote: Interesting find Karl, Thanks I'm still trying to see if I can find a graceful way to implement curried functions, but that method is elegant in it's own sense. ~Sean Doe

[jQuery] Re: Library showdowns

2007-04-16 Thread Sean Catchpole
Jeffrey and Glen, Allow me to explain currying. Imagine if you will the following function (written in javascript) add = function (a,b) { return a+b } I can now call add(3,7) and it will return 10. A language that allows currying would allow me to pass only one variable and it would return a new

[jQuery] Re: Library showdowns

2007-04-16 Thread Brandon Aaron
I believe Interface has added the ability to stop and maybe pause. The last time I played with Dojo it was able to pause an animation but that was a while back. YUI and Scriptaculous ... I'm not sure off hand. I'd have to venture into their docs/source. -- Brandon Aaron On 4/16/07, Brian Cherne

[jQuery] Re: Library showdowns

2007-04-16 Thread Glen Lipka
On 4/16/07, Sean Catchpole <[EMAIL PROTECTED]> wrote: Interesting find Karl, Thanks I'm still trying to see if I can find a graceful way to implement curried functions, but that method is elegant in it's own sense. ~Sean Does this have something to do with Indian food? Seriously though, if

[jQuery] Re: Library showdowns

2007-04-16 Thread Jeffrey Kretz
ry-en@googlegroups.com Subject: [jQuery] Re: Library showdowns Interesting find Karl, Thanks I'm still trying to see if I can find a graceful way to implement curried functions, but that method is elegant in it's own sense. ~Sean

[jQuery] Re: Library showdowns

2007-04-16 Thread Brian Cherne
There's got to be someone on the list who knows of something jQuery can't do that Scriptaculous, YUI or Dojo can do. For instance, does any know if another library can cancel/freeze/stop an animation that is in progress? Brian. On 4/16/07, Sean Catchpole <[EMAIL PROTECTED]> wrote: Interesting

[jQuery] Re: Library showdowns

2007-04-16 Thread Sean Catchpole
Interesting find Karl, Thanks I'm still trying to see if I can find a graceful way to implement curried functions, but that method is elegant in it's own sense. ~Sean

[jQuery] Re: Library showdowns

2007-04-16 Thread Karl Rudd
Do you mean something like this?: http://www.dustindiaz.com/javascript-curry/ Karl Rudd On 4/17/07, Sean Catchpole <[EMAIL PROTECTED]> wrote: Jake, Here's a problem that jQuery can't do. It doesn't support Curried Functions. Now that's not really fair because javascript does not supp

[jQuery] Re: Library showdowns

2007-04-16 Thread Sean Catchpole
Jake, Here's a problem that jQuery can't do. It doesn't support Curried Functions. Now that's not really fair because javascript does not support curried functions either. http://en.wikipedia.org/wiki/Curried_function But I can think of a way that one could hack the same effect, can you?

[jQuery] Re: Library showdowns

2007-04-16 Thread Ⓙⓐⓚⓔ
Make a challenge that you, personally, can't do in jQuery, and you assume folks can't do it with other libraries! That would be a challenge! -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ

[jQuery] Re: Library showdowns

2007-04-16 Thread Glen Lipka
On 4/16/07, Brian Cherne <[EMAIL PROTECTED]> wrote: This is a great idea... and very useful comparison... it might be interesting to see more tasks that are common in DHTML programming: - how to infuse ajax content into a dom element - how to create a tabbed interface (what files, what markup,

[jQuery] Re: Library showdowns

2007-04-16 Thread Brian Cherne
and use those?! - Original Message From: Mike Alsup <[EMAIL PROTECTED]> To: jquery-en@googlegroups.com Sent: Monday, April 16, 2007 3:53:17 AM Subject: [jQuery] Re: Library showdowns Hi Glen, I can't think of any specific challenges right now but I think this is a cool idea. Mike

[jQuery] Re: Library showdowns

2007-04-16 Thread Ariel Jakobovits
Me, too. Maybe just keep an eye on the questions people ask on the list and use those?! - Original Message From: Mike Alsup <[EMAIL PROTECTED]> To: jquery-en@googlegroups.com Sent: Monday, April 16, 2007 3:53:17 AM Subject: [jQuery] Re: Library showdowns Hi Glen, I can'

[jQuery] Re: Library showdowns

2007-04-16 Thread Mike Alsup
Hi Glen, I can't think of any specific challenges right now but I think this is a cool idea. Mike On 4/15/07, Glen Lipka <[EMAIL PROTECTED]> wrote: I started a site to expand upon the idea of the zerba challenge. http://js.commadot.com (I decided not to regsiter jsframeworks.com) Side note:

[jQuery] Re: Library showdowns

2007-04-15 Thread BKDesign Solutions
PHAT? Must mean...ummm... Powerful Hot Amazing Tremendous? Bruce P bkdesign solutions - Original Message - From: Ariel Jakobovits To: jquery-en@googlegroups.com Sent: Sunday, April 15, 2007 10:54 PM Subject: [jQuery] Re: Library showdowns JQUERY IS PHAT

[jQuery] Re: Library showdowns

2007-04-15 Thread Ariel Jakobovits
JQUERY IS PHAT!!! - Original Message From: Glen Lipka <[EMAIL PROTECTED]> To: jquery-en@googlegroups.com Sent: Sunday, April 15, 2007 5:54:56 PM Subject: [jQuery] Library showdowns I started a site to expand upon the idea of the zerba challenge. http://js.commadot.com (I decided not to