« first day (695 days earlier)      last day (3093 days later) » 

10:00 PM
because that is how you pass it in
 
how shoul i pass it in that instance
nvm
now i get what @FrontpageExpert means
lol
thanks @rlemon good eye
 
nvm @CSᵠ i did it myself, ignore the question
 
@FrontpageExpert and yopu deteleted the gist
 
YOU WERE USING US!
 
didn't even post the question
 
10:03 PM
nerds
 
'contest': do my work
 
@rlemon yes
 
yea he did
 
bastard.
 
:)
 
10:03 PM
-__-
 
fuckha
like this it works: jsfiddle.net/81L3kbm9/1
 
first pair searches and replacements then loop over the term, and loop inside with the new pairings
replace as needed
that would be O(n) I believe
and by pair them, I mean make sure you have pairs.
how you manage the pair index or access is probably not going to effect performance too much
 
map should be O(n) but not sure the implementation of indexOf
not sure what you meant by multiple searches and multiple repla\cements array @FrontpageExpert
and you del the gist
not cool ^
 
@rlemon for each elem, loop searches.... hmm... doesn't seem efficient
 
10:10 PM
you have n arrays
you have to loop twice
or flatten all arrays
which would probably be slower in js
 
flatten once would prolly be bettr
but not sure about details
@FrontpageExpert maybe you could detail here
hmm.. not sure i pinged him properly...
 
details would require (in js) you have to loop them to flatten :P so you are still doing more ops than needed. *afaik
 
@FrontpageExpert @FrontpageExpert @FrontpageExpert @FrontpageExpert @FrontpageExpert @FrontpageExpert @FrontpageExpert @FrontpageExpert @FrontpageExpert @FrontpageExpert @FrontpageExpert @FrontpageExpert @FrontpageExpert @FrontpageExpert @FrontpageExpert @FrontpageExpert @FrontpageExpert @FrontpageExpert @FrontpageExpert @FrontpageExpert @FrontpageExpert @FrontpageExpert
there
 
afaik, there is no Array.flatten(arrays)
you can use reduce to flatten it, but reduce isn't very fast compared to a good old for loop
 
hmm
 
10:13 PM
i don't care anymore i'm offended
 
var flattened = [[0, 1], [2, 3], [4, 5]].reduce(function(a, b) {
  return a.concat(b);
});
// flattened is [0, 1, 2, 3, 4, 5]
you're offended? you passed off a 'challenge' and then deleted it because you figured it out for work. we should be offended.
I'm not, but you really have no grounds to be offended here :P
 
^ true
 
lul
 
anyways, that was an interesting challenge. high fives all around
 
^also true
 
10:16 PM
o/
 
32 mins ago, by Stephan Muller
@CSᵠ he can't figure it out, but he did figure out that to get the best answer is to call it a "challenge" instead of a "question"?
 
29 mins ago, by rlemon
@mikedidthis drinks?
this is when I entered the room. in fact I was sitting on the can typing that :P
ten minutes later I started the code
 
Element.prototype.hasClass = function(selector) {
 
@FrontpageExpert lol, cheer up dude
 
10:18 PM
it often isn't recommended to overwrite native prototypes
a small helper function isn't going to be attached to every element in the dom
 
oh ok, so I should make it a normal function?
 
@rlemon Its disturbing how often your on the can and chat :|
 
@mikedidthis every morning at 6am and every evening around 5:45-6pm
you can set your clock to it
 
> you can set your cock to it
brb getting my glasses
 
10:20 PM
@joshhunt What's wrong with element.classList.contains('class')?
 
@joshhunt in reality it often doesn't effect performance that much, but it should be considered
 
@SecondRikudo availability... try className + regex
 
@SecondRikudo Browser support I think was the reason I didn't use that, let me check
@CSᵠ Doesn't allow decimals
 
@CSᵠ Eh
 
seriously.
mdn provides shims and polyfills for almost everything that can be shimmed or polyfilled
 
10:22 PM
@joshhunt ah, ok but why test for arrays? how is a user gonna input an array?
 
Also @joshhunt -1.0 and -5e3 are valid numbers as well.
 
@CSᵠ you are right, its not needed in this case. its just a function I have saved
 
@joshhunt yea, you get only strings
@SecondRikudo prolly his audience isn't in the academic area :P
 
@CSᵠ Negative numbers at the very least though?
 
@rlemon its better to have a long ass shim than an extra line of code? (serious question)
 
10:24 PM
yes
 
@joshhunt yes.
 
because when the feature is supported you just remove the shim
you don't change your code
 
wait what's a shim
 
shims and polyfills are almost the same thing
105
Q: What is the difference between a shim and a polyfill?

DomenicBoth seem to be used in web development circles, see e.g. HTML5 Cross Browser Polyfills, which says: So here we're collecting all the shims, fallbacks, and polyfills... Or, there's the es5-shim project. In my current project we're using a number of these, and I want to stick them all in th...

 
almost...
reading.. thankx
 
10:26 PM
when I say shim I often mean polyfill
shim just sounds cooler imo
 
faster to type
 
@SecondRikudo yeah, thanks for spotting that
It does actually let you paste in "-1.0" but it doesn't let you just have "-"
 
@joshhunt that's a bug then
to say -2 i have to type 2, then add the - in front...
 
I know, I was just saying its not that it doesn't let you have "-1.0"
BTW thanks for the feedback everyone, I appreciate you helping me learn
 
glad
 
10:36 PM
is there something that helps you implement polyfills? E.g. you tell it what you need to use and what browsers you need to support and it adds the appropriate polyfills?
 
@joshhunt feature detection, thats about it
 
what about a shiv
or was HTML5 Shiv just the name of the polyfill?
 
@cimmanon I was more thinking of an "offline" thing rather than on the fly. As in it would produce a polyfill js file for you to include
 
@FrontpageExpert it was a joke man
don't take stuff so personally all the time
 
@joshhunt i dont understand what you mean
 
10:39 PM
I was still planning on entering my solution tomorrow
 
i was just playing with feature detection, was gonna make something like that
 
Is anyone familiar with IIS?
 
@joshhunt Not sure if I understand you, but you could make use of modernizr's feature detection and use that to figure out what you need to polyfill for whatever you're making?
 
@cimmanon an app or node module or something that lets you say "I am using these JS features (classList, etc) and I need to support these browsers ("IE9+, etc)" and then it spits out a js file with all the polyfills you need to support those features and browsers. Does that make sense?
 
@StephanMuller modernizr seems to be the way to go, any other meantionable alternatioves?
 
10:43 PM
@StephanMuller was my person involved? yes? then it's personal
 
@joshhunt just a hunch, but sounds like monolithic work
 
@joshhunt That would actually be a nice layer on top of modernizr
 
i am constantly under the scrutiny of pretty much everyone here, i don't like that. i'm not upset, but i don't think i need to prove anything to anyone, so just let's move on like always
 
@FrontpageExpert For someone with such a big mouth at times you certainly have long toes
 
@CSᵠ I don't know what monolithic means in that sentence
 
10:43 PM
@FrontpageExpert just prove to yourself, that should be enouygj
 
@StephanMuller eh?
 
!!urban monolithic
 
@CSᵠ monolithic To be completely [drunk].
 
da fuq
 
lol
 
10:44 PM
@joshhunt huge
 
@FrontpageExpert hmm maybe that expression is more common in Dutch. To get stepped on your toes, aka to be easily offended
 
@CSᵠ I guess but not necessarily, MDN seems to have all the polyfills + browser supprt
 
Anyway, moving on. Was a joke, guess once again translation from my mind to text failed me
 
@joshhunt you'll still need to cross refference caniuse with MDN
 
MDN usually has browser support also, e.g. developer.mozilla.org/en-US/docs/Web/API/Element/… (at the bottom)
 
10:46 PM
they lately cite caniuse
 
@CSᵠ This sounds like an awesome idea for something in a hackathon
 
@StephanMuller it does, or a project we all here could embark on...
 
^lol
 
I'm awfully bad at being the driving force behind things like these, with my bad organizing/planning skills and lack of spare time
but I'm definitely game
 
10:49 PM
we have a github org for this chat... github.com/HTML-CSS-DOM-chat
 
@StephanMuller do you actually think i have a big mouth?
 
@FrontpageExpert Sometimes, yes
 
c'mon kids
eat your veggies
 
but I'm a carnitarian
I only eat meat-eaters
 
lol lol
 
10:53 PM
apart from the incident with @KeyboardWarrior, and i apologized for that (even if i was absolutely convinced he was appreciating the manly insulting) i don't think i am mean to anyone here
correct me if i'm wrong
 
@FrontpageExpert seriously now, that was quite a good question, either for SO or Programmers.SE or CodeGolf
not sure if CG has a performance section
 
what is everyone in a huff over?
 
in fact i usually get random insulting by pretty much anyone and most of times i don't care and i don't even reply back since it's not worth my time
 
I never said you were mean. A big mouth can mean a lot of things, you're vocal, you have your opinions at the ready. I'm not saying those are bad things at all. It just surprised when that's combined with taking things personally so fast.
 
honest feedback pls, how shitty is this Q, was considering deleting: stackoverflow.com/questions/13927787/…
 
10:57 PM
@cimmanon I made another joke that got taken the wrong way
I'm not in a huff at all though
 
but i guess that "everyone who identifies himself as a php engineer can suck my dick. no offense @FrontpageExpert" looks like a personal attack don't you think
 
not this time
 
@StephanMuller no, i saw the joke, but it seemed like he was upset before that
 
@Worf dude you can't be serious, i never...
 
@Worf No, it doesn't to me
 
10:58 PM
say welcome to my new nick tho
 
!!tell Wolf ead
 
@Wolf Eat a Dick™
 
lol
 
is that kitler?
 
1st
 
10:58 PM
if everytime my java colleagues said things like "javascript isn't even real programming" or call me a pixel-fucker I would take it as a personal attack I would be pretty miserable
 
because i thought you had to wait a month between name changes
 
its the italian
 
nuqneh room
@cimmanon i'm frontpage
 
PHP has shitty projects in the corp world, JS front-end === jQuery so... yeah... go fight that
 
!!afk bedtime. no offense, @worf
 
11:00 PM
@CSᵠ who is "Wolf"?
 
@StephanMuller hope you die while sleep, no offense @StephanMuller
i said no offense
 
eat my entire ass
4
 
did you notice "no offense"
 
@joshhunt it's the character in the kids story
 
no offense, ok?
 
11:00 PM
(I SAID THAT JOKINGLY)
really off now
 
lol why did you ping him?
 
gn @StephanMuller
tugh qoH nachDaj je chevlu'ta'
 
lang="???"
6 mins ago, by CSᵠ
honest feedback pls, how shitty is this Q, was considering deleting: http://stackoverflow.com/questions/13927787/divs-not-aligned-nicely-when-text-ov‌​erflows-sometimes
 
lang="x-klingon" @CSᵠ
^ properly formatted
 
i am embarrassed to admit that i can write php. its a terrible language that encourages poor programming practices.
if you have to use it to make money, i am not going to judge you for it unless youre going to start telling me that its a great language.
 
11:05 PM
@cimmanon it doesn't encourage, it allows, stupid old tutorials encourage
 
Does anybody use this? cdn.polyfill.io/v1/docs
 
@cimmanon trying to rub salt into it? it's not going to work i'm going to bed
 
forums, blogs and shit
 
@cimmanon oh ok. you are fine for now xD
 
@cimmanon it IS a great language, really! ha!
 
11:08 PM
@CSᵠ eat a bowl of dicks
 
you just don't know enough if you engage in those wars
 
Isn't any language bad in the wrong hands?
2
 
^
 
^
 
@mikedidthis some languages fare better than others.
 
11:10 PM
lol
better is a subjective comparative term
 
i'm going to open a bug if they removed the x-klingon example from the html5 spec
 
lol :)
@mikedidthis expand to any tool in the wrong hands, even any info to the wrong person
 
@CSᵠ pretty much. Guns are the immediate example.
 
the knife, everyone has one, some kill with it
 
i dont want to program anymore.
 
11:18 PM
How come?
@CSᵠ if we are going deep, words.
 
Is there a CSS prop that removes empty space from when I move an element use top: -[number]
 
@mikedidthis uuh, now that's deep
@cimmanon excelent choice madam, could I interest you in some exquisite wine as well?
 
@CSᵠ go fuck yourself.
 
@Matt example?
 
@cimmanon lol, rolf
 
11:21 PM
@Matt jsfiddle
 
Give me a moment and I will put it on jsfiddle.
 
which reminds me lol
 
@Matt its called margin-top, use that instead of relative positioning.
 
Okay, I'll try that real fast before I put it on jsfiddle
 
^. Either that or use absolute positioning.
 
11:23 PM
I can't use absolute.
Cause of footer, but then again I could use another container
margin-top did what I wanted.
Thanks @cimmanon
 
@all yInajchu'
 
dude, how many of us do you think speak that
 
why do you think i speak klingon? it's not even an actual language
just search on google if you are curious about the translation :P
 

« first day (695 days earlier)      last day (3093 days later) »