« first day (1867 days earlier)      last day (3076 days later) » 

5:00 PM
//my code is
var client = {};
client[socket.id].push({[socket.id]:val});

//getting error missing ( argument
 
@Abhishrek why?
 
if it's got [i] it's an array
:/
 
@ujwaldhakal we saw, stop posting the same code over and over.
 
@GNi33 I got a new laptop,I want to take it for a spin
 
[i] is how you access an element of an array
 
5:00 PM
I only now the CS games from that list
 
you need an array to manipulate first.
 
@Abhishrek use 3DMark
 
@GNi33 the catch is I don't have the laptop it got delivered to where I will be living in 14 days :-/
so my friend has to test it for me ^_^
 
then 3DMark is definitely the best option
 
xD
oookay
 
5:01 PM
you'll get a comparable score
fuck me, 3DMark costs money now? wat?
ooh, Advanced Edition, okay
yeah, use 3DMark
 
TypeError: connect_clients.indexOf is not a function
at Socket.<anonymous> (/var/www/games/node_modules/app.js:65:33)
at emitOne (events.js:77:13)
@Luggage i need to add default array 1st?
 
@Luggage K, created the array and we're back to the can't append issue
 
myForm[i].append('key', jiraID);
Uncaught TypeError: Cannot read property 'append' of undefined :O
oh I think i know why :D
Or not :/
 
yes whyy
append only works on jquery
 
5:15 PM
hmmm am I not using jquery there?
how do add to FormData without append? D:
 
myForm[i] = objs;
 
wut?
 
what??
 
What does that do?
the console.log says myForm IS FormData
 
your form is rejected
 
5:17 PM
my face is rejected :(
it's not formData, it's undefined :(
that's why then :(
 
haha
 
Why is it undefined iwthin the success: D=
 
why undefined?
it should work
but i do need is all the arrays inside var so i can paste them later all
 
Well you don't define something
 
no
@Cereal true
 
5:22 PM
there !
 
you're also missing a closing parenthesis
 
it IS defined prior to the ajax call. It's defined until the success:
 
Then something's undefining it
 
1 message moved to Trash can
@djsmiley2k Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
#rekt
 
5:23 PM
:D
I.... don't have any undefining
 
for example
 
unless the loop undefines i?
 
var something = 123;
$.get("/whatever/").done(function() { console.log(something); });
something = undefined;

// => undefined
 
I was undefining it previously
//var myForm = undefined;
but not anymore :/
for (var i = 0; i < lines.length; i++) { // when the loop finishes, does i cease to exist?
right now turning off async seems like the best plan
if that works, I at least know why it's happening
 
yes
Why are you using a for loop, exactly?
 
5:27 PM
crap then i is still changing
 
!!> for(var i = 0; i < 10; i++); console.log(i);
 
@Cereal "undefined" Logged: 10
 
Jk I'm wrong
 
@Cereal to loop through each line of a textbox
ur wrong?
 
lines.forEach(function(el) {})
 
5:28 PM
damnit.
@Cereal I have no clue what that is
 
It's an iterator
 
I'm sure you're trying to be helpful, but I don't... know anything
 
Well if you don't want to learn, you're never going to know anything
Post the code in that forloop
 
No no
I want to
I think i did
at 9am this morning XD
let me find it
 
forEach is a function on Array.prototype
it iterates over each element of an array, exposing the element, index, and array to the function
at each element
 
5:29 PM
yeah
makes sense, i get that
jsfiddle.net/ttjpt9ps -- heres the entire <script>
 
crl
<sup>
 
I pretty sure I'm very close to something working
 
sweet jesus
 
but the handling of variables between ajax calls is urgh
 
It's all one function
no wonder you're confused
 
5:33 PM
yes
XD
 
crl
confused user is confused
 
I've not yet tried writing seperate functions in JS/Jquery
I know how to in PHP, but this isn't PHP
and I kept... expanding this
I know people are trying to help showing me functions and stuff, but.... they don't tie together for me
you see why now :D
 
You should probably learn the fundamentals of a language before trying to use it in an app...
 
yeah.... hmm
:D
 
today is code obfuscation day for me
 
5:37 PM
I learn by doing generally hehe
@Cereal basically boss goes ' oh don't submit the form and update the page' (php way) use jQuery instead!
look - and shows me how to submit a form using .serialize
Right. off you go, do more!
version 1 jus submitted the data from a form, for a single line of what this is trying to do (whcih is process it in bulk).
I'm going to try and learn how functions work and maybe figure it out
but being async, I think i'm gonna get stuck still
 
the most apt image ever.
 
In 2 weeks I've gone from normal HTML submission of a form, to handling the whole thing in javascript/jquery without having ever touched it before. :/
 
@SomeGuy reddit.com/r/AskReddit/comments/3uc7gf/… god dammit "Harlequin baby" made me close the tab
but I'm sure you'll enjoy these
 
@djsmiley2k I'm working through the code, and.. you're fucked. What are you even trying to do
 
crl
5:45 PM
very apt-get image
 
@Cereal post to 1 form, then use the result to send a post to a second form
the problem is the doing it for multiple lines of input at once
 
@crl lol
 
@djsmiley2k That's.. not what you're doing, though
 
no?
 
No..
 
5:48 PM
I'mma paste something, sec
 
good evening, evening coders
 
crl
fuck morning ones, they suck (don't know how they do, I always do shits in the morning)
 
the mission of tonight is "figure out how to control a polymer component from the outside"
 
crl
what's that?
 
I want to mess with stuff inside polymer
 
but outside the framework
I know with webcomponents you can expose stuff but its hacky
 
crl
I'm a stranger to that
 
!!should I add UML to Vis ?
 
@Abhishrek Yes!
 
just kidding 2.9 cap
 
6:06 PM
wheres my chocolate?
as its near the fridge
so is the wine
 
crl
!!youtube chocolate rain
 
crl
that's many years I haven't eat chocolate
 
Sorry for stealing @Cereal off you all
but s/he's awesome :D
 
We don't want him either way
 
crl
6:20 PM
he's too Cereious
 
@Abhishrek Red Orchestra 2, Rising Storm
 
@Loktar :-)
thanks
 
np
 
should this require an epilepsy warning? beta.techyscouts.com
 
elm.addEventListener('mouseover', handler.bind(elm, i));
function handler(i) {
  this.blah = foo[i];
  this.removeEventListener('mouseover', handler); // does this care that I bound in the definition??
}
 
6:27 PM
@towc It should require a law against that shit
 
I suppose I could test it
 
@rlemon yes
actually, it depends
 
@AwalGarg on what? I thought it generally wouldn't...
 
looks like I cannot remove the bound event unless I create a ref to it in the working scope
 
@towc rebinding a bound function... (so not for @rlemon's immediate case, but general answer is "depends")
 
6:30 PM
if I could do this without casting bound that would be great
looks like I'm refactoring
 
@AwalGarg bind is a pure function, it won't affect the function it's applied on
 
@KendallFrey I meant, trying to call bind on a function returned from bind
 
@KendallFrey It's not pure, it can raise
 
raise?
 
throw an error?
 
6:32 PM
An exception
 
oh
That's an exception to the rule though ;)
 
I can raise too :P
 
1 message moved to Trash can
@Ron Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com or pastie.org
 
Ron
Hi Guys,

I am trying to return response of async ajax response but I fail to do it..
Can someone help me?

return $.getJSON('validateuser.php',{data: {user: _this.user, pass: _this.pass}}, function(data) {
return (data.status==2);
});

should be true/false
 
1525
Q: How do I return the response from an asynchronous 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. fu...

 
crl
6:36 PM
will have some fun, have to do a feature like that i.stack.imgur.com/4RVby.png (div automatically expand as you're close to limits)
should I add some tiny div for each cells like it's done there ^, and modify the dom like that everytime?
If I was good I'd to a svg thing maybe..
 
Looks like a table
 
crl
@Ron nice, I think it's the most classic question here
 
Ron
I know, I did try every solution, deferred, promise, callbacks anything but it didnt work for me
I probably do something wrong
 
crl
@copy yes but actually it's a dropdown for defining how many rows and cols you want to a table (in a wysiwyg)
but impl that thing with a table is smart, yep
 
@Ron Read what @BenFortune posted
 
6:40 PM
Hi you all.I have been developping my apps using the Lamp framework for about 3 years and now i think it is time to switch to a more recent technology.I ve been learning the MEAN stack until i found out about METEOR...

I am pretty happy about it but there 's one thing i dont know yet.which should i learn simply meteor or angular-meteor ?

What are your insights? which should i take and learn? i want to take this knowledge and continue on with mobile app developpment with ionic...Please advise the complete neophyte that i am
 
@LilzVotcaLove Neither.
 
@BenFortune why is that?
 
crl
angular is probly the weak link in MEAN (not wanting to rant though, it's good to test it)
 
@AwalGarg gawd luck
 
Dammit I am getting dizzy :( I don't wanna sleep
 
crl
6:42 PM
let alone meteor
 
@Abhishrek what
 
gawd :P
 
crl
@AwalGarg stop cookies
fruits, vitamins
 
@crl no, what kind of sorcerer are you?!
 
so you are telling me to drop both og them
 
crl
6:43 PM
hehe
 
I can say no to my crush, but not to cookies
 
crl
@LilzVotcaLove not like that, do your best, and learn
you do a lot with angular, don't know about meteor
 
!!urban gawd
 
@AwalGarg Gawd Like swearing God! But with More Drastic Emphasis
 
@Abhishrek …
 
6:44 PM
@crl ok
 
crl
@LilzVotcaLove what's your app for? a simple SPA?
 
not really..i wish to do some websites and some spas but they arent simple
one is for school management
the other is a radio with an audio player both for browsers and mobile
 
crl
ok
 
almost XMAS
 
it all started with ionic that i came across and i decided to learn angular first but then the mean stack looked completely mean to me and i came across meteor yesterday and i did the tutorials on their website and it's good so i wanted to port this knowlege toward ionic and be ready for my apps
 
6:49 PM
any genuinely interesting programming books I should order from amazon?
 
This evening I’ll be handing out copies of “Design Patterns: Elements of Reusable Object-Oriented Software” to kids because I’m responsible.
 
Here's a good free book: learnyouahaskell.com/chapters
 
ill do as you advised @crl learn it to see the strenghts and well see for myself thank u
 
crl
yw
 
@towc html5 unleashed
 
6:52 PM
@copy do I have a good reason to learn haskell other than "for the lolz"?
 
learning haskell will teach you a lot about programming languages and how they should work
 
@rlemon divoured that book, loved it ;) It's where I learned how to do 3d in 2d canvas
 
It's also a useful language
 
well, I think I'm going to learn other languages before I get to haskell
 
Ron
I just read what @BenFortune posted and applied it:
http://pastebin.com/gd5Dbga9
still doesnt work.. what am I doing wrong?
 
6:54 PM
like assembly, proper php, perl and such...
 
lol...
You're still trying to return from an asynchronous method...
 
@towc PHP and Perl are useless
 
point is that many people still use them, and a lot of systems are based on them
 
@BenFortune well, it is in a promise so he could still .then after the return
 
Are done and then interchangeable?
 
6:56 PM
remember how I wanted to become a hacker and all of that? Those are the most common ways to do things you're not supposed to do I guess
assembly > client code like games and stuff
php and perl > loads of unsecure websites are built on them
haskell > lol, no use case ;)
 
Pretty sure the usage of perl is negligible now a days. It is a useful language, nonetheless.
HN is backed by Perl I think. Or maybe Lisp.
 
ok, so what's a list of languages I should learn in order of importance for what I'm trying to do?
 
the ones you like
 
every language that is not JS is just ugly :P
 
learnxinyminutes.com can help you make quick opinions to get started
 
6:59 PM
cool, nice suggestion
 
crl
jsfiddle.net/crl/tfezz6ra/16 why isn't the inner div :hover-able? like here
 
@towc Haskell, Python, Common Lisp, Rebol.
no order
all languages I would love to learn
 
@copy will never accept the usefulness of PHP, even though he knows it is useful ;P
 

« first day (1867 days earlier)      last day (3076 days later) »