« first day (1425 days earlier)      last day (3530 days later) » 

12:00 AM
You misunderstood me first though
 
m59
I'm confused by this:
function foo() {return 'abc';}
var x = { a : foo() };
For some reason, I feel that it is wrong and I don't know why.
 
Ended up using awk instead. Good night guys!
 
m59
night!
 
@m59 Looks fine
 
m59
@copy maybe just because I haven't needed to do that often, so it just feels foreign.
 
12:17 AM
Should Angular filters be case-insensitive as a general case?
@m59 ....technically correct
 
m59
@SomeKittensUx2666 have an example? I'm not sure what you mean.
It would just depend on what the filter does, I would think.
 
@m59: if you expect the object to contain the result of the function call, rather than to expose the function, then that is correct
@m59 it seems likely to not be what you're trying to do, however
 
@JohnHaugeland Just FYI
@JohnHaugeland Multiple pings in the same thought
@JohnHaugeland are frowned upon here.
 
m59
@JohnHaugeland I'm not a noob :) However, I ended up not doing it that way after all. So once again. It's a style I just never end up using :)
 
Urge to ping, rising!
 
12:21 AM
Meanwhile, in Runnaland:
  $scope.actions =  {
    updateCommits: updateCommits
  };
 
m59
what's wrong with that?
 
Another code stub that looks pointless in and of itself
 
m59
Looks good to me. I guess it could be argued that $scope.updateCommits = updateCommits would be better.
 
Assuming there's never going to be more than one action
 
@SomeKittensUx2666kay, will adjust, thanks
 
m59
12:24 AM
More like assuming the children will never need to for some reason overwrite the property (pretty good assumption haha)
 
Children'd do that just to fuck with you.
 
@m59 Nope, we namespace everything
 
god i can't wait for javascript to get actual namespaces so people stop calling these namespaces
the recent (it's only been ~4 years) trend of javascript people faking a facility and then using the name of that facility has been tremendously destructive both to people trying to learn who start in javascript, and to people who are coping with the facilities that get added to the language after the names have been misappropriated
 
m59
@SomeKittensUx2666 that's best practice. But uh... you think you namespace everything. I bet I can one up you :)
I namespace my service names. WITH A DOT.
 
eg "best practice" (sigh)
 
12:31 AM
@m59 ...?
 
i have never met a javascript programmer that knows what a best practice is. they all think it's a coy way to say "this is what the community normally expects."
 
@JohnHaugeland I'm sorry my language doesn't conform to your semantics.
 
@SomeKittensUx2666 no, you aren't. and these aren't semantics and they don't come from me.
 
m59
.factory('pmkr.myService', [function() { // screw everyone using ng-min, satisfy my obsessions
 
namespaces are in talks for 1.7, so you'll learn the hard way just like javascript programmers from 1.4 did
and then someone will say "i'm sorry my calling this two feet a meter doesn't conform to your semantics" when you understand what was said to you
 
m59
12:32 AM
You sound kinda like a jerk.
 
@m59 Haha, nice. We don't go that far, but every file starts with what it is (i.e. directivePopOver.js
@JohnHaugeland ok, gramps.
 
@m59 i agree, personal attacks are the way to handle this
man
you two.
okay, you have fun.
 
"Hey, let me find a room full of people who like something and tell them they're all dumb" <- How to win friends and influence people.
 
man if only i actually said that
 
m59
Who's attacking who(m)? I thought you might want to know so that you can be nicer.
@SomeKittensUx2666 Great book :)
 
12:34 AM
@m59 did you think telling someone they were a jerk would make them interested in your opinion on how to be nice?
@m59 your explanation suggests your goal might be out of your reach.
 
in fairness, i've been lurking. you did come off as a jerk just then
 
@m59 Yeah! I learned a lot.
 
m59
Do you think putting words in one's mouth helps your case?
 
@m59 i've not done that.
 
m59
I didn't call you a jerk. I didn't even say you sound like one :)
 
12:34 AM
@m59 i'm also not making a case to you.
mmmm.
"you sound kinda like a jerk. i didn't say you were a jerk, or that you sounded like one."
 
m59
^
logic.
 
if that's what you call that.
if your goal was to get someone to listen to you, your goal was not pursued in a way that would ever work, with anyone.
goodbye
 
@JohnHaugeland bye!
 
m59
Bye!
 
have fun at Tilt!
 
12:36 AM
@rlemon mind if i private message?
 
yes, please dont
 
lol, k
 
Hmm, I could almost walk there.
@JohnHaugeland Uh, private messages don't exist here
 
as a general rule of thumb, if you're telling someone they're coming off like a jerk, and won't let them talk to you in private, you might be looking into a mirror.
 
43 secs ago, by SomeKittens Ux2666
@JohnHaugeland Uh, private messages don't exist here
 
12:37 AM
as a secondary rule of thumb. I'm sick and playing video games. I was just re-assuring you that you did come off as a jerk.
there is no discussion to be had.
you were coming off like a jerk. my reasoning, the words you were writing sounded jerky.
 
@JohnHaugeland We'd love to teach you more about JavaScript - it looks like your site could use some help.
heck, just general frontend stuff.
 
"how dare you say you disagree with something that's done by the community, that's you calling us idiots directly and you're a jerk" (sigh)
 
m59
@JohnHaugeland I don't see the need to dwell on it. I like being told when people find my behavior less than ideal so that I can adjust it. I can't really take your word for much here because you're making no effort to understand what I have or haven't meant. Why not drop the whole thing and we can all be cordial to one another from here on out?
 
i came in here because i was told that this room had no ability to discuss things that were outside their purview
i said "that doesn't seem like what stackoverflow would be right"
my, how wrong i was.
 
7 mins ago, by John Haugeland
and then someone will say "i'm sorry my calling this two feet a meter doesn't conform to your semantics" when you understand what was said to you
that was jerky
if you disagree, I really don't care
 
12:40 AM
"Hello, I don't know any of you, but let me interrupt your conversation and explain why you're wrong"
In other news, @SterlingArcher has a Pebble?!?
 
m59
How about this: I, Johnny Hauser, am a scrub programmer without a clue and an argument instigating jerkbag.... and a charlatan.
 
11 mins ago, by John Haugeland
i have never met a javascript programmer that knows what a best practice is. they all think it's a coy way to say "this is what the community normally expects."
also pretty jerky
 
m59
Now we can all get along :)
 
aaaaaaanyway
We don't namespace our stuff in separate modules.
haven't hit that need yet
 
m59
@SomeKittensUx2666 about this directive filename bitness.
Are they not in a directives directory?
 
12:46 AM
directive, controller, filter, view, etc
@m59 they are.
 
m59
DANG.
Tie it is, then.
 
To be fair, it makes finding them easier in Sublime Text (i.e. controllerBuild vs viewBuild)
 
m59
Though, that would probably help me out in my project because I end up with some stuff open in the editor and I can't distinguish which is which :)
exactly
I should do that
 
cmd + p = > vb and I'm already there.
 
m59
nice :)
what's even funnier is when I have the posts server route, posts controller, and posts service files all open at once :)
posts.js, posts.js, posts.js
 
12:48 AM
ew
 
m59
yeah
 
it can get a bit absurd: {{ dataInstance.data.container.attrs.inspect.State.FinishedAt | timeAgo }}
 
m59
and not to forget posts.jade
wow, that's intense
Is there that much logic/data/state going on??
 
sorta
there's a LOT of data flying around
 
m59
Dang. Props for being able to keep that straight.
then again - tests
 
12:53 AM
yep
everything's in a lot of flux right now
 
m59
Writing tests is the first time I ever felt really powerful as a developer
Probably the first time I wrote code that made a computer do something tangible that 1000 people couldn't do in the same amount of time.
 
@JohnHaugeland Still reconsidering your decision to leave? We're normally pretty nice.
I wonder who told him we were awful.
Probably Zigi
remember okok?
 
user2620028
1:42 AM
Jesus.... i just read from the point he joined chat.... I am glad i was not here to talk to him because i don't think i could have been as nice you guys were :/
 
2:16 AM
is there a way to say in javascript
"for object.this do this and for object.that do that?"
 
m59
heerrrmmmm?
@grasshopper perhaps you should tell us WHAT you want to do :)
 
An 'if' condition?
 
m59
Pretty bad question if the answer could be "an if statement, a for loop, a function with a parameter, or some combination thereof"
 
So for d3 I have these labels but i want them to have different sizes, so for d.label have this size and for d.value have this size, but I am not sure how to tell javascript to do that? I have a jsfiddle if you want to see.
 
m59
yeah, still not clear
All I heard was:
d.label.size = 'whatever' and d.value.size = 'whatever'
 
2:23 AM
yeah thats pretty much what I'm saying
attr.("fontsize", (d) -> if d.label = "whatever" if d.value = "something")
 
m59
Why are you not posting the fiddle? You're not making any sense.
 
m59
holy gosh, is that cs?
 
Hahaha no
Just bad code
 
m59
wow
@grasshopper sorry man, I literally can't read any of that code.
 
2:28 AM
So many syntax errors
Missing semicolons
Missing var declarations
 
m59
You probably just gave me a narcolepsy attack
 
Oh wait, maybe it is CS
 
m59
getting dizzy
 
radius = (if (width < height) then width / 2 else height / 2)
@m59 Hahaha really?
 
m59
yep, can't move my legs now
 
2:29 AM
It's may be pseudocode, but now I do think it's CS
@m59 Take a break, man
 
maybe cuz its in coffeescript?
just maybe...
 
m59
@grasshopper awake now :) Might just be because of CS, dunno. It just made me really tired trying to understand it.
 
oh by CS i thought you meant computer science
 
m59
hah, I can see that.
A few people here use it. I don't know it at all.
 
I've tried it, but I don't like it
 
2:39 AM
I like it, I just don't understand javascript functions, their too strong for me.
 
I feel like ASI is a bitch in JS already. CS allows you to drop commas too?!
 
"for this object's property do this", how do I say that?
 
m59
Assuming you're communicating well:
for (var prop in myObj) {
  var value = myObj[prop];
  // do stuff
}
 
Any advice/resources for generating an array of x/y/z coordinates for a cube of foo length, like [[0, 0, 0], [0, 0, 1], [0, 0, 2]......,[5, 5, 5]] ?
 
m59
@monners Step 1. quit being a fail. Step 2. Win.
 
2:49 AM
Your input is much appreciated
 
m59
Step 3. I have no idea how to help because I am also fail :'(
And we don't even have Kangaroos here, so there's really no hope.
 
something(key, value) for own key, value of obj
@grasshopper ^ ?
 
@monners Port itertools.combinations from Python
 
m59
Oh, I forgot hasOwnProperty check
that's why noms wins.
 
Well, not combinations but the right one
 
2:54 AM
@m59 your idea I think is going to work and is what I was trying to say thank you!
@phenomnomnominal I think this probably would have worked too.
 
m59
his code is the same thing, but has the proper check I forgot
I think (since I don't know cs)
 
yes, that's what the own does
@grasshopper man jsfiddle uses an old version of coffeescript.
also, I rewrote it in a bit more readable CS-y way for you: jsbin.com/pocuhijegizo/1/edit?html,js,output
 
m59
@monners PURTY
 
:P
 
m59
@monners copy/paste Fischer Yates shuffle? :)
 
Well yeah, I'm not gonna build my own shuiffle function
Although that's the only bit I copy/pastes
 
m59
I wasn't downing it!
 
3:24 AM
YUSOSENSITIV!
 
OMFG
where have I been all this time? O.O
 
In the middle ages
 
absolutely!
Why was I going to learn Ruby??
 
Because it's a good language
 
3:29 AM
Oh right
Why was I going to learn RoR??
 
Because a hipster told you it was good
 
heh, no really, it was my own motivation
 
@Lucio heh, just working with that
 
Well, I don't have much to say about RoR
 
Oh wait. It is not compatible with C#
 
3:31 AM
Some say it's good, some say it's bad
 
\o/
ror to that
@SomeKittensUx2666 tell me, how looks the future like?
 
It's 8:30, so pretty dark
 
Now I'm happy to know angular :)
 
I knew about Firebase before it was cool
 
@phenomnomnominal Thank you! looks much nicer
 
3:42 AM
@monners and what is uncool now that is going to be next?
 
@monners I applied to work at Firebase before it was cool
wait
FIRE base
is it ever cool?
 
Firebase isn't so cool
 
@copy Yeah - it's great for simple projects and toy examples, but who'll use it in production?
Mobile apps?
 
@grasshopper you'll need at least CS ~1.7 for the chaining syntax to work
 
anyone experienced in angular?
 
3:47 AM
@Santiago 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.
 
ok tks Caprica, will do that
 
@CapricaSix please don't request to ask if someone is not asking to ask.
 
i keep getting circular dependence problem when postin an xml file through $http.post
 
could you share your service code?
 
it tries to convert it with stringify, but is an xml
 
3:51 AM
and also the error :D
 
Falcon.postValidateEntity = function (xml, type) {
return $http.post(add_user('/api/entities/validate/' + type),{headers: {'Content-Type': 'application/x-www-form-urlencoded'},params: xml });
};
from controller
Falcon.postValidateEntity(xmlToSend, XMLEntity.type).success(function (data) {
console.log(data);
}).error(function (err) {
console.log(err);
});
tried all the content type
also application/xml
 
what does console.log(err); give you?
 
TypeError: Converting circular structure to JSON
at Object.stringify (native)
at ra (http://localhost:3000/js/lib/angular.min.js:14:258)
at e.defaults.transformRequest (http://localhost:3000/js/lib/angular.min.js:70:103)
at http://localhost:3000/js/lib/angular.min.js:69:246
at Array.forEach (native)
at q (http://localhost:3000/js/lib/angular.min.js:7:280)
at Dc (http://localhost:3000/js/lib/angular.min.js:69:228)
at h (http://localhost:3000/js/lib/angular.min.js:72:59)
at L (http://localhost:3000/js/lib/angular.min.js:99:156)
my last post try is return $http({
method: "post",
url: add_user('/api/entities/validate/' + type),
data: xml,
headers: {'Content-Type': 'application/xml'}
});
i never had to post an xml so im getting quite confused
 
did you looked here?
 
yes
but the thing is that it should not convert to json
is already an xml file, i dont need it to ve parsed
 
3:59 AM
@Lucio You do realize Caprica Six is a bot?
 
ha, yeah
sarcasm isn't for bots neither :P
@SantiagoRebella what if you send something else, like an empty XML?
 
You could just not use XML.... ha
 
haha xD
 
That's only half a joke though.
 
i would love to get rid of him
for real
what a pain
 
4:04 AM
him being XML?
 
yes, the unnameable
 
Why can't you change it?
 
because the backend is already made
is for a client, wants a ui to communicate with that rest
and that rest accepts only xml
im already using x2js that simplifies a lot
but that angular post call is getting me crazy
i dont get why is trying to stringify my xml
 
I suppose it assumes it is JSON by default. You can't change that somehow?
I don't really know much about angular
@SantiagoRebella Isn't this exactly what you're asking? stackoverflow.com/questions/15490658/…
 
yes something like that, but no solution for me there
i tried already, and cant touch the backend
my problem is more specific to the post
there must be a way to send an xml through post
 
4:22 AM
Are you sure @SantiagoRebella it is not failing when retrieving the response?
My guess is that it's failing when coming back
 
yes, is not reaching the request
fails when invoking $http.post
 
and doesnt complete the request
 
so it does not reach console.log(err)
I'm out
@SantiagoRebella good luck with that
 
4:33 AM
night
 
Drupal :facepalm:
 
Needs Moderator attention: SPAMITY SPAAAAAAAAM
 
gone now
 
Too bad, it increased the value of that site
 
...?
 
4:52 AM
Drupal is worse than spam
 
arg. Might just be time to move to Socket.IO
 
GLOBAL VARIABLES... what are they exactly?
 
variables that are accessible from anywhere within your javascript runtime
 
@mjaz 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.
 
ok thats what I thought..
 
5:07 AM
yeah
note though that a global variable is by default created if you don't prefix a variable with var
so x = 1 is global, whereas var x = 1 is not
 
wow thats scary, I've created a lot of global variables then lol
 
which is exactly what strict mode is for
 
^ +1
 
put "use strict" in front of your code, and creating implicit globals now causes an exception
 
depending on the environment
 
5:10 AM
!!caniuse strict
 
caniuse: strict
 
ah, never mind
practically every environment
 
more importantly, both web browsers and even IE10
 
oh thats what 'use strict' means
teach me more about this... javascript
how does it know what "d" always is?
 
looks like a string to me
 
5:22 AM
no like function (d), {
something happens
}
or in coffeescript (d) -> something happens
 
apart from the comma, looks like a function to me
 
so how does the function know what d is?
 
argument values are set when you call a function. That's their purpose.
!!> var l=function(d){console.log(d)}; l(10)
 
@JanDvorak "undefined" Logged: 10
 
@grasshopper check this out: eloquentjavascript.net
 
5:28 AM
thank you, this actually looks like a good read
 

« first day (1425 days earlier)      last day (3530 days later) »