« first day (1562 days earlier)      last day (3380 days later) » 

12:02 AM
i found that doing crud operations from the controller everything was okay but when I tried to use a service, the results i got back when attempting to show all entries was really strange at the same other crud operations like create and delete worked fine
 
were you using YourService.query();?
 
@ironintention plnkr.co make a fiddle showing and isolating the issue.
 
That was the 2nd way I tried it
the first way I just made my own method
both ways gave me really bizzare results
okay will do. hang on
this my first time using plnkr.co can i just sow you the relevant js without setting up the views? is that cool?
if I didn't set that up right just let me know and I'll clean it up
 
12:19 AM
@BenjaminGruenbaum I ended up putting the watch in the "global" controller.
 
@SomeKittens I don't like watches :D
They always feel like an implementation detail but that's just me.
I guess I'm too used to React now to think in "Angular"
 
How else would I know when to save to local storage?
 
hmmm... on a mongoose model, what is the way to fetch something, but if it returns no results, insert it? I think MyModel.findOneAndUpdate() is along the right path but can't quite get the args to work
 
@SomeKittens what does it actually do?
 
It's a multi-step onboarding process, and I'd like to save the user's progress.
 
12:30 AM
Ok, so put the user progress in a user progress service with accessors that save progress?
 
12:40 AM
Isn't half the point of Angular not having getters/setters?
and letting the digest cycle handle it?
 
When it makes sense - sure.
You can have an actual getter rather than a method if you'd like although you can just have a method that returns the object to be persisted and persists it on a setTimeout or something.
Or use the getter to figure it out - or any one of several other options.
The one thing I would not do is use the digest cycle here. The digest cycle is great for UI but things can go really wrong if you use it outside of UI land.
function persist(key, fn){
    var obj = JSON.parse(localStorage.get("userdata-"+key));
    fn(obj);
    localStorage.set("userdata-"+key, obj);
}
Or something like that, can work.
persist("userSettings", function(settings){
    settings.foo = bar;
    settings.bar = baz;
    settings.step = 3;
});
 
I guess I did not set up that fiddle properly
 
@BenjaminGruenbaum it is in UI land
 
Then you can use controller scope inheritance if you'd like.
 
by "Progress" I also mean "Choices the user has made"
sorry for not being clear there
 
1:03 AM
should passport immediately throw an error on callback?
 
Sim
1:16 AM
is anyone here?
 
nope. I took care of them. (Cleans dirt off hants)
 
Sim
can you help me with something?
@corvid
quick question is style="" similar to class"" can i include element in header for style similar to css?
*class
or can it be only done through style="thecodes"
 
1:58 AM
Javascript != CSS
 
@Sim Hi there!
 
> "Fools ignore complexity. Pragmatists suffer it. Some can avoid it. Geniuses remove it." - Alan Perlis
 
Sim
@mikedidthis check time on the question
 
@Sim my bad, need more whisky
 
Sim
@mikedidthis no worries :)
 
2:10 AM
Bought Bitcoin at 221... up to 251 so far
 
Nice
I'd rather just play poker myself, but I've seen some people have a lot of success with bitcoin
 
Luck
 
I plan on buying .1 BTC here and there, and hang on to it 10 years or so
I hate poker
 
@copy Hence the I'd rather just play poker
I love it
 
Same here
And backgammon
 
2:12 AM
Not sure what poker has to do with Forex trading though
 
Risk management
 
unless you're saying it's a gamble
ok
 
Bitcoins are a gamble
 
Backgammon and Poker are all about managing risk in evolving situations
 
Trading and poker aren't
 
2:15 AM
I never did very well online, but I've consistently killed the tables in brick and mortar casinos
 
You can set a forex bot to convert your currency using algorithms or simply with a sell price
then do it again. buy low, sell high
 
And what about when/if it stabilises below your purchase price?
@crl Not the laziest looking dog I've seen, but still. Nice.
 
Bitcoin stabilize? lol
 
If this regulated exchange in the US goes ahead, it probably will stabilize
 
2:19 AM
the one the winklevoss twins are promoting?
 
I'm all for that. They know their shit. I'm hoping old grannys use Bitcoins someday
 
m59
LOL. now I'm seeing drawbacks of CommonJS
when does it end...
 
@m59 nothing is perfect, everything has drawbacks.
 
m59
I realized the testability issue, which is easily solved by hijacking require
but now I need to override a module's dependency in the app
 
2:24 AM
as @BenjaminGruenbaum recently told me, module loading is not dependency injection
 
m59
that's problematic. It kinda needs to be.
 
m59
If module loading can't deal with overriding/mocking, then what?
 
then your DI should
 
m59
Ahh.
huff.
 
2:26 AM
AKA the whole point of DI
 
@monners do you play cribbage?
 
m59
man. I am just a champion fail.
What do you do when you're way deep into a project and it's all wrong? :)
 
Refactor using your tests to cover your ass
 
does anyone know any good resources of learning about how to make passport and angular work together?
 
The point that module loading != dependency injection is true... but have you looked into proxyquire, @m59? Might be useful if you're trying to do test mocking stuff
 
m59
2:30 AM
@ironintention dunno. I just did this:
  loginWith: function(provider) {
    storage.save('syncLogin', $location.url());
    $location.url('/auth/'+provider);
  }
 
Sim
@ironintention if i say something would you mind?
 
@Sim I would never mind
 
m59
@Retsam yes, that's what I was using, but I see now that it doesn't really replace DI :/
 
Sim
@ironintention are you sure?
 
@Sim I suppose that means you want to say something really mean? What would be the point?
 
Sim
2:34 AM
@ironintention i dont think its means its something funny
 
m59
@ironintention and then when the page gets redirected back to my app, I see that storage has syncLogin, so I make a request to /api/users/self and my app gets the user's profile and returns them to the url they were on.
no idea if that's decent, but that's what I did :)
 
@Sim If you feel the need to ask... you probably shouldn't say it.
 
Thanks @m59 I'll try to keep that in mind and see if that works for me. I'm really struggling with this right now.
 
m59
@phenomnomnominal so is module loading only useful for pulling modules into the DI container?
 
module loading tells you what your dependencies are, ready to be injected.
At the point where you inject them, that's where you swap them out
 
Sim
2:36 AM
forget it some people take it serious
 
@Sim was it concerning my username or question or what?
 
@Sim you're making lots of pointless noise.
 
Sim
@ironintention question
 
m59
@phenomnomnominal can you help me with some baby steps here? index.js requires and calls routes.js, which requires and calls several route files (app is passed to all of this. Those route files each have say 5-10 app.get('stuff' routes, and each one of those requires some modules that do CRUD stuff. Those modules require my db.js module, which now I realize I sometimes need to overwrite :/
 
@Sim go for it
 
2:41 AM
@m59 yes
 
m59
it seems to me that this then kills the whole goodness of npm/browserify
 
Not at all
 
@Sim this is a lot of anticipation you are building up, are you proposing to me?
 
m59
If your modules need a DI container, then we're back into the Angular problem
reinvent everything for Angular or whatever DI you're using
 
@m59 and what's the angular problem?
 
Sim
2:48 AM
@ironintention im not gona say cuz everyone is going to think being childish
sorry :)
 
Or use the same DI on the client and the server
 
@Sim fair enough. The answer to your question is probably 'yes'
 
@Sim over it, contribute something useful to the conversation or leave please.
 
m59
@phenomnomnominal I mean, you create a module that has say 3 dependencies that you downloaded from npm. you require them, write your stuff, npm publish it, yay.
But if it is instead getting those deps via DI injection, then it's no longer useful for everyone.
 
How so?
 
2:51 AM
DI is used at run-time. you can still use npm for resolving them at build time.
 
m59
because not everyone is using the DI container you are.
 
You're still going to have to require them in
It might change your API slightly, but even then not really
 
m59
So, to be clear - this is wrong?

var chunk = require('lodash-node/modern/array/chunk');
var memoize = require('lodash-node/modern/function/memoize');
angular.module('myModule', [])
.filter('chunk', function() {
  return memoize(chunk);
});
because the alternative is a dang catastrophe.
 
a dashtastophe?
 
Can I see what the alternative is @m59 ? still learning
 
2:54 AM
var chunk = require('lodash-node/modern/array/chunk');
var memoize = require('lodash-node/modern/function/memoize');
angular.module('myModule', [])
.value('chunk', chunk)
.value('memoize', memoize)
.filter('chunk', function(memoize, chunk) {
  return memoize(chunk);
});
 
m59
retracted lol
forgot about value :)
 
then in your test you would just use angular.mock.module to change the provide for a mock
 
m59
hehehe, so lame of me. I never thought to use value for a function.
non-intuitive name imo. Value to me is a string, number, or json :)
 
you could also use constant
 
How long have you guys been working Angular
 
2:57 AM
6 months?
 
I've been learning MEAN for two weeks and it's been a little rough to be honest
Harder than Rails that's for sure.
 
m59
dang, that's all noms?
 
But it feels good
 
Thats a lot to be learning at once
 
Yeah, it's not ideal but it's for a job interview
 
2:57 AM
@ironintention about a week here, and I have no idea what I'm doing with Angular
 
@m59 yeah, we're rewriting our old aspx app to angular.
 
m59
I guess I did entirely learn node in the last 6 months though, so there's some excuse for my falling behind with Angular :)
 
@taco glad to hear I'm not the only one
 
m59
My Angular code is crap.
 
Your crap would be my gold
 
m59
2:58 AM
No designer, so I just rushed the front-end because it's gotta go ASAP.
 
my code is crap
 
You guys know your stuff, I don't believe it
 
best way to find ways to improve it is to think it's shit.
 
I was having node issues with my API earlier today so I'm rewriting it from scratch now
 
ah
REST API? @ironintention
 
2:59 AM
@taco yes
 
I'm using ngResource. Seems ok
to hit the API we wrote in Java
 
m59
Any good DI libs for both node and client?
 
@taco certain CRUD operations for crash the app because it said I was trying to set the head for something that was already fixed (i'm paraphrasing)
 
interesting
 
@ironintention about a year
 
3:02 AM
@SomeKittens It get's better right?
gets*
 
@ironintention Very yes.
learning curve is a little steep, but rewarding.
 
@SomeKittens I'll keep that in mind, I'm certainly looking forward to really understanding what I'm doing and handling basic curd+auth through the stack with ease
 
@ironintention Full stack is rewarding in a way nothing else is.
Also you can edit messages!
 
@SomeKittens what's the limit on edits? 1 minute?
 
Something like that, one or two
 
3:12 AM
I've been feeling really weird today... been doing my best to rest, but it's still worrying
I try not to be a hypochondriac. I'm feeling okay at the moment, but it seemed to match heart attack symptoms...
I sit at a desk at work, come home and sit some more. After sixteen years of that, my health is finally degrading. Since last fall. Take care of yourself, guys. It sucks
 
Try sports
 
Take daily walks & drink lots of water
 
I cut meat out of my diet last fall. Used to eat it nearly every day too. I still eat some, but not as much. After this past week, it's out of my diet except for maybe around my birthday
Still need to lose the weight. 213 at 5'9"
 
@taco I found that I eat terrible stuff if I let myself get hungry, so before getting hungry if I can eat healthy food I won't end up eating crap.
 
True. @ironintention I also found myself eating what people would consider comfort food as every day meals. A lot of veggies make me gag, so it's been tough
maybe I should try soylent
I lost weight eating chili last summer, so I'm trying that again
 
3:24 AM
@taco do you drink soft drinks?
 
I cut out soft drinks about a year ago.
 
Oh thats good. They're the worst
 
It's hard to even drink coffee as my heart races. I'm still not sure what's up with me. Supposed to get MRI
 
Has anyone ever seen the syntax this guy is using in his 'controller' youtube.com/… I've never seen it before and it breaks on my system
 
already did an ultrasound, they couldnt see anything
too much fat :|
 
3:26 AM
@taco My Soylent should be coming in about a month
 
@SomeKittens is that even good for you?
 
@SomeKittens co-worker takes it. Took him a few weeks but he's used to it now
 
Soylent seems to have a lot of sugar, no?
 
@taco That would be awful - coffee is my ADD meds.
 
@ironintention it's as good for you as the mush in the Matrix movie
 
3:28 AM
@ironintention Much better than anything we eat.
 
@SomeKittens I've cut out caffeine completely
 
I got my own mush that's made from powdered rice and beans
 
@phenomnomnominal Like I said, it's my ADD meds. I can't focus without coffee. Only with cream though, no sugar.
 
@SomeKittens had to quit drinking wheat beer, too. Whatever is happening to me tore up my gastro. I already couldn't drink lactose....
 
All I drink is coffee, juice and water. (aaand hard cider sometimes because life is fun)
 
3:29 AM
Plus alcohol makes my heart race, too. They suspect that's because of fatty liver, unrelated to the gastro issues
I drink tea, water drinks, and a small amount of wine. And I cheat with weak coffee
 
oh, forgot tea. Tea is good.
 
Tea, water, milk, sprite zero if I'm feeling crazy
 
It's tolerable. A warm cider occasionally too :)
Almond Milk instead of milk here
Have you guys ever looked at heart attack symptoms? They seem benign independently
My arms have been going numb for a few months, so it really makes it hard for me to understand my issue. Doctor doesn't seem to give a shit
 
I drink hot water or seltzer for the most part, and alcohol.
then get a new doctor
 
Anyone mind going through an onboarding flow for me? (no CC needed, should take 5 min): gist.github.com/SomeKittens/32eda157f434bdc6ac24
 
3:36 AM
Yeah, I'm switching doctors.
@SomeKittens what do you need done with this
 
Tell me all the things I could do better
 
© 2014 Card Minion | Privacy Policy | Terms of Service | Feedback
^ overlaps the photos in my browser
"Let's make a nice card for Mom" needs some sort of picker UI indicator. Just looks like 4 photos
 
Define: overlaps
There are four photos.
 
There are weird horizontal stuff displayed..
 
@JugurthaHadjar 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.
 
3:39 AM
@JugurthaHadjar screenshot?
I can't do much with "weird stuff"
 
It's fleeting, upon loading.
I'll try capturing it..
 
@taco ...ah, that's a problem.
Are you at a different zoom level? What's your screen rez?
 
@Somekittens some of the photos displayed strangely on my screen
 
3:43 AM
 
@SomeKittens 100% zoom. (verified: "Actual size" is greyed out). 1440 x 900 resolution
 
@JugurthaHadjar That is weird - looks like the background texture image is loading slowly.
 
It would also be nice if it generated with some dummy text so we could see what a finished card looked like before hand.
 
@ironintention I don't know what "strangely" means - screenshot?
 
Yeap. Only on first load, though.
 
3:44 AM
@ironintention Heh - I've been going back and forth on that one - will add it!
 
How does one do that on here?
 
I mean, first true virgin load. New incognito window, it does this. I hit refresh, it doesn't.
 
Fuck, I came into the office on a Sunday to get shit done and now the cleaners have just arrived
 
@JugurthaHadjar It'll be cached after that.
 
3:44 AM
@monners rookie mistake, getting things done.
@ironintention post a screenshot? Just link to the image
 
cardminion.com/create#/message UX-wise the "what do you want to tell them?" was scrolled off the bottom of the screen
 
@taco Trying to avoid google-indexable links
 
May I add another remark?
 
@JugurthaHadjar sure!
 
Okay, the calendar seems heavy color wise. The black makes it seem as if the days are disabled.
 
3:48 AM
@SomeKittens well you could put the div at the bottom, and use CSS to move it to the top. Having it below the preview doesn't seem very friendly, but maybe it's my resolution that's screwing it up.
 
@JugurthaHadjar Good point, I'd forgotten about that.
@taco er, as in, editing the message to remove the link
the "below the fold" thing was useful.
 
Maybe if instead of black, it was a pearl white (you know, couleur nacrée, not really white, but pearl colors)
 
@SomeKittens I wasn't talking about the link. I meant the "create message" page that says ""what do you want to tell them?" with a preview above a text box.
 
@taco Let me be more direct: Can you edit the card minion link out of your above message?
 
I can't now....
 
3:51 AM
drat.
 
Sorry man.
Use a robots.txt maybe
 
@SomeKittens I guess what I mean is where is everyone hosting these images so quickly
 
@ironintention imgur is a popular one.
@taco It's not Google I'm worried about. What's your email?
 
The images are loading really slowly.
 
@SomeKittens what do you need my email for
 
3:52 AM
the problem is the cake that says happy bday with the black background has it's proportions skewed, probably because it's coming in on it's side instead of being rotated
 
@taco If you'd like me to explain why I keep certain things off of here.
@ironintention Known issue.
@JugurthaHadjar The four card images are very high-rez
I should downscale them
 
@SomeKittens I'm on one of those projects that's genuinely interesting for a change. I kinda care about getting it done right (and the deadline is stupidly tight)
 
Yeap,
But it's kind of a nice concept.
Like you save these, and then when the day comes you send them out?
 
@JugurthaHadjar Pretty much.
 
Cool,
Have you thought of making it a Facebook app..
 
3:55 AM
@JugurthaHadjar Yes, but that's a bit bigger scope than I'd like
Alright folks, server going down.
 
I like your comments..
// Datepicker stuff
:D
 
oh, don't look at the code
it's all terrible
And not in the usual "Oh, I'm gonna be humble and talk about how bad my code is." It's seriously bad.
 
Who cares,
Yeah, I'm doing something in Python and I think it's an abomination. I'm going to hell.
 
Aside from a few graphics quirks, any other comments? Flow felt good?
 
I don't understand how this works,
I dezoomed. What's to the right?
 
4:04 AM
@ironintention yes I have
@SomeKittens Felt very bare. Need's a salesman's touch
 
@JugurthaHadjar Yep, like I said, one of the photos is rotated.
@taco Mind elaborating?
 
@SomeKittens I'd like to know what I'm getting for my money before clicking "buy now" or "buy 100"
 
Ah, that makes sense. I'm always struggling with that side of things.
 
yeah, me too
Maybe look at how Vistaprint does it
 
@taco did you get a chance to see the marketing page?
 
4:11 AM
I don't think so
 
4:21 AM
How would you guys do angular lazy loading for a treeview like this?
levelA -> levelB -> levelC -> levelD
(e.g. with ngResource endpoints serviceA,serviceB, serviceC, serviceD)
I have the directive setting $scope.levelA from the serviceA ngResource so far, but there are 30 items in levelA. Without lazyloading this will be API endpoint intensive for just one user
"Does dog hemorrhoids medication work on human buttholes?"
 
Hello folks
I need some image pan/zoom functionality...not sure what to choose.
I could use a js library like: alexhendershott.com/uploads/PZ/example/#
Or even some canvas based pan/zoom library
the latter I am still searching the internet for...
But do I really need a canvas based solution?
Of course, the target is for mobile phones...
 
 
2 hours later…
6:10 AM
Need some help understanding why f is undefined in this case:

if (function f() {}) {
  console.log("just a random sentence");
}

f; // undefined
 
@Nishanth 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.
 
Wouldn't f float to the global scope when it is first encountered inside the if condition?
 
6:27 AM
the note at the bottom of this is relevant
 
user2620028
6:54 AM
I hate it when people talk about cars even when they don't know what they are talking about :(
 
 
1 hour later…
8:20 AM
everyone is sleeping
 
@underscore looks cool
 
user2620028
im not sleeping
 
user2620028
i wish i was sleeping
 
8:47 AM
I want to make a pp
app
but i have no idea
 
user4458396
hi can i ask a quick question about parse for javascript
 
@Jon 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.
 
user4458396
oh okay thanks
 
user4458396
heres my small dilema with parse. I want to send a message to all users. to achieve this I added a pointer column called user to the Message object and link it to _User. I also added a subject column and a message column to the Message object. my issue is that user column cannot be blank and i am not sure what to set it to var Message = Parse.Object.extend("Message");
var message = new Message();
message.set("Subject", form.subject);
message.set("Message", form.message);
message.save(null, {
success: function(message) {
 
@Jon Did you even read the rules ?
 

« first day (1562 days earlier)      last day (3380 days later) »