Cossano: Testerbit, websockets or polling a json api that supports ‘since’ operations
Defusco: Tcsc: any reason you use for var i = 0, l = entities.length; i l; ++i
Defusco: Instead of for var i = 0; i entities.length; ++i ? Just curious
Stathopoulos: Baxx, it’s some thing that used to almost matter for performance in like Ie5.5
Fahrendorff: If I create a div onclick event that has a clearTimeoutblah however the value of blah is null at that point – is this a good place to use eval, or is there a better way around my solution?
Allaire: Fiorito: What do you mean that it is gone? Both Firefox and chrome have a back/forward button.
Dirr: Baxx so it doesn’t have to calculate the length for every iteration
Ploch: Baxx, mostly people just thought it would improve performance
Defusco: Yeah that makes sense
Simonin: Ankr, that doesn’t happen anyway
Defusco: GreenJello: so the evaluation doesn’t occur on every iteration , just at the start and it’s cached
Petzold: Yeah, it’s called loop invariant code motion
Baeskens: But also I’m pretty sure engines store length at update time, not on access
Defusco: It’s got a snazzy name
Brumsey: Tcsc: canvas2 is really cool, neat break from using ncurses lol
Castellanos: GreenJello, do you have a link to working with since operations?
Elvis: Baxx: uh, for that it doesn’t matter
Elvis: But if i add to entities during the iteration
Elvis: I won’t go over the added entities
Elvis: Also yeah it might have a slight performance difference
Cowie: Testerbit, it’s pretty simple, you just ask the server if it has new data since the last time you got new data
Elvis: For this it won’t matter
Defusco: If entities increases it’s still bound by the value that is was going into the loop
Dagle: You p*** it as a parameter to the request, and if there’s nothing new, it returns an empty array
Elvis: Sometimes you want that behavior soemtimes you wouldn’t.
Marsicek: Adding items to arrays in loops is very confusing
Elvis: It’s sort of a necessary evil in a game though.
Elvis: Although I’ve done a double-buffering system where i had two lists of entities, and i swapped them during iteration
Elvis: So that modifications would go into a different array than i’m iterating over
Garbacz: Promise.all often returns a bunch of vastly different data that can’t really be described with a single keyword. Is there a common name to give the variable returned by it?
Elvis: That ends up causing more issues than it prevents though
Formby: Gillice, a promise :-
Nicely: GreenJello: heh? :p I mean the variable it spits out, the array of resolved promises
Knotek: It feels silly to just call it ‘results’ or something
Brandner: Gillice, sometimes results is a fitting name.
Elvis: Name all your variables only using the _ character.
Mccuaig: Though results implies you have the results
Alcott: The results of the promise should be in that
Jalbert: Var ___ = __ + __________
Chall: I guess ‘data’ is another option
Rought: But it’s not very descriptive, I guess you can’t really be descriptive
Elvis: Obligatory http://jsfiddle.net/y605c6L6/
Aquero: Tcsc: needs more ****butt
Elvis: Reformatting it so that it looks like ****butt is an exercise left to the reader
Gioia: Hmm, what is the etiquette for using var bla; var blub; versus using var bla, blub?
Noke: Gillice, Whichever one you like more.
Matthees: In the previous initiation of this application I had all my dependencies listed with commas