« first day (443 days earlier)      last day (4488 days later) » 
02:00 - 21:0021:00 - 00:00

2:03 AM
RT @FirefoxNightly: Impl. of DOM3 composition events progress! In next Nightly, an input event is fired after a compositionupdate one: h ...
 
2:15 AM
RT @mahemoff: Audio in the small: @danja has completed first draft of a Web Beep spec and a sweet demo too. http://webbeep.it/
 
2:39 AM
RT @maccman: Scrollorama - just awesome: http://johnpolacek.github.com/scrollorama/
 
2:51 AM
RT @GoMugeda: New Mugeda tutorial video: mask animation. http://www.youtube.com/watch?v=ePcqT--29GU
How-tos for Mugeda online animation tool at http://www.youtube.com/results?search_query=Mugeda%3BHTML5%3Banimation%3B&search=tag include path animation, image tracing, exporting animations, camera effects
 
3:03 AM
RT @mikaelemtinger: impress your audience with impress.js - a #prezi inspired CSS3 presentation framework by @bartaz http://bartaz.github.com/impress.js
 
3:27 AM
“@mikewest is doing awesome screencasts about how to create accessible websites” @silviapfeiffer https://plus.google.com/101282388769226463366/posts/izYP5Anykjr ht @Paul_Kinlan #w15y
 
 
1 hour later…
4:55 AM
RT @hij1nx: test code across a number of major browsers using a few simple lines of code in nodejs https://gist.github.com/1548949
send JS test to http://testling.com via to run in multiple browsers & get results (from @substack ht @hij1nx) also http://browserling.com
 
5:20 AM
if anyone can respond to this, that would be great:
0
Q: red error message when trying to update google visualizations chart

JohnMerlinoI want to be able to update the line chart of google visualizations. My code was inspired by this stackoverflow post: Trying to update a google visualization using jquery Here is my code in question: http://jsfiddle.net/johnmerlino/YCqyG/ Basically, the first time chart loads, it loads fine. ...

all relevant code is linked in jsfiddle
 
6:13 AM
0
Q: JavaScript Code Quality

JeffN825I decided to put together a quick project using the Kendo UI HTML 5 framework and JavaScript. I don't do much JavaScript development and I'd like some input on how to make this look less like a complete spaghetti hack, walking up and down DOM elements, trying to find the right event handler to ...

 
7:08 AM
hi any one der??
hey i need help is anyone der??
 
7:43 AM
I'm slightly bored so let me see if i can figure it out.
 
 
1 hour later…
GGG
8:55 AM
lmao
"No, really, don't use it."
 
 
2 hours later…
10:44 AM
Hi wt happen to all of us???
 
@andriod_murali 2012 happened.
 
GGG
decl just ate .declare's lunch
 
@GGG There is lots of that.
 
GGG
10:57 AM
yeah it just runs at the speed of normal js, dojo must have done something weird
i didn't do anything fancy
is there anything else out there like dojo.declare? I thought it was a pretty common pattern but i'm not finding anything else
 
 
1 hour later…
12:22 PM
@GGG ...
 
12:52 PM
hello
 
1:07 PM
> We ended up using both jQuery and dojo, we can explain that later
Should I wait until he explains or ragequit now?
 
multi thread JS any methods?
 
@Raynos Any html->DOM interpreter you recommend? Google does very weird things in the login process, so pure requests won't do it
 
1:38 PM
try{
    xmlHttp=new XMLHttpRequest();// Firefox, Opera 8.0+, Safari
}
catch (e){
    try{
        xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer
    }
    catch (e){
        try{
            xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
        catch (e){
            alert("No AJAX!?");
            return false;
        }
    }
}
 
Why the second catch statement? You thinking of supporting IE5?
 
he is copypasting some pre-historic code fragment
 
@Zirak what? o.o
@tereško if I were to be hired as a user interface engineer
what parts of UX do I really need to learn?
 
@Raynos , typography
 
@Raynos Nevermind...I'll figure it out.
 
1:52 PM
@tereško that came to mind, anything else?
 
@Alnitak How is getOwnPropertyNames safer?
 
getOwnPropertyNames gets non-enumerable properties too
keys only gets enumerable properties
 
Yeah, so keys is safer, right?
That's why we use hasOwnProperty in for in loops.
 
safer for what
you just pinged alnitak without referencing the question :D
keys is getOwnEnumeriblePropertyNames
 
2
A: Finding items with no pairs in javascript array

AlnitakHere's an example using ES5's functional methods, based on using an object to count the number of times each value occurs: function uniq(a) { // create a map from value -> count(value) var keys = a.reduce(function(o, k) { o[k] = o[k] ? o[k] + 1 : 1; return o; }, {})...

I'm a little unsure now
 
2:03 PM
hey all, I noticed that my question here got very little views:
0
Q: red error message when trying to update google visualizations chart

JohnMerlinoI want to be able to update the line chart of google visualizations. My code was inspired by this stackoverflow post: Trying to update a google visualization using jquery Here is my code in question: http://jsfiddle.net/johnmerlino/YCqyG/ Basically, the first time chart loads, it loads fine. ...

if anyone able to take a glance, thanks
 
@Amaan @alnitak is wrong ;)
 
Thank you!
 
@Raynos The community college I dropped out of had an instructor that insisted two nested for loops to generate a table was "dangerous" can "might crash PHP".
The lesson: Don't listen to everyone who says things are "safer."
 
@Incognito if female then falcon punch else ballsack kick
 
Hahahahaha
 
2:06 PM
XD
 
No, I stopped wasting my money.
I'd really like to know why this person thinks getownprop is "safer"
@Raynos Did that 216.231.135.82 host die?
 
I changed the question to be shorter:
0
Q: google visualization doesn't update chart

JohnMerlinoI want to be able to update the line chart of google visualizations. My code was inspired by this stackoverflow post: Trying to update a google visualization using jquery Here is my code in question: http://jsfiddle.net/johnmerlino/YCqyG/ Basically, the first time chart loads, it loads fine. ...

 
2:23 PM
@JohnMerlino Your fiddle isn't working. Include whatever framework you're using as well
 
jquery
 
I mean Google Visualization
I don't know what it is, but should it be throwing an error saying google is not defined`?
 
@Amaan @Raynos thx for message - fixed code
 
I use this: <script type="text/javascript" src="https://www.google.com/jsapi">
firebug does not alert with any message at all
google is deefined
in fact the chart renders the first time
only the second time i call draw() it doesnt
even though i passed it the same data
 
@JohnMerlino Are you looking at the fiddle?
I don't see <script type="text/javascript" src="https://www.google.com/jsapi"> anywhere
 
2:27 PM
got Object.keys() and Object.getOwnPropertyNames() mixed up in intent - thought the latter was the one that only included the objects own properties, and forgot that it also includes any non-enumerables.
 
Hmm
@JohnMerlino Also, close that script tag
 
I updated the fiddle
 
Link?
 
You're not using JSFiddle correctly!
HTML goes in the top left frame. JavaScript in the bottom left frame.
 
2:31 PM
ok I will add html
 
Wait
Just paste your HTML file here: PasteHTML.com
 
Each week I find yet another reason to have no faith in mankind. Thank you for sparing me the rest of the week: Not using jsfiddle correctly is this week's winner.
 
Also, remember that we don't really care about your problem. Make it smaller so we don't mind helping you. Remove any irrelevant code.
Many times, you'll fix the error by just doing that
@Zirak He's not the first. I remember another guy in this room who put his entire HTML file in the CSS frame. XD
 
@Amaan did you like my use of 'reduce' to map array -> counts without any additional temporary variables ? ;-)
 
Sure, it's neat
 
2:37 PM
once a functional programmer, always a functional programmer... :)
but you were right about using .keys() instead of .getOwnPropertyNames().
 
Yeah
 
can you flag the question, to be moved to serverfault?
http://stackoverflow.com/questions/8701277/htaccess-rewriterule
 
@Raynos there's no difference between hasOwnProperty and propertyIsEnumerable, right?
 
@Amaan herp derp
isOwnProperty means it's not a property inherited through the prototype
isEnumerable means the property is enumerable
@Incognito what do you mean?
 
What do you mean 'enumerable'?
 
2:50 PM
Can be enumerated
 
Object.defineProperty(o, 'key', { enumerable: true })
for (var k in o) { console.log(k); } // 'key'
 
Oh
 
Not being enumerable means keys and for ... in do not grab the key
 
Thanks
 
im still working on cleaning up fiddle so it will work on a static html page, just need a few more minutes, thanks for responses so far
 
2:58 PM
> The three attributes (writable, enumerable, and configurable) are all optional and all default to true.
ES 5 specific or something?
 
@Raynos That server for your blog from a month ago or something, seems to be down.
 
Didn't default to true for me on Chrome 17.
And MDN says it defaults to false.
 
@Incognito my blog seems to be up
 
@Raynos Maybe the IP I have on record is wrong
 
@Amaan assignment foo.x = bar defaults to true
defineProperty defualts to false
 
3:00 PM
Oh
I thought that at first
Right. He talks about defineProperty further down
 
@Raynos Nope, you're hosted elsewhere somehow :P.
 
I was able to reproduce it on static html page! I will update fiddle right now
here is fiddle:
if you clkick the button called "click"
you will see the red error message
I updated question to reflect the change in fiddle:
0
Q: google visualization doesn't update chart

JohnMerlinoI want to be able to update the line chart of google visualizations. My code was inspired by this stackoverflow post: Trying to update a google visualization using jquery Here is my code in question: jsfiddle.net/YCqyG/3 Click the button called "click" and you will see the error. thanks for ...

 
@Incognito 63.141.250.181
get the IP right
@Incognito is the other IP, your box? :P you know I bought my own box right?
 
parseInt('08')
should evaluate to 8
only IE9 gets it right. What are the other browsers waiting for... ?
 
You seriously haven't heard of this before? About how parseInt sees 0 at the beginning and, obviously, assumes it's octal?
 
3:13 PM
@Zirak They fixed it in ES5...
parseInt can't see octals anymore
Also, undefined is read-only now. But IE and Chrome haven't implemented that change yet. What are they (Chrome at least) waiting for... ?
 
@Raynos , i guess you are not aware , that typography is about more than text styling
 
user883807
I know you can read local files with JS and HTML5 is there a way to write to a local file via client side JS?
 
My point is... ECMAScript 5 was published in December 2009 - more than two years ago. The browser makers had plenty of time to implement these changes, but only some of them did...
 
user883807
oops. I know you can read local files with JS and HTML5 but is there a way to write to a local file via client side JS?
 
javascript is an implementation of ecmascript 5?
 
3:22 PM
@anonymouslyanonymous JavaScript is an informal name for ECMAScript....
 
@ŠimeVidas Really? Not even with the radix parameter?
 
@Amaan The radix parameter is optional. If left out, decimal is assumed...
 
Good
 
0x... and 0X... trigger hex evaluation, but 0... doesn't trigger octal anymore...
 
toString and parseInt help so much in some Project Euler problems
 
3:25 PM
(of course, I'm referring to ES5, not the browser implementations which still haven't caught up with this... )
 
Hmm
 
@s3z But that only works for files inside <input type="file">, right?
 
@Amaan did you see the fiddle update? it produces the error.
 
@JohnMerlino Link
@s3z FileWriter API
 
jsfiddle.net/YCqyG/3
on the right hand side under result, click the word "click" and you will see the error message
 
3:28 PM
Good
 
Notice that it works the first time with this data:
mileage_chart = new Charts({
    'labels' : ["2011-06-10 00:00:00","2011-05-10 00:00:00"],
        'legends' : ["MPH"],
        'data' : [ [405,18840]]
});
but fails the second time
I removed those messages because even when I stick "MPH" in outer array problem still occurs
 
im using a jquery script to hide some fields on a form and show them on click. But after submitting the form if i get a validation error , the page refreshes so the fields are hidden again so the user cant change the fields becuase they ar hidden. Does anybody know what to add to the code so it only hides them on the first page befre the validation?
 
4:02 PM
where the text is turning red on jsfiddle under the html tab, does that mean anything?
it looks valid to me and both jslint and firebug does not report any errors
 
@Raynos That explains a lot.
@ŠimeVidas +"0123"
 
I have another update to my fiddle. I added 'linechart' as part of the package variable. And now when I click, there is no error but the chart disappears: jsfiddle.net/YCqyG/5
0
Q: google visualization chart disappears when updating it (jsfiddle example provided)

JohnMerlinoI want to be able to update the line chart of google visualizations. My code was inspired by this stackoverflow post: Trying to update a google visualization using jquery Here is my code in question: http://jsfiddle.net/YCqyG/5/ Click the button called "click" and suddenly chart disappears. ...

I think I got it working!!!!!
i removed this line: this.element.html('');
 
4:34 PM
@Incognito That can't serve as a replacement for parseInt.
 
Why not?
 
(since it doesn't discard the decimal part of the number)
 
Ah.
 
@Incognito I was just commenting that the browsers didn't implement the changes introduced in ES5...
parseInt('08') === 8 in ES5 but only IE9 implements such behavior...
 
IE's really pushing hard to be a good browser.
 
4:37 PM
I think they just took ES5 and implemented it fully (except strict mode of course). The other browsers are reluctant for some reason...
 
In terms of compliance and speed I'm talking about. They say ie10 is going to be good, I'm not holding my breath however.
 
Yes, IE10 has near-perfect ES5 conformance, but Opera is the king here: en.wikipedia.org/wiki/ECMAScript#Conformance_tests
 
Yeah, the non-beta browsers are way better for some reason.
 
@Incognito The numbers are failed tests. Chrome 16: 418 failed. Chrome 18: 35 failed.
 
Yeah, I get that. I'm just surprised the difference between failures between beta and live.
 
4:52 PM
I'm surprised that Firefox doesn't show any improvement. Version 12 alpha still has way too many failed tests compared to the other browsers...
 
I've been looking at the FF9 beta source code a lot, it's interesting.
I've been looking at the HTML parsers in FF1, FF9, Webkit, and Mosaic.
It's really interesting to see the evolution and different approaches to this. Mosaic's basically building a linked list of tokens, but doesn't call it a token. You get a real feel for how the web was without standards when you see some of Tim's comments.
Just 15 years ago, it's mind-blowing.
It's also impressive how small Mosaic's source is compared to a modern browser.
 
5:17 PM
yeah @ŠimeVidas I read the spec about parseInt and it says nothing about trying to parse an octal... it should only try to parse 0x or decimal.
so chrome fails to implement ecmascript
=)
simple as that
no excuses
 
Lots of things fail to implement ecmascript: everything.
 
even ie9?
it has parseInt finally nailed
nvm I see the wikipage with 400 tests failed
 
Simple as that.
 
so not a single browser achieves purity.. which is why pragmatism wins :)
 
For now.
 
5:22 PM
I'm not holding my breath
 
We're getting serious about standards, which means we're getting serious about bloat.
Which means once we get to purity the web will stagnate for a long time.
 
there is a really annoying thing in the spec
that String#substr is not required to be implemented
but String#substring is
even while substr is vastly more useful
 
v.v Any experience with PHP's ODBC?
 
nope :/
 
Lucky.
 
5:47 PM
My constructor function needs inheritance. I need to have to subclass it because objects will have different properties but will still have similar properties. Whats best way to do this in javascript?
best way to do inheritance
just basic inheritance
 
@Esailija Not just Chrome. All except IE9....
 
yea
 
I wonder what's taking them so long...
 
They're constantly adding new features... How hard can it be to change the parseInt algorithm... You basically have to just delete the if-octal branch...
 
5:53 PM
they're saying that because other browsers do same mistake that they should too :D
Status: WorkingAsIntended
:'(
 
Besides... how many applications may really rely on parsing strings starting with 0 as octal...
 
@Esailija There is a workaround (supply a base as the second parameter). It may break existing code and aren't there more important things to focus on?
 
who cares about existing code that relies on parsing octals without second parameter :P
spec purity is more important
 
MDN says ES3 permits it
It just seems like an odd thing to fixate on
 
yes from a pragmatic point of view it's not really that important
 
6:15 PM
5
Q: How to properly validate your code?

stack.user.0I have about 4000 lines of code for a web-application in JavaScript / PHP / CSS / HTML. How can I test it properly? I only support the latest version of IE and Safari. I've worked out all the bugs. Is there a good way to test it so that I could go so far as to call the code robust? I've consi...

 
7:13 PM
time to get that rusty no.de smartmachine bakc up running
 
GGG
7:34 PM
@Incognito "0123.45" | 0
 
Any chance someone could help me with my unanswered question? Still having lots of trouble. stackoverflow.com/questions/8704218/…
 
@GGG "0123.45" >> 0
 
GGG
that too
or "0123.45" << 0 :p
 
Bitwise forces it
 
GGG
oh now this is weird
1e10
10000000000

1e10|0
1410065408

1e10 === 1e10|0
1
 
7:46 PM
 
Bitwise works only with 32 bit part of the number
 
GGG
passes the dutchie on left hand side. See if you can make sense out of the above, I'm stumped.
oh nevermind i left out parens
 
hey guys
 
@GGG Huh?
 
GGG
1e10 === 1e10|0
was supposed to be (1e10) === (1e10|0)
i was being retarded
 
7:49 PM
=== has precedence over |. Weirdly
 
GGG
hey random question... does anyone know of anything like dojo.declare that is not dojo.declare?
 
Right, but 1e10|0 evaluates to 1410065408
Integer overflow in the Int32()
 
1410065408 is the 32-bit part of 1e10
 
@copy I thought he was saying that 1e10 was equal to 1e10|0
 
GGG
yeah that's why i was wondering for a second why 1e10 === 1e10|0 eval'd to true. the order of operations is werid there
 
7:52 PM
@Incognito It's not. Try 1e10 !== (1e10 | 0)
 
GGG
hahah i think we are all on the same page now
 
@copy 1 !== 1|0 === 0.
1e10 === 1e10|45
45
 
@Incognito That is true | 45
 
true === true | 45
 
1e10 === 1e10|44 gives 45. You get it now ?
 
7:56 PM
Yeah, because 1|45
 
8:09 PM
1410065408 is simply 1e10 % 2^32
it doesn't read any bits from the IEEE754 double
Let int32bit be posInt modulo 2
32
; that is, a finite integer value k of Number type with positive sign and less
than 2
32
in magnitude such that the mathematical difference of  posInt and k is mathematically an integer
multiple of 2
32
.
 
Yeah, or 1e10 & 0xFFFFFFFF. That's what I was trying to say :-P
 
it doesn't matter what you have in a bitwise operation since the 1e10 % 0xFFFFFFFF is implicitly done before it
and after that on the modulo result, is applied the bitwise operation
 
You mean 1e10 % 0x100000000. But it's the same anyway
 
no I mean as in 0xFFFFFFFF === 2^32 or 2**32 or 2³²
 
No, 0xFFFFFFFF = 2^32 - 1
 
8:16 PM
Immediately invoked function expressions... or immediately invocable function expressions?
 
oops
off by one, hehe I see 1e10 % 0xFFFFFFFF returns 1410065410 instead of
1410065408
1e10 % 0x100000000 returns 1410065408
so the operation is ( 1e10 % 0x100000000 ) & 0xFFFFFFFF
 
No :-/
 
where the modulo thing happens implicitly
 
% 0x100000000 is the same as & 0xFFFFFFFF
 
@ŠimeVidas invoked
 
8:19 PM
how so ? we are dealing in doubles since it's a regular operation
 
@Dennis Are you sure? (Are you a native speaker?)
(I'm not)
 
toint32( 1e10) will be same as 1e10 % 0x100000000
 
It's mathematically the same
Yeah
 
and toint32 is called before the & operation
 
@ŠimeVidas Yes. Invoked means you're doing it, invocable just means you can, but might not be doing it
 
8:20 PM
Hmmm. Is it a bad thing that I'm writing JavaScript code in C-style?
var kernelIOBitmap = new IDWOS.Graphics.Bitmap(1024, 1024);
var graphicsContext = new IDWOS.Graphics.DrawingContext(kernelIOBitmap);
graphicsContext.Clear(255, 0, 0, 0);
......
free(graphicsContext.ptr);
 
and it's also referred to here: benalman.com/news/2010/11/…
 
@Dennis Yea, that makes sense... well then Crockford got it wrong
 
@Esailija Yeah, that's right. I was actually saying that the toInt32 operation could simply be & 0xFFFFFFFF
 
@ŠimeVidas, he might be trying to make it clearer that function expressions are immediately invocable, whereas function statements aren't
 
@copy you can also get toUint32 by x >>> 0
0xFFFFFFFF >>> 0
4294967295
0xFFFFFFFF | 0
-1
wonderful
 
8:25 PM
>>> is unsigned. So that makes sense I guess.
 
@FelixLoether Well, who knows... I think "invoked" is the correct term here, "invocable" doesn't seem right...
 
but I was more concerned with how doubles are converted to ints to avoid overflow.. I didn't realize it was simply modulo 2³²
 
Also; when uploading to the GPU, should I use weaken instead of free; or will that cause a memory leak?
 
8:35 PM
 
Yes, Douglas Crockford is so right. I've seen all his videos and read his books. He is the definition of a guru.
 
all the videos and books?
 
John Resig has some great tutorials also for some weird depth that most people will never understand, including me.
I think so
well not his non-javascript ones
 
interesting, where can I find those tutorials :P
the weird depth ones especially
 
I'll type in Google, just a sec, he works for Yahoo so there is some good ones he did for them
here is a starter one and YouTube will have more related -> youtube.com/watch?v=hQVTIJBZook
 
8:38 PM
Using Google to search for a Yahoo guy? That's a bit of a slap in the face.
 
well it is what it is
 
@kitguicom no I mean the john resig tutorials that you said are hard to understand?
 
Yahoo is more socially junk type of stuff, Google is for searching
They are hard to understand at first, not simple
but if you take the time, it is worth it
oh
i will look in google
i kind of understand some of it, but not all
 
ahh I have already blasted through those
 
not me
i can't blast through anything when he explains it
 
8:42 PM
have you read resig's book?
 
its like so much in a small space
 
well to be fair I already understood the stuff so I didn't have to learn from his explanation :D
 
i haven't yet
but i did go through Douglas Crockford stuff
 
but I'm always looking to learn more you now
 
it helped me to make jQuery plugins
i've made 4 so far
a couple are instance aware
 
8:44 PM
I think I have made a jQuery plugin once, in a sarcastic answer to a question "how to call function in jQuery?"
so ofc I made a plugin $.callFunction( ... ) :D
 
it was hard for me to understand context with jQuery in making plugins at first, I'm glad you are so smart but to me, it was not simple to get it
like how to enable same plugin style as jQuery UI in terms of calling your selected plugin again and again, after the context is broken
 
well the reason I don't make jquery plugins is that they never make any sense
as in don't belong to jQuery
 
it does make sense in chaining style, makes great sense if you start writing in that style and its very terse, that's one of the reasons its so popular besides the great selector engine
i hated it at first though I admit
 
unless your plugin has to do with DOM traversal and such, it doesn't belong to jQuery.fn imo
 
maybe you better go to jquery chat room
 
8:48 PM
I wouldn't put datepicker in Node.prototype
 
ok javascript in general then if its too specific :)
how about closures
once i understood them doing setTimeout context was so simple
 
yeap
 
could you use english ?
> once i understood them doing setTimeout context was so simple
 
but about your comment about dom traversal, yes, i think that's partially true, but on the other hand if its leveraging other common built in tools with jQuery, seems a likely candidate
that is very clear
setTimeout is part of the window object in all browsers
 
well the jQuery object is such a god object anyway, it doesn't mean everything must be a jquery plugin just because they use something in jQuery
.remove() makes sense in jQuery.fn but .makeRotatingBox doesn't
 
8:51 PM
if you call a function again and again, how can you pass variables to it without using globals if you don't get closures?
setTimeout or setInterval really exposes that problem
Its a particularly good way to promote your business by making jQuery plugins . People visit your site and happen to see other things, like what you are selling. Its just a popular platform.
but you are right
 
most jQuery plugins are .makeRotatingBox, such as everything in jQuery UI
well it does have some actual plugin stuff like easing and color animation
 
I did one image rotator, one form state, one tooltip like, one slider
so yah seems true for the most part
the best code i did is pure javascript though so i agree that its not about jquery all the time
has anyone done any type of json templating GUI before? I'm looking for some advice on that one
 
what's a json templating gui
 
I need to make a GUI that allows a generic JSON source, then have a HTML type of template someone could setup
like imagine you have a jsonp source and it has catalog data for an ecommerce store
or a jsonp source for twitter etc
 
do you just mean templating?
 
8:59 PM
yes but not in a programmer sense
 
02:00 - 21:0021:00 - 00:00

« first day (443 days earlier)      last day (4488 days later) »