[00:23] joshthecoder: can anyone point me to an example of capturing stdout from a child process and writing it to a file? [00:23] joshthecoder: for some reason I've had no luck with my quick example [00:24] creationix: joshthecoder: http://github.com/creationix/wheat/blob/master/lib/wheat.js#L579 [00:24] creationix: it's a generic function, but the central idea is there [00:24] creationix: writing to a file is pretty easy on top of that [00:25] joshthecoder: yeah I create my file output stream then call write() on it in the data callback for stdout [00:25] joshthecoder: but my file keeps coming up blank [00:25] creationix: are you closing the file when done? [00:25] noonat: closing the file? [00:26] creationix: joshthecoder: if you can, put your code in a gist [00:27] joshthecoder: do you know coffeescript? [00:28] joshthecoder: here's the code [00:28] joshthecoder: https://gist.github.com/a2e817c528b5399a6867 [00:30] hassox has joined the channel [00:32] noonat: what version of node are you running? [00:32] joshthecoder: v0.1.90 [00:34] noonat: data is a buffer [00:34] noonat: try doing this: output.write(data.toString()) [00:34] pjb3 has joined the channel [00:35] noonat: i would think it would work with the buffer directly but i'm seeing the same issue here [00:35] joshthecoder: yeah that works [00:35] joshthecoder: it would be nice if you could plumb together various streams [00:36] admc_ has joined the channel [00:36] joshthecoder: so I guess I'll use that work around for now [00:44] dnolen has joined the channel [00:45] mjr__ has joined the channel [00:45] noonat: weird. i'm not getting any close events for that write stream at all... [00:46] noonat: and it never drains when i write a buffer [00:46] joshthecoder: so how do exec and spawn differ exactly? [00:46] noonat: but does for a string [00:47] mjr__ has joined the channel [00:50] noonat: joshthecoder: exec() is just a helper on top of spawn [00:51] noonat: it buffers all the output for you and returns it to you in one callback when the process exits [00:51] noonat: you have to do a bit more work with spawn but you can stream things with it [00:51] joshthecoder: ah okay [01:00] gfxmonk has joined the channel [01:05] gfxmonk: do child processes still emit an "error" event? [01:06] noonat: gfxmonk: i don't think so, 'exit' has a code [01:06] gfxmonk: ahh. it used to though, right? I'm not just going mad? [01:07] noonat: i have no idea anymore haha [01:08] tlrobinson: dan ingalls playing with node, eh? http://groups.google.com/group/nodejs/browse_thread/thread/36146559c089dca0?hl=en# [01:10] gfxmonk: cheers noonat, looks like I just need to attach to the stderr and exit streams to get what I presume used to be the "error" event [01:10] noonat: ahh [01:28] creationix: tlrobinson: is that smalltalk dan ingalls? [01:28] tlrobinson: creationix: yes [01:28] creationix: very cool, I hadn't noticed the name when I saw him email [01:29] tlrobinson: he works on Lively Kernel now I guess [01:29] tlrobinson: www.lively-kernel.org/ [01:30] creationix: wow, now that's someone who's brain I would like to pick [01:31] ncb000gt: heh [01:33] binary42 has joined the channel [01:38] noonat: ugghhh, this exit race condition is killing me [01:38] noonat: http://github.com/ry/node/issues/issue/120/#issue/120/comment/219772 [01:38] ncb000gt: which? [01:39] ncb000gt: ahh yea [01:39] Ned__: what's a good websocket module to use ? [01:40] noonat: ncb000gt: it breaks the tests too :( [01:40] ncb000gt: noonat: that's never good [01:41] ncb000gt: Ned__: I haven't used any but there is a list of the modules, http://wiki.github.com/ry/node/modules#ws-ajax [01:41] ncb000gt: sorry that i don't have an opinion [01:41] ncb000gt: first time for everything [01:41] ncb000gt: ... [01:41] creationix: Ned__: what are you looking to do with it? [01:41] creationix: I've got a super simple one [01:41] Ned__: creationix: not exactly sure yet ... [01:41] Ned__: but ultimately, looking to provide a "push" to web clients [01:42] Ned__: (aka chrome) [01:42] Ned__: and anything else that'll support it [01:42] creationix: mine aims to be a drop-in replacement for the tcp server in node [01:42] Ned__: I'll likely write some polling fallback [01:42] ncb000gt: Ned__: someone was boasting about Faye earlier today. [01:42] Ned__: Faye ? [01:42] ncb000gt: http://github.com/jcoglan/faye [01:43] siculars has joined the channel [01:43] creationix: cool, looks like a pubsub type system [01:43] creationix: http://github.com/websocket is mine, it's just websocket and just for node [01:43] ncb000gt: creationix: yea it seemed like it [01:44] ncb000gt: you mean http://github.com/creationix/websockethub.com/crA [01:44] ncb000gt: err [01:44] ncb000gt: http://github.com/creationix/websocket [01:44] ncb000gt: that [01:44] creationix: yeah, sorry [01:44] creationix: (I own github, mauahaha) [01:44] Ned__: creationix: ultimately it'd be nice to have one that integrated with the existing webserver [01:44] noonat: haha :D [01:44] Ned__: so they can be running on the same port [01:44] ncb000gt: hmm seems the kde or chrome folks have a slight issue with buffers [01:44] ncb000gt: also, lawl :) [01:44] Ned__: and you just have a particular URL for websockets [01:45] ncb000gt: so, my real question is, who's going to be the first person in the node community to put porn stars in their presentation? [01:45] ncb000gt: ACTION ducks [01:46] creationix: ACTION hopes is never happens [01:47] creationix: Ned__: I know micheil was working with _ry to get some sort of handoff from the http library [01:47] creationix: I would like to add that to my driver once I get back to working on it in a couple of weeks [01:48] Ned__: :_) [01:50] ncb000gt: creationix: hand it off as in, move out of core? [01:50] creationix: no, as in share the same port, but hand off to the websocket library [01:51] ncb000gt: ahh gotcha [01:51] ncb000gt: I was thinking back to the screaming earlier about API's and stablizing and such [01:51] ncb000gt: heh [01:52] MattJ: :) [01:53] polo has joined the channel [02:03] jamesduncan has joined the channel [02:05] ncb000gt: qq: is NODE_PATH checked before or after ~/.node_libraries? [02:06] creationix: ncb000gt: before I believe [02:06] ncb000gt: excellent [02:06] ncb000gt: I'm working on a "virtualenv" for node [02:06] creationix: (or so I've been told) [02:06] ncb000gt: and wanted to make sure that it's checking locally first [02:06] ncb000gt: I can always check the source to be sure [02:06] creationix: ncb000gt: cool, did you see my PATH based nvm [02:06] ncb000gt: but it was faster to look here [02:07] ncb000gt: no i hadn't, I saw nvm, but didn't see path based [02:07] ncb000gt: i'll check it out. [02:07] creationix: my version is purely a bash script that modifies PATH [02:07] creationix: visionmedia's version creates symlinks to /usr/local [02:07] ncb000gt: gotcha [02:08] ncb000gt: I really like the way virtualenv works in python [02:08] ncb000gt: so path based changes would be nice [02:09] creationix: It was a requirement for me since I have different versions of node running at the same time [02:09] ncb000gt: yea sure [02:10] creationix: so are you making a package manager to go with it ncb000gt? [02:10] ncb000gt: actually, yours might be better if instead of making people change their bash scripts you just make it so that there was an "activate" script that people sourced [02:10] ncb000gt: creationix: i wasn't planning on it, i was going to wait and see what people came up with [02:10] creationix: what do you mean change bash scripts [02:11] creationix: I just have them source the file to define the function [02:11] creationix: I recommend adding the source command to their profile to make it automatic [02:11] Aria: Eww. Symlinks are fail. Paths are win. [02:11] ncb000gt: "Then add three lines to your bash profile:" [02:11] creationix: how else would you make it automatic? [02:13] ncb000gt: when the person "--install"'s it, put an activate file, similar to http://bitbucket.org/ianb/virtualenv/src/tip/virtualenv_support/activate.sh, in the "$NVM_DIR/bin" dir [02:13] ncb000gt: then, when i wanted to use that version with the libs i put there i could just "source $NVM_DIR/bin/activate" [02:14] ncb000gt: and when i'm done [02:14] ncb000gt: $ deactivate [02:14] ncb000gt: all my paths go back to the way they were [02:14] ncb000gt: it's a way to keep all my libs and modules from getting in the way of each other [02:14] mfeiri_ has joined the channel [02:14] ncb000gt: and node versions [02:15] ncb000gt: it's not automatic, but it's less intrusive to the "setup i've become accustomed to" [02:15] creationix: hmm, I can add a deactivate command, but I think it's a lot easier to have the nvm function definition at login [02:15] ncb000gt: if that makes sense [02:15] ncb000gt: maybe so, [02:16] ncb000gt: I do recognize that yours is useful, but it doesn't do everything that I'd want, maybe I should just fork yours and add what I want to it... ;D [02:16] creationix: it's much easier to type "nvm use foo" instead of "source ~/.nvm/foo/activate.sh" [02:16] joshthecoder: is there a function to either example paths like "~/test" or a way to get the current user's home dir path? [02:16] micheil has joined the channel [02:16] creationix: joshthecoder: you should have access to the $HOME env variable [02:17] joshthecoder: creationix, ah good idea [02:17] creationix: ncb000gt: but yes, you're right, I should have a deactivate command [02:17] creationix: and maybe assume $HOME/.nvm for $NVM_DIR if it's not specified [02:18] ncb000gt: it doesn't appear that there is a libraries sandbox in there yet either [02:19] creationix: correct [02:19] creationix: feel free to add one though ;) [02:19] ncb000gt: ok, that's part of what i was aiming for, but I think i'm just going to fork yours [02:19] ncb000gt: :) [02:20] creationix: I plan on adding library environments, but I hadn't decided how I wanted it implemented [02:20] creationix: the simple case would be a space for each node version [02:20] ncb000gt: gotcha [02:20] creationix: but sometimes you want a space per application even [02:21] ncb000gt: a space per? you mean to delimit the libraries to include? [02:21] creationix: something like that [02:22] creationix: a separate set of modules in it's own folder for each node version and/or application [02:22] ncb000gt: hmm, yea. I'm used to spaces. was there a specific package manager you were planning to use? [02:22] creationix: then modify NODE_PATH [02:22] ncb000gt: exactly [02:22] ncb000gt: that is the part i was just working on in mine [02:22] creationix: no, I haven't dug into any package manager yet [02:22] ncb000gt: i'll add it and then you can critique away [02:23] creationix: I was thinking of adding a nvm command that installs the current lib dir into a specified space [02:23] ncb000gt: yea, i have a few ideas [02:23] creationix: so clone/download a library, then "nvm install-lib" to put it in the current active space [02:24] ncb000gt: it'd allow multiple sources for the libs to be pulled from. even command line options on install like --include-dot-node-libraries (too long, but you get the idea) [02:24] ncb000gt: and yea [02:24] ncb000gt: also, allowing someone to specify a file for the libs [02:24] ncb000gt: basically line delimited list of locations [02:25] ncb000gt: we use something similar where I work to make dependency management less of a nightmare [02:26] creationix: my current solution is a ton of git submodules in my application [02:26] ncb000gt: heh yea, i started doing that [02:27] creationix: basically inlining the dependencies as a local virtualenv [02:33] jamesduncan_ has joined the channel [02:35] ncb000gt: creationix: i'll take a look at it in a bit and will throw you a merge request when it's ready [02:35] creationix: cool, have fun [02:36] teadict has joined the channel [02:37] teadict: gee, this is a lot of people [02:38] derferman has joined the channel [02:42] KungFuHamster has joined the channel [02:42] KungFuHamster_ has joined the channel [02:42] inimino: welcome teadict [02:42] teadict: inimino: I thank thee [02:42] teadict: I may come back regulary, I might add [02:43] inimino: are you trying node? [02:43] KungFuHamster_ has left the channel [02:43] teadict: played and made some toyapps, yes [02:43] KungFuHamster has joined the channel [02:43] inimino: nice [02:44] teadict: nothing great nor creative, still learning, but y'know [02:44] KungFuHamster_ has joined the channel [02:44] inimino: sure [02:44] KungFuHamster has joined the channel [02:45] inimino: start small, take over the world :) [02:45] teadict: gotta see what happens when I include couchdb on the playground so I evaluate if I can make something worth the time [02:45] teadict: unless you have a better recomendation about client-side db tools and stuff [02:46] inimino: couchdb is nice [02:46] teadict: ACTION senses a but [02:46] inimino: or you can just use the filesystem... depending on what you need [02:46] teadict: right.. [02:47] inimino: or even an RDBMS [02:47] brainproxy has joined the channel [02:47] creationix: Did felixge ever finish node-dirty? [02:47] inimino: node has nice postgres bindings from what I hear [02:47] teadict: still haven't mapped correctly what tools (node, couch and everything that has appeared lately) is best for what job [02:47] inimino: creationix: I think it's still a WIP [02:47] creationix: I think it will rock for small projects [02:48] teadict: inimino: I should check out the current state of node's support then [02:48] softdrink has joined the channel [02:48] teadict: I guess SQLite is supported [02:49] inimino: creationix: I should probably look at it again... I don't remember what all it provided [02:49] creationix: inimino: it's real barebones, that's what I like about it [02:49] creationix: the only query api is a forEach/map function [02:49] inimino: I haven't heard much about SQLite lately, I think there was a binding [02:50] creationix: there is my wrapper around the sqlite3 using a child process and a native binding [02:50] creationix: I think they may both be dead from API rot though [02:50] inimino: yeah, likely [02:50] creationix: mine is under node-persistence [02:50] teadict: so most people here is contributing, nice [02:51] creationix: node is tons of fun, but the lack of libraries drives us to write out own [02:51] creationix: it's getting better, and the core node api is really starting to stabilize [02:51] teadict: I saw a lot of modules and apps listed in ry/node's github [02:51] teadict: creationix: I see [02:52] inimino: 0.2.0 is going to stabilize the API [02:54] teadict: so I saw a wikipedia table today on CommonJS implementations and noted that node.js is not the one with more modules implemented, yet it is the most famous and the one with greater community.. [02:54] creationix: node is much newer [02:54] creationix: and commonJS interop was never a primary goal [02:55] creationix: it was a cool project Ryan made for fun that people really seemed to like [02:55] teadict: isn't CommonJS goals the main goals? [02:55] teadict: aha.. [02:55] teadict: but is the project going to aim at CommonJS specs? [02:55] teadict: I mean, that's what will get JS out of the browser.. [02:56] teadict: and accepted [02:56] creationix: we try for commonjs compatibility when it's easy, but we don't constrain ourselves to the specs [02:56] teadict: fair enough [02:57] creationix: _ry believes that while well thought out specs are good, implementation and real-world needs should be the primary drivers for api decisions [02:57] creationix: the main problem is that node's core api is very different from narwhal's [02:57] tlrobinson: teadict: FWIW narwhal (which myself kriskowal and others work on) intends to fill in the commonjs gaps on node [02:57] teadict: and I agree, I was going to say specs are not meant to be followed by heart, but rather have them as guidelines, but only guidelines [02:57] creationix: yes, thanks tlrobinson [02:58] teadict: tlrobinson: nice [02:58] inimino: specs are meant to be improved [02:58] kriskowal: so are implementations [02:58] Aria: Indeed. And when there's good reason, issues raised. [02:58] creationix: ACTION was wondering with kriskowal and tlrobinson would chime in [02:58] kriskowal: but specs are really just meant to make it possible to use code on multiple engines [02:59] kriskowal: that neither are perfect *ever* is hardly material [03:00] Aria: A good plan is to get a relatively stable draft out. Get implementations to get to 80%. Then cut the spec to what's been done, and move the rest into another iteration. [03:00] tlrobinson: i'm fine with node not implementing commonjs completely, as long as it doesn't start duplicating the higher level APIs, but i think ry wants to keep it pretty low level [03:00] creationix: I think that's correct [03:00] kriskowal: the trick is that commonjs was started at a time when there were ten or so server side javascript implementations that all basically did the same thing in different ways [03:00] Aria: I'm loving the securable modules spec. It seems really sane. [03:00] inimino: there's not much CommonJS prior art on async APIs [03:01] Aria: The transports and packaging? Not so much. [03:01] kriskowal: so, everybody came in knowing they'd have to write new code to make their implementations interoperate [03:01] kriskowal: given that there's not much prior art in async apis in javascript, node is basically playing catch-up [03:01] creationix: and node's "no blocking io" policy made it near impossible to follow the commonjs of the time [03:01] noonat: yep [03:01] kriskowal: verily [03:01] inimino: node is leading the way, I'd say ;) [03:02] noonat: as long as commonjs continues to put out sync specs there's nothing you can do :/ [03:02] creationix: but as I understand commonjs now takes into account non-blocking apis? [03:02] noonat: they still don't have a filesystem spec w/ callbacks that i know of [03:02] kriskowal: even if some implementations support sync and others are async only, there's still a lot that can be common [03:02] teadict: nice, I though CommonJS already told people to do async io [03:02] teadict: *thought [03:02] inimino: that'll probably actually happen when there's more than one entirely- or mostly-async implementation [03:03] tlrobinson: teadict: i think most of us see the need for both async and sync, whereas node is only interested in async [03:03] noonat: it's folly to write things that can only work in sync mode though [03:03] creationix: though I was against it initially, I am glad node decided on a syc "require" [03:04] inimino: lots of modules don't need to do any I/O at all [03:04] creationix: I think that's a case where it's safe to bend the rules [03:04] teadict: tlrobinson: the need meanning some are more comfy working as we've always have and others popping callbacks all the time? [03:04] kriskowal: async commonjs apis will probably have to wait for node community members to start making proposals, which it is probably premature for anyway [03:04] creationix: yeah, we're still trying to figure out our own apis, let alone standardize it [03:04] kriskowal: we're working on laying groundwork for async specs, but there hasn't been a lot of progress, and probably can't be quite yet. [03:05] teadict: fun times, I see [03:05] creationix: teadict: so to answer your original question, node is still new [03:05] kriskowal: it's my hope though that we can proceed with the sync specs since they're irrelevant to node and very relevant to the other engines. we've been stalled on the async issue too long. [03:06] kriskowal: which i hope the node community does not take to mean we're not interested in asynchroneity [03:06] noonat: kriskowal: understandable, but a shame. :( sync can work with callbacks, even if it's not operating async. [03:06] noonat: but async can't work without them... so you're effectively writing off anything that implements that spec for any async use [03:07] kriskowal: yeah, but callbacks are perceived as the price for async, not the reward [03:07] creationix: kriskowal: so true [03:07] kriskowal: yeah, anything written for sync io won't work on node, and that's fine. [03:07] kriskowal: we just need to find the real common ground. [03:07] kriskowal: buffers for example [03:08] creationix: yes, buffers is a good one [03:08] kriskowal: and memory io has no need to be async [03:08] kriskowal: that could be common [03:08] tlrobinson: there's other trivial stuff that i think node should implement, like system.args and system.env [03:08] creationix: tlrobinson: you mean rename the ones we already have? [03:08] creationix: or do ours work different [03:08] kriskowal: right, but system.{stdio} is tricky [03:08] Aria: Hm. Interesting that that's called system. Java-like, in that it tries a bit to pretend the OS doesnt' exist. [03:09] kriskowal: the commonjs system spec depends on some definition of stdin,stdout,stderr, which we don't have. present implementations are sync. we need a separate spec for async system module. [03:09] kriskowal: Aria i don't think that was the intent. [03:09] tlrobinson: creationix: is node's args/env just an array and object? if so then yeah, it would be a rename to match commonjs [03:10] creationix: tlrobinson: yes [03:10] creationix: I just checked [03:10] kriskowal: node has process.{argv,env} which are equivalent to commonjs system.{args,env}, note the spelling of argv/args [03:10] creationix: though process.argv always has ["node", script, args...] [03:11] creationix: is that the same as commonjs? [03:11] kriskowal: in any case, we need to have a discussion on commonjs about how to carve out the future commonjs specification name space in anticipation of first class async apis, with future-proof versioned module names [03:11] tlrobinson: yeah, args[0] is the executable name [03:11] tlrobinson: well [03:11] creationix: cool [03:11] Aria: Hm. I must say I prefer Ruby's $0 / ARGV split. [03:11] tlrobinson: actually i'm not sure its the same [03:12] creationix: for example, if you execute a node script with a shebang line, it will still separate node and the script into two args [03:12] tlrobinson: creationix: narwhal only includes the script name, i think [03:12] kriskowal: we don't have a scripting spec yet. that's on the todo list [03:14] teadict: so, despite the current shaky status of node.. what could I use it for? I mean, real case use, say a client wants a emm.. small local system for administrating the stock on his store [03:14] teadict: could I adventure myself with node for those kind of things? [03:14] creationix: the core node api is pretty stable now [03:15] creationix: and http://wiki.github.com/ry/node/library-compatibility documents libraries that are known to work with the latest version [03:15] teadict: mhmmm.. [03:15] creationix: and any commonjs library that doesn't use IO should work fine [03:15] creationix: (unless it messes with binary data, then maybe not) [03:17] tlrobinson: i hope we won't see a lot of libraries unnecessarily coupled to IO. when i first started doing javascript outside the browser it drove me crazy when i'd come across some library that depended on the DOM when it really shouldn't have [03:17] Aria: Heh, yeah. [03:17] Aria: At least there's a working DOM now. . . [03:17] tlrobinson: Aria: in node? [03:18] teadict: Aria: how? [03:18] tlrobinson: is it pure JavaSCript? [03:18] tlrobinson: or node specific ;) [03:19] tlrobinson: http://github.com/tmpvar/jsdom [03:19] Aria: http://github.org/aredridel/env-js [03:19] Aria: That fork loads as a commonJS module. [03:19] tlrobinson: this is another thing i hate to see: require(__dirname + "/level1/core").dom; [03:19] Aria: No window* stuff yet, but basic DOM nodes work [03:19] tlrobinson: __dirname is a node thing [03:20] Aria: Oy. Yeah. __dirname is no good. NODE_PATH exists for a reason! [03:20] Aria: Set up an environment, then run your software! [03:20] Aria: Set up the sandbox and go! [03:20] noonat: or ./ it [03:20] noonat: which should work everywhere i think? [03:20] tlrobinson: yeah [03:20] kriskowal: the trick is that module.path is widely implemented on other engines [03:21] Aria: Yeah, though ./ tightly couples your software. [03:22] kriskowal: you mean relative require? [03:22] kriskowal: Aria^ [03:22] noonat: Aria: true. but it's better than __dirname :D [03:22] Aria: HEhe. Yeah. Yeah, it is. [03:23] Aria: I just wish that people'd use a good environment more often. [03:23] tlrobinson: huh? why is "./foo" any worse than __dirname + "/foo" [03:23] kriskowal: you know, ./ is meant to reduce coupling, but not all engines (even those on board for commonjs) are implementing it with top-level-id path search in mind [03:23] kriskowal: in narwhal, relative requires are very loosely coupled [03:24] tlrobinson: oh, right [03:24] kriskowal: the relative ids are resolved to top-level identifiers based on the calling module's top-level id and then path-searched, so the required modules are not coupled to the package that provides them. [03:24] kriskowal: but, at this point, narwhal is the only loader that does that. [03:25] kriskowal: the spec is silent on the issue. [03:25] PyroPete1 has joined the channel [03:52] icey has joined the channel [03:53] Yuffster_ has joined the channel [04:04] magcius has left the channel [04:10] ncb000gt: creationix: are you adding the deactivate function? [04:40] silentrob has joined the channel [05:12] mjr_ has joined the channel [05:13] mjr_: My battle with the neighbors for wifi supremacy rages on. [05:13] ncb000gt: lol [05:16] aconbere has joined the channel [05:18] mikeal1 has joined the channel [05:21] aconbere: so one thing I find myself having do a lot [05:21] aconbere: and is relatively tricky [05:21] aconbere: is track when async calls finish [05:21] aconbere: has anyone considered a kind of standard event object to be returned by async calls? [05:22] aconbere: (I'm sure they have, I'm just asking to be brought up to speed :-) [05:24] aconbere: sys.stat("./myFile").addListener("finished", function(e) { sys.log("has finished"); }); [05:24] aconbere: but you know... with the callback to stat in there :) [05:25] mjr_: There are a few different libraries that people use. [05:26] mjr_: I tend to just write it all out with multiply nested anonymous functions. [05:26] aconbere: yeah, I've seen a lot of counters outside of the callback [05:26] aconbere: and incrementing and decrementing [05:26] aconbere: it just seems like... since async function calls dont' return anything anyway [05:27] aconbere: ... [05:27] aconbere: having them return an object that counts for you would be nice :) [05:28] mjr_: creationix produces many fine libraries such as this one: http://github.com/creationix/step [05:33] cruxst has joined the channel [05:36] stepheneb has joined the channel [05:41] nsm has joined the channel [05:44] admc_ has joined the channel [05:44] admc has joined the channel [05:58] tek has joined the channel [06:00] aconbere: mjr_: I looked at conductor the other day [06:00] aconbere: but that seemed insane [06:17] aconbere: Step seems more sane [06:20] sudoer has joined the channel [06:29] mjr_: Yeah, I don't use either of them. I prefer working with low level APIs. [06:32] neytema has joined the channel [06:32] cainus_ has joined the channel [06:42] rictic has joined the channel [07:01] Nohryb has joined the channel [07:15] Nohryb has joined the channel [07:18] dnolen has joined the channel [07:18] mikeal1 has joined the channel [07:25] qFox has joined the channel [07:29] micheil has joined the channel [07:40] bpot has joined the channel [07:42] teemow has joined the channel [07:51] zimbatm has joined the channel [08:00] piranha has joined the channel [08:09] nsm has joined the channel [08:13] saikat has joined the channel [08:30] xla has joined the channel [08:31] ewdafa has joined the channel [08:57] xla has joined the channel [09:05] javajunky has joined the channel [09:14] hellp has joined the channel [09:15] Nohryb has joined the channel [09:17] aconbere has joined the channel [09:24] zimbatm has joined the channel [09:31] javajunky has joined the channel [09:35] zimbatm has joined the channel [09:47] ditesh|cassini has joined the channel [09:53] zimbatm has joined the channel [09:55] ditesh|cassini has joined the channel [10:03] malkomalko has joined the channel [10:07] javajunky has joined the channel [10:13] zimbatm has joined the channel [10:15] javajunky has joined the channel [10:28] zimbatm has joined the channel [10:32] pjb3 has joined the channel [10:39] zimbatm has joined the channel [10:57] nsm has joined the channel [11:03] alxc1 has joined the channel [11:10] zimbatm has joined the channel [11:10] polo has joined the channel [11:18] herbySk has joined the channel [11:19] tisba has joined the channel [11:22] keeto has joined the channel [11:23] jedschmidt has joined the channel [11:54] zackattack has joined the channel [12:05] micheil has joined the channel [12:18] maushu has joined the channel [12:22] creationix has joined the channel [12:23] mape: Ned__: http://github.com/mape/node-prowl is fully operational on 0.1.9 now, if you felt like taking a look :) [12:27] pdelgallego has joined the channel [12:33] creationix has left the channel [12:33] creationix has joined the channel [12:33] jedschmidt has joined the channel [12:50] Nohryb has joined the channel [12:51] technoweenie has joined the channel [12:51] javajunky has joined the channel [12:58] creationix: ncb000gt: you can add it, it will be a day or two before I can get to it [13:08] kjeldahl_ has joined the channel [13:19] teemow has joined the channel [13:25] noonat has joined the channel [13:33] pkrumins: any way to create Buffer of unknown size? [13:34] noonat: herbySk: does that EPIPE issue also happen with node_g? [13:34] herbySk: noonat: yes [13:35] kixxauth has joined the channel [13:37] pkrumins: seems not [13:37] ashb: pkrumins: no they are fixed sized [13:38] pkrumins: what is the best strategy to store binary data coming from a stream then? [13:38] pkrumins: I used a var buf = '' so far [13:38] pkrumins: and then buf += chunk [13:40] ashb: using strings for binary data makes me *very* uneasy [13:40] noonat: pkrumins: you could just allocate new buffers as needed and maintain a stack of them [13:41] pkrumins: oh yes, i could do that. or i could just hack node_buffer.cc [13:41] pkrumins: and make it realloc [13:42] ashb: something like boost::asio::buffer's might be cool. it basically presents a single view over an array of immutable buffers [13:43] noonat: pkrumins: indeed... there's a potential overhead there if it needs to copy things into a new block of memory [14:03] jacobat has left the channel [14:03] ssteinerX has joined the channel [14:15] pjb3 has joined the channel [14:23] binary42 has joined the channel [14:47] ncb000gt: how is everyone today? [15:06] mfeiri_ has joined the channel [15:07] bradleymeck has joined the channel [15:08] bradleymeck: what would be the standard way to connect to a database from a node script? [15:09] ncb000gt: which db are you looking to connect with? [15:10] ncb000gt: there are a list of modules that provide database access [15:10] ncb000gt: http://wiki.github.com/ry/node/modules#database [15:10] ncb000gt: *is a list [15:10] bradleymeck: both mysql and sqllite, mmm ill look at those [15:11] ncb000gt: ok, there isn't a standard interface afaik [15:11] ncb000gt: but these will give you access to them and you could likely write an intermediary layer that you can work with in your project [15:13] bradleymeck: ty much! [15:14] ncb000gt: sure :) [15:14] tekky has joined the channel [15:22] sveisvei: Anyone know wich openssl version we need for 1.92? [15:22] mape: anyone know of a good nodejs twitter list? [15:22] sveisvei: ..running fedora 12 and make is failing [15:22] nsm has joined the channel [15:24] ncb000gt: sveisvei: OpenSSL> version [15:24] ncb000gt: OpenSSL 0.9.8g 19 Oct 2007 [15:24] ncb000gt: that's what i'm running on Kubuntu [15:25] ncb000gt: and it [15:25] ncb000gt: 's working [15:25] ncb000gt: tho i do have an issue with connections in the http server stuff [15:25] ncb000gt: i haven't been working with it [15:25] ncb000gt: that said it does compile [15:26] ncb000gt: sveisvei: you running on a x86_64? [15:26] bpot has joined the channel [15:32] xla has joined the channel [15:32] ditesh|cassini has joined the channel [15:38] sveisvei: ncb000gt: Yeah, and running OpenSSL 1.0.0-beta4 [15:39] sveisvei: thats whats shipped with fe12 [15:39] ncb000gt: hmm, that's likely the issue, tho i should also likely upgrade my stuff [15:39] ncb000gt: :) [15:40] ncb000gt: what's the error you get? [15:43] sveisvei: ncb000gt: Build failed: -> task failed (err #1): {task: cxx node_crypto.cc -> node_crypto_5.o} [15:44] ncb000gt: no actual build error? [15:44] sveisvei: 1 sec, ill put in a gist [15:45] ncb000gt: excellent [15:45] ncb000gt: :) [15:48] sveisvei: http://gist.github.com/378492 [15:48] hellp has joined the channel [15:52] herbySk has joined the channel [15:54] ncb000gt: i don't have the issue, but try going into node_crypto.cc and change line 12 to: [15:54] ncb000gt: #if OPENSSL_VERSION_NUMBER >= 0x1000000fL || OPENSSL_CONST == null [15:55] maritz has joined the channel [15:55] ncb000gt: or rather, if you'd like to just wait for _ry to fix it properly [15:55] ncb000gt: you could for the define [15:55] ncb000gt: as recommended by http://permalink.gmane.org/gmane.comp.lang.javascript.nodejs/5270 [15:56] ncb000gt: there is a check in for the version of openssl to define what you were missing [16:00] sveisvei: oki [16:01] ncb000gt: hmm [16:01] ncb000gt: actually it looks like _ry might have miscounted in his numbers [16:02] ncb000gt: try removing one of the 0 [16:02] ncb000gt: 's [16:02] micheil: It is always odd when someone finds your old code still works and is helpful.. :D [16:02] ncb000gt: that should be 1.0.0 i'f i'm reading the docs correctly [16:02] ncb000gt: micheil: yea :) [16:03] micheil: ACTION came across someone using a forked version of his smtp library.. turned out it worked fine [16:03] micheil: I've really gotta get round to rebuilding that some day [16:03] ncb000gt: sveisvei: per http://www.openssl.org/docs/crypto/OPENSSL_VERSION_NUMBER.html there should be 7 digits representing 1.0.0 [16:03] ncb000gt: that includes the f [16:03] micheil: rework it from the ground up kinda stuff [16:03] ncb000gt: but it looks like in node_crypto.cc it's checking for 8 digits [16:03] ncb000gt: not 7 [16:03] Nohryb has joined the channel [16:05] ncb000gt: hmm [16:05] ncb000gt: per a thread in the forums it looks like on fedora you might have 0x10000003L [16:05] ncb000gt: err 0x10000003L as the version [16:05] ncb000gt: i guess it is 8 [16:05] ncb000gt: so you might want to just change that f to a 3 [16:06] ncb000gt: http://groups.google.com/group/nodejs/browse_thread/thread/f12bf3764da3fda3/99f52924d8d407e1?hl=en#99f52924d8d407e11 [16:11] sveisvei: worked at least :), sry for not spotting that in the list :) [16:11] ncb000gt: no worries [16:11] ncb000gt: sorry for the roundabout answer ;D [16:13] jamesduncan has joined the channel [16:24] siculars has joined the channel [16:28] gwoo has joined the channel [16:39] zackattack has joined the channel [16:41] alex-desktop has joined the channel [16:42] ditesh|cassini has joined the channel [16:43] rictic has joined the channel [16:48] dnolen has joined the channel [16:59] Yuffster has joined the channel [17:02] inimino: ACTION wonders if Devon read the blog post I linked to... [17:08] ncb000gt: creationix: you around? [17:15] admc_ has joined the channel [17:15] admc has joined the channel [17:31] sudoer has joined the channel [17:31] RayMorgan has joined the channel [17:32] malkomalko has joined the channel [17:34] tlrobinson_ has joined the channel [17:38] sudoer has joined the channel [17:41] rednul has joined the channel [17:45] silentrob has joined the channel [17:52] saikat has joined the channel [17:55] mfeiri_ has joined the channel [17:55] sh1mmer has joined the channel [17:59] creationix has joined the channel [17:59] RayMorgan_ has joined the channel [17:59] creationix: ncb000gt: what's up [18:03] ncb000gt: Soo...I was thinking about it last night and came to the conclusion that adhoc libs would be kindof a pita, so i decided to build a really dumb repo using couchdb [18:03] ncb000gt: hold on [18:03] ncb000gt: i'll try to open up the port to show [18:03] bpot has joined the channel [18:03] tek has joined the channel [18:04] ncb000gt: try http://home.digitaltumbleweed.com:5984/nodehouse/_design/nodehouse/index.html [18:05] ncb000gt: so then, from nvm it'd be easy to do something like: [18:06] ncb000gt: curl -X POST http://home.digitaltumbleweed.com:5984/nodehouse/_design/nodehouse/_view/allProjects -d '{"keys":["node.bcrypt.js"]}' | less [18:07] ncb000gt: adding projects works fine, but requires someone to accept it within Futon (atm). [18:07] ncb000gt: this allows for a little bit of control over what goes into the repo [18:07] ncb000gt: and it'd be easy enough to add other types of filters for versions and so forth [18:08] inimino: ncb000gt: I'm using something somewhat similar [18:08] ncb000gt: what this does it makes it so that someone can specify where to get the source: git repo, tar, etc. [18:08] ncb000gt: inimino: whereat? [18:09] inimino: ncb000gt: http://boshi.inimino.org/3box/ [18:09] inimino: ncb000gt: it's mostly just GET, PUT, DELETE [18:10] inimino: and MOVE [18:10] ncb000gt: gotcha [18:11] inimino: hm, maybe not quite the same :) [18:11] ncb000gt: heh yea, not exactly :) [18:11] inimino: I think I just figured out what yours is about [18:11] ncb000gt: thoughts? i love critiques. :) [18:12] inimino: so this is like a directory for node modules? [18:12] ncb000gt: yea, a directory, and then i'll be writing a bit of code to allow for lib installs for nvm [18:13] inimino: ok, nice [18:13] ncb000gt: what could be nice about this is that, it's opensource so anyone can make their own repo if they want, and then it'll just have a single list of repos to check in the nvm stuff [18:13] inimino: so you can tell nvm to look there, and then do something like 'nvm install foo'? [18:13] ncb000gt: assuming creationix thinks it's worth including [18:14] ncb000gt: more or less [18:14] ncb000gt: it'd be more like nvm install-lib foo or nvm install-lib foo:version# or nvm install-lib repo:foo [18:14] ncb000gt: or something similar to that [18:14] ncb000gt: or a combination thereof [18:15] ncb000gt: so that you can specify the repo you want, the lib you want, and the version of it, if you want [18:15] inimino: ok [18:15] inimino: have you looked at npm? [18:16] ncb000gt: a little [18:16] mape: ncb000gt: So it is more a package manager rather then an online repo like jq plugins page? [18:16] ncb000gt: mape: the listing will be just that, but the ultimate reason for doing it is to have the access from a tool like nvm [18:17] mape: k [18:21] ncb000gt: inimino: npm looks interesting, maybe I can hook into that instead...we'll see. might be more than what I need. [18:23] nsm has left the channel [18:24] creationix: ncb000gt: sorry, I'm in and out today (more out than in) [18:24] ncb000gt: no worries, i'm about to go get some grub [18:25] ncb000gt: i'll bbiab [18:25] creationix: cool, I won't be able to scheme today, Sunday is play with the kids day [18:25] ncb000gt: :) enjoy [18:34] CodeOfficer has joined the channel [18:41] maushu has joined the channel [18:48] mkovacs has joined the channel [18:49] softdrink has joined the channel [18:59] jedschmidt has joined the channel [19:04] isaacs has joined the channel [19:04] fizx has joined the channel [19:06] jamesduncan has joined the channel [19:07] aconbere: http://gist.github.com/378633 [19:07] aconbere: that's my little attempt at an event emitter fucntion wrapper for async functions [19:10] aconbere: heh... couple dumb bugs still :-/ [19:12] Nohryb has joined the channel [19:18] aconbere: fixed [19:20] malkomalko has joined the channel [19:23] fizx has joined the channel [19:30] herbySk has joined the channel [19:38] steadicat has joined the channel [19:47] demolithion has joined the channel [19:47] javajunky has joined the channel [19:51] sh1mmer has joined the channel [19:55] drostie has joined the channel [20:05] admc_ has joined the channel [20:05] admc has joined the channel [20:07] SamuraiJack_ has joined the channel [20:09] dnolen has joined the channel [20:10] RayMorgan has joined the channel [20:15] KungFuHamster: so what's the best mysql module to use these days? [20:15] mape: node-mysql [20:15] KungFuHamster: k, thanks [20:16] SamuraiJack_: hello [20:17] SamuraiJack_: is there a library to connect to Postgres? [20:17] SamuraiJack_: from node [20:18] Ned__: .lastlog Ned__ [20:18] Ned__: err, whoops [20:19] mape: SamuraiJack_: http://wiki.github.com/ry/node/modules#database [20:19] mape: Ned__: Ha ha! Look at prowl :P [20:19] SamuraiJack_: mape: thanks [20:19] Ned__: yup, will do :-) [20:19] mape: Anyone in here have an aeron chair? [20:19] ropiku has joined the channel [20:21] kjeldahl_: Anybody know what's up with Socket.IO? I get "node http server: TypeError: Cannot set property 'use_chunked_encoding_by_default' of null" on the server when testing the chat example. [20:23] Aria has joined the channel [20:23] javajunky: I'm not sure how to date Socket.IO is [20:23] isaacs: inimino: hey, yt? [20:24] javajunky: err 'uptodate' with node that is. [20:24] isaacs: inimino: even when running http://boshi.inimino.org/3box/PanPG/js_pp/js_pp.3box in Firefox safe mode, without any extensions, I'm seeing too much recursion [20:25] kjeldahl_: javajunky: Ok, thanks. Assuming I can live with websocket only support right now, any idea which lib is "recommended" right now? [20:25] inimino: isaacs: hm, that's really weird [20:26] inimino: isaacs: do you see a little link that says 'stack' after that? [20:26] isaacs: yeah [20:26] inimino: if you click it it's supposed to show up on the right [20:27] isaacs: inimino: http://gist.github.com/378694 [20:27] inimino: thanks [20:27] inimino: isaacs: btw I think the Safari bug is really squashed, but I had to go to great lengths to get Safari to actually load the new code... it seems to have some weird caching behavior with workers that I don't really understand [20:28] isaacs: yeah, safari seems like it's working [20:28] isaacs: it'd still be better to have a cli version stubbed out. [20:28] isaacs: i'm hoping to do something like pretty.js ugly-fixed.js [20:29] javajunky: kjeldahl_: there's a bunch of em on here http://wiki.github.com/ry/node/modules#ws-ajax [20:29] cruxst has joined the channel [20:30] kjeldahl_: javajunky: Thanks. Socket.IO is number three on that list. I've tried a couple, but they seem to be too old/not supported for later versions of node. [20:30] javajunky: kjeldahl_: the one I heppen to be using is this one : http://github.com/ncr/node.ws.js [20:30] inimino: isaacs: yeah, I'll make a CommonJS module-ized version Monday or so, and then test it with node [20:30] javajunky: it works with 0.1.91 (and I can't see why it wouldn't work with 0.1.92) [20:31] javajunky: but miksago I think was working on a fully spec compliant one as well [20:31] javajunky: (micheil) [20:32] isaacs: inimino: that'd be cool [20:36] inimino: ah... too much recursion is an error Firefox gives sometimes in the parser [20:36] kriskowal has joined the channel [20:36] inimino: I bet that's what's going on [20:37] inimino: it has some arbitrary limits on expression nesting depth... which I sometimes hit with machine-generated code [20:37] inimino: that doesn't explain why it doesn't happen here, though [20:55] Ned__: is there a tutorial somewhere that explains how to write classes/modules ? [20:55] Ned__: I think I have a pretty good idea, but it'd be nice to just confirm some of my suspicions [21:05] N` has joined the channel [21:10] jedschmidt has joined the channel [21:16] pedro has joined the channel [21:23] darkf has joined the channel [21:31] bpot has joined the channel [21:33] mattly has joined the channel [21:48] KungFuHamster: hmm node-mysql is giving me an "unspecfied" [sic] error [21:54] kriskowal has joined the channel [21:59] digitalspaghetti has joined the channel [22:01] mape: really? [22:01] mape: I'm using it right now [22:02] KungFuHamster: are you using it with 0.1.92? [22:02] KungFuHamster: @mape [22:02] mape: v0.1.92-4-g610faf7 [22:03] mape: 9a7506630fe222e21c6c29d03d414a80fa46338f [22:03] mape: for node-mysql [22:03] KungFuHamster: I downloaded the zip ball masuidrive-node-mysql-9a75066.zip [22:03] KungFuHamster: like 30 minutes ago [22:04] kixxauth has joined the channel [22:04] mape: git clone and try that? [22:05] KungFuHamster: yeah I can try that [22:05] aho has joined the channel [22:07] KungFuHamster: ACTION naps while git downloads the files. [22:07] icey has left the channel [22:10] RayMorgan has joined the channel [22:11] KungFuHamster: hmm same error [22:11] tav has joined the channel [22:16] cruxst has joined the channel [22:31] KungFuHamster: well the dev just added support for 0.1.92 in the last couple days, so I guess I'll wait a few days and see if any bugfixes go in... I dunno how to troubleshoot an unspecified error [22:32] mape: yeah [22:32] mape: what system do you run it on? [22:33] dnolen has joined the channel [22:35] KungFuHamster: sorry.. it's a CentOS 5.3 server [22:35] mape: hmm k [22:35] mape: I run it on debian 4 [22:35] mape: latest from github [22:36] KungFuHamster: 64 bit if that makes any difference [22:36] mape: same [22:37] KungFuHamster: using node-crypt? [22:38] mape: no [22:38] KungFuHamster: me neither [22:38] derbumi has joined the channel [22:44] ncb000gt: node_crypto was moved into the latest node iirc [22:44] ncb000gt: but that shouldn't matter. [22:49] KungFuHamster: doh and I just installed hashlib [22:58] bpot has joined the channel [22:59] pjb3 has joined the channel [23:07] Nohryb has joined the channel [23:14] RayMorgan has joined the channel [23:14] RayMorgan: just got a Node.js shout out at jQuery conf [23:15] RayMorgan: by Paul Bakaus who is writing a realtime game engine for the browser. Very, very impressive stuff. [23:17] mape: nice [23:18] RayMorgan has joined the channel [23:20] sveimac has joined the channel [23:29] mape: know paul irish looked at it as well so [23:29] mape: seems there is some overlap [23:37] admc_ has joined the channel [23:37] admc has joined the channel [23:46] isaacs: anyone know offhand if there's a way to shell to a script from node, and still maintain user-input to the child process? [23:47] isaacs: like, do a child_process.spawn("more", ["some-file"]) and let the user page up and down in it [23:56] RayMorgan has joined the channel [23:58] softdrink has joined the channel