[00:07] marienz has joined the channel [00:21] isaacs has joined the channel [00:23] darkf has joined the channel [00:36] technoweenie has joined the channel [00:41] technoweenie has joined the channel [00:43] tmpvar: hey guys, is there a way to send a string to stderr? ie: sys.err() or similar? [00:43] tmpvar: ah [00:43] tmpvar: RTFM nubsauce, process.stdio.writeError(data) [00:43] tmpvar: :) [00:50] technoweenie: so is kiwi the shit [00:50] orlandov: you tell us :) [00:51] technoweenie: not sure, i just saw node-redis-client is using it [00:59] tisba_ has joined the channel [01:05] technoweenie: is brian hammond in here [01:16] jashkenas has joined the channel [01:22] charlesjolley has joined the channel [01:26] mattly has joined the channel [01:28] ditesh|cassini has joined the channel [01:42] technoweenie: hey how can you check if a js hash/object is empty [01:42] technoweenie: assert.equal({}, foo.bar) gives me AssertionError: {} == {} [01:43] jashkenas: In Node, you can use Object.keys(obj).length == 0 [01:44] jashkenas: But in the browser you're going to have to use a for-in loop, with hasOwnProperty to check. [01:44] technoweenie: whoa [01:45] jashkenas: See _.isEmpty here: http://github.com/documentcloud/underscore/blob/master/underscore.js#LC491 [01:45] technoweenie: thanks, is Object.keys node specific [01:45] jashkenas: It's ECMA5. [01:46] jashkenas: But isn't even in current Safari yet, much less IE. [01:47] pjb3 has joined the channel [01:48] mattly has joined the channel [01:48] ditesh|cassini has joined the channel [01:49] ddollar: sorry for the newb question, but cant find a good way to search for it.. does javascript have the equivalent of * in ruby.. i have an array [1,2,3] and want to call a function with the elements as args fun(1,2,3) [01:49] jashkenas: ddollar: yep. [01:49] jashkenas: fun.apply(context, [1, 2, 3]) [01:49] jashkenas: Where context will be the value of "this" within the function. [01:49] ddollar: excellent, thanks :) [01:49] isaacs: _ry: removing require.* cuts out about 300 LoC [01:50] pjb3 has left the channel [01:50] isaacs: http://github.com/isaacs/node/commit/30f973512ec16acbb27107d5b37875185bf0f43b [01:51] isaacs: technoweenie: use assert.deepEqual [01:52] isaacs: node> assert.deepEqual({}, {}) // doesn't throw [01:52] technoweenie: oh sweet, thanks [01:56] RayMorgan has joined the channel [02:00] confounds has joined the channel [02:03] cloudhead has joined the channel [02:03] gf3 has joined the channel [02:07] _ry: isaacs: oo. :) [02:07] isaacs: _ry: now i'm trying to see how few lines i can manage to add by putting it back. [02:07] isaacs: because require.async is kinda nice. [02:07] isaacs: thing is, it's always the waitOnChildren bit that makes it a pita. [02:08] isaacs: the more i play with this, the more i think that require.ensure is actually the way to go. way more reliable, and easier to do outside of the engine itself. [02:10] dgathright has joined the channel [02:13] deanlandolt: isaacs: http://github.com/kriszyp/web-modules [02:13] isaacs: deanlandolt: See what i'm sayin!! [02:13] isaacs: _ry: i think that settles it. [02:14] isaacs: _ry: let's kill require.async. kriszyp's thing is better anyhow, and it's what commonjs is heading towards. [02:14] deanlandolt: isaacs: i agree with the first part, i don't know about the second :) [02:14] isaacs: deanlandolt: well, it doesn't have the problems that require.async raises. [02:14] deanlandolt: in any event, it'll play nice w/ commonjs require [02:15] deanlandolt: yeah -- this is definitely out of my pay grade, but i've been mulling over the web-modules stuff and i think i actually _understand_ it, which is a pretty good start [02:16] quirkey has joined the channel [02:16] mattly has joined the channel [02:17] isaacs: in any event, http://github.com/kriszyp/web-modules seems like the place where funky non-standard crazy bikesheddable interesting cleverness should be. [02:17] isaacs: nodejs should just have the boring simple stuff that works all the time. [02:17] deanlandolt: exactly [02:18] deanlandolt: web-modules will let you do the requisite overlays to make a package work w/ node or narwhal or whatever the hell else [02:18] _ry: oh if i could only go back in time [02:18] jashkenas: _ry: for what? [02:19] deanlandolt: jashkenas: to undo require IIUC...but i think that's crazytalk [02:19] _ry: i'd rather just have web-style "modules" [02:19] _ry: e.g. normal name spacing [02:19] jashkenas: _ry: ah. It's not too late. [02:19] deanlandolt: _ry: but that's all still possible -- nothing ventured and all that :) [02:20] isaacs: it seems to me that loading up a program from a bunch of files on the filesystem really works well, and is simple and easy to understand. [02:20] isaacs: and, if it's strictly a load-time operation, then there's really no hazard involved, because being slow there is no big deal. it's still way faster than starting up most other systems. [02:21] deanlandolt: isaacs: but how's that differnet than require as it is? or are you arguing require-as-it-is is just fine, just no extensions? [02:21] isaacs: deanlandolt: exactly. [02:21] isaacs: require() == great. require.async, require.ensure, require.uncached, all belong in userspace. [02:22] deanlandolt: no doubt [02:22] isaacs: just like how browsers give you