« first day (1385 days earlier)      last day (3557 days later) » 

4:01 PM
0
Q: Typescript + jQuery Promises = .then Type mismatch

HobojoeBri'm using Typescript and jQuery Promises and I am experiencing an error with the following code: var promiseOne = this.myFunc(1); var promiseTwo = this.myFunc(2); $.when(promiseOne, promiseTwo).then((valFromPromiseOne: number, valFromPromiseTwo: number) => //Error here (see below)...

 
0
Q: Coding Challenge: Drawing Tool... what's wrong with my PHP?

user1253382Introduction to the problem You are free to implement any mechanism for feeding input into your solution. You should provide sufficient evidence with unit tests that your solution is complete. As a minimum, please use the provided test data to indicate that the solution works correctly. Any pro...

This feels like a "look at my project"
Should I flag as spam? =/
 
wtf the answer he put
stackoverflow isn't for coding challenges
 
@Cereal He wants us to evaluate a candidate for him...
 
> things that would indicate that the person who submitted it is not qualified for a senior developer position
u right
 
anybody know why [] == ![] -> true
 
4:08 PM
false == true = true? strange...
 
!!> [] == ![]
 
@SterlingArcher []
@SterlingArcher true
 
!!> [] === ![]
 
@Cereal false
 
Oh... it's the === vs == thing
 
4:08 PM
[] == false is make sense to me
 
!!> ![]
 
@SterlingArcher false
 
but don't know [] == ![] true
 
@MQuy use === instead of ==
 
4:09 PM
i know just ask why
 
Oh, no clue. I jsut always use === to be safe, lol
 
logical i think ![] will go first
 
@MQuy [] evaluates to an empty array, which is falsy. ![] evaluates to false. So falsy == false, but falsy is not the same type as false, so [] === ![] is false
 
i think that ![] will go first
and result will be true
oh let's me think again
 
I just explained it bit by bit :P
 
user1596138
4:11 PM
@Sterling LOL bro...
 
(Take into note how I went about to find it out, logging what each value was)
 
user1596138
Boss just wanted to hash out a template for our app
 
@Jhawins oh?
 
I'm gonna have some delicious dumplings today. MMMMMMMM
 
user1596138
He kept saying stupid shit an finally I just said "Yeah next we can put some rainbows and unicorns an shit flying across the background"
 
4:12 PM
It's my co-workers bday, so he's picking lunch today.
stackoverflow.com/a/25084419/774078 simple node question because i want tag score :3
@Jhawins PLEASE MAKE RAINBOWS AND UNICORNS
leave the shit out though
 
user1596138
So he called my co-worker up to give input... And what ended the discussion was me having to tell him he just wrote down a ton of jumbled up shit and expected me to make a layout. I was like "I don't know what the fuck this is, but I'll hash something out and you can tell me what to change ok?"
 
lol bro... wow
 
user1596138
My job is retarded lol
 
I'm telling you man
DC
 
user1596138
He seriously just was giving me bullshit to work with and stupid stuff.
 
4:13 PM
I need a roommate come october :3
err..
 
user1596138
Contract mate;)
 
!!s/october/november/
 
I now have 2 chinese coworkers, so I get to eat asian food more often! lol
 
@SterlingArcher I need a roommate come november :3 (source)
 
@NickDugger we have thai food once a week. So delicious
 
4:14 PM
If somebody feels creative and like helping, I need a logo for my hu.js library
 
user1596138
He laughed in the end but I had never been that shitty to my boss at any job before lol. Nor had I been rpesented with such bullshit
 
user1596138
!!afk gonna go shooting on lunch fo sho
 
@dystroy like pixel art logo?
 
I had some super spicy thai food (I love spicy, so it wasn't that painful) that gave me some really painful shits this morning...
 
4:15 PM
@SterlingArcher evalute [] i think it is true?
 
(Not LOL @ Nick, spicy is just painful)
 
@SterlingArcher like what you want. Preferably SFW
 
@MQuy use your dev tools! [] is an empty array, which is falsy. Not false, but falsy.
 
@Cereal It seems so. Weird how Facebook went down after I posted a security bug and the steps to the exploit in my Facebook profile.
 
!!> [] == false
 
4:16 PM
@SterlingArcher true
 
!!> [] === false
 
@SterlingArcher false
 
you can check with if condition
[] is object
 
!!yes or no
 
@NickDugger yes
 
4:16 PM
ok
 
so it is true by default
 
!!> typeof []
 
@SterlingArcher "object"
 
It isn't true by default
 
4:17 PM
!!> [] === true
 
@SomeGuy false
 
Well an empty object is still falsy
 
who said that? i think object empty or not it is true
 
why would it be true?
 
4:18 PM
@SomeGuy did you read carefully?
it is false in case of compare to primitive type
 
Oh, and [] is still an array, the array is an object, but when you say [], people will think arrays
 
wat
The result isn't false because I compared it to a primitive
 
@dystroy I might take a stab at it, but no promises. I can haz busy weekend ahead of me :)
 
typeof [] = "object"
 
The result is false because I used the strict equality operator
(Notice the 3 =s)
 
4:20 PM
yes i agree with you but we talk in case of non-strict mode
 
we are
 
@SterlingArcher The most somebody is buzy, the most probable it is he'll find time for a new thing
 
in strict mode everything become clearly :D
 
@dystroy interesting, that is usually true as well
 
Strict mode is the jesus to my logic
 
4:21 PM
arrays should really be their own primitive type in js
 
you're jesus
 
@Neil why's that?
 
I'll be your Jesus, if you be my Judas
 
i remember i read somewhere, somebody told that
 
@MQuy 1) Strict mode is not the same as using the strict equality operator 2) That's why I linked you to an article about what truthy and falsy are
 
4:21 PM
![] will be go first with true
 
@SterlingArcher Just seems like it would be a little more useful than "object" type
 
@SomeGuy sorry i misunderstand
 
Truthy and falsy values aren't necessarily true or false
 
Object should be {} and array should be []
 
They'll just evaluate to that if they're turned into booleans
 
4:22 PM
I mean, technically arrays are []. They are just typeof objects
 
@SomeGuy but strict equality is quite clearly
 
Think of it this way: are there any use cases you've encountered where [] being typeof "object" has screwed with you?
 
@SomeGuy sorry for my explain, but i mean truthly and falsy :D
 
typeof null is also "object" -- JS has 2 types -- "object" and "not an object" lol
 
@SterlingArcher Has there been an instance where not having delegates (normally in C#) in Java has screwed with me? No. Would I want them? Yes.
 
4:24 PM
i search around but can't find how
 
user1596138
Woohoo guess I'm not going to lunch. Doing C#
 
I suppose it is too late to make typeof [] return "array" because that really would break a lot of code
 
user1596138
not woohoo
 
i remember i read somewhere it explains quite clearly about how it happens
 
C# is love
 
4:25 PM
!!s/c#/shrek/i
 
@rlemon No matching message (are you sure we're in the right room?)
 
Coldfusion is live
 
@rlemon shrek is love (source)
 
@SomeGuy what do you think about that?
 
Think about what?
 
4:25 PM
[] == ![]
 
user1596138
!!afk lunch anyway idgaf
 
Well, it was WTF at one point. Makes sense when you read the spec
 
What do you call it when it feels like there's bile in your throat
 
![] != !![]
 
Do you guys know if I can ask a question about a suspect migrain/headache here?
 
4:27 PM
@Cereal indigestion?
 
[] get toString called on it
 
yes, i try but stuck now :(
 
so you are running "" == ![]
 
@Cereal Heartburn
 
which is true
 
4:27 PM
@Neil That's the one! thank you
back to the bathroom ~
 
@Cereal Death
 
God speed.
 
Heartburn is one of those terms that sounds a lot scarier than it really is
 
:( I'm out of coils.
 
hahaha
 
4:29 PM
@rlemon makes sense
@rlemon but i think right operand will evaluate first because of not operator
 
@zigi Wassup zigi?
 
 
@MQuy why would a not operator go first?
 
@MQuy left will
 
@SufiDeveloper nuthin much, just leaving work in 2-3 min going to the beach cause the wheather's nice
 
4:34 PM
but if left will go first
 
Scheveningen brah
 
it should object compare to object, right?
 
because you are not checking type, you do more than just 'compare'
left side is mutated using .toString to try to see if it (at any type) matches right side
 
time to go home, have a good weekend!
 
4:38 PM
@zigi Cool! Scheveningen is nice. We have a nice weather too here but this fuckin migraine won't leave me lol
 
@Loktar you too bro
 
not even doing my project
 
@rlemon thank :D, i read it but stuck in those sections
 
@zigi Did you see the Bash shit in my profile?
 
@rlemon but i heard that when compare two object we compare reference? what difference in this case? Could you help me :D
 
4:46 PM
it isn't that you are comparing ref or not
it is that you are using == over ===
 
did i miss something?
 
== is stupid, don't use it
=== checks type AND value
 
i know but i try to understand why it happens
i know we should avoid using == most of time
 
because it tries everything it can to see if at any level they are equal.
 
I want a car. It has to be a Porsche, it just needs a new turbo engine? — Sterling Archer 5 secs ago
lol im so rude
-1
Q: Is there anything like socket.io for regular sockets?

Justin808I'm building a socket based server. It does not need websockets as it's not talking to web clients. I would like the server to be clusterable and that means not all sockets are on a single server. I know socket.io handles this with redis and a pub/sub system. I'm wondering if such a library exist...

ugh it's one of those high rep vamps
 
4:53 PM
@rlemon but what about this case
 
var x = {toString: function() { return 1}}
var y = {toString: function() { return 1}}
x == y
as you told it try everything to find equal
if it happens like that
 
I also said == is stupid and not to use it
 
!!> function toString() { return 1; } var x = toString(); var y = toString(); x==y;
 
@SterlingArcher true
 
4:55 PM
there are a crapload of edge cases
 
they should true instead of false
 
ok, starting a new game for the gndjnfnTH time
 
i know == is holy crap
 
this time it will be named cytosize
 
but i really want to know how :D
 
4:57 PM
a spaceship with limited fuel flying through levels to open doors and collect coins to reach other levels
 
because those are from some quizzes i just read
 
I almost want to make a virus war game
I played one the other day, and it was fun
!!afk burgers for lunch
 
Is there anything like socket.io for standard sockets?
 
explain about thar
 
sorry I lost interest a while ago. i'm playing video games now
 
5:05 PM
All browsers suck, chrome just sucks a lil less
 
@rlemon :D
 
<has problem with chrome>
 
hi guys, been looking online and i cant find a time picker that has two collumn where you can choose the hour and minute , am/pm differently , any body have a good place to look at ?
 
@user3591637 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.
 
You could make your own easily enough
 
5:09 PM
@SterlingArcher - And this is why I tried to ask the question on SO. Basically no one uses these chat rooms and in less than 10 min. the question scrolls off screen never to be answered.
 
@Justin808 SterlingArcher is afk: burgers for lunch
 
@Justin808 No, no one cares enough to answer
 
you mean like having a select ,option ? i have that right now , just wondering if i could find something online that is like jongsma.org/software/protoplasm/control/timepicker , but easier
 
> but easier
 
right now i have <select ID="time_used" NAME="time_used" VALIDATE="date" >
<option selected> Select Time</option>
<option value="7:00 AM">7:00 AM</option>
<option value="7:15 AM">7:15 AM</option>
</select></TD>
 
5:12 PM
@Cereal - and thats by the community in these chat rooms sucks. Thanks for being a schmuck :)
 
russia
sounds like a hillarious place to live
 
@Justin808 We're not here to do your research for you, people answer if the question is interesting
The same goes for stackoverflow itself
Stop being so entitled
 
user1596138
^ lol
 
5:29 PM
hey guys, just released a new plugin for creating "spotify style" blurred backgrounds for the web
thought id post it in case anyone was interested:
still reeling over the fact that internet explorer's Transform.Blur() doesn't allow values over 100 though, IE8 really suffers as a result :(
 
user1596138
@freshnode Hmm someone else here did that. @rlemon?
 
user1596138
@AbhishekHingnikar ^
 
C# room is being quiet and boring, so I'm coming to annoy you fellows <3
 
is that so?
 
it is so.
 
5:38 PM
@freshnode ie 8 is dead browser mate
and there is something called "graceful degradation"
 
agreed but i thought id give it a go
 
Has anyone here used CouchDB and can give me a good example link?
 
yeah, there's an unsupportedCallback that gets fired if its all a bit much for the browser
so i generally render a similar flat colour or gradient instead
was fun implementing though, hopefully someone can find a use for it
i use it in my music apps
 
user1596138
 
@Zirak @Octavian would've been your best bet
 
5:46 PM
But alas
 
Obi-Wan, as Elsa storms out of Arendelle: "You were the Frozen one!!"
 
Would it be possible to run the bot as a browser extension?
 
Technically yes, but I can't promise it'll work out of the box.
 
@Zirak can u find me thiefmasters cern's speedtest ?
 
Who do I look like, Count Grepula?
Jan 6 at 16:48, by ThiefMaster
user image
Apparently I am
 
5:50 PM
@Zirak Ok, that would be a great idea, a standalone bot no?
everyone choose to run it or no
 
@Zirak thank you :-D
 
@kwak You'd still need a browser to run it. Meh.
 
user1596138
@kwak Sure. Why?
 
user1596138
There's no possible reason that anyone else would think is good you can come up with for why lol
 
But anyone can choose to run it as-is
 
5:51 PM
@Jhawins no srver needed, and you can run it in any room
 
That's currently the case
 
I swear someone eats curry in this office every day
 
user1596138
@kwak No server already. It's just a javascript script
 
hmm, sorry I messed up, no server of course, it's a user bot
 
It'll be a-changing. I want it to live on a server.
 
5:52 PM
I didn't even know that internet faster than 200Mb/s even existed...
 
user1596138
@Shmiddty Just annoyed that it was already clear he hasn't looked at how it works..
 
user1596138
@kwak have a look github.com/Zirak/SO-ChatBot
 
PS i wonder how can ping be 1ms ?
 
user1596138
@NickDugger You have access to a server via SSH?
 
@NickDugger There's insanely fast internet. Even on ethernet, which is a terrible protocol, you can get 10 gigabit connections. The problem is that at that point, your first bottleneck is the network card and/or driver choking up.
Look up zmap and how some people scanned the internet in like 4 minutes.
 
5:55 PM
@Jhawins fb
 
user1596138
@NickDugger run speedtest on your server and see what it has lol
 
I've personally never had internet faster than 20 Mb/s
 
user1596138
 
@NickDugger i had 50 Mbps in india
 
US Internet is garbage
 
user1596138
5:58 PM
Hosted by Utah Education Network (Salt Lake City, UT) [63.40 km]: 28.054 ms
Testing download speed........................................
Download: 292.77 Mbits/s
 
Dude, you people are getting Google Fiber
I'm still stuck in adsl
 
In some very select cities. I'm near-ish one of those cities, but I won't be getting it.
Every other ISP is utter shit here
 
user1596138
@NickDugger I turned down a house last month because I could only get either 3 or 7mbps down and 40gb for $90/month satellite
 

« first day (1385 days earlier)      last day (3557 days later) »