00:03:54  <Raynos>Streams are a framework
00:06:52  * dominictarrjoined
00:07:21  <maxogden>theres a difference between a single prototype and a framework
00:09:34  <dominictarr>hmm, testing it nod.
00:10:26  <dominictarr>every application contains an implicit framework. like every building contains a frame.
00:10:48  <dominictarr>a framework is just when you refactor the structure out of an application.
00:17:37  <dominictarr>Raynos, my mistake, it wasn't a bug. anyway there is a test for it now...
00:18:43  <Raynos>dominictarr: ? what bug ?
00:19:10  <Raynos>maxogden: I mean framework as in a framework gives you like a structure thing
00:19:15  <dominictarr>Raynos, I thought it didn't emit 'end' according to allowHalfOpen.
00:19:17  <Raynos>streams dominate my structure
00:19:52  <Raynos>maxogden: better yet. A framework gives you a cohesive way to put all your pieces together and they work well with each other. Streams give you a cohesive way to put all your pieces together and they work well with each other
00:20:43  <dominictarr>streams are like the knobs on duplo blocks.
00:21:11  <Raynos>:D
00:29:01  <dominictarr>templates, html, all that stuff is like coloring in with crayons.
00:32:53  <dominictarr>Raynos, maxogden I wrote this today: https://github.com/dominictarr/stream-spec/blob/master/api-style.markdown
00:33:09  <dominictarr>^ my thoughts on the best patterns for streamy apis.
00:34:06  <tanepiper>anyone know a good xml -> JSON parser?
00:37:12  <Raynos>dominictarr: https://github.com/Raynos/auth-stream#example-client
00:37:19  <Raynos>You say passing a stream to a function is bad
00:37:27  <Raynos>how would you recommend refactoring that client
00:38:09  <dominictarr>what does Auth to the stream?
00:38:24  <dominictarr>does it write/read data to/from it?
00:38:51  <Raynos>it writes a login message
00:38:55  <Raynos>and reads the error / success message
00:39:00  <Raynos>then it turns into a dumb pass through
00:40:07  <Raynos>you can always manually write the login message
00:40:13  <Raynos>I should add an example of doing just that
00:40:35  <Raynos>https://github.com/Raynos/auth-stream#example-server the server also decorates a stream
00:40:38  <dominictarr>it looks like there is a bug there.
00:41:06  <Raynos>i dont think there is, but probably there is a bug somewhere in my code right now
00:41:32  <dominictarr>you are depending that your chunk with the auth message remains intact.
00:41:59  <Raynos>dominictarr: yes I am. that is a bug. I don't know how to handle that other then dont write to it until its open
00:42:07  <dominictarr>like, if tcp decides to chuck it larger, then it would break.
00:42:36  <dominictarr>basically you are just making a custom header.
00:43:02  <dominictarr>you just need a way to delimit the end of the header.
00:43:18  <dominictarr>like, match the first line.
00:43:35  <Raynos>i see
00:44:03  <dominictarr>here is some code that does that https://github.com/dominictarr/badass/blob/master/index.js#L26-52
00:46:01  <substack>I use jsonstream all the time
00:46:48  <substack>selection synatx is so nice
00:48:23  <dominictarr>different strokes for different folks... YAY FOR MODULES
00:48:50  <Raynos>i hate debugging streams
00:48:56  <Raynos>I have no idea wtf is going on
00:52:55  <dominictarr>I like to try and make them so that they work synchronously, if you use them like that.
00:53:19  <dominictarr>it makes it much easier to be exact about orders when testing.
00:53:31  <substack>dominictarr: also reading your api doc, emit-stream could use pipes conceivably
00:53:36  <dominictarr>it's mainly about getting the orders about events right.
00:54:07  <substack>var ev = stream.pipe(emitStream())
00:54:10  <dominictarr>you could go emitstream().pipe(stream)
00:54:13  <substack>ev.on('ping', fn) etc
00:54:37  <substack>yes
00:55:01  <substack>I do like the symmetry of a function that toggles the type of the argument though
00:55:06  <dominictarr>but you'd still need to pass in the eventEmitter though
00:55:19  <substack>yep in order to hack at .emit
00:55:26  <dominictarr>yeah, I think in this case, the symmetry is a better win.
00:55:41  <dominictarr>because it's consistent with it's own idea of itself.
00:55:52  <dominictarr>and _that_ trumps everything.
00:56:16  <substack>it's easiest to explain the api this way
00:56:29  <substack>if you give it an emitter, it gives you a stream and vice-versa
00:56:41  <substack>all you need to know to start using it
00:56:43  <dominictarr>being consistent with your own idea of your self is like, the key to good designs in anything.
00:57:39  <substack>versus if you give it an emitter it returns a readable stream but otherwise it returns a writable stream that is also an event emitter
00:57:53  <substack>the second one is harder to keep in my head for some reason
00:58:05  <dominictarr>agreed.
00:58:31  <dominictarr>it's deff more elegant this way.
00:58:50  <substack>aha I think I know why
00:59:14  <substack>usually explaining things in terms of streams is more terse because you get to talk at a higher level
00:59:37  <substack>but in this case because the concept challenges some fundamental precepts of streams it's not as good a fit
00:59:46  <Raynos>auth-stream will need some work
01:00:05  <Raynos>to be able to pipe them
01:00:50  <substack>in the case of duplex-stream there's just no other way to do that
01:02:18  <substack>it's pretty crazy to think about how little there is in the actual streaming code in core but how wide the applications are for consistent interface design
01:03:03  <dominictarr>that is a very good omen.
01:03:18  <substack>a prototype function with a single method pipe that evolved from sys.pump()
01:03:44  <dominictarr>it's a pretty old idea though
01:04:18  <substack>which was itself just a way of handling backpressure logic with .write() and 'drain' on emitters that did the stream-esque 'data'/'end' thing
01:04:35  <substack>yep it's nearly identical to how the shell does pipes
01:05:48  <substack>what are those jackhammers even doing in the middle of the street
01:07:53  <dominictarr>somewhere I found a memo where some guy in the 1958 is like 'we need some sort of data processing thing that we and snap programs together like a garden hose"
01:10:37  <dominictarr>here it is http://cm.bell-labs.com/who/dmr/mdmpipe.html
01:11:03  <dominictarr>Douglas McIlroy
01:14:52  <dominictarr>I'm off to bed! catch you guys later!
01:15:09  * dominictarrchanged nick to dominic_zzzzzzzz
01:18:01  <substack>"Doug has been explicit in saying that he very nearly exercised managerial control to get pipes installed."
01:18:41  <substack>using this in my lisbon talk!
01:19:48  * dominic_zzzzzzzzquit (Ping timeout: 276 seconds)
01:24:13  <substack>jesusabdullah: the 3rd mouse's name is Higgs
01:24:25  <substack>on account of being elusive
01:25:50  <substack>the the trap is the the large mousedrop collider
01:25:55  <substack>s/the the/the/
01:33:33  * substackbikes up to berkeley to hack up a code shape module
01:39:29  * ryan_stevensquit (Quit: Leaving.)
02:02:38  * substackstill at home
02:20:28  * ryan_stevensjoined
02:34:17  * mikealquit (Quit: Leaving.)
03:48:11  <substack>isaacs: neat how the new npm site shows downloads
03:51:46  <Raynos>substack: graph stream is super sweet
03:53:27  <substack>a module to do line graphs would be rad too
04:08:28  <Raynos>yeah
04:08:31  <Raynos>I first need
04:08:34  <Raynos>to write a cached event emitter
04:08:39  <Raynos>and open source this login widget
04:08:56  <maxogden>see also https://github.com/tmcw/stream-statistics
04:46:57  * blakmatrixpart
05:37:11  * ryan_stevensquit (Quit: Leaving.)
06:16:57  * AvianFlujoined
06:34:55  * timoxleyjoined
06:49:44  * timoxleyquit (Quit: Computer has gone to sleep.)
06:50:14  * timoxleyjoined
08:15:27  <substack>maxogden: sweet
08:15:39  <substack>I like streams.
08:43:38  <Raynos>Im going to build a stream game this weekend
08:43:42  <Raynos>a bullet is just a stream
08:43:52  <Raynos>when you want it to hit someone you pipe it into a human
08:44:27  <Raynos>that doesnt work nor does it make any sense
08:45:30  * timoxleyquit (Quit: Computer has gone to sleep.)
09:10:41  * AvianFluquit (Quit: AvianFlu)
09:14:37  * mikealjoined
09:17:55  * timoxleyjoined
09:34:36  <substack>I wish esprima was streaming
09:34:43  <substack>no time for that right now though
10:01:16  * dominic_zzzzzzzzjoined
10:12:18  * dominic_zzzzzzzzquit (Ping timeout: 268 seconds)
10:19:33  <substack>ls
10:19:35  <substack>haha
10:40:46  * dominic_zzzzzzzzjoined
10:59:30  * dominic_zzzzzzzzchanged nick to dominictarr
11:39:50  <substack>https://github.com/substack/code-art
11:40:08  <substack>for my jsconf.eu talk
11:48:15  <substack>ok that part done, now hacking on ci
11:59:47  * AvianFlujoined
15:17:19  * wiwilliajoined
15:27:21  * st_lukejoined
16:00:25  * st_lukequit (Remote host closed the connection)
16:09:32  * AvianFluquit (Quit: AvianFlu)
16:48:51  * dominictarrquit (Ping timeout: 244 seconds)
17:42:30  * AvianFlujoined
17:50:21  * AvianFlu_joined
17:52:24  * AvianFluquit (Ping timeout: 244 seconds)
17:52:24  * AvianFlu_changed nick to AvianFlu
18:17:35  * mikealquit (Quit: Leaving.)
18:35:26  * mikealjoined
18:54:54  * AvianFluquit (Ping timeout: 265 seconds)
19:01:54  * wiwilliaquit (Ping timeout: 276 seconds)
19:12:25  * dominictarrjoined
19:26:40  * wiwilliajoined
19:36:46  * mikealquit (Quit: Leaving.)
20:05:14  * wiwilliaquit (Ping timeout: 264 seconds)
20:09:01  <dominictarr>wow! hey guys check out this place I found on airbnb
20:09:07  <dominictarr>https://www.airbnb.com/rooms/542031
20:21:21  * ryan_stevensjoined
20:25:40  <jesusabdullah>substack: caught mouse 4/? (already released into the wild)
20:31:00  * AvianFlujoined
20:40:31  * timoxleyquit (Quit: Computer has gone to sleep.)
21:03:35  * wiwilliajoined
21:28:08  * dominictarrquit (Ping timeout: 276 seconds)
22:10:10  <rook2pawn>that looks like a very nice box
22:14:08  <Raynos>dominictarr: I'll make a PR later to turn crdt.Row into a delta-stream ( http://github.com/Raynos/delta-stream ). I'll give a demo of why that is super awesome later as well
22:51:22  * AvianFlu_joined
22:54:36  * AvianFluquit (Ping timeout: 276 seconds)
22:54:37  * AvianFlu_changed nick to AvianFlu
22:58:28  * AvianFlu_joined
23:01:53  * AvianFluquit (Ping timeout: 272 seconds)
23:01:53  * AvianFlu_changed nick to AvianFlu
23:18:19  <Raynos>Now streaming interface: https://github.com/Raynos/data-bind#example
23:34:00  * mikealjoined
23:51:33  * st_lukejoined