....
[20:59] softdrink: ACTION experiments
[20:59] pieterv has joined the channel
[21:00] stuross: anybody have any experience running geolocation queries in mongoose?
[21:00] jimt_ has joined the channel
[21:00] JamieD: is the "engine" attribute required in package.json?
[21:00] bradleymeck: no
[21:01] softdrink: damnit. it actually interpreted the url as "attr(data-assignedTo)"… that exact string
[21:01] tjholowaychuk: softdrink: hah, knew it
[21:01] tjholowaychuk: lame
[21:01] softdrink: fuuuuuu
[21:01] Roconda has joined the channel
[21:01] francescop has joined the channel
[21:01] mraleph: ryah: btw. I thought a bit about your fast long stack-traces. if you are willing to sacrifice precision and go "dirty" way you can do the following: memcpy top of the stack (say 100 words), then offload it's decoding into a separate thread. it should be pretty safe to do that decoding without sync, it mostly depends on immutable data, the only thing you need to catch is GC… do you plug a small syncronization barrier into GC prologue that either
[21:01] softdrink: ok, plan Q....
[21:01] tjholowaychuk: whoever decided a non-string would be valid should be shot
[21:02] ryah: mraleph: i'd just do the copy in c
[21:02] francescop has left the channel
[21:04] mraleph: after you did a copy you need to decode it somehow before gc invalidates interesting parts
[21:05] fizx has left the channel
[21:06] MikeMakesIt has joined the channel
[21:09] jimt has joined the channel
[21:14] jimt_ has joined the channel
[21:14] void_ has joined the channel
[21:15] ajashton has joined the channel
[21:17] atmos has joined the channel
[21:18] atmos: are there any libraries for doing time ago in words style stuff
[21:18] atmos: basically take a Date object and say "1 day 6 hours 5 minutes ago"
[21:19] coobr has joined the channel
[21:19] EyePulp: atmos: http://www.datejs.com/
[21:20] bradleymeck: isaacs would the '-' in node-ffi cause issues when requiring it for some reason?
[21:23] robotarmy has joined the channel
[21:24] sooli has joined the channel
[21:26] isaacs has joined the channel
[21:27] kollektiv has joined the channel
[21:27] dthompson has joined the channel
[21:27] tjholowaychuk: does npm not work with 0.2.x anymore?
[21:27] isaacs: tjholowaychuk: nope.
[21:27] Kingdutch has joined the channel
[21:27] tjholowaychuk: oh
[21:28] tjholowaychuk: awesome
[21:28] isaacs: tjholowaychuk: it depends on the node_modules and setting the uid/gid in child processes
[21:28] walkah: sadly it doesn't seem to work with 0.4.0 either :P
[21:28] isaacs: walkah: so, it definitely *should* work on 040
[21:28] tjholowaychuk: will revert to an older version i guess
[21:28] isaacs: bradleymeck: not sure what you mean.
[21:28] walkah: isaacs: npm install jerk (e.g.) on 0.4.0 / 0.3.0-6 on osx just hangs
[21:28] walkah: at tar
[21:29] atmos: EyePulp: have you used the datejs npm package ?
[21:29] tjholowaychuk: ACTION should not have updated
[21:29] isaacs: walkah: sudo!!!
[21:29] bradleymeck: nm, found the issue, node-ffi didnt use `main` in package.json on 0.4.0
[21:29] isaacs: walkah: sudo npm install jerk
[21:29] isaacs: walkah: and/or `npm cache clean` to remove old stuff
[21:29] EyePulp: atmos - nope
[21:29] atmos: yeah, doesn't seem to work :\
[21:29] walkah: isaacs: i'll give both a shot and let ya know
[21:29] intrect has joined the channel
[21:29] isaacs: bradleymeck: yep, that's another thing. no more module mapping. no more shims. specify a main, that's it.
[21:29] isaacs: bradleymeck: more of the module loading stuff was moved into node-core, and cleaned up and simplified in the process.
[21:29] atmos: ACTION turned that sudo shit off
[21:29] bradleymeck: although some odd stuff trying to fix to get node-bigint working
[21:31] bradleymeck: substack you there?
[21:33] dgathright has joined the channel
[21:33] walkah: isaacs: after a sudo npm cache clean, sudo install npm jerk still fails here:
[21:34] walkah: npm verb success tar "-mvxpf" "-" "-C" "/tmp/npm-1297978338683/1297978338683-0.9307855712249875/contents"
[21:34] tjholowaychuk: does EventEmitter have removeAllListeners() without an event?
[21:34] tjholowaychuk: or do you have to supply the event
[21:34] isaacs: walkah: ok, so.. that's succeeding...
[21:34] isaacs: walkah: what's the next line?
[21:34] tahu has joined the channel
[21:34] warz has joined the channel
[21:34] isaacs: walkah: or better yet, can you just gist the whole thing?
[21:34] tjholowaychuk: and if so, is anyone against having removeAllListeners() remove them all?
[21:34] walkah: isaacs: the next line is to peg cpu and just start eating ram :P
[21:35] walkah: isaacs: gist coming
[21:35] isaacs: walkah: hm... nvm, reproducing
[21:35] dthompson has joined the channel
[21:35] walkah: isaacs: https://gist.github.com/832762
[21:35] isaacs: walkah: you found a good one!
[21:35] isaacs: :)
[21:36] walkah: isaacs: cookie! I want a cookie! :)
[21:36] walkah: isaacs: i thought i'd hosed my setup, but confirmed with a friend that it wasn't working for him either
[21:36] isaacs: yep
[21:36] isaacs: wonder why it works for so many other libs
[21:37] walkah: oh, if you let it run for long enough - i did ultimately get this:
[21:37] walkah: FATAL ERROR: CALL_AND_RETRY_2 Allocation failed - process out of memory
[21:37] mraleph: hehe
[21:38] mraleph: moar memory
[21:38] kjeldahl has joined the channel
[21:38] walkah: mraleph: it's a pretty intense irc bot ;-)
[21:39] isaacs: walkah: i see it. it's creating an infinitely large array of filenames. stat/lstat fail
[21:39] isaacs: stupid #*@$@& symlinks
[21:40] isaacs: :)
[21:40] walkah: isaacs: nice find!
[21:40] eaton has joined the channel
[21:40] eaton: ACTION pokes his head in. Ahaaa. So this is where the cool kids live.
[21:41] walkah: ACTION pokes eaton in the eye
[21:41] isaacs: walkah: ok, so, there seems to be some issue with bundled deps
[21:41] isaacs: walkah: the lstat thing is easy enough to resolve, but there's some other issue.
[21:41] isaacs: digging into it now
[21:42] walkah: isaacs: right on. thanks!
[21:42] cronopio has joined the channel
[21:43] bartt has joined the channel
[21:43] slaskis: ACTION is frustrated with streams
[21:43] walkah: slaskis: did you cross them?
[21:44] slaskis: hah, i'm trying to queue them up actually
[21:44] spetrea-home has joined the channel
[21:44] slaskis: thinking pause/resume would suffice
[21:44] mnot has joined the channel
[21:44] slaskis: but i just keep getting bad argument errors when trying to resume it
[21:45] halfhalo has left the channel
[21:45] halfhalo has joined the channel
[21:45] halfhalo has left the channel
[21:45] halfhalo has joined the channel
[21:47] davidascher has joined the channel
[21:47] slaskis: anyone have an implementation which sequences stream read/writes?
[21:47] __tosh has joined the channel
[21:47] jakehow has joined the channel
[21:49] therrg has joined the channel
[21:49] b_erb has left the channel
[21:51] mikedeboer has joined the channel
[21:52] admc has joined the channel
[21:52] fizx has joined the channel
[21:52] herbySk has joined the channel
[21:55] zomgbie has joined the channel
[21:56] isaacs: walkah: turns out that jerk actually has invalid stuff in its bundle
[21:56] bradleymeck: rbranson about?
[21:56] isaacs: walkah: half-uninstalled packages.
[21:56] fizx_ has joined the channel
[21:57] stephen_mcd has joined the channel
[21:58] walkah: isaacs: gross!
[21:58] isaacs: walkah: i got a workaround.
[21:59] jimt has joined the channel
[21:59] walkah: isaacs: sounds like an issue against jerk is in order, but not looping infinitely would be nice :)
[22:00] bentruyman has joined the channel
[22:02] isaacs: walkah: ok, sudo npm i npm
[22:02] isaacs: and then sudo npm i jerk
[22:02] isaacs: shouldwork
[22:02] isaacs: thanks for being a part of the process :)
[22:02] Throlkim has joined the channel
[22:03] walkah: isaacs: my pleasure. one day I might even be a more helpful part ;-)
[22:03] eaton: Hey! it works!
[22:03] yhahn: lol
[22:03] arpegius has joined the channel
[22:03] yhahn: ACTION waves
[22:03] walkah: holy effing drupal people in here!
[22:03] walkah: ACTION waves to yhahn
[22:03] yhahn: please don't call me that
[22:04] walkah: yhahn: lol. i meant eaton
[22:04] yhahn: he may not appreciate it either
[22:04] slaskis: ryah: why would resume() throw TypeError: Bad Argument? can a readable stream 'timeout' or something?
[22:04] walkah: yhahn: yeah, but i can take him
[22:04] eaton: I like to think of myself as a multiclassed generalist who's just spent most of his XP on drupal up to this point
[22:05] yhahn: : )
[22:06] jimt_ has joined the channel
[22:08] chorrell has joined the channel
[22:09] tmzt: is res.redirect(302) supposed to change the url in the browser?
[22:10] walkah: isaacs: it works! :)
[22:10] tilgovi has joined the channel
[22:10] isaacs: walkah: w00t!
[22:11] tjholowaychuk: tmzt: ? res.redirect('url here')
[22:11] fizx has joined the channel
[22:11] walkah: isaacs: thanks for the quick turn around :-)
[22:11] isaacs: walkah: np
[22:11] MikhX has joined the channel
[22:11] tjholowaychuk: tmzt: or res.redirect('back') etc, gotta tell it where to go :p
[22:12] grim_fandango has joined the channel
[22:13] JeffAtWork has joined the channel
[22:13] grim_fandango: Folks, does node have any libraries that support SHA-1 with salts?
[22:13] coltrane has joined the channel
[22:14] aurynn: crypto does sha-1
[22:16] JeffAtWork: in node v0.4 is there a way for me to configure how many concurrent connections the http and https built-in module uses? I see http://nodejs.org/docs/v0.4.0/api/http.html#agent.maxSockets but how to set it to something like 1000 instead of 5, BEFORE I start using it?
[22:17] JeffAtWork: it seems to be a property of 'agent', but I don't think agent exists before the 1st request?
[22:17] fly_ has joined the channel
[22:18] JeffAtWork: var https = require('https'); https.getAgent(); errors with: node.js:116 throw e; // process.nextTick error, or 'error' event on first tick ^ TypeError: Cannot read property 'port' of undefined at Object.getAgent (https.js:47:15)
[22:18] francescop has joined the channel
[22:18] francescop has left the channel
[22:20] hunterloftis has joined the channel
[22:22] Me1000 has joined the channel
[22:22] ezmobius has joined the channel
[22:24] ianward has left the channel
[22:25] srid: I got a list. I need to process each item in them. This processing takes some time, so I attach a callback. But I want to get notified only when *all* of the items are processed (sequentially or not, doesn't matter). what is the best way to do this in node.js? (I'm thinking of a `for` loop which doesn't fit in very well here)
[22:25] slaskis: srid: a simple way is to use a counter
[22:26] srid: counter needs to take errors/exceptions as well. actually I wonder if there is a node module for this
[22:26] slaskis: if( ++counter == list.length ) done()
[22:26] tjholowaychuk: --pending || done()
[22:26] slaskis: yeah, well the idea is that callbacks also take errors though
[22:26] tjholowaychuk: is what I like to do
[22:26] slaskis: tjholowaychuk: ah, nice. you're full of little js tricks aren't ya?
[22:26] tjholowaychuk: slaskis: yup :)
[22:27] slaskis: using that ~"".indexOf() thing now
[22:27] davidsklar has joined the channel
[22:27] tjholowaychuk: i got that one from someone else
[22:27] tjholowaychuk: not sure who
[22:27] tjholowaychuk: saw it in a ruby script i think
[22:27] tjholowaychuk: but its all over
[22:28] slaskis: ah
[22:28] slaskis: arghs, i'm getting frustrated with this, i wonder if it's a bug in the fs module or if i'm just retarded
[22:29] slaskis: i should try to isolate it i guess
[22:29] isaacs: srid: here's how i do that in npm: https://github.com/isaacs/npm/blob/master/lib/utils/async-map.js
[22:29] isaacs: srid: that's a bit more complex, since i also get the list of results
[22:29] isaacs: ;
[22:30] davidsklar has joined the channel
[22:31] jklabo: I am getting an unterminated string literal error on windows/cygwin but not on mac with the same code in both places, anyone seen this problem?
[22:32] tmzt: tjholowaychuk: yeah I did, I did res.redirect(302, '/shorturl')
[22:32] tmzt: but it didn't change in the browser
[22:32] tmzt: also, with express, how do I make the sesion cookie work across subdomains?
[22:32] tjholowaychuk: tmzt: other way around http://expressjs.com/guide.html#res-redirect-url-status-
[22:33] tjholowaychuk: res.redirect('/foo', code)
[22:33] tmzt: ok
[22:33] tjholowaychuk: 302 is the default
[22:33] bradleymeck: substack~
[22:33] bradleymeck: jklabo paste bin
[22:34] hij1nx has joined the channel
[22:34] hornairs has joined the channel
[22:35] jklabo: https://gist.github.com/832887
[22:37] bradleymeck: jklabo does it just do that whenever you run node? or is it from requiring a file?
[22:38] jklabo: no, node works ok if i am just running a test server or somethign
[22:38] juan77: hi isaacs, I have sent a mail to npm-@googlegroups.com, about an error installing mysql-libmysqlclient hope I missing something....
[22:38] jklabo: and, it works fine on mac
[22:38] m14t has joined the channel
[22:38] xyoni has joined the channel
[22:39] isaacs: juan77: ok
[22:39] Utkarsh has joined the channel
[22:42] Ond has joined the channel
[22:44] juan77: hi isaacs I have failed to send the mail, seems that the address doens't work... I have tried also npm@googlegroups.com.... I will put in issues....
[22:45] isaacs: npm-
[22:45] isaacs: you need the -
[22:45] bradleymeck: does node's shebang detection handle arguments?
[22:45] isaacs: you also may need to join the group
[22:45] isaacs: bradleymeck: what do you mean?
[22:45] isaacs: bradleymeck: you mean, can you do `#!/usr/local/bin/node debug` as your shebang?
[22:45] bradleymeck: yea
[22:45] isaacs: yes.
[22:45] juan77: ahhh, ok isaacs, thanks.
[22:45] isaacs: and it's not node that does that, but the shell.
[22:45] bradleymeck: well expose_gc but the same
[22:46] isaacs: bradleymeck: yeah
[22:46] isaacs: bradleymeck: your script won't see those args, though
[22:46] isaacs: bradleymeck: node strips them off.
[22:46] bradleymeck: bleh, i was hoping the main module would consume them, makes sense i guess
[22:47] tim_smar1 has joined the channel
[22:47] isaacs: juan77: i see your github issue
[22:50] dmcquay has joined the channel
[22:50] kwik101 has joined the channel
[22:51] ryah: tjholowaychuk: can express use the new https stuff?
[22:51] tjholowaychuk: ryah: not yet, I have a fork of connect going to rewrite
[22:51] tjholowaychuk: connect is the issue though not express
[22:52] trentm has joined the channel
[22:52] ryah: tjholowaychuk: is it hard to do?
[22:52] ryah: :)
[22:52] ryah: should just bit a little hack, or?
[22:53] tjholowaychuk: ryah: nah, just need to inherit from https.Server and retire the middleware passed to createServer(foo,bar,baz)
[22:53] tjholowaychuk: was never a fan of that anyway
[22:53] ryah: ok
[22:53] tjholowaychuk: can you set the options via some method? or only createServer() ?
[22:53] McConnell has joined the channel
[22:54] snearch has joined the channel
[22:54] tjholowaychuk: if that is the case inheriting should be enough, then just connect.createServer().setWhatever({})
[22:58] kkaefer: for some reason, libeio invokes my EIO_Prepare callback, but not the EIO_AfterPrepare callback
[22:58] kkaefer: anyone ever experienced that?
[22:59] ChrisPartridge has joined the channel
[22:59] kkaefer: the function names in the eio_custom call are correct
[22:59] jamesarosen has joined the channel
[23:00] ryah: kkaefer: sounds like time for gdb :)
[23:00] kkaefer: hm, ok
[23:00] kkaefer: (node's also at 100% cpu)
[23:01] kkaefer: hah, found it already
[23:01] kkaefer: had a loop in the v8 process that didn't terminate, so it would never call the callback
[23:02] mikeal has joined the channel
[23:05] robmason has joined the channel
[23:05] herbySk has joined the channel
[23:06] ryah: mjr_: any luck repeating GH-680?
[23:07] tim_smart has joined the channel
[23:09] saikat has joined the channel
[23:10] brianc: can anyone give me a pointer to a good library to look at to study node native extensions?
[23:12] bob2 has joined the channel
[23:12] mjr_: ryah: it still happens from time to time, mostly when I restart things.
[23:12] mjr_: So it's probably related to an outgoing connection closing
[23:12] nonnikcam has joined the channel
[23:13] mjr_: But it's hard to say,because there is a lot of stuff happening all at once.
[23:13] mjr_: Which is why Ihaven't been able to isolate this into a test.
[23:13] mraleph: ryah: mjr_: nowdays if you see something that can't possibly happen (like having a null in variable after assert) and you are running ia32 version of node — do a run with —noopt. just to be sure :-)
[23:13] mjr_: Oh,I'll try that.
[23:14] mjr_: I think ryah said that the asserts were getting pre-processed out though.
[23:14] mjr_: Is that true, ryah?
[23:14] ryah: that's true
[23:15] ryah: https://github.com/ry/node/blob/0474ce67908c9afddab69d3f0eb53564b10e2ad1/wscript#L604
[23:15] mraleph: ah. no worries than.
[23:17] robmason has joined the channel
[23:17] trotter has joined the channel
[23:17] mraleph: but keep that in mind for a future. as we support more and more JS features in the optimizing pipeline, you might start seeing some weird things.
[23:18] jpstrikesback has joined the channel
[23:19] aguynamedben has joined the channel
[23:20] wadey has joined the channel
[23:21] mjr_: ryah: I can add some logging around where that exception happens if that would be useful to you. Let me know what vars you want dumped.
[23:22] muk_mb has joined the channel
[23:23] ryah: mjr_: it would be interesting to stick a console.trace() into OutgoingMessage.prototype.detachSocket
[23:23] ryah: and see the traces just before that exception happens
[23:23] temp01 has joined the channel
[23:23] ryah: also run with export NODE_DEBUG=http
[23:23] ryah: and node_g
[23:24] bob2 has left the channel
[23:24] mjr_: OK, I'll try that.
[23:25] mjr_: First I'm going to walk down the beach and get a burger.
[23:25] mnot: mjr_: before you go - any plans to support dumping to a pcap save file?
[23:25] mjr_: mnot: I haven't had much time to work on pcap stuff lately, but I'd love to support pcap files as well as live capture
[23:25] mnot: mjr_: cool.
[23:26] ziro` has joined the channel
[23:26] mjr_: My top two priorities with pcap right now are to make jumping in on the middle of an HTTP sometimes work, as long as you see the first byte of a new request on an already open connection, and then to support the linux cooked if type, so -i any will work.
[23:26] slaskis: so, i finally figured out what the bad argument error comes from when i use ReadStream#resume(), here's an example: https://gist.github.com/832967
[23:27] mjr_: mnot: but if you want to contribute things to make offline work, I'm happy to pull them in.
[23:27] slaskis: is this the expected behaviour? ryah ^^
[23:27] mjr_: I need to do your entity encoding thing also that you already opened an issue on.
[23:27] slaskis: (using 0.4.0 btw)
[23:27] mnot: mjr_: ack
[23:28] ryah: slaskis: no
[23:28] ryah: slaskis: can you make a github issue?
[23:28] slaskis: ryah: sure
[23:33] spetrea-home has joined the channel
[23:33] xla has joined the channel
[23:33] SubStack: moo?
[23:34] Ratty_: cow
[23:34] slaskis: actually, does this one throw bad argument for you guys too? require("fs").createReadStream("/dev/random").resume()
[23:34] zomgbie has joined the channel
[23:37] montylounge has joined the channel
[23:38] jacobolus has joined the channel
[23:40] |Blaze| has joined the channel
[23:41] amerine has joined the channel
[23:42] davidc_ has joined the channel
[23:42] slaskis: ryah: you've got yourself an issue: https://github.com/ry/node/issues/687
[23:42] balaa_ has joined the channel
[23:42] Lorentz: There are always new issues.
[23:45] __tosh has joined the channel
[23:47] srid: isaacs: thx for the async-map code.
[23:48] dshaw has joined the channel
[23:48] gf3 has joined the channel
[23:50] wdperson_ has joined the channel
[23:53] jashkenas has joined the channel
[23:53] derferman has joined the channel
[23:58] bradleymeck: substack: ping
[23:59] broofa has joined the channel