« first day (1217 days earlier)      last day (3749 days later) » 

12:00 AM
Just create a question for each on codereview SE :P
 
let me troll them
 
@SomeKittensUx2666 yeah, codereview :)
anyone pro at chrome console?
 
maybe
 
well, you know when you log a object you get something like this
Object {name: "john"}
 
sure
 
12:08 AM
Thanks all, it'll be sometime tonight, and basically as long as you want.
 
tonight means which timezone?
 
What do you mean by tonight?
Snap, beat me to it.
 
Translate to UTC please
 
@Zirak Can the bot do that? Why can't the bot do that???
 
12:09 AM
PST = UTC-8
 
well, is it possible to display it like this when you do it via a string like log('some object %O', obj) it shows like Object with no preview
 
@monners If tonight was a constant
@JustDon't You want to get the constructor?
 
Does Cap6 have access to users' local time?
 
'course not
 
@Zirak no, just when you log a object in console using %O you don't get the preview like when you just pass it as an argument
 
12:10 AM
@SomeKittens So we’re talking about in a ~3-6 hours? Then I won’t be any help.
 
Another reason to not like OSX: Closing Chrome doesn't save tabs because the application wasn't "closed"
 
Eeek, yeah I don't get off work for another 6 hours
 
It doesn't have to be video chat.
 
It’s 1am here :(
 
@SomeKittensUx2666 I fucking hate that with a passion.
Yeah sadly, its midnight here, so I don't think I will be much help.
 
12:13 AM
I'm temporarily on a MBA, but temporary here means "Until we get something better"
 
7pm, but i'm in three beers
soooooo
 
@rlemon aha
 
@JustDon't In that case, my best advice is to look at the console's source
 
@rlemon So two more beers, and you’re reading for high quality code review?
 
got home and did a bunch of work. got pissed off because the device I have at home isn't calibrated.
@poke ohh yea
 
12:14 AM
@Zirak I wouldn't be able to change it anyway? It's not a big issue, just annoying
 
@JustDon't I guess you could always write yourself some helper function, e.g. log('some object %O', giveMeDetailsAbout(obj))
 
Look at the source and see what they're doing, maybe you can do it yourself, maybe there's a hook we don't know about.
 
@Zirak ahh
ok
link anyone?
 
Google "dev tools source", or view source inside dev tools.
Seriously, hit Ctrl+Shift+J, then again (undocked)
 
@Zirak I have
googled and got this
and
I tried ctr shif j undocked and it just created a new devtools window
or is that the trick
 
12:17 AM
Yeah, on the dev-tools.
You're in dev tools...on dev tools. It's just an html page.
 
ohh
wow
 
I never knew that
OMG, that's like
ok
 
How very anticlimatic
"OMG, that's like...ok"
 
ha
I was gonna say something else
but then
na
 
12:28 AM
@rlemon How often to people refer to Toronto by TO?
 
often
 
@SomeKittensUx2666: wait, students? What has the world come to?
 
@SimonSarris @SomeGuy @phenomnomnominal First draft medium.com/p/903aa8dfdc44
Just finished writing
And trying to come up with a title
 
Medium? You hipster.
 
There's some decent writing there
But yeah, there's a lot of crap
 
12:34 AM
What is that story o.O
 
Is that a good shock, or a bad shock?
 
It’s a “what the fuck did I just read?”
 
@Zirak Ugh, sooooo many words! Too many!
 
Also, is it pronounced Torono or To-RONT-o?
 
@poke That bad?
 
12:36 AM
I just can’t really comprehend what it was about..
 
The ending didn't clarify it?
 
@aTTozk Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
!!> !''
 
@JustDon't true
 
!!> !!''
 
12:38 AM
@JustDon't false
 
Hi all, I'm trying to set a placeholder on jQuery UI's Combobox directly form the base select element. I'm almost there, but it doesn't seem to like multiple words, only assigning the 1st word of the placeholder. Anyone willing to give me a push in the right direction?
0
Q: jQuery UI adding placeholder to combobox

Fernando SilvaI'm having some trouble with jQuery UI's combobox. I'm trying to add the source select's placeholder to the ui's input, so I can easily set everything up on my element and have the widget just pick up on what's needed. However it doesn't seem to want a placeholder separated by any spaces/symbols ...

 
!!> !!'SomeKittens'
 
@SomeKittensUx2666 true
 
Therefore I am.
 
'' shouldn't be falsy
 
12:39 AM
When you have a time machine, feel free to change it.
 
0
A: jQuery UI adding placeholder to combobox

SomeKittens Ux2666You'll need to add quotes in your HTML string: input = $('<input data-validation="required" placeholder="' + select.attr('placeholder') + '">');

@JustDon't Why not?
 
Just shouldn't be
 
@SomeKittensUx2666 Oh dear, the time I spent banging my head over some quotes :S
 
In the future, inspect the element to see this going on
 
@SomeKittensUx2666 :( I did, probably the long hours catching up on me
 
12:42 AM
Don't forget to upvote/accept.
 
Or better yet, don't create elements like that
 
Or that.
 
@SomeKittensUx2666 I never forget that^^ Thks
 
No problem. You'd be surprised at how many get help and never reciprocate.
 
@Zirak Give it to me... what do you mean, why and how? I gotta soak up as much info as possible to do things properly
 
12:43 AM
If you use the code, you owe 'em an upvote.
3
 
var input = document.createElement('input');
input.dataset.validation = 'required';
input.placeholder = select.getAttribute('placeholder');
Or if you really want to use jquery, jQuery('<input />').attr({ ... })
 
I don't mean to lurk and star but those two comments have been pretty awesome :P
 
Rule of thumb: If you're concatenating strings to create elements, you're doing something wrong.
 
@SomeKittensUx2666 Yup, you just took a headache away, definitely worth the accept+upvote
@Zirak Ok, I get the picture, now I need the why so I don't forget
 
Why: It's much harder to screw up by forgetting quotes.
 
12:47 AM
^ lol
 
@SomeKittensUx2666 lol, well deserved xD I'm still laughing xD
 
@FernandoSilva You write html. Your browser takes that html, and turns that into a model you can reason about: the DOM.
By resorting to string actions, you're doing two things: One, you're reversing the abstraction; you're playing with html, not with the DOM. Two, you're putting one language inside another. That's always easy to get wrong.
 
@FernandoSilva Thank you, I'll be here all night.
 
The server-side language soup, where you see php generating html, with inline js?
 
If you are constructing HTML with string concatenation, you have to be careful about a lot of things, quotation marks, proper escaping of special characters, user input sanitization, and lots of other things like proper nesting. If you use the DOM to just create it, you don’t need to worry about most of that. You just create your element, fill it with properties and append the element to the existing tree
 
12:49 AM
Not fun, and not recommended.
In short: html is a string, the DOM is an object. It's easier to reason about objects.
 
@Zirak ugh. I have to deal with that in our legacy codebase.
 
@Zirak Makes perfect sense, I've got to keep an eye out for that. Tbh I need to get my foot into OOP fast, but the time requirements on this project are so tough I can't seem to even start a test project to try and get a hang of it (very new at programming here - in case you didn't notice already xD)
 
(DOM is not really about OOP though)
 
The DOM is very OO
 
@poke I've heard something about that, it's not about classes, but a prototype object... I can't really tell the difference yet, but I'm trying to get a grasp
 
12:54 AM
It has inheritence
and polymorphism
 
don't be thrown off by fancy words
 
@TravisJ Like when I'm inheriting the autocomplete widget to create the combobox in jquery ui?
 
@FernandoSilva - Like how every element is at its base (unless you are using ie but lets not go there) an [HtmlElement] with a set of methods.
 
@Zirak The DOM yes, but just because you are using the DOM, doesn’t mean you do OOP. OOP to me means applying that way of thinking in your own code. Otherwise, stuff like VBA would be extremely OOP too although it’s really not.
 
@TravisJ I see, input.attr would be object.method
 
12:58 AM
Essentially that is correct, .attr is a method available as a result of the prototype. Although, .attr is part of the jQuery API and wont work on a normal DOM element though because it isn't part of the element's prototype. setAttribute() is however, and you could use that there.
 
And usually you want properties anyway
 
Yeah, that would be best.
$(this).get(0).setAttribute("id","myId"); is a good example of convolution that you should avoid.
 
@TravisJ There's so much I should avoid but don't have the "toolset" to know how. Basically I'm just doing it as it comes and correcting whenever someone gives me a new way of seeing it
@TravisJ That being said, why would that be an example to avoid?
 
1:01 AM
Old news Zirak :P
 
Not as old a you
 
That’s very likely true xD
 
@FernandoSilva $(this).get(0) === this
 
setAttribute('id', ...), you'd just want .id = ...
 
Inside a jQuery event handler, this is the DOM object being worked upon. $(this) is a jQuery object for the DOM object being worked upon. .get(0) gets a pure DOM object from a jQuery object.
 
1:04 AM
@FernandoSilva - That snippet was in reference to an event handler for jquery. Such as .click(function(){ /*code*/ });. In the code area, this is going to refer to the actual element in the DOM. Using $(this) wraps the element in a jQuery object. Using get(0) will then extract the DOM element from the jQuery object. setAttribute is a DOM element API call and using it for id is excessive. id is a property that you can access. That whole mess could just be this.id="myId";
I have to go, night :)
 
Is $(…).get(0) preferred over $(…)[0]?
 
@SomeKittensUx2666 Or just $(this)[0]
 
@Zirak sign in to view the draft?
 
@TravisJ Bye and thanks^^
 
@SimonSarris Well that's bs
 
1:05 AM
This application will be able to:
Read Tweets from your timeline.
See who you follow, and follow new people.
Update your profile.
Post Tweets for you.
DA FUQ
 
One sec
Yeah don't sign up just for that...I was worried as well
 
@monners Does the exact same thing
 
@FernandoSilva - 1 last thing, this answer has some good links for OOP with js if you want to check them out: stackoverflow.com/a/14529872/1026459
 
@TravisJ Bookmarking, thanks again
 
1:06 AM
@SimonSarris In other words, it'll do all my Twittering for me, so I can do other things? Sign me up!
 
> Maybe he was just losing a deal and races to his car.
did you mean to switch tenses?
it reads awkwardly
 
Shit, happens to me quite a lot
 
Consider instead:
> Maybe he was just losing a deal, as he races to his car.
or something similar
 
Habit would dictate "was racing"
 
> Maybe he was losing a deal as he raced to his car.
 
1:08 AM
Well I've got to get back to work, thanks for all the help and pointers. Much appreciated^^
 
That works
 
@FernandoSilva No problem
 
> sceneand
 
...
 
you use a lot of modifiers and writing usually feels better without them
too, very, etc
> It was getting too claustrophobic.

> It was getting claustrophobic.
 
1:10 AM
[...] a scary scene from a movie. [...]
 
claustrophobic is already a very good word for describing something that does not need a modifier to make an impact
wheres that robin williams quote...
anyway sorry reading the rest
 
No, this is good, thanks
 
I like it
its a little frustrating to read because the author keeps mentioning something that the reader does not know
 
bows
 
> I kept thinking about it…
reading that many times in a row gets frustrating for a reader
there may be a better way to allude to something here
but I don't have any good suggestions...
 
1:15 AM
@SimonSarris That’s nice, thanks for that!
 
do you collect your writings somewhere?
@Zirak you should make an everything2 account
 
@SimonSarris It was part of the point, but I see what you mean
@SimonSarris Not really, a lot of it is just scattered in my drawers somewhere.
@SimonSarris But then...actual people will look at stuff
 
Zirak Is it possible to inspect chrome like the tabs and stuff?
 
No
 
aww
 
1:19 AM
Yeah
 
Firefox can do that :P
(inspect firefox, not chrome ^^)
 
I <3 Robin Williams
 
But firefox is XUL
blegh
 
@Zirak <3
 
Glad you like it
 
1:21 AM
Moar
 
Yet I assure you (and @SimonSarris), that in this case, my use of language was not to woo women.
 
It was to woo me!
 
Was it to woo men?
 
no! just me!
 
all language ultimately is to woo rob
 
1:31 AM
!!youtube woo boost
 
Thank you
 
Can't leave that there for non regulars to see.
 
I know what you wrote.
 
1:47 AM
I don't get it...
 
Get what?
 
2:00 AM
anyone familiar with WebGL in here?
 
@phenomnomnominal
 
haha
 
XSLT is so nazi about html tags
I'm gonna make it write me a .jade
 
Adjective of the day: nazi
 
2:11 AM
did nazi that coming
 
Nazi grammar nazis, eh?
 
XSLT is XML in the first place, so if you don’t have well-formed XML, XSLT won’t do much.
And HTML usually isn’t well-formed XML.
 
I want to open a new tag and close it somewhere else
in a way that is not very legal in a single XML/HTML but is perfectly fine in the resulting HTML
<a><b></a></b> basically
a is XSL and b is HTML
why is it XSLT's business what I write in HTML
 
@Mosho Because XSLT isn't HTML
 
Well no, the output is irrelevant…
You can even generate CSV with XSLT…
but the input needs to be completely XML; and HTML isn’t.
 
2:15 AM
that isn't the issue
the input is fine
it forces me to make only legal tags
both HTML and XSL
 
I guess this is the point where I can’t really say any more without seeing a bit more of what you’re doing…
 
@rlemon hmm?
 
@poke I was just copying my shit
 
17 mins ago, by Crowz
anyone familiar with WebGL in here?
 
narf
 
2:17 AM
@Crowz oh, yo, what's up?
 
@phenomnomnominal oh, I'm just trying to figure out some WebGL stuff
 
@Crowz what kind of stuff?
I'm at a conference so I might not reply straight away but just ping me
 
what I am trying to do is click on a sphere, and have the camera move itself to that sphere, more or less.
 
To the point of the sphere, or to look at it?
 
2:20 AM
@Mosho Do you have some input to test this on?
 
well you need the whole file
it's at work
 
@rozkosz Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
@phenomnomnominal like, move within x distance of it and "focus" on it so user interaction focuses around that point
 
and it doesn't work unless it's from my node server because of some iframe error
 
then they could press a key to return to the original position of camera
 
2:21 AM
@poke I can get you the input if you can get the XSLT to work
 
haha, well, I don’t really know. It’s been a while since I’ve used XSLT ^^
 
then take my word for it :P
I updated the gist
with something that "works"
there, edited with the result as well
if I do it the way that would be correct for me in the HTML, it goes full nazi
 
So instead of <row></row> […] <rowclose></rowclose>you just want <row>[…]</row>
 
yes
 
@phenomnomnominal Sup NZ!
 
2:28 AM
I made an SO question for it too, the only answer I got was that XSLT doesn't work like that, but not from anyone reputable or with a working knowledge of english so I'm not giving up yet
 
I think what you might be able to do is put the incomplete HTML stuff in as CDATA
<xsl:if test="count(./preceding-sibling::*) mod (count(../Node) div ../../Rows/text()) = 0"><![CDATA[
    <div class ="row">
]]></xsl:if>
Not entirely sure though.
 
will try, thanks!
vielen dank :D
 
@Shmiddty volume warning
 
function wouldYouLikeToMakingStopCOLLIDER(){
	running = false;
	colider = true;
	if (score > high){
		localStorage.setItem("high", score);
	}
	render();
}
@Mosho js files don't have sound
 
2:33 AM
right
well, that game gave me a heart attack earlier
so I'm being extra cautious :P
 
Did you see this? itch.io/jam/flappyjam
 
@Mosho good to see you pulled through ok
 
@poke yeah. my entry is already there.
 
Which one is it?
 
The code is so bad
But I'm surprised at how bad most of the games submitted there are.
 
2:35 AM
Wait. The nyancat version is yours? Or are those two not related?
 
Hwy, quick Q.
Does this company/deal look legit?
 
I don't see why you'd pay for javascript libraries...
 
@Shmiddty I know. I mean, benefiting from and then paying for someone's hard work? Pfffft.
 
1$…
 
Is that a library or a development tool?
I'm more concerned to know if the company will rip me off.
 
2:40 AM
I cringe when I see the words unique data source control... This problem has already been solved people!
 
lol ok
 
Actually, I can't figure out what it is either...
 
@poke I used &lt;div class = "row">
which I understand is the same as CDATA
but then it's just strings :X
 
If you use &gt; at the end too, then yes..
It’s just strings? Odd :/
 
Whatever they are, those demos are purdy...
 
2:43 AM
Hmm, you could try putting that in additional <xsl:text> tags
 
I did
<xsl:text disable-output-escaping="yes">&lt;div class = "row"&gt;</xsl:text>
 
OCD anyone?
http://www.buzzfeed.com/samir/things-that-will-drive-your-ocd-self-insane
 
I hate you so much xD
 
What is the closest equivalent to, say, WPF in Javascript frameworks?
 
so I guess .jade it is
for now
@RobertHarvey HTML? :P
 
2:48 AM
I've looked at Kendo, but I'm not sure I want to be dependent on a private company for that sort of thing.
Even if it is Telerik.
 
@CosminPascu Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
@Robert I found this a while ago, which seemed pretty nice to me. I haven’t given it a try though: knockoutjs.com/index.html
 
I've started looking at the SPA frameworks, like Angular. I get the impression that you can get data binding and a few other things, but can't really get my head around how comprehensive it is.
Knockout seems like a data binding framework, although I do see that it has some templating in it.
What I'm after is something that's very form-centric. Something that you could do line of business applications in, but make them look very pretty.
Something you could make dashboards with as well.
 
YUI
 
Ah, so you’re more looking for UI components
 
2:52 AM
@rlemon Thanks, I haven't seen that one yet. Would you use it by itself, or in conjunction with Angular?
@poke Yes, that would be part of the emphasis.
 
never used Angular
 
YUI on its own is already a huge monster, so I doubt you would use it with Angular
 
But I'd still need something to do the MVC or MVVM, right?
 
Right, I see that. I'll have to dig into that further.
Thanks.
One more thing to learn. :)
 
2:54 AM
always more to learn ;)
 
why would you ever use YUI?
 
all-in-one?
 
I know people who wouldn’t ever use anything else, so I guess there is something behind it…
 
Did you ever use mootools?
shit was garbage.
 
I used it a bit back then when vanilla wasn’t so powerful.
Primarily to not have to use jQuery.. and because it was more like native JS than others.
Good night!
 
MLM
3:21 AM
With requirejs and require-handlebars plugin for templating, has anyone had some luck using relative paths? Whenever I try to require something like hbs!./mypartial it tries to get the wrong thing if I am not developing at the site root.
 
3:38 AM
This is a basic question, but I can't figure out why my jQuery event isn't firing. It's so simple but I'm stumped, help?
 
@klode Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
3:49 AM
@akowalz Code?
 
@monners maybe you have an idea
 
$( "#four" ).click(function() {
console.log("anything");
});
 
@Mosho About what?
 
i have a button id="four", I know the jQuery file is being linked correctly
 
@monners about what I'm about to type
regarding stuff in my xslt voyage
but not about xslt in particular
 
3:51 AM
$("#four").on('click', function(e) {
    e.preventDefault();
    console.log('anything');
});
 
@monners do I have to wrap that in a $(document).ready function or anything?
 
@akowalz Not if your script is at the bottom of your document, otherwise yes.
$(function() {
    $("#four").on('click', function(e) {
        e.preventDefault();
        console.log('anything');
    });
});
 
@monners great, it's working. Thanks a lot. What does the preventDefault do? I can wager a guess but why do I need it here?
 
@akowalz Buttons have a default action when they'er clicked. If you're not using that action then it can stop the propagation of actions assigned (as the default action takes precedence).
 
@monners cool. Thanks again
 
3:54 AM
No worries
 
@Mosho I can't help you. I don't do XSLT, and I think you're trying to do something with it that you shouldn't be.
 
alright, thanks anyway
it's the only tool I can find for the job
it's either that or write an xml parser myself
 
How about not using XML?
 
I have to
It's what's given to me
 
3:59 AM
@Mosho Good luck.
Do you know for certain that what you're trying to do can be done?
 

« first day (1217 days earlier)      last day (3749 days later) »