00:09:03  <Raynos>isaacs: emitting a function to call is bad
00:09:20  <Raynos>emit("remote invoke", args, callback) is a bad pattern
00:26:19  <isaacs>Raynos: i dunno. probably some use case for it
00:26:45  <isaacs>Raynos: i mean, there are some use cases for emit('something', someFunction)
00:26:48  <Raynos>isaacs: `emit("remote invoke", args, callback)` vs `remote.invoke(args, callback)` the latter is always better
00:26:55  <isaacs>Raynos: we do emit('newListener', handlerFunction) in node.
00:27:24  <Raynos>isaacs: true, but that's emitting a function as a value rather then a function with the intend that the listener calls it
00:27:30  <isaacs>right
00:27:39  <isaacs>so, that's one use case
00:27:55  <isaacs>but i mean, there's probably some case where emit('some-event', pleaseCallThisFunctionSomeTime) is probably valid
00:28:58  <Raynos>meh, I can probably refactor that into `obj['some-method'](pleaseCallThisFunctionSomeTime)
00:29:42  <isaacs>Raynos: sure but that's not an argument for or against anythign
00:29:58  <isaacs>Raynos: you can refactor javascript into ruby, doesn't mean you always should.
00:30:04  <Raynos>._.
00:30:13  <Raynos>why wyould you ever refactor js into ruby
00:31:25  <isaacs>what i'm saying is, events and callbacks are capable of doing one anothers' jobs, just like functional programming and oop are.
00:31:37  <isaacs>but that misses the point: one isn't necessarily always better.
00:32:03  <isaacs>if i'm giving you a function, maybe i do want you to call it. ruling out patterns categorically shouldn't be something we do lightly
00:32:06  <Raynos>I just think encoding a method name as an event is bad
00:32:27  <Raynos>but your right
00:32:32  <Raynos>it can be valid
00:32:37  <Raynos>if the event emitter is just a dumb proxy
00:32:53  <Raynos>isaacs: why you wise ._.
00:35:12  <isaacs>sure, or maybe the event emits a thing that there's a new bunch of subscribers >=1, and whatever you pass into that method will get sent to them all.
00:35:15  <isaacs>i dunno
00:35:19  <isaacs>there's a lot of potential programs out there.
00:35:32  <isaacs>many many integers that can be run as javascript
00:54:29  * mikealjoined
00:54:52  * ryan_stevensjoined
01:00:34  * _sorensenjoined
01:01:11  <niftylettuce>isaacs: which version of node would be most compatible with ARM you think?
01:01:18  <niftylettuce>isaacs: e.g. an overo sands
01:01:58  <niftylettuce>not sure if there is an answer, but just curious if u had thoughts towards it
01:03:54  <substack>infinitely many
01:06:36  * mikealquit (Quit: Leaving.)
01:18:01  <substack>but at least countably many
01:23:59  * tilgoviquit (Remote host closed the connection)
01:31:22  * timoxleyquit (Quit: Computer has gone to sleep.)
01:32:29  * ryan_stevensquit (Quit: Leaving.)
01:41:26  <substack>go go gadget mux-demux
01:42:48  <substack>isaacs: new thing: npm is the "go go gadget" of inspector gadget
01:46:36  * thatguydanjoined
01:56:05  * wiwilliaquit
01:58:47  * tilgovijoined
01:59:58  * ryan_stevens1joined
02:29:06  <maxogden>substack: http://www.onepiecewallpaper.net/images/wallpapers/One-Piece-Brook-170356.jpeg
02:47:29  * joshwnjquit (Quit: ERC Version 5.3 (IRC client for Emacs))
03:17:17  <Raynos>substack: b.register(".html", handleHtml) doesn't work
03:21:40  <Raynos>the function gets called
03:21:44  <Raynos>but the code is never added to the bundle
03:22:46  * simcop2387quit (Excess Flood)
03:22:53  * simcop2387joined
03:26:28  * mikealjoined
03:37:19  * AvianFlujoined
03:41:28  <substack>Raynos: do you return a string?
03:51:54  <Raynos>substack: https://github.com/substack/node-browserify/blob/master/lib/wrap.js#L160
03:51:59  <Raynos>that syntax error never bubbled up
03:52:10  <Raynos>i forgot to handle new lines cleanly
03:53:02  <substack>you need to listen for it explicitly
03:53:14  <Raynos>substack: document that
03:53:19  <substack>it is documented
03:53:28  <Raynos>;_;
03:53:50  <Raynos>blarg
03:53:57  <substack>it's in doc/methods.markdown
03:54:07  <Raynos>> If you don't listen for this event, the error will be printed to stderr.
03:54:09  <Raynos>lies
03:54:11  <Raynos>vicious lies
03:54:12  <substack>future versions of browserify will ditch the middleware and then I can just emit 'error'
03:54:23  <substack>oh right that used to be true
03:54:37  <substack>at one point it was true and then at some other point it stopped being true
03:54:51  <substack>silence is golden
03:55:29  <Raynos>substack: `verbose: true` appreciated
03:55:43  <Raynos>people who build browserify extensions will love you for it
03:56:05  <substack>people probably should use the api less
03:56:08  <substack>they use it too much already
03:56:15  <substack>need to delete some features
03:56:29  <Raynos>substack: https://gist.github.com/2321202ce8df9919ef19
03:56:48  <Raynos>substack: how do I inject env into a browserify bundle cleanly?
03:58:47  <substack>try bundle.prepends.push('process.env=' + JSON.stringify(process.env) + '\n')
03:59:12  <substack>or you could use a prefilter
04:01:07  <Raynos>substack: You don't understand. process is a local you inject
04:01:13  <Raynos>that get's recreated each time
04:01:35  <Raynos>why do you think I overwrite `modules.__browserify_process`
04:01:42  <Raynos>otherwise each module get's its own local process
04:03:04  <substack>bundle.filter(function (src) { return 'process.env=' + JSON.stringify(process.env) + '\n' })
04:03:08  <substack>do that
04:03:50  * AvianFluquit (Ping timeout: 249 seconds)
04:05:05  <Raynos>xd
04:05:07  <Raynos>that works
04:06:58  * mikealquit (Quit: Leaving.)
04:08:17  * simcop2387quit (Excess Flood)
04:08:53  * simcop2387joined
04:22:09  <Raynos>dominictarr: I need a more detailed explanation of how crdt works
04:25:20  <Raynos>dominictarr: document how the sync flag thing works
04:27:21  * simcop2387quit (Excess Flood)
04:28:52  * simcop2387joined
04:55:38  * thatguydanquit (Quit: thatguydan)
04:57:15  * thatguydanjoined
05:04:14  * timoxleyjoined
05:09:36  * _sorensenquit (Quit: _sorensen)
05:17:54  <Raynos>SubStack: https://gist.github.com/3355703 I need a latency compensation library and then we won
05:27:19  <substack>most of the value that people derive from projects like meteor comes from the docs, community, and cohesiveness of the api veneer
05:28:20  * joshwnjjoined
05:28:21  <substack>getting up to feature parity is good but there are other pieces
05:29:37  <substack>I also don't think it's wise to rush ahead too fast with the veneer because the pieces tend to focus less on doing their one thing well
05:31:57  <substack>the streaming libraries have steadily naturally converged on abstractions that compose very nicely
05:32:41  <substack>it's far less clear how the ui pieces should work in a modular way
05:33:39  <Raynos>substack: I know what you mean. But it's nice to have a mental list of tools that are alternatives
05:34:03  <Raynos>3 months ago I didn't know i had that list
05:34:15  <substack>yes I like how you've documented everything
05:34:24  <substack>it seems like some library should sit on top of sorta
05:34:29  <Raynos>https://github.com/Raynos/data-bind
05:34:39  <substack>to more generally handle collections
05:35:30  <substack>using streams seems a bit low-level for updating ui elements in this particular case too
05:35:52  <Raynos>substack: databind latched itself onto the crdt api
05:35:59  <Raynos>I think streams are nice
05:36:19  <substack>still not sure what crdt does
05:37:00  <substack>I get the basic premise but I'm still unclear as to what the implications of that idea are
05:38:46  <substack>databind?
05:39:15  <Raynos>databind binds an updatable thing to the dom
05:39:19  <Raynos>based on dataset properties
05:39:36  <Raynos>crdt gives you a document of rows
05:39:48  <Raynos>and gives you Set and Seq abstractions to "query" a subset of that document
05:40:05  <substack>I more want a lib that sits between crdt and sorta and other ui collection libs
05:40:18  <Raynos>crdt docs can be turned into a stream and piped into shit like other crdt docs
05:40:34  <Raynos>substack: I don't know what that looks like. I'll let you see what I do with sorta
05:40:36  <Raynos>about to use it
05:40:42  <substack>sweet
05:41:02  <Raynos>as part of dn-leaderboard :)
05:43:46  * rowbitquit (Ping timeout: 256 seconds)
05:44:31  * rowbitjoined
05:54:38  <Raynos>Ugh
05:54:55  <Raynos>Meteor's leaderboard is evil
05:55:05  <Raynos>It has a notion of selected which is hard to encode elegantly
06:03:54  <substack>selected current element?
06:04:15  <substack>isn't that just a property of the elements?
06:12:50  <Raynos>substack: https://github.com/Raynos/dn-leaderboard/blob/master/leaderboard/index.js#L34
06:12:55  <Raynos>it feels too complicated
06:19:41  <substack>write a module to encapsulate the idea of selection/unselection
06:20:50  <Raynos>substack: feels difficult
06:20:54  <substack>nah
06:21:21  <Raynos>the pain point is that this selection is stored in local storage
06:21:26  <Raynos>but I guess that can be an opt in
06:21:48  <substack>the selection algorithm shouldn't need to do any i/o
06:21:55  <substack>it can just have in-memory state
06:23:10  * ryan_stevens1quit (Quit: Leaving.)
06:25:49  <Raynos>sorta feels weird
06:26:11  <Raynos>its backwards
06:26:23  <Raynos>I want to pass in an event emitter that emits change events that it should listen to
06:26:33  <Raynos>rather then it being an event emitter that emits change events I listen to
06:26:35  <substack>hack a lib for it!
06:26:55  <Raynos>xd
06:27:01  <substack>the low-level stuff was crazy hard to get right
06:27:08  <substack>but sorta works so you could just wrap it
06:27:39  <substack>where do you get the events that the ui should listen to from?
06:27:51  <Raynos>crdt
06:28:21  <Raynos>substack: https://github.com/dominictarr/crdt/blob/master/example/complex/chat.js#L28
06:29:50  * AvianFlujoined
06:29:56  <Raynos>BLARG
06:30:01  <Raynos>you store the key on dataset
06:30:37  <Raynos>sorta is too inflexible >_<
06:33:27  <substack>https://gist.github.com/3422941
06:34:51  <Raynos>substack: do I or you have to implement selective?
06:35:03  <substack>yes
06:35:11  <Raynos>me or you
06:35:15  * AvianFluquit (Ping timeout: 245 seconds)
06:35:24  <substack>well you already wrote the code that implements it nearly
06:35:36  <Raynos>are you writing it or shall I write it?
06:35:48  <Raynos>if your writing it right now there is no point in me doing it
06:35:48  <substack>no I'm not presently writing it
06:35:53  <substack>go for it!
06:35:54  <Raynos>Ok then ill do it
06:36:00  <Raynos>MOAR MODULES
06:36:00  <substack>also selective is already taken on npm
06:36:05  <Raynos>ffff
06:36:06  <substack>I'll think up a name while you write it
06:36:37  <substack>selectron
06:36:38  <substack>haha
06:37:09  <substack>selectric
06:37:20  <substack>selectioneering
06:37:30  <substack>anyways selectron is the best of those
06:39:48  <substack>might want to go the source of sel.add(player) instead of sel(player)
06:41:17  <Raynos>yeah
06:41:36  <Raynos>https://gist.github.com/c664833ae7b56ab48534
06:42:33  <substack>shouldn't select(thing) return a function that actually does the stuff?
06:42:41  <substack>I guess you could just .bind()
06:43:23  <Raynos>I was thinking selectron is a thing that contains the current selected
06:43:36  <Raynos>so there's the idea of there only being on selected thing at a time
06:44:09  <Raynos>substack: https://gist.github.com/3423068
06:44:11  <substack>that works
06:44:36  <substack>what about the initial value?
06:44:48  <Raynos>there is no initial value in my code
06:45:18  <Raynos>and the initial value is a pain in the ass, because if you pass it in you miss the first select event unless it's applied on nextTick
06:45:31  <substack>in your old version you had an initial value
06:45:38  <substack>just throw in a nextTick then, it's all cools
06:45:45  <Raynos>in the old version I had an initial id
06:45:57  <Raynos>and I was waiting to get the list of incoming players and see whether any of them match the initial id
06:46:10  <substack>do you still need oldSelection ?
06:46:28  <substack>should probably get selectron to completely remove the need for oldSelection
06:47:32  <substack>shouldn't `player.on("selected", sel.select)` be `player.on("selected", sel.select.bind(sel, player))` ?
06:47:56  <substack>unless player emits itself in its 'selected' event which would be silly
06:48:53  <Raynos>player emits itself in the event
06:49:09  <Raynos>but I like where your going with this
06:51:12  <substack>could have sel.tie(player) do the same as sel.select.bind(sel, player)
06:51:28  <substack>`tie` or `fix` or some such
06:55:06  * ITprojoined
06:55:26  <Raynos>makes sense
06:57:50  <substack>looks like an initial value would eliminate the need for oldSelection entirely
06:58:11  <substack>function selectron (init) { ..., selected = init; ... }
06:58:51  <substack>then just selectron(selected.get('player'))
06:58:56  <substack>STATE BE GONE
06:59:31  <Raynos>substack: but that's not how it works
06:59:39  <Raynos>selected.get('player') returns an id not a player
06:59:40  <substack>oh I see, you actually need to hook onto 'select' to fire the event
07:00:02  <Raynos>substack: https://gist.github.com/3423068#L26
07:00:18  <substack>if (init) process.nextTick(function () { if (init === selected) sel.emit('select', init) })
07:00:22  <Raynos>i need to wait for incoming players from data store and see whether any ids match
07:00:50  <substack>anyhow it's much cleaner now
07:00:57  <substack>with this hypothetical library
07:00:58  <Raynos>yes much
07:01:07  <Raynos>substack: https://github.com/Raynos/selectron
07:01:10  <Raynos>not hypothetical
07:01:25  <Raynos>https://github.com/Raynos/selectron/blob/master/index.js#L8
07:01:29  <Raynos>sel itself is the tie
07:01:34  <Raynos>which is neat when it's useful
07:01:38  <substack>the solution to messy code is to move the mess to npm where the mess can be isaacs's problem
07:02:24  <substack>I like an explicit sel.tie slightly more but whatevs
07:02:35  <substack>this is your module, anything goes!
07:03:42  <Raynos>now I have to write my own sortable ._.
07:03:48  <substack>whycome?
07:04:09  <Raynos>11:28 PM <Raynos> BLARG
07:04:09  <Raynos>11:29 PM <Raynos> you store the key on dataset
07:04:09  <Raynos>11:29 PM <Raynos> sorta is too inflexible >_<
07:04:20  <substack>why is storing the key unacceptable?
07:04:37  <substack>when row.value is undefined the key gets deleted
07:05:16  <substack>or do you not have keys?
07:05:33  <Raynos>because I dont return an element
07:05:38  <Raynos>and returning an element breaks my widget
07:05:44  <Raynos>because the widget returns { appendTo }
07:06:53  <substack>var div = document.createElement('div'); widget.appendTo(div); return div
07:07:54  <Raynos>._.
07:07:58  <Raynos>WRAPPER DIVS >:(
07:08:14  <Raynos>LOUDBOT DOESNT BITCH IF I USE >:(
07:08:19  <Raynos>oh wait
07:08:20  <substack>just expose widget.element :p
07:09:05  <substack>so it can't work to only have appendTo because sorta needs to call insertBefore and appendChild with your html node
07:09:38  <substack>because it does in-place updates the correct way where it only moves what it needs to move
07:11:05  <substack>which was crazy hard to get precisely right
07:12:26  <Raynos>UGH
07:12:32  <Raynos>one of these two has to be an element
07:12:50  <Raynos>i just realized that
07:12:52  <Raynos>epic pain in ass
07:13:44  <substack>can't you just change your widget?
07:13:54  <substack>or else use a container div I don't see the problem
07:15:17  <maxogden>substack: the way i solve the problem you described above is call http://underscorejs.org/#sortedIndex and then do 0 ? insertBefore : appendChild
07:16:13  <Raynos>substack: https://gist.github.com/2f990fc882437fd358d5
07:16:15  <substack>maxogden: but the previous element needs to be removed too
07:16:23  <substack>maxogden: and changing the values adjusts the ordering
07:16:52  <Raynos>I think my place abstraction can work
07:20:10  * joshwnjquit (Quit: ERC Version 5.3 (IRC client for Emacs))
07:23:34  <Raynos>substack: how do I remove an element from a sorta?
07:24:05  <Raynos>oh i see
07:24:18  <substack>Raynos: set its value to undefined
07:26:48  <Raynos>substack: https://gist.github.com/11d6cb7218ef3258af77
07:26:50  <Raynos>first iteration
07:28:38  <Raynos>substack: the main change is that append function on the returned place
07:29:09  <Raynos>so if a row in sorta had an append function and called that append function by default if you returned a dom element
07:29:13  <Raynos>then it would solve most problems
07:30:21  <substack>that wouldn't work
07:30:27  <substack>sorta needs to insertBefore
07:31:52  <Raynos>substack: the returned place is a placeholder
07:32:06  <Raynos>its basically something that will be inserted into the sorted list soon but not yet
07:32:34  <substack>why don't you have a regular dom element?
07:32:46  <Raynos>its not that simple
07:32:53  <Raynos>I basically dont want my logic in your createElement function
07:33:09  <Raynos>I want a thing I can append elements to and update its value and be resorted outside of a callback
07:33:20  <Raynos>and no wrapper elements
07:33:23  <Raynos>I hate wrapper elements
07:33:33  <substack>then just expose the widget element directly
07:33:40  <Raynos>no >:(
07:33:43  <substack>you don't actually need to create anything inside of createElement
07:34:00  <substack>just return widgets[row.key].element
07:34:06  * thatguydanquit (Ping timeout: 272 seconds)
07:34:14  <Raynos>no ._.
07:34:21  <Raynos>i want to pass something into widget
07:34:26  <Raynos>which has a append method
07:34:38  <substack>that's way too ad-hoc for sorta to do
07:34:52  <substack>you're just being difficult I say!
07:34:58  <Raynos>I agree
07:35:08  <Raynos>but its midnight
07:35:14  <Raynos>i'll think of a more elegant solution later
07:35:23  <substack>right
07:35:38  <Raynos>the problem is I dont want the DOM element to leave the widget encapsulation ever
07:35:55  <Raynos>dom elements go down into other things, not up out of things
07:39:13  <substack>sometimes abstractions need raw elements
07:39:20  <substack>raw elements are highly regular structures
07:39:37  <substack>and it's not always possible to use generalized interfaces
07:39:56  <substack>dom tree manipulation is a domain where this is often the case
07:41:14  <Raynos>feck
07:41:22  <Raynos>i raped my code
07:41:40  <Raynos>now its lost all its readability
07:41:42  <Raynos>and doesn't work
07:47:02  <substack>git branch -M master fucked; git checkout -b master goodcommithash
07:52:07  <Raynos>it sok
07:52:11  <Raynos>ill go back and fix it alater
08:29:35  * mikealjoined
08:35:36  * AvianFlujoined
08:36:14  * simcop2387quit (Read error: Connection reset by peer)
08:36:23  * perlbotquit (Read error: Connection reset by peer)
08:46:32  * perlbotjoined
08:47:02  * simcop2387joined
09:32:22  * AvianFluquit (Quit: AvianFlu)
09:57:37  * thatguydanjoined
10:00:41  * AvianFlujoined
10:05:12  * AvianFluquit (Client Quit)
10:47:46  * thatguydanquit (Remote host closed the connection)
10:47:58  * thatguydanjoined
11:48:04  * tilgoviquit (Ping timeout: 246 seconds)
11:50:39  * thatguydan_joined
11:54:26  * thatguydanquit (Read error: No route to host)
12:08:03  * thatguydan_changed nick to thatguydan
12:16:29  * ITproquit (Ping timeout: 250 seconds)
12:33:47  * chapelquit (Ping timeout: 268 seconds)
12:33:47  * sorensenquit (Ping timeout: 268 seconds)
12:35:15  * sorensenjoined
12:37:45  * chapeljoined
12:48:24  * thatguydanquit (Quit: thatguydan)
14:55:04  * dominictarrjoined
15:07:33  * _sorensenjoined
15:16:38  * AvianFlujoined
15:21:04  * ryan_stevensjoined
15:22:05  * ryan_stevensquit (Client Quit)
16:41:33  * ryan_stevensjoined
16:47:04  * ryan_stevens1joined
16:49:01  * ryan_stevensquit (Ping timeout: 244 seconds)
17:06:43  <dominictarr>Raynos, had an idea today
17:07:44  <dominictarr>what about a mux-demux proxy/router, where you can create streams to any other client
17:26:41  <Raynos>dominictarr: that's what dn-network and stream-server is
17:29:45  <Raynos>dominictarr: Actually that's exactly what discovery-network is. It's a discovery network to discover the shape of the peer to peer network topology and has a bunch of helpers to estabilish peer to peer connections to any other client.
17:29:56  <Raynos>dominictarr: of course those p2p connections expose themself as streams
17:30:56  <Raynos>dominictarr: https://github.com/Raynos/dn-leaderboard/blob/master/network.js#L8
17:31:35  <dominictarr>Raynos, what does the api look like?
17:32:45  <dominictarr>it's also like that broserver thing, except not wacky some wacky protocol that you have to parse (http)
17:33:36  * shykesjoined
17:38:51  * rannmannquit (*.net *.split)
17:38:53  * rook2pawnquit (*.net *.split)
17:38:53  * maxogdenquit (*.net *.split)
17:38:53  * isaacsquit (*.net *.split)
17:38:53  * Madarsquit (*.net *.split)
17:38:53  * jesusabdullahquit (*.net *.split)
17:38:54  * perlbotquit (*.net *.split)
17:38:54  * munroquit (*.net *.split)
17:38:54  * paul_irishquit (*.net *.split)
17:38:55  * tanepiperquit (*.net *.split)
17:38:55  * ircretaryquit (*.net *.split)
17:38:56  * ryan_stevens1quit (*.net *.split)
17:38:56  * _sorensenquit (*.net *.split)
17:38:56  * antix_quit (*.net *.split)
17:38:57  * purrquit (*.net *.split)
17:38:58  * zuquit (*.net *.split)
17:38:58  * pkruminsquit (*.net *.split)
17:38:59  * zz_shykesquit (*.net *.split)
17:39:00  * LOUDBOTquit (*.net *.split)
17:39:13  <Raynos>dominictarr: https://github.com/Raynos/discovery-network#example
17:39:20  * ryan_stevens1joined
17:39:20  * _sorensenjoined
17:39:20  * antix_joined
17:39:43  * rook2pawnjoined
17:39:44  * maxogdenjoined
17:39:44  * isaacsjoined
17:39:44  * Madarsjoined
17:39:44  * jesusabdullahjoined
17:39:57  * LOUDBOTjoined
17:40:42  <dominictarr>Raynos, how do you specify which remote client you are sending the stream to?
17:40:56  * tanepiperjoined
17:40:56  * ircretaryjoined
17:40:56  * purrjoined
17:40:56  * zujoined
17:40:56  * pkruminsjoined
17:41:17  <dominictarr>Raynos, it should be possible to make the api more streamy.
17:41:24  <dominictarr>not async, i mean.
17:41:33  <dominictarr>like with tcp you just go
17:41:43  <dominictarr>net.connect(address)
17:41:44  * perlbotjoined
17:41:44  * munrojoined
17:41:44  * paul_irishjoined
17:41:50  <dominictarr>^and that returns a stream.
17:41:56  <dominictarr>synchronously.
17:42:17  <Raynos>dominictarr: https://github.com/Raynos/discovery-network/blob/master/example/chat/static/index.js
17:42:28  <Raynos>dominictarr: You don't know the address of a peer
17:42:58  <Raynos>dominictarr: And it's a chicken and egg problem. Your thinking of an API like: https://github.com/Colingo/stream-server#example-browser-server-in-a-seperate-browser
17:42:59  <dominictarr>"address" or "ID" or something
17:44:03  <Raynos>dominictarr: build a better API on top of discovery network or fork and fix it.
17:44:33  <dominictarr>Raynos, you'd need to figure out a way to coordinate the connections in other band of communication.
17:44:52  <dominictarr>like, in regular tcp | http
17:45:55  * ryan_stevens1quit (*.net *.split)
17:45:55  * _sorensenquit (*.net *.split)
17:45:55  * antix_quit (*.net *.split)
17:46:18  * ryan_stevens1joined
17:46:18  * _sorensenjoined
17:46:18  * antix_joined
17:46:28  <Raynos>dominictarr: the coordination is https://github.com/Raynos/discovery-network/blob/master/networks/peerNetwork.js
17:46:45  <Raynos>dominictarr: the establishment of p2p connections is https://github.com/Raynos/discovery-network/blob/master/networks/relayNetwork.js
17:46:50  <dominictarr>"coordination" is really a seperate job
17:47:10  <Raynos>agreed
17:47:19  <Raynos>that's why I need to refactor all this relay stuff ( https://github.com/Raynos/discovery-network/blob/master/connections/relayConnection.js ) out of the dn
17:47:59  <dominictarr>so my question is, when I say "hey I want to send a stream into Raynos's browser" how do I do that?
17:48:29  <Raynos>dominictarr: relayNetwork.sendOffer(raynosPeerId, offerData)
17:48:51  <Raynos>relayNetwork.on("answer", function (peerId, answer) { if (peerId === raynosPeerId) { ... } })
17:49:12  <dominictarr>Raynos, is `answer` a Stream?
17:49:17  <Raynos>no
17:49:22  <Raynos>it's a token
17:49:33  <Raynos>I can expose an API to make it a stream
17:49:35  <dominictarr>how do i turn that token into a stream?
17:50:02  <Raynos>relayConnection.receiveAnswer(answer)
17:50:10  <Raynos>relayConnection.on("stream", function (stream) { ... })
17:50:49  <dominictarr>why do I have to wait to get a stream when mux-demux return a stream synchronously?
17:51:13  <dominictarr>I should just be able to go: mx.createStream(remoteID)
17:52:11  <Raynos>dominictarr: because you need to open a relay connection through a relay server bi-directionally
17:52:19  <Raynos>you can return a buffered stream
17:52:32  <Raynos>that empties the buffer once the relay connection is estabilished
17:52:37  <dominictarr>naturally it would need to be buffered.
17:52:55  <Raynos>discovery-network are a bunch of low level abstractions, they need a cleaner high level API
17:53:20  <dominictarr>all createStream methods must be write buffered, there is always something to open first.
17:53:44  <dominictarr>although in some instances, like tcp streams, they are already buffered at a lower layer.
17:55:21  <Raynos>i highly recommend you use discovery-network for browser <-> p2p. discovery-network needs some extra things to make estabilishing node <-> p2p easier
17:56:14  <dominictarr>I've gotta prepare for my next talk right now, but I'll look into it.
17:56:30  <Raynos>good luck :)
17:57:43  <dominictarr>thanks
18:09:53  <dominictarr>oh yeah, Raynos, wrote a readme for between for you
18:11:57  * rannmannjoined
18:34:01  * mikealquit (Quit: Leaving.)
18:49:15  * ITprojoined
18:49:33  * simcop2387quit (Excess Flood)
18:52:35  * simcop2387joined
18:54:51  * mikealjoined
19:16:49  * mikealquit (Quit: Leaving.)
19:21:18  * mikealjoined
19:27:15  * AvianFluquit (Quit: AvianFlu)
19:34:57  * dominictarrquit (Ping timeout: 252 seconds)
19:38:21  <Raynos>dominictarr: aweshum
19:56:32  * AvianFlujoined
20:22:47  * simcop2387quit (Excess Flood)
20:24:36  * simcop2387joined
20:42:33  * rannmannquit (Changing host)
20:42:33  * rannmannjoined
20:42:33  * simcop2387quit (Changing host)
20:42:33  * simcop2387joined
20:42:59  * dominictarrjoined
20:45:59  * _sorensenquit (Read error: Connection reset by peer)
20:58:12  * _sorensenjoined
20:59:53  * AvianFluquit (Quit: AvianFlu)
22:23:20  <Raynos>what should be in my .gitignore file
22:23:22  <Raynos>for node?
22:25:42  <dominictarr>node_modules/*
22:25:46  <dominictarr>node_modules
22:27:05  * dominictarrquit (Read error: Connection reset by peer)
22:27:45  * ryan_stevens1quit (Quit: Leaving.)
22:29:28  <Raynos>dominictarr: NODE_MODULES IN GIT
22:29:30  <Raynos>it goes in git
22:29:50  * ryan_stevensjoined
22:40:46  * dominictarrjoined
22:41:11  <dominictarr>Raynos, what should I name a module that serializes a js stream?
22:41:23  <Raynos>dominictarr: JSONStream ?
22:41:48  <Raynos>dominictarr: that reminds me. I want `row.createStream()` and `set.createStream()`
22:41:48  <dominictarr>but, it may do so a variety of ways, and also may use other serialization methods.
22:42:14  <dominictarr>I'm gonna take the serialization wrapper out of mux-demux
22:42:17  <Raynos>serializiley
22:42:27  <Raynos>seriatarrer
22:42:34  <Raynos>seriees
22:42:39  <Raynos>saris
22:42:39  <dominictarr>because it will simplify my docs for crdt
22:42:42  <Raynos>I vote saris
22:43:01  <dominictarr>what is a saris? is that a startrek thing?
22:43:23  <dominictarr>sounds like a baddie of some odour/flavor
22:43:40  <dominictarr>texitify
22:44:22  <dominictarr>textify
22:44:38  <dominictarr>but that feels misleading
22:45:06  <dominictarr>stream-wrapper
22:45:31  <dominictarr>hmm, no that describes the implementation, not what it does.
22:45:47  <dominictarr>serializeify
22:45:49  * mikealquit (Quit: Leaving.)
22:46:13  <dominictarr>that is a mouthful, but fairly accurate
22:46:35  <dominictarr>cereal
22:46:42  <dominictarr>...
22:46:48  <dominictarr>cereal ?
22:47:44  <dominictarr>it's stupid, and maybe ... the rule is if you cant think of a good name, pick a silly but mnemonic name.
22:47:51  <dominictarr>cereal-stream
22:48:58  <dominictarr>oh, some JERK already has that name
22:49:56  <dominictarr>hmm, maybe go generic.
22:51:15  <dominictarr>there is no limit on the length on the length of the name yet,
22:52:33  <Raynos>xd
22:55:34  * mikealjoined
23:02:19  <isaacs>dominictarr: on the name of a module?
23:02:22  <Raynos>substack: https://gist.github.com/3430414
23:02:25  <isaacs>dominictarr: hrm...
23:02:33  <isaacs>dominictarr: maybe there should be a limit...
23:02:36  <isaacs>just for sanity's sake
23:02:45  <Raynos>isaacs: there needs to be a limit on the description
23:02:46  <dominictarr>isaacs, don't worry, I'm gonna keep it under 1k.
23:03:00  <Raynos>isaacs: or at least npm search should truncate
23:03:20  <isaacs>dominictarr: lol
23:03:49  <dominictarr>actually, indexzero was telling me you can do DoS on node like this
23:04:25  <isaacs>i'd say 256, but i worry about limiting the total module space to 26^255 possible names.
23:04:35  <dominictarr>he says the that if a header is like several M, then the parser just vailently attempts to parse it.
23:05:08  <dominictarr>isaacs, you can always increase the limit in 1000 years though, or when it becomes necessary.
23:05:18  <dominictarr>that won't _break_ anythnig
23:06:29  <dominictarr>maybe make it 69, that is 80 - 11
23:06:42  <dominictarr>so you can fit require(modulename) on one line
23:07:01  <dominictarr>even if it's stupidly long, with out wrapping.
23:08:03  <dominictarr>thats a good a rational as anything
23:08:09  * joshwnjjoined
23:15:09  <isaacs>dominictarr: you can always make it a string and just wrap it with +
23:16:04  <dominictarr>true, but expressions in require should be avoided if necessary.
23:18:19  <dominictarr>just make the number large enough so that we'll never hit it before we've invented an even better way of refering to dependencies,
23:18:36  <dominictarr>and then make the specific number a (lame) joke.
23:51:23  <isaacs>dominictarr: yeah, someone can quote me saying that we'll never need more than 40 characters for a module name or something
23:51:38  <isaacs>dominictarr: or we can just get file systems that suppport unicode, and allow unicode chars
23:52:03  <dominictarr>isaacs, we have to fix the 2038 bug in unix anyway.
23:52:24  <dominictarr>might as well stick it in then.
23:52:28  <isaacs>but someone would probably publish a nefarious thing as e‚ėípress or something
23:52:58  <isaacs>or we'd have stupid zalgo bullshit everywhere
23:53:05  <dominictarr>but it would be so annoying that no one would use it.
23:53:38  <dominictarr>assuming we are still using a keyboard based brain-computer interface.
23:58:32  * ryan_stevensquit (Quit: Leaving.)
23:59:43  * _sorensenquit (Quit: _sorensen)