« first day (1337 days earlier)      last day (3606 days later) » 

3:03 PM
@Mosho did Gilad send you a reply yet?
 
@Esparver 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.
@Misiur 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.
@KimKling 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.
 
!!welcome caprica
 
@caprica 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'm in urgent need of a good film
 
@towc define "good"
 
3:14 PM
@JanDvorak mindbloggling
as open grave, moon...
 
inception?
 
@JanDvorak already seen it
 
avatar?
 
@JanDvorak that's just adventurous
I need something that I can only say 'wow this was tricky' at the end
 
matrix trilogy?
I Robot
 
3:17 PM
seen it already 10 times
@JanDvorak I've read all of the books
 
Fight Club ?
 
@BenjaminGruenbaum what's that about?
 
If you haven't, watch it.
 
@BenjaminGruenbaum sure!
 
LotR?
 
3:20 PM
You'll see, I'd like to call it action, but it's more of a drama.
Enjoy :) Tell me how it was.
 
lol
it's been rare to find people who haven't watcher fight club
 
@JanDvorak watched them all, not really a fan
 
but I guess young people haven't.
 
@FlorianMargaine I haven't
 
3:21 PM
Watch it too.
 
@BenjaminGruenbaum noted
 
@FlorianMargaine I haven't
 
@BenjaminGruenbaum Oh, the Fight Club is my favourite movie ever
I watched it only a month or two ago
 
@dystroy watch it
 
3:45 PM
Is there a faster way to get the functionality of this:

var nodeIndex = Array.prototype.indexOf.call(document.all,node)

?
 
4:06 PM
probably not but what would this index be useful for ?
 
@Tony 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.
@LukeForder 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.
 
4:34 PM
@BenjaminGruenbaum dat nonsense, I love it
 
GET THE INFIDEL PEOPLE!
PHP for sure.Node.js is just a fad not a Horse in long race. — Pratik Joshi 1 min ago
;-)
 
https://stackoverflow.com/questions/24222045/website-in-node-js-or-p‌​hp
 
@MikeVelazco 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.
 
4:49 PM
@PatsyIssa Some comments below that question are worse than the question itself ^^
 
@m93a 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:06 PM
                  v  vv c vv v jy8hfre89iu8
 
yes
 
no
 
it is so obvious now
 
6t335642545545234545556523222222222222222222222222222222222222222222222222222333‌​3333333333333......YYyyyyyy n
  hhh         hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh h hhhh h h  gb
 
@sabithpocker Please stop
 
5:08 PM
HAMMERTIME!
 
@copy sorry, that was my niece
 
@BenjaminGruenbaum just got to the part when he realizes the truth
 
@rlemon how is the forest?
 
I don't even know if my pc exists right now
 
@copy Are you done? Shogi?
 
5:13 PM
@BadgerGirl I haven't done anything, just watched @BenjaminGruenbaum's presentation and cleaned the dishes :(
 
also @rlemon did you get an alpha invite for Destiny on the PS4?
 
@sabithpocker heh
morning
 
@SomeKittensUx2666 >:(
 
@copy what did you think of it?
@towc satisfied :)?
 
@BenjaminGruenbaum didn't finish yet
but that was the kind of film I was looking for
 
5:30 PM
@user1393477 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.
@alexfr 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.
 
@towc Harry Potter?
 
@AwalGarg yeah, sure, harry potter
 
@AwalGarg harry potter?
 
1 + "2" = 12?
@towc no, its not about magic :P
 
5:34 PM
@AwalGarg 2 is a normal string
!!> 1+'cheese'
 
@towc "1cheese"
 
see?
12 is a string
 
yeah, but 1 is not a string
!!> 1+1
 
@AwalGarg number+object=object
strings are objects
 
@AwalGarg number + string = string
@towc they're not
 
5:35 PM
why doesn't that caprica tell me the output like it does to you?
 
@JanDvorak but they very much wish to be
 
and no, number + object != object
@towc they don't really
 
@AwalGarg she doesn't talk to strangers
@JanDvorak but they wish to be
I'm to confused
the film gave me a headache
and I have to go
 
so in js, every number which is not 0 is true, right?
 
yep
*truthy
 
5:39 PM
@Loktar not that i'm aware of
and the forest looks like it will be quite a fun game
still UBER alpha
 
Jan, after almost every thing there, they give a link to the MDN page for more info, should I go there?
 
Which one? Do go there.
 
I mean, should I go there now, or finish the jQuery site, and then move to MDN?
 
That's up to you
 
ah yeah I didnt even sign up for alpha
but got a message last night
so was wondering if pretty much everyone with a ps4 did
it actually is really nice looking
 
5:42 PM
BAH CONSOLE PESANTS
 
@SomeKittensUx2666 psh whatever
 
> Be mindful not to define functions with the same name multiple times within separate if/else blocks, as doing so may not have the expected result.
May not? Why?
 
my 30fps ps4 has too much power
thats why it cant run at 60fps or higher
TOOOO MUCH POOWWEEER
lol but yeah so far Destiny isn't coming to pc which is crazy :?
 
@AwalGarg they will overwrite each other
 
@JanDvorak yeah, but why did they write "may" not? I guess, it "will" not have expected result...
an empty array evaluates to true? what kind of paradigm is that?
 
5:46 PM
depends on what you expect
@AwalGarg arrays are objects
 
@BenjaminGruenbaum just finished it
 
@AwalGarg ruby is even worse. empty string? 0 integer? both are true!
 
CAN YOUR CONSOLE DO THIS?
 
@ArtPip 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:47 PM
@ThiefMaster Lisp is even worse. Lisp doesn't even have false.
 
@SomeKittensUx2666 well, for steam every program is a game
but most of all: why are you using v2 and not v3?
 
in php, I am accustomed to check if array is empty by checking its boolean dump value... this is gonna be tough now;
@JanDvorak what is !true there then?
 
Ruby is the cool teacher that let you do whatever you want and still gave you A's. You loved it until you moved on and realized you were behind everyone else because you never actually learned anything.
 
@AwalGarg do you mean (not t)? That would be nil
 
@AwalGarg you just do array[0], if there is something it will return true, otherwise undefined, which turns into false
 
5:49 PM
array.length
 
!!> [][0]
 
@towc "undefined"
 
@towc yeah... like that.
 
!!> [1, 2, 3, 4][0]
 
@towc 1
 
5:49 PM
but wait...
!!>[undefined, 1, 2, 3, 4][0]
 
@towc "undefined"
 
now this is a problem
but you still can do this
 
!!>[undefined, 1, 2, 3, 4].length
 
@JanDvorak 5
 
!!> !!([].length)
 
5:50 PM
@towc false
 
!!> !!([undefined, 2, 3, 4].length)
 
@towc true
 
ok, a question here please. In php flow control, even if there is a block which is not to execute, the php parser still checks the syntax for it. does it happen in js as well?
 
sure it does
for one, it needs to find out where the block ends
 
@BenjaminGruenbaum It was very good, funny guy
 
5:52 PM
@copy what's this presentation?
 
so if(1===0){this is a bad; syntax_wtf}<--if i include this in a proper js code, will the code not work?
 
@BenjaminGruenbaum but the best would have bent if his immaginary friend actually existed, and when he's doing the other laughs at him
 
correct
 
@zsitro 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.
 
Can I mute this Caprica's welcome thing please?
 
5:53 PM
ping @zirak
 
nope, can I mute Awal now?
 
oh wait, that was easy... hide posts ofcourse :P
 
@SomeKittensUx2666 no you win :(
haha not sure how I ended up on the side of consoles during this discussion
I need a shower.
 
5:55 PM
Jan, I didn't understand the second example here - learn.jquery.com/javascript-101/conditional-code/…
They assign switch to the variable, without defining that they are assigning switch...
 
wait, you're learning js through jquery?
burn.
 
@towc wat?
 
like they assign a variable a function, there they define that they are defining a function by the function keyword and (). no such thing with switch...
 
 
@AwalGarg there's no switch statement in the second example
just a hash-map of functions
 
5:57 PM
@JanDvorak how?
it doesn't look like an array either.
 
objects can have any type as values
it's an object literal
 
I am sorry, but I can't get that. Please can you explain in some low level language?
"bar": function() <--what does this do?
 
!!> ({x:1, y:2}).x
 
@JanDvorak 1
 
is it a structure type object?
 
6:00 PM
@AwalGarg it defines a property bar with a value that is a function, inside the object that gets assigned to stuffToDo
 
had to unhide that caprica...
 
Who actually has access to Caprica's current instance? @rlemon?
 
ahh damn she is down again?
 
better question: Why are you on learn jQuery?
 
6:02 PM
g2g
 
@rlemon We want to kill the welcomes
 
@SomeKittensUx2666 cus I am a n00b at js :P
 
@StephanHeijl 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.
 
@AwalGarg codecademy.com is your friend
 
6:02 PM
!!forget welcome
 
that won't work
 
@AwalGarg not the manual one. The automatic one.
 
!!remember zalgo
 
@SomeKittensUx2666 That didn't make much sense. Use the !!/help command to learn more.
 
@SomeKittensUx2666 I will go there once I get the basic feel of js...
 
6:03 PM
We want to keep the manual welcome command
 
i'm not physically at her
 
@rlemon can you edit and restart her remotely?
 
!!mute user 1839506
 
@SomeKittensUx2666 if you want just rebuild without the welcome command and !!refresh
 
@BenjaminGruenbaum not yet, been meaning to ask you
 
6:04 PM
!!ban awalgarg
 
@JanDvorak I couldn't find awal.
@JanDvorak awalgarg is already in mindjail.
 
ew, whats that?
 
oh. Sweet.
 
@rlemon ...?
I like the welcome command
 
why do I think I remember that thing?
 
6:05 PM
@AwalGarg you were trying to screw her up
 
yep, I deff. was...
 
You still are
 
hey wait, whats that object inside switch?
@Jan, in that example, where they assign the object to stufftodo, do they get executed?
 
when you call them
 
how do I call them?
 
6:08 PM
!!>({x:function(){console.log("hi")}}).x()
 
@JanDvorak "SyntaxError: missing } after property list"
 
stufftodo.bar()
^this?
 
@JanDvorak "undefined" Logged: "hi"
 
stufftodo.bar()
 
ah.. alright. So, its similar to calling a variable inside the object, right?
 
6:09 PM
if by "variables inside objects" you mean properties, then yes.
 
oh yes, sorry. I mis-termed it...
 
@MiloszFalinski 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.
@apolwla 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.
 
ughh
sorry. that damn power is down again. cu tomorrow :)
 
how large battery do you have, actually?
 
6:15 PM
yeah it sounds kind of cool, but not going to get one
its kind of backwards imo, it uses hardware emulation
 
Tom
@BadgerGirl (long-delay) thanks, (ironically?) the first job looks great!
 
so... you can use your real carts with an emulator
 
@Mosho we talked about it, chances are you'll get an offer :)
 
;o
<3
 
@user2102266 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.
 
6:31 PM
@BenjaminGruenbaum you are gaining rep at a depressing rate
 
depressing?
 
to me, as a rep whore
 
Just write overly long answers quoting the spec -> infinite reputation
Actually, only the overly long part is important
 
yeah, my highest answer is just that
doubt anyone read it
 
brb looking for places where to paste large chunks of documentation
 
6:36 PM
mmmmm smoked summer sausage
 
Very many SO regulars peek at questions and the first answer (on the hunt for a quick +35) and mistake long for awesome and concise for bad
 
6:54 PM
@LarsNyström 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.
 
@dystroy that ad doesn't really tell much about what miaou is
 
@copy that
 
icwutudidthr
 
Hehehe
Name puns are the best
@Will we ever stop making them?
 
@some day
 
7:18 PM
@TheGracefulPenguin 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.
 
m59
When storing keywords for something in a database, is it better to store each keyword individually in their own table and associate them to the appropriate item by id, or do you just throw them all into one column on that item's row?
It seems like the verbose way is the technically correct usage of a relational database and makes for easier saving/modifying, but it's also kind of extreme.
 
For a 1:1 relationship, you put them in a single table unless you have a good reason not to
 
@Gamaliel 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.
 
m59
yeah, and just always handle them as a set... makes sense. I can just see it either way.
Also, considering the 2037 issue, why not just generate my timestamps on the server and store them as an int rather than mysql timestamp?
 
7:40 PM
@salek 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.
 
m59
oh, but that will screw sql statements that deal with time...
errr....but I could just use queries dealing with ints :)
 
Well, that problem can easily be fixed for small programs, but not so easy for libraries, OSs and very complex programs
 
8:05 PM
@PaulR 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.
 
@JanDvorak Yes but... do you see a clean way to pass the message ?
 
@SomeKittensUx2666 Awesome!
This is so fascinating
 
guh, password hashing in Node is irritating.
Specifically on Heroku
 
Why?
 
m59
8:19 PM
Is there a recommended approach for image uploads / database reference?
 
both major hashing libraries require a globally installed package
 
m59
Like, the user uploads an image (where do I save it) and how should I reference that location when I use the image?
 
Which are the two?
I used bcrypt
(For Phone to Chrome)
And it's fine
 
On Heroku?
how so?
 
I didn't install anything globally
Yep
 
8:20 PM
bcrypt and scrypt
you just had in in package.json?
 
@ArtOfCode 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.
 
Got it to work?
 
@gumballhead 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.
 
8:24 PM
not yet
what db do you use?
 
Mongo
 
Haha, why?
What are you using?
 
postgres, you hipster
 
I was getting lazy, and Mongo was so easy
So I just went with it
 
m59
8:26 PM
I'm thinking I'll save all the images to a single folder and id them with the timestamp, then save that id as the imgId in the database. Feel free to educate me if this is a horrible plan.
 
Laziness is not a bad trait
You should call it efficient though
@m59 Just make sure the id can't collide (microseconds can collide)
 
m59
yeah, I was thinking of generating something random and appending that to it
 
or use an autoincrementid
 
That's the right idea
 
m59
@FlorianMargaine in my mind, that's circular dependent. I'd be saving the record to get the id, which I'm trying to save to the database....
or I'd have to separate that into two different operations.
that wouldn't be so bad, though.
Ah!
Doh.
No column for img at all
just store it as the id and done
 
8:30 PM
why don't you store the image in the database?
 
m59
I thought that wasn't ideal.
 
let me find some link
42
Q: Files - in the database or not?

Jack DouglasWhat is the best place for storing binary files that are related to data in your database? Should you: Store in the database with a blob Store on the filesystem with a link in the database Store in the filesystem but rename to a hash of the contents and store the hash on the database Something ...

 
m59
sounds decent, then
 
@m59 it's Saturday!
are you still working on that guy's idea?
 
m59
I'm off Wednesdays :)
 
8:33 PM
odd
 
m59
my wife is off then and I can pick my hours, so it makes sense
@FlorianMargaine I wonder where I got the idea that storing images in the database is wrong.... stackoverflow.com/questions/3014578/storing-images-in-mysql
lol
 
8:51 PM
@m59 so you want to put disk space in the filesystem rather than the database?
at the end of the day...
 
m59
I don't care :) I was just noting how funny the difference of responses is.
 
print 'em out and mail them when requested
 
it's the same for the "where to store business logic" argument
37
Q: What are the arguments against or for putting application logic in the database layer?

Phil LelloNOTE The audience of programmers.se and dba.se is different, and will have different viewpoints, so in this instance I think it's valid to duplicate What are the arguments against or for putting application logic in the database layer? on programmers.se. I couldn't find discussion on dba on this...

 
m59
The whole topic is a dang mess.
 
programmers and dba don't have the same opinion :)
that said, I trust more dbas about how to store data.
 
8:54 PM
wife made cookies, this is me:
 
m59
If you're typing in a wysiwyg editor and upload some images, there's really no decent way to deal with it that I can find.
 
What does storing the image have to do with how you will later use it?
 
m59
Say, they delete the article - the images should go, too.
aka, big complex mess.
 
How is that a 'big complex mess' ?
 
@FlorianMargaine What if there are no results found here? dawnchapel.com/comics/2010-07-09-firefox.jpg
 
8:56 PM
A) you should never actually delete articles, you should only move them to the "trash can" so they can be restored later (and their analytics analyzed)
 
I have a little question. If you have a pure html website, and you want to share this with the rest of the world, and you don't care too much about your domain name, is there some good free solution ?
 
!!s/aka/SQL, aka/
 
@SomeKittensUx2666 SQL, aka, big complex mess. (source)
 
And b) That's just two phases... how is that hard?
 
m59
so never remove images?
 
8:57 PM
@90intuition github pages (or any other of the dozens of free solution, like GAE)
 
in a relational database, you can have foreign keys to link 2 or more entities
 
user3141603
Helo
 
@m59 not automatically, no.
 
user3141603
Hello*
 
(for example, images can be linked to their article)
 
8:58 PM
@90intuition neocities.org
 
the point of deleting articles for real or not? that's a business decision, not a technical one
 
@FlorianMargaine he means like a foreign key to the hard drive
 
@BenjaminGruenbaum doesn't matter if he stores the images in the db
 
@FlorianMargaine the answer is really always "no" though.
 
m59
@FlorianMargaine tying the images to the article, that's the hard part to me.
In my mind, it's most thorough if there was a direct reference to them in the database (so that I know relational things are relational)
 
8:59 PM
Why do you even have to do that? Just tie links.
 
@m59 CREATE TABLE images ( iid serial, data blob, article_id foreign key articles.id ) or something
 
m59
Right, that's what I mean.
sure
 

« first day (1337 days earlier)      last day (3606 days later) »