[Prototype-core] Re: iterable/$A

2007-08-31 Thread Samuel Lebeau
On 8/31/07, Nicolás Sanguinetti [EMAIL PROTECTED] wrote: As discussed in http://redhanded.hobix.com/inspect/showingPerfectTime.html String.prototype.replace with a callback is broken in Safari (at least up until v2). Ah yes, the Safari issue. Why not simply do : var $A =

[Prototype-core] Re: Element.update on images. Bug or Feature Request?

2008-01-27 Thread Samuel Lebeau
Hi, I just made a really simple benchmark: var d = new Date; /* Prototype 1.6.0.1 entire source code */ alert(new Date - d); On my macbook it alerts (in milliseconds) : 6 in Safari 3 12-13 in Firefox 2 12-20 in Opera 9 Is Prototype initialization a bottle-neck ? I definitely don't think

[Prototype-core] Late binding for contextual iterators (patch advertisement)

2008-03-03 Thread Samuel Lebeau
I just added some benchmarks here : http://dev.rubyonrails.org/attachment/ticket/11264/enumerable_benchmarks.html This file goes in test/unit with original non-patched Prototype version. It only benchmarks each with empty function as iterator and here are some results : without context,

[Prototype-core] Re: Integrating PDoc in Prototype

2008-12-14 Thread Samuel Lebeau
Actually, both protodoc [1] and Rakefile [2] are patched in this commit. Protodoc takes an option hash on instantiation, with a `:strip_documentation` which defaults to `false`. `rake dist` behavior is unchanged, and `rake doc` uses a temporary file including PDoc comments to generate

[Prototype-core] Using String#replace instead of String#gsub internally

2009-04-01 Thread Samuel Lebeau
Hello there, I've been working on fixing String#replace with a function replacement in an ECMAScript 262-3.1 compliant way. Unfortunately, MultiSafari is not working on my setup anymore so I cannot test it against Safari 2.0.4 which seems to be the only buggy browser regarding this issue.

[Prototype-core] Re: Help passing values to listener function for AJAX

2009-05-31 Thread Samuel Lebeau
Hello, This list is reserved for development purposes but you could ask your question on the Prototype-Scriptaculous list. http://groups.google.com/group/prototype-scriptaculous Thanks for your understanding. Best, Samuel. On 31 mai 09, at 20:18, js_dev wrote: Hello, I have a function

[Prototype-core] Re: Element.fire - Starck Overflow

2009-07-21 Thread Samuel Lebeau
Firing an event inside a handler can cause stack overflow if the handler is observing events from the same type. Even in more complex cases like (pseudocode) : observe(a, fireBEvent) observe(b, fireAEvent) fireAEvent(); // - stack overflow Envoyé depuis mon téléphone / Sent from my

[Prototype-core] Re: Template Class

2009-08-25 Thread Samuel Lebeau
Hi, I've been working on a Template rewrite trying to reduce code size and complexity. It uses `String#replace` instead of `String#gsub` and thus performs better. Do you guys see any enhancements (in terms of performance or code size) that could be made ? Diff:

[Prototype-core] Re: Javascript errors in Ajax callbacks are not being reported to console.

2009-08-25 Thread Samuel Lebeau
Hi Luisgo, From what I remember you're absolutely right and this could be quite annoying when debugging an application. Ajax API provides a `onException` callback/responder but exception is silently ignored when none is provided. [1] I guess a less-surprising behavior would be to re-throw

[Prototype-core] True Hashes using objects as keys

2009-09-11 Thread Samuel Lebeau
Hi, I think it's indeed a good feature to discuss for 2.0. I've been working on this too and had quite reasonable performance when using a hash function that avoids collision. The simplest implementation consists in storing array of [key, value] tuples indexed by `key.toString()` in a

[Prototype-core] Re: Suggestion: String#isEmpty instead String#empty

2009-10-02 Thread Samuel Lebeau
I totally agree. `Array#isEmpty` would be useful too. Maybe we should rename those methods and deprecate the original names in 1.7. Best, Samuel. 2009/10/2 Allen Madsen bla...@gmail.com I'd prefer isEmpty as well. Allen Madsen http://www.allenmadsen.com On Fri, Oct 2, 2009 at 3:34 PM,