00:03:28  * rmg_joined
00:08:02  * rmg_quit (Ping timeout: 244 seconds)
00:12:11  * up4joined
00:21:56  * abruanesejoined
00:29:36  <up4>hello ! the learnuv solutions are segfaulting on Mac OS X 10.11.5 starting with exercice #4. am I hallucinating this ? thanks !
00:43:57  * Haragethquit (Remote host closed the connection)
00:49:07  <indutny>up4: heya!
00:49:20  <up4>hi
00:49:29  <indutny>up4: could you please run it under debugger and post a stack trace here?
00:49:46  <up4>just a second
00:49:58  <indutny>thanks!
00:53:09  <up4>i just copy paste the whole thing ?
00:53:31  <indutny>gist?
00:54:00  <up4>ok one secon
00:54:01  <up4>d
00:54:29  <up4>here: https://gist.github.com/up4/99e650ac47a121034def6cab5316fac2
00:54:57  <indutny>one sec
00:55:14  <up4>thanks
00:55:20  <indutny>up4: would you care to run `p * read_req`?
00:55:26  <indutny>from this state
00:55:51  <up4>i'm adding it to the gist now
00:56:20  <up4>done
00:56:26  <indutny>funny
00:56:27  <indutny>thanks
00:56:44  <up4>is it ? ;)
00:58:33  <indutny>yeah
00:58:34  <indutny>it is
00:58:38  <indutny>one more thing :)
00:58:41  <indutny>if you don't mind
00:58:50  <indutny>sudo dtruss ./out/Debug/05_fs_readasync_context
00:58:56  <up4>ok
00:58:57  <indutny>this will just print tracing info to console
00:59:07  <indutny>you may check `man dtruss` if you don't trust me :)
00:59:29  <up4>maybe I shouldn't but i trust you
00:59:33  <indutny>heh
01:01:01  <up4>https://gist.github.com/up4/99e650ac47a121034def6cab5316fac2
01:01:25  * dap_quit (Quit: Leaving.)
01:03:11  <indutny>ok
01:03:13  <indutny>interesting
01:03:33  <up4>i'm all ears !!
01:04:33  <up4>is there hope for me ?
01:05:31  <indutny>up4: haha
01:05:35  <indutny>up4: certainly there is
01:05:42  <indutny>up4: I have a feeling that `req->bufs` is actually a private field
01:05:48  <indutny>up4: and I think this is why it is failing
01:05:54  <indutny>up4: you should bug thlorenz about !
01:06:04  <indutny>it
01:06:15  <up4>ok
01:06:37  <indutny>the proper way to do it
01:06:40  <up4>code is here: https://github.com/thlorenz/learnuv/blob/master/exercises/05_fs_readasync_context/solution.c
01:06:49  <indutny>would be to expose this https://github.com/thlorenz/learnuv/blob/master/exercises/04_fs_readasync/solution.c#L36
01:06:53  <indutny>as a static variable outside of the function
01:06:55  <indutny>and to use the buffer
01:06:58  <indutny>in the callback
01:07:13  <indutny>up4: yeah, well this is not officially supported. Though, pretty good
01:07:24  <up4>ok haha
01:07:45  <indutny>when it works :P
01:07:55  <up4>i will try that. do you think it is specific to darwin, somehow ?
01:08:12  <indutny>shouldn't be
01:08:28  <indutny>does it work on unixes?
01:08:31  <indutny>like
01:08:31  <indutny>linux
01:08:45  * reqsharkquit (Quit: Be back later ...)
01:08:57  <up4>I only tested it on mac os x latest release
01:09:12  <up4>but let me try now…
01:09:19  <up4>(your solution I mean)
01:11:36  <indutny>sure
01:11:38  <up4>well no segfault but the learnuv code won't verify my result now…
01:11:43  <up4>:(
01:11:58  <up4>but that is thlorenz's problem now ;)
01:12:27  <indutny>heh
01:12:28  <indutny>well
01:12:33  <indutny>I'm still curious what the `buf` contains?
01:12:36  <indutny>or
01:12:39  <indutny>how does it verify the result?
01:13:25  <indutny>also
01:13:32  <indutny>it probably needs "%.*s" not "%s"
01:13:40  <indutny>since the string is not zero-terminated
01:14:38  <up4>i added the code to the gist
01:14:52  <up4>the string is zero-terminated
01:15:37  <up4>so that code runs but won't output what learnuv expects to verify
01:16:51  <indutny>well, it is a coincidence :)
01:17:01  <indutny>I doubt that the file is zero terminated
01:17:15  <indutny>'This is the magic we are looking for!\n'.length === 38
01:18:25  <up4>when I put "%.*s" I get a segfault
01:19:13  <indutny>you need to put sizeof(buf), buf
01:19:15  <indutny>instead of just buf
01:19:56  <up4>ha ok
01:21:41  <up4>i got verified ;)
01:21:48  <up4>it works
01:22:20  <indutny>cool! :)
01:22:52  <up4>thanks so much !
01:23:42  <up4>i should probably go to sleep now. thanks again and goodnight.
01:24:20  * up4part
01:30:09  * rgrinbergjoined
01:53:13  * Ruyijoined
02:01:56  * rcyrjoined
02:02:18  * tunniclm_quit (Ping timeout: 246 seconds)
02:02:56  * rcyrchanged nick to systemfault
02:04:59  * rmg_joined
02:09:15  * rmg_quit (Ping timeout: 244 seconds)
02:15:03  * Haragethjoined
02:15:28  * Ruyiquit (Ping timeout: 264 seconds)
02:57:45  * rmgquit (Remote host closed the connection)
03:23:00  * Haragethquit (Remote host closed the connection)
03:54:45  * reqsharkjoined
03:58:24  * rmgjoined
04:01:35  * MoZu4k__joined
04:03:18  * rmgquit (Ping timeout: 276 seconds)
04:06:25  * rmgjoined
04:10:45  * rmgquit (Ping timeout: 246 seconds)
04:35:09  * Jacob843quit (Remote host closed the connection)
04:35:58  * Jacob843joined
04:38:04  * Jacob843quit (Remote host closed the connection)
04:39:24  * Jacob843joined
05:06:11  * MoZu4k__quit (Quit: MoZu4k__)
05:23:34  * rgrinbergquit (Ping timeout: 260 seconds)
05:23:39  * Haragethjoined
05:28:53  * Haragethquit (Ping timeout: 244 seconds)
06:07:55  * rmgjoined
06:12:11  * rmgquit (Ping timeout: 240 seconds)
06:34:45  * seishunjoined
06:46:35  * nickleeflyjoined
07:00:39  * rmgjoined
07:05:04  * rmgquit (Ping timeout: 240 seconds)
07:27:25  * davijoined
07:31:40  * seishunquit (Ping timeout: 264 seconds)
07:34:49  * daviquit (Ping timeout: 260 seconds)
07:44:37  * saghul_joined
08:09:30  * rmgjoined
08:13:39  * rmgquit (Ping timeout: 246 seconds)
08:14:27  * Fishrock123joined
08:15:07  * systemfaultquit (Quit: Bye!)
08:27:15  * saghul_quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
08:36:43  * rendarjoined
08:53:45  * saghul_joined
09:47:52  * saghul__joined
09:49:47  * saghul_quit (Ping timeout: 260 seconds)
09:59:05  * davijoined
09:59:05  * daviquit (Changing host)
09:59:05  * davijoined
10:06:29  * daviquit (Ping timeout: 260 seconds)
10:10:58  * rmgjoined
10:15:03  * rmgquit (Ping timeout: 240 seconds)
10:31:00  * davijoined
10:31:00  * daviquit (Changing host)
10:31:00  * davijoined
10:36:33  * daviquit (Ping timeout: 240 seconds)
10:39:58  * thealphanerdquit (Quit: farewell for now)
10:40:28  * thealphanerdjoined
10:46:42  * abruanesequit (Quit: ZNC 1.6.3+deb1 - http://znc.in)
11:29:28  * davijoined
11:36:54  * daviquit (Ping timeout: 260 seconds)
12:12:27  * rmgjoined
12:16:34  * saghul__quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
12:17:22  * rmgquit (Ping timeout: 260 seconds)
12:17:26  * happy-dudejoined
12:27:43  * saghul_joined
12:56:51  * rgrinbergjoined
13:41:45  * davijoined
14:10:42  * tunniclm_joined
14:13:55  * rmgjoined
14:18:34  * rmgquit (Ping timeout: 252 seconds)
14:24:34  * daviquit (Ping timeout: 240 seconds)
14:25:51  * saghul_quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
14:30:13  * Haragethjoined
14:33:12  * rmgjoined
14:34:33  * Haragethquit (Ping timeout: 240 seconds)
14:38:04  * rmgquit (Ping timeout: 240 seconds)
15:01:00  * rmgjoined
15:02:31  * nickleeflyquit (Quit: Connection closed for inactivity)
15:04:15  * davijoined
15:09:00  * saghul_joined
15:34:42  * Haragethjoined
15:40:45  * daviquit (Ping timeout: 276 seconds)
15:41:37  * brsonjoined
15:48:51  * davijoined
15:52:16  * grantilajoined
16:00:21  * Haragethquit (Remote host closed the connection)
16:15:28  * rmg_joined
16:20:02  * daviquit (Ping timeout: 260 seconds)
16:20:08  * rmg_quit (Ping timeout: 272 seconds)
16:25:21  * Haragethjoined
16:26:36  * dap_joined
16:36:22  * seishunjoined
16:39:25  * reqsharkquit (Quit: Be back later ...)
16:41:16  * seishunquit (Ping timeout: 264 seconds)
16:53:26  * brsonquit (Quit: leaving)
17:08:14  * saghul_quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
17:14:25  * saghul_joined
17:30:10  * Fishrock123quit (Remote host closed the connection)
17:38:33  * saghul_quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
17:52:01  * Fishrock123joined
17:54:13  * reqsharkjoined
18:04:00  * reqsharkquit (Ping timeout: 272 seconds)
18:04:35  * reqsharkjoined
18:11:02  * happy-dudequit (Quit: Connection closed for inactivity)
18:11:41  * brsonjoined
18:15:50  * happy-dudejoined
18:16:56  * rmg_joined
18:20:00  * seishunjoined
18:21:57  * rmg_quit (Ping timeout: 276 seconds)
19:00:07  * brson_joined
19:02:28  * ncthom91joined
19:02:38  * brsonquit (Ping timeout: 244 seconds)
19:02:38  * indutnyquit (Ping timeout: 244 seconds)
19:03:05  * indutnyjoined
19:03:09  * indutnychanged nick to Guest15578
19:39:44  * rmgquit (Remote host closed the connection)
19:40:21  * rmgjoined
19:43:08  * brson_quit (Ping timeout: 250 seconds)
19:51:58  * Fishrock123quit (Remote host closed the connection)
19:54:55  * Fishrock123joined
20:04:34  * brsonjoined
20:26:57  * Haragethquit (Remote host closed the connection)
20:38:43  * rendarquit (Ping timeout: 244 seconds)
20:43:40  * AndreasMadsenjoined
20:58:06  * AndreasMadsenquit
21:00:28  * ncthom91quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:02:16  * Fishrock123quit (Quit: Leaving...)
21:08:27  * rendarjoined
21:25:55  * sgimenoquit (Ping timeout: 252 seconds)
21:27:31  * Haragethjoined
21:28:02  * sgimenojoined
21:33:59  * Haragethquit (Ping timeout: 244 seconds)
21:38:16  * Haragethjoined
21:58:13  * rmg_joined
22:04:47  * rmg_quit (Ping timeout: 260 seconds)
22:08:04  * ncthom91joined
22:08:47  * ncthom91quit (Client Quit)
22:22:07  * Haragethquit (Remote host closed the connection)
22:24:08  * Haragethjoined
22:32:33  * rgrinbergquit (Ping timeout: 246 seconds)
22:35:41  * nickleeflyjoined
22:37:40  * seishunquit (Ping timeout: 264 seconds)
22:43:53  * Jacob843quit (Remote host closed the connection)
22:46:20  * Jacob843joined
22:55:32  * thneequit (Ping timeout: 250 seconds)
23:08:40  * grantilaquit (Quit: Leaving.)
23:09:45  * avihjoined
23:11:35  <avih>hi, is there a way to use stdout TTY handle synchronously on windows while still going through the ansi codes conversion? as far as I can tell uv_set_blocking on windows is only allowed for named pipes, and indeed it fails when stdout is a TTY
23:13:10  <avih>and also, when stdout is redirected via > or >>, is there some stream api which i can use for appending to stdout instead of uv_fs_write which requires me to first check the file size since the API needs an offset and can otehrwise rewrite the file from the begining even if the user uses >>
23:13:55  <avih>(the former is only an issue on windows it seems, the latter on both windows and *nix)
23:18:27  <avih>in general, i think it would have been nice to have an abstraction for stdout as a plain stream which can be blocking on all platforms (while still allowing me to check/guess its type in case i need to take different actions depending on it). as it stands, and if i understand correctly, each different handle type, be it TTY/FILE/NAMED_PIPE and possibly others needs its own unique init sequence, and possibly unique write sequence too, and with different
23:18:27  <avih>blocking modes
23:22:17  <avih>also, i know that currently node.js uses blocking mode on all stdout, even on windows as far as i understand, but i'm not sure how it can be achieved with the current libuv
23:23:44  <avih>unless it's really ugly with a busy wait loop for the write calls...
23:27:45  * rendarquit (Quit: std::lower_bound + std::less_equal *works* with a vector without duplicates!)
23:57:26  * rgrinbergjoined