« first day (984 days earlier)      last day (3969 days later) » 

10:00 PM
@Zirak is it supposed to take a year to load?
 
@web2students.com why would you spell judge correctly then judging wrong?
 
!!> !!Infinity
 
@jAndy true
 
nice
 
now i'm just being a bitch.. but really.
 
10:00 PM
while( Infinity ) { }
I like that expression
 
those jokes are bad, and you should feel bad.
 
I need an example of a non-polyfill shim
 
take for example ... what am I looking at here?
 
Anything that doesn't have to do with the web
 
@Zirak is the bot actually in other channels beside javascript ?
 
10:01 PM
why is this funny?
 
@rlemon spelling auto correct tells me judge and judging both
 
@jAndy Click on the bot's avatar in the user list to the right
 
and you said jugging
 
In computer programming, a shim (from shim) or shiv is a small library that transparently intercepts an API and changes the parameters passed, handles the operation itself, or redirects the operation elsewhere. Shims typically come about when the behavior of an API changes, thereby causing compatibility issues for older applications which still rely on the older functionality. In such cases, the older API can still be supported by a thin compatibility layer on top of the newer code. Web polyfills are a related concept. Shims can also be used for running programs on different software pl...
 
@ŠimeVidas wine in linux.
 
10:02 PM
look for the little red underlines
they fix all
 
@Zirak oh nice
 
except jugging, because it is a word.
 
@ŠimeVidas Object.create?
 
@Zirak Wait in the context of web apps, there are no non-polyfill shims?
 
why C++ and Java don't have a bot instance
 
10:02 PM
@rlemon actually it's not a joke, it's reality my adsense earning is really increased but still $1/week only
 
ignorant bitches
 
which leads to the confusion, was it a typo? or?
 
@NagaJolokia That's built-in API
which can be polyfilled (partially)
 
@web2students.com if your content was better you might see more return visitors.
 
@ŠimeVidas Again...I'll say...if it's aimed for browser compat, as in "this is supported in browser A but not in older browser B", then it's a polyfill, and it's a shim (because all polyfills are shims)
 
10:03 PM
where would you put "duck punching" and "function hooking" in the context of Shims / Polyfills ?
 
pull that bad boy up to $4 / week
 
same thing ?
 
scrolling up to check how much time I've wasted on this shit
 
@ŠimeVidas Yeah, that's what I meant: you can't fully replicate the native API.
 
26min
 
10:04 PM
Maybe that's not a good example.
 
So something implementing form functionality in Firefox is a polyfill+shim. Something which overrides the function constructor to give birth to ducks is a shim.
Just call everything a shim, polyfill isn't a word.
 
@rlemon sorry, i am trying my best, i can't improve anymore. if you wanna improve my earning, suggestions are welcome.
 
@ŠimeVidas Okay, how about if you wrote functions called addClass and removeClass instead of using the classList API.
 
I love the term duck punching :( punching ducks it just way more fun
 
2 mins ago, by rlemon
@web2students.com if your content was better you might see more return visitors.
^ suggestion
 
10:06 PM
and its a good bridge
 
and i am sure you don't want to work with me as partner, so i am not asking this
 
punch the duck for so long till it has the form you want it to
 
1901: "cyberspace isn't a word"
@NagaJolokia That's jQuery, which isn't a shim as we've established
 
 
@BenjaminGruenbaum There's a bit more to jQuery than that.
 
10:08 PM
@NagaJolokia What?
 
@rlemon there is no doubt, if content was better users will return, but how to write is problem
 
write it in your native language.
target those users
 
@ŠimeVidas Wow, you found an example of someone predicting the future wrong. That means all predictions must be right.
 
@BenjaminGruenbaum Oops sorry. That was @ŠimeVidas.
 
I'm saying that over time new words are introduced to the language
If polyfill is widely used, it's de facto a word.
 
10:10 PM
From now on, "flumbersnapper" is a type of cactus which eats baby seals at night.
4
You'll eat your words one day
 
snazzy napper
 
Flumbersnapper is streets ahead
 
Final question: Is this a shim?
window.alert = function (message) {
    console.log(message);
};
 
snazzy napper is a real thing actually :P
 
@NagaJolokia You pinged a way old message too :P
 
10:11 PM
but its not as great as the shake weight
 
Yes, you can call that a shim.
 
this is so hilarious
I literally pissed myself
 
Need a change of pants?
 
I can't hold it when the musician guy after the AD can't stop laughing
 
I figuratively opened that video because I was curious.
The south park episode is funnier
 
10:13 PM
Remember when "literally" had a meaning, and wasn't a vague replacement for "really"?
Which is another stupid slang word
"I really laughed"
 
@BenjaminGruenbaum Weird! I blame that on the iPad. It seems to put old message IDs in the input box for some reason.
 
typing in native language is tough..anyway i will try
 
I think the worst hipster slang word is "like"
 
I wonder what would be a good appropriate usage for "literally"
 
its overused.. like.. hardcore. like.. insane
 
10:15 PM
When you actually pissed yourself, "I literally pissed myself" is a valid use.
 
I was like... and then he was like... and I was like....
'MURICA
 
thats san francisco style dude
I phoned a couple of times with dev's in frisco
 
It's meant to disambiguate between the literal meaning of the sentence and a common, alternative sentence
 
every second word is..like
 
There are stupid people everyone who use stupid language.
cockney english isn't any better.
 
10:16 PM
90%people think that 90% people are stupid.....so stupid
 
@web2students.com You are stupid.
 
I always thought about literally, like a mixture out of really, and almost
so "I literally pissed myself" didn't happen of course
 
@web2students.com Excuse me, I'm going to drown myself in a parking lot.
@jAndy But it's not!
 
but the meaning is different than "I really pissed myself"
 
That's literally not how you use it. Er...
 
10:17 PM
which then really would have happened right ?
 
@jAndy It literally is.
 
Why do you know about articles from msn?
 
Why do you know the dark side of the moon?
 
10:19 PM
@Zirak I'm a Microsoft fanboy (ycombinator)
 
I haven't seen flumbersnappers lately.
4 messages moved to Trash can
 
I bet al quaida is promoting the snazzy napper
 
@Loktar ^ it's a little better with quadraticCurveTo but still not 'smooth' :(
 
10:21 PM
oh shit.. now we have US and british secret services eyes on here
 
lol
that literally is censorship!!
 
That is fuck you
 
mad zirak is mad
 
gist.github.com/rlemon/5639120 you can just run this for now. :P change the 'bin' room to the joke room
 
10:26 PM
censorship allows you to imagine more than actual
 
Pulp Fiction is aweosme
 
ok, if it's just because I'm in a bad mood now, tell me. However...
room mode changed to Gallery: anyone may enter, but only approved users can talk
 
APPROVED !
 
!!/mute 1348066 1h
 
@Zirak Muted user 1348066 for 1h
 
10:27 PM
!!/mute
 
how does that actually work ?
I mean, how does the bot mute anybody ?
 
!!tell jAndy help mute
 
@jAndy mute: Mutes a user. /mute usrid duration Duration should be in the format n[mhd] for n minutes/hours/days. If only n is provided, minutes is assumed.
 
10:29 PM
I meant it more in a technical way
 
Read the gist
 
^
 
If that's not technical enough, read the source: github.com/Zirak/SO-ChatBot/blob/master/source/plugins/…
 
@Zirak Object.iterate ?
 
10:31 PM
Y U define methods on the object prototype ?
 
Because I can
 
0
Q: addClass/removeClass extension to HTML5 API

Hiro ProtagonistUnlike the HTML 5 version of toggle which toggles a single class on and off I needed a different functionality. Basically I needed to toggle between more than one class such that only one class can be set at any time. Just like a radio button. I didn't want to add a bunch of methods...so i onl...

 
@Zirak Yeah but it's bad practice -_-
 
Blah blah blah
 
@Zirak I like your style, reminds me pretty darn much on my own. If you were a girl I'd ask you for dinner now
 
10:32 PM
@Zirak I never took you for someone who didn't mind writing bad code.
 
@jAndy I'm way out of your league, boy.
@BenjaminGruenbaum I don't think it's bad code
 
@BenjaminGruenbaum It’s not bad code.
 
@minitech Yeah it is.
 
Well, some parts of the bot are. Some parts stink. But that part isn't so much
 
It’s a shiv for something that doesn’t exist yet!!!
 
10:33 PM
@BenjaminGruenbaum its not bad code.
 
!!!
 
@Zirak Yeah you do.
 
@minitech crudely crafted stabbing device?
 
@BenjaminGruenbaum I blissfully, honestly don't.
 
@Zirak Nope, not buying it.
 
10:34 PM
See how Array.prototype.first is defined
 
@Zirak Why?
Just… why?
 
To protect from flumbersnappers.
 
@Zirak Right, now had you defined it as Array.prototype.find and checked for a native implementation that would have been acceptable - because that would have been an ES6 polyfill. However, if they define first to do something else - you're fucked.
 
You should use indicesOf instead of indexesOf
 
Or do you want cacti to eat baby seals at night?
@BenjaminGruenbaum Absolutely!
 
10:36 PM
@BenjaminGruenbaum Is that de-find in ES6?
(Haha, get it? De… find…)
 
@minitech oh, nice catch, thanks. I always mix those.
 
@minitech I need jokes explained to me, would you mind elaborating on how that one went :P
 
@BenjaminGruenbaum Defined/de-find, referring to find
 
@Zirak Why are you sticking stuff on natives? That's offensive.
@minitech Ah, hahaha. I get it now, so funny
please kind sir solve my jQuery bug it's urgent
 
He's only laughing because you're a mod.
He doesn't mean it. His laughs are fake.
Like his orgasms.
 
10:38 PM
@Zirak You use tabs. Can I ask you out to dinner after @jAndy?
 
@Zirak You know that's not true, baby
 
@Zirak lulz that first method indeed is borderline'ish :p but I like it anyways
I mean.. the code, but to define that name on the prototype also is borderline :P
 
@Zirak Seriously though, stahp extending natives for no reason, lift, or invert the relation or use auxiliaries.
 
Nope!
 
@BenjaminGruenbaum Are you talking about Object.merge et al?
 
10:39 PM
Although… why do you switch between nested function declarations and function literals in the same code?
 
@Shmiddty He has a bunch of methods that rape the prototypes.
 
@minitech we can have a threesome
 
@jAndy How old are you? minitech is 15 you know :P
 
extending the prototypes - ALL THE THINGS
 
@Zirak How old are you?
 
10:40 PM
@minitech Pure whim and evolution. I wrote different parts of the code at different times, spread over the last year and a half, so my style changes.
In some files I even used underscores.
 
TABS > SPACES
 
@BenjaminGruenbaum 92, but I'll be 93 in a month.
 
@jAndy this.toString()
 
!!/fuckable 92
 
:|
 
10:41 PM
@BenjaminGruenbaum A person that age can shag down to 53, and is the lower limit of a person of 170 years.
 
you said that over a year ago
 
@minitech yea its mandatory
 
He's senile
 
@Zirak You may not have a threesome with jAndy and minitech, soz.
 
@jAndy But is it consistent?
 
10:41 PM
Oh, dear. And I wanted it so badly.
Hey...I don't think I can be the sexual companion of anybody in the chat
 
@jAndy prefer String(this) - works for undefined and null too :P
 
@minitech like every native "type" has a toString() method
 
@jAndy I was going to say what @Esailija said.
Only he ruined the suspense. >:(
 
@BenjaminGruenbaum oh you so clever
 
That was a victory dance. Because nobody in this chat can shag me without it being weird according to The Law.
 
but I actually can't remember why I explicitly call toString() there.. lol
 
@Zirak Also, the site that hosted that image is really weird
 
but I know it has a good reason
 
@jAndy So that when people do String.prototype.sFormat.call, indexOf exists. Probably.
 
10:44 PM
@Zirak I know some old people who can.
 
Hello, Im having some trouble setting up the time (live) for when a database in php was last updated: I'm thinking it has something to do with the php variable, but not entirely sure. See here for the code: codeshare.io/RTZZS . the mydate var is printed to the console as Wed Jun 26 2013 14:29:35 GMT-0700 (Pacific Daylight Time) (as 2:29 California time is the last time the database was updated)
 
I don’t like your sFormat.
There. I said it.
 
it does have a good reason but String or "" + is more robust and for same reason
 
var i = 0;

return String(this).replace(/%r/g, function() { return args[i++]; });
 
@minitech could you handle please handle this for us: stackoverflow.com/questions/17330772/… ktnxbye :D
 
10:45 PM
@minitech whats not to like
 
the O(N²)
your indexof starts from beginning on each iteration, and replace too
 
I don't like how he extends the prototypes of everything for no reason whatsoever -_-
 
Who wants trash buttons? Click the button, click the message. Boom. Binned.
 
@rlemon I do I do I do
Does it also work IRL?
 
it's the painters problem joel spolsky talks about
Shlemiel the painter's algorithm.
 
10:48 PM
@PeeHaa Suspended, because.
Because wow.
 
yay <3
 
@JosephGregory 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.
 
Aw, I missed the fight.
 
What fight
 
@minitech how is that supposed to work ? -> create a fiddle
 
10:50 PM
@minitech suggested a superior algorithm
there is another pitfall with .indexOf
 
when you do startsWith / endsWith, it's easy to use indexOf to get a nice O(m*n) algorithm instead of O(m)
 
Bit of a simplified example, but you get the point.
 
so look out for those too
 
@minitech does that replace callback work reliably in that way cross browser ?
 
10:54 PM
@jAndy Yes.
 
then, I literally like it
 
it's not really doing any formatting
 
See es5.github.io/#x15.5.4.11 for a sort of vague reference
But it works using lastIndex so you can assume they’re in order.
 
@minitech C#'s formats are a lot prettier jsfiddle.net/eXjp2
 
@BenjaminGruenbaum Yeah, I use npmjs.org/package/index-format personally.
 
10:56 PM
100x more useful with just as simple implementation.. I like it
 
@BenjaminGruenbaum C# allows formatting mutation as well {0:C} etc
 
I dislike extending the natives though
 
$(this).parents('ul').find('.like_list2').html('ok');

<ul><li class="like_list2">kkk</li></ul>

Oes anybody know why this is not working?
 
@Shmiddty Yeah, like Python, I was not implying this solution is complete :P
 
@Arthur What’s this?
 
10:57 PM
@minitech to change the text kkk after click
 
@BenjaminGruenbaum nice one
 
@Arthur No, what's $(this)
 
@Arthur No, what is the value of this in $(this).parents('ul').…
 
@BenjaminGruenbaum and why is that? Of course not for general purpose libraries ok to do that unless you opt-in but for applications why not?
not ok*
 
@minitech What's this?
 
10:58 PM
@Esailija It's rule of conduct, I think C# solves this nicely with extension methods, you get the same syntax but don't change the object outside.
 
I can't believe my eyes!
 
@Esailija Imagine the same thing, only scoped.
 
$(document).on('click', '.not_like', function() {
$(this).parents('ul').find('.like_list2').html('ok');
}
 
yes C# is much better and I have that in my templating language too =)
 
I'm taking off
 
10:59 PM
@Arthur What's .not_like?
 
can't handle the nicfit
xoxo
 
@Arthur Where is .not_like relative to the other stuff?
 
you can call "".stuff() without stuff being in string prototype.. it's magic
 
user1125394
!!/choose .toString() +''
 
a classname of div
 
10:59 PM
@cx ?
 
generally its bad practice to extend host and native objects prototype, but in very special cases I think its very powerful and therefore useful
like in this case
 
@Arthur ...where's said div?
 
@Esailija Reading that article now, boy am I glad for high-level languages.
 
thats also why I originally named it "sFormat", so the chance this is every used natively is very small zero too
 
user1125394
@CapricaSix why you no undertsand formatted code
 
11:00 PM
"format" is again too common
 
<div class="not_like">Don't linke</div>
 
@Arthur You probably should narrow down the code/problem and jsfiddle it
 
@SomeKittens yeah when you do the same in Javascript V8 and SM both optimize it not to use the painter's algorithm actually
 
@cx <code>.toString()</code>
 
user1125394
really? ok
 
11:00 PM
@jAndy FTFY
 
@HamZa Ok i will
 
One of these days I'll finish Learn C The Hard Way and reach the next level of hackerdom.
 
@Arthur Make sure your doctype allows the placement of that div where ever you're placing it, also. Check the developer tools to make sure the div renders inside the ul
 
@BenjaminGruenbaum damn I really like your implementation of it, never used the C# style, but I have to say it owns
originally I was aiming for a sprintf-shim, since we have no real types in JS, one placeholder is enough actually
 
Microsoft made a C# library for JS, it sucked though because it extends the native prototypes :P
var Str = {}; // What's wrong with this?
Str.format = ...
 
11:04 PM
2 lines and you haven't even called it yet
 
I wouldn't completely ignore this option @BenjaminGruenbaum. Extending prototypes is one of ECMAscripts greatest features, used wisely its very powerful and awesome
to just ignore it close-minded is not a good thing
 
How about: do whatever you want
 
@minitech How about: write code that plays nice with other code?
 
its like dogma and tunnel vision, same thing with eval
 
jsfiddle.net/v4Fu4 You see when you clicked on "Don't like" kkk doensn't change
 
11:07 PM
@BenjaminGruenbaum And extending native prototypes with names that will never be used, in your own application is bad because…?
 
@jAndy No, it's really not tunnel vision, it's battle scars.
 
@BenjaminGruenbaum nah, I don't think so
 
@minitech "Names that will never be used"? You think 'format' is an unreasonable name for an ES6 string method?
 
why ignoring an entire (great) language feature just because of dogma
 
@BenjaminGruenbaum sFormat is
 
11:08 PM
in the right hands, its awesome
 
@jAndy Its awesome what?
 
@minitech having the option to extend prototypes to reflect on every existing instance/object out there
@minitech and having a very convenient style aftewards
 
Actually I’m just bugging you for the apostrophe
 
@Arthur 1) The div isn't within the ul. 2) You have an unclosed parenthesis. Check the javascript console.
 
@Nile jsfiddle.net/v4Fu4/1 No difference
 
11:12 PM
@rlemon nice, sometimes it make some weird indents though
 
@Arthur You must've ignored me. The div isn't inside the ul.
 
@Arthur get rid of the .parents() call
 
@Loktar much better : jsfiddle.net/rlemon/QFWAr/4
generate a few times.. still the dips.. :/
 
@jAndy Thanks then it works, but i want to run outside the div...
 
sometimes not at all, sometimes there are many. I need to find out what is causing it
 
11:15 PM
@rlemon reminds me of the grand canyon
 
@rlemon terrain reminds me on "worms" terrains
what a nice game
how many wasted hours
 
yea it was a great game
I need to figure out these dips... smoke first.. but then... thinking time!
 
when do you stop smoking..
 
anyone know how to increase the number of yAxis lines in highcharts without drawing them dynamically?
 
you're such a smart guy, how can you
 
11:17 PM
I got addicted at a very young age.
I will quit when I'm ready.
 
@rlemon :(
 
Tried a few times, wasn't ready and caved.
 
I knew a guy who started smoking with 9 !
rofl
 
@jAndy jsfiddle.net/v4Fu4/2 It doensn't works so...
 
"knew" didn't mean he's dead now, just lost any contact
BUT HE WILL BE DEAD SOON IF HE CONTINUES SMOKING
O_o
 
 
Hello, would someone mind taking a look at this? Can't get time since last database update to display correctly: stackoverflow.com/questions/17331877/…
 
@Nile thanks but in my site this is not possible, because you have multiple not_like classes
 
@Arthur what do you actually want to achieve there
 
@Arthur use siblings or some other selector, then
 
@BenjaminGruenbaum seriously every angular post on SO doing it wrong today stackoverflow.com/q/17331573/995876
 
11:24 PM
@JAndy to load the like_list (4 results). To change a class name with that works: $(this).parents('ul').find('.icon').className = 'icon icon-thumbs-down';
 
@Esailija It's the new jQuery, everyone is doing it wrong and it's getting really popular :)
 
not much love for angular here
 
so what if you find this exciting job that boasts they are all angular
and then you find their codebase is full of this
where is your god now?
 
I find your Angular personally offensive and suggest you read this. Dom manipulation should be done in a directive. Your imperative ways will cause meteors of blood to fall from the sky. Use a directive :) — Benjamin Gruenbaum 4 secs ago
@jAndy I like it.
@Esailija A workplace is more than the framework or language they use, except if they use PHP or Java, in that case fuck them.
 
lol
your hate for Java is stronger than misused angular?
that's not reasonable
or maybe it is..
 
11:28 PM
@Esailija What I meant is that people can abuse a good technology readily and easily. Since Angular is getting a lot of * Buzz* recently, it's getting a lot of new developers. A lot of them bad.
A place that makes wonders with bad technology >> A place that does horrors with good one.
 
@nile jsfiddle.net/v4Fu4/4 Doensn't work either
 
@Esailija Hero!
 
what the hell is the point to iterate over the areas and add href and parent to an array and then iterate over that array when you could have just iterated over the areas directly in the first place and use their .href and .parentNode
rage
 
What would be the best and most efficient way and database structure to store the tags that are added to each post, like you do on SO?
 
@MehdiYeganeh 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.
 

« first day (984 days earlier)      last day (3969 days later) »