« first day (1306 days earlier)      last day (3659 days later) » 

8:01 PM
@Martin What do you do with xhr?
 
Hi all, quick question, how to check if a string contains a backslash "\" character?
 
@Zirak for the app you mean?
 
user1596138
I use the PHP CLI sometimes. But only for extremely small things... And I mean, I'm already connected over SSH and working out of terminal anyway.
 
@Martin - I'm still using Brainfuck for both server and clientside development, that's why I'm so bad at javascript, I never really use it, but I'm a frigging God at Brainfuck
 
I use Node for grunt, but I've never used it for anything else. I'm going to research node some point in the future
 
8:01 PM
if foobar = "domain\" ....
 
@NatZimmermann Same here
 
@Martin Yeah. Anything special, or just listening for complete or done or whatever the hell it's called? (Talking about the one here chat.stackoverflow.com/transcript/message/16472071#16472071)
 
@eastboundr if (variable.match(/\\$/)) {//do stuff}
 
@Zirak nothing special. Later on in the func I do something like this
    xhr.success(function (data) {
        $scope.goal = data.goal;
    });
 
!!tell eastboundr mdn String.indexOf
 
"domain\".indexOf(\/\)
 
@NatZimmermann thanks Nat, but what if I want to check if some string is equal to "domain\"? should I do if (variable.match("domain" + /\\$/)) {//do stuff} ??
 
i remember reading its generally not recommended to return values in a constructor. but i assume it is okay to return a value in a hidden function to a method call in a constructor? like if i have
this.myMethod = function(i) { return i; }
 
@RUJordan thank you!
 
8:05 PM
so i can do myObject.myMethod(3) == 3
 
@eastboundr no, that would be: if (myVar === "domain\") {//do stuff}
 
Sure thing. My co-worker just sent it to me so I thought y'all would like it too
 
@Bubbas myMethod is not a constructor, so yeah
 
well it is IN my constructor
i just didnt show it
 
Going to go and try and learn node
 
8:06 PM
@Bubbas See previous message
 
lol
10-4
:p
 
@NatZimmermann google "nodebeginner"
2
 
wtf, I'm getting that $http is undefined. grr, I thought I could do it without reading any documentation...
 
@Zirak
You gotta inject the provider
 
8:10 PM
...
 
In your controller, when you do function ($scope) you add another param
function($scope, $http)
 
Any will I had to learn angular just evaporated
Can't I just do a friggin xhr?
I don't have a controller, I have your $http call :P
 
@Zirak haha
 
angular has a lot of magic dependency injection
 
thats what made me irritated... pretty much the same thing
 
8:11 PM
@AbhishekHingnikar Good luck
 
> Cant I just do a friggin X?!
 
i need votes :P
 
ooooh I need to do it the "Angular" way.. ok :?
@AbhishekHingnikar bleh I need to login/
 
@Zirak nope you can't just use that code lol
 
Well that blows
 
8:12 PM
That's an example of how it would work
 
@NatZimmermann Thanks nat, i will try that
 
Thanks
What a dickish way to do things
@BenjaminGruenbaum I hold you to blame
 
@Zirak BenjaminGruenbaum is afk: friend
 
We're his only friends
 
@copy tx :-) the bot itself works and thats what snapick is ... added insane machine-learning
 
8:14 PM
alright @AbhishekHingnikar voted.
 
@AbhishekHingnikar Awesome!
 
@Zirak yeah it's annoying to get used to
 
> Going through nltk.org/book it would be really appreciated but necessary.
 
But it's getting a lot of traction so I figured I should wrp my head around it
 
@AbhishekHingnikar - OMG, if I were in India, I would attend this
"Putting cheese into the shop"
 
8:16 PM
lol
i voted it UP !
 
You should quit school and do that instead, put cheese in shops
 
ha
 
Fucking finally man. 50 excel files later I'm on the last upload T_T
 
This one actually sounds cool, "webcams as eyes for the blind"
@AbhishekHingnikar - congrats, looks like you're in good company there, some interesting things.
 
and we're back!
 
8:21 PM
@Nat et al, since I need to lowercase the front part, eventually i need to append the string "lowercased" to the backslash "\", I tried var result = lowercased = "\"; and that throws me an error?
sorry I meant result = lowcasd + "\"
 
result = "lowercased" + "\\"
 
you have to escape the slash
 
result = foo + "\\";
 
8:22 PM
@rlemon thanks i will give that a shot
 
@IshanChatterjee 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.
 
@rlemon Thanks rlemon, worked like a charm!
 
that is because I am amazing and tickled the code into submission
 
i tell you I would never figure out these escape character :P
 
@lemron does it again
4
 
8:24 PM
ron
 
lemron. I could get behind that
 
!!s/that/him/
 
@RUJordan lemron. I could get behind him (source)
 
I just had an epiphany
 
can you do
escape(result).call('\').add(lowcasd)
 
8:27 PM
@adeneo yes you can
 
the device I'm working with and the code i've written basically can replace another third party product we buy and re-distribute (serial to Ethernet device server) but it costs a shitload
 
anything is possible if you want it
 
we can do it with my code / device for 1/4 the cost
new business ching ching
 
Nice!
 
My only starred message today is praising someone? I've lost my touch.
 
8:30 PM
Le Mron
 
@Zirak There you go
 
I keep thinking of anchorman when I read lemron
 
Should've left out the "(obligatory)"
 
The regrets we have to live with
 
@Zirak educate yourself about DI and IoC..
 
8:32 PM
No
I know about DI and IoC
 
Dependency injection with an injector is really useful. You can still get $http without it, people just rather do DI and not SL
 
Not providing an $http function isn't "prettying things up"
 
IOC == International Olympic Committee ?
 
@user1028270 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.
 
Inversion of Control
 
8:33 PM
var xhr = angular.injector(["ng"]).get("$http");
 
I own Cats
 
It's probably fair(er) because my use of angular was wrong, it wasn't meant to be used in throwaway snippets
 
It's not about "prettying" things, it's about clear and testable code that conveys dependencies
 
@rlemon All of them?
 
yup
@SomeKittens is my understudy
 
8:35 PM
You immediately can tell that this piece of code uses xhr without reading it, which is why DI > globals
 
!!s/understudy/father/
 
@adeneo @SomeKittens is my sexual slave (source)
 
You could also tell because it used $http
 
@adeneo @SomeKittens is my father (source)
 
8:36 PM
@Zirak Well it's more that you wouldn't have to look through the code to find any instances of $http to know it's used
 
@Zirak you'd have to read the code for that... That misses the point of DI entirely
 
Also, I'm on chat
 
I'm not saying DI isn't useful. I'm saying that for core helper functions, it's a very odd choice.
 
Not at all
 
It makes a lot of sense for core helper functions
 
$http isn't something you need to initialise. You don't need to track state or even share it.
 
That guy really does like Ragrets
Pesky little devils, those Ragrets.
 
@RUJordan It kind of looks like he doesn't like Ragrets
 
I meant doesn't.
Sorry, brain explosion
 
8:41 PM
@SomeGuy
 
Nevermind I'm retarded
 
Hahaha
 
he fucked up lol
 
@rlemon I hope the thumb has an "E" on it
 
@luzmcosta 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.
 
8:52 PM
This script is like the worst possible timing. Fast enough to require my constant attention so that I can't multi-task, but slow enough that it's tedious as hell
 
@Zirak what if you want to mock it, or replace it?
 
@rlemon My next what?
My next... beer?
 
@RUJordan Like a 10-second build process
 
My next... project?
 
lover.
 
8:53 PM
beer!
 
@Loktar Ooh! Is she cute?
Does she like to dance?
 
@SomeKittensUx2666 in lue of a 50 file script, I'm just copying and pasting from the db. But each copy takes like 45 seconds to process
 
Does she find programmers sexy?
 
How many games does she have on steam?
 
@RyanKinal idk by those hairy arms I'm being pretty judgemental
Im going to say "she" isn't cute
 
8:55 PM
lol
 
@adeneo thats kinda freaky
 
Oh.
 
@RyanKinal Not only that, she also like Pina Coladas
 
Oh I see.
 
but i have read articles about tech which actually allows people
to be able to see with interfaces straight hardwired in BRAIN
// i just wonder how painful that'd be :-/
 
8:56 PM
the demo or quick game the guy originally made is actually really fun
 
That looks badass
 
Finally done! Jesus... Moses.. God... thank you. Holy shit man that was rough.
 
@BenjaminGruenbaum eh, fair enough, I can see your point in that
 
The problem is Angular services are singletons, and each app gets a single injector, so the DI system has very very limited potential.
 
@BenjaminGruenbaum isn't that only if you use factory?
 
9:10 PM
@SomeKittensUx2666 well, what you do is you create a service that returns a type
Then you inject it and create the instance in your controller/service/whatever
That means that your DI is no longer DI, it's just a module loader.
You can't tell Angular 'when this service asks for that dependency, give it that specific instance' in a neat way
 
@noWayhome 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.
 
@BenjaminGruenbaum Alright, I can see that point
 
HOLY SHIT I LOVE THIS GAME
Best FPS ever.
 
@RyanKinal yeah man its pretty damn fun
I'm going to donate for sure, when the original one was over I wanted more
 
Yep. I'll be donating.
 
9:19 PM
@Zirak i'm away from Caprica until monday
FYI
i'll dump her memory in a gist
 
!!s/gist/swamp/
 
@RUJordan i'll dump her memory in a swamp (source)
 
@rlemon HOW COULD U
 
@Loktar I love Grapple Hero
 
!!afk pissing in the wind.
 
9:26 PM
!!afk gnight
 
@Loktar OMG THAT BOSS FIGHT
WTF
WHAT THE SERIOUS FUCK
 
haha
@BadgerGirl thanks :) just got the last of the art on Monday
so hoping to release the full vs soon
 
@Loktar Sweet!
 
haha
oh flash...
 
9:33 PM
thats awesome
 
9:45 PM
I'm making a javascript game that uses node.js and it doesn't have a complete website, only an index.html and a few javascript files, and because the game is multiplayer and the server runs on node.js, I'm wondering if I should use Apache to host the small amount of HTML and then node.js just for the game, or have only node.js and use it to serve both the HTML and the game server. Which should I use, just node.js or both? (node.js chat is dead so I had to post here)
 
Just use node
Apache adds another complicated layer to the project
 
Why bother with apache for just a few files?
 
Ok, I'll just use node then, thanks.
 
Where are you hosting this?
 
Locally for now, heroku later.
 
9:47 PM
@Asraelite node is fine for hosting html/css/js. I do it in my game
 
Use node.js for hosting the files if you're moving to Heroku
 
super hot super hot
 
@BenjaminGruenbaum I thought about it, and you know what? Fuck it. This is javascript. Want to mock an object? Object.create. Boom. You need to add angular to the DI chain, and you win. Both mockability, overriding of functionality only for some objects, and ease of use.
 
@Zirak BenjaminGruenbaum is afk: gnight
 
var mockedAngular = Object.create(angular);
mockedAngular.$http = myOwnHttp;

//pass `mockedAngular` to dependent scripts as `angular`
 
9:57 PM
I'm waiting on an email from Wheatly. He's sick, so I'd understand the slowness.....if I hadn't asked for this information a month ago.
 
Now you don't need to singleton the service factory to leverage the proxy chain strategy DI ennterprise.
 

« first day (1306 days earlier)      last day (3659 days later) »