« first day (1711 days earlier)      last day (3462 days later) » 

19:01
did you want spawn() instead?
what's the difference?
From the docs:
This is a special case of the spawn() functionality for spawning Node processes. In addition to having all the methods in a normal ChildProcess instance, the returned object has a communication channel built-in. See child.send(message, [sendHandle]) for details.
doesn't explain why that is null
yea..
do you have any idea?
Guys, I made a really clever meme.
no.. I use spawn() and stdin was just there working, so no idea.
19:03
applaud my creativity
that 'silent' property may be related.. not sure.
@NickDugger I don't get it.
you suck, then
Haven't you ever seen movies?
Geez
Not that one, evidently.
Is that Harry Potter?
@Luggage you're a genius, it worked with silent = true
j/k ;)
19:11
hola
@TurboTech 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.
@TurboTech hider
Imgur keeps making retarded edits. I can't figure out how to publish to the gallery
the publish button
crl
crl
19:13
^
I did that, and it didn't go to the gallery
I finally figured it out, but damn
the UI changes have been for the worse
crl
crl
go to your Gallery profile > submitted images
@SterlingArcher ^^
crl
crl
19:19
Sus anal bum parties
Is there any other kind of party?
coders block: why won't the 'target' get 'replaced'
target.innerHTML = (data);
@Meredith yay
I'm feeling somewhat stupid and have a question about cookies?
If you do an ajax request to the server, and then set a cookie, say with something like `setcookie` in PHP etc. that cookie won't be available in the browser until the next time a request to the server is made and the headers containing the new `Set-Cookie` value is gotten, as an ajax request won't make the cookie available in `document.cookie` etc. Right ???
Probably
19:23
@adeneo if you've had too many cookies and feel stupid, try milk
MLM
MLM
When working with GSAP animation, TimelineMax, is it possible to use a relative position and have a label? Am I falling into some sort of anti-pattern? Here is a barebones example: jsfiddle.net/aztnng4q
@adeneo Haven't seen you for a long time now
@ssube - Had milk with my cookies, now I've tried vodka, and still no luck, the cookies set with ajax should be available according to an "expert" ?
I don't think cookies can be too heavily cached by the document, or you'd run into problems with them expiring/being replaced
> Once the cookies have been set, they can be accessed on the next page load
From the php docs
So you need a new page load to access them with php
19:25
@adeneo I don't think document.cookie gets changed from outside the current page, without you setting any (when the cookie is set with ajax for example).
Probably need a new request for the browser too then
or just store and send those cookies yourself
2
A: When is the cookie set by AJAX available in javascript?

adeneoCookies are passed as HTTP headers, both in the request and in the response. When you do an ajax call and set a cookie, that cookie will only be available in the browser after a reload / redirect happens, and new headers are gotten from the server containing the newly set cookie. In other words,...

stick them in the header
@Meredith that's because they're headers when PHP is concerned
PHP absolutely does require another request, but the browser shouldn't
19:27
The question is.. does a browser listen for and set cookies from AJAX request or just 'page requests'?
Well when are we setting the cookie?
If you're setting it then returning a response you shouldn't need a new request
@Meredith cookies can be set any time a response is sent to the browser
they are part of the response, but are shared by all pages in the browser once the response has been received and the headers parsed
whether they immediately replace the cookies object on each page, I do not know, but they should
Yeah that's what I mean
It's set by ajax, apparently with a request to server that sets the cookie serverside, but the ajax response won't make the cookie available until the next request
burglor is so silly
19:28
If you send the cookies back w/ a response then you're fine
Not with ajax ?
@adeneo there is no such thing as server-side cookies. PHP doesn't get the cookie until the next request because that's the first time the client provides it. The client has it immediately.
cookies are just a header, guys, not a real thing
I think I understand now
Well yes, but the server has to send a Set-cookie response header to the browser, which then sets the Cookie request header etc
The question is "if tab X gets document.cookie, then tab Y is refreshed and a new cookie set, will tab X see it without being refreshed?", yeah?
19:30
2
A: When is the cookie set by AJAX available in javascript?

adeneoCookies are passed as HTTP headers, both in the request and in the response. When you do an ajax call and set a cookie, that cookie will only be available in the browser after a reload / redirect happens, and new headers are gotten from the server containing the newly set cookie. In other words,...

That's the question
And I'm pretty sure the answer is that it's set on the next request, as the server has to send the Set-cookie header to the browser in a regular request, not XMLHttpRequest, for the browser to set the cookie ?
@adeneo absolutely not. XHRs can read and write cookies like any other request. Our whole login process is based on that.
@adeneo Why are you dealing with cookies to begin with?
how come
<input type="text" class="input-text validate-greater-than-zero" name="container_length" />

doesn't show 50.8 when i run
document.getElementsByName("container_length")[0].value = "50.8";
JS can't set the Cookie header on an XHR, because that would break HTTP-only cookie security, but XHRs are normal requests for other purposes.
19:35
@MadaraUchiha yup, sorry must be something with the framework
@ssube - any request can read cookies, as in the cookies in the request, even images or static resources, but can you send a Set-cookie header back to a ajax request and exptect to access the cookie without reloading
@ssube - I see your edit, it seem strange that someone who claims to have worked with this in IE for 8 years claims otherwise? Oh well, it's IE !
@adeneo Well, if you really want to, you can use getResponseHeader() on the XHR object
@MadaraUchiha does that let you see cookie headers? Those should be blacklisted both sending and getting
Easy enough to test
19:45
@adeneo that endpoint doesn't set any cookies
And the cookie headers are disallowed in ajax, as @ssube said above, the specs -> w3.org/TR/XMLHttpRequest/#the-setrequestheader%28%29-method
@MadaraUchiha I have an endpoint that sets cookies, but they're not showing up in document.cookie regardless of that timing, so that's not right
Interestingly, there is a workaround, using credentials
but that still doesn't change the headers on a loaded page in the browser if the ajax response returns a Set-cookie header, it only works the other way around, or does it ?
document.cookie != headers. It's a getter to the browser's cookie jar, however that is implemented.
The headers feed the cookie jar, but retrieving stuff should take expiration and stuff into account.
Since it's a getter, they can but don't have to cache the results, so an XHR may update them.
It's also a setter, a very special property that lets you set it's value more than once.
19:53
Just set up an nginx or node server that writes a cookie, make sure it shows up in document.cookie, clear, hit it via XHR, check.
@adeneo That only works for requests with a different origin
It doesn't work for requests made to the same domain.
@ssube - It's not that important, I just got unsure and felt somewhat stupid when someone who's worked with this at a major browser vendor claims I'm wrong, and I still think I'm right.
For the longest time I thought nginx was a linux server name
@SterlingArcher I mean, it's a server, and it only runs on linux, so...
@ton.yeung Visual Studio should die in hell.
19:56
a colleague just passed me this video i hope that it was acted :P
@BenjaminGruenbaum why does VS do that?
@MadaraUchiha BenjaminGruenbaum is afk: beer
@ton.yeung And it chokes on node_modules
@ton.yeung No, you don't
Don't patch libraries, unless you intend to make a pull request.
@ton.yeung that's not how those work
@ton.yeung Then don't patch libraries.
19:57
or at least fork
You will regret doing that.
It will ruin your day so hard in a few months.
@ton.yeung You will not be able to get updates for your library, at best
At worst, you will update by force and overwrite all your updates just like that.
@ton.yeung have fun maintaining that
19:58
@ton.yeung It's called version control, you didn't invent it :P
@ton.yeung Or, OR! You could just submit a pull request...
Seriously, it's pretty damn painless...
@ton.yeung That obviously depends on the library and how active it is.
I, for once, never took more than a few hours before I looked at a new issue on one of my repos.
@ton.yeung What other times?
@ton.yeung Who carers, you can patch, submit a pull request and forget
@MadaraUchiha : the open source thing. is it for open source software (development) or about its usability
And if the pull request gets integrated, all the better.
@ton.yeung And then you're reminded on an update
With failing tests or failing production
your "solution" is that you have to redo your fixes if a new product update gets released
20:02
Also, it now implies you need to check all your libraries into version control
@ton.yeung You don't need to get frustrated
@ton.yeung Of course it does, you need to check your patched version
@ton.yeung do your other devs?
@ton.yeung You don't understand my point
You installed a library
You patched it
How do you deploy the patched library to production?
@ton.yeung it will be when they hunt you down because one of your hacks broke
@SterlingArcher - that video is pretty cool, been going around for a few days here, and now apparently there's an english version ?
@ton.yeung Please tell me you don't check that into version control
Well, how do you check your changes to the libraries into version control?
@ton.yeung What are you patches worth then? You fix bugs locally, but not in production.
20:06
why do you have changes that aren't in version control?
> I develop directly on the server
inb4
@ton.yeung No, lol
Patch, submit a pull request, and continue on with your life with the patched version
fork, patch, PR
switch back to mainline when the PR gets merged
Switch to PHP, it's great, no modules needed
3
20:08
@ton.yeung You fork the library, you now have a copy of the library repo
You make your patch on the fork, and submit a pull request.
You use that fork as your library
The origin developer doesn't have to merge your pull request.
it could be that he's not familiar with version control
If origin developer updates their library before merging your PR
@ton.yeung Indeed
@ton.yeung you have to do that either way
@ton.yeung That is correct
then you stay on your fork, if it's that important
but at least you have a real library that you're using, instead of a word doc full of hand written patches
@ton.yeung yep. That's how maintaining a fork goes.
20:11
@ton.yeung All the easier to maintain then.
@ton.yeung no, it is not
@ton.yeung it's really not. git can handle it for you most of the time.
how do you pick up updates today?
you update then apply your patches again?
@ton.yeung The extent of your maintenance is to git pull upstream master when there are updates
@ton.yeung that workflow is toxic.
It just is.
you're going to be spending a ton of time trying to keep that working
it gets exponentially more complicated with each patch and library you use
@ton.yeung Again, submit pull requests
Most of them are answered and merge within days
however, if you're going for 70s-style job security where leaving will ruin the company, then you're doing it right
@ton.yeung a half-dozen products will easily hit a hundred libs or so, between the build and transitive deps
20:15
@ton.yeung I did not. Try.
we definitely have three or four forks here, because we try really hard to work around bugs
@ton.yeung bullshit. You left them with tons of unmaintainable, undocumented, unpatchable code.
it looks good for a little while, sure
@ton.yeung Now.
@ton.yeung We are not.
@ton.yeung a two-line patch to a 10k line library leaves them with 10k lines of code to maintain
because now you have a fork that's not in vcs
Because both of us have seen what happens to the "it works now when there's a handful of X" method when things get out of the "handful" zone.
"It's just a quick hack, it will never go to prod" -_-
20:18
You have patches which aren't in version control, are subject to silent override that will only be found much later, which is document in some file that you know where it is, but tomorrow no one will.
How do you not see how problematic that is?
You'll forget to apply them after an update one day and something won't break right away, then the whole thing will come down on a weekend or vacation and ruin your day.
Tomorrow jQuery is out with a brand new version and you're wasting 2 days trying to remember where are the bugs you fixed
Much easier just to fork the library until your PR is accepted.
He left, lol
It's rare people actually defend that kind of workflow.
20:22
@ssube I only bothered so hard because I know him from Anime & Manga
Normally I'd just "Yeah, sure, okay, whatever floats your goat" after the 2nd or 3rd time.
why should i care if my goat floats
do goats even float?
opensource.stackexchange.com/q/115/40 @BenjaminGruenbaum your answer here pls
so material design is mostly box shadow :D
@MadaraUchiha i'm using that
20:25
> Warning: this site is currently in private beta for at least 1 more day.
@argentum47 Of varying degrees, yes.
a whole day?
@SomeKittens private beta isn't really private
You can access it easily from Area 51
If you want an invite, I can send you want too
@argentum47 don't forget confusing home pages that don't explain anything (i'm looking at you, polymer)
20:28
Your vm = this should be the first line in the function
also, I hate the vm = this syntax, even if John Papa loves it
should reference the name of the controller var LOG = this or somesuch
And if you've got data you want to share amongst controllers, use a service
user1596138
@DrogoNevets Ping! Dude you're alive. How's it going?
@argentum47 why can't you just store it in a regular variable?
because I was trying to use the sameController, and every value get lost when the modal come up.
I am not actually sure how vm.credentials is getting shared, when I tried in another pace I had a list of reasons and profile id, like
var hideModal = { config: {
  animations: true,
  templateUrl: 'foobar.html',
  controller: sameControllerName
 },
 open: function(size, profileId) { vm.hideProfile.id = profileId; vm.hideProfile.reasons =   profileService.getReasons(); $rootScope.modalInstance = $modal.open(this.config);
 }
then in the foobar.html, when I tried to use ng-repeat on the hiding_reasons, nothing came up.
20:36
Why don't you have a separate controller for the modal?
Well, I had it like that at first. The first problem was the login was working from the modal but when we went to the template and tried to login from there it wouldn't work but that was obvious. so I asked to pass the reference to the vm.login function in the resolve
but they didn't accept the solution. plus we have 4 modal, so its 4 separate controller .. because there is not much actualy in common between the modals, I can't think of abstract the functionality out.. in any other way other than passing a callback function to resolve
and in reference to the vm.hideModal; in the foobar.html the hidingReasons or id were not showing up... vm.hideProfiles was empty object.. why does the objects lose their properties
is anyone already planning to abandon js and rewrite their apps in something that will support wasm?
What does flushing means in terms of streams WITHIN Node. Is it when all the .on('data' callbacks have been called and returned? Or when .read() is invoked till there is nothing else to read?
@argentum47 who's "they"?
Also, services will help you a lot
the other team members.
@SomeKittens which part can I abstract out into the service?
20:45
@argentum47 any data you want to share between other components
there's an entire subreddit dedicated to cat toes
@Meredith you may enjoy ^
so suppose in the above case, I want the currentProfile id and the profile hiding reasons to be shared I abstract that into a service!. I already have the hiding reasons in the profileService, and if I do add a method setCurrentProfile in the profileService, how can I access it from the modal template, I mean I need a vm.someObject.variableName to persist its value inside the modal.
plus this also kind of annoying , vm.credentials = { email: '', password: ''} is working,coz the user is getting logged in, and then suddenly vm.hideModal is blank object.
angular bootstrappers' shoud have made something that helped to use the same controller ... not cool to use 5x2 controllers for 5 different pages with modals
@SterlingArcher Some of these were definitely not 2015.
20:57
Definitely not. Slightly disappointed
how to get all the elements having a .header between two div's #Events and #Model

« first day (1711 days earlier)      last day (3462 days later) »