« first day (1571 days earlier)      last day (3384 days later) » 

Trolls
Although I wouldn't apply for jobs mentioning "ninja programmers" either
 
@monners I'm inside you
r city.
 
12:32 AM
@phenomnomnominal Seriously?
Wanna grab a beer?
 
@monners yeh brah
 
thanks youtube, very helpful
 
@phenomnomnominal Sweet! You staying in/near the city?
 
Hopefully! I've got concerts the next two nights, so it might be timing dependent
@monners I'm on Flinders St
 
crl
12:36 AM
Are there other allowed special characters for variables than $ and _?
 
can anyone help me with youtube api?
 
crl
@phenomnomnominal oho, all unicodes!
 
lamba is another common one
pi too
 
crl
!!> var π=3.14; console.log(π)
 
12:38 AM
@crl "undefined" Logged: 3.14
 
!!> var π=Math.PI; console.log(π)
 
@phenomnomnominal "undefined" Logged: 3.141592653589793
 
m59
ah sheesh
I forgot the cool kid way of doing this '/stuff/things'.split('/')[that.length-1]
 
@phenomnomnominal @monners i.imgur.com/C9RchTz.png
 
12:47 AM
> das kängaroo ist geboingboing
I lost it
 
crl
!!learn π "<>3.
1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899"
 
@crl Command π learned
 
copypasta fail
 
@phenomnomnominal My office is literally a five minute walk away
@SomeKittens That's exactly what happens
@phenomnomnominal You're not over for Buuren, are you?
 
m59
!!> '/stuff/things'.split('/').reduce(function(pv,cv,idx,arr) {
return idx === arr.length-1 ? cv : null;
});
 
12:54 AM
@m59 "SyntaxError: missing } after function body"
 
m59
wha?
anyway, I'm sure there's a shorter way of doing that..
 
var x = '/stuff/things'.split('/'); x = x[x.length - 1]
 
m59
so you do have to use the variable?
 
Variables are your friend
You can also use .slice or .pop, but they're not the right thing really
 
m59
yeah, that's the obvious way. just less cool. We've been through this before, and I guess my brain refuses to accept that there's no better way =D
 
12:57 AM
Functions are also your friend. Define util.arrayLast or so, if you really need this
 
1:07 AM
I hate array-like objects
 
[].func.call (ugly, I know...)
 
yup
BTW, do you know offhand if there would be any performance difference between using arguments and apply instead of arrays and call?
 
In V8, yes
 
@phenomnomnominal Seriously, Buuren?
 
In V8 apply should be good
 
1:12 AM
@copy good, or better?
 
> Never use arguments directly without .length or [i] (STRICTLY x.apply(y, arguments) is ok, nothing else is, e.g. .slice. Function#apply is special)
There you go
I don't know if better
 
I am using slice, to skip the first parameter. Will that slow it down?
 
Yes
 
Hmm
I may have to remind myself to do some benchmarking
 
1:16 AM
Is that your bottlneck?
 
I haven't noticed any performance problems
 
@monners Nah, Gaslight Anthem
 
This is in lightweight dev testing, of course
 
What's your number, I'll flick you a text later. What time do you finish?
 
nice
 
1:19 AM
Date night!
 
Are you into Trance (and free on Friday night)? I might just have a spare ticket (backstage passes + meet n greet with Buuren)
 
Nah man, I'll be gone, diving to Adelaide on Fri
 
@monners :( I love Buuren
 
Adelaide? Gross...
I'll be done with work around 4:30
@KendallFrey This is my first time seeing him live. Uber excited
 
1:25 AM
@monners another gig, but yeah bit gross
 
@SomeKittens not sure that's still 100% relevant
 
does it mean I'm getting old when History Channel has some of my favorite programming?
 
I used to love it when I was a kid
 
when I was a kid I loved Power Rangers
mind you, they just came out.
Reboot was also a favorite
 
Maybe I should put my quadtree on npm. All the other implementations are awful
 
1:35 AM
I was a pokemon kid
 
<3
 
Hey wasn't there a link to a practical joke extension on here about a week ago?
 
@copy you do that
 
I have to implement comparing two quadtrees first
Ugh
 
1:53 AM
can anyone help me with youtube api?jsfiddle.net/rfc4gnwn
there are two things im trying accomplish 1) mute audio 2) make playlist can anyone help?
 
@copy I don't know how you implemented them but assuming you implemented them as an array like you would a binary tree - shouldn't it be relatively simple?
 
No, in this quadtree, tree nodes can have elements with width and height. Elements are in the tree node when they don't fit in any of the smaller four tree nodes
A special quadtree for collision detection
So comparing two quadtrees means finding all elements that intersect in the trees
 
one question, im learning some javascript and jquery and thought id learn about ternary operators and the scroll event. The function I created worked but the second if statement with the kor divs animating dont revert back when scroll is less than 30, instead it reverts when its less than 5
any idea why?
 
I'm not even sure about the complexity of that operation (naive vs good implementation), but I'm sure certain areas can be skipped
 
@copy Doesn't the depth and position dictate the width and height in quadtrees usually?
 
2:01 AM
Yes, but elements of the quadtree also have a width and height
 
I'm pretty sure there are a few pretty well documented algorithms for that
 
I'll definitely look for one
 
@copy that's kind of odd - I always thought the position and depth tell you the width/height.
 
It does
But I want to be able to insert any aabb into the tree
And tree nodes are power-of-two size (at least in my implementation)
 
If I were you I'd check how it's implemented in things that do geospatial indexing like Mongo or PostGIS or at games that do hit testing.
 
2:04 AM
That's probably a good idea
 
@copy any number is a sum of powers of two (and more generally a sum of powers of any number: its base)
 
Yes, but I'm storing rectangles, not points
 
I'd still probably implement it as an array like one would a binary tree (where at position n you can get to its children by 2n+1 and 2n but you probably benchmarked it and it's slower.
 
I didn't benchmark both implementations. Just my own implementation, and it's fast enough
 
That's good enough I guess. JW, why a quadtree?
(vs more general BSP)
 
2:09 AM
Honestly, because I implemented a quadtree before
A different kind (immutable and hashed), but still
 
fair enough, that's a pretty good reason
 
Is anyone interested in helping me develop my new dot operator-based js library?
 
Dot operator based?
 
Instead of using the .protootype on a function, I'm using objects and methods.
It's desinged as a toolbelt library, Compatible With Anything.
 
2:12 AM
Using objects and methods to do what, exactly?
 
So far, only simple functions you'd expect to be in pure JS
 
You mean like Object.create?
 
one second
here's the source code (so far) jsfiddle.net/so6et85n
Here's the chat room I made for it: chat.stackoverflow.com/rooms/70078/…
 
_$.isString = function(instance) {
	if(typeof instance === "string") {
		return true;
	}
	else {
		return false;
	}
};
Lol
 
That was what I started with.
It's still really buggy
 
2:15 AM
Why would you wrap typeof instance === "string" like that?
Also, why are you if(true){ return true; } else {return false;}
Also, JS has a isFinite function
 
It does
I'm using the if statements because I terrible at writing the ? assignment ones.
 
Also, _$.isDefined is borked - it checks if something is undefined it doesn't check if it's defined.
@wyatt you don't need any statements:
function isString(x){
    return typeof x === "string";
}
 
_$.deleteVariable = function(variable) {
	window[variable] = undefined;
};
lol
 
When I was just beginning I wanted something that did that.
 
2:18 AM
a) It's not deleting anything
b) There's a `delete` keyword
c) You never really want/need to delete stuff like that anyway.
 
d) referencing window like that is a problem, what if you were in node?
 
f) You should only write a library after 5 years experience with a language
Well, a lot of experience
 
@copy I disagree with that :P
Lots of good popular libraries were written by outsiders with only a little JS experience, namely angular and knockout and probably some other big ones
 
How do we tell him he shouldn't write a library yet, in a nice way?
 
!!summon 70078
@copy he should write a library, he just shouldn't expect anyone to use it :D
 
2:21 AM
Alright
copy out
 
roger
I mean, night
 
I like angular, but there are some pretty wacky design decisions in there
 
They're working on fixing those :D
 
2:31 AM
Has anyone used SVG in JS? I've gotten far enough that the source in Inspect Element looks good, but the items I've added aren't appearing on the screen. I don't know why.
(making example)
 
@KendallFrey d3, and only a little, Mosho has though but he's probably sleeping now.
 
0
Q: youtube api for mute & playlist is not working

0100101hey I'm trying to accomplish 2 things first is to mute youtube videos according to the research i did the api code is: function onPlayerReady(event) { event.target.mute(); } Above code doesn't work for some reason as well as im trying to setup playlist with the videos and accordi...

 
var svg = document.getElementById("svg");
var line = document.createElement("line");
line.setAttribute("x1", 10);
line.setAttribute("y1", 10);
line.setAttribute("x2", 100);
line.setAttribute("y2", 100);
svg.appendChild(line);
I do have a <style> in my SVG, so it's not that it doesn't have a style
 
@BenjaminGruenbaum i need help on that
 
2:35 AM
@Steve is that your question?
 
yes
 
Why didn't you post it from your account?
 
it doesnt let me
 
For a reason
 
@Steve so you created a second account to circumvent a question ban?
 
2:37 AM
Actually, that question isn't too bad but please don't create duplicate accounts - it's not allowed.
 
Guess I should probably delete my @Zirak account
 
stackoverflow won't let me post any questions here @rle @BenjaminGruenbaum
 
I don't feel like ratting you out or anything like that but don't do that - play nice. Fix your account so you're not question banned.
 
yea I'm not going to tattle on you
 
it says the following "
You have reached your question limit
Sorry, we are no longer accepting questions from this account. See the Help Center to learn more.
"
 
2:38 AM
but seriously. don't do that
follow the rules and ask good questions
 
@Steve good! Read the help center and fix your exiting content.
 
Can't you just delete some of your old questions?
 
existing*
delete adds to question ban @monners
 
@monners that actually promotes a ban.
 
@monners that won't make the ban go away
 
2:39 AM
Well I learnt something today
 
\o/ yay learnding
 
@monners if i do that i will loose points and i won't have any for chat
can anyone help me with the question though?
i will really appreciate the help
 
@KendallFrey var line = document.createElementNS("http://www.w3.org/2000/svg", "line");
 
2:57 AM
@KendallFrey heh I did this the other day based off an article someone in IRC wrote
/me tries to find the article
 
O_o holy shit
I dunno what the code's doing, but that's a badass tiger
 
oh yeah man that tiger is badass lol
thats a test svg thats used in a lot of places
 
What are all the possible value types?
 
I think I first saw it on raphael.js examples a ways back
the tiger is really amazing when you consider its friggin svg..
 
So, what is the point of that code?
 
3:01 AM
all it does is load svg inline from an external source
 
oh, just a src kind of thing for svg?
 
I was showing him how to do it w/o the jq dependency
yea
 
neat
 
he was doing it with $.each and $.ajax, but had JQ as a con for his method
 
I like how they use @phenomnomnominal as example output ;)
 
3:02 AM
haha
also I didn't understand why he had async: false,
 
#hipster
 
under his pros he had...
> Ability to load asynchronously
but dude.. you turned off async!
man I think I am finally understanding flux..
 
"ability" meaning "hardcoded switch that you can change"
 
haha yea
 
@Loktar what kind of flux?
 
3:04 AM
facebook flux
well reflux in particular
reflux is simplified a bit which is nice
but now google thinks I have acid reflux..
 
that doesn't sound pleasant
 
haha ikr
reacting to acid reflux
 
@Loktar :D
 
pretty nervous about picking this for our next project at work
 
side note: If you haven't installed f.lux, do so
 
3:06 AM
but Im going all out, if I fail Ill fail hard, but at least be learning :P
@KendallFrey thats the dimming program right?
 
If you want to think of it as dimming, sure
 
well "adjusting based on the time of day"
 
it's a spectrum/temperature adjustment
 
which for me means constantly getting dimmer/yellower because its night lol
I used to use it a few years ago but it was always yellow :/
 
I can hardly take the daytime screen at night anymore
TOO BLUE
 
3:12 AM
can anyone help? stackoverflow.com/questions/28290177/… i have working example here jsfiddle.net/xanw09u2/1 but since i will be using the method for multiple videos it doesn't work here jsfiddle.net/rfc4gnwn
 
thats pretty cool
occlusion culling with react
 
Gonna push this to the web some time this week
What do you think?
 
MLM
3:28 AM
I didn't know that was called "occlusion culling". I implemented that for a scrolling container in Unity. Now I have to go update the comments, variables.
 
@KendallFrey nice :)
 
FWIW, code size < 4KB (unminified)
 
MLM
@KendallFrey I like it! Is camera animation feasible by adjusting the perspectiveCamera?
 
yes, very much so
 
MLM
cool
 
3:32 AM
well, maybe I'm exaggerating
You'd need to create a new camera each frame
You could also transform the world instead of the camera, depending on the desired effect
What's a typical savings between minified and unminified code? A test run through Closure gives me 15%, gzipped.
I thought that sounded lower than normal
 
thats awesome @KendallFrey!
 
Note to self: Stop writing awesome code, so you don't have to waste hours cleaning and documenting it for other people.
 
haha
 
crl
good idea to make matrix with an object {m00: ..., m01:... } instead of [[x,y],[z,t]]
 
MLM
I made this 3D solid on a graph(css transformations) a couple years ago. It looks like your library would work pretty good for that sort of thing.
 
3:42 AM
how can i open a modal from a controller?
 
@crl hmm?
 
crl
@KendallFrey I just mean it's faster to type matrix.m00 than matrix[0][0]
 
oh
I changed that to matrix.a now :)
 
Is anyone interested in helping me build a toolbelt library?
It's designed to be Compatible with anything.
 
@MLM That's what I was afraid of. This isn't meant for rendering meshes, as it lacks depth culling
 
MLM
3:45 AM
Wireframes is fine
 
!!> true
 
@wyatt true
 
that's better
Caprica disappeared again.
 
@MLM Not to say you can't, but if you draw something behind something else, it will appear on top
 
Anyway, talk about the library here if you're interested : chat.stackoverflow.com/rooms/70078/…
 
3:48 AM
guess what guys i figured it outtttttttttttttttttttttt
 
nice
 
just little more things
 
MLM
@Steve 'autoplay' false != true :P
 
@MLM @loktar umm i was trying to save time on adding multiple same codes on this example jsfiddle.net/rfc4gnwn but i'm not sure how to make it work with that code unless you guys can help i was able to accomplish the code here jsfiddle.net/1so36Lvb
 
thats a pretty nice style guide
feel like I'm late to the party seeing that
 
MLM
3:54 AM
@Loktar nah, Thanks for sharing. Find any gems in that doc?
 
nothing really profound or anything, kind of just validated what I do on some things
like prefixing JQ vars with $
single quotes
stuff like that
where I work people use blah = new Object()
and im like dont do eeet
going to start implementing this
 
hey guys i just got disconvered a bug
on the second video it doesn't mute the audio
when i add events: {
'onReady': onPlayerReady
}
}); the videos doesn't display
 
@BenjaminGruenbaum Holy shit
 
found a fix ignorethe last messsage
 
4:14 AM
@Steve I strongly recommend you follow the advice that was given to you earlier. People don't take very kindly to users coming to chat with their questions just because they were question-banned, and as you've seen from your rep problem, making new accounts to circumvent the ban will only get you so far
 
4:37 AM
@phenomnomnominal Wanna grab a beer this arvo?
 
5:36 AM
Hello Anybody
Parsing xml in javascript gives" Unexpected token < ? erro
error*
please help
 
5:48 AM
sorry, i don't have experience with xml...
 
5:59 AM
Even an experienced person won't be able to help when there's nothing but a vague error message
The most I could say is "your XML is malformed", which is correct, but I don't see how that would benefit the OP
 
@phenomnomnominal Need to know in the next five minutes
@SomeKittens Have you got @phenomnomnominal's contact deets?
Maybe tomorrow then I guess
 
6:46 AM
hello this is the link from which i m getting the xml data
is there any problem ??
 
Seems to work for me
 
7:09 AM
@monners Sorry bro! Got caught in town with a dead phone, tomorrow?
 
@phenomnomnominal Sure, you've got my number?
 
Yeah, I'll hit you up!
 
Cool. Just got home after a 10 hour day anyway, probably wouldn't have lasted long
 
7:31 AM
in PhoneGap Framework , 1 min ago, by SweetWisher ヅ
i sometime get error : Uncaught ReferenceError: _ is not defined
and Uncaught ReferenceError: jQuery is not defined.
the app works fine
just in one scenario of my app, it gives me such error.
the app redirects to index page nd nthing happens afterwords..
Any idea?
 
failing connection?
 
Nah
there is no net require to run my app, it can work offlline too
 
Mispackaged? Looking for the libraries in the wrong location?
 
i dont have any clue
coz i jst get 1 line error :
Uncaught ReferenceError: _ is not defined
and Uncaught ReferenceError: jQuery is not defined.
how can i find the line causing this error?
I'm just navigating page on the click of 1 button
 
Does phonegap have a developer console?
 
7:45 AM
the same button click works from the other flow
@JanDvorak yes
only console
we get all console statements there
we cant debug that
 
Page navigation unloads all javascript. Be sure to load any libraries you use on the new page.
 
m using backbone.js
see.. there is one page call it "Mypage". It has a button "Create". on Click of Create, we are navigating to next page.
Now in my app, the page "Mypage" gets load from 2 scenario.
1. menu click
2. from so many navigation in my app

The button click works fine in 1st scenario
but for scenario2, i got this error
not even click event getting fired in 2nd case
brb Lunch-time
 
Maybe the first one isn't navigation? Look at how you are supposed to load pages in phonegap, then fix #2 to use that.
 
we are using this.navigate('#page', true);
but as I said
1 min ago, by SweetWisher ヅ
not even click event getting fired in 2nd case
 
documentation link?
 
8:14 AM
@BenjaminGruenbaum Sure, I don't mind answering an interview question (Yes, my reply is a little late) if that helps you.
 
@BenjaminGruenbaum Once C# is on linux I'll definitely take the time and learn it properly.
What makes you think Adobe would start supporting Linux?
Except for flash games (and even those are on the decline), Adobe for web is pretty much dead (or dying)
 
he's thinking about photoshop
 
Ah, well then, yeah. That would be awesome.
 
iiuc... adobe sweet = adobe suite
 
8:34 AM
@SecondRikudo But C# is already on Linux. The new frameworks will be tested against Mono to make sure everything works, but there won't be an official .NET framework for Linux. That will remain on Mono AFAIK
 
@RoelvanUden Mono sucks, but at least it would be standardized by MS
 
I don't know what to think of it, to be honest. The initiative is great, but MS doesn't seem to get much involved with Mono. But we will get the Core frameworks, so I actually presume that these will be the ones that are the perfect candidates for Mono; opposed to the "full" framework.
 
@RoelvanUden TBH I would be overjoyed (and seriously surprised) to see MS taking part in Mono
 
But they have a new CEO which apparently is a lot smarter than the old one, so it could happen
 
8:42 AM
@SecondRikudo They do patches already, but they aren't taking a big role in it yet. The .NET foundation is aimed at sharing code and foundations to be able to run on Linux though, so it might just happen that they take a more active role. And indeed, this new guy is smart and taking the right actions.
This one dotnetfoundation.org/netcore5 is the big thing
 
@JanDvorak of backbone??
 
@RoelvanUden thanks, can you send me an email at benji at tipranks dot com with your address and I'll send you the exercise?
@SecondRikudo if you bother learning it you're very welcome to come interview for us :D
 
i do love riding the motorbike in snow.......not
 
@BenjaminGruenbaum :P
 
8:52 AM
I mean it :D
 
he can learn on the job
but well, it'd mean he'd have to be on windows
yuck
 
I learned on Job, I didn't know C# when I started - took about a week to pick up :P
Just read C# in depth and did exercises and bothered C# people.
 
yup, especially if you already know java, learning C# wouldn't be hard
of course you won't use advanced stuff like ?. or Task or LINQ right away... but not very hard.
have you started using class Foo (Bar bar) {}?
 
No, I'm not writing C#6 at work yet.
So no ?., I used LINQ since day 1.
 
ok
I only did little C#, and it's true that I used LINQ. But not sure about everyone...
 

« first day (1571 days earlier)      last day (3384 days later) »