00:04:21  <SubStack>that is browserling stats
00:20:37  <Raynos>https://github.com/Raynos/clientmongo/blob/master/examples/web/server.js#L14
00:20:46  <Raynos>I can't get browserify to pick up this local file in the bundle
00:24:37  * mikealjoined
00:25:51  <Raynos>Im stumblign in the dark with browserify >_<
00:27:26  * mikealquit (Client Quit)
00:28:24  <SubStack>Raynos: stuff from parent directories doesn't work very well right now
00:28:42  * mikealjoined
00:29:05  <Raynos>the annoying thing is absolute paths don't work either
00:29:40  <Raynos>https://gist.github.com/aa93e152c2d13049c79b
00:31:57  * isaacsquit (Remote host closed the connection)
00:33:31  <SubStack>Raynos: why not just use the cli tool?
00:33:42  <SubStack>instead of the api
00:33:51  <Raynos>because I'm using in a web server
00:33:56  <Raynos>like web-browserify example in dnode
00:34:38  <SubStack>it's usually easier to just generate a static bundle with the cli tool
00:34:55  <SubStack>and instead of doing an alias, you could just make a symlink
00:36:16  <Raynos>probably
00:37:31  <Raynos>never mind
00:37:34  <Raynos>it "works" now
00:37:41  <Raynos>trial and error & browserify bugs \o/
00:41:32  <Raynos>with dnode is it better to connect once in the browser or reconnect for every RPC call?
00:41:46  <SubStack>connect once
00:41:50  <SubStack>reconnecting doesn't even work
00:41:56  <SubStack>due to browser limitations
00:51:50  <Raynos>oh :(
00:52:05  <Raynos>i got clientmongo working :)
00:58:33  <rowbit>Hourly usage stats: [free: 9]
00:59:53  <Raynos>This mongo module is supposed to have the exact same API client / server and do the exact same thing
01:00:04  <Raynos>is there any way I can write a unit test that I can run both on server & client ?
01:00:11  <Raynos>and it'll just magically be the same unit test
01:01:20  <Raynos>I think I know how
01:04:50  * mikealquit (Quit: Leaving.)
01:37:00  <SubStack>Raynos: if you write them with tap you can run those in testling
01:37:57  <Raynos>that wouldnt work because my tests require a backend
01:39:05  * mikealjoined
01:40:35  <SubStack>I wouldn't be so sure
01:41:45  <Raynos>I mean my client-side unit test uses dnode
01:42:10  <SubStack>yes
01:42:17  <SubStack>http://testling.com/docs/#tunnels
01:43:11  <Raynos>so I would run my server and testling would make a HTTP request to it with its browsers?
01:43:28  <SubStack>yep
01:43:31  <Raynos>Did you finish that mocha wrapper? ( https://github.com/Raynos/clientmongo/blob/master/test/clientmongo.js )
01:43:43  <SubStack>I did get mocha working but decided that mocha is a bad idea
01:43:46  <Raynos>Also same code client/server is epic sauce
01:44:21  <SubStack>if you don't like the default test runner you can do http://substack.net/posts/1db3bb
01:44:25  <SubStack>but seriously, mocha is shit
01:44:35  <Raynos>:(
01:45:02  <Raynos>why is mocha shit?
01:45:14  <SubStack>it has a dozen different testing apis
01:45:20  <SubStack>which all rely on globals
01:45:42  <SubStack>and which globals are present is set at runtime
01:45:59  <Raynos>ok the globals thing is kinda ugly
01:46:00  <Raynos>i give you that
01:46:07  <Raynos>but unit tests are not meant to be pretty :P
01:46:11  <SubStack>whereas with something like tap
01:46:20  <SubStack>you can either use the harness or just run the script directly
01:46:38  <guybrush>mocha has a js-api now
01:46:43  <guybrush>so you can require it as well
01:46:47  <guybrush>an just run the file
01:47:32  <guybrush>whatever in the end its an opinion-thing right?
01:47:37  <SubStack>and it behaves just like any other library
01:47:50  <guybrush>i mean you dont like vows aswell dont you? :p
01:48:16  <SubStack>yep vows is way too verbose
01:48:17  <SubStack>and indirect
01:48:45  <guybrush>somehow i like all of them and cant decide whats cool and whats not at all :p
01:49:15  <SubStack>tap is the best
01:49:16  <guybrush>also i like to have mocha on the browser too, without doing anything - for free
01:50:02  <SubStack>I should just write a browser runner for tap
01:50:16  <SubStack>I could even integrate that with testling
01:50:35  <guybrush>maybe i would switch to tap then (again) :DD
01:51:11  <guybrush>i looked into tap-code a little but gave up in trying to make it browser-able
01:51:12  <SubStack>Raynos: check this https://github.com/substack/node-trumpet/blob/master/test/update.js
01:51:20  <SubStack>tests can be pretty
01:52:37  <Raynos>vows is horrible :P
01:53:30  <SubStack>agreed
01:53:54  <guybrush>haha i didnt hear a strong valid argument against vows yet :p
01:54:38  <guybrush>ITS ALL ABOUT OPINIONS!
01:55:22  <SubStack>guybrush: vows makes you write a bunch of shit that doesn't matter and forces you to structure your code in a very indirect way
01:56:03  <SubStack>here I'll show you
01:56:38  * tilgoviquit (Read error: Connection reset by peer)
01:58:33  <rowbit>Hourly usage stats: [free: 11]
01:59:59  <guybrush>lol you will make me rewriting all my tests ^^
02:00:17  <SubStack>you don't need to rewrite them all at once
02:00:31  <SubStack>I've been rewriting all my expresso tests slowly over the past year or so
02:00:40  <guybrush>have seen that
02:00:47  <guybrush>and i really like tap
02:01:59  <guybrush>tried it, but i switched to mocha when tj released it because i thought i want to use 1 test-thing everywhere - mocha comes with browser-support for free
02:04:18  <guybrush>and the reporters are really cool :>
02:04:56  <SubStack>https://gist.github.com/2381515 <-- vows vs tap
02:05:54  <SubStack>the tap example seems way more straight-forward to me
02:06:07  <guybrush>hm
02:06:10  <guybrush>wellll
02:06:12  <guybrush>it depends
02:06:17  <guybrush>in a file
02:06:21  <guybrush>with 100 unit-tests
02:06:29  <guybrush>its cool to have some sort of pattern
02:06:39  <SubStack>why would you have 100 unit tests in a single file
02:06:51  <guybrush>and vows gives you such a pattern, but you can do your own pattern anyway..
02:06:59  <guybrush>why not
02:07:11  <guybrush>i mean its my thing - i have long files
02:07:11  <SubStack>you can split that stuff out among [1~[B[B[B[B[B[B[B[B[B[B[Bwhen you can split that stuff out among many files
02:07:16  <guybrush>i have a cool editor
02:07:23  <guybrush>so long files are no problem for me
02:07:34  <guybrush>100files are a problem..
02:07:46  <guybrush>and 20 subfolders and stuff
02:08:25  <SubStack>I don't see how vows is any different from tap in this respect
02:08:54  <guybrush>what i meant is, everyone uses vows -> everyone can find stuff faster in test-files
02:08:55  <SubStack>except that vows has a bunch of pointless extra hoops to jump through
02:09:03  <guybrush>since they know the pattern
02:09:08  <guybrush>how to read the test-file
02:09:09  <SubStack>what pattern?
02:09:24  <guybrush>that async "topic" thing
02:09:36  <SubStack>why can't test files just be programs?
02:09:58  <SubStack>that async topic crap just seems to get in the way and confine needlessly the sorts of tests you can write
02:14:46  <SubStack>and you can call test() as many times as you like
02:14:51  <SubStack>you can even do nested tests
02:14:51  <st_luke>I like how simple tap is. no bs you have to sift through
02:14:57  <SubStack>exactly!
02:15:47  <st_luke>I like the website for vows though
02:15:55  <guybrush>:DD
02:18:03  <SubStack>yes the vows website is well done
02:18:14  <st_luke>why is there more complexity in the organization of vows than in the actual testing?
02:18:29  <SubStack>I know right?
02:18:36  <SubStack>when I first saw vows I didn't get it
02:18:39  <SubStack>and I still don't
02:23:23  <st_luke>it reminds me a lot of some of the ruby bdd frameworks I saw when I visted a ruby dev house in the area about a year ago
02:23:58  <st_luke>50% or more of the time they were coding they were writing tests, so I guess they needed something big to facilitate that
02:24:45  <st_luke>it sure made things look fancy when their clients visited, however
02:26:27  <SubStack>I write tests all the time
02:26:33  <SubStack>that's why I like things that aren't fancy
02:26:44  <SubStack>so I can focus on the tests and not the fanciness
02:26:49  <Raynos>SubStack: browserify does it shim Buffer ?
02:27:05  <Raynos>because require("assert").deepEqual throws since the Buffer global is not defined
02:28:02  <Raynos>i would like to use assert.deepEqual :P
02:28:08  <st_luke>I think the fanciness was one of the reasons their tests took so much time to write
02:28:12  <SubStack>Raynos: you've got to var Buffer = require('buffer').Buffer
02:28:19  <Raynos>._.
02:28:22  <Raynos>epic rage train
02:28:35  <Raynos>can I add that to the top of the assert file in node-browserify?
02:29:22  <SubStack>you were the one raging about how browserify bundles were too big!
02:29:44  <Raynos>they should at least work :P
02:30:03  <Raynos>https://github.com/substack/node-browserify/pull/124
02:30:55  <SubStack>actually just var Buffer = require('buffer') should work
02:30:56  <Raynos>Also `browserify -w -o ./test/test.js ./test/clientmongo.js` doesn't seem to rebundle when clientmongo changes
02:31:18  <SubStack>oh actually you've got to .Buffer
02:32:05  <SubStack>oh I see in assert
02:32:15  <Raynos>yeah assert.deepEqual uses Buffer
02:36:15  <Raynos>That fix works for me locally
02:39:46  <Raynos>SubStack: the watch parameter doesn't seem to rebuild my file correctly ( https://github.com/Raynos/clientmongo/blob/master/Makefile#L7 ) did I get the CLI syntax wrong?
02:40:36  <SubStack>yeah watch is kinda broken
02:41:33  <Raynos>:(
02:43:49  * mikealquit (Quit: Leaving.)
02:45:48  * ryan_stevensquit (Quit: Leaving.)
02:52:21  * shykeschanged nick to zz_shykes
02:58:33  <rowbit>Hourly usage stats: [free: 19]
02:58:56  * isaacsjoined
03:26:24  * coffeecup_joined
03:26:31  * tm6041joined
03:26:45  * tm604quit (Ping timeout: 265 seconds)
03:26:45  * coffeecupquit (Ping timeout: 265 seconds)
03:27:24  * mikealjoined
03:58:33  <rowbit>Hourly usage stats: [free: 13]
04:02:27  * zz_shykeschanged nick to shykes
04:20:49  <isaacs>SubStack: +9000 on that.
04:20:54  <SubStack>which?
04:20:57  <isaacs>SubStack: the code.that('looks').like('english')
04:21:01  <SubStack>haha yeah
04:21:04  <SubStack>fuck that code
04:21:14  <SubStack>shoe-horning your api so it looks vaguely english is dumb
04:21:40  <SubStack>oh man, shoehorn would be a great module name
04:23:44  <isaacs>hahah
04:24:11  <isaacs>you should write a module that turns normal sane modules into chainable things that read like shakespeare sonnets
04:24:33  <SubStack>yes
04:25:03  <isaacs>so like, instead of exports.foo(bar, cb), you'd have a('rose').by('any').other('name').should('smell').as.sweet(foo, cb)
04:25:13  <SubStack>I can write an ast transform to turn the examples into sonnets by changing the api
04:25:24  * isaacsregretting this already..
04:25:41  <isaacs>speaking of crazy apis! check it: https://github.com/joyent/node/pull/3109
04:29:43  <SubStack>read it, now checking the examples
04:32:08  * mikealquit (Quit: Leaving.)
04:32:55  <SubStack>isaacs: how about domain.create() can take an optional callback that will intercept the errors?
04:34:18  <SubStack>like how http.createServer can take a callback that adds a listener for the request event
04:35:17  <SubStack>another that is misleading about the present docs is how the domain from require('domain') is presented alongside instances of domain which are also called `domain`
04:35:27  <SubStack>so it's not immediately clear which is which
04:36:06  <SubStack>and as such, if the require('domain') domain can only do .create(), why not just make the result of require('domain') into a single function?
04:36:09  * mikealjoined
04:36:22  <SubStack>transcribing these into the github comments
04:41:36  <isaacs>SubStack: so you'd attach that as an on('error', cb)
04:41:36  <isaacs>?
04:42:25  <SubStack>isaacs: it could call .intercept()
04:42:42  <isaacs>SubStack: yeah, so, it's like: { Domain, active, create } = require('domain')
04:42:55  <isaacs>SubStack: intercept returns a function, though
04:43:01  <SubStack>because I mean when you want to use a domain, you probably want to catch the errors right?
04:43:03  <isaacs>domain.create() returns a domain
04:43:15  * mikealquit (Quit: Leaving.)
04:43:16  <SubStack>oh that is strange
04:43:26  <isaacs>SubStack: it's like http.createServer
04:43:28  <SubStack>I guess .on('error', cb) then is what I was thinking
04:43:32  <isaacs>yeah
04:43:51  <isaacs>intercept is to alleviate the if (er) return cb(er) repetition
04:44:08  <SubStack>well
04:44:17  * mikealjoined
04:44:18  <isaacs>which, granted, d.intercept(function(_, data) { ... }) is not much better, but at least it moves it out of the body
04:44:21  <SubStack>fs.readFile(filename, d.intercept(function(er, data) {
04:44:24  <SubStack>is a bit long
04:44:46  <isaacs>yeah
04:44:58  <SubStack>wait why is er always nll
04:45:04  <SubStack>that doesn't make any sense
04:45:05  <isaacs>because it's been intercepted
04:45:12  <SubStack>you should just omit that argument
04:45:22  <isaacs>but that changes the signature
04:45:28  <isaacs>so you can't just do d.intercept(cb)
04:45:42  <isaacs>because now the data will be the first arg to cb, and cb doesn't know it's being intercepted
04:46:01  <isaacs>for instance, you may use this cb in multiple places.
04:46:08  <isaacs>or only intercept it sometimes, and not all the time
04:46:14  <SubStack>I don't think that happens as much
04:46:29  <isaacs>i pass around error-first callbacks a *lot* in npm.
04:46:30  <SubStack>anyways I'll probably just write an api to wrap around this one
04:46:34  <SubStack>but
04:46:42  <isaacs>having the signature change would be hazardous
04:46:45  <SubStack>this module is supposed to partly solve the problem of threading errors
04:46:58  <isaacs>honestly, i'm not sure that d.intercept() is really all that valuable.
04:47:13  <isaacs>a few people have asked for it. mikeal mentioned that it's a common error he makes, and he kinda knows what he's doing.
04:47:46  <isaacs>the main purpose is to catch thrown errors, thoug
04:48:02  <isaacs>in such a way that there's some sort of context
04:48:14  <SubStack>but also
04:48:33  <SubStack>isn't part of the purpose of domains to be able to trap exceptions in code you didn't write?
04:48:38  <isaacs>yes
04:48:46  <SubStack>what if that code does an fs.readFile() and doesn't wrap it in a domain?
04:48:53  <isaacs>that's the beauty of it
04:48:53  <SubStack>how do you catch exceptions from there?
04:49:08  <isaacs>all fs operations get hooked into the active domain when the ReqWrap is created
04:49:18  <SubStack>ok
04:49:21  <isaacs>and that domain is entered when MakeCallback gets called.
04:49:25  <SubStack>you should emphasize that more
04:49:31  <isaacs>yeah
04:49:31  <SubStack>it's not obvious from the docs or the writeup
04:49:39  <isaacs>good note, thanks
04:49:56  <SubStack>and maybe include an example that doesn't use the domains api at all
04:50:02  <SubStack>except to set up the initial domain
04:50:06  <isaacs>that's why the first part of the pull req is a bunch of commits that organize MakeCallback usage, so that we always go through a single entry point
04:50:13  <SubStack>but no wrapping
04:50:19  <isaacs>good idea
04:50:21  <SubStack>because that's what people will want to see
04:50:35  <SubStack>that's what threw me about the .bind() and .intercept() stuff
04:51:00  <isaacs>ahh, i see
04:51:05  <SubStack>because I thought those were supposed to be unnecessary now
04:51:48  <isaacs>right
04:51:57  <isaacs>well, you do get a bit more data that way
04:52:14  <isaacs>the error basically just gets decorated with a link to the function that was bound
04:52:29  <isaacs>with implicit binding, it's a bit trickier to figure out exactly what failed.
04:52:36  <SubStack>ah
04:52:41  <SubStack>that makes sense
04:52:46  <isaacs>that should also be documented better, i suppose
04:53:01  <isaacs>but the bar here is very low -- the intent is for someone to come along and rewrite this better in 0.9
04:53:18  <isaacs>it just has to be enough to prove the concept, be minimally useful, and not do harm.
04:53:48  <SubStack>also .bind() is weird
04:53:55  <SubStack>since there's a Function.prototype.bind already
04:54:16  <isaacs>yeah
04:54:40  * isaacshas 1000 colors of bikeshed paint ready and waiting
04:54:46  <SubStack>haha
04:54:53  <isaacs>we should just call the method "x"
04:54:58  <isaacs>cuz fuckit
04:55:02  <SubStack>anyways that stuff doesn't matter too much
04:55:05  <isaacs>domain.x(function (er, data) { ... })
04:55:13  <SubStack>because I can just write a lib on top of this api to do everything the way I like
04:56:03  <isaacs>or you could finally make it official and be a node contributor ;P
04:56:09  <SubStack>pfft
04:56:14  <isaacs>and just make it be the way you like
04:56:23  <SubStack>I have too many modules to maintain already
04:56:31  <isaacs>but that's the beauty of it.
04:56:32  <SubStack>actually scratch this
04:56:43  <isaacs>if you contribute to core, bnoordhuis maintains it for you.
04:56:44  <SubStack>you should make the module api as ugly as possible
04:56:54  <SubStack>in order to encourage people to write wrappers
04:56:57  <isaacs>hahah
04:57:25  <isaacs>dude, i'm totally gonna write com.stack.sub
04:57:35  <isaacs>(changing the subject)
04:58:33  <rowbit>Hourly usage stats: [free: 8]
04:58:49  <SubStack>var Domain = require('domain').Domain; var d = new Domain(Domain.STANDARD_OPTS_X, 'error'); d.initialize(Domain.DOMAIN); d.on('error', function (err, errno, code, body) {})
04:59:20  <isaacs>it'd be an awesome april fools' joke to publish it to npm, with a decidedly un-substack drawing attached (extremely realistic still life painting of something not at all interesting), and then change the npm metadata and tarball properties around so it totally looks like you wrote it
04:59:23  <SubStack>fs.readFile(file, Domain.bind.call(d.instance, Domain.EX_DOMAIN, cb))
04:59:32  <isaacs>hahaha
04:59:43  <isaacs>you can't just have d.instance be public
04:59:45  <isaacs>that's not safe
04:59:49  <SubStack>right
05:00:09  <SubStack>fs.readFile(file, Domain.bind.call(d, Domain.EX_PUBLIC_INSTANCE, Domain.EX_DOMAIN, cb))
05:00:25  <isaacs>fs.readFile(file, Domain.getBindFunction().call(d.getInstance(), new Domain.Constants('EX_DOMAIN'), cb))
05:00:59  <isaacs>every domain is a singleton!
05:01:04  <isaacs>of a generated class!
05:01:10  <isaacs>provided by a factory!
05:01:17  <SubStack>an abstract factory
05:01:27  <SubStack>and you need to implement a concrete prototype to instantiate it
05:01:35  <isaacs>hahahah!!
05:01:37  <isaacs>yes!!!
05:01:51  <SubStack>and you MUST use Domain.inherits()
05:01:56  <SubStack>because anything else will break it
05:01:57  <isaacs>man, you can really see why java is so popular in education.
05:02:01  <isaacs>it's *easy* to fill 4 years of this shit.
05:02:16  * shykeschanged nick to zz_shykes
05:02:24  <SubStack>whereas you can pretty much teach javascript in a day
05:02:38  <isaacs>right
05:02:42  <isaacs>and then you have to teach software development
05:02:47  <isaacs>and that's much harder
05:02:56  <SubStack>here is a function, here is how to call them, here is how scope works
05:03:27  <SubStack>software development is mostly about what not to do
05:03:54  <SubStack>unfortunately it's also more of an aesthetic
05:04:09  <isaacs>yeah
05:04:22  <SubStack>universities should teach programming as an art class
05:04:22  <isaacs>and learning how computers actually work is kind of a lot of stuff, too
05:04:37  <isaacs>yeah, like a BFA/MFA program
05:05:04  <isaacs>where you actually just build a lot of programs, and then maintain them
05:05:14  <SubStack>exactly like art
05:05:27  <SubStack>learn about what other people are doing and techniques
05:05:36  <SubStack>but mostly just make a lot of art
05:05:37  <isaacs>work in groups, but not bullshit "small groups" stuff that they do in most educational programs, but like, "we don't care how you work together, but get it done"
05:06:03  <SubStack>self-organizing groups that arise incrementally in order to achieve some task
05:06:05  <isaacs>first year is fun cuz you crank out code. second year is hellish because you have to maintain code that first years wrote.
05:07:08  <isaacs>also, it would be good to get multi-level groups and tasks. so in the 4th year, you have 2 first-years on your team, and have to manage them.
05:07:13  <SubStack>pretty much nobody learns effective collaboration in school either
05:07:27  <isaacs>s/in school/ever in their lives/
05:07:54  <SubStack>I had to be really forceful to get people to use git at university
05:07:58  <SubStack>or even svn
05:08:10  <SubStack>in the before time
05:12:11  * rannmannquit (Ping timeout: 240 seconds)
05:15:50  <isaacs>ha
05:16:18  <isaacs>i didn't even really know there was such a thing as source control when i was in college.
05:16:34  <isaacs>i mean, i knew that there were these tools that teams used for big products and shit.
05:16:52  <isaacs>but i kinda figured that my educational tasks were not *completely* useless, and they mostly were.
05:17:13  <isaacs>the "how computers work" bits were good.
05:17:15  <isaacs>learning C was good
05:17:42  <isaacs>but "you can solve most problems with a single program that you never touch again"? completely misguided.
05:18:22  * mikealquit (Quit: Leaving.)
05:19:03  <SubStack>yacc?
05:21:19  * SubStackthinks of a way for these inequalities to work
05:21:23  <SubStack>for number of servers
05:21:28  <SubStack>in a json file
05:21:41  <SubStack>you'll be able to specify min and max as keys
05:21:57  <SubStack>but what about exactly
05:22:09  <SubStack>or I could just have 1 key and write a tiny parser
05:22:55  <SubStack>min, max, and exactly sounds good hmm
05:23:11  * zz_shykeschanged nick to shykes
05:42:18  * mikealjoined
05:42:54  * mikealquit (Client Quit)
05:50:46  <Raynos>SubStack: How do you do GC when doing RPC ?
05:50:58  <SubStack>when the connection drops the refs go away
05:51:12  <SubStack>and the connection drops often enough that it hasn't been a problem for me
05:51:18  <Raynos>I have a cache of cursor objects at one dnode server and the dnode client has references to them
05:51:37  <Raynos>how does the dnode server know that the dnode client no longer needs these remote cursor objects
05:51:46  <SubStack>it doesn't
05:51:57  <Raynos>is there any cache reduction strategy for this?
05:52:00  <SubStack>nope
05:52:02  <Raynos>or is this just a memory leak
05:52:10  <SubStack>when the connection drops all the state gets GC'd
05:52:45  <Raynos>Ah I see
05:52:50  <SubStack>been running this stuff in production for years and it hasn't been a problem
05:53:06  <Raynos>your not emulating RPC on top of RPC :P
05:53:38  <Raynos>https://github.com/Raynos/clientmongo/blob/master/lib/server.js#L13
05:53:46  * isaacsquit (Remote host closed the connection)
05:53:52  <Raynos>It just feels like I tied the live time of the collection objects to the server rather then the client
05:56:39  <Raynos>How can the dnode server get access to the connection object?
05:58:33  <rowbit>Hourly usage stats: [developer: 2, free: 17]
05:58:57  * mikealjoined
06:10:21  <jesusabdullah>SubStack: You seen anybody do this before? https://gist.github.com/2382406
06:16:52  * mikealquit (Quit: Leaving.)
06:25:59  * shykeschanged nick to zz_shykes
06:27:57  * mikealjoined
06:48:17  <SubStack>Raynos: what do you mean get access?
06:48:37  <SubStack>you just dnode(function (remote, conn) { ... }).listen(...)
06:48:42  <SubStack>and you get the conn object
06:49:27  <SubStack>jesusabdullah: I'm not sure what that is supposed to enable
06:52:16  <Raynos>I mean is there a way to get the underlying conn for each remote RPC call
06:52:40  <Raynos>so for every remote method / function invoked I want to check the connection object / session data for auth reasons
06:53:45  <SubStack>don't do that
06:54:01  <SubStack>just serve the functions you want to protect through a callback
06:54:22  <Raynos>interesting
06:54:52  <SubStack>dnode(function () { this.auth = function (user, pass, cb) { if (valid(user, pass)) cb(null allTheThings) else cb('ACCESS DENIED') }
06:54:56  <SubStack>).listen(...)
06:55:18  <Raynos>this makes sense
06:55:58  <Raynos>i need finer grain control over all the things though
06:57:57  <Raynos>im thinking of having the client pass me an auth token for every call and let me check whether he's authed for every call
06:58:33  <rowbit>Hourly usage stats: [developer: 1, free: 9]
07:15:03  <SubStack>that's dumb
07:15:56  <SubStack>exactly the sort of thing that dnode was designed to let you avoid
07:16:21  <SubStack>and the sort of thing that you'd have to resort to in an HTTP api because there's no implicit state between requests
07:20:46  <jesusabdullah>SubStack: I want to be able to make dnode transports basically
07:20:51  <jesusabdullah>same way you did socket.io
07:22:01  <SubStack>jesusabdullah: but there isn't enough in that gist to say anything
07:22:14  <SubStack>I'm not yet sure what you're getting at
07:24:58  <jesusabdullah>SubStack: Something like this https://gist.github.com/2382406#file_server.js
07:25:56  <jesusabdullah>I don't think I actually want this api anymore but that's what I was getting at kinda
07:30:23  <Raynos>SubStack: OK say I'm exposing a full DB API over dnode, how would I secure a controllable subset of it?
07:31:16  <SubStack>Raynos: you would write a completely separate module to handle that
07:32:00  <Raynos>but it would have to still add auth in the dnode server
07:32:10  <Raynos>because anyone can reverse engineer the dnode client
07:32:29  <Raynos>and just saying "yes you can have all the dbs" or "no you, no db" isn't enough
07:33:02  <jesusabdullah>wait, this is simpler than I thought I think
07:33:07  <SubStack>Raynos: you're thinking about it wrong
07:33:24  <Raynos>what's the right way to think
07:33:25  <SubStack>your thing doesn't need to be dnode aware at all
07:33:30  <SubStack>no you are wrong
07:33:41  <SubStack>here's what you can do:
07:33:53  <SubStack>write a module that adds permissions on top of the db api
07:34:22  <SubStack>write a this.auth = ... function in node that gets the user's access level
07:34:35  <SubStack>pass the access level to the permission module in the callback
07:34:43  <SubStack>you can basically just use programming to solve your problem
07:35:31  <SubStack>using callbacks to protect state implicitly
07:35:40  <SubStack>that is sort of what dnode is all about
07:36:06  <SubStack>it's true
07:36:11  <Raynos>:D
07:36:41  <Raynos>But I can't bolt auth onto this module because it's standalone
07:36:55  <Raynos>to write a this.auth module in node I would have to interact with dnode
07:36:57  <SubStack>yes
07:36:59  <SubStack>yes you can
07:37:04  <SubStack>no
07:37:25  <Raynos>https://github.com/Raynos/clientmongo
07:37:30  <SubStack>1) write a thing that only does permissions
07:37:55  <SubStack>2) compute the level of the remote user and pass that to the permission module
07:39:00  <SubStack>and pass the protected object through the auth callback like I showed earlier
07:39:06  <SubStack>I pretty much do this all over the place
07:40:00  <Raynos>the issue is that there is no protected object
07:40:27  <Raynos>I need to build a system of "level" <-> how much of the API should be exposed
07:41:00  <Raynos>and since I dont give the API to the remote user over dnode as an object, I instead give him 4 methods called `callCommand(name, object, args)` `callSpecialCommand(name, object, args)` ...
07:41:10  <Raynos>The issue is that I'm doing RPC over RPC :P
07:41:16  <jesusabdullah>That's the idea
07:41:24  <jesusabdullah>That's intentional
07:41:56  <SubStack>so
07:41:58  <SubStack>don't do that
07:42:16  <jesusabdullah>Oh, you mean, no, not like that
07:42:18  <SubStack>just write a wrapper around the api
07:42:28  <SubStack>anyways
07:42:36  <Raynos>I see what your saying
07:42:38  <SubStack>what you should be writing is the permission level wrapper
07:42:40  <SubStack>so go write that
07:42:43  <Raynos>I need to rewrite my thing to not be broken
07:42:46  <SubStack>and then it will seem obvious
07:58:33  <rowbit>Hourly usage stats: [free: 9]
08:29:33  * TheJHjoined
08:37:31  <jesusabdullah>SubStack: https://gist.github.com/2382916 This is kind of what I have in mind, for a concrete example. Do you see what's broken here off-hand?
08:38:12  <jesusabdullah>this sort of plumbing anyway
08:38:19  <jesusabdullah>I figure this is a pretty fucking simple case
08:39:10  <jesusabdullah>server follows your socket.io server library in dnode but I'm half-assing on the client I think :)
08:39:26  <SubStack>what does it do when you run it?
08:40:09  <jesusabdullah>How do I pipe stderr to a file?
08:40:29  <SubStack>2>&1 > outfile
08:40:40  <SubStack>copies stderr to stdout so you get both in the same file
08:40:46  <SubStack>or you could just copy/paste that shit :p
08:41:50  <jesusabdullah>No, it's too much
08:42:01  <jesusabdullah>for some reason neither of those are catching this output
08:42:04  <jesusabdullah>I'm perplexed
08:42:51  <SubStack>you can truncate it
08:42:58  <SubStack>just copy/paste part of it
08:43:39  <jesusabdullah>SubStack: https://gist.github.com/2382949
08:43:44  <jesusabdullah>A whole bunch of this
08:46:35  <SubStack>in server.js it looks like you have a feedback loop
08:46:59  <SubStack>stream.pipe(client.stdin);
08:47:09  <SubStack>client.stdout.on('data', function (data) {
08:47:17  <SubStack> stream.write(data);
08:48:07  <SubStack>anyways you're piping too many things
08:48:28  <SubStack>comment things out with a binary search until it stops spamming the terminal
08:52:59  <jesusabdullah>good idea
08:53:55  <jesusabdullah>Oh, also
08:54:25  <jesusabdullah>this is coming from the client not the serve
08:54:27  <jesusabdullah>r
08:58:33  <rowbit>Hourly usage stats: [free: 17]
09:22:27  * mhilmiquit
09:58:33  <rowbit>Hourly usage stats: [free: 18]
10:56:15  <Altreus>any of you chaps played with this new yahoo thinger
10:56:17  <Altreus>?
10:56:28  <SubStack>mojito?
10:56:38  <SubStack>I tried to install it but it was an empty package at the time
10:58:05  <Altreus>I think that sounds right
10:58:33  <rowbit>Hourly usage stats: [free: 15]
10:58:47  <Altreus>ya that
11:00:33  <Altreus>not even sure what I'd do to try out such a thing
11:21:18  <SubStack>mikeal: pkrumins and I are running into those seaport bugs you've reported previously now
11:21:59  <SubStack>we found a partial fix for freeing the entires when they go offline already, a bug in dnode/upnode
11:30:04  * devaholicquit (Ping timeout: 246 seconds)
11:47:25  <pkrumins>i think we have located it
11:58:33  <rowbit>Hourly usage stats: [free: 6]
12:37:57  <pkrumins>mikeal: it's fixed!
12:58:33  <rowbit>Hourly usage stats: [free: 14]
13:58:33  <rowbit>Hourly usage stats: [free: 16]
14:26:22  * daeheejoined
14:58:33  <rowbit>Hourly usage stats: [free: 9]
15:26:13  * isaacsjoined
15:46:24  * rannmannjoined
15:58:33  <rowbit>Hourly usage stats: [free: 16]
16:22:48  * daeheequit (Quit: daehee)
16:44:28  * mikealquit (Quit: Leaving.)
16:58:33  <rowbit>Hourly usage stats: [free: 5]
17:04:54  <st_luke>it would be cool to build almost all of the furniture you need
17:26:05  * mikealjoined
17:49:15  <mikeal>SubStack: w00t!
17:49:25  <mikeal>SubStack: one problem i'm going to hit with fleet
17:49:36  <mikeal>is that by default all the stdout is sent to the hub
17:49:45  <mikeal>and eventually that it's going to be too much for it to handle
17:54:20  * ryan_stevensjoined
17:55:03  * wiwilliajoined
17:58:19  <chapel>mikeal: whens registration for nodeconf kicking off?
17:58:33  <rowbit>Hourly usage stats: [free: 17]
18:04:58  <mikeal>late this month
18:05:03  <mikeal>shooting for the 27th
18:05:40  <chapel>okay, you should let us know here first before you tweet it :)
18:06:00  <mikeal>haha
18:06:10  <mikeal>it'll be public once i know all the registration stuff works
18:06:15  <mikeal>and i've verified the schedule
18:07:12  <chapel>how many tickets are there going to be?
18:07:29  <chapel>I can buy one ticket, and bring my gf?
18:16:57  * mikealquit (Quit: Leaving.)
18:18:01  * mikealjoined
18:32:36  <SubStack>mikeal: true
18:33:14  <SubStack>well I'll think up a fix for that when it starts to be a problem
18:33:37  <mikeal>chapel: there is an SO track for significant others and family
18:33:42  <mikeal>probably a food tour or something
18:33:55  * daeheejoined
18:34:53  * mikealquit (Quit: Leaving.)
18:36:58  <SubStack>isaacs: great domains gist just now
18:37:07  <SubStack>drives home how they work much more cleary
18:37:11  <isaacs>thanks
18:37:25  <isaacs>yeah, the docs and examples need to be much improved.
18:40:25  * wiwilliaquit (Ping timeout: 244 seconds)
18:45:36  * mikealjoined
18:46:59  <chapel>mikeal: so I should buy a ticket for my gf as well?
18:47:04  <chapel>or one ticket handles a room?
18:48:15  <mikeal>chapel: the first lot of tickets will have rooms attached
18:48:22  <mikeal>the price will vary per the room
18:48:34  <mikeal>you don't need a ticket to the conference for an SO
18:48:43  <mikeal>there is a seperate ticket, available later
18:49:09  <mikeal>which will probably be 5 dollars, only because when we make them free we get 2x the signups and have to deal with too many last minute cancellations
18:49:30  <mikeal>if you gf wants to attend the talks at the conference she'll need a regular ticket
18:49:49  <chapel>naw, she has no interest in that stuff
18:49:58  <chapel>but would be interested in non-tech activities
18:50:56  <mikeal>yeah, last year my wife took the SO track on a culinary walking tour
18:51:06  <mikeal>this year is two days, so lots of stuff :)
18:51:12  <chapel>awesome
18:51:40  <chapel>she has friends in pdx, so she wasn't going to be bored, but Im sure a so track would be fun for her
18:58:33  <rowbit>Hourly usage stats: [free: 20]
19:02:13  * mikealquit (Quit: Leaving.)
19:21:23  * daeheequit (Quit: daehee)
19:28:07  * sorensen__joined
19:29:17  * sorensen__quit (Client Quit)
19:54:28  * wiwilliajoined
19:58:33  <rowbit>Daily usage stats: [developer: 11, free: 342]
19:58:33  <rowbit>Hourly usage stats: [developer: 2, free: 17]
20:00:02  * mikealjoined
20:19:13  * mikealquit (Quit: Leaving.)
20:24:22  * mikealjoined
20:25:19  * wiwilliaquit (Ping timeout: 250 seconds)
20:27:37  * simcop2387quit (Excess Flood)
20:29:52  * simcop2387joined
20:33:53  * ryan_stevensquit (Quit: Leaving.)
20:39:39  * mikealquit (Quit: Leaving.)
20:44:04  * mikealjoined
20:57:26  * pikpikjoined
20:58:08  <pikpik>LOUDBOT: be IsharaComix
20:58:18  <pikpik>LOUDBOT: be IsharaComix
20:58:29  <pikpik>LOUDBOT: be IsharaComix
20:58:29  <LOUDBOT><IsharaComix> AND THE PANTS WERE DEAD
20:58:33  <rowbit>Hourly usage stats: [free: 21]
21:01:18  <pikpik>LOUDBOT: be pikpik
21:01:23  <pikpik>LOUDBOT: be pikpik
21:01:26  <pikpik>LOUDBOT: be pikpik
21:08:30  <chapel>LOUDBOT: be substack
21:08:31  <LOUDBOT><substack> I WOULD KNOW. I'M A TERMINATOR.
21:08:39  <chapel>LOUDBOT: be niftylettuce
21:08:58  <chapel>LOUDBOT: be jesusabdullah
21:11:51  <pikpik>LOUDBOT: be LOUDBOT
21:23:50  * tilgovijoined
21:24:54  * daeheejoined
21:27:45  * mikealquit (Quit: Leaving.)
21:55:09  * daeheequit (Quit: daehee)
21:58:33  <rowbit>Hourly usage stats: [developer: 1, free: 13]
22:21:46  * st_lukequit (Remote host closed the connection)
22:58:33  <rowbit>Hourly usage stats: [developer: 1, free: 8]
23:00:42  * tilgoviquit (Ping timeout: 245 seconds)
23:06:08  * mikealjoined
23:10:13  * tm6041changed nick to tm604
23:10:18  * tm604quit (Changing host)
23:10:18  * tm604joined
23:17:56  * mikealquit (Quit: Leaving.)
23:25:45  * tilgovijoined
23:31:18  * isaacsquit (Remote host closed the connection)
23:41:31  <Raynos>loud ._.
23:41:55  <Raynos>SubStack: do you know whether anyone has written shared generic objects between server & many clients using dnode?
23:58:33  <rowbit>Hourly usage stats: [free: 8]