« first day (525 days earlier)      last day (4423 days later) » 

user1385191
12:51 AM
@minitech that's because filter runs for every single element of the array
 
user1385191
you're looking for some:
 
No, that's not what I'm looking for at all, actually.
Look at the second jsPerf.
 
user1385191
whoops
 
user1385191
forgot about the return value
 
user1385191
12:54 AM
this is what I get for ignoring es5
 
1:16 AM
0
Q: How much PHP do I need to know to use AJAX?

user1146440Hi I am interested in learning to create AJAX calls with Javascript.I already know Javascript and I would like to learn PHP at some point but at the moment I know nothing about it and I don't have the time to learn the full language. How much PHP do I need to know to be able to do AJAX calls? Ca...

 
JavaScript puzzle #2:
 
@mislav Your advice on javascript is bad and you should feel bad. http://mislav.uniqpath.com/2010/05/semicolons/
 
user1385191
> "just to be safe"
 
user1385191
it's a feature for noobs
 
When does a === b but a is not the same as b?
 
user1385191
1:21 AM
why embrace it?
 
@MattMcDonald Sorry, I can't hear you over all this perl code I'm writing.
 
Wow. That is really bad. I hate it when people say that.
 
@a0df-0[423q%@^)Q)@!!)#+%{/[12390-=]?&.9/}{$split.lol}
And there's your pop3 client.
Whitespace is a feature for newbs.
 
user1385191
> I’ve been searching for reasons programmers have to force semicolons on themselves. Here’s what I generally found
 
user1385191
…ever heard of a thing called "C"?
 
user1385191
1:24 AM
guess what? this hack's a Ruby fan!
 
Whitespace is optional, you don't actually need to use it.
Proper variable names are optional.
"Hey everyone, proper variable names and white-space is optional, don't buy into the FUD about using them!!"
 
user1385191
you'd better be careful spreading FUD about FUD
 
Why's that?
Isn't this game just lolcats all the way down?
 
user1385191
dry heave
 
@minitech Why are you randomly linking to nothing?
@MattMcDonald What's the problem?
 
user1385191
(das duh joke)
 
user1385191
MDU was about 9 days between commits
 
@Incognito Um... forgot to commit :P
 
@MattMcDonald Every commit just says completed.
Lol what is this I don't even.
 
user1385191
1:41 AM
click the plus sign beside a commit
 
@minitech Commiting doesn't upload to github.
 
user1385191
it will show the whole message
 
AAahhaha Oh okay there we go.
 
user1385191
I use git commit to dump the commit message prompt to vim
 
that's a cool idea, I notmally just type a short blerb
 
1:45 AM
@Incognito I know. I didn't even commit.
 
user1385191
I only use git commit -m when I'm exceedingly frustrated or handling branches
 
user1385191
(they tend to coincide)
 
Okay, now pushed :)
I just started it like 30 minutes ago but it will be a faster replacement for everything ES5 missing in IE8.
And DOM4.
 
Does every Javascript dev write libraries in his spare time ?
 
1:50 AM
@copy Yes.
 
no
 
And when we finish one library, we write it again but slightly different!
And this isn't my spare time. I'm supposed to be doing my job.
 
GGG
ok i need to know some css terminology
what are the parts of the selector that are separated by commas
and then within those parts, what are the parts that are separated by spaces
 
Huh... I asked that once.
 
GGG
i'm calling them "parts" and "chunks" and i'm sure that's wrong
 
1:52 AM
7
Q: What is that thing between CSS "selectors" called?

minitechWhat do you call these: body > p + p in a CSS selector? Are they: Relational operators Position-based criteria Something else? I just have no idea what to call them. Is there an official name? (And, also, are there official names for a b c in a b c, d e f and a in a b c?)

So I can give you "combinators" as the \ , +, ~ and >...
Argh. Stupid Markdown escaping.
 
GGG
ah ok
 
Usually I call them single selectors.
But it's probably not official.
 
GGG
so they just treat space as a descendant operator
 
Well, raynoes does, rlemon, matt, minitech
 
GGG
that makes sense
 
1:54 AM
@minitech You're 14, you should not have to work already
 
GGG
and the commas are "combinators"
got it
+1 =p
 
user1385191
@copy I've writing one because I need a job
 
user1385191
and I have 0 to show besides it
 
@GGG Nonononono
 
GGG
?
what
 
1:55 AM
The space, tilde, plus sign and closing angle bracket are combinators.
 
GGG
oh
well what are the different parts separated by the comma =/
 
The comma might be one too, but no, the space and the other ones aren't operators.
I don't know. In the documents they just call them "selectors".
If you're building a library or something, just say "chunks", people will understand =)
 
GGG
oh i see what u mean
it's all internal stuff
there must be names for it though
 
@copy It was a bad decision. But my contract's over soon, at least.
 
GGG
i want to know the name of the sections between the commas and the name of the things between the "combinators" (mostly space)
 
user1385191
1:58 AM
> A descendant selector is made up of two or more selectors separated by white space.
 
GGG
so the individual things are "selectors"
then what's the whole thing between the commas
 
Also a selector.
 
GGG
mmm
 
And the whole thing? It's a selector, too :/
 
GGG
what noo
that's no good
 
Anybody want a regular expression to validate e-mail addresses?
It's the right one this time.
((([a-zA-Z0-9!\#\$%&'*+\-\/=?^_`{|}~]+|"([a-zA-Z0-9!\#\$%&'*+\-\/=?^_`{|}~(),:;<>@\[\]\.]|\\[ \\"])*")\.)*([a-zA-Z0-9!\#\$%&'*+\-\/=?^_`{|}~]+|"([a-zA-Z0-9!\#\$%&'*+\-\/=?^_`{|}~(),:;<>@\[\]\.]|\\[ \\"])*"))@((([a-zA-Z0-9]([a-zA-Z0-9]*(\-[a-zA-Z0-9]*)*)?\.)*[a-zA-Z]+|\[((0?\d{1,2}|1\d{2}|2[0-4]\d|25[0-5])\.){3}(0?\d{1,2}|1\d{2}|2[0-4]\d|25[0-5])\]|\[[Ii][Pp][vV]6(:[0-9a-fA-F]{0,4}){6}\]))
Whee!
 
user1385191
/(cthulhu awaits)/
 
GGG
MattMcDonald thanks that's what i was looking for
 
@MattMcDonald That's understandable. It kind of leads to a big number of unused (mostly bad) libraries and a small number of good applications though
 
user1385191
my intent is not just a pet project
 
user1385191
2:02 AM
it's something I've had on my mind for a long time
 
GGG
wait no that doesn't help
 
What's everybody's local time around here?
 
10pm
 
hi all!
Quick question: is there a way to change the navbar background in the twitter bootstrap ... I would like it to be green ...
 
user1385191
CSS
 
GGG
2:18 AM
0
Q: Correct terms for sections of selectors

GGGWhat is the correct term for the sections of CSS selectors that are separated by commas? body.foo .login , body.bar .login { ... } /* | Part 1 | Part 2 */ Within those sections, what is the term for the parts separated by combinators (spaces, +, >,...

 
Thanks
good night!
 
@Incognito I read that article and it seemed like good advice. y u bash?
 
@ThomasShields Because semicolons actually aren't optional.
 
@minitech why not?
@Incognito I was serious. feels stupid :(
 
2:28 AM
@ThomasShields Um... they just aren't. Okay? If I see any JavaScript code without semicolons, I break the author's legs with an iPad.
Or maybe I just add them.
 
@minitech "they just aren't" - yeah, i'm totally going to just accept that and move on.~
Seriously, why use them?
 
@ThomasShields Stop feeling stupid, just say the think you think and ask why people are saying something else. Why do you think it is good advice?
 
(I do, btw, so i'm sort of being devil's advocate here, but still)
 
@ThomasShields Really unsure if trolling me now.
 
@Incognito well, he seemed to logically dispute the reasons listed for using semicolons
 
2:30 AM
@GGG selectors dude
 
Not trolling. I use semicolons, but I'm not sure why.
 
GGG
@Incognito i'm getting subatomic on selectors bro
 
@ThomasShields More like contradicted his way out of his own bad practices...
@ThomasShields Red flag #1:
The JavaScript engine adds the semicolons for you.
 
@ThomasShields I think it's something you won't run into until you work on larger projects. you basically want maintainable code.
 
@minitech you keep saying stuff with a super-obvious bias and really no actual argument. convince me, please
 
2:31 AM
Why use proper variables when stupid names work?
 
@Incognito now that's a stupid statement
 
@ThomasShields Hey, I was just getting started! Let me start with an interesting hook at least.
 
haha, go for it
 
@ThomasShields Why?
 
Okay. The JavaScript engine needs to know where to end a statement.
 
2:32 AM
It works man, and I know what they do.
 
Who's talking to who now?
 
@Incognito well heck, you want someone else to be able to read and understand your code
 
var x = foo, buz bang, bop beep() floop derp. What's the problem?
 
@Incognito no one but you knows what they do
 
You don't say.
 
2:32 AM
@Incognito They're missing semicolons.
:)
 
So I guess the similar argument is that without semicolons, your code becomes a jumbled crap load of spaghetti?
that only you understand?
 
Not really.
More like it can become a mess of grammatical ambiguities.
 
It's creating needless ambiguities that are resolved for no additional thinking.
 
And hard to read to boot, because if you don't use a semicolon to end a statement, when you put in newlines for aesthetic purposes, they look like end-statements.
 
I hate one-line-if statements.
 
2:34 AM
Then there's the edge case that this person mentioned.
The proposed solution of
;(a + b).whatever()
or whatever it was that he mentioned...
 
var x = 5, //okay, variable declaration...
      y = 7  //okay, there's a comma in the last line, another variable declaration....
      z = 9 //wait, is this a modification of an existing variable? or did he forget the comma? crap.
 
if (true) doesThisRun();
Whataboutthis()?

if (true)
DoIRun?();
 
is just stupid.
 
would my last message be an example of problems?
 
@ThomasShields Yeah. Now z is global.
If JavaScript didn't insert semicolons, this would be a syntax error and not happen.
Life would be better.
 
2:36 AM
yeah, okay
 
Unfortunately, JavaScript was built with ease-of-use (?) in mind.
 
convinced
 
Ooh, hate mail.
</off-topic>
 
Hey guys I'm a bit stuck on this project, mind taking a look? Thanks
0
Q: jQuery .show/.hide/.toggle Not Working in Certain Circumstances

user1067458I have 2 div's that I need consecutively toggled back and forth showing and not showing. Here is my current jQuery code $(document).ready(function(){ $('a:link').click(function(){ $(".surveycontainer").toggle(); $("#check").toggle(); }); }); Note #check is hidden on page load...

 
@user1067458 where did you cut+paste your code from?
 
user1385191
2:41 AM
how Certain are these Circumstances and why is the code Not Working?
 
My cPanel but I cut a bit out of connecting to the database and crap for ease of reading
A fix was just posted! Thanks god
 
user1385191
> target="_blank"
 
user1385191
AAAAAA
 
NOOOOOOOOOOOOOOOOOOOOOOOOOO!!!!
 
That wasn't the issue bro
 
user1385191
2:43 AM
1999 wants their anchor tags back broheim
 
What's wrong with target='_blank"?
 
Nothing.
I think.
'Course, I learned most of the stuff I know about HTML from a book written in 1994.
 
Ah ok I see
 
So maybe it is bad.
 
user1385191
I know XHTML Strict bans it
 
2:45 AM
@MattMcDonald What for?
 
Does anybody know why IE is such a bitch and won't let you do anything?
 
@MattMcDonald There's not exactly an alternative.
 
user1385191
but today's browsers give users a myriad of options to deal with links
 
What should I do to work around it?
 
user1385191
write better code
 
user1385191
2:45 AM
if I can write a DOM library that works in Opera 5, you can write code that works in IE 8
 
Is that just some BS answer or are you being serious? As far as I know there is no other way to do what I am trying to do
 
@user1067458 There's your problem.
 
Isn't IE better with jQuery than advanced Javascript? What is my problem?
 
/ragequits.
 
user1385191
2:46 AM
@user1067458 does not compute
 
Lol sorry boys
I'm trying to learn, teach me.
 
This conversation has lost all meaning.
What little it had disappeared into the void some time ago...
Has it been centuries or milliseconds?
Well, both.
 
user1385191
want code that works in IE?
 
user1385191
do your homework
 
user1385191
2:48 AM
enjoy
 
Thanks. Do most of you basically write 2 versions of your webpage? 1 for IE and another for normal browsers that don't suck?
 
user1385191
@user1067458 nope
 
user106745 Yes
 
Argh.
 
user1385191
I have 0 characters of code that are browser-specific (in my current project)
 
2:51 AM
Does it normally depend on the project? In other words, if I had to could I write an entire separate version that will work in IE then use an IF statement to decipher the 2?
 
user1385191
nope
 
I use the HTML5 shi[v|m], but I could always scrap it and drop back to HTML4.01 if I wanted
 
someone wanna tell me wtf this site is:
http://www.tizag.com/webhost/a/
?
 
Then what should I do Matt McDonald?
 
it almost looks as if tizag was defaced
 
2:53 AM
First thing first, know your audience. Prioritize.
 
user1385191
regardless of audience you should use the same strategy
 
user1385191
degrade gracefully—including scripting
 
No you shouldn't
 
@user1067458 jQuery is very good, especially on IE6+
 
user1385191
even if you're building a bleeding-edge demo you should gracefully degrade
 
2:55 AM
OK good. I am trying to use pure jQuery but it still is screwed up in IE9
 
user1385191
just serve static content to those environments that can't handle the heat
 
@user1067458 "pure jQuery"?
@user1067458 oh you mean the language "jQuery"? =]
 
user1385191
<p>Your environment doesn't support feature X. Here's some amusing images to pretend to giggle at.</p>
 
Yeah I mean for scripting purposes I am trying to use mostly jQuery and not Javascript
 
If you're making a financial website you probably want it to support IE6 well since many big companies still use old software which depends on IE6... If you're making a gaming website revolving around modern gaming consoles you will find that the least of users are using IE. It's about prioritizing.
 
user1385191
2:56 AM
versions are irrelevant
 
@user1067458 that's a very wise choice
 
user1385191
I feel like I've said this dozens of times
 
user1385191
build with flexibility
 
user1385191
you never know when your "audience" might shift
 
andrewjackson the problem is I have no javascript yet IE still hates my code
 
2:58 AM
@user1067458 well, I find it's always best for beginners to learn on the jQuery language
 
user1385191
"browser X or get out" is a tired mindset that continues to propagate throughout the web community
 
one sec, I'll give you some resources
 
@andrewjackson dude, quit screwing with him
 
I don't understand how every single browser out there will support things like such but IE, owned and operated by big Microsoft, doesn't.
 
user1385191
it's partly why I have such contempt for the JavaScript community
 
2:58 AM
@user1067458 you do know jQuery is Javascript, right?
 
user1385191
they're too busy fawning over 3d animation in Chrome 200 beta to care about other environments
 
I hear this is a *great* site to learn jQuery on:
http://www.w3schools.com/jquery/default.asp
 
Thomas I realize that I just think of it has a "almost different" language because of how differently it is supported.
 
user1385191
jQuery is a DOM library for people who don't want to interface with the DOM
 
@user1067458 er, Javascript supports more browsers than jQuery.
 
user1385191
3:00 AM
users are expected to run code through the massive $ function wherein DOM nodes are "selected" and then built into a gargantuan object over and over and over and over again
 
Who in the hell actually uses IE anyways dafur
 
@user1067458 people who have it forced on them by government or IT. Old people who don't know a web browser from a website. People who see the "Beauty of the Web" campaign and don't realize Chrome is still way better.
 
user1385191
ding dong
 
user1385191
nailed it aside from the Chrome bit
 
Alright well I guess for this feature I won't support it or support it later on considering people using it shouldn't be complete scrubs anyways.
 
3:03 AM
@MattMcDonald (couldn't resist =P)
 
I use Chrome
 
@user1067458 afaik about 65% of the internet
though it used to be 80%
 
.....damn
Alright I guess I'm going to have to find some way.
 
user1385191
var isNode = !!(node && typeof
	node.nodeType === "number");
if (isNode && typeof
	node.className === "string") {
	node.className = "hey there joe";
}
 
user1385191
hey look; code that works in tons of environments
 
3:05 AM
That code looks like a bitch.
 
@user1067458 what I don't understand is... how can jQuery be supported by more browsers than jQuery, when jQuery is just something made with Javascript? hmmm?
 
@user1067458 please explain this, because I'm new to programming
 
user1385191
those two methods are the backbone of about 2400 lines of code
 
3:07 AM
Dude bro I've read a lot and have been told to use jQuery over javascript and it is better supported by IE.
 
> environmentsThisCodeIsNecessary / n < .001
true
Too bad :-/
 
I aint no mofo master but that's what I get. Is that true or am I a shit?
 
user1385191
@user1067458 that's like telling me that you've read Playboy a lot and know how women work
3
 
@user1067458 hey can you help me make a function? I want to know how to make a function in jQuery
 
Dude I never claimed I knew what I was talking about jessus
I'm just asking for opinions good god
 
user1385191
3:09 AM
you're reading the wrong material
 
user1385191
you won't find enlightenment in 99% of all blogs
 
@user1067458 oh... because I'm new, and you're talking about jQuery, and you're the only one making sense to me, so I just thought you know how to make a function
 
user1385191
(I'm not trying to be antagonistic)
 
@user1067458 everyone else seems to be saying not to use jQuery, but that can't be right. surely it's bs, because I read something else somewhere....
 
andrewjackson
chat user since 2011-06-01
you are new my ass?
1.3k
this week
1.2k
last week
1.3k
per week
 
user1385191
3:11 AM
tone down the emotion
 
user1385191
@copy try applying some of that code to new features
 
user1385191
it's the same concept
 
user1385191
4 messages moved to bin
 
user1385191
off to the sandbox
 
user1385191
2 messages moved to bin
 
3:13 AM
@user1067458 I'm new to jQuery I mean
 
user1385191
if (isHostObject(node.classList)) { [...] }
 
user1385191
etc.
 
user1385191
2 messages moved to bin
 
@MattMcDonald It's a good idea, but probably size and bad performance overheads will kill it
 
user1385191
@copy the speed losses right now are because I don't fork natives
 
user1385191
3:14 AM
that will change
 
user1385191
6 messages moved to bin
 
don't go near jQuery until you've learned Javascript enough to understand why it's unnecessary, or else you might never learn it well enough to understand
 
user1385191
s/JavaScript/the DOM/i
 
@MattMcDonald you didn't give me a chance to flag
 
user1385191
here's some more academic material:
 
user1385191
3:16 AM
enjoy
 
@MattMcDonald If you additionally write a script that removes error messages from production code I might actually find it a useful library :-)
 
user1385191
heh
 
is tizag.com another w3schools?
 
user1385191
close
 
3:21 AM
both sites have been good to me, in terms of a quick reference, but it looks like tizag was somehow defaced on one of it's pages, so it can't be that good. =/
I have an idea.... let's have tizag =]
`www.tizag.com/about/report.php?tutorial=Beginner%20Tutorial&lesson=First%20Webpage%22%3E%3Cscript%20type=%22text/javascript%22%3Ealert('lolololololol');%3C/script%3E`
does chrome have some built in protect for this?!
since when do browsers fix developer's stupidity? oh... wait....
that's sad
I'm willing to bet report.php stores data in flat files
 
3:46 AM
Hey! I made a JavaScript. Take a look.
 
http://www.tizag.com/htmlPractice.php
"
\
\\
outputs:
"

\
=D do I smell a flaw?
maybe not, but could be
actually, probably not, since a newline is still made
https://www.google.com/search?q=tizag+xss
first result lmao
 
 
2 hours later…
5:37 AM
has anyone considered factoring in cost of living rates for placing a bid on a project, when acquiring clients from around the world?
I'm moving to some country like Kansas where cost of living is low, so that I can telecommute with some company based in North Dakota where cost of living is very high.
it's fool's proof
I'll be a millionaire in a year
it's so good it seems like troll physics
damn it, don't tell me the Indians took my idea already
 
@andrewjackson Do you have any Issues with Indians?
 
@Pankaj do you have an issue with me having issues with Indians? don't be prejudice >.>
 
@andrewjackson I am just asking coz you comment says so
 
they terk our jobsssss!!
 
They toook our jerrrrrrrrrrrrbs
 
5:48 AM
@andrewjackson :D
 

DNA development

DNA, RNA, proteins computing
 
I came here to put this steps of yours as you told me last day
step 1) start fresh
step 2) prepare your first page/tab
step 3) add your second tab
step 4) make a function to switch between tabs
step 5) when your function is working, add another tab that should work exactly the same
step 6) if that works without a flaw, add the rest of the tabs

I am starting this fresh hope I'll get some result
 
last I knew it was working without flaw
if you're gonna start fresh, I recommend trying to right the entire thing without jQuery
 
@andrewjackson Yea but it wasnt me who build the JS code I dont know anything about JS so today I am going to make my first Hello world tabs :D
@andrewjackson I really dont have good knowledge in JS. so its like complete beginner
 
5:52 AM
well, at least you're not calling it "Java" or "jQuery"... off to a great start already
just whatever you do, if you want to be good at it someday, don't use jQuery to learn it
 
@andrewjackson Yea I'll keep this in mind that I have to stay from Jquery. but everybody told me to learn jQuery instead of JS I dont know why.. But I am taking your advice because you helped me last day :)
 
@Pankaj first of all, jQuery is a book and you're trying to learn how to read... how does it make sense to learn the book instead of learning to read?
 
jQuery is javascript. its just an abstraction layer above the DOM. you need to know the syntax and semantics of using the DOM directly or to use jQuery.
 
@andrewjackson So firstly I should, learn how to read then I should pick some book for reading practice
 
I would hope somebody would know about document.getElementById and etc before they used jQuery, though.
 
5:57 AM
@Pankaj the problem is that all of your Indian buddies that write shitty code and get a bad rep in this room, are the ones that are telling you to learn "jQuery instead of the language jQuery is written in."
@Pankaj yes, that's better than the other way... though, if I had it my way, you would be learning jQuery just to learn good reasons to make fun of it.
 
You don't start reading Shakespeare right away, start with the news paper first.
 
@andrewjackson may be
 

« first day (525 days earlier)      last day (4423 days later) »