« first day (1229 days earlier)      last day (3944 days later) » 

00:04
@m59 it seems that that is what I'm looking for : 320press.com/wpbs/features
node.js question: if In foo.js I have var foo = { func: funcRef }; exports.foo = foo; and in a file called bar.js I require foo and foo.func(), where does the funcRef function have to reside? foo.js or bar.js?
my gut says foo.js
cool,
cool cool cool.
@m59 :P I think I might finally be getting the slightest bit of an idea of having the notion of getting a handle on node.js
forever torn.
function foo() { }

foo();
or
foo();

function foo() {}
m59
m59
00:09
lol what?
what style to use
m59
m59
why would it matter?
I prefer the second, usually, but heck I think you taught me that.
lol that is why it matters :P
what do other people prefer, I'm torn.
m59
m59
I kind of "declare" everything I write lately, so I start calling functions and then define them later. More details as the file goes on.
I like variables at the top for most applications. but this isn't something that (hopefully) will be changed that often
the functions on the other hand may need some bug fixing?
00:14
Declare things before using them.
m59
m59
I find that a lot harder to read.
Really?
voice opinions in the gist please :P
m59
m59
Sure, I have to read through details before I even know what they're for.
00:16
I'm not invested in either. I'm looking for a "whatever the majority says goes for me" type of poll
m59
m59
when I look at that factory, I immediately get an idea of what the service it's making does
@m59 Ok...
m59
m59
Then I can scan down for how it does it.
I think that knowing what the function is doing within its context makes it a lot easier to read when you get to it
@m59 Our minor difference in stylistic opinion means W A R ! ! !
m59
m59
hehe, I just wanted to share :)
00:20
so share in the gist!
I don't share with my enemies.
m59
m59
I figure I might give you an idea, or you might teach me something, or we both are more affirmed about what we already believe. KILLS @monners
I'll die before I put declaration second to use!
:gets out stabbing knife:
m59
m59
00:21
Cool, kills @monners again
@rlemon too late
my message ID is earlier than yours. my stab wins.
m59
m59
I see no stabbing.
I have already eaten @monners and gained his abilities.
m59
m59
TOTALLY OWNED.
we all saw it
you own nothing
especially not a tree!!!
(sorry that was low)
m59
m59
00:23
bastard
:)
@rlemon Congratulations! you've reached level... HERPES
m59
m59
ZOMBIE!!!!!!!!!! ^
I would have loved if you walked out while they were doing it and said "BRO! DO YOU EVEN NATURE?!"
m59
m59
lolzzzzz
I'm slowly discovering all of the things I need to reinstall. Next on the list - Firefox.
m59
m59
00:25
Oh my.
OH MY!!
How do I write a plugin for the bot?
also, Lions and Tigers and Bears.
Every time I turn down FF as my default browser I feel like I'm being mean to the second prettiest girl at the dance.
m59
m59
haha
Chrome Dev tools too pro
m59
m59
LOL
00:30
@rlemon: was it intentional to use foo for both the variable name and the function?
m59
m59
is there a way to flag that tag for removal?
I fixed the grammar a bit, but still..
Just wait 24 hours and hope no one uses it before then
m59
m59
Did it just start to exist?
It has no questions
m59
m59
Oh nice.
00:33
BTW, look at his suggestions, beautiful
0
Q: Nuke this tag please.

rlemonthe tag in question is here: 'javascipt' http://stackoverflow.com/tags/javascipt/info Just by reading the about: This is tag created out of people misspelling JavaScript. I do not believe this is an acceptable tag for the main site seeing how it is for a typo.

It'll get autodeleted.
m59
m59
yeah, that's getting ridiculous lol
GIMME DA META VOTEHS
BOOOOOO
closed
00:35
I hate MySQL. And databases. And scripts that don't sanity check. And coworkers who don't check their work. And slow queries. SOB
m59
m59
anyone heard of PSR-2 in php?
Someone actually got onto me the other day for not indenting my code 4 spaces as is the PSR-2 standard AND putting my curly brace on its own line.
It's like they're trying to give php an even worse reputation.
ew, newlines for curly fries.
Why don't we just do:
function
(
$arg1,
$arg2
m59
m59
I'm inclined to think that the PSR standards were created by noobs.
m59
m59
lol
00:41
@m59 YOU BROKE IT
m59
m59
:'(
It's like JSLint. Less "GAJSP", more "Write like Crockford!"
00:52
If everyone wrote like Crockford there'd be world peace.
Yeah, because no one could do evil.
@SomeKittensUx2666 app.get('/', dashboard.init); is there any way for me to get 'app' easily in dashboard.init ?
(using express)
.bind(app) ??
Why would you need it there?
For Socket.IO stuff?
yup
app.io
01:02
or should I define all of my socket.io stuff in server.js and expose the functions in the routes? except that will be harder ... much harder
!!doge hard,re-factoring,PITA
      wow
               so hard
                         very re-factoring
such PITA
m59
m59
You could make a gyro with that pita.
I could... I am hungry
That should work.
01:04
nice
bind could work too, I just don't like mucking about with this
SELECT id, twitter_url FROM linkedProfiles WHERE twitter_url LIKE '%linkedin.com%'
var io;
function init(socketio) {
	io = socketio;
	return function(req, res) {
		// do stuff
	}
}
// ....
app.get('/', dashboard.init(app.io));
May I never have to write anything even close to that level of stupid again.
like this?
I don't think that's quite valid.
01:07
well you get this gist.
     function init(_io) {
	 io = _io;
Might work better
Y U NO FORMAT
better?
you are.
Yeah, better.
I am
01:08
I like it
you smell like pickles.
@kwak +1 for linking to the exact spot.
yw
01:27
i like pickles
@eazimmerman We've all got our weaknesses
pickles are delicious
my only regret is not eating enough pickles
m59
m59
I'd ask "Why does Internet Explorer ever work?" I tend to be more surprised when it does. — m59 25 secs ago
im installing ie9
i dont know why
01:36
ie11 on win8 has websockets, hmm no actually
My only regret is that I have bonitis.
I think ie11 has just event-stream but my full websocket demo works on ie, so it was confusing
@kwak y'know what's cool? Custom avatars.
@SomeKittensUx2666 Can you back that up with some research data?
159,000,000 Google results can't be wrong
01:44
That's exactly how it went down.
var io;
function foo(newio) {
  io = newio;
}
var bar = {
    blip: 1
};
Object.defineProperty(bar, 'blop', {
  get: .. stuff
  set: function(val) {
    if( condition ) { io.emit('here', {}); }
  }
});
basically my question is, do I need to run foo() before I define the setter which uses io.emit ??
I've had a few beers. it might be a dumb question
and my device wont' connect, so I can't test it :/
Nope
cool
how hard would it be to create my own CSS that actually looks good
considering I'm style-illiterate
Depends on how many beers you had
But around 200-1000 hours
02:00
srs?
well, if you're illiterate...
It's CSS we're talking about
Might as well try to code in Malbolge
@copy ugh... should not have googled that
@SomeKittensUx2666 yeah, I have no clue about deeper stuff in CSS and I generally can't tell what looks good and what doesn't
02:07
text-align: center; MAAAAAGIIICKKK
@SomeKittensUx2666 CalTech is crazily high in rankings
university rankings
...wat
while that may be true, what about CSS made you think about CalTech?
you are in California right?
!!wiki CalTech
Also Cali colleges make everything else look normally priced.
Yes, I'm in SF, but that doesn't mean I'm particularly interested in Lakers scores.
02:10
!!wiki UW
aww
!!wiki Roberts Wesleyan
!!wiki University of Waterloo
@rlemon that's what you did?
what did I do now?
!!> console.log("\x07");
@SomeKittensUx2666 "undefined" Logged: "\u0007"
Drat, that only works in Node.
02:15
!!whiskey or code red or whiskey AND code red
@eazimmerman whiskey AND code red
!!beer and node or oops already did that
@rlemon beer and node
good answer
02:17
@rlemon what games have you been playing lately?
ps4 - tomb raider
@rlemon Good choice
On both counts
m59
m59
Wow this guy asks a lot of questions: stackoverflow.com/users/1297248/batman?tab=questions
3 today!
> Student
'nuff said
m59
m59
There's a pattern though.
He doesn't learn how to learn.
He learns how to do things, but then just runs into another problem and runs back to SO.
02:27
@batman
m59
m59
No offense :)
@batman You suck, figuratively
m59
m59
offense ^ figuratively
how do i get the unique name, generated when I pushed an object, if i used $firebase(ref), angularFire?
m59
m59
I don't think anyone here uses either of those.
02:36
aw, too bad..
m59
m59
possible, but I just haven't heard anyone talk about it
well me too..
Pretty sure we can still answer the question by rubber ducking.
@JoeySalacHipolito What have you tried?
Have you console.log()'d the object to see if the property is there?
What do the docs say?
docs don't say anything..haha
i logged the object, but doesn't return me a function or prop to get those
m59
m59
then perhaps you don't need it
or it sucks
02:39
i'm sure i need it,
here is the use case, and the actual question stackoverflow.com/q/22030331/1328014
i wrote a haiku
This is a haiku
There are many like this one
But this one is mine
I wrote a haiku:
  a a a a a
a a a a a a a
    a a a a a
I wrote a haiku,
but I forgot what it was,
fuck poetry sucks
m59
m59
lol
!!doge haiku wow, so very poetry, very last line
02:45
    wow
                  very haiku wow
                         so  so poetry
many  very last line
        wow
              very haiku wow
                        such  so very poetry
so  very last line
!!doge doge,doge,doge,doge
 wow
so doge
                 much doge
                          very doge
such doge
well done caprica
03:25
!!doge
       wow
             so fail
                      such user
very pro
!!doge ∴
           wow
very ∴
Someone needs to write a userscript that we can distribute with releases of all major CMS platforms that automatically shuts down the browser when it detects that a client is entering inline styles into a content field.
Or shut down the computer
No, the electricity
In the city that person lives in
It should throw a bomb on the city that person lives in
We'd all be dead in seconds
03:52
@monners ......!import
@SomeKittensUx2666 Eh?
Shit...
Deleted (along with my credibility)
I'm so tempted to flag @rlemon's starred message...
m59
m59
04:15
Milk gargling for real!?!?
04:27
wut chu talking bout monners?
@rlemon Science.
@rlemon Flags are not toys!!!!
....and once again I'm off by several orders of magnitude.
what is wrong with it anyway?
04:45
@RahulDesai I can only assume it doesn't answer the question properly
@Mosho why do you think so?
@Selva 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.
@RahulDesai because it was downvoted
have you tested it?
It happens. Get over it.
@Mosho I dont need to test it. I have used it before. And everybody knows it by the way.
04:48
@RahulDesai Words like that start wars.
um, ok
Good morning to all..
evening
morning
evening
04:52
anybody working mobile app cross platform..
m59
m59
@RahulDesai because post is more appropriate and he's already using that.
!!urban dork
@monners Dork Someone who has odd interests, and is often silly at times. A dork is also someone who can be themselves and not care what anyone thinks.
!!> 'dork' == 'developer'
@monners false
04:54
its true for some of them actually
@RahulDesai I don't see how that makes the href link submit the form
@Mosho Its a silly question.
which is why it also got downvoted
05:16
How do I make the text use Google Font? jsfiddle.net/rdesai/rHpgm
05:31
!!tell Rah mdn font-face
@kwak I added font-face but not sure why it is still not working jsfiddle.net/rdesai/rHpgm/1
It helps if you actually apply the font to your text
http://jsfiddle.net/rHpgm/2/
ah
thanks mate
@RahulDesai I bet you feel pretty... happy :P
05:41
@monners never used that before..
:)
font-face I mean
Once you've imported the font it works just like any other font-family declaration
gotcha
@CadeWard 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.
06:04
guys anyone here who knows prototypejs?
I created a class
var Hello = Class.create();
and in that there is plenty of code
I am initializing the above class at many places
like this:
var helloObj = new Hello();
I don't want to initialize it more than once
So, my question is how should I initialize only once?
How to know whether it is initialized before or not?
@Mr_Green are you saying you want a singleton?
no, I just want to know whether it is initialized before or not
also, why the fuck are you using prototype? What is it, 2005?
if(Hello is initialised before){
    //don't initialise it again
}
So my company is sending me to my hometown for a project this weekend.
06:09
do it inside the constructor?
hehe.. it is magento
just for 2 days :D
@phenomnomnominal like? I didn't get you
var Hello = (function () {
    var hello;
    return function Hello () {
        if (!hello) {
            hello = {};
        }
        return hello;
    };
})();
ok thanks..
06:15
I don't like you.
@phenomnomnominal what do you mean, what's wrong with prototype?
Huzzah a basic battle system is complete!
@phenomnomnominal ? :X
06:31
@SomeKittensUx2666 who you hatin' on, brah?
@phenomnomnominal I felt like saying that to see who'd take offense.
no one, sadly.
@SomeKittensUx2666 I'M OFFENDED.
m59
m59
lol I just fell asleep and flagged an answer while I was out.
It totally didn't deserve the flag (oops)
you....have skills
06:37
@AbhishekHingnikar Shit, that's awesome!
@rlemon That's a pretty great song!
And it's interesting that they're using Gacy for the art :p
m59
m59
I went to dreamland and read half the answer that started out reasonably, then asked the OP to post his sql username and password in the question so that the community could help further.
fooscript.com/zombie when the battle ends, are the buttons being "disabled" properly? They're clickable divs so I can't just disable them. I replaceChild'ed a cloneNode and that apparently strips event listeners. Is there a better way to do that?
disableActions : function() {
	this.run = document.getElementById("run");
	this.attack = document.getElementById("attack");
	//cloneNode to remove event listeners to prevent spam attacks on battle end
	var attack = this.attack.cloneNode(true);
	var run = this.run.cloneNode(true);
	this.modal.replaceChild(attack,this.attack);
	this.modal.replaceChild(run,this.run);
},
watching a psych lecture on visual neglect
man, strokes can leave you fucked up
like, fucked up
@RUJordan Why not just hide?
Just set display: none
I wanted them to stay visible
Or maybe grey out.. hmm
06:55
Oh, wait, I just read what you're doing
It seems like a silly way to do it
Why not just set a flag like canAttack?
And have something like if (canAttack === false){ return false; } inside the event listener?

« first day (1229 days earlier)      last day (3944 days later) »