« first day (983 days earlier)      last day (3972 days later) » 

12:03 AM
@Gacnt, I'm not drunk enough for this shit yet.
 
we need a drinking game
browse the new questions on [javascript] and take a drink for every properly asked question.
(if i said improper we would all die)
 
@eazimmerman Add , , and it'd still take a year to kill a ladybug
 
@rlemon and @Zirak would just go on a question-asking binge so we could all get smashed.
 
var obj = [];
obj.push({
    vendor: "vendor"
});
obj.push({
    vendor: "Mordor"
});
console.log(obj);
How do I convert that to JSON?
 
Wat
 
12:18 AM
LOL
I need to send obj to the server as JSON so the Java guy can parse it
 
Well there's your problem right there
 
yeah - I'm beginning to think I'm just going to go back to a URL string and tell him to suck my rubic's cube
 
Hey folks. I'm generating API authorization tokens (public and private), and am wondering if I can just use a randomly-generated string of characters for those, or if it's better to hash some account-related information as well as some random salt.
 
Somebody correct me if I'm wrong but..

var obj = {};
obj.vendor = [];
obj.vendor.push('Mordor', 'Blah', 'Other');
console.log(JSON.stringify(obj));
@jbolanos
 
In PHP I break the salt into two pieces - one that's the system default and one dynamically generated on demand for that user
@Gacnt That's pretty close to what I want - let me try it on key pairs
 
12:25 AM
I'm asking less about salting and more about whether I even need account-specific information in the hash.
 
y.push({
    vendor: "Mordor",
	area: "Blah"
});
 
@RyanKinal What language you writing in
 
Does it matter?
 
I don't enjoy being questioned when I'm trying to ask questions, especially when the person I'm answering is the one looking for the answers :)
 
-_-
 
12:29 AM
o_-
 
I'm writing in PHP. But I don't see how that matters.
 
and I'm gonna go with, whatever floats your boat
 
hehe
 
It really doesn't matter, in the end aren't you just going to be looking for a specific hash in the database?
 
Pretty much
 
12:31 AM
You could always use more information by adding in some account info to help be a bit extra random in the generation of the hash, but I mean, it's not like you're going to be able to decrypt it to find what your looking for
So either way, it doesn't matter which way you approach it, but the more letters in whatever you're hashing, the better I would guess
(NSFW) Slightly
 
@Ryan php is bad and you should feel bad.... judgemental look
 
Screw that. I've been feeling good mostly all day.
 
Language XYZ is totes better..
 
Except for about an hour and a half during and after that one meeting
 
You should switch now
 
12:38 AM
NOPE
SCREW YOU, LEMON :-D
 
 
I made a slime clock!
Other than that..
 
Congratulations!
Seriously, though, I've gotten so much shit done today
 
@rlemon At first glance, you probably know what I thought you typed
pspc.harris.com/media/MM-012099-001RevK_tcm42-13265.pdf reading this manual is all I've gotten done today, I regret nothing
 
slime clock
 
12:42 AM
I love your clock
 
slime COCK YOU SHIT DICK
I didn't really mean that, I apologize.
 
o_O you sick bastard.
 
rofl
Ugh. I should probably leave the loveliness of the Air-Conditioned Tim Horton's, and go home to my horrible hot-box of an apartment.
Back later -_-
 
@rlemon back when I was working on my game drawImage was much faster than putimagedata
also the jsfiddle is constantly allocating like 100mb of garbage continuously.. wtf
 
12:55 AM
@Esailija u mad bro?
 
lol nice
 
Yeah @rlemon is quite the artist
 
:)
 
!!/artisticpoop
 
user1125394
12:57 AM
it only works if the poops are at the end
 
user1125394
when you have speed, can't avoid them
 
Anyone here use TFS?
 
user1125394
Teletubbies Filez System?
 
Not quite ;)
I'm trying to set up one of the free TFS servers, but I can't view the board. It's saying:
The task board cannot be displayed because it is empty.
You have configured the task board to show work scheduled for the following iteration: Test\Release 1\Sprint 1.
 
1:00 AM
ew, tfs
We used that for like half a day once because we got it for free
That was not a pleasant half a day
 
We're using Trello right now, but TFS has a better work items board. That's all I'm really looking for
 
Aw man... I got interest from Facebook and was all excited because I've been thinking of moving to the bay area. Then I looked at their HTML... I mean, !@#$ the NSA thing, LOOK AT THEIR HTML!!!
 
codepen.io/rlemon/pen/vofKF ok made a few adjustments
 
@ErikReppen Isn't most of the inner html automatically generated?
 
Even if you look at it post-gen, it's pretty awful.
 
1:15 AM
If I get paid 31.80 an hour, what would I lose if Ieave 15 minutes early show your solution
 
15 mins early a day?
 
What is 15 minutes work worth if I make 31.80
 
31.80 * .25
Did i just do your algebra homework?
 
Hey, how goes it?
 
1:18 AM
Ok that's what I got somebody had me second guessing myself
 
I would if I had a reddit account.
I enjoyed it.
 
@Gacnt lol?
 
No love for my functional solution :(
-1
A: Sort array into "rows" in JavaScript

Benjamin GruenbaumHere is a suggestion using functional methods: Reduce the list into arrays of buckets based on day, and sort that list (this is like reading the table you've got on rows) Iterate through the rows in order, clear out unused ones. Here: //first, we collapse the array into an array of buckets b...

 
1:54 AM
reduce is extremely ugly when you are using it just to create a scope for an object
 
0
Q: Chrome "refusing to execute script"

TestSubject528491In the head of my HTML page, I have: <script src="https://raw.github.com/cloudhead/less.js/master/dist/less-1.3.3.js"></script> When I load the page in my browser (Google Chrome v 27.0.1453.116) and enable the developer tools, it says Refused to execute script from 'https://raw.github.com/...

 
/me dances
 
@Relfor 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.
@mzafer 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.
 
2:37 AM
@Calvin 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.
 
@Gacnt do you have a facebook?
 
Not talling
 
But I'm safe.
 
I'm not ;)
I'm HIV Negative
 
Okay.
I added your boyfriend instead.
 
2:49 AM
I take offence to that.
 
Sorry. :(
 
Haha
Not actually
eurgh, time to drive for three hours.
 
Why?
 
I've been at my parents for a few days, gotta go back to work
 
Parents stop being fun to be at after a day :P
It slowly shifts from 'cool, people are cooking for me again!' to "woah, they think they can still tell me how to live"
 
2:59 AM
Thankfully don't have that problem
 
Me neither, that's just you.
 
They worked out pretty quick that telling me what to do doesn't work out very well haha
 
@Benjamin there's an important matter that you need to take care of in facebook.
 
I don't know... you sent me all those topless pictures of room regulars, I'm kind of not hungry and frankly surprised you still are :P
 
quickly checks facebook
 
3:04 AM
@phenomnomnominal You have no topless pictures :(
 
Sure he does
Yay, just got the node.js badge, kind of makes up for the jquery badge
 
pretty sure i don't
 
No, but Benjamin does.
If you buy me food, I'll show you his pics. ;)
 
I know I do
They're public
 
3:06 AM
Aww, sorry
I'm totally freaked out, please don't share my personal facebook stuff, it's private. I had no idea stuff I upload to facebook isn't personal and private
 
@CharlieHarris 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.
 
ok actually going now
what should i listen to while driving?
 
Good luck and take care :)
Blink 182
Because you love them so much.
 
haha i knew this was going to be dangerous
 
@rlemon Wanted to let you know one of your answers is in the flag queue
2
A: Generate a Hash from string in Javascript/jQuery

rlemonYou want to look up something like Javascript md5.

 
3:10 AM
in all honesty i've grown out of them
but i still 2.9 them
 
But you just recently went to their concert.
 
@bad link me your fbook
 
I did and it was awesome, but it was a nostalgia thing - i never got to see them before they broke up!
 
@G no you link me
 
strange, z-index does not work in firefox all other browsers are fine though
 
3:13 AM
You link me maam
 
I've had enough of this laziness!
 
And link me phenoms while we're at it
 
@Dave it certainly does.
@Gacnt no way am I adding you
 
well it works on all browsers but not firefox
 
He only adds pretty girls and pretty french guys.
 
3:14 AM
Basically yep, those are the criteria
 
Why wouldn't you add me foo
 
is it div.style.zIndex or div.style['z-index']
 
@Gacnt, maybe I will maybe I won't. Maybe I'll let you dangle.
 
hmm im thinking it won't work on FF because i'm using div.style['z-index']
 
I KNOW WHAT analrapist.js CAN DO!
analyse your code and help you fix any problems!
feels more like an npm module though
 
3:23 AM
jeese FF canvas performance is shockingly bad =/
 
Eva!!
Why you no smile :(
 
Because copy left. :(
 
I'm looking at your Facebook Eva B. :D
 
Everyone in this room has me on facebook. Add me.
 
Not till I get phenom fbook
 
3:28 AM
Fine, don't add me.
 
He can send it in pchat :)
 
@BadgerGirl :o
 
@Gacnt You have to earn it
byeee
 
Fuck you add me :(
 
It's 27 days until I see copy. I just wanted to share that.
 
3:32 AM
xD
its 30 minutes till i see my girlfriend :$ and we eat icecream
just wanted to share that :3
burns
 
It's 1 day till I see mine cause I'm going to bed
 
Fuck you all :(
 
Harsh...
 
Reverse search that picture of me on Facebook and you'll find me :)
 
@BadgerGirl I can so much catch you on your words there but .. nay i am not gonna do that :D
 
3:35 AM
Ping me my initials if you find me and I'll be amazed at your creep skills
 
and relax :D we all belive you and copy will have stackoverflows of fun <:, because of infinite recursion of your love :D ... [ would somebody like to continue that ]
 
Copy. Paste.
 
xD
 
... is what you'd get if he were in a car accident
 
How can I write a href statement that preserves the current url? (including /stuffHere#alsoHash?plus=options
 
3:38 AM
@SomeKittens can u give me "before" and "after" examples ?
 
Bye. :(
 
@SomeKittens jQuery that bitch
 
@monners you broke her heart
@monners NAY JQUERY WONT DO SHIT U NOB
 
http://localhost:3000/explore#myTours?filter=collections
href="#" breaks it.
 
@Badger Night night Eva :))
I actually really like that name, one of my favs you're the first person I've (met) with it
 
3:41 AM
@SomeKittens breaks as in :?
you just want to replace the part after ? i guess
 
@Darkyen Kidding!
 
meh, I'll just use cursor: pointer
 
@SomeKittens or you can use javascript to block one event
 
Before i go, a picture of my cat
 
but ususally you should do http://localhost:3000/explore/myTours?filter=collections
which shouldn't be hard with history api
hash always goes after query
Technically, it is called "network path reference" according to RFC 3986. Here is the scheme for it:

relative-ref = relative-part [ "?" query ] [ "#" fragment ]
 
Ranks right up there with the list of all unplanned outages for the next month.
 
3:59 AM
Write a function to swap objects in javascript
 
Swap 2 objects in javascript
like we did in C
 
void swap(int &a,int &b){
 int temp = b; b = a; a = b;
}
 
function swap(cont){
    var temp = cont.b;
    cont.b = cont.a;
    cont.a = temp;
}
swap({a:{hello:"Hello"},b:{hello:"World"}})
Something like that?
 
4:01 AM
how would you apply it on 2 objects
as in 2 simple objects
 
(Only the object shouldn't be a literal inside the function because that would prevent further access
What do you mean?
 
without nesting
swap(a,b);
 
Oh, there is no non-hacky way to do it. JS is pass by reference value. It's not pass by reference like C, you don't have a & operator
 
cannot be done due to Javascript having a sane memory model where the callee cannot affect caller's local variables.
 
^
thats a proper answer :D
 
4:03 AM
It can be done in a lot of cases but it shouldn't
 
@BenjaminGruenbaum show me
 
Doesn't have to pass strict mode right?
 
anything goes, ES3 or ES5
even Harmony would be nice
 
@BenjaminGruenbaum nope
-- SHOW US !
 
modify the variables passed in by the caller without any knowledge of the caller
 
4:05 AM
I don't think it's standard though, or that's available
 
Oh, you mean this non-standard property
 
Also, eval totally breaks scope, so sometimes that might be a way around it.
 
@JanDvorak i kind of like c's small swaps
there needs to be something like ref or some keyword in js like C#
would be pretty handy :P
 
You really don't
You know how you swap two variables in Harmony?
@copy and @Shmiddty like it :P
 
[a,b] = [b,a]
 
4:06 AM
exactly
 
iirc.
ref can be used on more cases then that
 
a^=b^=a^=b
 
@JanDvorak doesn't work if a=b
 
@JanDvorak dafuk is that
 
@BenjaminGruenbaum it does
 
4:07 AM
@Darkyen Right, what I'm saying is that none of them is justified
 
@JanDvorak says a = 0;
@BenjaminGruenbaum okay
 
for integers only
 
but that [a,b] = [b,a] is pythonisque
 
@JanDvorak A xor swap fails for identical numbers because a ^ a is 0
 
!!> var a = 2, b = 3; a^=b^=a^=b; console.log(a,b);
 
4:08 AM
Yeah, unpacking is nice, it's less needed in a language with really nice object literals, like, the whole notion of tuples isn't as important in js
 
@Darkyen "undefined" Logged: 0,2
 
hold on...
 
see it ate my 3
:-[ JS y u ate my 3
 
a^=b; b^=a; a^=b does work
 
Again... not for a == b
 
4:11 AM
0
Q: Supersized image captions - render outside of JavaScript

SolI am using the jQuery supersized script (not the WordPress plugin as this didn't give me enough control). However, one issue that I am unable to resolve is how to render the image caption text outside of the javascript slides[ ] call - and instead, actually render them in a div to improve SEO on ...

 
!!> var a = 2, b = 2; a^=b;b^=a;a^=b; console.log(a,b);
 
@JanDvorak "undefined" Logged: 2,2
 
!!> var a = 2, b = 2; a^=b^=a^=b; console.log(a,b);
 
@JanDvorak "undefined" Logged: 0,2
 
where's the difference?
 
4:13 AM
That's just operator precedence
hmm, I recall a good reason not to do xor swaps for identical numbers
 
only if they're identical by reference
 
Does it work for negatives?
 
it works if they're equal
@phenomnomnominal yep, as long as XOR is self-inverse, associative and commutative
Which is satisfied as long as each bit sequence represents a number whose bit sequence is that bit sequence
 
Generally, it's symmetric difference :)
 
!!> var a = 2, b = 2; a^=(b^=(a^=b)); console.log(a,b);
 
4:17 AM
@JanDvorak "undefined" Logged: 0,2
 
!!> var a=0, b = a^=2; [a,b]
 
@JanDvorak [0,0]
@JanDvorak [2,2]
 
I'm off to sleep, night :)
 
oh, damn. the value of the left operand of compound assignment is computed before the right operand
should be: left operand reference is resolved, right operand is resolved, left operand value is resolved
!!>a=0; a+=(a=2); a
 
@JanDvorak 2
 
4:21 AM
should be 4
I'm wondering if this can be (ab)used to create another kind of swap trick
I know there's a=[b,b=a][0]
4
A: Javascript swap array elements

R-way OrzDigest from http://www.greywyvern.com/?post=265 var a = 5, b = 9; b = (a += b -= a) - b; alert([a, b]); // alerts "9, 5"

!!>var a = 5, b = 9; b=(a^=b^=a)^b; console.log([a,b])
 
@JanDvorak "undefined" Logged: [9,5]
@Selvam 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:39 AM
@CapricaSix ok..
 
5:00 AM
does any one know if cloud hosting is generally a cheaper option these days over pay per month vps ?
 
@BenjaminGruenbaum What do you think about my answer? stackoverflow.com/a/17289456/783743
0
A: Sort array into "rows" in JavaScript

Aadit M ShahWhat you're trying to do is very simple. This is what I would do: var groups = groupBy(checkin_data, "date"); // groups items based on date var table = zipAll.apply(null, toArray(groups)); // zips corresponding elements // of each group into ...

 
 
2 hours later…
6:36 AM
@Gacnt why does? for what ?:P
 
hah, lol. This image. :D
 

« first day (983 days earlier)      last day (3972 days later) »