« first day (1172 days earlier)      last day (3778 days later) » 

user1596138
4:01 PM
@SomeGuy Nah that was right
 
user1596138
I think.... He says 30 minutes later..
 
Nice!
Seems a bit laggy to me
 
@ThiefMaster Chuck Yeager. The one I'm wearing ATM
 
@SomeGuy probably is :P
 
4:02 PM
ah, the FGITW one ;)
 
I don't transition, I redraw a crapload of inline styles
 
user1596138
@rlemon I have a "terrible lag issue" :P
 
wait, I thought it was a CW one?
 
damn you guys have shitty pcs :P doesn't lag at all for me
 
I've posted a FGITW community wiki, and it gained +2, while the other answer stayed at 0.
 
user1596138
4:05 PM
@rlemon I have a quad core iMac with a Radeon 6750 (i think)...
 
user1596138
:P
 
user1596138
No really, this thing has the hardware to be a hoss, but it was designed by Apple so while using OSX it's slow as shit. Using Ubuntu gives about the same effect as going from 4GB ram to 8.
 
Hi
Too much?
@cookiemonster Yes. Something along the lines of "Why would you do that?" "You are ruining the sanctity of javascript!" "Would you force an object on someone when they don't want it?" — qwertynl 54 secs ago
 
is it tomorrow for anyone yet?
 
@Shmiddty I think it is. Why?
 
because Happy New Year!
 
@SomeGuy It is always tomorrow in New Zealand.
 
4:24 PM
happy new year!
 
Speaking of new-year.. I heard there is a hat for getting a chat message starred on NYE! O:)
 
@ThiefMaster there is :D
Makes you look like Elton John sadly.
 
starr mine to get "first" hat :) or I should be the one to star a msg to have the hat :)
 
@FairHaven 14.
 
4:30 PM
@ThiefMaster My god, so I should stop lurking and post a message in chat ?
So many stars in the New Year sky...
 
HAH. Too late. I already have my glasses on
mr unstar man
 
Oh... stars are gone and I have no hat :(
 
Who unstarred that?
 
I'll take cold
 
4:32 PM
Stop staring everything for no reason :/
 
@BenjaminGruenbaum There's an obvious reason
 
@BenjaminGruenbaum They are doing it for the hat
 
party pooper
4
 
you love my glasses
 
4:33 PM
You can't unstar in the Sandbox!
 
@KendallFrey @rlemon slide pooper
 
Surely we all have glasses now? :D
 
@BenjaminGruenbaum poop slider!
 
!!/slidepoop
 
@mikedidthis I don't
 
4:34 PM
Mar 13 at 1:40, by rlemon
(Random Fact, when rlemon was 13 he pooped on a slide. he isn't proud of it, but he felt it was time to confess. I'm sorry slide.)
 
@Jhawins @SomeGuy I never thought to just make them smaller and zoom : jsfiddle.net/rlemon/mYpZG/1 ;)
this should perform better
 
It does
Not sure if it's at its best
But it's better
 
yea i'm still working on micro optimizations I overlooked
10% of the time is getting the positions of the elements, so I will cache those.
 
Hey guys! If I have paper.js in my node modules directory, do I still need to script src="js/paper.js" in my html file?
 
user1596138
Yesterday I got to correct my boss on his spelling of "marijuana" for an ad. Of course the jokes came out from him... Today I realize he doesn't know how to "upscale" the QR code from the image and keep it crisp, so it's just going to be a smudge in the paper. Now to find out how to tell him without seeming obsessed with the marijuana ad..
 
4:39 PM
@TylerLangan Yes, and you need to serve it
 
thanks Kendall! Do I even need it in my node modules folder or is that just for using paper.js from the terminal?
 
Um, idk. You just need to serve it over HTTP
 
sweet
 
It technically wouldn't need to exist on disk
 
I see
You rock. Wish there was a way to +1 your rep
 
4:43 PM
@TylerLangan upvote one of his answers
arbitrarily
 
That would be a +10
 
user1596138
 
@Jhawins That's old. And there are so many similar "humorous" sites it's not fun anymore.
 
Upvote one answer, then downvote four other answers, then have him downvote something arbitrarily.
+1
 
user1596138
@dystroy But.. It's new to me..
 
4:47 PM
@Shmiddty Last part is tricky but interesting...
 
function render() {
    for (var i = 0; i < elms.length; i++) {
        // get the angle for each shadow based on mouse position
        var dx = elms[i].x - mx,
            dy = elms[i].y - my,
            a = Math.atan2(dx, dy) * (180 / Math.PI),
            d = Math.sqrt(dx * dx + dy * dy),
            o = d < 512 ? d / 512 : 1;
        longShadow(elms[i].elm, 24, 90 - a, {
            r: 0,
            g: 0,
            b: 0,
            a: o
        });
    }
}
any way to increase performance on this?
ignore what longShadow does, i'll get to that
 
Hmm, how often is d > 512?
 
!!> Infinity - 512
 
@KendallFrey "Infinity"
 
@Retsam d = distance, and that is based on mouse position as calculated above (mx,my is mouseX and mouseY)
 
4:52 PM
If it's often, you might calculate d^2; compare that to 512^2, and only take the sqrt afterwords; since you only need the sqrt when d < 512
dd = dx * dx + dy*dy
o = dd < 512*512 ? sqrt(dd)/512 : 1;
 
jsfiddle.net/rlemon/mYpZG/4/show I get 32 fps on this when moving fast with the mouse
 
user1596138
!!s/sqrt/squirt/g
 
@Jhawins No matching message (are you sure we're in the right room?)
 
user1596138
...You didn't see anything
 
@Jhawins dd = dx * dx + dy*dy
o = dd < 512*512 ? squirt(dd)/512 : 1; [\(source\)](http://chat.stackoverflow.com/transcript/message/13803654#13803654)
 
user1596138
4:55 PM
Ok I quit. Time for a cig
 
@rlemon Are elms[i].x and mx integers?
 
user1596138
lol guys... Source is right here/up there
 
user1596138
I'm having trouble with part of it.. You don't want my advice haha
 
@copy yes
 
I think atan2 is really the bad factor here, you can cache the result in a lookup table
 
5:01 PM
i have no idea how to do that :P
 
@rlemon generate a static function once based on the number of elements, unwrap the loop manually, see if that helps.
@rlemon a map of value->result
 
I have closures defined in a requirejs function call, but I want to test them with jasmine. What's the best way to expose those functions globally?
 
@NathanJones don't declare them in a closure.
 
or at least publicly enough that jasmine can see them
 
No, just don't declare them in a closure.
They don't have to be public, just prefix them with an underscore.
 
5:05 PM
yeah, i typed that before you responded
 
for (var i = 0; i < l; i++) {
    x = i * Math.cos(a);
    y = i * Math.sin(a);
    !(i % 3) && (s++); // spread pass, right now spead increases ever 3
    lines.push(x + 'px ' + y + 'px ' + s + 'px ' + 'rgba(' + c.r + ',' + c.b + ',' + c.g + ',' + c.a + ')');
}
Don't compute the sine and cosine over and over again
 
@BenjaminGruenbaum I didn't think underscore modified variable scope. Is that just naming practice, or does it actually do anything?
 
@NathanJones let's go with 'actually do anything'.
If something starts with underscore don't touch it from the outside, except jasmine does not have that limitation - cool?
 
What sort of data structure do people generally use for caching functions with multiple arguments?
 
Sorry if that came off as rude.
 
5:09 PM
atan2_data = {}
function memoized_atan2(x, y) {
    var key = x+","+y; //I'm sure there's a better way to do this
    if(key in atan2_data) return atan2_data[key];
    return atan2_data[key] = Math.atan2(x,y);
}
 
@NathanJones why rude? If anything I was cocky :P
@Retsam a Map which browser JS doesn't really have yet. So people use Object.create(null) sometimes. @Esailija has a map shim library you can use.
 
Huh; I wonder what lodash uses for their _.memoize function
 
@BenjaminGruenbaum I don't know! I just didn't want you to think I was belittling or ignoring your answer by implying it didn't actually do anything.
 
it doesn't.
:P
 
good
still stucks at chat.
 
5:15 PM
okay, I think the biggest improvement was reducing the number of box-shadows I draw by half jsfiddle.net/rlemon/mYpZG/7
 
Ah; looks like _.memoize just uses a default object, and caches using only the first argument as the key by default
 
user1596138
@Shmiddty you have a hat that isn't supposed to exist yet.
 
user1596138
 
I'm a time traveler.
 
user1596138
NYD. Not NYE.
 
5:25 PM
@Jhawins There's a 12-hour grace period either way
 
user1596138
sjehrgjklesfthgjsrtfuhnd
 
user1596138
whatever
 
21 secs ago, by Shmiddty
16 secs ago, by Shmiddty
28 secs ago, by Shmiddty
I'm a time traveler.
 
rlemon, Ontario, Canada.
10.1k 3 26 69
so am I
 
Though go ahead and post on meta with a funny title, you'll get a bunch of upvotes
 
user1596138
5:27 PM
@SomeKittens Or be flogged
 
Yay fake reputation on a virtual site that you will never get to touch!
 
I touch the site every night
 
@Shmiddty Ummmmm
Do you touch your rep?
 
long and hard
 
Until it glows?
 
5:30 PM
has anyone seen anything out there that talks about doing sortable/drag and drop with twitter bootstrap 3's row? Or am I literally going to have to do columns to make it work?
 
@copy It stops glowing?
Mine always glows.
 
Hot
 
radioactive
 
user1596138
0
Q: Many users today have suddenly become Time Lord's (Winter Bash "First" Hat)

JhawinsThe "First" hat is for having a message starred on NYD (New Year's Day) in chat. It is currently NYE (New Year's Eve) and many users have already travelled into the future to receive this hat before it's available. Example Source of "First" Hat Requirements

 
user1596138
Watch me be -1ed into nothingness haha. Worth it.
 
5:32 PM
@Shmiddty Ummmm.
 
@BenjaminGruenbaum Can you pick up some milk on your way back?
 
no get your own goddamn milk
 
183
Q: Why are date-based hats awarded too early?

OdedI just got the And I Feel Fine hat which states "post or vote on December 21". Does SE have a time machine now?

 
@Jhawins I should have downvoted you for poor grammar
 
5:33 PM
this was discussed already on meta
ghad! Y U NO LOOK?!
 
user1596138
@Shmiddty Where
 
user1596138
Were u se da por grammer
 
Time Lord's
 
user1596138
Shit
 
user1596138
@qwertynl wtf brah. Your comments are always redundant and pointless. At least actually flag it :P
 
5:36 PM
we should call @Jhawins "AJAX" because he's so abrasive
 
@Jhawins actually, he was making a reference: tardis.wikia.com/wiki/The_Silence
 
user1596138
Dammit!! I knew that. What the hell.
 
user1596138
@qwertynl I actually just fell in love with you, I'm just not good at expressing my emotions.
2
 
Enjoy NYE / NYD folks, I will see you in the future!
 
not even 1pm for me
 
user1596138
5:45 PM
Same
 
user1596138
I have hours and hours until I have to go sit on the couch and watch people freeze in NYC on the TV.
 
user1596138
And the downvotes begin haha. Is it best practice to leave a question that is obviously a duplicate? Or should I delete it? it's Meta, don't care about the rep, just wonder.
 
@Jhawins It was a Doctor Who reference...
 
user1596138
11 mins ago, by Jhawins
@qwertynl I actually just fell in love with you, I'm just not good at expressing my emotions.
 
@Jhawins Sorry.
 
user1596138
5:50 PM
It was funny. I'm the one who should be sorry. Babe Wait.. you're a minor
 
@Jhawins Eh? I am most probably older than you.
 
user1596138
At 93 years old you're right. :P
 
@Jhawins Yea...
 
user1596138
I always just assume the first number should be replaced with a 1 when I see ages like that.
 
@Jhawins Ha. No.
Born in '88
 
user1596138
5:54 PM
!!> (2013 - 1988) * 0.5 + 7
 
@Jhawins -5.5
@Jhawins 19.5
 
user1596138
That, is an important number.
 
@Jhawins huh?
Why the half plus seven?
 
user1596138
Well, that's the formula for /fuAble. You're too old for me.
 
user1596138
Don't mind me. I'm doing data entry and I tend to spout nonsense when I'm forced to do such a repetitive numbing task.
 
6:02 PM
would anyone be kind enough to help me with a simple vim regex find and replace? i'm going crazy - i've done this hundreds of times and it wont work
 
user1596138
I'm afraid to ask what it is.
 
very very simple haha
I'm have multiple lines that start with a number followed by a comma:

1,hello
2,hello etc
:%s/^[0-9]+,//g
shouldn't that work?
 
exactly, but then i get E486: Pattern not found: ^[0-9]+,
 
user1125394
!!> '1,hello \n2,hello'.match(/\d+,(\w+)/g)
 
6:07 PM
@ctrl ["1,h"]
@ctrl ["1,hello"]
@ctrl ["1,hello","2,hello"]
 
I love archives and their integrity checks
saved me again just a second ago.
 
YES figured it out, i need to escape the +
i wonder why..
 
How do I explain?
why does (function() { console.log("this:", this); ... output window? — Kevin Meredith 40 secs ago
 
aliens
becuase this is window
 
That's what I said...
!!tell RyanCarlson define meta
 
6:14 PM
@RyanCarlson meta (informal) Self-referential; at a higher level
 
this === windows is because of the scope
check this link
I hope it helps you
 
@Retsam it is much faster to calculate atan from scratch
 
user1596138
Benchmark and see
 
benchmarking fairly would be hard
it would be have to be carefully written to avoid unrealistic CPU caching
 
user1596138
6:22 PM
Having trouble avoiding the urge to fight the above.
 
?:P
 
Hi guys, just want to say you Happy New Year! and if you want, checkout my Github project: ionicabizau.github.io/WebcamSnow :-) Also, thank you for all your help on passed year. StackOverflow helped me so much!
 
I saw the link you posted yesterday and made that
 
@rlemon That's really nice!
 
it is buggy
i'll work on it later
right now i'm concentrating on how to make this more awesome codepen.io/rlemon/pen/mhKbv
 
6:33 PM
@IonicăBizău This is so awesome, do you mind saying what APIs/libraries you used to make this?
 
@vs7 right click -> view source -> there is your answer
 
@vs7 not sure what you're talking about, but if you're talking about the mouseover to zoom, there's this: jacklmoore.com/zoom
 
@Carpetfizz It's open source on Github: github.com/IonicaBizau/WebcamSnow
 
@IonicăBizău sweet, thanks much!
 
@Carpetfizz You are welcome! Hope you like it! :-)
 
6:35 PM
@IonicăBizău it's awesome, did you make the webcam-swiper.js ?
 
@vs7 whats up
 
@vs7 the code is right there.
 
@IonicăBizău ah cool, thanks
 
no one is going to research a plugin for you
 
user1596138
6:36 PM
I've somehow crashed my shared hosting server... Like, the entire shared hosting server.
 
@Carpetfizz He has some other good projects there.
 
@monners I did not change my hosting location. Just where I get the domain from.
 
user1596138
Twice today.
 
user1596138
HostGator is gonna be pissed eventually.
 
@IonicăBizău ColorCam is awesome :)
@vs7 your example, and "AJAX" have nothing to do with each other. what feature are you trying to emulate?
 
@Carpetfizz This one is also great. Based on it I created this one.
 
8 messages moved to Trash can
@vs7 don't spam, and don't beg.
this is not that sort of room
 
user1596138
 
user1596138
This is how I feel. Found in the trash can..
 
@IonicăBizău very impressive, nice work! they should use these to showcase javascript
 
vs7
6:39 PM
@rlemon I'm not begging , I just need a bit help
to find perfect library
 
3 mins ago, by rlemon
no one is going to research a plugin for you
 
@Carpetfizz Yes, JavaScript is awesome!
 
@vs7 I already showed you jacklmoore.com/zoom. learn how to use it, and you'll get similar functionality. also, you haven't even told us exactly what part of that website you want to recreate.
 
vs7
@Carpetfizz only i need is a small thumbs of image with current position square and also zoom on click
 
chromeexperiments.com - Very interesting projects! (cc. @Carpetfizz)
 
6:42 PM
user image
3
 
@IonicăBizău hadn't seen this before, this is awesome. thanks!
 
@Carpetfizz You are welcome! :-) There are a lot!
 
@rlemon submessage to me, I get it haha, sorry about that
 
;)
if you feed them they will just keep coming back.
who is star happy?
 
I leave now, have a nice evening friends!
 
6:44 PM
anyone use Cordova/Phonegap here?
 
vs7
@rlemon thank for compliment ...
:)
 
user1125394
→ 1 user moved to Trash can
 
@IonicăBizău happy new year, thanks for all the cool links
 
@Carpetfizz Thanks! You're welcome!
 
user1596138
Can someone ping gator3101.hostgator.com for me. Something's going on here and chat is still working fine for some reason...
 
vs7
6:45 PM
but don't worry , i will not squeeze your blood out ...
 
user1596138
But everything else is slow af.
 
@Jhawins timed out
 
I'm getting Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
Request timeout for icmp_seq 5
Request timeout for icmp_seq 6
 
user1596138
Thought so. Thanks
 
I need to work out a better way to capture motion on a webcam... hrm.. i'll have to think about this.
 
6:47 PM
that seems hard, because isn't the input dependent on the resolution of the webcam?
 
user1596138
> Our system administrators constantly watch the shared servers. . . They will know when problems arise -HostGator last month when I asked about reliability as we head into our highest traffic/most important time of the year
 
user1596138
It's been 20 minutes. Someone's either not actually "watching" or taking a really long shit.
 
user1125394
!!learn ping "<>[pong]($0)" \w+
 
@ctrl Command ping already exists
 
user1596138
Let's see... 99.9% uptime guarantee. I've had this server since August 15... roughly 10 months ago. Being down for 20 minutes now..
 
user1125394
6:49 PM
!!help ping
 
@ctrl Command ping, created by Jhawins on Wed, 13 Nov 2013 18:01:56 GMT but hasn't been used yet
@ctrl Information on interacting with me can be found at this page
 
user1596138
!!> (10 * 30) * 24 * 60
 
@ctrl ping: User-taught command: <>$0
@Jhawins 7200
@Jhawins 432000
 
@Carpetfizz well right now I just look for an average colour change between frames
function getPixelDifference(x, y) {
	var offset = x * 4 + y * 4 * data.width,
		cr = data.data[offset],
		cg = data.data[offset + 1],
		cb = data.data[offset + 2],
		ca = data.data[offset + 3],
		pr = pdata.data[offset],
		pg = pdata.data[offset + 1],
		pb = pdata.data[offset + 2],
		pa = pdata.data[offset + 3];
	return {
		diff: Math.abs(pr - cr) + Math.abs(pg - cg) + Math.abs(pb - cb),
		r: cr,
		g: cg,
		b: cb
	};
}
 
@Jhawins yeah seems like it's down for everyone: isitdownrightnow.com/hostgator.com.html#commentstop
 
6:50 PM
HAMMERTIME!
 
@rlemon oh sweet, good idea. I haven't played around with it yet, what does the "data" object contain exactly?
 
imageData.data array
 
ah kk cool, thanks
 
user1596138
@Carpetfizz Fuck!! No way am I coming in tomorrow!
 
@Jhawins :( it's for your job huh ?
 
6:52 PM
@Carpetfizz it is an array containing the colour information for the image. rgba. so offset is the start position in the array i'm looking in, the +0,1,2,3 is the r g b a values for that position
pdata in that function is the image data for the previous frame
 
@rlemon oh interesting, so the data is fed frame by frame?
 
on a constant loop
not frame by frame, by enough to make it smooth
 
nice nice
 
user1596138
@Carpetfizz Yeah...
 
1
A: HTML5 Canvas - Filling a shape with random pixel colors?

rlemonwell if you want to know the x,y of the pixels in the canvas you can use a loop like the following: var image = context.getImageData(0, 0, width, height), data = image.data; for( var x = 0; x < width; x++ ) { for( var y = 0; y < height; y++) { var i = (x*4)+(y*4*image.width); data...

 
user1596138
6:55 PM
Jhawins: Boss, HostGator is down like everywhere for some reason. They said they'll call when they have an ETA - Boss: You can either watch TV up here, go play some video game at your desk, take a lunch or go home
 
@rlemon bookmarked, this is going to be my next project haha
 
user1596138
Well alright then. Taco Smell here I come.
 
user1596138
!!afk taco smell
 
@Jhawins Nobody cares.
 
6:56 PM
going to head out, happy new year everyone! good luck to @Jhawins, and thanks @rlemon for all the information!
 
That's great too
 
@SomeGuy haha I love this site, it's narrated so well
 
@SomeGuy yea but you can't bug the author in here if you have trouble with what he wrote
 
Hahaha, yeah
 
@rlemon did you write that book
 
user1596138
6:58 PM
Found a forum link from support talking about the outages. Problem is even their forum is spotty... Whatever. Paid lunch! Later all
 
@Jhawins There goes the neighbourhood.
 
@Carpetfizz No, SimonSarris did
He visits this room every now and then
 
@SomeGuy ah cool, thanks. and I accidentally clicked "flag for spam" so sorry
 
It's alright. I'm sure someone will invalidate it
 
user1596138
Hahaha! On my way out he tells me I can just go home and if the server comes back on I'll just work from home today. :D. Thank you HostGator for being a POS host!
 
7:09 PM
@rlemon When do I get my Kindle edition?
Also, don't gift it to my email.
 
if you won a prize it was gifted to the email you signed up with :P
ORDER PLACED
December 14, 2013
Order Details | Invoice
ORDER #(redacted)
RECIPIENT (your email)
 
uh oh
 
forgot your email password?
 
no, but I never got the email.
 
I have to go to the grocery store now, i'll be back in a little and we can figure out something. Amazon is pretty good about this stuff.
they can see if it was claimed or not
 
7:16 PM
Yeah, I don't have anything in my Kindle library
 
that is the email address it was sent to
 
That's the one. Blarg.
 
okay when I get home from the store i'll contact their support
 
Cool, thanks! Sorry to be such a bother for your amazing giveaway
 
7:30 PM
Hi
 
@SomeKittens Have you checked your spam?
 
yep
 
user1125394
is it a good practice to declare your dependancies in package.json?
 
It's not only good practice, it's the only way Node.js works
 
has anyone tested out moving JS code to localStorage on a mobile device? Supposedly, its 5x faster there than in cache.
 
user1125394
7:45 PM
aha I see, :) thanks (always been running it remotely)
 
@jbolanos Sounds like a really bad hack
 
why would it be a bad hack?
 
Because the cache is the right place to cache files. If it is slower than localStorage, it's a bug in the software or an intended feature (for example, to save disk space), so you should not circumvent it
And even if it's faster on some devices, it might be slower on others or have negative side effects
 
user1125394
how through npm you can get back the version of a dependancy?
 
user1125394
npm list, k
 
user1125394
7:57 PM
(trying heroku)
 

« first day (1172 days earlier)      last day (3778 days later) »