00:00:33  * ryan_stevensjoined
00:25:56  * AvianFluquit (Remote host closed the connection)
00:28:57  <mikeal>substack: you around tomorrow?
00:45:33  * _sorensenquit (Ping timeout: 245 seconds)
00:47:09  * jez0990joined
00:50:35  * wiwilliaquit (Ping timeout: 240 seconds)
00:57:56  * _sorensenjoined
01:10:07  * _sorensenquit (Ping timeout: 260 seconds)
01:21:24  <substack>mikeal: yep
01:25:09  * heathjsjoined
01:26:29  * ehdquit (Remote host closed the connection)
01:26:51  * Guest40010joined
02:03:40  <substack>mikeal: what for?
02:06:12  * ryan_stevensquit (Quit: Leaving.)
02:07:55  * AvianFlujoined
02:11:38  * ryan_stevensjoined
02:17:48  * lyaunzbequit (Remote host closed the connection)
02:27:44  <substack>beerJS looks like
02:29:23  * ryan_stevensquit (Quit: Leaving.)
02:30:22  * ryan_stevensjoined
02:32:52  * jez0990quit (Read error: Connection reset by peer)
02:33:05  * st_lukejoined
02:37:23  <dominictarr>substack, this is crazy http://www.youtube.com/watch?v=IZ0KiW1t0m8
02:46:59  * shykeschanged nick to zz_shykes
02:50:14  * Madarsquit (Remote host closed the connection)
02:52:47  * defunctzombie_zzchanged nick to defunctzombie
02:52:55  <mbalho>that rules o/
02:53:14  <mbalho>dominictarr: there are some kids in east oakland that make bikes vaguely similar to that
02:55:35  * st_lukequit (Remote host closed the connection)
02:55:58  * Madarsjoined
02:59:37  * ryan_stevensquit (Quit: Leaving.)
03:10:39  * ryan_stevensjoined
03:15:29  <substack>http://areallykewlwebpage.tripod.com/
03:19:32  <isaacs>that's it, fanfic is over. this one is the best that can be done. http://memory-beta.wikia.com/wiki/Our_Million-Year_Mission
03:29:56  <substack>poor data
03:30:09  <substack>var data = []
03:40:20  * thatguydan_joined
03:40:21  * thatguydan_quit (Read error: Connection reset by peer)
03:40:29  * thatguydanquit (Read error: Connection reset by peer)
03:40:38  * thatguydanjoined
03:59:36  <Raynos>https://github.com/Raynos/batched#example
03:59:40  <Raynos>Is ^ that a silly idea
04:02:47  * ITproquit (Ping timeout: 252 seconds)
04:18:09  * thatguydanquit (Read error: Connection reset by peer)
04:18:15  * thatguydan_joined
04:22:07  * thatguydan_quit (Read error: Connection reset by peer)
04:22:13  * thatguydanjoined
04:22:33  * tphummelquit (Quit: tphummel)
04:57:28  <jjjjohnnny>by the android ghost of Borges, a summary of a story that never will be http://memory-beta.wikia.com/wiki/Waiting_for_G%27Doh,_or,_How_I_Learned_to_Stop_Moving_and_Hate_People
05:01:40  <Raynos>substack: do you have any playing card artwork?
05:02:17  <substack>nope
05:02:30  <jjjjohnnny>U MENA TAROT
05:04:33  <jjjjohnnny>LACK OF CORN SYZZURP
05:07:46  <Raynos>I need a simple card game
05:20:09  * mikealquit (Quit: Leaving.)
05:20:57  <Raynos>Ok distributed card games are too hard
05:21:11  <fotoverite>children card games?
05:21:19  <ik>i like turtles
05:21:25  <ik>so probably you can do a game about that
05:27:44  * mikealjoined
05:30:30  <Raynos>im trying to think of how you do peer to peer gambling and exchange of chips
05:39:28  <rvagg>Raynos: bitcoin protocol
05:39:35  <Raynos>yeah
05:39:39  <Raynos>but that requires learning bitcoin
05:39:42  <Raynos>i want to avoid that
05:39:48  <rvagg>LEARN ALL THE THINGS
05:39:48  <Raynos>now im looking for a p2p deck system
05:39:49  <LOUDBOT>12:33:40 < LOUDBOT> IT HAS BEGUN.
05:40:06  <Raynos>you need an algorithm where everyone can agree on the deck
05:42:39  * tomshredsjoined
05:56:20  <Raynos>"X solved the problem in 1987 but its not computationally possible"
05:56:24  <Raynos>FFFFFFFFFFFFFFFF--------------
05:59:46  * ryan_stevensquit (Quit: Leaving.)
06:11:45  <ik>i was computationally possible once
06:11:51  <ik>it's not all it's cracked up to be
06:22:00  * ryan_stevensjoined
06:33:09  * purrquit (Remote host closed the connection)
06:33:17  * purrjoined
06:37:57  * zz_shykeschanged nick to shykes
06:41:16  * purrquit (Remote host closed the connection)
06:41:24  * purrjoined
06:42:25  * purrquit (Read error: Connection reset by peer)
06:44:30  * purrjoined
06:44:45  * purrquit (Read error: Connection reset by peer)
06:48:47  * shuaibquit (Read error: Connection reset by peer)
06:48:55  * purrjoined
06:54:59  * shuaibjoined
07:15:02  * shuaibquit (Ping timeout: 255 seconds)
07:31:25  * shuaibjoined
07:42:59  <Raynos>dominictarr: I want to build a multiplayer demo game that persists to leveldb and uses leveldb replication. What kind of characteristics / gameplay should this have for it to work cleanly with p2p / commutative?
07:43:29  <dominictarr>1. use scuttlebutt
07:44:15  <Raynos>i like the idea of doing geo spatial queries in leveldb :D
07:44:40  <dominictarr>I don't know about commutative, games are often competitive. cooperative is closer to commutative
07:45:02  <Raynos>im thinking I need something where volative state is a core feature
07:45:36  <Raynos>the only issue with the synchronization / order-less / merge conflicts thing is "fairness"
07:45:51  <Raynos>having the idea of "no fairness" baked right into the game makes the problem go away
07:47:08  <Raynos>dominictarr: why scuttlebutt instead of leveldb?
07:47:30  <dominictarr>oh, so like maybe being disconnected also gives the other player an advantage?
07:47:47  <dominictarr>Raynos, no, scuttlebutt can persist to leveldb!
07:48:09  <Raynos>I prefer the idea of using leveldb directly
07:48:27  <Raynos>and having leveldb use scuttlebutt as the replication thing
07:48:31  * defunctzombiechanged nick to defunctzombie_zz
07:48:44  <Raynos>it just feels like leveldb is more powerful / cool / etc
07:49:17  <dominictarr>well, you can still use leveldb for queries, I'm working on doing map-reduce over scuttlebutts currently.
07:49:25  <Raynos>unless scuttlebutt adn map-reduce work nicely with each other
07:49:37  <Raynos>i dont really see how scuttlebutt and leveldb work together
07:50:00  <dominictarr>well, scuttlebutt update events are just written to leveldb,
07:50:17  <dominictarr>and then queried with a range querie.
07:50:23  <Raynos>i guess that works
07:50:47  <dominictarr>you could interact with a range document more directly
07:50:56  <dominictarr>I'm just figuring out how that will work.
07:51:06  <dominictarr>check level-scuttlebutt...
07:51:23  * defunctzombie_zzchanged nick to defunctzombie
07:51:37  <Raynos>ok
07:53:12  <dominictarr>I could probably simplify the api... but I'm still figuring it out.
07:53:24  <dominictarr>replication does work though... in my tests.
07:53:27  <Raynos>man demos are hard
07:53:42  <Raynos>im trying to figure out the balance between too fucking complex
07:53:44  <Raynos>and too boring
07:55:11  * defunctzombiechanged nick to defunctzombie_zz
08:15:49  * tphummeljoined
08:24:37  <dominictarr>Raynos, also: simple enough to work.
08:30:02  * shykeschanged nick to zz_shykes
08:30:50  <Raynos>dominictarr: I think I might just do sketchpad clone
08:30:54  <Raynos>shared drawing canvas
08:31:33  <dominictarr>see https:github.com/dominictarr/js-paint
08:32:06  <dominictarr>(has plenty of room for improvement... but I did get other people to connect and draw at cascadia.js)
08:33:00  <Raynos>cool
08:34:45  * thatguydanquit (Ping timeout: 260 seconds)
08:35:18  <Raynos>oh wow chrome has color pickers
08:35:42  <dominictarr>oh no. it's been postponed until the 13th
08:35:48  <dominictarr>I'll be in NYC by then!
08:36:13  <Raynos>Ah.
08:36:22  <Raynos>its ok ill try to get it recorded
08:38:14  <Raynos>Btw
08:38:15  <Raynos>https://github.com/Raynos/batched
08:38:20  <Raynos>I wrote another flow control library :D
08:38:38  <Raynos>I wonder what the flow control / dt looks like in npm
08:42:59  <dominictarr>hey, what if you wrote a multi user game of life
08:43:14  <dominictarr>but each user gets a different colour cells
08:45:46  * ryan_stevensquit (Quit: Leaving.)
08:45:58  <Raynos>doesnt sound very interactive :P
08:46:50  <dominictarr>users can click and add more shapes, that then do battle.
08:46:59  * tphummelquit (Quit: tphummel)
08:47:46  * tilgovijoined
08:47:51  * ryan_stevensjoined
08:51:56  <Raynos> that sounds like fun
09:00:31  * 17WAASE2Qjoined
09:03:10  <jesusabdullah>nice Raynos, reminds me a little of chainsaw but I think this api looks hella useful
09:04:21  <jesusabdullah>oh so that's what scuttlebutt does
09:04:22  <jesusabdullah>handy
09:05:23  <jesusabdullah>now that I'm no longer a nodejitsu employee I'm trying to make a conscious effort to reevaluate my toolchains
09:05:27  <jesusabdullah>not that I didn't do that before
09:05:39  <jesusabdullah>but familiarity with certain libraries is less of a concern now
09:17:19  <Raynos>jesusabdullah: yes you should
09:17:24  <Raynos>the only nodejitsu modules I use are yours
09:17:27  <Raynos>and node-http-proxy
09:18:05  <Raynos>jesusabdullah: have you witnessed the p2p & leveldb revolution?
09:18:18  <jesusabdullah>I've been watching leveldb
09:18:31  <jesusabdullah>I have a feeling I'll want to juggle large working sets soon enough
09:18:40  <jesusabdullah>and I see dominictarr has a ton of leveldb-backed stuff
09:18:48  <jesusabdullah>not so much the p2p but y'know
09:18:52  <jesusabdullah>p2p's cool and all that
09:19:39  <Raynos>well teh reason I like p2p
09:19:50  <Raynos>is all my webrtc demos work in node & browser 100% same code.
09:19:57  <Raynos>its true environment agnostic networking
09:25:46  * devaholicjoined
09:26:01  <devaholic>https://www.hackerrank.com/level/2
09:26:05  <devaholic>pretty fun
09:26:19  <devaholic>im the only one using javascript >_>
09:27:03  <devaholic>https://www.hackerrank.com/challenges/the-bidding-game
09:36:42  * thatguydanjoined
10:00:45  * ITprojoined
10:05:56  * ITproquit (Ping timeout: 276 seconds)
10:07:53  * Guest40010changed nick to ehd
10:27:36  * thatguydanquit (Quit: thatguydan)
10:29:52  * thatguydanjoined
10:32:43  * ryan_stevensquit (Quit: Leaving.)
10:41:56  * tilgoviquit (Ping timeout: 248 seconds)
11:30:07  * CoverSlidequit (Quit: leaving)
11:31:05  * fotoverite_joined
11:33:41  * fotoveritequit (Ping timeout: 248 seconds)
11:33:41  * fotoverite_changed nick to fotoverite
12:08:09  * 17WAASE2Qquit (Read error: Operation timed out)
12:16:42  * jez0990joined
12:35:52  * yorickjoined
12:35:52  * yorickquit (Changing host)
12:35:52  * yorickjoined
13:38:30  * ITprojoined
13:41:06  * ITproquit (Read error: Connection reset by peer)
13:41:29  * ITprojoined
13:48:14  * ITproquit (Ping timeout: 276 seconds)
13:48:55  * ITprojoined
13:53:27  * ITproquit (Read error: Connection reset by peer)
13:54:15  * ITprojoined
14:05:50  * ITproquit (Read error: No route to host)
14:07:05  * tomshredsquit (Quit: Leaving...)
14:08:36  * tomshredsjoined
14:14:52  * tomshredsquit (Quit: Linkinus - http://linkinus.com)
14:25:39  * tomshredsjoined
14:30:16  * fivetanleyjoined
14:42:18  * defunctzombie_zzchanged nick to defunctzombie
15:21:27  * thatguydanquit (Quit: thatguydan)
15:23:44  * shuaibquit (Ping timeout: 255 seconds)
15:27:07  <isaacs>mbalho: once upon a time you mentioned a song by M.I.A. that went "that's not my name... i want my name"
15:27:22  <isaacs>mbalho: i was confused because i'd never heard it, and have everything M.I.A. has done.
15:27:27  <isaacs>mbalho: that song is by the Ting Ting Tings
15:27:33  <isaacs>mbalho: who are awesome :)
15:27:49  <fotoverite>lol how did he confuse those two
15:27:51  * shuaibjoined
15:27:55  <fotoverite>They sound nothing a like
15:28:20  <isaacs>the vocals are pretty similar
15:28:29  <isaacs>ahd mia has a bunch fo songs that are more punky than electronic
15:28:44  <fotoverite>yes but the production. MIA usually is very drum heavy.
15:28:58  <fotoverite>also you can never hear her vocals. :P
15:31:09  <isaacs>fotoverite: you need to listen to more mia
15:32:10  <fotoverite>I listened to all of kala and arula multiple times. She really lost me with maya
15:36:41  <isaacs>yeah, maya got too edm-ish for me
15:36:53  <isaacs>less political and passionate
15:37:46  <fotoverite>which is half what made her interesting. Though it was her wikileaks mix that was the real tragedy.
15:43:37  * st_lukejoined
15:44:11  <isaacs>ikinda dig vicki leekz
15:44:37  <isaacs>but yeah, it's not anywhere as good as the earlier stuff where she actually sings
15:49:28  * tphummeljoined
15:51:05  * lyaunzbejoined
15:52:32  * st_lukequit (Remote host closed the connection)
15:53:57  * st_lukejoined
16:07:18  * wiwilliajoined
16:27:27  * defunctzombiechanged nick to defunctzombie_zz
16:27:36  * lyaunzbequit (Remote host closed the connection)
16:35:36  * _ritchjoined
16:42:01  <mbalho>isaacs: oh i thought that was MIA
16:42:02  <mbalho>haha
16:47:41  * _sorensenjoined
16:58:35  <fotoverite>Max welcome to the congo two hours later. :P
16:59:01  <fotoverite>this one right http://open.spotify.com/track/41frDloBAZr4QSAxQg4lqP?
16:59:52  <fotoverite>Wow, of all the returns that's a really strange album to be the most popular. Are there that many tweens on spottily?
17:06:24  * tphummelquit (Quit: tphummel)
17:17:39  * st_lukequit
17:17:40  * defunctzombie_zzchanged nick to defunctzombie
17:17:58  * st_lukejoined
17:18:22  * st_lukequit (Remote host closed the connection)
17:18:51  * st_lukejoined
17:34:40  * fotoveritequit (Ping timeout: 260 seconds)
17:35:24  * fotoveritejoined
17:36:12  <isaacs>fotoverite: no, this one: http://www.amazon.com/We-Started-Nothing-Ting-Tings/dp/B0018OAPI4/ref=sr_1_3?ie=UTF8&qid=1354642560&sr=8-3&keywords=the+ting+tings
17:36:17  <isaacs>fotoverite: might be the same song, i dunno
17:37:01  <fotoverite>same song, just picked first result which was a compilation album for some nick show because spotify is weird
18:01:37  <rowbit>/!\ ATTENTION: (default-local) [email protected] successfully signed up for developer browserling plan ($20). Cash money! /!\
18:01:37  <rowbit>/!\ ATTENTION: (default-local) paid account successfully upgraded /!\
18:11:23  * blakmatrixjoined
18:14:20  * blakmatrixpart
18:14:21  * defunctzombiechanged nick to defunctzombie_zz
18:15:58  * defunctzombie_zzchanged nick to defunctzombie
18:17:28  * tphummeljoined
18:18:22  * defunctzombiechanged nick to defunctzombie_zz
18:48:48  * tphummel_joined
18:51:35  * tphummelquit (Ping timeout: 252 seconds)
18:51:36  * tphummel_changed nick to tphummel
18:57:25  * tilgovijoined
19:04:46  * defunctzombie_zzchanged nick to defunctzombie
19:05:02  * zz_shykeschanged nick to shykes
19:15:44  <isaacs>STREAM PUNKS, I CALL ON THEE!
19:15:50  <isaacs>ALSO PETER
19:16:18  <isaacs>my sister's the wife of sol. loudbot, you're getting a little personal here.
19:16:34  <isaacs>So, there's this odd case with streams2:
19:16:50  <isaacs>http.createServer(function(q,s){s.end('ok')}).listen(1337)
19:16:56  <isaacs>what happens when you upload a file to that server?
19:18:13  <isaacs>remember: q is a suck-style Readable.
19:18:16  <isaacs>s is the response
19:24:59  * ryan_stevensjoined
19:26:41  * ryan_stevensquit (Client Quit)
19:34:14  * ryan_stevensjoined
19:35:44  * jez0990quit (Ping timeout: 265 seconds)
19:39:17  * CoverSlidejoined
19:39:51  <chrisdickinson>with browserify, is it possible to specify multiple entry points?
19:40:30  <substack>chrisdickinson: browserify entry1.js entry2.js ...
19:40:46  <chrisdickinson>cool
19:41:07  <chrisdickinson>actually. is there a way to bring in multiple entry files but not immediately execute them?
19:41:25  <chrisdickinson>and then to specify a "master" entry file that *is* executed and dynamically requires one of the other entry files?
19:42:04  <chrisdickinson>ah, the -r option, maybe?
19:42:44  <substack>what
19:42:52  <substack>just require() those files
19:43:13  <chrisdickinson>the problem is bringing them into the bundle without executing them
19:43:22  <chrisdickinson>which i think -r will do, if i'm not mistaken
19:43:40  <chrisdickinson>they're "entry" points, but each entry point corresponds roughly to a different page of the site.
19:44:01  <chrisdickinson>and the thought was that i'd have a master entry file that (based on a variable set in the template) require'd the appropriate entry module.
19:44:13  * tomshredsquit (Quit: Linkinus - http://linkinus.com)
19:44:27  <chrisdickinson>that way all of the javascript can be bundled at once, but only the appropriate javascript runs on a given page.
19:45:53  <substack>don't use -r
19:46:21  <chrisdickinson>is there another option?
19:46:24  <Raynos>chrisdickinson: switch (location.href) { case "uri": require("./uri") }
19:46:35  <chrisdickinson>aaah.
19:46:53  <chrisdickinson>hmm.
19:46:54  <Raynos>its the same I do for server / client split
19:47:08  <dominictarr>chrisdickinson, jut require the inner modules inside a callback
19:47:09  <chrisdickinson>that means the master module will have to be dynamically generated, though ):
19:47:17  <Raynos>if (process.name === "node") { require("./code.node.js") } else { require("./code.browser.js") }
19:47:33  <dominictarr>Raynos, that wont work
19:47:41  <Raynos>Oh I forgot
19:47:43  <guybrush>bfy bundles every require it finds
19:47:48  <Raynos>(require)("./code.node.js")
19:47:49  <Raynos>:D
19:47:53  <guybrush>just make multiple bundles
19:47:57  <dominictarr>VOODOO
19:48:14  <Raynos>chrisdickinson: your solving the wrong problem btw
19:48:26  <Raynos>chrisdickinson: just link prefetch the other bundles on the homepage and cache / gzip them
19:48:26  <chrisdickinson>in that?
19:48:37  <chrisdickinson>but the other bundles will include repeated code.
19:48:39  <Raynos>dont optimize for the "share node_modules among multiple bundles"
19:48:40  <dominictarr>chrisdickinson, it's simple require('initial') ; setTimeout(function () { require('deffered') }, 10000)
19:48:41  <Raynos>its not worth it
19:49:17  <dominictarr>Raynos, that is gonna be in bfy2, I believe
19:49:43  <Raynos>bfy1 has (require)("./hack")
19:50:07  <chrisdickinson>that attempts to run './hack' at runtime but not bring it in during the compilation step, correct?
19:50:07  <Raynos>https://github.com/Raynos/clientmongo/blob/master/index.js
19:50:21  <Raynos>yes which will fail in bfy but work in node
19:50:29  <Raynos>https://github.com/Raynos/clientmongo/blob/master/index.js#L2
19:50:38  <Raynos>Actually I use a different hack which is dynamic require
19:50:40  <chrisdickinson>server isn't in node, this is for work.
19:50:49  <chrisdickinson>also maybe a case where we'd be interested in testling ci.
19:51:19  <chrisdickinson>(the server is in django.)
19:51:53  <Raynos>chrisdickinson: first rewrite server in node
19:51:54  <Raynos>then success
19:51:58  <chrisdickinson>haha
19:52:04  <chrisdickinson>not going to happen, unfortunately.
19:52:09  <Raynos>then ragequit job
19:52:17  <Raynos>and become a cyber vagrant
19:53:16  * mikealquit (Quit: Leaving.)
19:53:38  <dominictarr>hahah
19:53:59  <dominictarr>okay, write a python -> js compiler in the weekend
19:54:05  * mikealjoined
19:54:21  <chrisdickinson>i have most of the other way around, which is probably less useful in this case
19:54:22  <dominictarr>and then on monday be like "HEY, I made our app 10x faster!!!!'
19:54:26  <Raynos>already done
19:54:30  <Raynos>just python -> llvm -> js
19:54:32  <guybrush>chrisdickinson: an idea regarding "incremental" bundles, just make one bundle dependent on another bundle :D
19:54:55  <Raynos>guybrush: that requires a global scope "bridge" which sucks
19:55:22  <guybrush>so all code-dependencies is A->B->C and bundles are: a:A,B and b:C
19:55:27  <dominictarr>there is a js conf talk on that
19:55:38  <dominictarr>they use something like that for doing gmail.
19:55:38  <guybrush>in bundle b you just ignore A and B
19:56:38  <guybrush>and in bundle a you do something like, window.requireBundleA() :p
19:56:53  * jez0990_joined
19:57:20  * tphummelquit (Quit: tphummel)
19:57:29  <guybrush>but it would suck like Raynos said
19:57:34  <Raynos>guybrush: look at googles commonJS server
19:58:09  <Raynos>browserify needs a shared node_modules cache baked in it across multiple bundles using a global backdoor
20:00:28  * ITprojoined
20:01:23  <dominictarr>http://m.youtube.com/?reload=4&rdm=meh9i16w3#/watch?v=mGENRKrdoGY
20:04:15  * tphummeljoined
20:06:47  <guybrush>you can fix all this by writing less code!
20:07:51  <CoverSlide>vaporjs ftw!
20:12:48  * jez0990_quit (Ping timeout: 264 seconds)
20:22:12  * ryan_stevensquit (Quit: Leaving.)
20:23:07  <guybrush>https://github.com/google/module-server uses tap for tests :D
20:24:24  <ehd>also desperately needs a package.json and a sane executable
20:24:33  <substack>tap is 25 years old
20:24:37  <substack>at least
20:29:03  <st_luke>awesome
20:33:29  * saijanai_joined
20:35:30  * saijanai__quit (Ping timeout: 260 seconds)
20:35:47  <substack>secrets of the ancients
20:39:51  <guybrush>i like how you can drag&drop a tab in chrome from canary into dev
20:42:18  * thatguydanjoined
20:52:11  <mikeal>substack: sorry i didn't get back to you yesterday
20:52:15  <mikeal>will you be home in like an hour?
20:52:33  * ryan_stevensjoined
20:52:34  <mikeal>i wanted to interview you for a bit
20:56:59  * ryan_stevensquit (Ping timeout: 252 seconds)
21:01:51  * shuaibquit (Quit: Textual IRC Client: http://www.textualapp.com/)
21:01:52  * AvianFluquit (Remote host closed the connection)
21:08:16  <substack>mikeal: I'm home right now
21:08:24  <substack>3276 logan street
21:08:36  <mikeal>oh shit, that's right, you're in west oakland now
21:08:40  <mikeal>hrm….
21:08:41  <substack>east
21:08:42  <mikeal>maybe not today then
21:08:47  <mikeal>that's what i meant
21:12:15  <substack>isn't there a beerjs tonight in sf?
21:12:27  * jez0990_joined
21:12:32  <isaacs>YES there will be beers in sf
21:12:41  <isaacs>substack: i want your opinion on a streams2 thing. Raynos, you too.
21:12:45  <isaacs>dominictarr: and you.
21:13:01  <substack>isaacs: I saw your quandry earlier
21:13:05  <dominictarr>what is it?
21:13:06  <isaacs>substack: thoughts?
21:13:09  <substack>whatever it does it shouldn't break half-duplex
21:13:34  <Raynos>isaacs: what is the streams2 thing?
21:13:53  <isaacs>http.createServer(function(q,s){s.end('ok')}).listen(80)
21:13:57  <isaacs>so you have that server
21:14:02  <isaacs>and the user uploads some data.
21:14:10  <isaacs>SURPRISE! their request hangs and never finishes
21:14:16  <substack>s.end() should notify but not enforce the other party to stop sending
21:14:25  <isaacs>substack: too late at that point.
21:14:42  <isaacs>substack: ie, it *does*, but that doesn't matter, because the other party has already stopped sending, because the socket filled up
21:14:45  <isaacs>and TCP did what it does
21:14:48  <Raynos>isaacs: that socket should close when `q.on("finish")` happens
21:14:57  <isaacs>Raynos: cant' do that. KeepAlive.
21:14:58  <Raynos>oh wiat
21:14:59  <Raynos>feck
21:15:04  <dominictarr>why does that happen?
21:15:17  <isaacs>dominictarr: because you don't ever consume that data coming in the request body
21:15:19  <Raynos>isaas: it should close when `q.on("end")`
21:15:30  <isaacs>Raynos: q.on('end') never happens.
21:15:36  <isaacs>Raynos: because you never consume the data, so you never get to the end.
21:15:37  <Raynos>Oh
21:15:38  <Raynos>I see
21:15:40  <Raynos>you buffer end
21:15:43  <Raynos>until you consume the data
21:15:46  <isaacs>Raynos: doesn't matter.
21:15:51  <isaacs>Raynos: let's say end just hasn't been sent yet.
21:15:58  <Raynos>if the user never sends end
21:16:01  <Raynos>then it should stay open
21:16:08  <dominictarr>so the server is uploading, but the server just sends end('eee')
21:16:08  <isaacs>the user has uploaded 1G or so, and now all the buffers are full, so they're paused and waiting.
21:16:20  <isaacs>dominictarr: client is uploading, but yes.
21:16:21  <dominictarr>but the client isn't expecting to read
21:16:28  <isaacs>the server doesn't ever call req.read()
21:16:32  <dominictarr>so they don't ever get it the end
21:16:33  <isaacs>possible solution:
21:16:52  <isaacs>res.on('finish', function () { if req.data has never been called, then req.resume() so it fall on teh floor })
21:17:17  <isaacs>https://gist.github.com/4208772
21:19:33  <dominictarr>this problem seems like the client and server have a misunderstanding on whether they are duplex or not
21:19:35  <isaacs>so, if you res.end(), and it goes out on the wire, and everythign is done, and you *still* haven't consumed the request, then we basically pipe it to /dev/null
21:19:47  <isaacs>dominictarr: doesn't matter if they think they're duplex or not
21:19:57  <isaacs>dominictarr: the client thinks it can upload stuff.
21:20:01  <Raynos>isaacs: I think this is a sensible thing
21:20:09  <Raynos>the problem is that the original behaviour is bullshit
21:20:10  <isaacs>dominictarr: the server does not know it needs to read() the request, because it doesn't expect it to come in.
21:20:31  <Raynos>if your not reading it of course its going to sit in the watermarked buffer and do nothing
21:20:33  <isaacs>so we can choose between two footguns:
21:20:40  <dominictarr>so, it sounds like you want telephone schemantics here
21:20:49  <isaacs>1. if you dont do anything with the request data, then your server will behave badly to uploading clients.
21:20:58  <isaacs>2. if you don't do anything with the request data, then eventually it will be discarded.
21:21:02  <dominictarr>with half-duplex disabled.
21:21:03  <isaacs>#1 is hazardous immediately.
21:21:32  <isaacs>#2 is only a hazard if you end the response, and then *later* expect to be able to *start* consuming the request body.
21:21:49  <isaacs>and then it's on you to call req.read() at least once before ending the response.
21:22:27  <dominictarr>that doesn't seem intuitive to me
21:22:38  * ryan_stevensjoined
21:22:43  <dominictarr>why should you call read() if you don't want the data?
21:22:44  <substack>how it works presently is pretty nice
21:23:14  <Raynos>isaacs: existing users are already used to "add data listener on same tick or your fucked" so #2 isnt a new hazard
21:23:42  <isaacs>substack: yeah, i think that the #2 hazard is small enough that you're unlikely to be fuxed by it.
21:26:35  <dominictarr>what happens to the tcp connection, when you end the response, but keep it open?
21:26:41  <dominictarr>half-duplex?
21:27:09  <dominictarr>is the 'end' application level semantics, or network level semantics?
21:28:13  * fivetanleyquit (Remote host closed the connection)
21:29:48  <isaacs>dominictarr: if we're supposed to allow KeepAlives, then we leave the socket open
21:30:05  <isaacs>dominictarr: if there is another pipelined request, then we read that request, and respond to it.
21:30:17  <dominictarr>right, so that is application level then?
21:30:21  <isaacs>dominictarr: if there are no further requests pipelined on that socket, and we are not supposed to keep alive, then we destroy it
21:30:33  <isaacs>dominictarr: well. maybe :)
21:30:44  <isaacs>dominictarr: if the client supports keepalive, then it's application-level.
21:30:57  <dominictarr>you're not sending a fin packet,
21:30:58  <isaacs>dominictarr: but if the client does not support keepalive, then it's similar to res.socket.end()
21:31:22  <isaacs>dominictarr: well, we almost never send fin packets for http, because allowHalfOpen is typically false.
21:31:23  <dominictarr>so, http has it's own end semantics
21:31:32  <isaacs>dominictarr: so end is .destroy() not .shutdown()
21:31:41  <dominictarr>wtf is shutdown?
21:31:52  <isaacs>dominictarr: shutdown is the TCP-lingo for "send a FIN packet"
21:31:57  <dominictarr>oh right
21:31:58  <isaacs>dominictarr: that's the syscall
21:32:15  <isaacs>it's "bye" and stop talking, but still keep reading
21:33:02  <dominictarr>so, basically, you persuaded me when we where arguing about pipe working with half-duplex,
21:33:17  <dominictarr>that if you want to do that, you must build that into your protocol.
21:33:57  <dominictarr>ie. pipe supported telephone semantics (hangup cuts the connection, it's polite to say 'goodbye' first)
21:34:05  <isaacs>yes.
21:34:09  <isaacs>not all pipes are http
21:34:17  <isaacs>http is a funky protocol *on top of* tcp
21:34:21  <isaacs>tcp itself is much simpler, actually
21:34:37  <dominictarr>yes, so this is a question of how does http say 'goodbye'?
21:34:54  <isaacs>http generally does not say "bye"
21:35:03  <isaacs>the *client* does
21:35:05  <jjjjohnnny>does an http connection, being tcp, send a FIN packet?
21:35:22  <isaacs>but if the server finishes, and the client has not FIN'd yet, then you just hang up
21:35:25  <isaacs>because fuck the client.
21:35:25  <dominictarr>jjjjohnnny, that is abstracted
21:35:28  <isaacs>they're usually assholes.
21:36:07  <dominictarr>yeah, the server just has mormons and sales men come to his door all day.
21:36:16  <jjjjohnnny>I should be able to proxy http over TCP, correct?
21:36:19  <isaacs>a lot of servers don't even bother starting a response until the request has FIN'ed.
21:36:42  <isaacs>like, don't call the request handler until the body is saved to disk
21:37:03  <isaacs>and automatically 413 or 411 any requests that have a body that is too big (or of unknwon size)
21:37:59  <dominictarr>generally... if it's a REST server, that is pretty much how you'd do it.
21:38:47  <isaacs>right
21:39:00  <isaacs>but it's more efficient to say that certain routes ONLY support GET/HEAD, for example.
21:39:10  <isaacs>so if I see a POST, i don't even care what the data is, you go now.
21:39:30  <isaacs>405 dat ass all the way to the bank.
21:41:49  <dominictarr>... so if I go .end('string') that should set a content length header
21:41:56  <dominictarr>which the parser will understand
21:42:33  * ryan_stevensquit (Quit: Leaving.)
21:43:29  <dominictarr>right... so sales man comes to your door, you say "sorry, not interested" but he just keeps talking.
21:43:51  <dominictarr>maybe you wait a second and then shut the door in his face.
21:44:07  * thatguydanquit (Quit: thatguydan)
21:44:40  <dominictarr>but... what if you where like ... "yes, but just give me 2 min, I'm on the phone"
21:44:57  <dominictarr>and you actually want to let them in...
21:45:09  <dominictarr>then you need to read() once
21:46:02  <dominictarr>this isn't a problem with classic streams, because it doesn't assume you WANT to pipe.
21:47:03  <dominictarr>but with streams2 you must not pipe explicitly.
21:47:34  <dominictarr>which is kinda weird.
21:48:18  <dominictarr>in classic streams, you can take the phone off the hook, but not put it to your ear. just leave it there, until the caller realizes you arn't listening.
21:48:25  * wiwilliaquit (Ping timeout: 260 seconds)
21:50:33  <isaacs>dominictarr: well, no, it'd be like if you said, "Yes, i'm interested, and i'll startlistening in 2minutes, and also, i'm done talking, so bye"
21:51:36  <dominictarr>maybe it's simplest if that behavior isn't supported in http.
21:51:59  <isaacs>yes.
21:52:01  <isaacs>it's super rare.
21:52:01  <dominictarr>if you are just gonna say 'bye' wait until the other end is finished?
21:52:30  <dominictarr>it's only really protocols that will do that.
21:52:38  <isaacs>yeah
21:52:47  <dominictarr>not regular REST, http
21:52:52  <Raynos>isaacs: the "ill listen in 2 minutes and im done talking so bye" is a fuck you edgecase, dont handle it
21:53:29  <dominictarr>you arn't transfering HYPERTEXT in that case
21:53:50  <Raynos>isaacs: maybe an option to opt into the behaviour
21:55:09  <dominictarr>so... your protocol should have an 'DONE' message
21:55:30  <dominictarr>and the other end knows you arn't gonna send more.... but it doesn't close the connection.
22:05:06  * ryan_stevensjoined
22:07:36  * ryan_stevensquit (Client Quit)
22:08:41  * ryan_stevensjoined
22:15:13  <isaacs>Raynos: well, the opt-in is req.read(0)
22:15:23  <isaacs>Raynos: ie, call read() but with 0-length, so you don't actually consume any bytes.
22:15:38  <Raynos>isaacs: does that work ?
22:15:55  <Raynos>That raises the question of whether synthetic streams should respect read(0)
22:16:11  <Raynos>I mean acting the same for read(1) and read(2) is one thing but acting the same for read(0) and read(1) is another
22:16:51  <dominictarr>what is a synthetic stream?
22:17:01  <Raynos>non buffer stream
22:17:11  <Raynos>I dont have a good name for low level streams and high level streams
22:17:14  <Raynos>streams of arbitary data
22:17:24  <dominictarr>user streams?
22:17:30  <Raynos>that could work aswell
22:17:51  <dominictarr>you are talking about streams that don't actually do physical IO
22:18:01  <dominictarr>logical stream
22:19:45  <isaacs>dominictarr: he's talking about streams that don't operate on strings or buffers.
22:20:07  <dominictarr>yes
22:20:13  <isaacs>dominictarr: http streams are not doing physical IO, they're talking through a Socket object that does
22:20:24  <isaacs>dominictarr: but in a sense, they are "synthetic"
22:20:44  <isaacs>ok, so,i'm going forward with this problem.
22:21:02  <isaacs>and trying ot figure out why keepAlive is a) broken in streams2, and b) EVER WORKED AT ALL.
22:23:43  <Raynos>dominctarr: https://github.com/dominictarr/stream-combiner is SO MUCH WIN
22:23:48  <substack>isaacs: maybe everybody just expects http not to work well and so nobody noticed
22:23:55  <Raynos>dominictarr: logical stream is a good name
22:23:58  <isaacs>substack: no, it's working, but i can't figure out why
22:24:02  * thatguydanjoined
22:24:02  <dominictarr>Raynos, it's just pipeline from es
22:24:07  <isaacs>substack: the code is a god damn jungle.
22:24:11  <isaacs>it makes me curse a fucktun
22:24:15  <Raynos>dominictarr: did pipeline always bubble up all errors ?
22:24:21  <dominictarr>yes
22:25:02  <dominictarr>it makes a bunch of streams behave as a single stream.
22:30:47  <substack>https://github.com/substack/hash-join
22:32:16  <chrisdickinson>so writes on the returned object go to the first stream in the list, through each of the parts till the end, and then 'data' events from the last stream are emitted on the returned stream?
22:35:37  * defunctzombiechanged nick to defunctzombie_zz
22:51:41  * ryan_stevensquit (Quit: Leaving.)
22:56:52  <Raynos>isaacs, dominictarr: https://github.com/Raynos/transform-stream transform is a logical stream like readable-stream/transform and through. Any api suggestions?
22:58:13  <dominictarr>Raynos, you could just make it api compatible with through
22:58:29  <dominictarr>this.queue(next); this.queue(null /*end*/)
22:58:53  <Raynos>it has function (data, queue) { queue(next) queue(null) }
22:59:24  <Raynos>I dislike this.queue because it adds a queue method to returned stream
23:00:29  <dominictarr>so what? it's a subclass
23:00:50  <dominictarr>also, you may want to queue stuff from outside the function
23:01:01  <Raynos>if you want to queue stuff outside the function
23:01:06  <Raynos>use read-write-stream directly
23:01:26  <dominictarr>nah... next belongs to the stream
23:01:31  <Raynos>i.e. if you want to queue stuff outside the function use dominictarr/duplex or Raynos/read-write-stream
23:01:43  <dominictarr>you can call it multiple times per input
23:02:33  <dominictarr>if it's the same, then it's a streams2 drop in for through
23:02:33  <Raynos>yeah call it multiple times in the callback
23:03:22  <dominictarr>it's already established as an API for easy-to-write through streams.
23:03:26  <Raynos>ugh. Yeah I can do that
23:04:54  <dominictarr>follow a popular module, that is a much stronger reason than "aesthetics".
23:05:15  <Raynos>v0.2.1
23:07:59  <isaacs>Raynos: why not use stream.Transform?
23:08:11  <Raynos>isaacs: because it does all kinds of crazy buffer logic
23:08:23  <isaacs>Raynos: oh, this is for non-byte streams. right.
23:08:30  <Raynos>yes!
23:08:36  <Raynos>for byte streams use stream.Transform
23:08:46  <isaacs>ACK.
23:09:11  <Raynos>although I dont handle _flush
23:13:13  * yorickquit (Remote host closed the connection)
23:13:38  <isaacs>Raynos: it'd be good to explore what we'd have to do to make Stream.Readable good for your non-byte streams.
23:13:56  <isaacs>Raynos: we already have to handle a "string mode" in howMuchToRead()
23:14:11  <isaacs>Raynos: i don't think it'd be too crazy to handle a "generic object mode"
23:14:40  <Raynos>isaacs: probably but i'll look into that later
23:14:46  <substack>it's nice to have backpressure for non-string streams
23:14:53  <isaacs>right
23:14:53  <substack>especially for parsers
23:15:12  <Raynos>isaacs: look into porting any examples I have for read-stream / write-stream / read-write-stream
23:15:16  <isaacs>and for all the same reasons that it's nice to have a bit of buffering done in a single consistent way for bytes, it's good for other things
23:15:19  <Raynos>if they just work then #win
23:15:29  <isaacs>Raynos: a good first step would be to match the API interface exactly.
23:16:06  <isaacs>Raynos: or just go through the code in node streams2 branch, and send a patch that fixes all the spots where we look at .length or .toSTring() or whatever.
23:16:08  <Raynos>my modules don't match the readable-stream interface because they have sugar
23:16:23  <isaacs>right, but then your modules could have sugar on top of streams2, and work generically
23:16:33  <Raynos>they are
23:16:36  <Raynos>already taht
23:16:42  <Raynos>except they overwrite read / write
23:16:48  <Raynos>and dont use _read or _write or transform etc
23:16:58  <isaacs>yeah, so, that's what i'm saying
23:17:09  <isaacs>you could *just* add the sugar, but still leave the implementation to the core streams
23:17:18  <Raynos>its probably good to refactor them to use _read and _write and _transform
23:17:19  <isaacs>Raynos: except that core streams don't support non-buffer/string things
23:17:29  <Raynos>pipe supports anything
23:17:43  <isaacs>Raynos: so, the reason why i'm suggesting that approach is that i've done buffering at least 4 separate= times now.
23:18:06  <isaacs>Raynos: and i've found that it's almost guaranteed that any buffering implementation will be subtly broken unless it's tested thoroughly
23:18:17  <isaacs>Raynos: and the buffering in stream.Readable is getting that testing.
23:18:28  <Raynos>like this one: https://github.com/Raynos/read-stream/blob/master/lib/queue.js :D
23:20:44  <isaacs>Raynos: you mean that one is subtly broken, or thoroughly tested? (that's not an xor, mind you ;)
23:21:00  <Raynos>its not tested and highly likely to be subtly broken
23:21:08  <Raynos>I pushed all the "buffering" logic into that file.
23:21:13  <Raynos>for all my stream base classes
23:22:05  * ryan_stevensjoined
23:32:56  * ryan_stevensquit (Ping timeout: 252 seconds)
23:34:37  <dominictarr>Raynos, do weakmaps work in the browser?
23:34:55  <Raynos>dominictarr: Benvie/weakmap works in the browser. No garantuee about host objects and IE
23:35:04  <dominictarr>right
23:35:11  <Raynos>chrome has weakmap behind a flag and firefox has MozWeakMap
23:35:40  <Raynos>dominictarr: I mean Benvie/weakmap works in IE but if you use host objects as keys in IE it may break
23:35:58  <Raynos>just like if you touch host objects in IE, IE might crash.
23:36:09  <dominictarr>right. this is only an optimization
23:36:18  <dominictarr>the code will still work without weakmaps.
23:51:32  * ryan_stevensjoined
23:51:37  * ryan_stevensquit (Client Quit)
23:54:43  * st_lukequit