00:36:13  * joshthecoderquit (Quit: Leaving...)
00:40:19  <neopallium>levi: mingw32 build of clang for Windows: http://llvm.org/releases/3.1/clang+llvm-3.1-i386-mingw32-EXPERIMENTAL.tar.bz2
01:04:10  * xmingquit (Read error: Connection reset by peer)
01:19:24  * joshthecoderjoined
01:34:52  <CIA-22>Ryan Phillips master * rcc715a4 / lib/luvit/http.lua : http: fix Host and chunking - http://git.io/7gUBDg
01:34:53  <CIA-22>Ryan Phillips master * rc810e71 / (lib/luvit/utils.lua tests/test-utils.lua): Merge branch 'master' of github.com:luvit/luvit - http://git.io/XYscyA
01:36:56  * travis-cijoined
01:36:56  <travis-ci>[travis-ci] luvit/luvit#428 (master - c810e71 : Ryan Phillips): The build passed.
01:36:56  <travis-ci>[travis-ci] Change view : https://github.com/luvit/luvit/compare/97e52a029111...c810e715d01b
01:36:56  <travis-ci>[travis-ci] Build details : http://travis-ci.org/luvit/luvit/builds/2267844
01:36:56  * travis-cipart
02:01:31  * elguapo99joined
02:40:31  * jbuezaquit (Quit: jbueza)
02:54:16  * tim_smart|awaychanged nick to tim_smart
03:00:39  * xmingjoined
03:14:56  * tim_smartchanged nick to tim_smart|away
03:18:46  * tim_smart|awaychanged nick to tim_smart
03:19:45  * tim_smartchanged nick to tim_smart|away
03:24:07  * tim_smart|awaychanged nick to tim_smart
03:37:40  * tim_smartchanged nick to tim_smart|away
03:42:03  * tim_smart|awaychanged nick to tim_smart
03:54:27  * tim_smartchanged nick to tim_smart|away
03:58:49  * tim_smart|awaychanged nick to tim_smart
04:16:31  * elguapo99quit (Ping timeout: 256 seconds)
04:21:20  * kristatejoined
05:22:22  * take_cheezequit (Quit: Leaving.)
05:32:07  * take_cheezejoined
06:02:01  <creationix>I experimented with a strata-style http module I called web
06:02:02  <creationix>https://github.com/creationix/luvit-server/blob/master/server.lua
06:02:10  <creationix>it seems a lot easier to work with than node's API
06:02:20  <creationix>and it makes composing middle wares a lot easier too
06:05:33  <creationix>I wonder if we should remove the node-clone http api out of core
06:05:41  <creationix>and let third-party modules compete at that level
06:06:02  <creationix>I like this style much better than node's traditional interface
06:06:14  <dvv1>\o/
06:06:30  <creationix>(I also want to experiment with :read() able streams, but that's for another day)
06:06:40  <dvv1>I miss this kind of writing since luvit 0.0.0 :)
06:06:58  <creationix>a node clone has value, but I don't like node's http interface
06:07:09  <creationix>I designed stack and connect as a patch on node's api
06:07:21  <creationix>but with this interface it's trivial to wrap layers
06:07:43  <dvv1>i do believe we added object-ish bloat at too deep level
06:07:50  <creationix>that too
06:08:02  <creationix>but we were going for a robust implementation with full api compat
06:08:06  <creationix>that requires a bit of bloat
06:08:14  <dvv1>sure
06:08:24  <creationix>but *i* personally don't want that
06:08:33  <creationix>I'd rather make my own framework at a lower level
06:08:44  <dvv1>^^^
06:08:51  <dvv1>i would participate
06:09:42  <creationix>feel free to mess with my demo repo
06:09:48  <creationix>add a router middleware or something
06:09:52  <creationix>or websockets ;)
06:10:06  <creationix>the req.socket is the raw Tcp instance
06:10:12  <dvv1>i kept attempting at making barebone C binding, but memory management in C is a swamp
06:10:49  <creationix>well, the raw table containing a single user data (the uv_tcp_t struct)
06:11:28  <dvv1>i believe you just relived http module from earlier luvit, right?
06:11:44  <creationix>btw, if you haven't heard of the strata style, it's documented at http://stratajs.org/manual
06:11:53  <creationix>I modified it a tiny bit to be easier to implement
06:11:56  <creationix>but it's the same idea
06:11:58  <dvv1>from that times that i developed websocket and sockjs-luvit
06:12:02  <dvv1>cool
06:12:17  <creationix>the big change from anything we've ever had is you don't get a writable response stream
06:12:45  <creationix>if you want to stream to the client, you respond with statusCode, headers, and a readable stream
06:12:49  <creationix>and then emit on that readable stream
06:13:26  <creationix>and instead of next (which was a problem in lua anyway), you get the raw handle to the next middleware as app
06:13:33  <creationix>just call app(req, res) if you want to punt
06:14:59  <creationix>There is still a server object that's returned by createServer
06:15:10  <creationix>it's the uv.Tcp instance
06:15:32  <creationix>but onRequest isn't an event, it's a simple callback
06:15:41  <creationix>there is no reason to have multiple listeners
06:16:23  <creationix>oh, and I auto-parse the url while parsing the rest of http
06:16:27  <creationix>so req.url is a table
06:16:35  <creationix>req.url.path is needed by most everything
06:16:42  <creationix>so why not pre-parse it
06:17:35  <creationix>I'm not sure if I want to keep this directly on top of uv.Tcp or layer it on top of the net module
06:17:41  <creationix>it's bare on uv for now
06:18:37  <creationix>btw, req, res is short for "request" and "respond", the second is a verb to do the actual response
06:18:54  <creationix>before it was "request" and "response" because it represented two streams
06:20:29  <creationix>anyway, I need to go to bed, it's late here
06:21:04  <dvv1>gnite, gjob, thanks!
06:22:36  * creationixquit (Read error: Operation timed out)
06:57:40  * creationixjoined
07:16:42  * joshthecoderquit (Quit: Linkinus - http://linkinus.com)
07:25:37  * arek_deepinitjoined
07:56:43  * creationixquit (Ping timeout: 246 seconds)
08:04:11  * creationixjoined
08:13:44  * `3rdEdenjoined
08:19:10  * dvv1quit (Remote host closed the connection)
08:20:38  * dvvjoined
10:17:38  * creationixquit (Ping timeout: 245 seconds)
10:26:40  * `3rdEdenquit (Quit: Linkinus - http://linkinus.com)
10:33:04  * jbuezajoined
11:15:14  * creationixjoined
11:27:49  * TheJHjoined
11:41:49  * mmaleckiquit (Read error: Connection reset by peer)
11:46:02  * kristatequit (Ping timeout: 264 seconds)
11:47:22  * mmaleckijoined
11:50:55  * `3rdEdenjoined
12:04:07  * tim_smartchanged nick to tim_smart|away
13:31:50  * kristatejoined
13:33:53  * dvvquit (Ping timeout: 260 seconds)
13:42:23  * mmaleckichanged nick to mmalecki[away]
13:44:14  * `3rdEdenquit (Quit: Leaving...)
13:47:46  * `3rdEdenjoined
14:04:36  <creationix>morning
14:04:42  <creationix>(evening, afternoon)
14:10:34  * `3rdEdenquit (Quit: Leaving...)
14:36:11  * mmalecki[away]changed nick to mmalecki
14:50:07  * philips_quit (Excess Flood)
14:53:17  * philips_joined
15:03:10  <rphillips>good morning
15:22:34  <rphillips>i patched the http client yesterday night
15:22:47  <rphillips>it wasn't turning off chunking correctly on GET HEAD
15:23:08  <creationix>nice
15:23:13  <creationix>http is crazy complicated
15:27:13  <creationix>rphillips, I think path.join is busted
15:27:21  <creationix>I keep getting // in my joined paths
15:27:43  * creationixis writing a production quality static file server
15:28:58  <rphillips>hmm.
15:29:04  <rphillips>are the variables nil?
15:30:02  * xmingquit (Changing host)
15:30:02  * xmingjoined
15:35:48  <creationix>no, I'm doing pathJoin(string, anotherString)
15:36:04  <creationix>nil values throw an error anyway in the table.concat inside join
15:36:45  <creationix>for example, I fo path.join("/home/tim/server/public/", "/theme/")
15:37:16  <creationix>actually that first variable doesn't even end in a slash
15:38:01  <creationix>require('path').join("/foo", "/bar/") -> "/foo//bar/"
15:38:30  * `3rdEdenjoined
15:38:36  <creationix>luvit version 0.5.0-139-geafbd61
15:40:26  <creationix>but in other news, my experimental http interface is going well
15:41:42  <rphillips>hmm. i'll take a look at some point today
15:42:27  <creationix>rphillips, let me know when you have time. I want some feedback on the new http interface
15:42:36  <creationix>the node clone is a lot of code and slow
15:43:02  * `3rdEdenquit (Ping timeout: 264 seconds)
15:44:48  <rphillips>oh
15:44:50  <rphillips>is there a PR?
15:47:34  <rphillips>creationix: ^?
15:47:36  <creationix>hmm, fs.createReadStream and :pipe don't seem to work either http://luvit.io:8080/logo.png
15:47:46  <creationix>node 0.2.x had the same pipe issues
15:48:10  <creationix>rphillips, no PR, just a proof-of-concept so far https://github.com/creationix/luvit-server
15:48:32  <creationix>at the moment it's the "web" module and it sits directly on top of the "uv" and "http_parser" modules
15:48:58  <creationix>I'm trying to deploy it to luvit.io as soon as I fix the path.join and fs.createReadStream issues
15:55:05  * elguapo99joined
15:59:23  <rphillips>sweet
15:59:49  <creationix>strange, it's working now
15:59:54  <creationix>does luvit.io:8080 work for you?
16:00:12  <rphillips>yes
16:00:14  <rphillips>page loads
16:00:31  <creationix>and it doesn't look all messed up
16:00:40  <rphillips>looks fine to me
16:00:41  <rphillips>css is there
16:00:44  <rphillips>images
16:01:45  <creationix>oh strange, it's broken for me on linux, but works on osx
16:01:47  <creationix>both latest chrome
16:02:14  <creationix>err, I mean broken on Windows, haven't tried linux yet
16:02:42  <creationix>I think my windows chrome is busted
16:02:47  <creationix>it was doing that for microsoft.com the other day
16:03:26  <rphillips>weird
16:04:17  <creationix>hmm, busted on Android too
16:04:39  <creationix>sounds like it's affected by the network stack
16:04:50  <creationix>I'll bet it's not sending more than one packet per resource
16:05:20  <creationix>do you guys use createReadStream?
16:05:26  <creationix>or stream.pipe
16:05:35  <rphillips>rarely
16:05:43  <rphillips>i believe we use pipe for sockets
16:05:45  <rphillips>not for file streams
16:06:44  <creationix>I am bypassing the net module
16:07:09  <creationix>so I'm :pipe ing directly to the uv.Tcp instance
16:14:55  * kevwiljoined
16:22:08  * joshthecoderjoined
16:38:50  * elguapo99quit (Ping timeout: 264 seconds)
16:42:23  <creationix>ok, so the cutoff problem was close being called before write's callback was called
16:46:51  <creationix>I guess libuv doesn't wait till all writes are done before closing
16:47:04  <creationix>just waits till all reqs are done before calling the close callback
16:47:51  <creationix>ahh, but shutdown does wait for pending writes, perfect
17:00:37  * luastonedjoined
17:21:03  * ajacksifiedjoined
17:28:13  * kevwilquit (Read error: Connection reset by peer)
17:32:28  * kevwiljoined
17:33:00  * `3rdEdenjoined
17:33:04  * `3rdEdenquit (Remote host closed the connection)
17:39:36  * `3rdEdenjoined
17:42:36  * kevwilquit (Read error: Connection reset by peer)
17:44:26  * kevwiljoined
17:54:26  <CIA-22>Tim Caswell master * r6dd3530 / 0.5.0/luvit.tar.gz : Add symlink to source tarball - http://git.io/0JW61g
17:55:33  <CIA-22>Tim Caswell master * ra65e223 / (7 files in 2 dirs): Rewrite server using web module - http://git.io/v_k-rA
18:06:52  <creationix>alright luvit.io is running on latest luvit from git and using the new web module
18:07:06  <creationix>it should support conditional gets with 304 responses as well as HEAD requests
18:07:30  <creationix>the directory listing using chunked encoding and static files stream using a known Content-Length
18:07:57  <creationix>oh, and you can get the pre-built binaries from luvit.io now instead of browsing on github http://luvit.io/dist/latest/
18:08:00  <creationix>it's a lot faster
18:08:10  <creationix>now to fix that path.join issue
18:11:32  * elguapo99joined
18:19:16  * kevwilquit (Read error: Connection reset by peer)
18:23:27  <rphillips>slick
18:29:39  * kevwiljoined
18:32:48  <CIA-22>Tim Caswell master * re4f3818 / (lib/luvit/path.lua tests/test-path.lua): Fix path.join to remove inner slashes when joining - http://git.io/TD2pIA
18:33:00  <creationix>hmm, pull request fail
18:33:23  <creationix>rphillips, care to review the code I accidentally pushed to master? https://github.com/luvit/luvit/commit/e4f3818e840e3c48e19b9418805378aad98d2af6
18:35:28  * travis-cijoined
18:35:29  <travis-ci>[travis-ci] luvit/luvit#430 (master - e4f3818 : Tim Caswell): The build passed.
18:35:29  <travis-ci>[travis-ci] Change view : https://github.com/luvit/luvit/compare/c810e715d01b...e4f3818e840e
18:35:29  <travis-ci>[travis-ci] Build details : http://travis-ci.org/luvit/luvit/builds/2275806
18:35:29  * travis-cipart
18:37:19  <rphillips>checking
18:39:26  <rphillips>creationix: lgtm
18:39:47  <creationix>now all that's missing in my static file server is range requests
18:39:57  <creationix>and some good battle testing
18:40:17  <creationix>I'm really liking the new http interface
18:40:24  <creationix>(the "web" module)
18:43:20  * kevwilquit (Read error: Connection reset by peer)
18:44:01  * `3rdEdenquit (Quit: Linkinus - http://linkinus.com)
18:46:13  * `3rdEdenjoined
18:46:37  * kevwiljoined
18:50:14  * luastonedquit (Ping timeout: 264 seconds)
18:56:50  * elguapo99quit (Ping timeout: 264 seconds)
19:01:46  <levi>It looks nice, but I can't recall how it differs from the previous node-like interface anymore. :)
19:02:06  * kristate_joined
19:02:08  * kristatequit (Read error: Connection reset by peer)
19:02:09  * kristate_changed nick to kristate
19:07:37  * kevwilquit (Read error: Connection reset by peer)
19:10:50  <creationix>levi, the new interface is a lot like wsgi and friends
19:11:00  <creationix>the old one gave you a readable and a writable stream
19:11:06  <creationix>with custom methods and properties on both
19:11:50  <creationix>in particular middleware with the node style require an external helper library like stack or connect
19:12:01  <creationix>but with the wsgi model, you just nest app functions inside eachother
19:12:12  <creationix>no need for a middleware dispatching library
19:12:40  <creationix>alright, so who knows how keepalive is supposed to work
19:14:41  <mmalecki>creationix: well, it just means not closing the connection after you get a request
19:14:50  <mmalecki>er, send a req and receive a res
19:15:03  <mmalecki>it's on by default in http/1.1
19:15:31  * indexzerojoined
19:15:37  * indexzeroquit (Client Quit)
19:15:58  * indexzerojoined
19:16:11  <mmalecki>creationix: what do you want to know, exactly?
19:16:37  * luastonedjoined
19:20:32  * kristatequit (Read error: Connection reset by peer)
19:21:27  * kristatejoined
19:29:21  <levi>creationix: How does data flow betweeen middleware layers? Is it just standard call parameters/returns?
19:30:12  <CIA-22>Tim Caswell master * re94548f / (10 files in 5 dirs): Copy web demo into examples folder - http://git.io/PyJDEw
19:30:42  <creationix>an "app" is a function that takes (request, respond)
19:30:52  <creationix>respond if a function that takes (code, headers, body)
19:31:08  <creationix>so a middleware app is passed a reference to the next most inner app
19:31:36  <creationix>for example, see this logging middleware https://github.com/luvit/luvit/blob/master/examples/web-app/modules/log.lua
19:32:19  <creationix>it replaces the respond function with it's own to intercept the callback and pull out the statis code
19:33:02  <creationix>and here is the big one that does static file serving as well as directory auto-indexing https://github.com/luvit/luvit/blob/master/examples/web-app/modules/static.lua
19:33:04  * travis-cijoined
19:33:04  <travis-ci>[travis-ci] luvit/luvit#431 (master - e94548f : Tim Caswell): The build passed.
19:33:04  <travis-ci>[travis-ci] Change view : https://github.com/luvit/luvit/compare/e4f3818e840e...e94548f36fb9
19:33:04  <travis-ci>[travis-ci] Build details : http://travis-ci.org/luvit/luvit/builds/2276318
19:33:04  * travis-cipart
19:33:16  <levi>So an app is a function that takes an app and returns a function(request,respond)?
19:33:42  <levi>Or is it just middleware apps that are structured that way?
19:33:59  <creationix>right, middleware takes in an app and returns a new wrapped app
19:34:09  <creationix>and the main web interface just asks for the outer-most app
19:34:49  <creationix>here is a simple non-middleware app https://github.com/luvit/luvit/blob/master/examples/web-app/server.lua#L6-17
19:36:29  <creationix>I'm getting 40k requests per second with server-hello.lua
19:36:38  <levi>Nice.
19:36:39  <creationix>let me compare with the old one and node
19:36:47  <levi>It's a very functional approach. I like it.
19:36:59  <creationix>yeah, me too
19:37:12  <creationix>it's more composable than the stack method too
19:37:26  <levi>That's the great thing about functional approaches.
19:37:38  <levi>Composition is a wonderful thing!
19:38:01  <levi>I've been playing with Haskell lately, and Haskellers take compositional properties very seriously. :)
19:38:01  <creationix>stack composes functions too in the helper library
19:38:11  <creationix>but wrapping the body stream is near impossible
19:38:17  <creationix>and other things don't work well
19:38:47  <levi>The haskell guys have figured out how to compose streams, but it's not trivial!
19:43:07  * kristatequit (Ping timeout: 265 seconds)
19:45:56  * ajacksifiedpart
19:46:05  <creationix>my benchmark was off
19:46:12  <creationix>I was logging http trace data on a terminal
19:46:40  <creationix>ok, the old http / stack combo gets ~3k per second
19:46:46  <creationix>(in luvit)
19:47:21  <creationix>the new one gets about 50K
19:47:26  <creationix>I'd say that's an improvement!
19:48:09  <CIA-22>Tim Caswell master * rf6fccfc / (2 files in 2 dirs): Add two hello benchmark apps - http://git.io/Rca42g
19:48:31  <creationix>https://github.com/luvit/luvit/blob/master/examples/web-app/server-hello.lua vs https://github.com/luvit/luvit/blob/master/examples/app/server-hello.lua
19:48:46  <creationix>and I think the faster one actually sends more headers
19:49:51  <rphillips>wow nice
19:50:42  <creationix>now the question is how much am I cheating
19:50:53  <creationix>I don't have all the features of net + http
19:51:01  * travis-cijoined
19:51:01  <travis-ci>[travis-ci] luvit/luvit#432 (master - f6fccfc : Tim Caswell): The build passed.
19:51:01  <travis-ci>[travis-ci] Change view : https://github.com/luvit/luvit/compare/e94548f36fb9...f6fccfcabd18
19:51:01  <travis-ci>[travis-ci] Build details : http://travis-ci.org/luvit/luvit/builds/2276540
19:51:01  * travis-cipart
19:51:23  <creationix>I still think it will be a lot faster since the new interface is easier to implement
19:54:25  * kevwiljoined
20:01:12  <creationix>https://gist.github.com/3517969
20:01:57  <rphillips>damn
20:01:58  <creationix>old luvit = 2489.87, new luvit = 47989.90, node = 22663.94
20:01:59  <rphillips>47989.90
20:02:07  <creationix>not sure why old luvit is so freaking slow
20:02:26  <rphillips>what changed?
20:02:50  <creationix>I rewrote the http layer completely ;)
20:03:03  <creationix>same luvit binary
20:04:23  <creationix>here is the new http layer https://github.com/luvit/luvit/blob/master/examples/web-app/modules/web.lua
20:04:27  * philips_quit (Excess Flood)
20:04:54  <creationix>and auto-date, auto-chunked, auto-length, etc at https://github.com/luvit/luvit/blob/master/examples/web-app/modules/cleanup.lua
20:05:39  <creationix>anyway, I need to run some errands, I'll be back in an hour or so
20:05:49  * philips_joined
20:10:52  * indexzeroquit (Quit: indexzero)
20:10:59  * philips_quit (Excess Flood)
20:12:19  * philips_joined
20:23:29  * bakinsjoined
20:41:54  <creationix>back..
20:46:13  <CIA-22>Tim Caswell master * r0b1c7a5 / (modules/cleanup.lua modules/web.lua server.lua): Update to latest version of web module to get working keepalive - http://git.io/LLs2Wg
20:56:14  <creationix>hmm, I seem to have messed up with keepalive again
20:56:21  <creationix>luvit.io doesn't always load all the resources
21:11:47  <levi>Why would keepalive cause it to not load all the resources?
21:14:44  * indexzerojoined
21:14:50  * indexzeroquit (Client Quit)
21:22:01  <creationix>no idea
21:22:10  <creationix>but the images simply fail to finish sometimes in chrome
21:22:25  <creationix>and sometimes I see the images mixed up on the website
21:29:49  <levi>Odd.
21:30:37  <levi>I would expect that if keepalive were an issue, it would close the connection after a response was completed and the client would just open a new connection for the next request.
21:33:41  <creationix>I guess I need to start sniffing packets
21:33:48  <creationix>or write some tcp level unit tests
21:36:56  <creationix>strange, it only has issues every other refresh
21:37:29  <rphillips>perhaps the browser is caching the connection?
21:40:30  <levi>Wireshark is more fun. :)
21:46:16  * luastonedquit (Quit: Leaving.)
21:54:09  * kevwilquit (Read error: Connection reset by peer)
21:54:41  * kevwiljoined
22:16:11  * kevwilquit (Read error: Connection reset by peer)
22:16:58  * kevwiljoined
22:34:16  * TheJHquit (Ping timeout: 244 seconds)
22:34:56  * philips_quit (Excess Flood)
22:38:49  * philips_joined
22:39:18  * jelliott_quit (Ping timeout: 252 seconds)
22:47:54  * bakinsquit (Quit: bakins)
22:55:43  * kevwilquit (Quit: WeeChat 0.3.8)
23:03:37  * arek_deepinitquit (Quit: Konversation terminated!)
23:15:05  * jelliottjoined
23:22:27  * `3rdEdenquit (Quit: gnite!)
23:39:08  * elguapo99joined