« first day (322 days earlier)      last day (4624 days later) » 

10:41 AM
0
Q: HTML5 card game

RoonooirI posted this question on stackoverflow and it was closed for being too specific to me personally. And it was suggested I post it here instead So here goes.... I created a card game in silverlight a year or so ago in order to learn a bit about Silverlight. I am now wanting to make a HTML5 vers...

RT @erikdahlstrom: rather big #svg changes in the new #opera 12 snapshot, http://t.co/mU4jiX3 - now is a great time to report any regres ...
RT @paul_irish: Hey Portland hipsters, how do you feel about Mozilla's choice to ship Firefox with Websockets disabled? http://t.co/bsrI ...
 
11:24 AM
RT @slightlylate: The argument for Web Components:http://j.mp/pasP2S http://j.mp/p8XMzE
RT @johnallsopp: How to Open Dropped Files Using HTML5 and JavaScript » SitePoint http://t.co/iPh5h2Z
RT @jsgoodies: Red Locomotive; a game engine with a fishy demo: http://js.gd/1zv
RT @sethladd: New post: Box2D JavaScript Example Walkthrough http://t.co/MneRnrl
 
Oh dear, better say something before Raynos comes in and yells at Feeds again
 
Habueldago!
said something
 
\o/
 
11:56 AM
trying to make this thin faster
no need to make it more crazy this time :D
 
RT @rillian: I'm implementing WebVTT (video subtitles) in Firefox, for those following along on twitter.
1
Q: Web development in a small team - best practices

Currently developing a web app in a team of two maybe three in the near future. Tech stack is at the moment : flask, mongodb, and extjs for the fontend. I currently have the project under version control using mercurial and bitbucket. Question What is exactly the best way to work as a team on a...

 
 
1 hour later…
1:24 PM
RT @stucssplay: Using CSS3 keyframes to animate a headline changer. Degrades well in browsers without keyframe support. http://t.co/oRZybjv
 
Can someone please help me with
http://stackoverflow.com/questions/7288115/jquery-mobile-caching-issues-onclick-not-fired-unless-page-is-reloaded
 
1:37 PM
@RyanKinal @InterstellarCoder Yes, I've tried backbone. I dont like it, its annoying.
 
1:55 PM
Hi every one
I need your help for selector,I start jQuery recently
 
2:07 PM
@Raynos Seen my newest creation of madness?
 
@IvoWetzel yes
havnt read the source though
 
I'm using defineProperty and getter/setter stuffs, this will teach those people to not mess with my privates! (at least on in debug mode... since I presume that everything will be a lot slower with guarding enabled)
anyways, off to the city, gonna have some japanese dinner this evening
 
 
2 hours later…
3:53 PM
Man, why can't PHP be more like JavaScript?
 
RT @ariyahidayat: My answer on @Quora to: Why is Safari called Safari? http://qr.ae/7YPPZ
 
Errors in Opera?
cannot convert o1 to object
Errors in Firefox too
TypeError: o1 is undefined.
@Raynos Does this require some ES5 support that Opera and FF don't have, maybe?
 
4:08 PM
Hmm weird
Maybe
Is that firefox6 ?
 
ahem
Well, this is embarrassing
 
Oh I know
its the github link
 
... 3.6, lol
 
that fails in firefox & opera
Oh yeah of course it doesnt work in 3.6 :p
It does require ES5
 
Shows you how much development I do on my home machine :-D
:uninstalling, downloading, installing:
 
4:11 PM
I inlined it so it worked on FF4
 
Hooray, FF6 :-D
 
0
Q: Why use chained prototypeinheritance in javascript?

Raynosperf Why do we build a prototype inheritance chain rather then using object composition. Looking up through the prototype for each step in the chain get's expensive. Here is some dummy example code : var lower = { "foo": "bar" }; var upper = { "bar": "foo" }; var chained = Object.cr...

 
Answered
 
4:27 PM
Sorry your answer is wrong :(
 
Is it?
 
I'll write a fiddle
 
Hmmm. Perhaps I was thinking of concatenation, rather than composition?
 
Oh balls
your right
thats not how my merging code works
They create shallow clones
gah
 
Ugh. If I didn't have all my bookmarks in Chrome, I'd probably be switching back to FF right now.
 
4:31 PM
:p
 
Flash keeps crashing :-(
And sometimes, that causes Chrome to crash
 
@RyanKinal your right though
I would need to use proxies, bah
 
@Raynos Really, though, most object-oriented designs don't need the prototype chain.
They don't expect an ancestor to change. They don't design for the possibility that an ancestor could change.
I know I don't. (But I might in the future)
 
So I created a proxy that reflects changes to existing properties
But that murders performance
Horribly.
 
... and the proxy uses the prototype chain?
 
4:45 PM
Nope
it uses getters
 
morning everybody
 
@tdk2fe 'morning
 
Heh - just got enough rep to chat so I thought I would check it out :)
 
Welcome :-)
 
4:51 PM
Thanks
so this is where the js gurus hang out?
 
@tdk2fe We're not generally fond of the term "guru", but yeah, that's pretty much it.
 
Hah. Well I just recently started using jquery
 
@RyanKinal yes its two levels deep and the other is three levels deep
 
trying to wrap my head around this whole DOM thing
 
Thats because making them one & two levels deep gets verbose
 
4:52 PM
i'm come from more of a linux administration background
 
Never mind im an idiot
 
Raynos - I posted a question earlier today b/c I couldn't get something to work and it was pointed out to me that i had a typo
so ... I feel your pain :)
 
@tdk2fe Typos happen :-)
Hmmm. I'm going to have to switch cafes pretty soon here.
This one closes at 1pm -_-
@Raynos I'll have to ask you about your proxying when I get back online.
 
@tdk2fe there are some pople here who know js. yes
 
Do you know a good resource on altering the behavior of the jquery tabify?
 
5:03 PM
the jquery tabify source?
 
Yeah
I'd like to modify it so when an event occurs, a tab turns colors, and when I click it it will revert back to standard
 
Thats your resource
go read the code
If your lucky they have a webpage with documentation
 
Yeah I figured - didn't know though if there was anything out there about extending classes or overriding them
 
5:24 PM
sigh I hate writing backend code.
get stuff from dB -> do things with it -> put stuff in DB -> repeat
All the cool stuff happens client side :-D
Maybe I just hate PHP more than I think I do
BWAHAHAHA! So, I moved from an independent coffee house to a Tim Horton's, and Google just popped up a message:
"It looks like you've moved! Would you like to use google.ca?"
 
@RyanKinal meh backend isnt that bad
 
I'm not a huge fan of PHP
but I have to use it everyday
so that's probably why
 
5:42 PM
@tdk2fe Could be. I don't use it often. Only on side projects. So every time I come back to it, I feel like I'm re-learning it.
 
I'd like to get into python
but it's a hard sell to put all our projects 6 months back at work so we can all learn django
 
lol, true
 
Mac
Hey guys, does anyone know where I would find the code that handles the movement of sortable items in the jQuery UI Sortables JS? > jsfiddle.net/9gqKc
By the movement I mean the code that changes the order of the div tags within the HTML
Do you know of any keywords I would be looking for in particular to find this code? Would they be using appendTo or somethings :/
 
@Mac My first guess would probably be insertBefore or insertAfter
 
RT @assaf: Who is Using Node.js And Why? Yammer, Bocoup, Proxlet and Yahoo http://t.co/0YcS300
 
Mac
5:50 PM
@RyanKinal thanks, I'll take a look
ah ha, found my line
a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction == 'down' ? i.item[0] : i.item[0].nextSibling));
Anyone any ideas as to how I would delay this insertBefore by say 800 milliseconds ?
 
setTimeout?
 
Mac
trying that now lol, thanks
 
japanese food is sooo good...
 
Mac
meh, it's alright :p
 
I'm not sure I've ever had proper Japanese food. There's a place I've been meaning to try, though.
 
Mac
6:05 PM
because my codes now in a set timeout function it's not seeing its variables
Error: this.placeholder is undefined
 
well, use that
 
Mac
ah, I'll carry on with this tomorrow, I'm running late, Cya
 
RT @cramforce: #protip When criticizing decisions of a standards body, put in a disclaimer that you generally like innovation #dontfeedt ...
 
6:38 PM
Can someone remind me the reason why we use hasOwnProperty when cycling over an object?
 
So we don't cycle over properties from the prototype.
 
Thanks @RyanKinal
 
I harldy ever use this these days, but well I work on stuff where I can expect that people won't mess with the prototypes
 
I'm looking to merge two objects, trying to find some code that deals with it correctly, ended up starting on my own.
 
6:40 PM
if they still do... their fault
of course there are times when it actually makes a difference
 
Code I'm writing intends to be a plugin for various websites anywhere.
I'm doing this basically in straight JS, trying to think of edge cases that could bite me.
Is there code that merges two objects together I can look at somewhere?
ie, jquery .merge() api.jquery.com/jQuery.merge
They do this, but I'm not sure it's "good enough"
function( first, second ) {
		var i = first.length,
			j = 0;
		if ( typeof second.length === "number" ) {
			for ( var l = second.length; j < l; j++ ) {
				first[ i++ ] = second[ j ];
			}
		} else {
			while ( second[j] !== undefined ) {
				first[ i++ ] = second[ j++ ];
			}
		}
		first.length = i;
		return first;
	}
 
@Incognito That looks like it's merging arrays, not objects
 
Hrmm, maybe I'm thinking of the wrong jQuery feature..
 
Is there a jQuery.extend?
 
That's the one.
Yeah it's about 60-100 lines so I won't post here.
blerg, it's too much like an OR merge, I need XOR.
I've got to work with the idea of <script></script> tags in the middle of a page because document.write ends up writing content there. Is there a way I can accomplish this without doing that?
ie, use script tags in the middle of my page, but not call document.write to drop a div in that location.
Especially because it's hackish and might cause problems.
 
7:08 PM
You might be able to do something with document.getElementsByTagName('script') - the last one will always be the script that is currently executing (as far as I recall - it's been a while since I've bothered with that kind of thing).
 
Thanks I'll give it a shot.
 
7:28 PM
@Incognito meh merge is easy
@Incognito code
pd.merge = function _merge() {
    var o = {};
    for (var k in arguments) {
        var obj = arguments[k];
        Object.keys(obj).forEach(function _each(key) {
            o[key] = obj[key];
        });
    }
    return o;
};
 
 
2 hours later…
9:21 PM
0
Q: Javascript graph skeleton implementation

MuhaI started implementing a graph drawing application in javascript and < canvas > element, and i just wanted to hear your thought on the progress so far. I'm very open to suggestions and i'm very interested to hear what you have to say. So you can see the progress so far in the present code, if ...

 
 
1 hour later…
10:25 PM
HTML -> documentfragment
how?
 
create fragment
append div
set inner html
grab nodes from within div, move to fragment
discard div
?
anyways, should gotta go to bed now... with a little bit of luck I'll have a date tomorrow xD
 
I see
var d = document.createElement("div");
d.innerHTML = out;
panel.parentNode.replaceChild(d.childNodes[0], panel);
I did that
 
10:43 PM
 
Anyone home ?
 
11:10 PM
@Raynos Does this work for nested objects n-deep? I don't see any recursive stuff going on.
And handling of arrays.
 
11:50 PM
@Incognito trolls?
You do not want deep cloning
Array.prototype.slice.call is the array clone method. use it
 
@Chetan sorry, it is not possibly - once upon a time it was great security hole
e.g. you could determine if your user watch porn
and in modern browser there is no way to determine it
 

« first day (322 days earlier)      last day (4624 days later) »