« first day (99 days earlier)      last day (4843 days later) » 

12:32 AM
lol
 
Tek
12:43 AM
@ircmaxell pssst, could use your help in the PHP room :D
 
there
 
hey guys
 
Tek
sup
 
 
2 hours later…
2:51 AM
1
Q: Can someone explain this behavior in javascript?

mikeTested in Firefox: a = [] + 0; b = 0; alert(a); // 0 alert(b); // 0 alert(!a); // false alert(!b); // true

 
@ircmaxell Using typeof, the first is cast into a string, not a Number
 
yeah, I figured something like that...
makes sense as long as you know the type juggling semantics
"0" is false in PHP
since (int) "0" is also false (it's reasonably consistent in its fubar nature)
to prevent something like this
 
 
3 hours later…
6:25 AM
Hello, anyone active?
 
6:47 AM
Hello
 
Hi
 
Hey Cyan
 
Whats up?
 
7:06 AM
im active. hi
 
I'm trying to make a js html5 game
 
 
9 hours later…
3:59 PM
Don't you just hate it when a fairly clever answer gets accepted but gets no upvotes... Especially when there are a bunch of other answers and at least one upvote out there
0
A: Will re-populating a password field in a form be a security issue?

ircmaxellOne option if you want to do this, is not actually send the password plain-text, but a random token. Since it's a password field, the user won't be able to tell (except for the length). Then, store the hashed password and token in the session. When the user submits the form, if the password fi...

^ that one specifically
 
+1 then, but don't expect much else from me today, I'm having a really bad day -.-"
 
that's not good
sorry to hear that
 
worst thing I still have a ton of stuff to do till tomorrow -.-
 
that sucks
 
Indeed, I got part of it done already guess I'll take another shower now... maybe I'm a bit more awake afterwards
 
4:12 PM
papers? Code?
 
I need to do some color scheme / design stuff
 
ahh
stuff I suck at
 
do some research on some possible job finding scenarios for that job finding coaching I'm taking
I suck just as bad...
and I need to finally get back to correcting the Garden
 
ahhh
 
git does an incredible bad job at merging markdown files...
I found a crap ton of errors when reading through it on paper
Halfway through now, page 13 of 25
 
4:16 PM
wow
 
Also found some other stupid flaw with function arguments yesterday
So I'll have to add that to the guide
basically function bla(foo){arguments[0]} foo and arguments[0] are the exact same thing...
changing one will chance the other...
 
reference
I thought that JS didn't have a concept of references...?
 
It doesn't for 99.9% of the time
this is the other 0.1% then...
 
that is stupid
 
Indeed
 
4:19 PM
but good to know so that I can build a fubar hacking reference system
 
:D
I was refactoring some code yesterday and thought "hey you can get rid of that tenary by just setting the first argument to an empty object in case of XYZ"
and all of a sudden all unit tests failed...
anyways I'll head to the shower now, and then I need to find something edible...
and then do the color stuff -.-"
 
peace
and good luck
 
I still have half of tomorrow so I should be able to make it in time
 
 
2 hours later…
6:10 PM
color thing halfway done
lots of shades of green but looks kinda nice now
way better than that yellow
still needs some clearer separators / lines here and there but I need some feedback first
 
When you mark a checkbox how can i window.locate on click/mark?
 
6:44 PM
@ircmaxell JS has no concept of references… apart from for arguments and named parameters. And this is yet another reason why doing anything with the arguments object almost always makes the function way slower to execute
@IvoWetzel Where's a copy of the JS thing you were writing?
 
Still WIP, I'm doing copy editing atm
 
Oh yay, another case of a fixed-width design and my browser window being too small :)
 
@gsnedders I wanted fluid
You have to flame @YiJiang about that
he did the CSS
 
@IvoWetzel Under "Deleting properties", I'd end the first clause with either a semi-colon or a full-stop, and make it clear that you're then going on to make another only tangentially related comment.
 
indeed that makes sense
 
6:52 PM
@IvoWetzel "Notation of keys" is entirely wrong under ES5, and Firefox 4, IE9, Chrome I-don't-know-what-version-now, and WebKit nightlies all allow that.
 
the guide is not about ES5 so far
I should add a note about that in the intro
But I always forget that
 
@IvoWetzel It is however untrue if you try the example in Firefox 4, though, which seems bad.
@IvoWetzel The examples should give the same results as what is given in the latest browsers
 
And then people write that code and it breaks in some older browser :/
I should add notes about the ES5 stuff I guess
 
Just say something like, "Prior to ES5, and [list of UA/versions], this threw SyntaxError."
@IvoWetzel The built-in Object prototype object isn't necessarily the top of the prototype chain, and you can have circular prototype chains.
 
Hi all, Is there no room for Java?
 
6:56 PM
@gsnedders Hm, did I read the spec wrong?
@JamieKeeling There should be, but I doubt that it's very active
 
@IvoWetzel Yeah, I just saw the spec said you couldn't. I'm fairly certain it is possible in real impls, at least, though
@IvoWetzel Oh, right, the fact you can set proto makes it possible
(Though there has been talk about making <code>__proto__</code> have the attribute [[Writable]]: false)
 
I for one don't mess with proto
 
Almost nothing does, thus the talk of making it [[Writable]]: false (as otherwise it would break the web)
 
fair enough
 
@IvoWetzel s/tying/trying/
 
7:04 PM
@gsnedders Where?
 
@IvoWetzel "The lookup time for properties that are high up on the prototype chain can have a negative impact on performance critical sections of code." — some note about premature optimization would be nice
Just after that quote
 
@IvoWetzel Darn, I need some help with some MIDI programming through java that's all =[
 
@IvoWetzel Also, per spec, there's no such thing as the function statement, only function declarations
 
Then I'll have to change the wording
 
7:07 PM
(All browsers support function declarations as statements, though with marginally different semantics)
 
do() || !do(), try() <-- fatal error, try() not found
+4 till repcap, but I don't think it'll happen today...
 
@gsnedders What exactly would you write as note for premature optimization there?
 
7:24 PM
@IvoWetzel Dunno.
 
Guess I have to think about that a bit then, hard to come up with something out of nowhere
 
That's what I concluded trying to come up with sometihng.
*something
Some note about it being unlikely to be the bottleneck in most practical applications?
 
Yes, I guess that would make sense
Or rewrite that paragraph
What I wanted to express there was that one shouldn't create a 50 object long prototype chain just because it's possible
 
Gmail does.
And performance is a big consideration for a lot of those large Google applications, yet they have long prototype chains.
 
7:31 PM
I don't know how long the longest prototype chain in Gmail is, but definitely over 20 objects in it.
curses at Dojo doing UA sniffing and having broken Opera-specific code-paths when the generic code-path would work fine for Opera…
@IvoWetzel For this, I'd also mention Function.prototype.bind
 
@gsnedders Hm, needs to be marked as ES5 then... so either, I make the Guide ES5 all the way through or I mark the ES5 parts
 
@IvoWetzel I'd mark the ES5 parts, and say what UAs support that part of ES5
 
(function(){alert('test');})()
 
Then the question is, how to mark them... @YiJiang your job!
 
@IvoWetzel I'd also note for the arguments object that even causing it to be created is expensive; if it at all possible, stuff should be done with formal parameters.
 
7:39 PM
@gsnedders Yes, a conclusion section is missing there, also a note about argument[0] being the exact same thing as the first formal parameter
 
@IvoWetzel That kills perf even more :)
 
and comes out of nowhere
arguments[0] = {}; and now your first formal parameter is also {} ...
 
Does anyone know of a good way to do polling to refresh client data? Fixed time intervals haven't seemed to scale too well for me.
Is there a <cringe> jQuery plugin </cringe> that performs the task?
 
@IvoWetzel "If the function that was called has no explicit return statement, then it implicitly returns the value of this (the new object). Otherwise it returns the value of the return statement" needs added to it " if the return value is an object".
@IvoWetzel s/don not/do not/
 
0
Q: ContentFlow (coverflow) - Need to make it work + Tabs and panes

WillingLearnerIm using this plugin: http://www.jacksasylum.eu/ContentFlow/ Here is my test site: http://flexbeltsite.info/TestPages/ This is the main index file, which is loading http://flexbeltsite.info/TestPages/_Page3.html 1) The page that contains the contentFlow. As you can see when you go to the i...

 
7:46 PM
@IvoWetzel You ought to differentiate between the [[Prototype]] internal property and the "prototype" property on objects.
@IvoWetzel e.g., at "The prototype of this new object is set to the prototype of the function object that was called."
@IvoWetzel Equality and comparisons should note the two special cases: NaN and ±0.
 
@gsnedders hey bro do you think you can help me?
 
@WillingLearner I can't really claim to know much about jQuery, sorry.
 
ok cool
@gsnedders what about IvoWetzel?
 
@IvoWetzel Also, I wouldn't mention "new {String,Number, Boolean}" at all, apart from saying you shouldn't ever use them :)
@IvoWetzel "And while recent JavaScript engines may apply optimization in this case, there is no way of telling whether the code will run on one of these newer engines or not." — they do? I guess V8 might, but I can't think of anything else that has any sort of loop-invariant code-motion
 
@gsnedders FX4 seems to do these optimizations
But that's only judging from jsperf benchs...
 
7:54 PM
@IvoWetzel Also for arrays I'd make it very, very, very clear that they're just normal objects, and that the only magic about them is when setting length (which can truncate/extend the uint32 properties on the object) and when setting a property whose name is a uint32 value (which can change length).
 
@gsnedders the "don not" is fixed, I pushed an update to the page in the meantime
 
@IvoWetzel "which not happens"
 
Haven't read through my printed version of anything after scopes at the moment
 
@IvoWetzel [[Class]] can be equal to anything for host objects pretty much
 
You mind writing an issue at github with all the stuff you found/find? I'm quite tired right now
 
7:57 PM
Okay :)
 
I'll happily fix all of that in the next days then :)
and in case you're really after it, I can give you commit rights if you want to provide fixes that way
 
That means actually being partly responsible for it in case people bitch about it :)
 
@gsnedders I'll add a note about the host object thing
 
I have some suspicion that even excluding host objects that isn't true for IE
 
I took the stuff from the spec ._.
;_;
 
8:06 PM
Plenty of stuff in JS in the real world doesn't follow the spec.
 
I know
But I don't want to have a quirksgarden.org
 
@IvoWetzel How many of the issues I've mentioned earlier do you want me to file bugs on? All of them?
 
@gsnedders Hm, guess you could make one about typos and others for additions / changes
so the [[prototype]] thing one, the arguments slowing down everything thing one
So they can be marked fixed or discussed if needed
 
Yeah, okay
 
 
3 hours later…
11:39 PM
Any there who is aware of new facebook javascript SDK
 

« first day (99 days earlier)      last day (4843 days later) »