[Prototype-core] Re: C and PHP style syntax to fill an array with values

2008-07-02 Thread Ryan Gahl
See... confusing eh?

:)

but, perhaps funkyTown sets davidHasselhoff to {USA: {fans: [4]}, Germany:
{fans: [9993]}}



On Wed, Jul 2, 2008 at 12:58 AM, Gareth Evans [EMAIL PROTECTED] wrote:

 I think you'll find that method has a fatal flaw,
 You'll lock the browser up because davidHasselhoff is always false.

 Gareth
 On Wed, Jul 2, 2008 at 5:43 PM, Ryan Gahl [EMAIL PROTECTED] wrote:

 No, Jerod... this is the most confusing way ever (note: theMeaningOfLife
 is declared elsewhere):

 var array = new Array();
 function adamSandler(georgeCostanza) {
 var whatTheF = 42;
 array[-whatTheF + theMeaningOfLife] = georgeCostanza;
 }
 var ryanSeacrest = isTodayTuesday() ? 41234522 : 0;
 while (!davidHasselhoff) {
 adamSandler(funkyTown(ryanSeacrest)); //where is this funkyTown method?? I
 want someone to take me to funkyTown! Won't you take me to funkyTown?
 }

 Agreed?

 (yes, i'm tired atm)



 On Tue, Jul 1, 2008 at 8:41 PM, Jerod Venema [EMAIL PROTECTED] wrote:

 That has to be the most confusing way to fill an array EVER.

 On Sun, Jun 8, 2008 at 8:17 PM, tancurrom [EMAIL PROTECTED]
 wrote:


 It's interesting to note that in JavaScript version 1.7, array
 comprehensions allows you do achieve this kind of 'filling' of your
 arrays.

 E.g.

 function range(begin, end) {
  for (let i = begin; i  end; ++i) {
yield i;
  }
 };

 var n = [0 for each (i in range(0,20))]
 // [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]


 info from: http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7

 On Jun 8, 2:44 am, Jay Tee [EMAIL PROTECTED] wrote:
  On Jun 3, 10:06 am, Yanick [EMAIL PROTECTED] wrote:
 
 
 
   Hope this helps. (And if the core folks think this is core worthy, I
   think it could make a pretty addon.)
 
   yanick
 
  You've helped very much!  This particular function has helped me with
  populating grids more than anything else.  It's so much easier to fill
  an array like this than loop or use a literal; especially for
  particularly long arrays :)
 
  Jon




 --
 Jerod Venema
 Senior Software Engineer
 Nth Penguin, LLC
 http://www.nthpenguin.com
 (919) 368-5105
 ---
 WebWidgetry.com / MashupStudio.com
 Future Home of the World's First Complete Web Platform




 --
 Ryan Gahl
 Manager, Senior Software Engineer
 Nth Penguin, LLC
 http://www.nthpenguin.com
 --
 WebWidgetry.com / MashupStudio.com
 Future Home of the World's First Complete Web Platform
 --
 Inquire: 1-920-574-2218
 Blog: http://www.someElement.com http://www.someelement.com/
 LinkedIn Profile: http://www.linkedin.com/in/ryangahl
  



-- 
Ryan Gahl
Manager, Senior Software Engineer
Nth Penguin, LLC
http://www.nthpenguin.com
--
WebWidgetry.com / MashupStudio.com
Future Home of the World's First Complete Web Platform
--
Inquire: 1-920-574-2218
Blog: http://www.someElement.com
LinkedIn Profile: http://www.linkedin.com/in/ryangahl

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype: Core group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: C and PHP style syntax to fill an array with values

2008-07-02 Thread Gareth Evans
Well I suppose davidHasselhoff could be a global [phenomenon]

On Wed, Jul 2, 2008 at 6:03 PM, Ryan Gahl [EMAIL PROTECTED] wrote:

 See... confusing eh?

 :)

 but, perhaps funkyTown sets davidHasselhoff to {USA: {fans: [4]}, Germany:
 {fans: [9993]}}




 On Wed, Jul 2, 2008 at 12:58 AM, Gareth Evans [EMAIL PROTECTED] wrote:

 I think you'll find that method has a fatal flaw,
 You'll lock the browser up because davidHasselhoff is always false.

 Gareth
   On Wed, Jul 2, 2008 at 5:43 PM, Ryan Gahl [EMAIL PROTECTED] wrote:

  No, Jerod... this is the most confusing way ever (note:
 theMeaningOfLife is declared elsewhere):

 var array = new Array();
 function adamSandler(georgeCostanza) {
 var whatTheF = 42;
 array[-whatTheF + theMeaningOfLife] = georgeCostanza;
 }
 var ryanSeacrest = isTodayTuesday() ? 41234522 : 0;
 while (!davidHasselhoff) {
 adamSandler(funkyTown(ryanSeacrest)); //where is this funkyTown method??
 I want someone to take me to funkyTown! Won't you take me to funkyTown?
 }

 Agreed?

 (yes, i'm tired atm)



 On Tue, Jul 1, 2008 at 8:41 PM, Jerod Venema [EMAIL PROTECTED] wrote:

 That has to be the most confusing way to fill an array EVER.

 On Sun, Jun 8, 2008 at 8:17 PM, tancurrom [EMAIL PROTECTED]
 wrote:


 It's interesting to note that in JavaScript version 1.7, array
 comprehensions allows you do achieve this kind of 'filling' of your
 arrays.

 E.g.

 function range(begin, end) {
  for (let i = begin; i  end; ++i) {
yield i;
  }
 };

 var n = [0 for each (i in range(0,20))]
 // [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]


 info from: http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7

 On Jun 8, 2:44 am, Jay Tee [EMAIL PROTECTED] wrote:
  On Jun 3, 10:06 am, Yanick [EMAIL PROTECTED] wrote:
 
 
 
   Hope this helps. (And if the core folks think this is core worthy,
 I
   think it could make a pretty addon.)
 
   yanick
 
  You've helped very much!  This particular function has helped me with
  populating grids more than anything else.  It's so much easier to
 fill
  an array like this than loop or use a literal; especially for
  particularly long arrays :)
 
  Jon




 --
 Jerod Venema
 Senior Software Engineer
 Nth Penguin, LLC
 http://www.nthpenguin.com
 (919) 368-5105
 ---
 WebWidgetry.com / MashupStudio.com
 Future Home of the World's First Complete Web Platform




 --
 Ryan Gahl
 Manager, Senior Software Engineer
 Nth Penguin, LLC
 http://www.nthpenguin.com
 --
 WebWidgetry.com / MashupStudio.com
 Future Home of the World's First Complete Web Platform
 --
 Inquire: 1-920-574-2218
 Blog: http://www.someElement.com http://www.someelement.com/
 LinkedIn Profile: http://www.linkedin.com/in/ryangahl




 --
 Ryan Gahl
 Manager, Senior Software Engineer
 Nth Penguin, LLC
 http://www.nthpenguin.com
 --
 WebWidgetry.com / MashupStudio.com
 Future Home of the World's First Complete Web Platform
 --
 Inquire: 1-920-574-2218
 Blog: http://www.someElement.com http://www.someelement.com/
 LinkedIn Profile: http://www.linkedin.com/in/ryangahl
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype: Core group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Roadmap for 1.6.1 (My take)

2008-07-02 Thread John-David Dalton

I haven't seen the official roadmap for 1.6.1.
So here is my take on it.

1.6.0.3 was a bug fix release.
I see 1.6.1 as an optimization and new feature/API release.

I see things like:

  * Use of documentFragment (Huge IE boost in spots),
  * Use of _each instead of each in places were we can
  * Remove the event onunload mechanism for IE (I have a working
prototype of it)
  * Avoiding wrapped methods internally (Element.method(element)
instead of element.method())
  * Implement hasOwnProperty for Safari 2.0.4 (can finally use it in
the rest of the code)
  * Make $H(...).include() work properly
  * Pass optional conditionals to methods like Element#show,
Element#hide and others)
  * Optimize the Template class.
  * Make Element#getStyle automatically convert units to px and handle
the inherit style.
  * Use of Dimensions class
  * Create various methods where needed:
  - Object.isNodeList()
  - Element#isOrphaned
  - Element#getNumericStyle [cssToNumber]

  * Ajax Fixes:
  - Network error fixes
  - Timeout added
  - Abort added
  - Detect when status 0 is allows (when its ftp or file
protocols)

I am sure I missed a few, but the good news is almost all of these
listed features/modifications have already been programmed. We should
be able to create the tickets and unit tests rather fast.

Do yall have anything else to add?
Here is a list of tickets currently marked to be addressed for 1.6.1
(not nessesarily included in 1.6.1)
http://prototype.lighthouseapp.com/projects/8886-prototype/tickets?filter=page=1q=state%3Aopen+milestone%3A1.6.1

- JDD

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype: Core group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Roadmap for 1.6.1 (My take)

2008-07-02 Thread John-David Dalton

Also utilizing element.ownerDocument more (this will help in
compatibility with iframes).
Maybe a Element#getDocument(), getBodyElement, getRootElement.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype: Core group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Roadmap for 1.6.1 (My take)

2008-07-02 Thread Ken Snyder

Is avoiding document.write() for IE dom:loaded included in 1.6.1?  I 
think the core team concluded that doScroll was the way to go, but I'm 
not sure.

What about fixing String#escapeHTML for IE and WebKit?

What about enhancing Element#siblings to accept a selector? 
(http://groups.google.com/group/rubyonrails-spinoffs/browse_thread/thread/4dd057addb2b0be1/c354acd62c1fbe43?lnk=gstq=siblings+check#c354acd62c1fbe43)

What are the thoughts on adding an Object.isEmpty or 
Object.hasProperties? (http://dev.rubyonrails.org/ticket/10356)

Thanks,

- Ken


John-David Dalton wrote:
 I haven't seen the official roadmap for 1.6.1.
 So here is my take on it.

 1.6.0.3 was a bug fix release.
 I see 1.6.1 as an optimization and new feature/API release.

 I see things like:

   * Use of documentFragment (Huge IE boost in spots),
   * Use of _each instead of each in places were we can
   * Remove the event onunload mechanism for IE (I have a working
 prototype of it)
   * Avoiding wrapped methods internally (Element.method(element)
 instead of element.method())
   * Implement hasOwnProperty for Safari 2.0.4 (can finally use it in
 the rest of the code)
   * Make $H(...).include() work properly
   * Pass optional conditionals to methods like Element#show,
 Element#hide and others)
   * Optimize the Template class.
   * Make Element#getStyle automatically convert units to px and handle
 the inherit style.
   * Use of Dimensions class
   * Create various methods where needed:
   - Object.isNodeList()
   - Element#isOrphaned
   - Element#getNumericStyle [cssToNumber]

   * Ajax Fixes:
   - Network error fixes
   - Timeout added
   - Abort added
   - Detect when status 0 is allows (when its ftp or file
 protocols)

 I am sure I missed a few, but the good news is almost all of these
 listed features/modifications have already been programmed. We should
 be able to create the tickets and unit tests rather fast.

 Do yall have anything else to add?
 Here is a list of tickets currently marked to be addressed for 1.6.1
 (not nessesarily included in 1.6.1)
 http://prototype.lighthouseapp.com/projects/8886-prototype/tickets?filter=page=1q=state%3Aopen+milestone%3A1.6.1

 - JDD

 

   


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype: Core group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Roadmap for 1.6.1 (My take)

2008-07-02 Thread Gareth Evans
Automagical stopObserving on update/remove?

Event delegation modification in core (so you can attach delegated events to
observe instead of having to write the same document.observe pattern with a
series of if-s and element.match(cssSelector)?

Gareth
On Thu, Jul 3, 2008 at 9:51 AM, kangax [EMAIL PROTECTED] wrote:


 +1 for hasProperties/isEmpty
 I would also want to see #setProperty.

 Ken, which #escapeHTML fix are you talking about? We actually made few
 changes in a current trunk.

 Besides what was mentioned:

 - deprecate Try.these
 - deprecate Array#reduce (for compatibility with FF3+)
 - update String#isJSON

  -- kangax


 On Jul 2, 4:34 pm, Ken Snyder [EMAIL PROTECTED] wrote:
  Is avoiding document.write() for IE dom:loaded included in 1.6.1?  I
  think the core team concluded that doScroll was the way to go, but I'm
  not sure.
 
  What about fixing String#escapeHTML for IE and WebKit?
 
  What about enhancing Element#siblings to accept a selector?
  (http://groups.google.com/group/rubyonrails-spinoffs/browse_thread/thr..
 .)
  
  What are the thoughts on adding an Object.isEmpty or
  Object.hasProperties? (http://dev.rubyonrails.org/ticket/10356)
 
  Thanks,
 
  - Ken
 
  John-David Dalton wrote:
   I haven't seen the official roadmap for 1.6.1.
   So here is my take on it.
 
   1.6.0.3 was a bug fix release.
   I see 1.6.1 as an optimization and new feature/API release.
 
   I see things like:
 
 * Use of documentFragment (Huge IE boost in spots),
 * Use of _each instead of each in places were we can
 * Remove the event onunload mechanism for IE (I have a working
   prototype of it)
 * Avoiding wrapped methods internally (Element.method(element)
   instead of element.method())
 * Implement hasOwnProperty for Safari 2.0.4 (can finally use it in
   the rest of the code)
 * Make $H(...).include() work properly
 * Pass optional conditionals to methods like Element#show,
   Element#hide and others)
 * Optimize the Template class.
 * Make Element#getStyle automatically convert units to px and handle
   the inherit style.
 * Use of Dimensions class
 * Create various methods where needed:
 - Object.isNodeList()
 - Element#isOrphaned
 - Element#getNumericStyle [cssToNumber]
 
 * Ajax Fixes:
 - Network error fixes
 - Timeout added
 - Abort added
 - Detect when status 0 is allows (when its ftp or file
   protocols)
 
   I am sure I missed a few, but the good news is almost all of these
   listed features/modifications have already been programmed. We should
   be able to create the tickets and unit tests rather fast.
 
   Do yall have anything else to add?
   Here is a list of tickets currently marked to be addressed for 1.6.1
   (not nessesarily included in 1.6.1)
  http://prototype.lighthouseapp.com/projects/8886-prototype/tickets?fi.
 ..
  
   - JDD
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype: Core group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---