01:11:14  * travis-cijoined
01:11:15  <travis-ci>luvit/luvit#2909 (fixes/fix_stream_closing - fd0de83 : Ryan Phillips): The build has errored.
01:11:16  <travis-ci>Change view : https://github.com/luvit/luvit/compare/656aa962f05b...fd0de83d48d7
01:11:16  <travis-ci>Build details : https://travis-ci.org/luvit/luvit/builds/194628953
01:11:16  * travis-cipart
01:32:43  * DarkGodquit (Ping timeout: 256 seconds)
02:57:01  * Yorlikquit (Quit: Leaving)
04:30:53  * SkyRocknRolljoined
05:40:29  * travis-cijoined
05:40:30  <travis-ci>luvit/luvit#2909 (fixes/fix_stream_closing - fd0de83 : Ryan Phillips): The build passed.
05:40:30  <travis-ci>Change view : https://github.com/luvit/luvit/compare/656aa962f05b...fd0de83d48d7
05:40:30  <travis-ci>Build details : https://travis-ci.org/luvit/luvit/builds/194628953
05:40:30  * travis-cipart
05:53:36  * SinisterRectusquit (Ping timeout: 245 seconds)
05:54:02  * SinisterRectusjoined
08:00:17  * rendarjoined
08:30:43  * DarkGodjoined
09:19:57  * rendarquit (Changing host)
09:19:57  * rendarjoined
13:48:34  * inexquit (Quit: oh)
14:45:16  * Yorlikjoined
14:46:00  * SkyRocknRollquit (Ping timeout: 248 seconds)
14:47:56  * SkyRocknRolljoined
16:59:57  <rphillips>creationix: around?
17:00:01  <rphillips>did you see that luvit pr?
17:00:48  <Go-use-CTCP-S>how do I use coro-net?
17:53:02  * SkyRocknRollquit (Remote host closed the connection)
18:02:35  * Ulydevjoined
18:11:11  * Ulydevquit (Quit: Leaving...)
19:11:02  <creationix>rphillips sorry. I was pretty sick this morning and had a slow start
19:11:20  <rphillips>np... tests passed... and I merged that pr
19:11:31  <creationix>Go-use-CTCP-S I'm afraid there aren't much in the way of docs, but the lit source uses it heavily
19:11:36  <creationix>anything in particular you have in mind?
19:11:50  <creationix>rphillips great, sorry for slowing you down
19:12:00  <rphillips>not a problem... feel better!
19:12:29  <creationix>rphillips so is this the bug that's been truncating server logs?
19:12:54  <rphillips>creationix: doubtful... It's on reading from the std{in,out,err} streams for process.spawns
19:13:14  <rphillips>reading that data might be truncated
19:13:18  <creationix>ahh, so child processes were missing stuff
19:13:23  <rphillips>exactly
19:13:27  <rphillips>only sometimes
19:13:30  <creationix>was it also leaking memory?
19:13:39  <rphillips>no
19:13:56  <creationix>this particular edge case is one where coro-net style streams work a lot better
19:14:09  <rphillips>+1
19:15:02  <creationix>https://github.com/luvit/lit/blob/d80d38407a9234988f2d70d49275b6eead120f9b/libs/exec.lua#L22-L49
19:15:16  <creationix>it just creates 3 coroutines to handle reading stdout, stderr and waiting for exit
19:15:20  <creationix>the order they finish doesn't matter
19:16:33  <rphillips>yeah, that is nice
19:16:55  <creationix>probably one of the most elegant parts of the lit codebase
19:17:01  <creationix>there are some really ugly parts too ;)
19:25:34  * travis-cijoined
19:25:35  <travis-ci>luvit/luvit#2913 (2.12.1 - 6dbd079 : Ryan Phillips): The build passed.
19:25:35  <travis-ci>Change view : https://github.com/luvit/luvit/compare/2.12.1
19:25:35  <travis-ci>Build details : https://travis-ci.org/luvit/luvit/builds/194899393
19:25:35  * travis-cipart
19:44:12  <creationix>SinisterRectus desktop luvi would be neat, but I never made progress on that front
19:44:46  <creationix>cross-platform is hard. Things like the webkit based shells work well cross-platform, but they are JS and really heavy
19:45:35  <creationix>luvi has love-like bundling, but I doubt the better non-blocking network abilities would make it worth using over a mature project like love
19:54:11  <Go-use-CTCP-S>creationix, I need to connect to stuff and have separate read and write threads?
19:54:25  <Go-use-CTCP-S>or something like that
20:03:36  * rendarquit (Ping timeout: 276 seconds)
20:11:39  <creationix>by "thread" do you mean OS thread or lua coroutine thread?
20:12:03  <creationix>as far of coroutine threads, it depends on what you want to do
20:12:21  <creationix>read() and write(data) in coro-net style are both blocking (to the coroutine)
20:12:31  <creationix>if you don't want them blocking eachother then you'll need two coroutines
20:13:12  <creationix>but depending on your performance requirements and how your load sits and data flow dependencies, blocking might be just fine
20:14:38  <creationix>The example I was talking to rphillips about was with waiting for three different things at once and not continuing till all were done. I had spawned 3 coroutines using the split helper (which automatically blocks it's parent coroutine till all the child coroutines finish)
20:15:12  <creationix>kinda like fork/join in systems programming, but for luvit coroutines
20:32:16  * rendarjoined
20:32:16  * rendarquit (Changing host)
20:32:16  * rendarjoined
20:48:03  * CapsAdminquit (Read error: Connection reset by peer)
20:49:16  * CapsAdminjoined
20:50:03  * CapsAdminquit (Remote host closed the connection)
21:01:11  <Go-use-CTCP-S>creationix, so there are 2 ways to write stuff:
21:01:18  <Go-use-CTCP-S>either I'll get a message from an active thread
21:01:29  <Go-use-CTCP-S>or it'll just be standard protocol ping stuff
21:01:54  <Go-use-CTCP-S>so either it's a reply to something I read, which's easy
21:02:10  <Go-use-CTCP-S>or I need to write something from a thread/process/external source/whatever
21:02:45  <Go-use-CTCP-S>I haven't done any socket programming in a while
21:07:38  <creationix>read, then write is easy and blocking works great
21:07:46  <creationix>you can't reply will after you've read anyway
21:07:51  <creationix>*till after
21:08:32  <creationix>it only gets tricky in cases where you have asynchronous events going both directions.
21:10:02  <creationix>Go-use-CTCP-S: https://github.com/luvit/lit/blob/master/deps/coro-http.lua#L25-L41
21:10:27  <creationix>implementing HTTP with keepalive on top of TCP using http-codec
21:10:45  <creationix>the codec handles reading and parsing the headers so that at this level, all the headers come out in a single read
21:11:10  <creationix>then I just read body chunks till it gives an empty string (also part of http-codec's interface)
21:11:31  <creationix>each TCP connection in the server gets it's own coroutine, but within a connection, there is only one
21:23:17  * travis-cijoined
21:23:18  <travis-ci>luvit/luvit#2912 (master - 6dbd079 : Ryan Phillips): The build passed.
21:23:18  <travis-ci>Change view : https://github.com/luvit/luvit/compare/0f9558793bf8...6dbd0795cd0f
21:23:18  <travis-ci>Build details : https://travis-ci.org/luvit/luvit/builds/194899027
21:23:18  * travis-cipart
21:23:38  * travis-cijoined
21:23:39  <travis-ci>luvit/luvit#2912 (master - 6dbd079 : Ryan Phillips): The build passed.
21:23:40  <travis-ci>Change view : https://github.com/luvit/luvit/compare/0f9558793bf8...6dbd0795cd0f
21:23:40  <travis-ci>Build details : https://travis-ci.org/luvit/luvit/builds/194899027
21:23:40  * travis-cipart
21:34:48  * inexjoined
21:47:50  <Go-use-CTCP-S>creationix, here's the thing, I need to write while I'm blocking on read
22:14:27  <creationix>in that case you do need a coroutine for the reader
22:15:01  <creationix>just use coroutine.wrap(function () ... end)() and the coroutine body will run in the background in a new coroutine
22:31:43  <Go-use-CTCP-S>you can do that?! :O
22:32:14  <Go-use-CTCP-S>what kinda black magic does coro-* do?! :O
22:45:22  <Yorlik>Coroutine based API
22:48:49  <SinisterRectus>another satisfied customer
23:39:46  * rendarquit (Quit: std::lower_bound + std::less_equal *works* with a vector without duplicates!)