« first day (1350 days earlier)      last day (3599 days later) » 

5:00 PM
did somebody call Jesus?
google images says he's jesus.
 
He looks... different than I remember
 
@Loktar do you know if <video> has CORS support yet?
 
no idea
 
5:01 PM
FF apparently supports it
I'll test on chrome I suppose
 
Is it worth trying to learn coffeescript?
 
It's just an alternate syntax
 
@BenCraig not really
If you need to learn it, it's not too hard. Focus on learning the hard things
 
Whats considered hard things then?
 
scope
Dunno where you're at in your JS journey
 
5:16 PM
About a month of working with it
still have a lot of issues with things people in here seem to think are really simple
 
Like what?
 
yesteday was ajax calls, and some client vs server issues
 
Were you the one that wanted to use php code on the client side?
 
yeah - focus on being able to model how async works
 
proabably
looked though my chat history, yes I asked that
 
5:24 PM
Basically the server holds everything
and the browser downloads the html and javascript
and that's all the communication they have
[-server  ]                  [-client  ]
|-js-------------------------->-js     |
|-html------------------------>-html   |
|-backend |                  |         |
[         ]                  [         ]
If the client needs something from the server, you'd code it in to explicitly ask for it, and then the server would send you a response
 
that makes sense
 
And that's where asynchronous calls come from. The browser's doing it's thing, and you need something from the server. so you ask the server for it and continue to chug along with whatever else you were doing. When it gets a response, it hands it off to your code and you do what you need with it.

It's just an event that gets called, like `onclick`. Except it's triggered by a response(or lack of response) from the server, not a click.
 
Can I force it to wait for the server response?
 
You can
 
Is it a bad idea?
 
5:37 PM
To quote @FelixKling
> 1. Synchronous AJAX calls -- DON'T DO IT

It is generally a bad idea to make AJAX calls synchronous. DON'T DO IT. I'm serious. I only mention it here for the sake of completeness. Why is it bad do you ask?

JavaScript runs in the UI thread of the browser and any long running process will lock the UI, making it unresponsive. Additionally, there is an upper limit on the execution time for JavaScript and the browser will ask the user whether to continue the execution or not. All of this is really bad user experience. The user won't be able to tell whether everything is working fine or not. F
Post in question:
512
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...

 
That would have been really helpful yesterday haha
 
also @Zirak's post on how to actually do it without jQuery
 
How to use jQuery: don't
 
Unless you want to
Or the library you're using is dependent on it
fucking selectize
 
or just don't
selectize?
 
5:41 PM
Im trying to modify/fix the code thats already written, some of it has JQuery, some doesnt
 
Selectize looks really simple, just roll your own. I built my own function for handling custom select styling
 
Thanks for the links though
 
jQuery's fine. Just remember it's a library. People seem to think javascript is jQuery. People hate it because it breeds incompetence
 
ugh. @Loktar thought I was going to be clever. can't use a video tag to create a pattern :P
 
jQuery is aids
 
5:42 PM
var pattern = context.createPattern(video, 'no-repeat');
 
Blind hate is aids
goml
 
doesn't error, but I get nothing.
 
hah that would have been cool
 
I wanted to fill some text with a video
with CORs support I can do this. otherwise I am lost for ideas
well, I can draw the text to a temp canvas, loop over the main one and set the px to transparent after I filled the canvas. and just layer the video behind
but that sounds messy
 
@Cereal That's not the problem though. The problem is that jQuery isn't good. It solves a problem that JavaScript has, but not in a very good way.
 
5:44 PM
!!redesign site or work on that canvas demo
 
@rlemon work on that canvas demo
 
okay..
 
!!poop or wait to poop until home
 
@NickDugger poop
 
PAID TO POOP
on a Friday
it's the American Dream
 
user1596138
5:45 PM
Benefits of hourly pay
 
poop for an hour = awwyeah
 
@Copy Why is that? Genuinely curious. I don't use jQuery much
Edge cases slowing shit down, or?
 
So, jQuery has .serialize for forms, is this an acceptable way to accomplish getting all form data?

`var data = {};`
`var form = document.getElementById("myForm");`
`for (i; i < form.length; i++) {`
`data[form[i]] = form[i].value`
` }
Edited too late. now it's shit forever
can't format markdown worth shit
 
unfortunately I have this phobia about pooping on toilets I don't own.
maybe not a phobia, but I don't like doing it
a man is only king when sitting on his throne.
@NickDugger non natural line breaks remove all markdown formatting
 
@NickDugger Hit ctrl+k to indent blocks of code for formatting
 
5:50 PM
only fixed font works.
 
Edited too late. Now it's shit forever
 
var data = [].map.call(document.forms.myForm.elements, function(elm) {
  return { name: elm.name , value: elm.value };
});
err wait
 
@Cereal Well, the DOM sucks. Browser compatibility sucks. Using selectors like jQuery does is the appropriate solution for small websites, but not for web applications. In addition to that, the jQuery API is just not very good. Unintuitive names, weird overloads, etc.
 
@rlemon I don't really want an array. It's easier to simply have a key/value object, and pass it over in the ajax. Either way, my way works, it's just not the prettiest
 
5:54 PM
var data = {};
[].forEach.call(document.forms.myForm.elements, function(elm) {
  data[elm.name] = elm.value;
});
console.log(data);
> Object {username: "rlemon", email: "rob.lemon@gmail.com", sex: "yes please"}
@NickDugger I think for readability it would be nice to see form.elements in there
var formElements = document.getElementById("myForm").elements,
    data = {};
for (var i; i < formElements; i++) {
    data[formElements[i]] = formElements[i].value
}
 
m59
@Loktar, last night, I had a dream that you released Grapple Hero for PS4. It was 3D with Morpheus support, LOL.
 
haha
well I have a contact for the psvita
 
@Loktar any word on when that is being released btw?
 
no
 
:/
 
5:57 PM
sometime in the future lol
 
this year?
 
hopefully
 
cool
 
should be this year sometime
 
I'll bug you again in December
 
5:58 PM
summer kills my motivation always
 
m59
After I played it, I went on a freaking rampage trying to figure out how you single-handedly wrote it in JavaScript and how I had been wasting my life not doing whatever brilliant thing you're doing.
 
same, well not summer directly. beer + bbq ruins my motivation
 
m59
Maybe it's a sign I'm supposed to become a Doppleganger.
 
Makes sense. It just wasn't necessary in my example
 
Has anyone heard of a Dev shop moving *from * angular to another framework?
 
5:59 PM
Angular is already past "hip" ??
welp
!!afk I don't feel like working anymore
 
m59
@SomeKittensUx2666 Kind of like what Iron Man did at the end of the third movie when he blew up all of his suits?
spoiler alert
 
I'm talking to a lot of shops that are migrating to angular
 
it seems like it'd be bad for SEO to switch to angular
 
m59
@RalphWiggum not at all
 
well not at all if you know what you're doing
if you don't your seo is fucked.
 
6:02 PM
@m59 oh, wouldn't search engines ignore most of the ng-bind/brackets text?
 
m59
You just use a headless browser to take snapshots of your sites and serve those to crawlers. It's easy to setup.
Yeah, they don't care about that anyway.
 
hmmm, alright
 
@Zirak my love, I come bearing gifts!
 
m59
@RalphWiggum oh, my bad
I misunderstood your question
 
I still don't like the methods for getting it seo friendly enough to use it on a site that needs seo
 
6:02 PM
also, rlemon's pc has been dodgy, don't want to leave everyone high and dry.
 
m59
They would just see the rendered version of page.
 
lol always a buck to be made
 
m59
They're pretty expensive.
There's a cheaper one.
 
man all SEO places are
 
why does firefox look like chrome.. :(
 
6:08 PM
?
it doesnt for me
I can see a pretty clear difference between the two
 
it upgraded automatically after crashing
 
@blackbee so you hate firefox ?
 
i used to love firefox ... but then mayb e with version 29 it started hang-ing so much .. :(]
 
may be bunch of extensions may be the reason...
 
when would you use function foo() {...} vs var foo = function(){...}
 
6:11 PM
no extensions ... only firebug
my 1.6Ghz processor may be a problem ..
 
hmm..
 
and my laptop (mini) shuts down automatically after a couple of hours .. stating "PAGED ERROR IN NON PAGE SEGMENT" .. never found out what it meant
 
windows or mac ??
 
windows... mac would cost like a leg or maybe a head
pirated though
8 pro
 
i m still sucks into 7 , how is windows 8
 
6:15 PM
its windows 7 with a fancy start menu and no start button :P
 
So full of asian food
 
if you have 7 no reason to upgrade to 8 unless you're doing a new pc build or something
 
he he he....
 
its a little fast at start but sinvce windows 8 starts saving images to somewhere to enable speedy loading .. it gets slow eventually.
 
user1596138
^ lol
 
6:17 PM
@blackbee yeah I've noticed the startup speed isnt what it used to be on my machine, but its still pretty damn fast
 
Did you guys know that you Stack actually gives people swag at 200k rep?
Jeff Atwood on September 01, 2010

Have you ever wondered what happens when you reach 200,000 reputation?

Just ask Jon Skeet.

Apparently, what happens is … you get a painting of unicorns, signed by us, dedicated to you.

Estimated value? Priceless!

Joel and I actually sat down with Mr. Skeet himself to record Stack Overflow podcast #72 during the London leg of DevDays — in the very Google offices pictured here.

Although we sometimes joke that Stack Overflow was accidentally constructed as the ultimate Jon Skeet honeypot, I’d be remiss if I didn’t mention that Jon has a long history of answering people’s  …

 
takes around 7-8 seconds now vs around 5 with a fresh install
 
@RUJordan woah wtf
thats awesome
 
user1596138
@blackbee QYJBEMG.TK
 
6:18 PM
Right? 200k here I come cause I WANT THAT PICTURE
 
well, theoritically it should get slow.. maybe i need more technical insight :(
@Jhawins what is that?
 
link :)
 
if(d.biography = undefined || "") - Y U ASSING IN IF? — raina77ow 47 secs ago
^ assing hahaha — RUJordan 31 secs ago
hehehe
 
6:26 PM
lol
 
Oh god. The stomach rumbling has begun D:
stackoverflow.com/a/24458589/774078 if I post an answer that's literally verbatum the MDN, is that a bad answer?
 
It's a bad question
 
@ChrisOkyen I've been all over VA. I grew up Northern VA, then lived in Southern VA for college for 4 years, and then in Central VA for a few years, and now I'm out of my parents house and back in Northern VA
@SomeKittensUx2666 it could be better yeah. But he showed research (kinda..) and was able to clearly explain what he was trying to learn (if he had asked for code I would treat it differently) but anybody wanting to learn -- good for them :)
 
upvoted.
question and answers
I liked it tbh.
 
has anybody ever heard of ChucK?
 
6:34 PM
Mr. ECheese?
 
yesss?
 
chuck norris
 
I mean, the (debatably) programming language ChucK
 
D: lets make BruceLee
 
just call it Bruce
Then you can claim its Campbell, Lee, ect.
 
:D
 
it's a music related programming language
 
saw it just now
looks fun
 
but it's strange as hell
it uses half polish notation
this is how you declare a variable:
0=> int i;
but many other things use normal notation
also, many music things are primitives
like:
SinOsc a
 
giving a value a variable .. i have seen such reverse things once.. can't remember ... :(
 
6:39 PM
that's sine oscillation
 
like matlab sin(x)
 
@blackbee yeah, it's called polish notation, and it was quite used a while ago because of how stacks were handled
 
Weirdest error I've ever seen
node index
Bus error (core dumped)
npm ERR! weird error 135
npm ERR! not ok code 0
 
lol
 
6:43 PM
why use this language?
after technologies like pandora et all..
 
@blackbee apparently it's the most used language by pc musicians who have never coded before
 
ew
 
I'm not a musician and I've coded before, but I was curious
 
:P
 
a script of mine wasn't working so I was wondering if anyone here knew the language and could help me
 
6:49 PM
as its pindrop silence... what aboutz the community? chuck.cs.princeton.edu/community
 
7:00 PM
So I'm playing with angular
and it's just... so much better
 
angular is tough to debug, but a working script is awesome
2
 
Wno't be able to use it for this project, but it would have been useful had I known about it a few months ago
 
0
Q: Turn JavaScript code into an AST?

Golo RodenI would like to write a function in Node.js that receives another function as parameter, and returns that function as an AST. E.g.: var fn = function (x) { return x > 23; }; var ast = generateAstFrom(fn); console.log(ast); // => The abstract syntax tree representing // the expression "ret...

this confuses me
 
@RUJordan Check out udacity.com/course/cs262
Your SO grinding is a waste of time anyway, at least in my opinion
No offence
 
None taken -- I'm assuming it's a waste because of the question quality?
Interesting course though
 
7:08 PM
@RUJordan Yes, exactly
 
Definitely agree
I spend more time closing questions than I do learning from them
 
Good morning boys
 
I was about to take offense to being called a "boy", but then I saw that "PAID TO POOP" is starred on the side of my screen. My offense is nullified.
 
lol
 
@copy have you made a browser before?
 
7:13 PM
I used the IE control in VB once. does that count?
 
@RUJordan I've taken that course, so yeah
You might be disappointed because for rendering a library is used
 
Oh so it's not as "hands on" as I thought
UVA is only 2 hours away from me, coincidentally. 45 minutes from my parents
 
Does someone have Angular code on a github repo or something?
 
I'm sure someone does
 
7:16 PM
hehe, thanks jordan
 
@RUJordan Instead of spending time on SO main, you should work on that project more
 
@copy it's so hard to be productive on my game during work, which is when I'm on SO the most
Plus I'm content blocked
 
Oh, that makes sense
 
I have a meeting right now, but when I come back could I pick your brain for some ideas?
 
i am trying to figure out the best way to subscribe to an ObservableArray's Observable property. does this approach have drawbacks?
 
7:18 PM
@RUJordan Sure
 
!!afk big important big boy meeting
 
:)
 
:|
 
Luscious Lucio
 
7:31 PM
Hey butthead, make me a regex
 
That's a comment
 
there's your regex
bitch
 
Still a comment
 
you're offensive
 
7:33 PM
:'c
we're so close to hitting 100,000,000 records at work!
currently at 99,291,817, but only 974/min
 
Hey
 
@Andrew 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.
 
HEY ANDREW
 
So weird question, and SO mods here?
 
@Andrew May I say, you have the most beautiful eyes.
 
7:34 PM
@Zirak, thank you :)
 
Not at the moment, but you can ping one if you'd like.
@ThiefMaster is our usual deputy.
 
have my babies, andrew
 
O.o
 
That could be nice. I got banned from SO
 
How'd you get banned?
 
7:35 PM
For a downvoted post
 
In the question ban case, they can't help you, it's an automatic system
 
actually the only question I ever asked. But I checked the TOS and it says "One or two bad posts will not cause you to be blocked from using the site. "
So I've only posted one question ever... how did get banned
 
Did you delete your own posts?
 
nah
first time I used SO i got banned
 
good times
 
7:36 PM
Is it a question ban? Or a suspension
 
I can comment, just can't post questions. Its been 100 days.
 
@Andrew It may have something to do with the "first time" tidbit
If I take it to mean "on a previous account"
 
can you post answers?
 
likely
question bans are just that
 
Yes, I can post answers.
 
7:38 PM
you get out of them by posting quality answers and contributing positively.
 
@Andrew The question ban isn't time based, it's quality based. Unless you answer questions and the like, it won't get lifted.
 
Oh well
 
such is life :(
 
just answer a dozen questions.
bam
 
@RalphWiggum records?
 
7:39 PM
@towc database records
 
@RalphWiggum oh
 
I can't make nested states work in angular :(
 
@Lucio, its probably because Angular doesn't support that
 
are you using ui-router?
 
He has to be,
for it to work
 
7:40 PM
yep, ui
The strange thing is that the state is called, but not its controller
and no js errors are shown. This are the states
 
Huh
try f12 on firefox or something?
look for error log?
 
yep, I'm watching the logs
 
Check your code against that tut, I used that for our prototype app
 
^last calls
 
gotcha
so... how many of you have jobs in SE?
 
7:47 PM
@Andrew thanks, I am going to read that
 
Cuz I am working now, but I was wondering if anyone here was working and doing a cs degree. I would like to go back to school and finish up
 
firefox dev tools are fucking terrible
if a file has a syntax error, you don't see it loaded in the debugger, and it tells nothing
 
@FlorianMargaine exactly!
What tool is useful for angular debugging?
 
@Lucio none sadly
well maybe unit tests
 
Chrome Developer Tools + Tests
 
7:51 PM
:(
 
@Lucio Switching frameworks
 
I am just getting into this Angular, cuz company wants to switch to angular from JSP for ui... But so far I have noted that angular breaks alot
 
at work we got some 3k LOC js page, no framework used, but some intelligence. It's very maintainable and easy to do so.
Lot of little functions, each one doing its thing, some functions calling others, etc. It all works out pretty well.
 
okay wtf is going on here: jsfiddle.net/9yrvb/1 the text isn't supposed to be small.
 
7:54 PM
I'm so bad at regex, I've learned so much from Caprica, lol
 
and when I console.log the context.font it is like it I am never changing it
 
Feature suggestion: When someone attempts to replace something with some synonyms of genatalia, the bot yells at them.
 
yea setting canvas style height/width scales the canvas
 
Feature suggestion: when someone replaces it with a synonym of a genitalia, they become a mod
 
7:55 PM
hi
 
you need to set the attributes ( properties )
 
Hi @Markberg
 
o/ mark
 
Facebook guy
 
How can i select those img tag that their src atters are jpeg or png type
ofcourse in jquery
 
7:56 PM
> src atters
 
I think you need to loop through them?
 
talking about regex...
 
@RalphWiggum what do u mean
 
get all the images and check each one
$('img').filter()...
 
Tip #1: don't use jQuery
 
7:58 PM
[].filter.call(document.images, function(img) {
  return (img.src.split('.').pop()).match(/jpeg|png/);
});
untested
probably doesn't work
 
Tip #2: press alt-f4
 
Anyone know a way to map a url such as domain.com/#/module to a conditional domain.com/#/module?v=1 so I can put different versions?
in angular
 
@rlemon how can you measure something that doesn't exist then? the text hasn't had its font applied to it
 
WHOA
never knew about document.images
 
@FlorianMargaine jsfiddle.net/VX4HS works here
 
7:59 PM
@Ralph Another reason to not use jQuery
 
There are all sorts of useful (debatable) HTMLCollections hiding about
 
you set the font, then you "measure text" and it should take that font.
 
The most useful and underused is form.elements
 
if you console.log(context.font) at the end you'll see it is 10px san-serf
 

« first day (1350 days earlier)      last day (3599 days later) »