« first day (1446 days earlier)      last day (3520 days later) » 

8:01 AM
@dystroy do I have to have much knowledge on socket programming to do the simple webrtc video chat app?
@copy if you went to PHP room you'd get very strong opinions on it just like you have here on nodejs
 
JavaScript is also a bad language
It's just the only language that runs in the browser and is therefore more widely spread
 
@copy But surprisingly convenient and efficient, including server side (which doesn't mean I'd like to do everything in it)
 
PHP is easy to deploy and very easy to get started with
 
@Gotalove not at all. But websockets would help for an efficient signaling.
I feel that today they're no really good language. I just have hopes and bets of some which may appear as good enough.
 
What's worse, PHP or classic ASP (webforms)?
 
8:07 AM
Why ? Are you in a situation to choose between those ?
 
This room can also be called "Insult PHP - OnlySeriousStuff"
 
@dystroy That's just an excuse not to learn Python, Ruby, Scala, Clojure
And many more
 
@dystroy lol, god no (although I do have to wrestle with some webform legacy code on occasion)
 
@AwalGarg Most people who know more than PHP and JavaScript would agree that they have some very serious deficits
 
@dystroy Go?
 
8:09 AM
!!> []/[]
 
How about if Ruby was a million times faster?
 
Deficits? Nah.
 
@monners It already is
 
@Cerbrus ""
I think
 
@FlorianMargaine Go is one of the best today but it has problems too.
 
8:09 AM
Oh, Caprica should've responded with NaN
 
@JanDvorak Than it currently is
 
waiting for rust?
 
@FlorianMargaine yes, a little
 
@copy: I dun goofed
 
@monners then it would have to outperform assembly by a wide margin
 
8:10 AM
@JanDvorak We're talking hypotheticals here, jeez
 
> PHP is considered to be faster (source)
lol
 
What I mean is, would Ruby qualify as a really good language in @dystroy's eyes if speed wasn't an issue anymore
 
even I agree this is false.
 
I should do a Project Euler marathon in Ruby just to compare it with Haskell
Haskell is really slow... if you confuse lists with a random access data structure
 
8:14 AM
Where can I find a "syntax" based comparison of different languages?
Every comparison post just rants about the features of both the two and concludes that both are good and you decide yourself...
 
PHP IMO is the easiset language to learn compared to others @AwalGarg I have to 2nd you on that
 
@Gotalove we all know that
@copy they don't "compare" side by side
 
That's where you come in
 
I have to work with ASP.NET mvc nowadays and at times it seems like some things are overcomplicated for nothing
 
8:17 AM
@Gotalove It's sure as hell better than webforms
 
I have to work with JavaScript nowadays and at times it seems like some things are undercomplicated for nothing
 
If anyone wants to proofread my answer here that'd be nice.
 
I dont think I will try learning any other new language just improve the ones I know now
 
=begin
This is a multiline comment
No-one uses them
You shouldn't either
=end
hahaha
 
@rlemon Zirak told me he sent you the fix.
 
8:18 AM
@monners hehe that might be true
@Cerbrus nice
 
@BenjaminGruenbaum: "You however normally shouldn't." --> "Normally however, you shouldn't"
 
@Gotalove learning a new language will help you improve the ones you know now
 
@Cerbrus ty
 
That's all
The rest looks fine to my dutch interpretation of English :P
 
honestly I am afraid I will never be good enough at any language @JanDvorak
 
8:21 AM
@Gotalove noone is
 
y ruby no ===?
 
No sane language has ===
 
@AwalGarg what for?
 
ahh gotcha
 
@JanDvorak says the master of js :-P
 
8:22 AM
ruby has ===, but it means "matches", rather than "is"
 
programing is so vast it scares me at times
 
@JanDvorak: So, Ruby == == JS === and Ruby === == JS ==?
 
@Gotalove he isn't.... I already know far more JS than him.
right @JanDvorak?
 
Its like you learn 1 thing today only to realise oh crap that was just the basics
 
@Cerbrus not quite... == corresponds to Javascript's ===
 
8:24 AM
@Gotalove Like anything worth doing, mastery takes years of practice
 
@Cerbrus what do the == you have used for comparison correspond to?
 
=== is rather like "if you were a switch case and the right argument was the thing being switched, should we enter this branch?"
 
hehe when I joined SO my name was gotalovePHP then I started vb.net and later C# I ended up liking them as well hehe and I couldnt have gotalovePHP,C#,VB.NET :) so now its gotalove ~
 
@AwalGarg You only compare things if they have the same type
And you know all your types
 
regex === string => can the regex be matched inside the string?
range === number => is the number found within the range?
 
8:25 AM
@JanDvorak: I think I should have a peek at the ruby docs :P
@AwalGarg: "Is similar to"
 
class === sth => is sth an instance of class?
 
@copy I meant the ones cebrus used to compare the two languages ;p
 
@monners true I suppose I am still young in the programming field
 
@Cerbrus that is so much vague, IMO. use === ;p
 
@AwalGarg: How does === make sense when comparing 2 languages?
They're not the same type
 
8:28 AM
+1 to ruby for not having that shitty $ sign in front of all variables ;p
@Cerbrus haha yeah ;p
 
$ is shorter than var
But used everywhere you use the variable, of course...
Which completely negates the benefit
 
x = case y
  when String then y
  when 0..1 then item
  else pluralise item
end
 
@Cerbrus yeah that's what irritates me in php
sometimes it is just too much
 
@JanDvorak: So, it's kindof a "contains"
 
@Cerbrus 1 === 1
 
8:31 AM
for counter in 1..5
  puts "iteration #{counter}"
end
i dun like this syntax for some reason
 
(1..5).each do |i|
   puts "iteration #{i}"
end
I never use for..in
 
> # HOWEVER, No-one uses for loops.
# Instead you should use the "each" method and pass it a block.
yea right @JanDvorak
 
the only "benefit" is that for..in doesn't introduce a new scope, thus leaking variables set within the scope
puts (1..5).map{|i|"iteration #{i}"}.join
 
I like the for..in in javascript
 
JS has horrible for in, for of is better.
For of is like Python's for... in
 
8:36 AM
@BenjaminGruenbaum but it is simple... no?
 
forEach FTW
 
@AwalGarg it's simple, but it does the wrong thing?
 
!!google forEach browser support
 
Is it just me, or is puts a horrible choice of words for the print function?
 
@BenjaminGruenbaum I use it for storing booleans in an object and checking if it is there... in that case, I like it. But I agree with you too.
 
8:37 AM
> it puts the lotion on its skin
 
@Cerbrus meh
 
(actually, I have only used it once ;p)
 
@Cerbrus it [put] [s]tring
 
Ooooooh
That makes sense
 
@JanDvorak damn c++ function
 
8:39 AM
or rather, mapMaybe FTW
mapMaybe :: (a -> Maybe b) -> [a] -> [b]
 
I will ask some sort of noob question, I'm sorry... Now I do :
  var data = new FormData();
  data.append("blah", "blahblah");
  var xhr = new XMLHttpRequest();
  xhr.open('post', 'save.php', true);
  xhr.send(data);
  e.preventDefault();
Is it possible to get an answer "back from the server" in Javascript ?
 
@Basj xhr.onload
 
@JanDvorak Thanks!! Is that such things that we call AJAX ?
or is AJAX something else ?
 
@Basj yes
 
haha nice
 
8:44 AM
jQuery provides a convenience wrapper over XHR
 
where exactly is what we call AJAX ?
 
asyn javascript somethin smthin
 
Asynchronous Javascript And XHR
 
no that is wrong
Asynchronous Javascript And XML
 
!!tell awal define retronym
is she dead again?
 
8:46 AM
> ret·ro·nym
A new term created from an existing word in order to distinguish it from the meaning that has emerged through progress or technological development (e.g., cloth diaper is a retronym necessitated by the fact that diaper now more commonly refers to a disposable diaper).
lol
I so much want to ping rlemon to ask about the bot lol
 
Bush 41 might be a nice scifi horror movie name
 
@JanDvorak She's a zombie atm, she reanimates and dies again when someone does something complicated.
 
What's broken about that bot?
 
Zirak hasn't applied his patch yet afaik
That's the only reason why she broked.
 
@Cerbrus ask rlemon
 
8:48 AM
To patch what? :P
 
ping him, just 3 times
 
The new users code.
 
I don't dare ping rlemon
He's aboosive :P
 
18 hours ago, by rlemon
WANT THE BOT BACK UP? GO AHEAD! PING ME ABOUT IT ONE MORE TIME. I DARE YOU! also @BenjaminGruenbaum loves to be asked all of your jQuery questions.
He loves getting pinged.
 
ikr
 
8:49 AM
18 hours ago, by Benjamin Gruenbaum
In case you're wondering about the bot - rlemon knows what's up with the bot but will only tell you if you ping him 3 times asking about it.
 
testinggg
 
testinggg
 
hey guys
 
hey
 
8:50 AM
can i know whats this all bout?
 
you can
 
Are you serious? The code after the return of a new rejected promise gets never called. And you do not need the deferred here because you creating a new promise by using $q.reject()... — Sebastian 11 mins ago
 
I am feeling sleepy
 
What a douche :D
 
In angular
what if I have to communicate between services?
 
8:51 AM
Actually guys what is service?
can anybody explain me?
 
> serv·ice
The action of helping or doing work for someone.
 
how is it defined in angular
what is the difference between
factory and service
 
Hm, do oneboxes like that ping the person that got pinged in the message?
 
@Sebastian obviously code doesn't get called after a throw or return, all the involved parties are well aware of that. The code in this answer is replicated from the question - OP asked how to signal errors, this is how you do it (see how in this answer return $q.reject replaces the throw "foo" in the exact same surrounding code in OP's question. Please consider taking another look at OP's code. — Benjamin Gruenbaum 3 mins ago
 
and also thought about dependency injections are welcomed
 
8:53 AM
@Cerbrus test
6 secs ago, by Awal Garg
@Cerbrus test
 
@AwalGarg any answer?
 
Hm, only one ping
But both @'s are highlighted
 
hi @Sippy
 
@divakar You can bookmark this for reference.
 
Fucking Singletons, fucking Java
 
8:55 AM
@AwalGarg how do you rename link like that on chat
 
@Gotalove [magic](http://i.imgur.com/iZcUNxH.gif)
 
[Like This](http://www.google.com)
 
been on chat for like 4/5 mths still have no idea how
 
Ah, there we go.
 
@Gotalove [like this](http://localhost/<script>alert(document.cookie)</script>)
 
8:56 AM
hi @SecondRikudo
 
The http:// is mandatory
 
@AwalGarg hehe am serious
@AwalGarg oooh (sillygoose.com)
 
Classy, your website in your username
Is that even allowed?
 
(no one starred my bookmark message, it is so much helpful)
 
starred it
Thanks
 
8:59 AM
4 mins ago, by Awal Garg
@divakar You can bookmark this for reference.
this one
 
hahaha
 
its no funny
 
"Google it" really isn't a nice thing to say, @AwalGarg.
 
@Cerbrus hehe why not if its your blog :-P
 
@Gotalove Hello.
 
9:00 AM
@Cerbrus google it
 
@Gotalove: It's advertising.
 
Also, I get fucking irritated by that : you put after usernames.... why do you do that? @Cerbrus
 
@AwalGarg: I put it after the usernames.
@AwalGarg: Because.
@AwalGarg: Does that answer your question?
 
haha actually your right @Cerbrus on his profilename now thats overreaching
hehe
 
@Cerbrus::WeAreNotClassesAndYourMessagesAreNotMethods!!!!
 
9:03 AM
That's not what : means in JS, @AwalGarg.
 
(if someone can clear stars from that localhost link code demonstration message pls)
@Cerbrus That's what :: means in PHP ;p
 
I never use ::, though.
 
the irritating fact remains ;p
 
this close to giving up on this webrtc
 
@AwalGarg:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Feel the power of the colon.
 
9:06 AM
@Cerbrus \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ I escape you!
 
why you so hard to get proper tut (ง Í ° ÍŸÙ„Íœ Í¡°)ง
 
hahaha nerds :)
 
Not the other one -.-
/* @AwalGarg */
 
@JanDvorak do you have an example of xhr.onload ? How to display to console the answer of the server ?
 
9:07 AM
615
Q: How to return the response from an Ajax call?

Felix KlingI have a function foo which makes an Ajax request. How can I return the response from foo? I tried to return the value from the success callback as well as assigning the response to a local variable inside the function and return that one, but none of those ways actually return the response. f...

 
'/^@Cerbrus/gi'.test(*).replace(null)
 
> SyntaxError: Unexpected token *
 
prior to that * = document.body;
(now don't start explaining that * is not a valid variable name and all...)
 
@dystroy where did you get the material to create those webrtc stuff I need to start at the bare minimum otherwise all this code looks like magic
 
* is not a valid variable name and all...
 
9:12 AM
YOU!!!!
 
@Cerbrus except in Lisp
 
(I didn't "start" explaining", I just mentioned it :P)
 
or in Haskell (where it's already taken)
 
...
yay I just setup basic chat functionality (on localhost) with an awesome feature! :D
There should be "localhostfiddle" or something
 
-1
A: How to implement Obfuscated javascript code

Noypi Gilastry this one... myapp.controller("loginCtrl", ["$scope", "$http", function ($scope, $http) { .... }]) update check this tool https://developers.google.com/closure/compiler/docs/gettingstarted_app

 
9:15 AM
too bad I can't share with server side code
this is fucking pathetic
 
Err, the answer there
 
@JanDvorak : I tested :
  xhr.open('post', 'save.php', true);
  xhr.onload = function(){ console.log(xhr.responseText); };
  xhr.send(data);
and I get
"Resource id #3"
 
!!tell Basj mdn xmlhttprequest
 
@AwalGarg I'm already on this page
@AwalGarg but nothing related to resource id
 
@Basj you can't get responsetext before you send the data, you know right?
@JanDvorak you told him to do that??
 
9:18 AM
@AwalGarg What did I tell him?
 
@JanDvorak he pinged you so I thought... nvm
 
@Basj sounds like the server response isn't all that useful
 
xhr.onload = function(){ console.log(xhr.responseText); }; is just a callback function, it's not designed to be called before send(data) : it's a callback like when we add addListener to some DOM elements
 
yes but it executes before that
 
@AwalGarg no
 
9:20 AM
@JanDvorak how
 
@SecondRikudo I saw it! I SAW IT!
 
@AwalGarg no no, it's xhr.onload = a function which will do this and this later
 
hes hakin de internet
 
@AwalGarg lookup how callbacks work
 
hehe Sippy getting all excited
I just missed it
 
9:21 AM
@JanDvorak lol, I am saying that his server can post response later
 
@JanDvorak ok so it's my server answer which is useful, right ?
 
...
 
@JanDvorak problem solved : my server indeed wasn't answering anything correct .... Thanks for this onload, it helped me a lot :)
 
wait...
 
wat jus happened
are you two using telepathy? @basj @JanDvorak
 
9:24 AM
@Sippy it's the power of @Basj using his brain
 
back :)
 
ahh
 
tell me, i have a js function "MYFunction" , wich works fine. When i try .done(function(){}) on it, i have the message that MYFunction is undefined... but the function is called... where does it come from?
 
@Sippy JanDvorak gave me the hint of using 'onload' 30 minutes ago that's why I thank him :)
 
@Julo0sS .done(myFunction) should work
 
9:28 AM
@JanDvorak and what if xhr2 is not supported by the browser?
 
@AwalGarg ?
 
@JanDvorak mdn documents it as an xhr2 feature, while the readystatechange one as the initial standard spec...
 
@AwalGarg use jQuery if you want IE8 support ;-)
 
facepalm
 
0
Q: Github STAR button on repository page

Kamran AhmedIs there any way to add a star button to the promotional page of the repository just like there are facebook like and Google Plus' +1 button, where you just add a snippet and the button works?

 
9:30 AM
@JanDvorak why not just use readystatechange?
 
@AwalGarg or that
 
@SterlingArcher keep on keeping on ! looks good so far
 
another facepalm
 
@JanDvorak well its a non ajax function... i try to return an object from it to allow .done but seems like a have a problem with it... the main thing is that i set values in a list with this function, and i call a function that uses its value... since this update is not finished, the value is null... guess its again and again a "sync" problem with ajax called into the update function
 
9:32 AM
@Gotalove Unfortunately webrtc is mostly magic. You have to recite the spell and hope it works
5
 
@Julo0sS fiddle?
 
hehe doomed
 
!!afk
 
@dystroy that is not unfortunate ;p
 
@AwalGarg for an engineer it is. Most things I do I can easily segment in small testable units
 
9:33 AM
Please help, guys.
1
Q: moving from ng-include to ngRoute

Rahul DesaiI am new to Angular and learned to basics about it recently. In my current project, I am developing a single page application. As of now, my HTML/Js setup is as per below: HTML: <body> <ng-include src='"src/includes/home.html"'></ng-include> <!-- home.html is the HTML template with sta...

 
@JanDvorak too many files...
 
haha
 
@Julo0sS MCVE pls
 
@JanDvorak whats MCVE? ^^
 
(fact: I got that link via googling "MCVE")
 
9:35 AM
lol
 
... and no one wants to bookmark google.com
such a shame!
 
Pfft
Lots of retirees have it bookmarked bro.
And they google google so they can get to google to google stuff.
 
nvm
!!afk
 
thinking to get certification on javascript, worth to have one?
 
@KaizarLaxmidhar no
@KaizarLaxmidhar also, nothing from w3schools is worth having
 
9:50 AM
yes got the same feeling about w3schools, stuff they covered is very basic
 
even what they cover is wrong
 
the idea behind certification is to get some motivation learning javascript in depth
 
er... no
if you really want to learn a language in depth, use it
 
@dystroy I give up now thanks for the links and help.Will try this maybe in future... slowly postponing it to the distant future
 
good suggestion
 
9:58 AM
-1
A: Customize "tab" behavior

mpachecoCan you check this link please? http://www.w3schools.com/tags/att_global_tabindex.asp

Nuke that answer please
Downvote it, flag it, set it on fire, whatever you want.
 
@JanDvorak jsfiddle.net/x3qy1due tried to illustrate the problem
wait
 
@Cerbrus voted to delete
 
It seems the poster already has
 
@JanDvorak This is it : jsfiddle.net/x3qy1due
@JanDvorak jsfiddle.net/x3qy1due/1 (sorry :P)
 
Hi. I am facing a datetime hell... I need to get a date some 60 days prior to today and display it. But the result I am getting is incorrect. What is the correct way? fiddle
if you select Oct 10th 2014, the result shows up as Oct 11th 2014...
 
10:08 AM
@Julo0sS You're calling .done on a variable which holds undefined
The function you called .done on doesn't return anything.
 
@SecondRikudo what should i return? i read about "deferred.promise()" but it doesnt seem to solve anything...
 
@Julo0sS Deferred objects work well when you're doing thing asynchronously.
 
Which is not what your example does
What are you trying to do?
 
@SecondRikudo fill two selects on page load to be able to use their selected value as soon as body is ready
@SecondRikudo i have a page that loads, i include a php file which contains these 2 selects, they are empty. In my document.ready part i have code that uses these 2 selects values... if they are not already set it fails... this is why i should "test if they are set", set them or not, and then use their values to fill other fields on my page...
@SecondRikudo must be sure they are not empty, thats why i used .done, to make sure that it is filled before trying to fill the second one
 
10:17 AM
@Julo0sS You're not returning anything though
You're calling undefined.done()
 
@Julo0sS Sounds like you have an approach problem.
Who fills in the options?
 
Promises are nice, but if you don't know how they work, you shouldn't be using them most likely
 
They don't come pre-filled from the server, right?
Client fills them somehow?
 
@SecondRikudo the system, from ajax query on the $_session var
 
10:27 AM
how so simulate an .ajax in fiddle please?
 
There's an help section in jsfiddle
 
why using $inject in angular ?
MyAppController.$inject = ['$scope'];
 
@SecondRikudo Gtg eat something, i come back asap and ask you about it, thanx for help, i noticed it workd with your code, but idk why mine didnt...
 
@Julo0sS Read my solution carefully
If you still have questions, ask.
 
10:41 AM
hello guys
anyone here working at the office right now?
 
wat
 
@JanDvorak Microsoft has good stuff covered in their certification
 
Im bored
 
Hi guys, how would you test the skills of someone who has to work with AngularJS to see if he is capable?
 
10:45 AM
"someone".test(/capable/g)
 
haha. thanks @shea.
 
any time
 
if I want to bent I go here eelslap.com
 
10:59 AM
So I took a nap today, first time ever ;p
 

« first day (1446 days earlier)      last day (3520 days later) »