00:38:39  * GrumpyPixelquit (Quit: My Mac has gone to sleep. ZZZzzz…)
00:39:52  * GrumpyPixeljoined
00:40:09  * GrumpyPixelquit (Client Quit)
00:51:48  * kazuponjoined
00:53:46  * TheThingjoined
00:59:06  * TheThingquit (Ping timeout: 276 seconds)
00:59:26  * kazuponquit (Ping timeout: 272 seconds)
01:00:13  * TheAceOfHeartsquit (Quit: Leaving.)
01:27:01  * TheAceOfHeartsjoined
01:41:54  * yoshuawuytsquit (Ping timeout: 245 seconds)
02:21:39  * felixjetjoined
02:23:58  * felixjet__quit (Ping timeout: 252 seconds)
02:25:10  * kazuponjoined
02:25:59  * mhernandez1joined
02:31:08  * kazuponquit (Ping timeout: 272 seconds)
02:45:19  * mhernandez1quit (Remote host closed the connection)
02:46:23  * felixjet_joined
02:48:15  * dobsonquit (Ping timeout: 248 seconds)
02:48:43  * felixjetquit (Ping timeout: 244 seconds)
03:01:43  * dobsonjoined
03:18:39  * dobsonquit (Ping timeout: 248 seconds)
03:22:34  * dobsonjoined
03:37:00  * shesekquit (Ping timeout: 272 seconds)
03:49:31  * koa_aawjoined
03:55:08  <koa_aaw>how to create a directory if doesn't exist?
03:57:53  * koa_aawquit (Quit: Page closed)
04:11:40  * kazuponjoined
04:20:42  * kazuponquit (Ping timeout: 272 seconds)
05:12:52  * l4u-joined
05:43:21  <TheAceOfHearts>https://www.npmjs.com/package/mkdirp I'd suggest using mkdirp so you can avoid having to do any checks
05:43:24  <TheAceOfHearts>you just run it every time
05:43:35  <TheAceOfHearts>if the directory doesn't exist, it'll get created
05:44:17  <TheAceOfHearts>but you can just do fs.mkdir(directory, cb)
05:44:26  <TheAceOfHearts>and if it already exists then e.code === 'EEXIST'
06:12:53  * TheThingjoined
06:16:38  * kazuponjoined
06:23:04  * kazuponquit (Ping timeout: 255 seconds)
07:17:20  * TheThingquit (Remote host closed the connection)
07:51:06  * l4u-quit (Quit: Connection closed for inactivity)
08:05:06  * TheAceOfHeartsquit (Quit: Leaving.)
08:17:02  * Foxandxssjoined
08:40:59  * djelicjoined
09:11:35  * dobsonquit (Ping timeout: 256 seconds)
09:33:39  * TheThingjoined
09:36:34  * basicdaysquit (Ping timeout: 255 seconds)
09:51:35  * dobsonjoined
10:03:27  * dobsonquit (Ping timeout: 248 seconds)
10:12:41  * yoshuawuytsjoined
10:13:40  * dobsonjoined
10:27:37  * TheThingquit (Remote host closed the connection)
11:04:47  * dobsonquit (Ping timeout: 248 seconds)
11:19:20  * dobsonjoined
11:23:13  * mhernandez1joined
11:36:15  * dobsonquit (Ping timeout: 248 seconds)
11:37:24  * TheThingjoined
11:37:42  * dobsonjoined
11:47:40  * mhernandez1quit (Remote host closed the connection)
12:01:52  * TheThingquit (Remote host closed the connection)
12:06:52  * yoshuawuytsquit (Ping timeout: 255 seconds)
12:39:54  * dobsonquit (Ping timeout: 272 seconds)
12:46:22  * dobsonjoined
12:54:33  * mhernandez1joined
13:01:54  <felixjet_>can someone give a hand please?
13:01:56  <felixjet_>im stuck
13:02:35  <felixjet_>anyone? :(
13:09:17  * mhernandez1quit (Remote host closed the connection)
13:13:18  * kazuponjoined
13:14:10  * mhernandez1joined
13:22:40  * kazuponquit (Ping timeout: 244 seconds)
13:26:18  <Foxandxss>felixjet_: you could try asking
13:26:36  <felixjet_>when i do, no one talks in 3 days xD
13:26:51  <felixjet_>i have a class with generator methods
13:27:05  <felixjet_>how i can call that methods?
13:27:10  <Foxandxss>channel is rather dead indeed ;(
13:27:16  <felixjet_>i can't yield them
13:27:29  <felixjet_>because i need to yield from generator functions only
13:27:44  <felixjet_>and if i use a generator function, i need to yield it from other place
13:27:47  <Foxandxss>my generators-fu is a bit messy as well, try gisting the idea at least so I can see the class
13:27:51  <felixjet_>and ... never ending loop
13:29:06  <felixjet_>Foxandxss, https://gist.github.com/felixsanz/394afd7bc78f315b5ea6
13:29:08  <felixjet_>like this
13:37:55  <Foxandxss>about the issue, I am trying but the editors keep complaining, grrr
13:38:13  <Foxandxss>technically the way always was about calling the method and then .next() on it
13:57:35  * dobsonquit (Ping timeout: 248 seconds)
14:00:55  * Hestiljoined
14:04:53  * dobsonjoined
14:21:25  * Foxandxssquit (Quit: Textual IRC Client: www.textualapp.com)
14:44:32  * joshonthewebquit (Quit: Computer has gone to sleep.)
14:58:37  * roelofjoined
14:59:16  <roelof>Can someone help me with a problem I posted 5 hours ago on gitter ?
15:09:01  * Hestilquit (Remote host closed the connection)
15:20:03  * yoshuawuytsjoined
15:25:04  * yoshuawuytsquit (Ping timeout: 272 seconds)
15:42:55  * Hestiljoined
15:56:07  * roelofquit (Ping timeout: 246 seconds)
15:58:18  * roelofjoined
16:00:28  * roelofquit (Client Quit)
16:34:45  * shesekjoined
16:55:25  * Hestilquit (Remote host closed the connection)
17:01:40  * GrumpyPixeljoined
17:15:51  * stagasjoined
17:18:14  * TheAceOfHeartsjoined
17:19:19  * stagas_joined
17:19:22  * Hestiljoined
17:21:54  * stagasquit (Ping timeout: 265 seconds)
17:22:06  * stagas_changed nick to stagas
17:26:23  * yoshuawuytsjoined
17:40:15  * TheThingjoined
17:57:45  * Hestilquit (Remote host closed the connection)
18:03:09  * stagas_joined
18:04:55  * stagasquit (Ping timeout: 250 seconds)
18:04:56  * stagas_changed nick to stagas
18:13:42  * roelofjoined
18:15:43  <roelof>Can someone help me with this problem : http://pastebin.com/8mFWV1WG
18:25:14  <TheAceOfHearts>???
18:26:34  * Foxandxssjoined
18:33:48  <roelof>TheAceOfHearts: what is not clear on my question ?
18:34:12  * stagasquit (Quit: Bye)
18:40:05  <TheAceOfHearts>oh, hadn't seen the link
18:40:19  <TheAceOfHearts>uhhh, I'm not sure that's how bodyParser should be used
18:40:52  <TheAceOfHearts>app.use(bodyParser()); app.use(function* () { this.body = this.request.body.name.toUpperCase(); })
18:46:03  <roelof>TheAceOfHearts: oke, but then it works for all responses , I m trying to do it for only json responses as the exercise says
18:47:08  <TheAceOfHearts>just check the request content-type?
18:48:02  <roelof>oke, then I think co-body can do the job and this one makes everything more complicated
18:48:31  <TheAceOfHearts>you're making it more complicated for yourself
18:48:32  <TheAceOfHearts>but w/e lol
18:48:36  <TheAceOfHearts>good luck~
18:49:03  <TheAceOfHearts>I'd just do a check for content-type in a middleware after bodyParser
18:49:43  <roelof>more complicated to use body-parser or check for the content-type /
18:50:06  <roelof>oke, thanks for helping me on the right track
18:50:14  <TheAceOfHearts>you're trying to make bodyParser do more than it needs to
18:50:33  <TheAceOfHearts>bodyParser will just set ctx.request.body to the body result
18:50:40  <TheAceOfHearts>and then you can do whatever in your own middlewarer
18:51:00  <roelof>oke, so co-body is better
18:52:08  <TheAceOfHearts>just use bodyParser and then make your own function to do whatever
18:52:10  <TheAceOfHearts>it's simpler
18:52:42  <roelof>and how do i do that . Im a very beginner in koa and have to learn a lot
18:53:45  <TheAceOfHearts>https://www.dropbox.com/s/i6r7ntjec8v989a/Screenshot%202015-05-05%2011.53.41.png?dl=0
18:54:54  <TheAceOfHearts>https://www.dropbox.com/s/ijqycgazvht5vdx/Screenshot%202015-05-05%2011.54.52.png?dl=0
18:56:09  <roelof>so ctx.request.body is used as request.body in the answer. Did I understand this right ?
18:58:33  * Hestiljoined
19:02:26  <roelof>TheAceOfHearts: I have now this http://pastebin.com/nfVvufct but get not found as answer :(
19:03:45  * Hestilquit (Ping timeout: 264 seconds)
19:07:09  * GrumpyPixelquit (Ping timeout: 256 seconds)
19:10:03  * Hestiljoined
19:16:50  <roelof>as I do request.body.content-type . do I then get the content-type ?
19:23:03  <roelof>oke, I solved this one. All thanks for the help
19:23:09  * roelofquit (Quit: Page closed)
19:32:56  * enkristofferquit (Ping timeout: 246 seconds)
19:33:42  * enkristofferjoined
20:16:33  * enkristofferquit (Ping timeout: 240 seconds)
20:21:45  * enkristofferjoined
20:23:09  * Hestilquit (Ping timeout: 250 seconds)
21:03:53  * basicdaysjoined
21:05:04  * mhernandez1quit (Remote host closed the connection)
21:30:14  <Foxandxss>TheAceOfHearts: I created an angular 2 demo (+ article) using koa as backend :)
21:30:53  <TheAceOfHearts>cool :p
21:31:48  <Foxandxss>TheAceOfHearts: today felixjet_ asked about having a class (iojs support classes now) with generator methods in it
21:31:56  <Foxandxss>but we weren't sure of how to integrate that with koa
21:32:10  <TheAceOfHearts>I don't use classes :D
21:32:21  <Foxandxss>I know you sucks, but you could have ideas
21:32:22  <Foxandxss>:P
21:32:28  <TheAceOfHearts>lol
21:32:50  <TheAceOfHearts>are you talking about actual generators, or co yieldables?
21:32:59  <Foxandxss>actual generators
21:33:05  <TheAceOfHearts>oh
21:33:11  <Foxandxss>*method() { yield somethingfromdatabase(); }
21:33:35  <TheAceOfHearts>that's co yieldables lol, that's not actual generators lol
21:33:56  <Foxandxss>there is no co in the mix, but I can be mistaken
21:34:11  <Foxandxss>having a class as a repository pattern for example
21:34:35  <Foxandxss>so you instantiate the class and you start using to it grab stuff from it
21:34:35  <TheAceOfHearts>that'll just yield whatever is returned by somethingfromdatabase()
21:34:59  <TheAceOfHearts>well
21:35:14  <TheAceOfHearts>if you already have that database thing, sure
21:35:37  <Foxandxss>his real issue was calling that generator function from the constructor
21:35:47  <Foxandxss>maybe to initialize the cache or something
21:36:33  <TheAceOfHearts>I'm not sure what you're trying to accomplish
21:36:46  <TheAceOfHearts>if the generator gonna be doing anything async?
21:36:48  <Foxandxss>https://gist.github.com/felixsanz/394afd7bc78f315b5ea6
21:36:52  <Foxandxss>this was the original gist
21:36:59  <TheAceOfHearts>oh
21:37:00  <TheAceOfHearts>yeah
21:37:05  <TheAceOfHearts>of course it won't work
21:37:11  <TheAceOfHearts>that has nothing to do with generators
21:37:34  <TheAceOfHearts>that's co-style yieldables
21:37:37  <TheAceOfHearts>not limited to co
21:37:39  <TheAceOfHearts>a few libs do that
21:38:38  <TheAceOfHearts>co just wraps generators, waits for stuff to run, and pushes the result back in
21:39:13  <TheAceOfHearts>you can't yield outside of generators
21:39:32  <TheAceOfHearts>you can call the generator function, and then keep calling next on it
21:40:04  <Foxandxss>yeah
21:40:07  <Foxandxss>that is what I tried
21:40:17  <TheAceOfHearts>but even then
21:40:23  <TheAceOfHearts>it won't do the async magic you want
21:40:33  <TheAceOfHearts>that's what co does for you
21:40:53  <Foxandxss>so wrapping the calls to the class with co or something?
21:41:22  <TheAceOfHearts>there's co.wrap(fn)
21:41:37  <Foxandxss>yeah, that is what koa does internally for the middlewares
21:41:38  <TheAceOfHearts>which returns a function which passes along the params and returns a promise
21:41:45  <Foxandxss>will need to read co's code then
21:41:55  <TheAceOfHearts>it's really pretty ingenuous
21:42:13  <Foxandxss>holowaychuk is really awesome
21:42:19  <TheAceOfHearts>yah
21:45:26  <TheAceOfHearts>I'm doing lots of react :p
21:45:27  <TheAceOfHearts>and flux~
21:45:28  <TheAceOfHearts>it's cool
21:46:18  <Foxandxss>psss :P
21:48:45  * MacWinnerjoined
22:02:34  * yoshuawuytsquit (Ping timeout: 264 seconds)
22:02:43  <TheAceOfHearts>you should try it out~ it's great
22:02:46  <TheAceOfHearts>I'm using co with flux too lol
22:09:57  * joshonthewebjoined
22:24:36  * TheThingquit (Remote host closed the connection)
22:30:35  * joshonth_joined
22:33:15  * joshonthewebquit (Ping timeout: 276 seconds)
22:33:33  * mhernandez1joined
22:53:14  * mhernandez1quit (Remote host closed the connection)
23:03:33  * joshonth_quit (Quit: Computer has gone to sleep.)
23:04:00  * kazuponjoined
23:05:50  * mhernandez1joined
23:10:37  * mhernandez1quit (Remote host closed the connection)
23:13:58  * kazuponquit (Ping timeout: 264 seconds)
23:25:30  * mhernandez1joined
23:31:04  * MacWinnerquit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
23:38:26  * mhernandez1quit (Remote host closed the connection)
23:46:17  * mhernandez1joined
23:48:24  * mhernandez1quit (Remote host closed the connection)