« first day (1271 days earlier)      last day (3902 days later) » 

19:00
Right now I have this overarching App object that contains query selection + the modules but the event handling has me all confused
Generally, you should not have query selectors beyond 'setting things up initially'.
@distilledchaos 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.
not sure what you mean
$.ajax(...).then(function(){
    $(".foo").click(function(){
       // this is bad
    });
});
$(".foo").data("something"); or $("#"+id).foo( are even worse.
Presentation layer is for presentation :)
I see what you mean
19:06
vanilla? this looks like peppermint to me! — Roko C. Buljan 42 secs ago
that clever bastard!
i dont get it
also @RUJordan use QSA > getByClassName
it is better and has IE8 support
@rlemon I was going to, but I forgot how to do a selector like that
el.innerHTML = div;
rlly?
this surely will not work
I wanted to say qsa("id > .class");
Well he wanted to replace the entire thing, so why not?
owait
19:10
@rlemon It coerces to a string, right?
@RyanKinal correct
just like alert(obj)
while(el.hasChildNodes()) el.removeChild(el.lastChild);
@RUJordan remove all children without calling innerHTML
@rlemon is el.innerHTML = "" a good way to wipe out element content?
FYI
19:11
Nevermind then lol
el.lastChild vs el.firstChild afaik has no difference. preference I suppose
HTMLElement.prototype.empty = function() {
  while(this.hasChildNodes()) {
    this.removeChild(this.lastChild);
  }
};
foo.empty(); // boom!
bam (really, don't use this)
interesting
@RUJordan if you find yourself needing to clear contents a lot writing a little helper function clearContents() would be helpful
I'm surprised there isn't a native method built in for that
the web is 25 years old. less for most people. think about how things evolve. give it time
19:17
I'm impatient :P
i'm sure for the first few thousand years hammers didn't change much. you had to use them creatively. now when I walk down the hammer isle I see a hammer for every possible application. I'm sure you'll see that in the web apis
That's actually a really good analogy.
And not just because I like typing the world analogy (it makes me chuckle)
@Martin 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.
@rlemon y u no ?
Can someone tell me why my <se;ect> isn't being populated? jsfiddle.net/V6hHm/1
19:19
HTMLElement.prototype.empty = function(){
   this.innerHTML = '';
}
0
Q: jQuery append element if it doesn't exist, otherwise replace

emilosHere's a short piece of code: var $el = $("#something").find(".test"); if (!$el.length) { $("#something").append('<div class="test">somecontent</div>'); } else { $el.replaceWith('<div class="test">somenewcontent</div>'); } I couldn't find a method appendOrReplaceWith or anything simila...

every fucking answer. HIPSTERS! THE LOT OF YOU!!!
WRITE READABLE FUCKING CODE FFS!
@rlemon explain me why did you no prefer the innerHTML method
> Uncaught Error: [$injector:modulerr] Failed to instantiate module testApp due to:
Error: [$injector:nomod] Module 'testApp' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specif...<omitted>...0)
@Martin possibly due to this error
:\
Why am I getting that erro
@AbhishekHingnikar do you really need me to explain why I dislike innerHTML in this situation?
or why I dislike it from a higher level
they are both the same
@Martin it tells you in the error "Module 'testApp' is not available! You either misspelled the module name or forgot to load it."
19:21
I'm doing the same as here (jsfiddle.net/qWzTb) but there is no error there
I think traversing on javascript is not that much efficient cause ugh we just want it empty and our string is just '' + trusty !, while innerHTML will just trigger a re-structuring in C world. which should be more efficient in this special case
@Martin you are not doing the same thing
look at your include options
onload vs nowrap head
scoping issue
problem solved. proof
scoop
@rlemon Yup that's it. Thanks!
try not to edit ping people ;)
19:24
Ok sorry I'm new to SO chat
so i'm still getting this error WebSocket connection to 'ws://my.domain.com:3000/socket.io/1/websocket/h47IAO5Lurz1AxYX0Txj' failed: Connection closed before receiving a handshake response
but after the error the websockets start working :P but they fall back to xhr
> Well, I want to extract parameters from url using preg_replace.
!!facepalm
@RUJordan That didn't make much sense. Use the !!/help command to learn more.
so yea, working. but not working.
Still with that proxy thing?
19:25
yup
things are working now.
@rlemon I had that issue but it was because I wasn't releasing my database connection. Not sure if that applies to your proxy.
but not quite ;)
the ws reqest hangs, xhr takes over, then the ws times out and I get that error
@RokoC.Buljan for the record. I'd fail the code in this answer in a code review. Also, I'd fail op's code, OP has an xy problem. — Benjamin Gruenbaum 26 secs ago
@rlemon Does this only happen for the first connection to the server?
Or the first connection every client makes?
every client every connection
ws doesn't like me
19:27
ws?
websocket?
websockets
WebSocket
just making sure
May I read your code?
websockets.
!!urban ws
@AbhishekHingnikar WS (n) Acronym for "watersports" or sexual contact involving pee or urine
19:28
@RUJordan which side. client server, host server, or client webpage code
@AbhishekHingnikar yikes bro
Client server, I think
I take it that your WebSocket module does work okay?
Without proxies?
@SomeGuy yup
get on TS
19:29
!!urban ru
@AbhishekHingnikar RU Are you. Part of the movement to reduce unnecessary letters in words mostly brought about by texting. Can be use in either upper or lower case.
I don't want google getting my code yet
I can't right now
@rlemon not entirely sure, was going to see how your sockets interact
19:30
Email it to me?
@AbhishekHingnikar [RL](http://rl.urbanup.com/1664321) Abbreviation for Real Life, a free MMORPG/FPS that automatically logs you in when you exit all other computer games. Some of the features include:

-Insanely high FPS
-Virtually no lag
-No load times
-State of the art ragdoll physics

Unfortunately, there's a very steep learning curve, and there doesn't appear to be any respawn for dead players.
amaan.cheval [at] gmail
@SomeGuy ts chat is faster ;)
but okaaayyy
sooooo rlemon = real life emon !
19:30
!!urban ah
@KendallFrey Ah An interjection implying revalation.
Interesting question
and Abhishek is an ejaculation, or something.
!!kendallfrey
!!urban eh
19:31
@rlemon [eh](http://eh.urbanup.com/439667) An interjection or prompt spoken by Canadians.
Equivalent to the American "huh?" or "right?"
Usually used to prompt a person to respond to what was said. or to indicate a lack of understanding.
!!kendall v @AbhishekHingnikar v
LOLOL
@KendallFrey I detect almost few million
in the picture she is showing off the greenland, now if we consider each plant there as a fuck you give... you give a million fucks !
Ugh, comparing websites is bad enough, but having to read about sexual assault just makes me sad and depressed :(
19:32
@AbhishekHingnikar Why would you consider a plant to be a fuck?
because banana
@SomeGuy the photograph is supposed to depict the amount of fucks he give
hammock
and the lady is showing off nothing but greenland :P
19:33
@wasatchwizard 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.
1
Q: What happens to a jQuery promise after it is done being used?

jtfairbankIt seems that there is no way for jQuery to know when your app is done using a promise. Since memory is managed in js, I presume that the promise continues to exist until all references to it are gone. Specifically, it will exist indefinitely until it is resolved AND the code that created or us...

@AbhishekHingnikar nothing but greenland, therefore the fucks I give are either nothing or greenland
@SomeGuy sent
going for a smoke and a coffee. brb
true that but in maths we take both possibilities remember ?
no way I give a fuck about greenland
@AbhishekHingnikar no, that's QM
19:34
@KendallFrey you are a weird incoherent mind. We can't be so sure.
!!urban qm
@KendallFrey [QM](http://qm.urbanup.com/3172765) Queer Magnet; a sexy, highly desired (by straight men) woman, who happens to be bff with many homosexual men.

i.e. the gays cum-a-running.

Antonym: Fag Hag.
@rlemon Oh, you're using expressio
urban all the two letter acronyms
I wonder if that matters at all
19:34
@KendallFrey quantum mechanics. i know that.
!!urban us
@AbhishekHingnikar US Who all your base are belong to
lol
!!urban 1
@KendallFrey 1 The IQ of President George Bush.
19:35
I loled so hard when I saw that
!!urban 9000
@AbhishekHingnikar 9000 the ultimate cutoff point for an unreasonably high number. If you catch sight of anything that is over 9000, take off you scouter or HMD and crush it in your hand immediately while screaming.
@AbhishekHingnikar 42 The Almighty Answer to the Meaning of Life, the Universe, and Everything. It was calculated by the computer Deep Thought for seven million years and when asked to build a better computer to discover the Question to the Life, the Universe, and Everything, it built the Earth. Before the Earth could tell the Question however, it was destroyed by the Vogons to make room for an interstellar highway bypass. For more in(snip)
what the heck o_o, oh nvm.
19:36
!!urban CS
@KendallFrey cs Short for the video game: Counter-Strike
!!sandbox
You know, there was this funny idea once upon a time that people were supposed to test out commands and "play" in the sandbox
@KendallFrey cs will be counter strike forever :P
!!urban go
@AbhishekHingnikar [go](http://go.urbanup.com/902582) an ancient board game originated from China, now commonly played in japan and korea also. It's becomming more popular around the world after the anime Hikaru no go

to play internet go visite www.kiseido.com

or visite yahoo games
19:37
what the heck o_o
or computer science, or a file extension for C#...
@KendallFrey those are irrelavent.
your mom is irrelevent
@KendallFrey just like your dick :->
@SomeGuy if you look at the expressio project... it really really shouldn't
19:39
@rlemon I have no idea what could be going wrong. I imagine it'd be easier if we could actually debug it
Yes, your mom and my dick have become so similar they have merged.
it is just a wrapper for express and socket.io
they don't change anything
Yeah, that's what I assumed
well I can't give you server access, but I can give you a demo login to see it
By the way, you might be leaking port as a global
19:39
@KendallFrey don't confuse my mum for your own :->
no it is defined. you just didn't get that code
var time = Date.now(),
	registers = reg.registers,
	reading, port, io;
Cool, thought so
@AbhishekHingnikar My mum doesn't have a red dot on her forehead and a white dot on her chin
slightly over the line methinks
@KendallFrey did she not tell you, you were adopted ? Oh wait ... they didn't tell you about your real parenthood :-(
@AbhishekHingnikar Marvelous comeback!
Abhishek, king of the totally unprovoked and nonsensical selfie.
And fedoras
I love me some good fedora
Isn't that a trilby?
19:45
^ owned
NOT A DIFFERENCE
THERE IS
never heard of it
sorry
DONT CARE
!!urban trilby
19:45
@KendallFrey trilby a hat very commonly worn in america during the 1920s. The hat then went out of fashion although some people still wear them today. Anyone seen wearing a trilby in modern times can official be labelled a [twat].
Snapbacks or no hat lol
So according to Urban, @AbhishekHingnikar is a twat.
!!s/Urban/everyone/
19:46
@SomeKittensUx2666 So according to everyone, @AbhishekHingnikar is a twat. (source)
We didn't need urban to tell us that :P
> Anyone seen wearing a trilby in modern times can official be labelled a [twat].
pregnant fish associates to jesus :P
lmao he's gonna grill you guys so hard
@AbhishekHingnikar what are you smoking today?
19:47
@AbhishekHingnikar Are you high?
used to signify marovangine dynasty or someshit i heard on national geographic
years ago.
@rlemon 1500 mg painkillers, 500mg antibiotics and the usual neural condition medicines. Oh and No porn :P
@AbhishekHingnikar ... I think your mental plane is more like a mental hypercube
I thought a twat was a pregnant goldfish?
NO PORN?!
You're smoking painkillers?!
19:48
Bro I'm sorry.
Odontophobia is the fear of teeth.
Quick, everybody send him a dick pic
2
@KendallFrey not even that. hypercube is just 4 dimensions :-(
dude, it's 4
^ owned
19:49
whoops. yeah 4
i confused :[
There are 10 human body parts that are only 3 letters long, can you guess them all?
you must be high as fucking empire state
@AbhishekHingnikar are you on painkillers for your leg?
@rlemon your manhood's probably only long enough for three letters.
2
19:49
@RUJordan yes
@rlemon eye, nut, ear, ass, leg, arm, toe...
@SomeKittensUx2666 My D
@SomeKittensUx2666 it was cut off.
eye, hip, arm, leg, ear, toe, jaw, rib, lip, and gum.
@SomeKittensUx2666 zing!
19:50
@AbhishekHingnikar you're going to be ok though right?
you forgot ass dammit
ass is the most important
ass
noun
1.
a hoofed mammal of the horse family with a braying call, typically smaller than a horse and with longer ears.
!!urban ass
@KendallFrey [ass](http://ass.urbanup.com/232922) (_!_) = Normal Ass
(__!__) = Big Ass
(!) = Tight Ass
(_?_) = Dumb Ass
(_E=MC2_) = Smart Ass
(_$_) = Rich Ass
(_x_) = Kiss My Ass
(_X_) = Get Off My Ass
6
@RUJordan yeah i will be fine. though my craziness might go either way xD
19:50
oh...
lol best urban response ever
am more worried about my neural condition.
@AbhishekHingnikar as long as you're safe :) Enjoy the pain meds lol those are always fun
@RUJordan not fun :-( its a shame i can't feel touch in my leg but can feel pain and am taking painkillers to numb something which my nerves are numbing by default but only as the sensation of touch .. Fuck you biology
fuck biology, get high
(joking lol)
19:53
on a second thought. That sounds like fun :P
fuck my biology teacher? not a chance
Give it a minute. You don't truly decide until about the eighth thought.
idk why, but the conversation made me think of this
@rlemon lol I don't remember that one
we should prank call people
19:54
we?
prank calling still exists?
@rlemon yeap to a whole new level.
maybe in India. here we just send dick pics.
@rlemon thats so outdated here.
I need ideas for when I prank text rlemon
19:55
we did it centuries ago :-(
you ran out of dick after about 5 minutes
all I can picture is an old indian man chiseling a picture of his dick into a tablet then hand delivering it
^ thats so bad...
lol
@rlemon you are so uneducated.
19:57
@SomeGuy I wish they would have at least took the effort to put the hair on to the mask after she took it off
we friken invented kamasutra idiots
we invented porn !
lol time to go to bed dude.
@rlemon what ?
what do the last three comments have to do with the comment I made
you might have invented it, but you sure didn't master it
OHHHH SNAP SHOTSFIRED
<3
19:58
@RUJordan thats not what your mum said.
I just signed up for Pintrest. What am I doing with my life?
You speak spanish?
lol
@rlemon dick picks, tities all sent to each other when kamasutra was still hip in india centuries ago.
@RUJordan yes slightly.
what does that have to do with an indian man centuries ago having to chisel his dick because there were no cameras
Oh, not sure if you care, but @BadgerGirl did you know I'm actually mostly hispanic?
19:59
like you either really missed the joke, or had a horrible come back.
you choose
My grandmother was born in bogota
@rlemon missed the joke.
Yet my spanish is turrible
My mom speaks it fluently though
okay i really need to sleep
i read bogota as badgergirl
@AbhishekHingnikar lol night man
19:59
2 mins ago, by rlemon
lol time to go to bed dude.

« first day (1271 days earlier)      last day (3902 days later) »