Mochabot log - CommonJS IRC channel: #commonjs on irc.freenode.net

2009-12-23:

[12:16am] <hassox_ is now known as hassox.
[01:04am] <hassox_ is now known as hassox.
[01:22am] <hassox_ is now known as hassox.
[11:07am] <spoob> Damn, switching the engine back to Rhino makes me think of the Java knock-knock joke... "who's there?" "...... . ..... .... ... Java".
[11:11am] <tlrobinson1> hehe yeah the jvm startup time is particularly bad
[11:37am] <Dantman> That's why we don't use CGI
[2:44pm] <Dantman> Yay, http://code.google.com/p/chromium/issues/detail?id=20144#c10
[2:46pm] <Dantman> Can't remember if Rhino still doesn't. But looks like v8 is going to follow the same object property order pattern that the rest of the engines follow.
[2:48pm] <ondras> Dantman> actually, your comment in that issue seems irrelevant
[2:48pm] <ondras> because noone was questioning Array iteration
[2:48pm] <ondras> I believe that they were experiencing non-defined iteration order when some of the (iterated) properties were arrays, nothing more
[2:49pm] <ashb> also ES5 mandates an opder now
[2:50pm] <ondras> nice
[2:50pm] <ondras> so the looping order == definition order, okay?
[2:52pm] <ashb> think soi
[2:52pm] <ashb> let me check that
[2:55pm] <ashb> hmmm where would it bee..
[2:56pm] <ashb> ah perhaps not
[2:56pm] <ashb> Object.keys says:
[2:56pm] <ashb> If an implementation defines a specific order of enumeration for the for-in statement, that same enumeration order must be used in step 5 of this algorithm.
[2:56pm] <ashb> so its not required, but most platforms do
[2:58pm] <ondras> hm, so it is basically the same as es3
[2:58pm] <ashb> 'The mechanics and order of enumerating the properties (step 6.a in the first algorithm, step 7.a in the second) is not specified.'
[2:58pm] <ashb> thats about for .. in
[2:58pm] <ashb> so yeah, not specified
[2:58pm] <ashb> probably at v8's urging
[2:58pm] <ondras> more anti-v8 activists!
[2:58pm] <ondras>
[2:59pm] <? ondras wonders if he ever written some code which would fail with non-defined order
[2:59pm] <ashb> i know i have
[2:59pm] <ondras> baaad ashb!
[3:04pm] <Dantman> You get stuff written in the browser that looks strange since it's data stored in an object that ends up differently ordered.
[3:07pm] <ondras> one can say the same about a lottery wheel
[3:10pm] <spoob> defined order sounds like a desirable condition, but it would be very slow for structures that can be iterated but not in order.
[3:10pm] <spoob> for example; iterating through a hash or binary tree
[3:11pm] <spoob> (yes, I know how to traverse binary tree in-order. Foot. Blam!
[3:58pm] <ryah is now known as ryah_away.
[4:01pm] <Dantman> spoob, We're only talking about plain no-frills objects... There shouldn't be anything stopping you from creating specialized optimized Set, Hashtable, etc... structures.
[4:01pm] <Dantman> Actually, I'd kind of like those
[4:02pm] <Dantman> Sometimes when doing algorithmic stuff I run into a case where I'd like to have a Set, but have to deal with an array since I can't hack it with an object since my data isn't string based.
[4:02pm] <Dantman> Or may have values that conflict with js special cased properties
[4:03pm] <spoob> Dantman; I mean that having the requirement for guaranteed ordering on iteration could be computationally expensive for some kinds of randomised data structures
[4:04pm] <spoob> hence leaving that bit out, resulting in v8 engines being particularly bizarre.
[4:05pm] <? Dantman still would like some of the various types of collections
[4:21pm] <gmosx_> hello
[5:55pm] <Wes-> dantman> you could explore this technique:
[5:55pm] <Wes-> const ballSet = { basket> void 0, base> void 0, bowling> void 0 }
[6:03pm] <inimino> Wes-> I think that's what "can't hack it with an object since my data isn't string based" was about
[6:04pm] <Wes-> frankly that didn't make sense to me
[6:04pm] <Wes-> arrays *are* objects
[6:05pm] <ashb> i think it was about cant store the object in the keys object keys are only strings
[6:06pm] <inimino> right
[6:06pm] <Wes-> but then he couldn't store the key in an array either
[6:07pm] <ashb> [{sure> "could"}]
[6:07pm] <Wes-> right, the key in that case is 0
[6:07pm] <inimino> right, that's the idea
[6:08pm] <Wes-> So he wants sets of objects, ah
[6:08pm] <Wes-> I was still thinking of pascal sets
[6:45pm] <RayMorgan_ is now known as RayMorgan.
[6:46pm] <ryah_away is now known as ryah.
[10:00pm] <MisterN_ is now known as MisterN.

 

 

Logs by date :