« first day (1095 days earlier)      last day (4075 days later) » 

14:00
and then comes @Shaz showing us that scope is green.
@OctavianDamiean but you can also see the red bucket in the scope there actually
@Shaz Next time a psychopath with an axe comes after me, I'll pull that baby out and shout "I'M NOT AFRAID OF YOU, BITCH!"
@jAndy That's the only soap brand I get, just because its name has relation to JavaScript
14:02
exemplary !
0
Q: Trying to improve my javascript code in this simple challenge from coderbyte

NathanHere is a slightly modified challenge from Coderbyte: Determine if a given string is an acceptable. The str parameter will be composed of + and = symbols with several letters between them (ie. ++d+===+c++==a) and for the string to be true each letter must be surrounded by a + symbol. So the stri...

posted on October 15, 2013 by Nicholas C. Zakas

I recently had an interesting discussion with a colleague. We were recounting our job histories and how our, shall we say colorful personalities, could have negatively impacted us long term. The truth is, I was kind of an asshole coming out of college (some would argue I’m still kind of an asshole, but that’s beside [...]

My balls froze off
@jAndy That's the thing, the language itself does have a type of dynamic typing, it's just not in functions it's in with statements.
And then I'll die. Because psychopath + axe > zirak + scope
@Shmiddty Are you a brass monkey?
14:03
and what in the world is es-discuss actually
mozilla ego-trip ?
@KendallFrey that's a fancy scope and it is even dynamic!
I'm not your funky monkey
@Zirak xD
@Shmiddty Funky Monkey always makes me think of To Catch a Predator.
My beard smells like a campfire
14:05
@OctavianDamiean I was showing Dynamic Scoping (notice how the style and logo changes...)
@eazimmerman, still testing it
@OctavianDamiean I need a cool German word with fancy umlauts and shit.
user1596138
Anyone use mailchimp?
@Jhawins My spoon is too big!
user1596138
user1596138
14:06
Accidentally left the inspector open... Good laugh hahaha
@Jhawins haha, cute
user1596138
Haha surprised me. They're a funny company.
@Jhawins Define 'use'
I wrote an integration with it once
@eazimmerman, yep, worked great! Just had to replace display to visibility
@Zirak define cool
14:07
@user2056484 neat :)
actually there are only ä ö ü umlauts in the language
user1596138
@KendallFrey Well we use it to send email "blasts" to people. And we give away concert tickets through it.
@jAndy jesus christ.
@jAndy Don't be a pussy, give me a word with umlaut(s)
@Zirak tränenüberströmt
14:08
@Zirak Frühstück
@Jhawins I don't use it in that way, though I know how to.
Anyone have a recommendation for a good HTML5 Canvas book?
I win because I have all three umlauts in the same word. :D
user1596138
@KendallFrey The point was the picture above if you view source/inspect the login page.
@Shaz get @SimonSarris 's book it's well acclaimed :P
14:09
Octavian wins
@Zirak mūs
@Jhawins Oh, hah.
Mörderstinkfüße
>Frühstück its for SO?
@Zirak the translation (if you want to know) is, drowned in tears
14:10
@jAndy why is it that hard for you to say "hmm... I didn't think of with scoping like that. I guess it does introduce dynamic scoping. JS is lexically scoped except that"
translate mine :P
@jAndy your feet. Captain.
haha
@jAndy uh...google doesn't find anything
What is the joke!
hi!
14:11
@BenjaminGruenbaum This?
@Zirak it would more or less translate to stinky feet
Yeah, get that.
can smdby help with js?
!!welcome MaxCh
14:11
@MaxCh 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.
@Zirak Now if you'd reforge that you might get the Murderous modifier.
@MaxCh myb, myb nt
@BenjaminGruenbaum I knew what with does already but I never saw it like .. what we were discussing. As I said it may create "dynamic scope effects", but the language itself is designed around context's and there scopes and there is zero dynamic in that
@jAndy except of with. :D
14:12
@jAndy Right, the language is designed around context and scopes except for with scoping. This is why with is so discouraged :) This is exactly the problem with it
This is why we hate with with a passion.
Also, thank you.
yea and I made a perfectly fine point about that. Green tower and little guy with little red bucket with potential, doesn't make the tower red
@KendallFrey Did you mean: Mörder stinkefüße
and I always "just said" that we are living in a green tower
@jAndy There are whole libraries in JavaScript like Knockout that are built around dynamic scoping.
var seats = {a: 1, b: 2};
var g = [];

g[0] = seats;
seats = {c: 3, z: 4};
g[1] = seats;

what is happening when seats get reassigned?
14:15
@octa doesn't know about my 6 pygmies
Meh, I think we're in agreement and I hope you got a new perspective on with. I just didn't appreciate chat.stackoverflow.com/transcript/message/12367102#12367102 - the "read this.. come back" part. @jAndy
@BenjaminGruenbaum I've actually never cared to read the Knockout source, how bad is it?
@OctavianDamiean It's not bad at all, it's just dirty.
@MaxCh seats no longer points to {a:1, b:2}, but that object is stored in g[0]
user1596138
i.sstatic.net/eK9sy.jpg //Want to work for a company like that
14:16
yea that might be a little harsh and unnecessary, but from my point of view there (ignoring a single keyword) you all were completely off
@MaxCh, g[0] and g[1] will contain two diffrent instances
user1596138
It's like everything they do is a joke.
@Shmiddty what's with pygmies?
Why six?
What am I missing?
You can have only five.
Because 6
@MaxCh What are you trying to accomplish?
14:16
Why six?
@Aman 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 guess AngularJS will also exploit with pretty hard then
Pygmy staff, tiki set, pygmy necklace
@jAndy It didn't seem harsh, it seemed condescending.
Can an ajax response be an array? Like send something, and then it will return an array?
14:17
@Shmiddty I hate you.
@BenjaminGruenbaum only @Zirak is condescending
@jAndy No, AngularJS does this completely differently with prototypical inheritance. Scopes in Angular and Knockout appear similar but actually work quite differently
I thought I will lose object properties in g[0] after I reassign seats, but it didn't happen
Also, Hercules beetle
   var rewrittenBindings = ko.expressionRewriting.preProcessBindings(bindingsString),
            functionBody = "with($context){with($data||{}){return{" + rewrittenBindings + "}}}";
        return new Function("$context", "$element", functionBody);
14:18
oh .. makes Angular a little more symphatic to me then
^ From KnockoutJS source code.
@jAndy You're not good enough to be condescending.
@Shmiddty wait, how did you get that far?
what is difference between typeof abc=='ABCD' and abc==='ABCD' ??
@Zirak lol
14:18
Did you beat Planetra all alone?
This is how it works, a bunch of contextual with statements :) Angular does a lot more heavy lifting.
@Zirak don't climb too high
@BenjaminGruenbaum :/
@OctavianDamiean Lol, read the source, it's just around 3000 lines. Honestly I think it's a legit use case of with and dynamic binding more generally.
14:19
Maybe I did, maybe I didn't
@Shmiddty you cheater!
@Aman Strict and non strict comparison
!!s/cheater/fun haver/
@Shmiddty I totally didn't host my map with TShock and just gave myself coins and items!
@Shmiddty @Shmiddty you fun haver! (source)
14:20
@Aman, typeof abc=='ABCD' and typeof abc==='ABCD' you mean?
@FLCL yes
@Aman RTFM, specifially, typeof.
Foory coory?
@MaxCh thanks... can you tell me which one is strict and which one is non strict...
@Shmiddty, yeah sometimes
14:21
@Aman === is strict
ohkk
@Aman for the evaluation of that specific check there is no difference in the result.
@Aman, typeof returns string so == and === in this case are equal
However the strict check makes sure that the type of the right hand side is the same as the left hand side other wise the test returns false
I also found out about pyramids, and this weird dungeon in the underground jungle that my axe can't break into. I need a special key
14:24
@Shmiddty I hate you even more now.
How to you decode a json in JS? If I returned an encoded one from PHP
@Shmiddty I don't have that dungeon but I have the key.
And the seemingly pointless tree tunnel
!!tell JonyKale mdn JSON
14:25
There is one more scenario in my node application... that I have ended up with lots of nested callbacks... :P ... any way out to make it modular ?? anyone know how to work around in more OOP way like in java ?
@CapricaSix Awesome thanks.
~_~
How would you know if you have it?
@OctavianDamiean I think you can't not have it
@Zirak ok, let's rephrase, I didn't find it yet.
14:26
Well then who's fault is that?
@Zirak It's the fault of that damn fog-of-war.
@Zirak good luck man :)
I need to find a way to get rid of it.
@BenjaminGruenbaum Stop it, I still have a day. ish.
@Zirak what kind of surgery do you have to make?
14:27
You're going to have a lot of fun, don't worry. It will get better fast and you'll learn so much.
Implanting a USB port in my arm
Goat herding is a science
Oh, the military!
I see.
Wait, you'll learn so much no that can't be the military then.
@Zirak you're leaving?!
@Zirak Powered by USB?
14:31
@BadgerGirl yea but he doesn't tell us where he's going.
@BadgerGirl It's because you didn't offer to have sex with me enough times.
They say 12th time's the charm.
@Zirak will you at least tell us for how long you'll be gone?
Let me guess, at least 7.
uh, 7 time units?
@Kristian 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.
@Zirak and you'll be going to Banarnia I guess.
14:33
@Zirak But I offered you sex around 15 times!
@SomeGuy, @BenjaminGruenbaum, @dystroy, other people...I've added another question (it's the 2nd, before sumDigits). Also, if you want to know when questions are added, watch the repository, jeez, what am I, your town crier!?
JavaScript room turns into Dating chat room... a/s/l please?
@BadgerGirl Well, they say that...because the number of times has to be a multiple of 12.
@Shaz 93/unknown/Antarctica
@Zirak But you cannot leave. You're the social glue that keeps the room alive! :(
14:36
!!> 12 * 0
@OctavianDamiean 0
@Zirak Timeout: Execution exceeded 1 second
now it works
@copy hah, cute
14:39
return x.split("").map(switchCase).join("");

    function switchCase(l){
        if(l.toUpperCase() === l) return l.toLowerCase()
        if(l.toLowerCase() === l) return l.toUpperCase();
        return l;
    }
If I knew the string already had letters I would have come up with something simpler
Guys when i debug my application i have the following JS:

Object { searchValue[]=[1], category_filter[]=[1], country_filter[]=[1]}
Now i want to create a variable containing one of the arrays
so i did : var category = objArr['category_filter[]'];
Wait what? searchValue[] is a property name of yours?
but when i debug it it tells me the category is undefined.
okay let me link some more :D
Please format it.
Fixed font plz
14:41
!!tell Marc format
@Marc Format your code - hit Ctrl+K before sending and see the faq
        for (var i=0, l=filteredList.length; i <l; i +=1 ) {
        var param = decodeURIComponent(filteredList[i].replace("[]","")).replace(/\+/g," ") ;
        var pair = param.split("=") ;
        if(!objArr[pair[0]]) {  objArr[pair[0]] = [] ;}
        objArr[pair[0]].push(pair[1]);
    }

   if($.inArray('category_filter[]', objArr)){
       var category = objArr['category_filter[]'];
       for (var i=0;i<category.length;i++)
       {
           $('#select2_categories').select2().select2('val',category[i]);
Hi guys. I'm still discovering the javascript world. I have discovered underscore.js and I was wondering if there are other must-have toolboxs you would advise to anyone and that I should try as soon as possible ? I am a little overwhelmed by the numerous js frameworks. For the moment I have adopted angularjs and jquery also.
like that ? :)
14:42
3 messages moved to Trash can
@StephaneRolland Nothing is "must have"
Nothing is must have. A
Fuck you zirak, stealing my thunder
@StephaneRolland Adopt plain old JavaScript first.
In this example when i debug objArr is equal to: Object { searchValue[]=[1], category_filter[]=[1], country_filter[]=[1]}
So objArr is an array that contains three arrays
@Shmiddty They call me Jaga
14:44
AJAX Response: Object {geh: 1, meh: 5} (console.log(res))

Code logs 'undefined':
	var obj = JSON.parse(res);
	console.log(obj[0]);
Why is it undefined?
@Marc It clearly says that it is an object.
Even though arrays are also just objects, let's not get into that.
Well okay
but how do i get each individual array out?
like var array1 = obj.category_filter ?
objArr['searchValue[]']
yep
Gosh that's ugly.
14:45
i tried that it returns undefined..
Everyone should name variables based on their type. It's the sensible thing to do
so if i do var searchvalue = objArr['searchValue[]'] then searchvalue is undefined.
@Marc Then you're doing something else wrong.
@Shmiddty troll
@Marc Wait whaaa?
14:46
The core language structures are not at fault here...
{ searchValue[]=[1], category_filter[]=[1], country_filter[]=[1]}
searchValue[]=[1]
What the hell is that supposed to represent?
Okay well i copy pasted that from firebug
it means that it is an array that contains 1 value
@BenjaminGruenbaum Got the e version. Reading it now. Thanks!
@Marc Is that really just copy/pasted Firebug output?
Firebug is retarded sometimes.
14:48
@OctavianDamiean yeah
That's really messed up.
thats directly what it tells me
Format things!
    objArr
	Object { searchValue[]=[1], category_filter[]=[1], country_filter[]=[1]}

category_filter[]
	["Animals & Pet Supplies"]

0
	"Animals & Pet Supplies"

country_filter[]
	["Afghanistan"]

0
	"Afghanistan"

searchValue[]
	["Nike Webstore"]

0
	"Nike Webstore"
Gah, Firebug is weird.
14:49
@Marc HIghlight everything and press Ctrl + K
1 message moved to Trash can
@Zirak I HATE YOU! EVERY FUCKING TIME!
Press the up arrow to select your last message
Any ideas ? :)
I know its kinda fucked up
14:49
but trust me i feel you too :P
The moment I hit choose on that message move thingy, you move the message, maybe a second before I can. :D
@Marc Yeah...you have the wrong name.
@Zirak What do you mean?
@Zirak and just like that you made magic -.-
14:52
Problem solved?
@Zirak for a minute yeah then no :S
Yes! I actually do! Pay for the content, and then download it pretending you didn't pay for it.
@BillyMathews Don't be a retard
@Marc Yes...?
@Zirak How is that retarded?
14:54
I'll let you figure that out yourself
Trying to steal stuff is not being retarded?
@Zirak erm :S it did not work out
@OctavianDamiean I don't want to have to pay a minimum of 3 months membership to download a small image/video -.-
I will mostly likely never use that site again
@BillyMathews Then don't. :)
@Marc How? In what way? Any errors? What did you get? What's your object? Can you replicate your scenario?
14:54
2,456 results http://stackoverflow.com/search?q=%22your+not%22
Is it tutsplus.net?
Aux armes!
@OctavianDamiean it's a file on extabit.com
… not… really…
14:55
@Zirak and now it works again... this is very fucking odd..
5
Q: What to do with a stupid client request?

vmarquezI won the bid on a project and now the client (who is itself from IT Department) wants me to architect/implement the solution in a very particular way. I am sure the application will fail that way for performance problems. And it will not be easily scalable. This particular client/user does not ...

@minitech eh, you're probably right but neither is your not :D
64
A: Comparison between Corona, Phonegap, Titanium

user288299I'm taking a course in Android/iPhone development and we spent 8 weeks with Titanium (not full time) (Version was Titanium 1.4.2 and time was around November 2010). Here is my experience. iPhone Android dual targetting Even though the API guides claim that the functionality is available for bot...

@Zirak I prefer that you do the town crier. I'm too lazy to go and watch a repository
64 votes with "your not"
14:58
BTW, everybody, did I tell you that SpaceBullet now has XIX levels ?
2
granted it is a very thorough answer

« first day (1095 days earlier)      last day (4075 days later) »