00:03:34  * dominictarrjoined
00:16:24  * mikealquit (Quit: Leaving.)
00:24:11  * mikealjoined
00:29:47  * mikealquit (Quit: Leaving.)
00:30:18  <Raynos>dominictarr: most crdt examples are broken
00:30:25  <Raynos>for example the complex todo example
00:30:30  <Raynos>does not sync between two browsers
00:30:35  <dominictarr>oh, I just need to push.
00:31:23  <dominictarr>I was doing a talk the other day, and then I suddenly realized that the examples where old, and I fixed them, but there was no internet at the time to I didn't push.
00:31:42  <Raynos>oh cool
00:31:45  <Raynos>I made a delta stream PR
00:33:06  <Raynos>https://github.com/Raynos/delta-stream#diagram
00:33:15  <Raynos>I started using my whiteboard to illustrate program flow through streams
00:34:12  <dominictarr>[email protected] !
00:34:44  <dominictarr>sweet!
00:35:56  <dominictarr>you need to write a little bit bigger,
00:36:15  <dominictarr>or move the text closer so that you can get the camera in closer.
00:40:31  <dominictarr>Raynos, just reading your delta-stream code...
00:40:57  <Raynos>it uses an inverted stream
00:41:01  <dominictarr>where does inverted.other get used?
00:41:12  <Raynos>in the observable
00:41:23  <Raynos>https://github.com/Raynos/delta-stream/blob/master/interfaces/observable.js#L68
00:42:56  <Raynos>if you have a better idea of how to do a delta stream let me know
00:45:26  <dominictarr>oh, it was ap that I wasn't familiar with
00:48:32  * ryan_stevensquit (Quit: Leaving.)
00:50:20  * AvianFluquit (Quit: AvianFlu)
00:54:56  <dominictarr>Raynos, can you create a DeltaStream from an observable?
00:55:47  <dominictarr>can I just go DeltaStream.fromObservable(crdtRow) ?
00:58:40  <Raynos>dominictarr: Yes. that's the idea
00:59:01  <Raynos>dominictarr: but crdtRow does not comply to the observable interface
00:59:16  <dominictarr>whats it missing?
00:59:19  <Raynos>I can put some logic in DeltaStream
01:00:02  <Raynos>good question
01:00:18  <dominictarr>A well defined Observable is a good idea, if Row doesn't follow it, I'll add what it needs.
01:00:31  <Raynos>https://github.com/Raynos/delta-stream/blob/master/interfaces/observable.js#L85
01:00:38  <Raynos>https://github.com/Raynos/delta-stream/blob/master/interfaces/observable.js#L81
01:01:49  <dominictarr>it has set, get & toJSON
01:02:05  <dominictarr>I don't see whats missing?
01:02:26  <Raynos>propagating the source property through
01:02:34  <Raynos>if you dont then you create infinite figure of 8 loops
01:02:53  <Raynos>a delta stream must reject incoming writes which propagated from itself
01:06:04  <Raynos>I thought about making the crdt.Row match the observable interface, it was harder then just adding a createStream function
01:08:16  <dominictarr>Raynos, got it. It shouldn't be that hard. it's just a matter of getting the source from the Doc. basically the Doc handles emitting the events, and the history and stuff
01:09:08  <Raynos>note
01:09:18  <Raynos>that no other observable like thing i know about in front end js
01:09:22  <Raynos>has this notion of source
01:09:48  <Raynos>so maybe the infinite loop problem should be solved differently
01:12:39  <dominictarr>good point. that is because it assumes that the changes are being made directly on it.
01:12:52  <Raynos>yeah almost every other observable
01:13:01  <Raynos>has no notion of syncing up observables from different streams
01:13:19  <dominictarr>or in different layers of the application.
01:13:40  <dominictarr>actually, I think this is a good idea though.
01:14:45  <dominictarr>the thing that first got me interested in this distributed realtime stuff was wanting to model observables syncronized with view observables.
01:15:18  <dominictarr>I realized that really, it should just be layers, with change events propagating from the view to the database
01:15:51  <Raynos>:D
01:15:57  <Raynos>not change events propagating
01:16:00  <Raynos>streams of deltas
01:16:05  <Raynos>pipign directly from a database
01:16:10  <Raynos>into a things into a view
01:16:20  <Raynos>and then of course events & input are just a stream of deltas
01:16:24  <dominictarr>a delta is a change event though, isn't it?
01:16:27  <Raynos>which go in reverse from a view to the database
01:16:33  <Raynos>Yeah a delta is a change event
01:16:42  <Raynos>I prefer to think in streams because streams propagate trivially
01:16:51  <Raynos>there is no eventEmitter.pipe(otherEventEmitter)
01:16:54  <Raynos>maybe I should write that
01:17:08  <dominictarr>substack wrote that the other day
01:17:14  <Raynos>emitStream(eventEmitter).pipe(emitStream(otherEventEmitter))
01:17:31  <Raynos>i dont like emitStream because it json encodes shit for me. which is like wtf
01:17:48  <dominictarr>... it uses JSONStream
01:18:08  <Raynos>I want to emit real references to real objects
01:18:19  <Raynos>emitStream is cool for cross process but silly for in process
01:18:23  <Raynos>because it destroys references
01:18:30  <Raynos>which makes it useless for implementing list-stream
01:19:06  <dominictarr>why do you need references for list-stream?
01:19:38  <Raynos>because it's useless if your crdt.Set gets an add event with JSON.parse(JSON.stringify(row))
01:19:42  <Raynos>it ruins the point
01:20:10  <Raynos>set.createListStream().pipe(sortaInstance)
01:20:16  <Raynos>thats what I'm imagining
01:20:36  <Raynos>then sorta should be a list stream that listens on add / remove events
01:24:59  <dominictarr>yeah, it still wants to beable to listen to events on the row.
01:25:44  <Raynos>exactly
01:25:51  <Raynos>which is ruined if you serialize / deserialize the row
01:25:53  <dominictarr>but maybe you want to handle this differently. I think sorta is more basic than what crdt-set is capable of.
01:26:04  <Raynos>sorta should still be a list stream
01:26:13  <Raynos>and rows in the sorta callback should be delta streams
01:26:29  <dominictarr>lets say sorta is for something like a twitter stream
01:26:46  <dominictarr>you could just have updates as new messages with a known id
01:27:08  <Raynos>:/
01:27:09  <dominictarr>and a delete is just an update where {__delete: true} is added.
01:27:13  <dominictarr>(merged in)
01:27:15  <Raynos>that ruins the point of a list stream
01:27:21  <Raynos>yes you can model a list stream as a delta stream
01:27:41  <Raynos>but a list stream is supposed to have semantic value in terms of add and remove messages
01:27:58  <dominictarr>for crdt.Seq there is alot more stuff, like reordering the stream, moving elements,
01:28:05  <Raynos>not { uuid: newAddedValue } and { thatUuid: { __delete: true } }
01:28:27  <Raynos>maybe I should model list-stream based on Seq
01:28:32  <Raynos>so you can pipe Seq into a sorta instance
01:28:39  <Raynos>and move shit around in the Seq and the sorta updates
01:28:46  <Raynos>without all the sorta bullshit of manual updates
01:28:51  <dominictarr>I don't know, maybe list-stream doesn't want to be a stream.
01:29:00  <Raynos>:(
01:29:04  <Raynos>but everything has to be a stream
01:29:11  <Raynos>how else can we compose modules
01:29:28  <Raynos>compose(seq, sorta) sucks. seq.createStream().pipe(sorta) wins
01:29:35  <dominictarr>not _everything_ is a stream.
01:29:52  <Raynos>I agree
01:30:00  <Raynos>list-stream feels harder to do, delta-stream makes sense
01:30:07  <dominictarr>the things that make sense as streams are good.
01:30:11  <Raynos>but I need some kind of way to implement compose(seq, sorta)
01:30:27  <dominictarr>but like loops, and recursion don't make sense as streams, for example.
01:30:51  <dominictarr>you wouldn't want a graph traversal stream.
01:31:21  <dominictarr>I mean, you probably could force these things into a stream... but It wouldn't make them easier to do.
01:34:52  <Raynos>I agree
01:34:57  <Raynos>but I need another way to compose things
01:35:17  <Raynos>I feel like we need more things like delta-stream and have people comply with them
01:40:04  <dominictarr>the old-fashioned way to compose things: glue code
01:41:30  <Raynos>:(
01:41:32  <dominictarr>you can use automatic glue code, if there is a class of things that have a given interface.
01:41:33  <Raynos>i dont like glue code
01:41:37  <Raynos>actually I hate glue code
01:41:48  <Raynos>thats why I like streams
01:41:54  <Raynos>the thing thats the most pain in the ass ever
01:42:08  <Raynos>is glueing other people's code when they have weird interfaces
01:42:08  <dominictarr>like, say... "taking a series of input events, and producing a series of output events"
01:42:10  <Raynos>like sorta
01:42:21  <Raynos>thats a duplex stream
01:42:24  <Raynos>or a through stream
01:42:45  <dominictarr>yeah, streams are like automatic glue
01:44:06  <dominictarr>I guess there are other patterns, too like things that are just async callbacks. but then, it's pretty rare that the result of one function is exactly what you need for the input of another.
01:45:42  <Raynos>well async callbacks are cool
01:45:47  <Raynos>when you use things like composite.async
01:45:50  <Raynos>or iterators
01:45:54  <Raynos>to glue those together
01:51:02  <dominictarr>the key is to be disiplined about being consistent, where a single interface is possible.
01:51:36  <Raynos>substack: how do you feel about making non js files in browserify just default to exportify?
01:51:59  <dominictarr>another good example is assertion functions with the actual argument first, and the optional message last
01:52:38  <Raynos>Yeah :)
01:52:43  <Raynos>and (err, data)
01:52:49  <Raynos>and callback last
01:56:39  <dominictarr>and other various event names and stuff. that is why I always copy an interface from core or a popular project if there is something close
01:56:45  <dominictarr>to what I want.
01:56:56  <Raynos>yeah thats cool
01:57:03  <dominictarr>also, then you can say "just like request" in the docs
01:57:25  <dominictarr>and reuse their documentation.
01:59:12  * wiwilliaquit (Ping timeout: 276 seconds)
02:00:30  <dominictarr>hey, catch you later! I'm off to bed
02:02:10  <Raynos>Cool
02:05:41  * dominictarrquit (Ping timeout: 276 seconds)
02:06:02  * wiwilliajoined
02:26:22  <substack>Raynos: I don't want to make browserify too different from how node works
02:26:30  <substack>since browserify is about using node modules in the browser
02:26:50  <Raynos>substack: I'm doing `require("./thing.html")` and `require("./thing.svg")`
02:26:59  <Raynos>right now it just throws a cannot find module exception
02:27:09  <Raynos>I don't think changing that exception to just doing exportify logic is bad
02:27:32  <Raynos>heck it might even be a good feature for node's require
02:27:39  <Raynos>they already have special logic for json
02:27:57  <substack>what if doing fs.readFileSync() were captured instead?
02:28:29  <substack>at the same time, I want browserify to be getting smaller, not larger
02:29:22  <Raynos>substack: https://github.com/Raynos/browserify-server/blob/master/lib/browserify.js#L94
02:29:34  <Raynos>5 lines added html & svg require support for my purposes
02:30:10  <Raynos>even just hard coding html, svg & mathml instead of anything else would be good enough
02:30:25  <substack>this should be enabled with a switch I think
02:30:32  <Raynos>agreed
02:30:57  <Raynos>but its super useful as an alternative to yarnify that doesnt do css prefixery
02:31:07  <substack>and it should be all file types not presently registered with an extension
02:32:55  <Raynos>that's fine
02:33:20  <Raynos>do you want to do it or shall I PR ?
02:33:40  <substack>you should PR it
02:34:55  <substack>--file-ext or whichevs
02:35:32  <Raynos>substack: https://github.com/substack/node-resolve/blob/master/index.js#L48 do I need to patch resolve too?
02:36:02  <Raynos>I guess I would only need that to make `require("./foo")` load foo.html
03:20:14  * wiwilliaquit (Ping timeout: 264 seconds)
03:30:21  * st_lukequit (Remote host closed the connection)
04:09:06  * ryan_stevensjoined
04:22:44  * AvianFlujoined
04:25:28  <Raynos>Crazy streams : https://gist.github.com/3474040 Are these too specific / niche to be turned into modules?
04:25:58  <substack>release first, ask questions later
04:27:57  <Raynos>they feel like application logic encapsulated in a stream
04:28:08  <Raynos>so it's like "app logic isn't a module" vs "all streams are modules"
04:29:52  <substack>an arrow keys stream seems rad
04:30:40  <Raynos>:D
04:30:56  <Raynos>maybe i should generalize that stream
04:31:06  <Raynos>Ok
04:31:10  <Raynos>gimme 5. OSing
04:31:40  <substack>var arrows = arrowStream(); process.stdin.pipe(arrows); arrows.on('up', fn); arrows.on('down', fn) ...
04:32:29  <substack>arrows could internally do .on('pipe') to check if the input source is a tty and if it is set raw mode on it
04:32:38  <Raynos>oh
04:32:43  <substack>and re-bind ^C to process.exit if there isn't already a listener
04:32:47  <Raynos>I was writing this for the browser
04:32:56  <Raynos>not for TTY
04:33:07  <substack>same code could work for both!
04:33:30  <Raynos>not really, you need something to listen on event listeners in the browser :P
04:33:50  <Raynos>but I know what you mean
04:34:00  <Raynos>I wonder whether I can create an event stream
04:34:24  <Raynos>emitStream(ever(window)).pipe(arrows)
04:34:37  <Raynos>but that would be MADNESS
04:34:54  <Raynos>substack: make `emitStream(ever(window))` just work :D
04:34:56  <substack>it would be more fitting to have a separate module that took non-data events and remapped them to 'data'
04:35:14  <Raynos>I agree
04:36:58  <substack>remapStream(ever(window), 'keydown').pipe(through(function (ev) { return Buffer([ ev.keyCode ]) })).pipe(arrows)
04:37:35  <substack>or perhaps not remapStream but dataStream
04:37:43  <substack>some such name
04:37:54  <substack>emitData
04:38:57  <substack>or wait through doesn't care about return values, substitute this.emit('data', x)
04:39:22  <substack>or mapSync does it that way
04:41:36  <Raynos>:)
04:41:43  <Raynos>yeah
04:41:59  <Raynos>is that abusing streams or writing poetry?
05:38:39  * ryan_stevensquit (Quit: Leaving.)
06:04:18  <substack>Raynos: arrow-keys should take the element you want to listen to as an optional arg
06:04:31  <Raynos>why?
06:04:47  <Raynos>I dont see the motivation for local arrow keys
06:12:10  <Raynos>substack: https://github.com/substack/sorta/issues/1
06:12:32  <Raynos>the idea is `crdtRow.createStream().pipe(sortaRow)`
06:13:49  <substack>seems good
06:14:07  <substack>I don't like the "observable" terminology though
06:14:22  <substack>too design-patterny
06:15:05  <substack>because it's an event emitter, not an "observable"
06:15:29  <Raynos>Yeah it's not a good name
06:15:32  <substack>it's not obvious what an "observable" should be and the term has lots of OOP pattern baggage from java
06:15:34  <Raynos>event emitter doesn't have enough meaning
06:15:46  <Raynos>if you know a better name feel free to
06:15:48  <Raynos>deltaEmitter ? :D
06:15:51  <Raynos>changeEmitter
06:15:55  <Raynos>changelet
06:16:28  <substack>the first too are good
06:16:34  <substack>changelet sounds a bit silly
06:16:42  <Raynos>xd
06:16:53  <substack>or just .emitter()
06:16:57  <Raynos>oh
06:17:00  <Raynos>I like that idea
06:17:02  <substack>or .createEmitter()
06:17:06  <Raynos>but I still want the get / set methods
06:17:26  <substack>.createDelta()?
06:17:35  <substack>something with delta in the name is good if it has get/set
06:17:40  <Raynos>I see
06:17:58  <substack>then people will know to expect that they get a delta object and not just a vanilla emitter
06:18:04  <Raynos>I'll go rename all references to observable to delta
06:18:09  <substack>rad
06:19:07  <substack>this would make sorta much more composable
06:24:19  <Raynos>and its done
06:24:28  <Raynos>yeah for sure.
06:24:49  <Raynos>I'm already liking delta-stream. I keep writing complex modules and then realize "hey I can represent this as a delta stream!"
06:25:21  <Raynos>https://github.com/Raynos/shooter-game/blob/master/player/index.js#L19
06:25:28  <Raynos>For example, both widget & input are delta stream compliant
06:25:50  <Raynos>So my player object is a duplex stream that emits deltas (x & y position from arrow keys) and reads deltas (x & y position to render)
06:26:23  <substack>putting delta-stream in my lxjs list
06:26:43  <Raynos>o/
06:26:52  <Raynos>i want to create a similar thing called list-stream
06:27:04  <Raynos>which represents addition and removal of a list rather then deltas of change on a thing
06:27:11  <Raynos>so you can do listStream.pipe(sorta(...))
06:27:32  <Raynos>or someCrdtSetorSeq.createStream().pipe(sorta(...))
06:27:42  <Raynos>or someListStream.pipe(someListUIThingy())
06:29:20  <substack>aren't streams already lists?
06:31:00  <Raynos>they lack removal events
06:31:08  <Raynos>{ __delete: true } or something is a hack
06:31:19  <substack>oh so delta-stream is for objects
06:31:29  <substack>and this would be for lists
06:31:34  <Raynos>yeah
06:31:39  <substack>you could just have a single 'splice' event
06:31:43  <substack>splice can do everything
06:31:43  <Raynos>although I dont know how to make list stream work
06:31:50  <Raynos>splice can?
06:32:00  <substack>splice can do inserts and deletes
06:32:17  <substack>at the same time even
06:32:20  <Raynos>well Ideally I want a stream format of crdt.Seq
06:32:21  <substack>in fact you might as well just call it splice-stream
06:32:32  <Raynos>yeah splice stream makes sense
06:32:38  <Raynos>I will look into that later
06:32:46  <Raynos>then sorta doesn't have to do sorting logic :P
06:32:53  <Raynos>it just has to accept splice events
06:32:56  <Raynos>and re-order the DOM
06:33:09  <substack>> var xs = [10,2,3,40]; xs.splice(1,2,20,30); xs
06:33:09  <substack>[ 10, 20, 30, 40 ]
06:33:34  <substack>yep!
06:33:44  <substack>but something would need to handle generating the splice stream
06:33:56  <substack>sort-stream
06:34:31  <substack>takes a cdrt stream of updates and an optional comparison function, returns an ordered splice stream
06:34:47  <Raynos>well
06:34:51  <Raynos>cdrt.Seq
06:34:55  <Raynos>is a sorted sequence of things
06:35:13  <substack>aha awesome
06:35:20  * substackneeds to mess with cdrt more
06:35:41  <Raynos>yeah :)
06:35:51  <substack>really starting to look like all the guts of a streaming data-bound realtime system are all here
06:35:53  <Raynos>but thanks for the splice-stream idea
06:36:09  <Raynos>substack: Did I show you discovery-network ?
06:36:29  <substack>the hard part will be building higher-level abstractions that tie these lower-level abstractions together
06:36:36  <Raynos>Its the p2p component of the streaming data-bound realtime p2p system
06:36:46  <Raynos>nah
06:36:54  <Raynos>tieing the lower level abstractions together is trivial
06:36:57  <Raynos>you just pipe them
06:36:59  <Raynos>PIPE ALL THE THINGS
06:37:15  <substack>discovery of all these modules is difficult
06:37:27  <substack>requires making youtube vids about how to tie them all together
06:37:29  <Raynos>Agreed
06:37:34  <substack>and blog posts
06:37:41  <Raynos>I recommend they just come in here
06:37:43  <substack>stream handbook
06:37:43  <Raynos>and ask how to do it
06:37:46  <Raynos>or read the source code
06:37:49  <Raynos>of some of my apps
06:38:10  <Raynos>https://github.com/Raynos/dn-leaderboard/blob/master/package.json#L19 https://github.com/Raynos/shooter-game/blob/master/package.json#L19
06:38:12  <substack>should have a stream-handbook project on github for all of these
06:38:16  <Raynos>package.json is the discovery mechanism
06:38:37  <Raynos>I did the same with npm-www & isaacs.
06:38:44  <Raynos>I read his dependencies list and looked every single one up
06:38:53  <Raynos>did the same with the dependencies of express & connect
06:39:27  <substack>should put something in the stream handbook about that
06:47:02  <Raynos>yeah
06:47:23  <Raynos>http://4866.localtunnel.com/
06:47:27  <Raynos>Primitive collision detection ftw
06:47:49  <Raynos>Collision detection get. Next shooting & multiplayer
06:48:42  <substack>nice
06:49:57  <Raynos>multiplayer should be trivial once I put all the delta-streams into a crdt doc and synchronize those with discovery network
06:50:07  <Raynos>that should be like 10 minutes of code
07:25:31  <substack>https://github.com/substack/stream-handbook
07:26:52  <substack>initial outline
07:39:03  <Raynos>substack: nice
07:39:06  <Raynos>incoming PR with more streams
08:04:16  <Raynos>substack: https://github.com/substack/stream-handbook/pull/1
08:04:35  <Raynos>Create issues on the stream handbook and assign them to me for modules you want me to write a few paragraphs about
08:05:47  <substack>ok
08:06:16  <substack>I was just going to write a few to set the tone and pattern first
08:06:23  <substack>then other people can help fill them in
08:06:32  <substack>working on the intro
08:35:30  * mikealjoined
09:01:24  <substack>first pass at the introduction done https://github.com/substack/stream-handbook
09:01:55  * substacktook the time to make it short
09:13:02  <Raynos>I see
09:51:49  * thatguydanjoined
09:53:49  <substack>added some blurbs
09:53:59  <substack>ideally I'd like every section to have an example
09:59:05  <substack>Raynos: I don't see how "stream abstractions" is distinct from "control streams"
09:59:21  <substack>how about "meta streams"?
10:00:07  <Raynos>substack: stream abstractions are things taht dont actually create streams
10:00:12  <Raynos>they are functions
10:00:14  <Raynos>that act on streams
10:00:18  <Raynos>but dont return new streams
10:00:22  <Raynos>nor are streams themself
10:02:33  <Raynos>for example the stream router
10:02:45  <Raynos>is simple a function which you pass the mux demux's connection listener
10:02:54  <Raynos>and then it calls your functions you registered for routes with the stream
10:04:26  <substack>calling it meta stream anyways
10:04:39  * substackmad with power
10:05:45  <substack>and with science
10:05:46  <substack>mad science
10:11:48  <Raynos>i want more mad science
10:12:00  <Raynos>mad science nodeup
10:12:05  <Raynos>whens the next one?
10:24:02  * thatguydanquit (Remote host closed the connection)
10:24:14  * thatguydanjoined
10:25:11  <substack>every sunday now?
10:25:16  <substack>except when they're not
10:29:26  <Raynos>i mean whens the next nodeup whoms topic is mad science
10:29:35  <Raynos>because I have a few mad science projects
10:38:13  * dominictarrjoined
10:43:09  * dominictarrquit (Ping timeout: 245 seconds)
11:32:29  * dominictarrjoined
11:46:30  <substack>dominictarr: https://github.com/substack/stream-handbook
11:48:03  <dominictarr>NICE INTRO
11:49:14  <dominictarr>stuff like this: https://github.com/dominictarr/stream-spec/blob/master/states.markdown
11:49:37  <dominictarr>isn't entirely happing sitting inside stream spec
11:50:36  <dominictarr>there is an important distinction between Through/Filter streams, and duplex streams.
11:50:50  <dominictarr>I've been meaning to write something up about this
11:52:18  <dominictarr>I'd call state streams "state replication streams"
11:54:19  <dominictarr>or maybe separate into streams that end in a high level api as a group, containing remote events, crdt, dnode, etc.
11:56:40  <substack>could link to that
12:04:58  <substack>reworded second paragraph
12:20:34  <dominictarr>substack, https://gist.github.com/3478356
12:29:43  * dominictarrquit (Read error: Connection reset by peer)
12:30:47  * dominictarrjoined
12:34:17  <substack>neat
12:34:22  <substack>I can draw pictures of those
12:35:05  <dominictarr>cool, even with a meat grinder?
12:35:10  <substack>yep
12:35:26  <substack>imagery is good for conveying metaphors
12:35:45  <dominictarr>aaand some guy in a bowler hat and suit talking to some wacky lunatic on the phone
13:16:51  <dominictarr>substack, do you think it would be possible to detect statically whether a function mutates it's arguments?
13:19:16  <substack>you could catch some instances
13:19:59  <substack>but it would be impossible to catch all of them
13:48:28  <dominictarr>of course, there eval could break it. but eval should not be used in that way.
13:50:15  <dominictarr>if the function in question calls a method on an argument that mutates that object, then that is a separate thing - it's not as bad, because, like assigning an event listener via on(even, ...) is part of the api of that object.
14:05:38  <substack>it's easier to trick than eval
14:05:49  <substack>you could trick it by just passing references around
14:06:10  <substack>with computed key names
14:06:47  <substack>it would be somewhat possible to track static references but impossible to track mutations from dynamic keys and expressions with references as resulting values
14:16:01  <dominictarr>I'm interested of a way to detect what rich hickey calls "complecting" in this talk:
14:16:42  * simcop2387quit (Excess Flood)
14:17:27  <dominictarr>http://t.co/WeumP1uZ
14:17:37  <dominictarr>http://www.infoq.com/presentations/Simple-Made-Easy/
14:17:50  * simcop2387joined
14:18:49  <dominictarr>"complect" means wrap. basically, it's about measuring how often modules touch each other.
14:34:53  * st_lukejoined
14:40:22  * wiwilliajoined
14:43:51  * dominictarrquit (Ping timeout: 240 seconds)
15:44:29  * dominictarrjoined
15:54:11  <dominictarr>Raynos, https://gist.github.com/3481264
16:00:01  * dominictarrquit (Ping timeout: 268 seconds)
16:53:20  * dominictarrjoined
17:29:20  * dominictarrquit (Ping timeout: 276 seconds)
18:16:25  * st_lukequit (Remote host closed the connection)
18:19:23  <guybrush>http://youtu.be/VO--VXFJnmE JavaScript Object.observe proposal
18:31:28  * mikealquit (Quit: Leaving.)
19:34:06  * wiwilliaquit (Ping timeout: 260 seconds)
20:08:25  * st_luke_changed nick to st_luke
20:16:49  <Raynos>dominictarr: https://gist.github.com/3483305
20:32:29  <Raynos>substack: you too ^ We need some more thoughts about splice stream
20:49:14  * niftylettucequit (Max SendQ exceeded)
20:50:22  * niftylettucejoined
20:58:28  * wiwilliajoined
21:18:22  <substack>jesusabdullah: confirmed the existence of a 6th mouse
21:19:08  <Raynos>substack: https://gist.github.com/3483629
21:29:15  <substack> excellent!
21:30:57  <Raynos>recommendations on the high level abstractions would be appreciated before I go implement the thing
21:31:18  <Raynos>The way I see it a splice-stream is a stream represenation of the lifetime of an array, and a delta stream is a stream representation of the lifetime of an object
21:31:35  <Raynos>the pain point is figuring out how to cleanly sink initial state
21:33:04  <substack>there should also be a lib that does what crdt.Seq does
21:33:09  <substack>sort-stream
21:33:22  <Raynos>I agree
21:33:42  <substack>takes an unordered list stream and returns an ordered splice stream
21:33:50  <Raynos>I agree
21:48:49  <AvianFlu>A SIXTH MOUSE!?!??!?!?
21:49:15  <AvianFlu>LOUDBOT: twitlast
21:49:16  <LOUDBOT>AvianFlu: http://twitter.com/loudbot/status/239841731175141376 (/)
21:56:28  <Raynos>Ok I shall write splice & sort stream
22:02:27  * mikealjoined
22:05:10  * st_lukemade a shirt: http://teespring.com/sedawkgrepvim
22:21:56  <LOUDBOT>jesusabdullah: TELL THEM, "BITCH BE COOL"
22:22:11  <jesusabdullah>Yeah, see substack? It's cool, destroying vermin TOTALLY worth it
22:22:39  <jesusabdullah>(I wouldn't kill mice with fire, that's reserved for spiders)
23:02:03  * dominictarrjoined
23:06:07  <substack>Raynos: another idea I had
23:06:37  <substack>is to rename sorta to ordered-elements
23:06:38  <Raynos>go
23:06:42  * dominictarrquit (Ping timeout: 256 seconds)
23:06:47  <Raynos>it would be better
23:06:53  <Raynos>I think sorting should be done in a sort-stream
23:06:55  <substack>and it would handle ordered elements from a splice stream
23:06:57  <substack>yes
23:07:03  <Raynos>spliceStream.pipe(sortStream).pipe(orderedList)
23:07:10  <substack>and then sorta would just be a tiny shim that does a sort-stream in front of ordered-elements
23:07:42  <Raynos>the difficult part is that callback function for ordered elements
23:07:54  <Raynos>orderedElements returns a stream that's easy
23:11:48  <Raynos>I think the callback function should be a createStream function
23:12:06  <Raynos>and then you should assume that people add and remove delta streams from the splice stream
23:15:26  <substack>I don't see how that would work
23:15:43  <substack>sorta needs to have a callback to create new elements
23:15:51  <substack>because new elements will show up in the splice stream input
23:16:38  <substack>and element wrappers should expose raw dom nodes
23:16:51  <substack>because otherwise it's up to the element wrapper to implement EVERYTHING that the dom can do
23:16:57  <substack>which really hurts reuse
23:17:08  <substack>because it puts way too much pressure on the wrappers to do everything that the dom already does
23:17:37  <substack>I guess it could check for the presence of some functions maybe though
23:17:53  <substack>to handle insertBefore and whatever if you don't want to return a dom node
23:18:10  <substack>seems much simpler to just have dom handles though
23:18:29  <Raynos>I agree
23:18:49  <Raynos>well
23:18:55  <Raynos>What I think is cleanest
23:18:56  <Raynos>is a single appendTo method
23:19:01  <substack>not enough!
23:19:03  <Raynos>and generating a div wrapper for the widget
23:19:06  <substack>that's not possible
23:19:07  <Raynos>then you manipulate the div
23:19:12  <substack>appendTo is the wront direction
23:19:18  <Raynos>not really
23:19:22  <Raynos>widget.appendTo(wrapperDiv)
23:19:23  <substack>so with sorta
23:19:25  <substack>no!
23:19:42  <substack>sorta needs to move around the elements that you create
23:19:45  <substack>not the other way around
23:19:51  <Raynos>?
23:19:52  <substack>oh wait
23:19:57  <Raynos>sorta moves around the wrapper div
23:20:01  <Raynos>your element just lives in the wrapper
23:20:04  <substack>aha I get what you're saying now, sorta creates the wrapper divs
23:20:08  <substack>aha got it
23:20:24  <Raynos>then you just need to return a widget with an appendTo method
23:20:28  <substack>that does make styling more difficult
23:20:31  <Raynos>I dont mind standardizing appendToWidgets
23:20:40  <Raynos>not really
23:20:51  <Raynos>if they want to
23:21:03  <substack>setting the display to inline-block for instance
23:21:08  <Raynos>sorta({ element: "ul", wrapper: "li" }, createWidget)
23:21:11  <substack>if you want horizontal sorted elements
23:21:27  <Raynos>just allow them to specify what kind of wrapper / element they want and default to divs
23:21:52  <substack>they could pass in an element themselves
23:21:54  <Raynos>ill write sorted elements myself once im done with splice stream
23:21:56  <substack>and I could call .cloneNode()
23:22:04  <substack>sorta(div, createWidget)
23:22:18  <Raynos>meh, I dont see why "ul" or "li" is bad
23:22:24  <substack>`div` could also be a string
23:23:10  <substack>not so obvious which one the element refers to and which one the wrapper refers to
23:24:23  <Raynos>{ element: "ul", wrapper: "li" }
23:24:26  <Raynos>options hash
23:24:30  <substack>yes but
23:24:36  <Raynos>yeah it needs documenting
23:24:41  <substack>`wrapper` could mean the outer countainer or the inner
23:24:47  <Raynos>{ list: "ul", item: "li" }
23:24:58  <substack>I like `inner` and `outer`
23:26:06  <Raynos>works too
23:27:06  <substack>I see what you mean though
23:27:15  <substack>the ul/li case is especially good
23:29:24  <substack>so opts.inner and opts.outer should either be string names or '<ul>' strings or dom elements
23:29:31  <substack>I like this
23:29:54  <Raynos>i would go for string names or dom elements
23:30:01  <Raynos>a string name to pass to document.createElement
23:30:03  <substack>yeah good plan
23:30:10  <Raynos>none of the <ul> trollery :D
23:30:30  <Raynos>also for the list dom element, dont clone it
23:30:32  <Raynos>just use it.
23:30:47  <Raynos>that way I can tell you "that is your wrapper"
23:31:01  <Raynos>then I also dont have to call sortaInstance.appendTo(myownWrapper)
23:31:09  <Raynos>I just do sorta({ list: myOwnWrapper })
23:31:11  <substack>oh list/item is good, I like that better than inner/outer
23:32:29  <substack>that wouldn't work without cloning
23:32:43  <substack>because the content would just go into the same dom element
23:32:55  <Raynos>Well
23:32:57  <substack>it could perhaps be a function instead
23:32:58  <Raynos>item would need to be cloned
23:33:01  <Raynos>but list is a single list
23:33:05  <substack>ah yeah agreed
23:33:54  <Raynos>cloning is nice
23:34:01  <Raynos>because then I can put class attributes on it
23:34:07  * thatguydanquit (Quit: thatguydan)
23:34:30  <substack> sorta $ git checkout -b splice
23:34:35  <Raynos>sorta({ item: Element("<li class='list-item'>") })
23:34:52  <substack>splice stream not on npm yet >_<
23:35:00  <Raynos>I know!
23:35:02  <Raynos>I'm working on atm
23:35:06  <substack>sweet!
23:35:12  <substack>I'll hack up the new sorta once it goes up
23:35:20  <substack>for now hacking up testling-ci stuff
23:35:37  <substack>need browser badges for all these projects
23:38:25  * thatguydanjoined
23:39:34  <Raynos>substack: https://github.com/Raynos/splice-stream
23:39:44  <Raynos>thats the protocol
23:39:48  <Raynos>I need to implement the list interface
23:39:51  <Raynos>so you can use the damned thing
23:39:59  <Raynos>but I tend to use splice & delta streams with the protocol directly
23:40:25  <substack>hooray!
23:41:30  <Raynos>make sure to use 0.0.2 though
23:43:27  <Raynos>the annoying question is how do you sync splice & delta streams?
23:43:46  <Raynos>maybe there should be a flag
23:46:41  <Raynos>thinking about it
23:46:54  <Raynos>sorted elements should pass the element added straight to the widget function
23:47:34  <substack>(row, element)
23:48:02  <Raynos>Oh
23:48:07  <Raynos>No I didnt mean element
23:48:09  <Raynos>I meant item
23:48:18  <Raynos>splice stream emits splicing items in and out of the array
23:48:20  <Raynos>(item)
23:48:22  <Raynos>or row if you want
23:48:36  <Raynos>but it should be the thing passed into splice stream and not some custom sorta row object
23:50:08  <Raynos>substack: https://github.com/dominictarr/crdt/blob/master/example/complex/sets.js
23:50:19  <Raynos>take a look at what dominic does with his seq for a sorted list
23:50:28  <substack>each row should be able to inspect its index is the only thing
23:50:35  <substack>since we can remove the key stuff
23:50:35  * thatguydanquit (Quit: thatguydan)
23:50:50  <substack>and rows should emit events still I think
23:50:54  <substack>that's pretty useful
23:51:05  <Raynos>well I'm thinking a row is a delta stream
23:51:13  <substack>oh!
23:51:15  <Raynos>that's how I plan to use it
23:52:06  <substack>sounds good
23:52:21  <Raynos>but this needs more thought