« first day (1439 days earlier)      last day (3513 days later) » 

12:01 PM
@Basj: Array.prototype.slice.call(document.getElementsByTagName('span')).filter(functi‌​on(element){return element.textContent.split(' ').length == 1})
 
Anyone around that's using Cherry MX Blue switches in their keyboard?
 
@Basj But why? щ(゚Д゚щ)
 
Who cares, is was a nice little thing to work on for a minute :P
And guess what, it used filter xD
 
@Cerbrus Bored are you?
 
Just a little
 
12:10 PM
Also, weren't you like, in agreement with me at the beginning of that argument?
 
I was surprised HTMLcollections don't have filter, though
 
You changed your mind completely
 
In this case, I think filter is better.
 
I never said it was to be avoided
 
And I didn't change my mind :P
Just too lazy to write up a clan solution to Basj's problem
 
12:12 PM
( _)=mm=(^_^ )
I was playing hearthstone the other day. He had 6 life and a lot of creatures. The only thing i had going for me was that I had misdirection, which is a secret which causes the creature to attack another random target
 
Someone just wrote a function to increment a value in an array... instead of myArr[x]++;
... As answer
 
He would have killed me without difficulty next turn, except his 4/4 creature attacked him as a result of the misdirection
Which left him with 2 life, and enough for me to kill him using my hunter power
 
Sweet
 
That was a stroke of luck
 
It's always nice when a game's RNG gives you the best possible outcome
 
12:15 PM
He had like 5 creatures out.. it could have attacked any one of them, and I would have lost
 
Yesterday, I was playing World of Tanks. The matchmaker decided to send my SU-152 as the only tier 7 tank into a tier 6 battle.
Basically, that meant I could one-shot all my opponents
So, it chose the strongest creature, and attacked it's hero? :P
 
@Neil playing huntard, heh
I guess you've stopped now that buzzard is nerfed :P
 
@FlorianMargaine I play well with hunter
Maybe it is a little unbalanced
@Cerbrus Gotta love those game-changing moments
@FlorianMargaine They nerfed 2 cards. Not a big deal really
 
well, they nerfed the one card that made hunter workable
how are you going to draw without buzzard now
 
12:20 PM
They nerfed one of the few ways hunters draw extra cards
 
huntard was so strong because you could have a full hand at turn 5, and basically draw anything you needed
 
I'll just play mage
 
there's still tracking, sure
but it's not the same as buzzard, really
 
Got a 3/3 that cost 4 energy that gets +2/+2 if you end your turn with a secret
 
hehe :)
 
12:21 PM
Can't tell you how nice it felt to have my counter secret activate when he tried to turn my 5/5 into a sheep
 
What do you play with, or do you play hearthstone?
 
I play a couple of fun decks
bloodlust shaman and f2p miracle rogue are what I like lately
 
f2p miracle rogue?
 
@Cerbrus thanks ! I will experiment this !
 
12:23 PM
Also, a thoroughly hate bloodlust also because I tend to ignore the totems when I'm fighting shaman
Unless it is say, 0/3 that grants +2 to adjacent creatures
Or worse, the one that lets you draw a card after every turn
 
heh :)
yeah the bloodlust I play is even worse
it has 2 bloodlusts :P
they never expect the 2nd one :3
 
shamans tend to be awful or very very decent.. not much middle ground
 
it means I can play the 1st just to prepare lethal on the next turn
 
@FlorianMargaine That's wicked
 
12:26 PM
Makes me think about all those times I drew flame strike twice as mage
After the first one, they throw all creatures out
Sometimes I'll wait it out a turn so that they all come out
Though I prefer blizzard or cone of frost since it doesn't use as much energy
 
well if you play freeze mage, blizzard is better
freeze mage is awful to play against...
 
Yeah, in fact. I can't tell you how many games I've won with my opponent having huge creatures unable to attack
I'm sure that must be annoying
 
dying? nope! dying? nope! FINALLY NO SECRET? yeah, but your minions are frozen. Oh hey, there go 2 molten golem for free on my side
fuck you
 
haha
I play well with priest also. Priest has a lot of game-changing cards
One of my favorite being the 3/3 that takes control of a random opponent minion if they control 4 or more
 
mct
m... control tech
 
12:30 PM
Kill off the weaker creature and play that. Instant gamechanger and it cost you nothing
Don't play very well with warrior or rogue
 
well it's too RNG dependent though
 
@FlorianMargaine I won't use control minion (10 energy)
While it's nice, there are better cards
 
is there a built-in "cycle" structure in JS ? ie an array with iterator, such that on the end, you go back to first element again ?
 
when I want some fun I play a miracle rogue based on mana addict
@Neil mind control is seeing some usage lately
with the deathrattle priest
 
@Basj Javascript doesn't have infinite arrays
you might be looking for a generator
 
12:32 PM
@FlorianMargaine deathrattle priest?
 
@Neil yeah, with all the minions with deathrattle effects
 
goto
 
deathrattle warlock is a natural pairing, but not priest
 
back from school!
we tried to do chemistry class in english
 
12:33 PM
oh boy... I wanted to just die
 
once had 2 eggs out, then I played void terror :)
That was fun
 
@JanDvorak doesn't goto do what he's asking? JS Has that now, right? I think?
 
@NickDugger nope.
also, it doesn't do what he wants
 
12:34 PM
Baron Rivendare sweet card
 
Huh, I thought goto was in es6, and already implemented
 
yeah that's the one @Neil imgur.com/BV70P3f
 
That's a nice deck
I don't see the point of using priest though, save for the crowd control
 
dark cultist/auchenai/circle/blademasters play a good role
 
warlock can chew through those deathrattle creatures with an advantage
 
12:36 PM
warlock?
 
how to get query string in jquery?
 
@vignesh 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.
 
I have Auchenai Soulpriest, nice card
Another game-changer if used right
@FlorianMargaine Yeah, uh, what's he called? Guy with power that draws a card at the expense of two life
 
please guys !
 
it's warlock
but I don't see how it can chew..
 
12:37 PM
@vignesh don't
 
chew.. consume :)
Use up
in that sense
 
@jan wat ?
 
void terror type creatures
 
@Neil yeah, but warlock doesn't have all the other creatures
 
@vignesh unless you mean location.search, in which case jQuery isn't helpful.
 
12:39 PM
the cards I told you are priest-specific
@Neil ever tried auchenai/circle? :P
 
k :)
thnx
 
or... auchenai, baron rivendare, zombie chow, zombie chow, circle of healing
 
@FlorianMargaine good combo
 
board clear + 20 dmg in face
 
zombie chow damages the enemy for 5 with auchenai?
 
12:41 PM
yep :)
 
did. not. know.
 
"all heals become damages"
 
it has nice synergy, but you can't count on it too much
 
the 3/3 for 3 that heals for 3... can't remember its name, it also does 3 damage when auchenai is on game
 
dark cultist
yeah that's not advantageous though
 
12:43 PM
I'm trying to extract all values in the visible chart area of a ZoomCharts TimeChart, their support claims that there is a chart.exportVisibleData() function, I"m unable to see it anywhere, anyone here familiar with Zoomcharts timecharts? (zoomcharts.com) can point me in the right direction?
 
i mean the deathrattle thing is nice, but the creatures themselves need to be advantageous to have in play
assuming it's not beneficial to wipe out all your creatures, which may not always be the case, as you mentioned with the auchenai combo
 
why would you convert to/from java from/to javascript?
 
@dystroy this is not about checking if the method exists, I know it does not, just would like to figure a workaround for today, their support takes some hours to respond. tx though.
 
@Neil It's from JSON to java, and I do it frequently
I'm confused now. Did you mean to ping somebody else @Yossi ?
 
12:49 PM
 
lol, i thought your comment was to me, sorry about that.
 
@dystroy you generally don't build a class to represent json though
 
@Neil I do.
When I exchange data between java and javascript, I use strongly typed java objects (and most often I use GSON)
 
@dystroy And how does it work? You have to use an interface to define the methods?
 
is there a way of doing this in a more beautiful way :
$("#searchbox").show();
$("#searchbox").select();
searchbox.focus();
(previously I had searchbox = document.getElementById('searchbox'))
 
12:55 PM
@FlorianMargaine What do you think of those that use Stalagg & Feugen?
 
@Neil No. Supposing you have a structure made of an instance of some class holding variables of various other classes and so on. Using reflection gson can read it from json or write it to json. It does most of the conversion job (assuming you use public fields)
 
@Basj yes
 
@Neil it's more for fun
 
@JanDvorak ok thanks :)
 
they're not bad, but you'll always find something better
 
12:56 PM
@FlorianMargaine Thought so.
 
The back-end guy pushed a bunch of stuff, said it worked, and now the project won't run... at least it still compiles, but I am irritated, because he doesn't even come in until 9, so I'm stuck.
 
@JanDvorak any hint ? "Factorization" of $("#searchbox")?
 
@Basj var $searchbox = $(searchbox)
 
@Basj chaining, to start with
 
@NickDugger Shit like that happened to me all the time back when my company was merged with another. Their team committed stuff that didn't compile..
 
12:58 PM
$("#searchbox").show().select().focus();
 
Rather than, oh I don't know.. not doing it anymore, they bought IBM's clearcase source repository software, which was a nightmare
 
@rlemon oh really ? :)
 
@Neil Honestly, I think that this guy just forgot to check in a file... still irritating sa fuck, since I now have to wait on him to get back in and fix it.
 
or that ^^^^
 
@NickDugger Be thankful it is just this instance.
We had a nightly build that continually failed. Nobody fixed it
 
1:00 PM
@dystroy Closed.
 
It was really a nightmare for a bit.
It amazes me what some people think is kosher programming
 
It irritates me when people say that after Pinkerton, Weezer wasn't good anymore. They had tons of amazing music after that album... just not Hurley -- that album was pretty bad.
 
1:23 PM
Not a fan of io9, but this is kinda funny io9.com/…
 
anyone an idea for this : http://stackoverflow.com/questions/26002958/event-preventdefault-works-on-chrome-firefox-but-not-safari

It seems that Safari has different behaviour than other browsers...
 
@Basj overwriting default browser key shortcuts is usually a bad idea
 
trying to squeeze a bit more performance out of this. rlemon.ca/demos/motion_demo2/javascript.js (code)
I've profiled it and see where it is taking the time, but I can't think of any ways to improve on it
( I get like 10fps on that )
 
@NickDugger yes but it's exactly what e.preventDefault() is made for... It should work !
 
1:37 PM
 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
if you're disabling scaling anyways
 
@rlemon Is it fast if you simply display the video?
 
@Neil well yea. the video isn't laggy
the canvas animation is
getImageData is expensive
but imo the performance shouldn't be that bad
 
@Basj No, that's not "exactly what e.preventDefault" is made for.
 
@rlemon what do you do eactly on each frame , on the canvas ?
@NickDugger what is it, then ?
 
getImageData get's each pixel, and their colours, right @rlemon? It's been a while since I first tried it out
 
user2620028
1:46 PM
whats up guys
 
gets an ImageData object which contains a Uint8ClampedArray containing the pixel information
@Basj read the code ;)
 
@rlemon well that is a lot of information to be going through
Even if you're making one pass each frame
Is it a high-resolution video?
 
@rlemon i did, but what do the "arcs" do ? (an image in mind would be helpful)
 
I do this in other demos and performance is okay
 
Might be better with a low-resolution video
 
1:47 PM
it's a lower res
9meg - like 320p wide
just look at it
it isn't hard to see what i'm trying to do
 
Ah, you're making two passes, not one
 
Dammit Amazon why can't you have a normal API that shows all of the details on a product?
Am I missing something, or is there absolutely no way of getting the Product Description from the Amazon API? :|
 
Whoa wait a second
you're making a pass, and for each pass, you're making another full pass
That's O(n^2), bro
 
no, they are not full passes
for( var _x = x; _x < x + settings.spacing; _x++ ) {
    for( var _y = y; _y < y + settings.spacing; _y++ ) {
        var o = ( Math.floor(_x - settings.spacing ) + ( Math.floor(_y - settings.spacing) * width)) * 4;
        i++;
        r += data[o];
        g += data[o+1];
        b += data[o+2];
    }
}
 
No, but towards the end they are basically
 
1:50 PM
looks in a small aera
 
you iterate within the area above and to the left, correct?
 
below and to the right
but you get the idea right?
 
Yeah, I'm not sure about what you're trying to accomplish. It might be a necessary evil
 
I skip N in the main loop, and scan that section in the second
I'm trying to pick up changes in the colours over a given area
 
You added that in to optimize?
 
1:52 PM
to half assed detect motion
I added it in to make it more accurate and pick up less minute changes
 
Not sure if that is optimizing so much. Consider taking it out and seeing if it increases speed
 
function getDifference(x, y) {
    var c1 = getColor(x,y,data);
    var c2 = getColor(x,y,pdata);
    return Math.abs(c1.r - c2.r) + Math.abs(c1.g - c2.g) + Math.abs(c1.b - c2.b);
    // old single point code.
    // much faster, but picks up small changes we don't care about.
    //var o = x * 4 + y * 4 * width;
    //return Math.abs(data[o] - pdata[o]) + Math.abs(data[o + 1] - pdata[o + 1]) + Math.abs(data[o + 2] - pdata[o + 2]) + Math.abs(data[o + 3] - pdata[o + 3]);
}
i know it is faster ;P
I'm trying to keep the secondary scan, and make it faster :P
 
hey guys thoughts on this? funnyant.com/javascript-framework-guide
seems kind of a weird subject idk
like it tells you the difference between each framework
 
Why don't you just make one pass, and if you find a difference, then you can do something?
 
hrm..
let me try that.
 
1:54 PM
@Loktar Seems weird that it would teach you all three frameworks, even though they do somewhat similar things
 
@Kippie yeah exactly what i was thinking..
 
If you find something that hits the threshold, you can do another pass if you want, but you should be filtering out most a priori
 
my boss wants to get it @Kippie
and I was like hmm.. idk I mean I cant think of a reason why anyone would choose backbone for example
now anyway
meh work will pay for it
so maybe ll just say get it
 
@Neil nice, doubled the FPS for me
good tip
function getDifference(x, y) {
    // first check if we have any difference on the single point.
    var o = x * 4 + y * 4 * width;
    if (Math.abs(data[o] - pdata[o]) + Math.abs(data[o + 1] - pdata[o + 1]) + Math.abs(data[o + 2] - pdata[o + 2]) + Math.abs(data[o + 3] - pdata[o + 3])) {
        // if we do, scan the larger area and average it
        var c1 = getColor(x, y, data);
        var c2 = getColor(x, y, pdata);
        return Math.abs(c1.r - c2.r) + Math.abs(c1.g - c2.g) + Math.abs(c1.b - c2.b);
 
@rlemon Oh good :) I was pretty sure that wouldn't have helped
 

« first day (1439 days earlier)      last day (3513 days later) »