00:00:00  * ircretaryquit (Remote host closed the connection)
00:00:02  <Dirkson>Ralith: Sorry?
00:00:12  * ircretaryjoined
00:00:19  <Ralith>just an idle observation
00:00:36  <Dirkson>Ralith: I don't understand what a "free variable" means here : )
00:00:51  <Ralith>https://en.wikipedia.org/wiki/Free_variables_and_bound_variables
00:01:41  <Dirkson>Ralith: Global variables? Yes, there are - This is not true of most of my code, but I'm really not 100% sure how to design libuv code without a fair amount of them.
00:02:06  <Ralith>you stick a pointer to a state structure in the user data field, generally
00:02:10  <Ralith>Dirkson: it looks like you're using an old version of libuv
00:02:51  <Dirkson>Ralith: That's true, I am - The available non-.h documentation appears to be for that version, and it's the version supplied by my distro
00:03:20  <Dirkson>Ralith: I do use that trick for the actual tcp data stuff.
00:04:34  <Dirkson>I should probably have a convention for global variables, so I can more easily spot when they'
00:04:39  <Dirkson>they're being used in a function.
00:04:59  <Ralith>oh, well, this is a simple issue
00:05:09  <Ralith>your uv_connect_t is on the stack
00:05:13  <Dirkson>Excellent. That's my favorite sort of issue.
00:05:28  <mmalecki>aren't you trying to reuse uv_tcp_t accross server and client?
00:05:42  * AlexisMochaquit (Ping timeout: 258 seconds)
00:05:52  <Ralith>it's mildly surprising this code doesn't crash immediately
00:05:52  <Dirkson>mmalecki: In a limited way. This file is the same for server and client.
00:06:19  <Dirkson>Ralith: Well, that's my code for you - Always mildly surprising.
00:06:23  * AlexisMochajoined
00:06:23  <mmalecki>you seem to be calling bind *and* connect on UvTcp4
00:06:32  <Ralith>mmalecki: presumably not in the same process
00:06:43  <Dirkson>Ralith has it, mmalecki : )
00:06:46  <mmalecki>fair enough
00:07:02  <Ralith>Dirkson: when you return control to the uv mainloop, it will try to access the pointer you passed to uv_tcp_connect, which is to a dead location on the stack
00:07:03  <Dirkson>Ralith: Should I calloc uv_connect, or is malloc enough?
00:07:07  * mrvisserjoined
00:07:08  <mmalecki>okay, are you sure you uv_tcp_init in client?
00:07:27  <Ralith>Dirkson: the header comments document what initialization is expected, if any, for each structure
00:07:34  <Dirkson>mmalecki: Yup. That's in a function shared by both client and server. I can hand it to ya' if you're curious
00:08:08  <Ralith>in my version, it says to "provide an uninitialized uv_connect_t*", so malloc should be fine
00:08:08  <mmalecki>ah, Ralith found it already, didn't read back
00:08:43  <Ralith>remember, libuv handles always need to exist in memory for as long as the loop holds a reference to them
00:09:57  <Ralith>Dirkson: I usually find it's useful to have a single state structure which contains all the handles a certain system needs; that way it's easier to be sure you don't forget to malloc or free anything
00:10:15  <Dirkson>Right
00:10:28  <Ralith>makes it easier to allocate everything at startup, too
00:10:34  <Dirkson>Ralith: Well, I've fixed that bit of code, but my callback still doesn't seem to run.
00:11:48  <Ralith>have you ran this code under asan?
00:12:02  <Dirkson>Yup
00:12:40  <Dirkson>Currently it powers through the whole connection process without complaint
00:12:41  * mrvisserquit (Ping timeout: 255 seconds)
00:13:48  * quijotejoined
00:13:48  * AlexisMocha_joined
00:14:41  * AlexisMochaquit (Ping timeout: 264 seconds)
00:15:21  * quijote_joined
00:15:54  <Ralith>as mmalecki suggested, ensure that uv_tcp_init is getting called on the client
00:16:29  <Ralith>and the server, for that matter
00:16:46  <Dirkson>Absolutely happening on both. I can hand you the whole code if you like
00:17:32  <Dirkson>Ralith: www.orangehattech.com/ScrumbleUv.c ( .h works too )
00:18:17  * quijotequit (Ping timeout: 264 seconds)
00:19:24  <Ralith>don't have time to go through that right now, unfortunately
00:19:33  <Dirkson>Gotcha
00:19:45  * quijote_quit (Ping timeout: 252 seconds)
00:19:57  <Dirkson>mmalecki: Any chance you still have an interest in poking at it? : )
00:20:30  <mmalecki>Dirkson: sure, could take a look, is that source you linked to updated?
00:20:56  <Dirkson>mmalecki: Yup, it's the lastest version I have
00:23:12  <Dirkson>OH. HAHA.
00:23:13  <LOUDBOT_>IRC NEEDS A KILL FILE
00:23:17  <mmalecki>Dirkson: hmm, you do uv_run that loop right?
00:23:24  <Dirkson>mmalecki: /No/
00:23:29  <Dirkson>mmalecki: That what I just figured out.
00:23:41  <mmalecki>Dirkson: :D
00:23:56  <Dirkson>mmalecki: I wait until ScrumbleOptions.ConnectedToServer==1 to run the uv_loop... But that only ever gets set after the loop runs and the callback fires :D
00:24:04  <Ralith>haha
00:24:06  <Ralith>that'll do it
00:24:58  <Dirkson>Excellent! Now I have an entirely different error ^^
00:25:02  <Dirkson>Thanks Ralith, mmalecki : )
00:25:12  <Ralith>note that generally you want to exit when uv's loop returns
00:26:48  * mrvisserjoined
00:27:07  * dshaw_joined
00:27:23  <Dirkson>Ralith: I run it with UV_RUN_NOWAIT : )
00:28:01  <Ralith>that seems imprudent
00:28:09  <Dirkson>Ralith: Whyso?
00:28:24  <Dirkson>Ralith: If I can't use that, it sort of puts the kaibash of the whole "use libuv!" idea.
00:28:31  <Ralith>why is that?
00:29:49  <Dirkson>Ralith: Well, the client is a gui app. It needs to do things other than respond to network events.
00:29:52  * daviddiasjoined
00:30:22  <Ralith>most programs do
00:31:20  <Ralith>GUI input is, unfortunately, not yet natively supported by libuv
00:31:30  <Dirkson>Ralith: Might be quicker if you explained why UV_RUN_NOWAIT is a bad idea
00:31:30  * dshaw_quit (Ping timeout: 240 seconds)
00:31:52  <mmalecki>Dirkson: as I understand it, you're integrating with a separate event loop?
00:32:18  <Ralith>it is not a bad idea in and of itself, but it is easy to use in a way that can introduce latency and waste CPU time
00:32:18  <Dirkson>mmalecki: Yes? I don't have a formal name for it, but the client does things like graphics, input, etc.
00:33:17  <Ralith>for example, if you just call it N times a second, then you're wasting CPU time, and if it's a loop that's shared with your graphics, you might impose arbitrary amounts of latency to IO when framerates drop
00:33:48  <Ralith>even without graphics sharing the loop, you're introducing latency any time an event comes in at a time other than immediately prior to your call
00:34:25  * daviddiasquit (Ping timeout: 252 seconds)
00:35:16  <Dirkson>Ralith: *reads* So your point is that calling other stuff will increase libuv latency?
00:35:41  <Ralith>that's not quite what I said
00:36:10  <Ralith>but if 'other stuff' includes things like 3D rendering which can be quite slow, then it is close enough
00:38:01  <Ralith>unfortunately, in lieu of a significant libuv extension, the only real solution here is multithreading--though one generally wants a distinct thread for graphics anyway, so that other work can proceed when you're blocked on buffer swap
00:38:10  <Dirkson>Ralith: I'm not sure what the other stuff includes. I think on dual core machines they might run in the same thread
00:38:26  <mmalecki>Dirkson: you might also look into UV_RUN_ONCE
00:38:43  <mmalecki>Dirkson: and call it on every tick of your second loop
00:38:49  <mmalecki>Dirkson: not sure how feasible that would be
00:38:54  <Ralith>you're not sure? do you have some sort of dynamic work stealing scheme going on?
00:39:07  <Dirkson>Ralith: It's a big program and I forget ^^ Just a tick
00:41:42  <Dirkson>Ralith: On a dual core machine, it looks like I do actually run the graphics and networking frames on the same core. I admit, my game performance is more or less shot on dual cores anyway.
00:43:12  * AlexisMochajoined
00:43:17  <Ralith>you may get very unpredictable behavior from the network in that case
00:43:35  <Dirkson>How "unpredictable"? Latency or dropped packets?
00:43:50  <Ralith>both, depending on circumstances
00:43:57  * AlexisMocha_quit (Ping timeout: 252 seconds)
00:44:20  <Ralith>TCP in particular can introduce immense amounts of latency in response to transient packet loss such as you might encounter during a framerate hiccup
00:44:31  <Ralith>presuming sufficient network load
00:44:54  <Dirkson>I suppose with a bit of a redesign, I really could hand a lot of logic over to libuv - All my of work units are currently time-separated void functions with no arguments... I just hand those to libuv and have IT deal with running the damn things...
00:45:22  <Ralith>you certainly should never have a call to sleep in the same thread as libuv is running
00:45:26  <Dirkson>I.e. I have void DoCpuGpuLink(); . If I hand that to libuv on a timer, everything's cherry.
00:45:42  <Ralith>nor indeed any other blocking or particularly CPU-intensive calls
00:45:59  <Ralith>(beware that many OpenGL calls can block)
00:46:21  <Dirkson>Ralith: Ok, now I need to know more about how libuv works. Does libuv do any threading on its own?
00:46:28  <Dirkson>I imagine it must not.
00:46:44  <Ralith>if by "do any threading" you mean have internal threads, then yes, it does
00:46:50  <Ralith>that isn't of concern to you, however
00:47:13  <Dirkson>Right. MY stuff will always run in the thread I run uv_loop in, aye?
00:47:17  <Ralith>correct
00:47:41  <Ralith>callbacks are issued from inside your call to run the loop
00:47:54  <Dirkson>Cool.
00:48:31  <Dirkson>If I hand it a bunch of stuff to do every, say, 50ms, will it space those calls out so that it's not doing nothing for 50ms, then trying to do 50ms of work the instant the timer runs out?
00:49:19  <Dirkson>Ah, yup. By calling uv_timer_start with various delays.
00:50:24  <Dirkson>Ralith: Ok. What happens if one of my functions /does/ block for a while? Is there any amount of blocking it can do that will mess libuv up?
00:51:16  <Ralith>it won't break libuv, it'll just prevent you from handling any other events for that period, which can have various adverse effects
00:51:37  <Ralith>timers running late, the network issues we already discussed, etc
00:53:39  <Dirkson>Right.
00:53:57  <Dirkson>Basically, all the normal stuff that happens when stuff blocks the cpu too long :D
00:54:52  <Ralith>generally one schedules such work asynchronously or in another thread as appropriate
00:54:53  * AlexisMocha_joined
00:55:00  <Dirkson>Right
00:55:19  * AlexisMochaquit (Ping timeout: 252 seconds)
00:55:57  <Ralith>libuv does in fact allow you to schedule work on its internal worker threads, but you shouldn't use this too heavily as it shares a work queue with filesystem access
00:56:32  <Dirkson>Interesting
00:57:18  <Dirkson>This amuses me. I'm not sure it'll result in a huge performance boost - But whatever libuv does has got to be more advanced than what I'm doing. It'll make it Pretty Darn Trivial to expand to 8 cores too, which is something I've been intended to do.
00:57:51  * mrvisserquit (Remote host closed the connection)
01:07:38  <Dirkson>Ralith: I am somewhat excited about this ^^ Seems like a better solution than trying to make libuv conform.
01:11:54  * calvinfojoined
01:15:36  <Ralith>effective refactoring is always a nice feeling
01:15:57  * quijotejoined
01:19:00  <Dirkson>Ralith: Oh - Can I call uv_write from any thread, or should I restrict it to the thread its uv_stream_t came from?
01:19:35  <Ralith>you may only operate on a libuv loop from the thread it is running on
01:20:24  <Ralith>use uv_async, the one exception to this, if you need to wake up the loop from another thread
01:20:41  * quijotequit (Ping timeout: 265 seconds)
01:23:22  <Dirkson>Ralith: Excellent. I may or may not end up needing that - Depends if I can get the opengl rendering off my main thread or not : )
01:26:13  * petka_quit (Quit: Connection closed for inactivity)
01:26:14  * calvinfoquit (Read error: Connection reset by peer)
01:28:54  * calvinfojoined
01:41:41  * daviddiasjoined
01:45:48  * daviddiasquit (Ping timeout: 245 seconds)
01:48:49  * kellabytejoined
01:55:48  <sinclair|work>tjfontaine: hi mate, are you there?
02:01:10  * calvinfoquit (Quit: Leaving.)
02:03:19  * AlexisMochajoined
02:04:59  * AlexisMocha_quit (Ping timeout: 252 seconds)
02:08:26  * mrvisserjoined
02:13:44  * mrvisserquit (Ping timeout: 255 seconds)
02:16:44  * quijotejoined
02:19:45  * daviddiasjoined
02:21:07  * quijotequit (Ping timeout: 252 seconds)
02:27:21  * daviddiasquit (Ping timeout: 252 seconds)
02:28:31  * dshaw_joined
02:32:53  * dshaw_quit (Ping timeout: 245 seconds)
02:40:29  * rjequit (Excess Flood)
02:41:06  * rjejoined
03:17:30  * quijotejoined
03:22:29  * quijotequit (Ping timeout: 265 seconds)
03:24:16  * daviddiasjoined
03:27:35  * thlorenzjoined
03:29:02  * daviddiasquit (Ping timeout: 252 seconds)
03:34:58  * AlexisMocha_joined
03:35:33  * AlexisMochaquit (Ping timeout: 250 seconds)
03:38:24  * thlorenzquit (Remote host closed the connection)
04:01:01  * dshaw_joined
04:04:01  * bradleymeck_joined
04:10:28  * dshaw_quit (Quit: Leaving.)
04:16:15  * kellabytequit (Quit: Connection closed for inactivity)
04:18:16  * quijotejoined
04:19:35  * yunongjoined
04:21:23  * yunong__joined
04:21:58  * yunong_quit (Ping timeout: 240 seconds)
04:22:54  * quijotequit (Ping timeout: 265 seconds)
04:24:19  * yunongquit (Ping timeout: 240 seconds)
04:32:51  * bradleymeck_quit (Quit: bradleymeck_)
04:38:57  * thlorenzjoined
04:45:48  * thlorenzquit (Ping timeout: 245 seconds)
04:57:15  * kellabytejoined
05:12:33  * daviddiasjoined
05:17:03  * daviddiasquit (Ping timeout: 245 seconds)
05:19:02  * quijotejoined
05:23:14  * quijotequit (Ping timeout: 240 seconds)
05:47:50  * Chilledheartjoined
05:51:27  * AlexisMochajoined
05:52:05  * m76joined
05:52:29  * Chilledheartquit (Client Quit)
05:52:42  * Chilledheartjoined
05:52:58  * Chilledheartquit (Remote host closed the connection)
05:53:08  * Chilledheartjoined
05:53:17  * AlexisMocha_quit (Ping timeout: 265 seconds)
06:06:02  * Chilledheartpart
06:19:49  * quijotejoined
06:24:08  * quijotequit (Ping timeout: 245 seconds)
06:37:34  * AlexisMocha_joined
06:37:45  * AlexisMochaquit (Ping timeout: 265 seconds)
06:43:25  * AlexisMochajoined
06:44:02  * AlexisMocha_quit (Ping timeout: 265 seconds)
06:50:03  * AlexisMocha_joined
06:51:25  * AlexisMochaquit (Ping timeout: 250 seconds)
07:00:41  * daviddiasjoined
07:04:58  * daviddiasquit (Ping timeout: 245 seconds)
07:20:33  * quijotejoined
07:25:13  * quijotequit (Ping timeout: 250 seconds)
07:28:16  * rendarjoined
07:33:08  * quijotejoined
07:35:44  * AlexisMochajoined
07:36:03  * AlexisMocha_quit (Ping timeout: 250 seconds)
08:00:16  * quijotequit (Ping timeout: 258 seconds)
08:06:14  * kellabytequit (Quit: Connection closed for inactivity)
08:06:25  * thlorenzjoined
08:10:48  * thlorenzquit (Ping timeout: 245 seconds)
08:38:59  * quijotejoined
08:43:14  * quijotequit (Ping timeout: 240 seconds)
08:48:52  * daviddiasjoined
08:53:33  * daviddiasquit (Ping timeout: 258 seconds)
08:54:47  * m76quit (Read error: Connection reset by peer)
08:57:51  * m76joined
09:07:18  * thlorenzjoined
09:10:03  * AlexisMocha_joined
09:11:49  * thlorenzquit (Ping timeout: 250 seconds)
09:12:17  * AlexisMochaquit (Ping timeout: 264 seconds)
09:18:18  * m76quit (Read error: Connection reset by peer)
09:23:18  * janjongboomjoined
09:32:40  * petka_joined
09:35:52  * hzjoined
09:36:26  * janjongboomquit (Ping timeout: 252 seconds)
09:39:52  * quijotejoined
09:42:59  * daviddiasjoined
09:44:07  * AlexisMochajoined
09:44:25  * quijotequit (Ping timeout: 252 seconds)
09:45:54  * AlexisMocha_quit (Ping timeout: 240 seconds)
09:47:28  * daviddiasquit (Ping timeout: 245 seconds)
09:54:45  * AlexisMocha_joined
09:55:55  * AlexisMochaquit (Ping timeout: 276 seconds)
10:14:25  * thlorenzjoined
10:18:34  * thlorenzquit (Ping timeout: 240 seconds)
10:22:11  * m76joined
10:37:09  * daviddiasjoined
10:40:47  * quijotejoined
10:41:18  * daviddiasquit (Ping timeout: 240 seconds)
10:42:17  * quijote_joined
10:43:09  * janjongboomjoined
10:45:07  * quijotequit (Ping timeout: 240 seconds)
10:46:43  * quijote_quit (Ping timeout: 250 seconds)
10:51:33  * AlexisMochajoined
10:52:08  * yunongjoined
10:52:38  * AlexisMocha_quit (Ping timeout: 240 seconds)
10:54:50  * yunong__quit (Ping timeout: 255 seconds)
11:00:46  * AlexisMocha_joined
11:02:02  * AlexisMochaquit (Ping timeout: 255 seconds)
11:06:48  * Kakera_joined
11:13:38  * mrvisserjoined
11:19:54  * sinclair|workquit (Quit: ChatZilla 0.9.90.1 [Firefox 29.0/20140421221237])
11:21:26  * AlexisMochajoined
11:23:41  * AlexisMocha_quit (Ping timeout: 276 seconds)
11:31:06  * daviddiasjoined
11:35:23  * daviddiasquit (Ping timeout: 245 seconds)
11:43:02  * quijotejoined
11:47:28  * quijotequit (Ping timeout: 245 seconds)
11:51:11  * hzquit (Ping timeout: 260 seconds)
11:59:43  * AlexisMocha_joined
12:01:38  * AlexisMochaquit (Ping timeout: 252 seconds)
12:10:38  * hzjoined
12:13:19  * AlexisMochajoined
12:14:02  * AlexisMocha_quit (Ping timeout: 255 seconds)
12:16:44  * mrvisserquit (Remote host closed the connection)
12:25:17  * daviddiasjoined
12:27:27  * janjongboomquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:29:33  * daviddiasquit (Ping timeout: 245 seconds)
12:32:02  * AlexisMocha_joined
12:33:14  * AlexisMochaquit (Ping timeout: 240 seconds)
12:34:18  * janjongboomjoined
12:43:49  * quijotejoined
12:48:28  * quijotequit (Ping timeout: 265 seconds)
12:48:56  * quijotejoined
12:52:40  * bradleymeck_joined
13:19:32  * daviddiasjoined
13:24:08  * daviddiasquit (Ping timeout: 252 seconds)
13:26:20  * quijotequit (Ping timeout: 252 seconds)
13:31:49  * AlexisMochajoined
13:31:58  * AlexisMocha_quit (Ping timeout: 240 seconds)
13:35:54  * AlexisMochaquit (Ping timeout: 240 seconds)
13:37:02  * AlexisMochajoined
13:39:22  * AlexisMocha_joined
13:40:10  * thlorenzjoined
13:41:17  * AlexisMochaquit (Ping timeout: 252 seconds)
13:44:33  * thlorenzquit (Ping timeout: 245 seconds)
13:49:57  * thlorenzjoined
13:54:42  * bradleymeck_quit (Quit: bradleymeck_)
13:55:07  * thlorenzquit (Ping timeout: 276 seconds)
13:57:25  * AlexisMocha_quit (Ping timeout: 252 seconds)
13:57:34  * AlexisMochajoined
14:03:38  * AlexisMochaquit (Ping timeout: 240 seconds)
14:05:22  * AlexisMochajoined
14:12:00  * m76quit (Read error: Connection reset by peer)
14:22:59  * quijotejoined
14:27:28  * quijotequit (Ping timeout: 245 seconds)
14:34:14  * Kakera_quit (Ping timeout: 240 seconds)
14:37:22  * janjongboomquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:39:47  * AlexisMocha_joined
14:41:38  * AlexisMochaquit (Ping timeout: 255 seconds)
14:57:51  * hzquit (Ping timeout: 260 seconds)
14:58:25  * hzjoined
15:00:48  * AlexisMochajoined
15:01:57  * AlexisMocha_quit (Ping timeout: 250 seconds)
15:02:33  * thlorenzjoined
15:04:05  * Kakera_joined
15:06:38  * thlorenzquit (Ping timeout: 240 seconds)
15:07:29  * daviddiasjoined
15:12:28  * daviddiasquit (Ping timeout: 276 seconds)
15:23:49  * quijotejoined
15:24:48  * AlexisMocha_joined
15:24:56  * AlexisMochaquit (Ping timeout: 258 seconds)
15:28:23  * quijotequit (Ping timeout: 258 seconds)
15:37:57  * stephankquit (Quit: *Poof!*)
15:49:06  * quijotejoined
15:50:05  * quijotequit (Read error: Connection reset by peer)
15:50:31  * quijotejoined
15:56:14  * m76joined
16:01:52  * thlorenzjoined
16:14:06  * AlexisMochajoined
16:15:17  * AlexisMocha_quit (Ping timeout: 264 seconds)
16:20:39  * thlorenzquit (Remote host closed the connection)
16:23:03  * thlorenzjoined
16:27:45  * quijotequit (Ping timeout: 252 seconds)
16:27:57  * AlexisMocha_joined
16:28:18  * AlexisMochaquit (Ping timeout: 245 seconds)
16:40:18  * AlexisMochajoined
16:42:03  * AlexisMocha_quit (Ping timeout: 245 seconds)
16:48:55  * quijotejoined
16:49:48  * daviddiasjoined
16:54:08  * daviddiasquit (Ping timeout: 245 seconds)
16:54:34  * thlorenzquit (Remote host closed the connection)
17:12:22  * thlorenzjoined
17:19:30  * kellabytejoined
17:34:55  * wolfeida_joined
17:36:08  * wolfeidauquit (Ping timeout: 276 seconds)
17:42:38  * quijotequit (Ping timeout: 252 seconds)
17:44:12  * daviddiasjoined
17:48:25  * daviddiasquit (Ping timeout: 252 seconds)
17:49:12  * janjongboomjoined
18:01:11  * janjongboomquit (Ping timeout: 265 seconds)
18:14:14  * thlorenzquit (Remote host closed the connection)
18:17:03  * quijotejoined
18:20:09  * TooTallNatejoined
18:26:29  * LOUDBOT_quit (Ping timeout: 250 seconds)
18:27:07  * LOUDBOTjoined
18:27:21  * CAPSLOCKBOT_quit (Ping timeout: 250 seconds)
18:28:34  * AlexisMocha_joined
18:30:53  * AlexisMochaquit (Ping timeout: 264 seconds)
18:33:02  * CAPSLOCKBOTjoined
18:38:09  * daviddiasjoined
18:39:11  * Guest72327changed nick to `3rdEden
18:42:34  * daviddiasquit (Ping timeout: 240 seconds)
19:01:52  * thlorenzjoined
19:03:38  * calvinfojoined
19:05:54  <indutny>hey hey
19:05:56  <indutny>anyone around?
19:05:58  <indutny>mmalecki: ?
19:06:00  <indutny>bradleymeck: ?
19:06:30  * thlorenzquit (Ping timeout: 258 seconds)
19:07:37  <indutny>anyway
19:07:38  <indutny>https://github.com/indutny/bthread
19:07:45  <indutny>if anyone wants to try it - please let me know
19:10:15  <roxlu>indutny: can I set a uv_thread_t to NULL or 0, or some other initial value that works on win/lin/mac ?
19:10:45  <indutny>hm...
19:10:48  <indutny>better not
19:10:57  <roxlu>just leave it uninitialized?
19:10:59  <indutny>yeah
19:11:04  <indutny>but you could set it to 0
19:11:11  <indutny>just don't assume that the fact that it is 0
19:11:16  <indutny>means that it is uninitialized
19:11:24  <roxlu>ok thanks
19:12:39  <roxlu>and just a plain C question.. when I want to use memset(), shoudl I e.g. include string.h?
19:13:47  <indutny>roxlu: man 3 memset ;)
19:14:30  <roxlu>;) thanks
19:17:38  <roxlu>what's a good way to test if a file exists on linux? So many options, fopen/access/stat/ ?
19:18:11  <indutny>fstat
19:18:23  <indutny>ah
19:18:24  <indutny>stat
19:18:25  <indutny>sorry
19:19:01  <roxlu>thanks!
19:19:21  * rendarquit (Ping timeout: 250 seconds)
19:26:13  * kellabytequit (Quit: Connection closed for inactivity)
19:27:23  * kellabytejoined
19:28:27  * quijotequit (Ping timeout: 250 seconds)
19:31:11  * calvinfoquit (Quit: Leaving.)
19:32:25  * daviddiasjoined
19:35:29  * thlorenzjoined
19:35:55  * thlorenzquit (Remote host closed the connection)
19:36:38  * daviddiasquit (Ping timeout: 245 seconds)
19:36:55  * calvinfojoined
19:37:43  * SquirrelCZECHquit (Remote host closed the connection)
19:38:43  * bajtosjoined
19:38:46  * SquirrelCZECHjoined
19:39:31  * inolenquit (Ping timeout: 240 seconds)
19:48:16  <roxlu>hmm how do I debug an app which runs fine when ran through gdb, and fine when I add one printf() in release mode
19:50:10  <indutny>hah
19:50:12  <indutny>that happens
19:50:32  <roxlu>hehe I suspect it's related to threading :# not 100% sure though
19:50:37  <indutny>you need to consider possible exec paths
19:50:39  * quijotejoined
19:50:42  <indutny>certainly it is threading
19:50:55  <indutny>look at those paths and see if there any problem with them
19:51:01  <indutny>imagine all possible conflicts between threads
19:51:10  <indutny>stuff that is used simultaneously
19:52:43  <roxlu>I've got a ringbuffer which is written in one thread and read from in another
19:53:12  <indutny>oh
19:53:17  <indutny>you most likely have a bug there then
19:53:22  <indutny>where does it crash?
19:53:25  <indutny>do you have a stack trace?
19:53:26  <indutny>core dump?
19:53:29  <indutny>brb
19:53:30  <indutny>tea time
19:53:42  <roxlu>hmmm have to check where the core dump is
20:03:27  * mrvisserjoined
20:03:56  <roxlu>ah found it
20:06:17  * TooTallNatequit (Quit: Computer has gone to sleep.)
20:06:31  <roxlu>indutny: do you maybe have a sec to look at this?
20:07:03  * bajtosquit (Quit: bajtos)
20:08:38  * mrvisserquit (Ping timeout: 240 seconds)
20:09:41  * quijotequit (Ping timeout: 255 seconds)
20:10:01  * TooTallNatejoined
20:15:39  * benviejoined
20:25:47  * TooTallNatequit (Quit: Computer has gone to sleep.)
20:26:25  * daviddiasjoined
20:26:36  <roxlu>indutny: if you may have a sec, you mind find this interesting, see the note: https://gist.github.com/roxlu/8e15185fce43656d1ef1#file-rxp_player-c-L573-L580
20:30:48  * daviddiasquit (Ping timeout: 245 seconds)
20:32:53  <roxlu>arg.. wow.. never stop learning :# .. I thought: int dx, c, i, j = 0; would set all values to 0
20:33:35  <roxlu>doing int dx = 0; int c, i; now and it works fine
20:35:52  * quijotejoined
20:40:23  * quijotequit (Ping timeout: 245 seconds)
20:46:59  * calvinfoquit (Quit: Leaving.)
20:49:06  <indutny>roxlu: yep
20:51:34  * stephankjoined
21:03:08  * rmgquit (Remote host closed the connection)
21:03:35  * rmgjoined
21:20:25  * daviddiasjoined
21:25:07  * daviddiasquit (Ping timeout: 252 seconds)
21:36:46  * quijotejoined
21:41:03  * quijotequit (Ping timeout: 250 seconds)
21:41:22  * inolenjoined
21:46:13  * kellabytequit (Quit: Connection closed for inactivity)
21:47:32  * calvinfojoined
21:52:06  * calvinfoquit (Ping timeout: 258 seconds)
22:03:35  * Kakera_quit (Ping timeout: 250 seconds)
22:04:20  * calvinfojoined
22:05:24  * TooTallNatejoined
22:08:50  * calvinfoquit (Ping timeout: 252 seconds)
22:21:43  * calvinfojoined
22:36:41  * m76quit (Read error: Connection reset by peer)
22:37:32  * quijotejoined
22:38:14  * TooTallNatequit (Quit: Computer has gone to sleep.)
22:42:14  * quijotequit (Ping timeout: 255 seconds)
22:58:13  * hzquit
23:02:59  * kellabytejoined
23:08:39  * daviddiasjoined
23:12:53  * daviddiasquit (Ping timeout: 245 seconds)
23:17:01  * calvinfoquit (Quit: Leaving.)
23:28:49  * brsonjoined
23:38:16  * quijotejoined
23:41:14  * inolenquit (Quit: Leaving.)
23:42:37  * quijotequit (Ping timeout: 252 seconds)
23:50:39  * inolenjoined