« first day (1308 days earlier)      last day (3657 days later) » 

5:00 PM
@TonyCronin go read Mark Miller's research
Wait, that's your degree in?
@FlorianMargaine they do, for a while
I do SEO with JS all the time
 
@BenjaminGruenbaum you have to do double work though
 
@FlorianMargaine not nearly, google doesn't need all the info
 
how do you do?
 
@BenjaminGruenbaum I'll check out mark miller. thank you.
 
@TonyCronin wait, what's your degree in?
 
5:03 PM
@FlorianMargaine. thanks for taking the time to talk to me.
 
Mark Miller research requires you have a CS degree or at least a networking course
 
@BenjaminGruenbaum computer science :D
 
@SomeKittensUx2666 BROOOOOOOOOOO
 
@TonyCronin cool, he's talking about trust issues in communication
 
5:05 PM
@BenjaminGruenbaum, thanks ben. Anyway better rock on here. taking the kids to hockey. My life is rock and roll.
:D
 
@SomeKittensUx2666 how ironic lol
 
Enjoy and good luck
 
@TonyCronin You should try to do something substantial in you academic career and not fuel SEO spammers
 
@copy what's that supposed to mean? Just because something isn't focused on the technological side of the code makes it less important?
 
-4
Q: Code Error: Trying to open a dialog box with website in the background which lets a user fill out a form and send the email

ZaherSORRY IF THIS IS SIMPLE I AM A BEGINNER ..I CUSTOMIZED A EMAIL TO FRIEND BUTTON THAT WORKS NOW I WANT IT TO OPEN UP A POP UP WINDOW WITH THE WEBSITE IN THE BACKGROUND BUT IM GETTING AN ERROR PLEASE HELP: $('.profileHeader').after('<div id="emailWrapper" class="right"/>'); $('#emailWrapper').prep...

whoa caps
 
5:07 PM
@BenjaminGruenbaum No, only talking about SEO
 
Ah, ok then
 
@RUJordan Is he....is he embedding html in js?
 
Also Gender Studies, but that's a topic for a different time
 
@copy. I'll try my best to be a worthwhile citizen of Planet Earth. Thanks guys. living the dream.
 
@Zirak he suuuuuuure is!
 
5:09 PM
@TonyCronin Planet Earth doesn't care, we're all vermin doomed to a lonely, cold death either way
 
@copy I've heard rumors of you doing quite a bit of gender studies with @BadgerGirl.
3
 
Weren't those medical studies?
 
@SomeKittensUx2666 smooth.
 
@Zirak All I heard was "ooohHHHH DOCTOR!"
 
5:12 PM
@copy yes. I need help... so many things to code...
 
lol my god
 
bboy360 got all cheevos in the game of Doctor
 
@dystroy I'm having the same problems … too many projects
 
@dystroy if (request.pathname === '/penis') { fs.createReadStream('penis.png').pipe(response); }
 
@Zirak would that code also work for boobs or do I need a bigger if-else ?
 
5:14 PM
Boobs are for noobs
 
maybe a jquery plugin ?
 
They're so gay
 
boobs are gay ? I must be a noob
 
There's a jQuery plugin for boobs now, I hear.
 
@dystroy Don't we all
 
For the 404 I need something pretty. Can be humorous but I prefer just pretty over bad humour.
 
@dystroy ASCII art?
 
^
 
@dystroy Put something funny in an html comment
 
@imamathwiz 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.
 
5:21 PM
@adeneo needs a parameter : jsfiddle.net/SRk4G
 
@Zirak That was flagged
@Zirak also that one
 
lmao
 
stop the flag idiot
 
Looks like they can't handle a moist towelette
 
Someone's a jealous virgin. Protip: Sex doesn't make you better than other people.
 
5:22 PM
@Zirak careful they'll prolly flag the word moist too
 
MOIST MOIST MOIST
 
@Mr.Alien FLAGGED
 
when I read "moist" it disturbs me, I'm excited and I can't work anymore
 
@copy I won't mind if I am banned from chat for an hour, I will be productive with my work :D
 
BTW @copy I don't think you've read it, I explained something on miaou related to the float button. You didn't see that, right ?
 
5:25 PM
Sure did
 
cool
 
-2
Q: Converting jQuery to Prototype JS

user3297875$.get('users.txt', function(data) { var lines = data.split("\n"); $.each(lines, function(i) { var line = lines[i].split(' = '); window[line[0]] = line[1]; }); }); Selenium IDE is not able to read jQuery and I have a user-extension.js file which I would like to add...

 
voted (but as "too broad")
 
I wonder who fav'd it
 
probably the OP
 
5:32 PM
you're still not accustomed to me favoring everything ?
 
In NodeJS, would a hard-refresh trigger the disconnect event?
Err, normal refresh not hard refresh
 
Who here knows design patterns?
 
@BenjaminGruenbaum Depends on what you mean.
I got asked that in a phone screen once.
 
3
A: Client-side MV* - Should the model have a save method?

Benjamin GruenbaumIt depends on the pattern (and not at all opinion based imo). Your first example: A domain object having a .save method is called an ActiveRecord (also see here). Your second example: A mapper between the data mapping and domain layers is called a Repository (also see here) Active Record pat...

 
5:44 PM
@BenjaminGruenbaum you mean the original design patterns by the gang of four on OOP ?
 
I wan't someone who knows these patterns to proof read these for me
 
It's too old for me...
I think I've read the book more than 15 years ago... and not once since...
 
0
Q: Client Disconnection (NodeJS)

RUJordanSo I'm trying to have a real-time display of my online players, and it's working great thus far except for one issue. When my app listens for the disconnect, it appears that a page refresh triggers this function and said player is logged out. app.io.route("disconnect", function(req,res) { db...

halp
D:
 
@BenjaminGruenbaum I don't know Angular at all but my experience is that ActiveRecords (I mean the pattern of having objects holding methods initiating or controlling their persistence) are a very bad idea. They always lead to an application which is hard to evolve and too intricate dependencies.
 
!!youtube reel big fish take on me
 
5:51 PM
 
Thanks anyway
 
I hate how NodeJS is so awesome, but it gets such little views in Main
 
@RUJordan It's not that awesome
 
I think it is D:
 
@RUJordan what do you mean with " such little views in Main" ? Not enough questions on SO ? Maybe it's not hard enough
 
5:57 PM
@dystroy meaning not a lot of people look at them like they would a normal JS question
 
I noticed there seems to be a lot of noobs going to nodejs though. It's very different from even 4 or 5 months ago. Now we have many questions on node from people who don't have the slightest idea on how to manage an asynchronous function
Six months ago, only people who knew the basics of programming tried to write node programs
 
DANG KIDS
 
6:10 PM
Does anybody know how to "ping a connection" with nodejs? Like, on refresh, it's going to trigger the disconnect anyways. But if I delay the function by checking for instant reconnection, I could avoid this. But I have no idea how to do it =/
like..
 
@BenjaminGruenbaum we were attempting something like that for the GitHub game off
 
app.io.route("disconnect", function(req,res) {
	//check if reconnected here
        //if no reconnection, trigger below code, else ignore
	db.query("UPDATE player_data SET online=0 WHERE id="+mysql.escape(req.session.user));
	req.io.broadcast("event", {msg:req.session.username+" has logged out!"});
	app.io.broadcast("reloadXY");
	req.session.destroy();
});
 
@RUJordan You can't rely on that event anyway
 
Oh =/
 
6:16 PM
You know the world is sad when 92% of questions on main page are tagged interesting, when you're only following and
 
Any advice on capturing a browser close? I just want to trigger a function when the browser is closed, but it seems disconnect and a client beforeunload event are both unreliable
 
The common approach is to remember when a user was active for the last time and count user who weren't online for some time as offline
 
@RUJordan in javascript?
 
@copy oh so just check for last action?
 
6:17 PM
@SomeKittensUx2666 Problem?
 
!!s/now/know/
 
@NatZimmermann nodejs
 
@SomeKittensUx2666 You know the world is sad when 92% of questions on main page are tagged interesting, when you're only following javascript and python (source)
 
Ah fuck
 
@RUJordan Yeah, basically your database doesn't have an online field, just a last_active field
 
6:18 PM
@RUJordan Ah ok, I don't have any experience with node, but in javascript you can use window.onbeforeunload = function(){console.log("test")}
 
Shit.. that's going to be a bit of work. I'm not solid with the date object. In PHP I always used time() which was seconds since the epoch. Does JS have a similar style method I can use?
Or better yet: what's the JS for current time in seconds?
Der.. google. Sorry I'm hyper!
 
new Date, I believe you can take it from there
 
@RUJordan new Date
 
!!> new Date().getTime() / 1000;
 
@RUJordan 1400264396.051
 
6:20 PM
oh that decimal tho...
 
Did you party on the eve of 1400000...?
 
@RUJordan parseInt
 
I know someone born on 1st Jan 1970, pretty cool huh? I tried to explain unix timestamp to them and they just looked at me like I was some kind of freak///
 
Converting a decimal to integer is difficult
 
or >> 0... but well
 
6:20 PM
...how about Math.floor
 
or is it | 0?
 
!!> ~~new Date().getTime() / 1000;
 
^ the reason why you don't use bitwise hacks
 
@RUJordan 105132.56
 
Wow that's way different result lol
 
6:21 PM
~ is bitwise NOT
 
!!> Date.now() / 1000 & -1
 
@Zirak that was actually satire
 
@copy 105157584
@copy 1400264506
 
@FlorianMargaine Of course
 
@copy & -1? What does that do
 
6:23 PM
It whispers don't use hacks
 
I'm a bit confused, what's the non-hack way? Just parseInt Date.now()/1000?
 
Yeah
No
Use Math.floor
 
lol parseInt
 
dont laugh D:
 
Whenever you use parseInt, I eat one of your Oreos
 
6:26 PM
!!> parseInt(""+Date.now()/1000)
 
The only justification is converting from hex or the likes
 
@BenjaminGruenbaum 1400264821
 
lol
!!> parseInt(Date.now().toString().slice(0,-3))
 
@BenjaminGruenbaum 1400264871
 
@Zirak that frightened me, simply because I have oreos on me
Oh my troops are ready for battle :3 brb
 
6:30 PM
...was that a euphemism?
 
@RUJordan seriously though, use Intl.DateTimeFormat if you're using a browser.
Wait, probably just use moment
 
@dystroy If you will be teaching this stuff, please do the programming community as a whole a big favor and quit now.
 
@SomeKittensUx2666 wait what?
 
@SomeKittensUx2666 I don't get your meaning. It looks like an insult but I'd like to know more.
 
6:33 PM
> Consider that you are going to teach a student new to HTML CSS.
Sorry, was a response to the question asker, but got deleted.
 
@BenjaminGruenbaum there's a moment object?
 
oh
 
@Jobsamuel 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.
 
Was not intended to insult you
 
@RUJordan moment library
 
6:33 PM
@SomeKittensUx2666 got it
 
Oh, I'd rather not import a whole library just to use getTimeInSeconds()
 
I have this in miaou...
function now(){
	return Date.now()/1000|0;
}
Because miaou only works in seconds, not milliseconds
 
This aught to do what I need if my logic is right
function logEmOut() {
	db.query("UPDATE player_data SET online=0 WHERE online < "+Math.floor((Date.now()/1000)-300));
}
 
user1596138
Hey @RUJordan :/
 
"Logout players who have not "moved" in 5 minutes"
@Jhawins what's wrong buddy?
 
user1596138
6:38 PM
I have a mac on 10.6.8 that needs updated to... What the fuck ever.
 
user1596138
So I just open the app store and download it right? Want me to tell you what it tells me?
 
Wow, I'm actually being really productive today
 
user1596138
Get this
 
LOL
 
user1596138
Damn it just wont copy
 
6:39 PM
I was gonna say that's a weird error
 
user1596138
Whos code did I paste lol
 
I'm running 10.9.2 right now
 
user1596138
Oh css lol
 
user1596138
Anyway it says I need 10.7 to open the app store
 
user1596138
And I'm on 10.6
 
user1596138
6:40 PM
The way to get to 10.7 is through the app store
 
user1596138
lmao
 
Well that's not good
 
Oh, cool! Look what I found
The Rhino book quote (and thus this answer) is wrong here. In JavaScript strings are primitive value types and not objects (spec). In fact, as of ES5, they're one of the only 5 value types alongside null undefined number and boolean. Strings are assigned by value and not by reference and are passed as such. Thus, strings are not just immutable, they are a value. Changing the string "hello" to be "world" is like deciding that from now on the number 3 is the number 4... it makes no sense. — Benjamin Gruenbaum Sep 16 '13 at 22:20
 
lol who the hell made it like that..
 
user1596138
 
user1596138
6:40 PM
No app store for me hahahaha
 
user1596138
How is this even a thing. How did I get a 10.7 app store??
 
@Jhawins I couldn't ever update my MacBook because something went wrong with my Apple ID
One shouldn't need to log in to download updates.
 
user1596138
God dammit. It took so long to get shit working right on osx and it was so long ago
 
Gonna ask on meta
 
@SimonSarris You'll probably like this youtube.com/watch?v=Z7dLU6fk9QY
 
@SomeKittensUx2666 But then you could do something on your own
 
user1596138
For some reason I had to stay on 10.6.8 anyway on this machine... I finally said wtf why am I putting up with that and told him I needed to upgrade. Because nothing is working right. Like look at what sublime does no matter what I do
 
user1596138
 
Easy solution: Use emacs
It's built with jquery
 
user1596138
Chrome has a new problem every update hahaha but I think that's everywhere
 
user1596138
6:45 PM
But. Ok get this. They're using CS3 and don't want to update because it might break things.
 
@Jhawins I've almost never had problems with Chrome
@Zirak Psh, never let the users do anything
 
user1596138
50% of there time can literally be saved by grep styles that came in cs4
 
user1596138
Instead I'm writing scripts basically just to do exactly what they do but shittier? No. Not gonna do it lol
 
OSes should come with an "I know what I'm doing mode" OSX and Windows both miss this, and Linux has it permanently switched on.
 
user1596138
@SomeKittensUx2666 Linux Mint works for both
 
user1596138
6:47 PM
My sisters [6, 8, 12, 14] have it down
 
Mint is about the closest to an ideal OS I've found
 
@SomeKittensUx2666 It has that mode even if you mistype rm * .jpg
 
can I use ppas on Mint? why is it "closest to an ideal OS"?
should I install it on my wife's pc? she's currently running xubuntu on a notebook
 
Linux's biggest problem is lack of user-friendly GUI's.
@FlorianMargaine Yeah, you can install PPA's
I'm 80% sure it comes with apt-add-repository out of the box.
 
@SomeKittensUx2666 Which other platform has a user-friendly GUI?
 
user1596138
6:48 PM
Ah yeah the way packages work is just unintuitive to a lot of people
 
Hi.
 
@Jhawins nah, just tell them it's like the app store
 
@Zirak er, in applications. Compare Sequel Pro to MySQL Workbench.
 
user1596138
Mint has an amazing package manager
 
@FlorianMargaine They've been moving in that direction anyway, thankfully
 
user1596138
6:49 PM
Just look at screenshots even
 
Isn't Mint just a fork of Ubuntu or something like that?
 
@Zirak yesh.
 
user1596138
I don't prefer the way it comes. I use the classic gnome. But the rest of my non techy family has it mastered pretty well.
 
0
Q: How to handle historical, highly upvoted but completely incorrect answers

Benjamin GruenbaumEvery once in a blue moon, I notice a question that matches the pattern: It's on a popular topic It's getting views It has a lot of upvotes, sometimes even an upvoted "thanks!" comment. It is completely and utterly false. Here are such two examples: Are JavaScript Strings Immutable? Angular...

 
user1596138
Good thing is you can just choose your session for your user. Windows and Mac never really mastered the concept of a window manager
 
6:50 PM
19
Q: Flagging old invalid/incorrect/wrong answers

skiwiI want to share a case that I do not understand, it is about the following answer: http://stackoverflow.com/a/21573215/2057294 The answer had one upvote yesterday, I spotted it and downvoted it as it is incorrect and misleading. What worries me most is the one upvote it had, because that means ...

Flagging isn't appropriate, according to this
 
@SomeKittensUx2666 Sequel Pro vs. MySQL workbench. What are you looking for?
 
Have you used either of them?
 
Fortunately no
 
Sequel Pro is one of two things I genuinely missed about OSX
It's a really well-done piece of software.
 
@SomeKittensUx2666 What's the other?
 
6:52 PM
Workbench seems like your regular GUI monstrosity
 
I'm used to mysql-workbench
well, used it a couple times
people at work use it
 
@bjb568 switching ctrl/alt
 
user1596138
Oh shit! That's right Ubuntu has a really good "app store" like feel now
 
I use it when I just wander in the db, clicking there and there
 
@SomeKittensUx2666 I linked to it
 
6:53 PM
@Zirak You'd be right.
 
user1596138
I do it all from a terminal...
 
And it's sadly the best SQL GUI Linux has to offer.
 
user1596138
There are good SQL GUIs?!
 
SQL workbench is acceptable
 
pgAdminIII is even worse.
 
user1596138
6:54 PM
Again. All from terminal because the GUIs just seem fucked to me
 
@SomeKittensUx2666 You can do that easily with xmodmap
 
@copy I do, in fact
 
user1596138
And I can do it from anything... Never lose my software.
 
@SomeKittensUx2666 So it's not the window managers that're bothering you, but incompetent GUI devs in the wild
 
user1596138
I can use the ssh shell app in Chrome and do everything. I setup servers for Abhishek that way haha
 
6:55 PM
@Zirak Yes. OS GUIs have come a long way in the past few years.
 
@user1538814 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.
@Jon 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.
 
On that I can agree. I can't even seem to find interfaces I really enjoy in Windows as well
 
Synapse is actually really great too.
 
honestly, having Chrome in emacs would be a dream to me...
I'd never leave emacs ever again
 
But it's designed for people who are accustomed to keyboard shortcuts (i.e. not the general population)
 
6:56 PM
haha, yeah, you'll just boot up into Emacs
 
honestly, at work I have 2 screens, one with chrome, the other with emacs
and that's it
I never use any other tag on the wm
 
user1596138
@FlorianMargaine github.com/jscheid/kite close
 
@Jhawins nice :)
 
user1596138
;)
 
anyway, you're cute.
BUT THATS NOT CHROME IN EMACS
FFS
 
user1596138
6:58 PM
Hahaha close
 
user1596138
There's another one
 
user1596138
Hmm....
 
@Zirak Just get a lisp machine going
 
@Jhawins Holy smokes
@SomeKittensUx2666 Man, it'll be great. Until I have to do something
 
user1596138
Just a remote reload / eval deal
 
6:59 PM
I mean, I'll have to stop masturbating to it eventually
 

« first day (1308 days earlier)      last day (3657 days later) »