[00:00] tjholowaychuk: ahahaha [00:00] piscisaureus: yeah. I had an argument that went haywire lately. It almost got me, but I killed it just in time. [00:00] piscisaureus: arguments are getting worse and worse these days [00:01] chapel: life(args) [00:01] mikeal has joined the channel [00:01] jdub has joined the channel [00:02] mraleph: life.caller == god? [00:04] piscisaureus: if that is true, then in strict mode god throws [00:05] FireFly|n900 has joined the channel [00:05] chapel: heh [00:05] chapel: mraleph: question, what is one way to keep a variable from not being gced? [00:06] piscisaureus: mraleph: you should go to bed. Or you will have trouble with @goog ;-) [00:07] clarkfischer: references [00:07] mraleph: chapel: variables are just places; do you want to ensure that some object gets gced eventually? [00:08] chapel: hmm [00:08] chapel: well I want certain data to stay in memory until otherwise removed [00:08] chapel: even if it hasn't been used for a while [00:08] jimt has joined the channel [00:09] chapel: ACTION doesn't know a lot about the GC and when it is called or how it works outside of layman's terms [00:09] mraleph: well. make reference and clean it up after some time. [00:09] chapel: ok, sounds good [00:10] mraleph: you just need to keep track of accesses and reset your removal timer. [00:11] matbee_ has joined the channel [00:12] atmos has joined the channel [00:14] boogyman has joined the channel [00:14] mraleph: but of course if you accidentally create permanent reference to this object somewhere else it want get collected at all.. [00:15] chapel: hmm, how do you do permanent reference? [00:15] chapel: ie no code to clear it? [00:15] Coal has joined the channel [00:16] mraleph: store it to some global and forget about it. [00:16] jimt_ has joined the channel [00:16] chapel: ah [00:17] chapel: well I plan to have a function to delete anything in memory if needed [00:17] chapel: the idea is an in memory database I guess [00:19] boaz has joined the channel [00:19] dstufft: is there a good way to hot reload a changed module? [00:19] dstufft: that i require(); [00:20] skm has joined the channel [00:20] pyrotechnick: is anyone using the new mongoose? [00:20] muk_mb: I'm having the weirdest error ever. My node.js is for sure sending back a JSON-encoded string, but my client claims nothing came back [00:21] muk_mb: curl shows something came back too, hmm [00:21] Ond: Not I, pyrotechnick [00:21] Ond: But I have a question for you [00:21] Ond: It is my understanding that you are a coffeescript user [00:21] pyrotechnick: mmm [00:21] pyrotechnick: i sure am [00:21] Ond: Is there a known incompatibility with the latest version of known? [00:21] Ond: Sorry, node* not known [00:21] pyrotechnick: yes [00:21] Ond: Thanks [00:22] pyrotechnick: there's about 100 open issues on coffee [00:22] Ond: Good gravt [00:22] pyrotechnick: many of them about incompatibilities with node 0.3.3+ [00:22] mfernest has joined the channel [00:22] pyrotechnick: generally it's fine though [00:22] pyrotechnick: there's some combinations of coffee and node that don't work [00:23] Ond: I see [00:23] jashkenas has joined the channel [00:23] Lorentz: Goddamn [00:23] Lorentz: I had it with lack of decent online store management program anywhere [00:23] tanepiper: must admit, i've not come across any [00:23] Lorentz: And one I wrote years ago is somehow still better than anything I've seen [00:23] Lorentz: Gonna write one [00:23] pyrotechnick: store management? [00:24] Lorentz: pyrotechnick: Yes. More accurately, store management for online retailers, small to medium size. [00:24] pyrotechnick: like ecommerce? [00:24] pyrotechnick: or like inventory? [00:24] Lorentz: Imagine ubercart, but not as crappy. [00:24] Lorentz: If you ever did drupal. [00:24] pyrotechnick: shopify? [00:24] pyrotechnick: shopify is pretty rad [00:25] pyrotechnick: i've done some custom work for a couple of businesses [00:25] pyrotechnick: when i started out [00:25] lukegalea has joined the channel [00:25] pyrotechnick: there's also magento [00:25] pyrotechnick: which is very good too [00:25] pyrotechnick: free and deployable [00:25] Aikar: isaacs: how far off are you on those new changes... ? lol i started writing something to use a few days ago that does alot of those same things cause i needed it for work, and couldnt wait for it to be official, didnt know you was working on it already [00:25] pyrotechnick: whereas shopify is hosted [00:25] pr2012: we do lots of magento implementations [00:25] pyrotechnick: yeah [00:25] pr2012: if you have any questions let me know [00:25] pyrotechnick: i love magento [00:26] pyrotechnick: one of the only php apps i thouroughly like [00:26] pr2012: I am not a big fan honestly [00:26] isaacs: Aikar: i like documentation-driven development. [00:26] pyrotechnick: nah it's not too bad [00:26] Lorentz: Last time I played with magento, it was weirdly written, but that's coming from me as a generic zf dev. [00:26] pyrotechnick: have you seen the html? [00:26] isaacs: Aikar: almost done with the documentation, not yet into the driving portion. [00:26] pyrotechnick: yeah [00:26] Aikar: isaacs: so not started yet? [00:26] Aikar: ah lol [00:26] isaacs: Aikar: no, i'm almost done. [00:26] isaacs: Aikar: haven't started coding it yet :) [00:26] pyrotechnick: megento's html is freaking massive, but generally it's not too bad IMHO [00:26] pyrotechnick: it's good for skinning [00:26] pyrotechnick: plento of hooks [00:26] pr2012: its great for designers [00:26] isaacs: Aikar: ddd is about 70% documentation, 10% coding, and 20% revision [00:26] pyrotechnick: yeah [00:26] MikhX has joined the channel [00:26] pr2012: scalring performance is a challenge [00:27] pr2012: and the learning curve for devs is crazy [00:27] jashkenas: isaacs: what's your ddd project? [00:27] pyrotechnick: TBH what we were doing was using capybara to remote control magento, drupal and RYO ecommerce stores [00:27] Lorentz: Well, no point discussing, it's hard to say why I don't like any of them, so only way to point it out is to write code [00:27] Lorentz: ACTION goes off t ocode [00:27] pyrotechnick: so that you could shop on many shops but pay a single time [00:27] isaacs: jashkenas: DDD is a programming methodology that I just invented a term for :) [00:27] isaacs: jashkenas: documentation-driving development [00:27] pyrotechnick: then once you did that it went off and forfilled the payments to the original stores [00:27] pr2012: its written by people who seem to have fallen in love with spring [00:27] pyrotechnick: was pretty rad [00:27] isaacs: jashkenas: https://github.com/isaacs/npm/blob/master/doc/future-ideas/new-module-system.md [00:27] Lorentz: Development-driven development [00:27] matt_c has joined the channel [00:28] Lorentz: You develop to drive development [00:28] jashkenas: for npm ... but of course. [00:28] isaacs: yeah, of course :) [00:28] isaacs: but it's a big major refactor to take a lot of what we've learned over hte last year, and strip out a lot of what we've learned is problematic. [00:29] isaacs: basically a rewrite of the "installing packages" portion of npm [00:29] jesusabdullah: Documentation-Driven or Documentation-Driving? [00:29] jashkenas: gotcha. sounds sane to document it first and run it by everyone. [00:30] Lorentz: Document driven would arguably invoke contract-based coding, which is a good idea. [00:30] c4milo1 has joined the channel [00:30] Lorentz: Design by contract etc [00:30] slickplaid: I prefer Drunk-coding [00:31] Lorentz: I could never code drunk, sadly. [00:31] c4milo1 has joined the channel [00:31] tmpvar: +1 drunk coding [00:31] Aikar: isaacs: seems like you got the idea of what i was trying to do, but i dunno about all that /foo/mod/bar/mod/baz/mod/blah stuff.. seems lil bloated still to dupicate libs. maybe instead store it in the same depth level so if foo deps bar, store libs/foo libs/bar, and IF foo has a specific MaxVersion requirement (ie dont install latest), install it as libs/.npmspecific/bar@x.x.x and shim it to load that copy on require('bar'). are you interested in trying that pat [00:31] isaacs: Aikar: keep reading. [00:31] isaacs: (literally, the very next section) [00:32] slickplaid: I have this issue where it takes me a while to come up with how i want to code it out. When I'm drunk, I take the brute force route and just type it all out and if it doesn't work wait until I'm sober and then go back and fix it [00:32] isaacs: no shims, no .npm folder. [00:32] slickplaid: heh [00:32] jesusabdullah: shims? [00:32] pr2012 has left the channel [00:32] Aikar: isaacs: yeah i got ya, im offering a cleaner/lightweight idea than what you have on your doc [00:32] tmpvar: slickplaid, i get into a state where i dont feel like im wasting my life ;) [00:33] Aikar: ill write it out more clearly if your open to hearing my suggestion [00:33] Aikar: on handing dependencies [00:33] isaacs: ok, so, let's break up what you just said: 1. "store it in the same depth level". foo->bar->baz. that will result in foo/node_modules/{bar,baz} [00:33] Aikar: yes [00:33] isaacs: Aikar: so yeah, for handling cycles and being FS-efficient [00:33] isaacs: it makes sense to push the deps down to the lowest level possible. [00:33] isaacs: and only override when necessayr. [00:33] isaacs: however, that makes updating much more difficult. [00:33] Aikar: the main issue is when a dep has a max version requirement, then you need to store a SPECIFIC version [00:33] isaacs: also, it'll be slower at run-time [00:33] jesusabdullah: What are shims? [00:34] jesusabdullah: In this context, I mean? [00:34] isaacs: jesusabdullah: files that load other files, and sit in the way [00:34] pifantastic has joined the channel [00:34] Aikar: have just node_modules in path [00:34] isaacs: jesusabdullah: cat $(which npm) [00:34] isaacs: Aikar: yeah, you really don't get anything by pushing things to the left. [00:34] jesusabdullah: Ah, I see [00:34] isaacs: since foo doesn't need baz, why put baz in foo's node_modules folder? [00:34] Aikar: i meant your PROJECTS node modules [00:35] isaacs: jesusabdullah: required to work around a more archaic path system than what we're working on. [00:35] Aikar: so project/node_modules/{foo,bar} [00:35] isaacs: Aikar: ok, so, your PROJECT depends on "foo" then. you don't care about bar. [00:35] isaacs: why put bar there if your project isn't going to use it? [00:35] isaacs: but foo doesn't need to have its own bar, if your project already has it. [00:35] Aikar: incase multiple libs you use depend on bar, why duplicate it [00:35] isaacs: sure. [00:36] isaacs: oic, like if you depend on A,B, and A and B both depend on C, you don't wanna have A/C as well as B/C [00:36] isaacs: right... that's a good point. ok, push to the left. [00:36] Aikar: if its a dependency, it doesnt hurt for it to be in your node_modules, you HAVE to have it, trying to hide it from folder view doesnt really give you anything [00:36] isaacs: right [00:36] Aikar: correct [00:36] isaacs: convinced. [00:36] isaacs: i had an intuition that it was a good idea, but not a solid use case, and then i was having an intuition that it was wrong. [00:36] isaacs: thank you for showing me that i was wrong to think that i was wrong. [00:36] isaacs: :) [00:37] Aikar: but the problem is if a needs c version 1, and is broken with 2, so it has a max version of 1, but b needs version 2, gotta handle that use case [00:37] isaacs: right [00:37] isaacs: then the question becomes, who gets to put their stuff at the top level? [00:37] ajashton has left the channel [00:38] cloudhead has joined the channel [00:38] isaacs: i think the way to handle that is to actually build up the tree every time, and then do the analysis to push things left when they exist at multiple points in the tree. [00:38] Aikar: which is why i said the .npmspecifics, make project/node_modules always be 'latest since your last update', and any SPECIFIC version requirement be in another folder [00:38] Aikar: and the only time youll have specific versions is if a module has a 'max version depdendency' [00:38] isaacs: or a specific version dependency [00:38] Aikar: that could be said to be the same as max version :p [00:38] Aikar: same idea tho [00:39] isaacs: ok, but a min version could have the same problem. [00:39] Aikar: yea [00:39] Aikar: but if it has a min version but no max, you can use latest [00:39] isaacs: the question also remains whether things should always get the highest version they support, [00:39] isaacs: righ [00:39] isaacs: or should we try to find overlap? [00:39] isaacs: i think that disk space being cheaper than debugging time, it's best to take latest. [00:39] isaacs: and if they can't share, then they can't share. [00:39] Aikar: but as i said earlier, i was writing some code to do these features, wanna look at it and see what i was doing? i was just going for quick and brutal and didnt tackle the max version issue tho [00:40] isaacs: i'd rather not look at code yet. [00:40] isaacs: thanks, though [00:40] Aikar: alright lol [00:40] isaacs: still wanna just document the use cases and approaches [00:40] isaacs: getting attached to a specific implementation ahead of time causes problems. [00:41] Aikar: what i was doing was libs/foo/.bpm/ and the pkg.main/pkg.modules and pkg.directories.lib shim stuff would make SUPER SIMPLE shims in /libs/foo/ like /libs/foo/index.js would be module.exports = require('./.bpm/index.js'); [00:42] Aikar: that way everything for a specific module is contained in 1 folder [00:43] Aikar: (vs current npm style i mean) [00:43] sc has joined the channel [00:43] sc: test [00:43] isaacs: sc: it worked! [00:43] sc: ;-) [00:43] Aikar: if you MEANT to say test that is ;) [00:43] sc: quick question [00:43] sc: i'll preface this by saying i think i'm sol [00:43] sc: anyway [00:44] sc: docs for the process exit event: [00:44] sc: Event: 'exit' [00:44] sc: function () {} [00:44] sc: Emitted when the process is about to exit. This is a good hook to perform constant time checks of the module's state (like for unit tests). The main event loop will no longer be run after the 'exit' callback finishes, so timers may not be scheduled. [00:44] sc: Example of listening for exit: [00:44] sc: process.on('exit', function () { [00:44] sc: process.nextTick(function () { [00:44] sc: console.log('This will not run'); [00:44] sc: }); [00:44] sc: console.log('About to exit.'); [00:44] sc: }); [00:44] Aikar: >_> [00:44] isaacs: gahhh1 [00:44] isaacs: flood [00:44] sc: sorry [00:44] Aikar: no kick bot here lol? [00:44] isaacs: sc: gist and pastie are your friends. it's ok, just please don't do that in the future. :) [00:44] sc: i suppose the better thing to do is post a gist? [00:44] sc: k got it [00:44] isaacs: so, what about the doc? [00:44] rjrodger_ has joined the channel [00:45] isaacs: are you trying to listen to the exit event? [00:45] sc: total noob sorry. anyway i'm trying to make jasmine-node work at exit [00:45] sc: it's a test framework [00:45] isaacs: np [00:45] isaacs: ok [00:45] isaacs: so you wanna do some async stuff right before exiting? [00:46] sc: it has some async features, letting you setTimeout under the hood and then wait for things to happen [00:46] sc: yes! [00:46] sc: but it appears that I cannot [00:46] sc: but i wanted to make sure that i cannot [00:47] isaacs: no, you cannot [00:47] isaacs: it'd be good to have a beforeExit event, but it's not implemented. [00:47] isaacs: a little bit tricky. might not make it for 0.4 [00:47] sc: hrm yes that would be perfect [00:49] isaacs: sc: vote it: https://github.com/ry/node/issues/issue/607 [00:49] c4milo1 has joined the channel [00:49] sc: so it would be safe to say that beforeExit is a necessary feature in order to enable node-based test frameworks to have async features. [00:49] [[zz]] has joined the channel [00:49] chapel: isnt there a way to monitor sighup and do something before it actually exists? [00:49] chapel: exits [00:50] Aikar: isaacs: think maybe package.json may be a conflicting file name maybe?, maybe .npmrc instead? and the 'transversing back down the tree' would only happen on npm.install right? not on actual requires [00:50] sc: which is what i was looking for...an answer like this. thanks a lot and 1000 apologies for the spam. [00:50] isaacs: sc: no, i mean, some test frameworks have async features [00:50] sc: chapel - no idea i'll look at that though... [00:50] isaacs: sc: also, you can do sync things on exit. [00:51] sc: yeah, everything works fine except the async stuff [00:52] sc: i'm going to put the at-exit support in on my fork for my purposes (which are all sync) and then wait for beforeExit [00:52] chapel: http://nodejs.org/api.html#signal-events-57 [00:52] sc: or look into this sighup thing... [00:52] chapel: idk the details [00:52] chapel: there is an exit event [00:52] chapel: but you can't set timers [00:53] hornairs has joined the channel [00:53] chapel: http://nodejs.org/api.html#process-kill-73 [00:55] jdrannbauer has joined the channel [00:55] sc: yeah that's the rub [00:55] pyrotechnic has joined the channel [00:56] sc: the test frameworks with async features probably aren't running at-exit. i'll do a mini-survey though. [00:57] cloudhead: anyone got a working oauth client module? the existing one doesn't work with 0.3.6 [01:05] sc: yeah it looks like the others are running as tests are required, or are running at exit (and therefore don't support async features) [01:05] jchris has joined the channel [01:06] tjholowaychuk: sc: I hack .emit() for the exit event to do the coverage calculation etc [01:06] tjholowaychuk: lame hack [01:06] Aria has joined the channel [01:07] sc: ah you're visionmedia on github [01:07] sc: yeah was just looking at your beforeExit thing [01:07] sc: in expresso [01:08] tjholowaychuk: im going to remove that in the next release possibly [01:08] tjholowaychuk: expect(n) will replace the need for anything like that [01:08] tjholowaychuk: but I still need it for coverage output [01:08] sc: but [01:09] sc: you still can't do settimeouts in expresso tests, right? [01:09] pyrotechnic: okay [01:09] sc: looks like report() is triggered at exit [01:09] pyrotechnic: that's the first time i've seen an emoticon in linkinus [01:09] sc: ...which triggers beforeExit [01:09] tjholowaychuk: sc: of course you can [01:09] sc: right? [01:09] pyrotechnic: i was wondering what the hell was going on [01:09] drudge: click it! [01:09] pyrotechnic: yeah i did [01:09] pyrotechnic: so cool [01:09] drudge: :) [01:09] sc: https://github.com/visionmedia/expresso/blob/master/bin/expresso [01:09] tjholowaychuk: sc: anything async is fine [01:10] pyrotechnic: tjholowaychuk: i thought you had put in a unicode thumbs down [01:10] sc: oh wait [01:10] dnolen has joined the channel [01:10] tjholowaychuk: I have to proxy emit() so that there is enough time for the coverage data to flush [01:10] chapel: haha [01:10] chapel: pyrotechnic: didn't know you got linkinus [01:11] chapel: mac app store? [01:11] lukegalea has joined the channel [01:11] sc: oh yes i see [01:12] mandric has joined the channel [01:12] sc: expresso is what you use to run the test files [01:12] tjholowaychuk: yeah [01:12] sc: so like, expresso [01:12] sc: ok [01:12] sc: yeah that's one way around the problem [01:12] tokumine has joined the channel [01:12] drudge: tjholowaychuk: stylus looks pretty sweet [01:12] tjholowaychuk: drudge: thanks man [01:12] sc: once there's a real beforeExit you'll be able to just run things with node... [01:12] drudge: tjholowaychuk: if you use iTunes, grab this while it's free today http://itunes.apple.com/us/app/tracks/id402391352?mt=12 [01:12] cloudhead: sc: what's the issue exactly? [01:13] sc: that's what i was going for. minor style difference. [01:13] tjholowaychuk: sc: I imagine you could do this same thing within node, the executable was just a choice [01:13] pyrotechnick has joined the channel [01:13] sc: but without a real beforeExit you wouldn't know when to kick off the tests [01:14] tjholowaychuk: well in my case immediately [01:14] sc: you could execute them as they're required... [01:14] tjholowaychuk: that is what i do [01:14] Me1000 has joined the channel [01:15] sc: hrm [01:16] kawaz_air has joined the channel [01:17] boogyman_ has joined the channel [01:19] WarriorSl has joined the channel [01:19] sc: thx tj. I'll keep an eye on the beforeExit issue and also mull over what to do...might just support sync execution at exit and wait, not sure. [01:19] jimt has joined the channel [01:21] broofa has joined the channel [01:21] nejucomo has joined the channel [01:23] pengwynn has joined the channel [01:23] MikhX has joined the channel [01:25] zentoooo has joined the channel [01:25] jimt_ has joined the channel [01:26] kawaz_air has joined the channel [01:26] mscdex: anyone know of a working xslt module/library for node/js ? [01:26] broofa has joined the channel [01:26] mcroydon has joined the channel [01:30] bronson has joined the channel [01:34] lukegalea has joined the channel [01:34] sveimac: mscdex: there is none [01:35] pifantastic has joined the channel [01:35] sveimac: I looked last like 5-6 months ago, might have missed out thought [01:35] softdrink has joined the channel [01:36] mcroydon has joined the channel [01:39] piscisaureus: why is there process.cwd()? would that not lead to unpredictable results when used in combination with a thread pool? [01:39] piscisaureus: i mean chdir [01:40] piscisaureus: ryah: [01:40] piscisaureus: ^ [01:41] pyrotechnic has joined the channel [01:41] tim_smart: piscisaureus: Not at the user level. [01:41] pzich has joined the channel [01:41] tim_smart: Node doesn't offer threads. [01:42] piscisaureus: yeah but fs.open is ran in a thread, so [01:42] mcroydon has joined the channel [01:42] piscisaureus: fs.open("./some-file"); [01:42] piscisaureus: process.chdir("somewhere"); [01:42] piscisaureus: the path off which ./some-file is resolved is unpredictable [01:42] tim_smart: libeio should be pretty smart there. [01:43] tim_smart: Unless you have tested it and it fails. [01:43] piscisaureus: tim_smart: trust me, libeio is not smart :-) [01:43] skm has joined the channel [01:44] tim_smart: piscisaureus: It works fine. [01:44] neshaug has joined the channel [01:45] Coal has joined the channel [01:47] hobodave has joined the channel [01:49] montylounge has joined the channel [01:51] piscisaureus: tim_smart: it does not work fine. https://gist.github.com/805263#file_test.js [01:53] blueadept has joined the channel [01:58] mikeal has joined the channel [01:59] lukegalea has joined the channel [02:00] RevoOf has joined the channel [02:05] mscdex: here's another odd request: anyone know of something that can parse VRML (1.0)? :> [02:05] mscdex: in js? [02:07] sveimac: mscdex: btw, let me know if you find a xslt engine that runs in js :) [02:08] mscdex: sveimac: i've given up already :p [02:08] mscdex: gonna go about it another way for that [02:08] bruse has joined the channel [02:08] Silks has joined the channel [02:09] sveimac: might be easier routes :) [02:09] mikeal has joined the channel [02:11] stagas_ has joined the channel [02:11] jesusabdullah: What is xslt again? [02:11] micheil: xml stylesheet langauge [02:11] sveimac: transformation language [02:11] micheil: IE. a cluster fuck of xml. [02:11] sveimac: hehe, thats may dayjob for 3 more months :P [02:11] jesusabdullah: Oh geez, that stuff [02:11] jesusabdullah: Is it as bad as it sounds? [02:11] opengeard has joined the channel [02:12] jesusabdullah: I saw a poster about a guy using it at a geophysics conference back in December [02:12] sveimac: no it isnt, the biggest problem with xslt is thats its xml - so much typing [02:12] sveimac: XPATH 2.0 is nice [02:12] jesusabdullah: ah [02:12] jesusabdullah: That's good [02:13] sveimac: xslt is 100 % functional as well, no sideeffects [02:13] jchris has joined the channel [02:13] jesusabdullah: Ah [02:13] sveimac: so if you want to certain normal stuff, its fun :S [02:13] jesusabdullah: Sounds like it could use something haml-esque [02:14] jesusabdullah: Or, some kinda "get rid of your tags" DSL [02:14] sveimac: yeah, there are thought... but they came to late [02:14] sveimac: there is XQuery as well, but the bloat just came in a different form if you ask me :) [02:15] jamescarr has joined the channel [02:15] jamescarr: marak? [02:15] sveimac: enought xml 2000 talk :) [02:17] matt_c has joined the channel [02:19] Bosmon: Just write some JSON [02:19] Bosmon: What channel do you think this is, anyway :P [02:19] pzich has joined the channel [02:25] lukegalea has joined the channel [02:30] sc has joined the channel [02:30] intel_ix has joined the channel [02:30] neshaug has joined the channel [02:30] intel_ix: How would you set up session management with node? [02:30] intel_ix: When using an http server. [02:35] bradleymeck has joined the channel [02:35] pHcF has joined the channel [02:38] lukegalea has joined the channel [02:38] cloudhead has joined the channel [02:39] matbee: im trying to find a module called 'nodeproxy' that is improperly documented in another npm package called nodepoke [02:39] matbee: but i cant find it at all [02:39] matbee: or pokenode [02:40] arpegius has joined the channel [02:40] jamescarr: doh... I forgot how to use npm bundle [02:40] jamescarr: #fail [02:41] luke`_ has joined the channel [02:41] mikeal has joined the channel [02:42] skm has joined the channel [02:44] zentoooo has joined the channel [02:44] jashkenas: Is the official #Node.js party line on promises going to change, now that even jQuery has them? ;) [02:45] jashkenas: Perestroika for Promises. [02:46] jamescarr: jashkenas, nah, the party line will go with the most vocal folks on the mailing list... [02:46] Aria: Those aren't really promises, in the syntactic sense. Execution won't wait for them. [02:46] jamescarr: var data = fs._readFile('whatever.txt'); // really async call [02:47] jamescarr: :-P [02:48] russell_h: Aria: what good would promises be if execution waited for them? [02:49] Aria: Okay, maybe I'm thinking more of futures. [02:49] Aria: (Aren't events kinda like promises then?) [02:50] Aria: (Only most APIs of them encouraging large buffers?) [02:50] russell_h: honestly, I have no idea about all the terminology :) [02:50] jamescarr: Aria, iirc, Promises and Futures are the same thing [02:50] vipaca has joined the channel [02:50] Aria: Futures are "when you go to access them, they'll be the real value." -- a sort of short-term thread, joined when you access the value. [02:50] jamescarr: Aria, Promises don't block [02:51] Aria: Yeah. That's the difference. [02:51] jashkenas: jQuery now has... [02:51] Aria: Promises are 'completion events', then. [02:51] jashkenas: $.ajax(params).success(fn).error(fn) [02:51] jashkenas: with the latter two optional. [02:51] Aria: ACTION nods. [02:51] Aria: Cute. [02:51] Aria: I really should write a layer on top of node that looks jquery-like. [02:51] jamescarr: jashkenas, yes, this is how I've coded for awhile [02:52] jamescarr: and how I would prefer to see the fs api really... [02:52] Aria: It'd be cute. [02:52] jamescarr: instead of forcing me to do an if check on err, do this: [02:52] jamescarr: fs.readFile('something').success(fn).error(fn); [02:52] mikeal has joined the channel [02:53] sprout has joined the channel [02:54] bradleymeck: it wouldnt be too terrible to write a wrapper that does chaining [02:55] bradleymeck: would be a slight performance loss but probably not substancial [02:55] ryanfitz_ has joined the channel [02:55] c4milo1 has joined the channel [02:55] bradleymeck: ACTION cant spell [02:56] c4milo1 has joined the channel [02:56] langworthy has joined the channel [02:57] luke`_ has joined the channel [02:58] ryanfitz has joined the channel [03:00] aaronblohowiak has joined the channel [03:00] aaronblohowiak: anyone wanna get dinner in palo alto and talk about node things? [03:02] c4milo1 has joined the channel [03:02] derferman has joined the channel [03:02] aaronblohowiak: okie dokie, catch you cats later [03:03] kawaz_air has joined the channel [03:03] sveimac: :) [03:03] webr3 has joined the channel [03:06] zemanel: Aria: i think something similar already exists [03:06] jamescarr: hmmm [03:06] Aria: I'd not be entirely surprised. [03:06] jamescarr: anyone using webservice.js [03:07] matbee: http://blog.nodejitsu.com/create-nodejs-web-services-in-one-line this one? [03:07] jamescarr: yeah [03:07] jamescarr: doesnt seem to work anymore [03:08] matbee: looks interesting -- but no i havent [03:09] neshaug has joined the channel [03:11] proj has joined the channel [03:17] flukes1: I'm calling tls.createServer. How do I choose which cipher suites I want to use [03:20] lukegalea has joined the channel [03:22] hdon has joined the channel [03:23] EyePulp has joined the channel [03:30] bradleymeck: flukes1, there is no easy way right now :/ [03:31] flukes1: yeah, seems so, needs a little edit to tls.js I think [03:31] flukes1: no worries, I can work around it [03:31] lukegalea has joined the channel [03:32] blueadept has joined the channel [03:33] zzak has joined the channel [03:34] elux has joined the channel [03:35] brapse has joined the channel [03:37] yangbin has joined the channel [03:43] cronopio has joined the channel [03:45] softdrink has joined the channel [03:46] yangbin has joined the channel [03:47] bradleymeck has joined the channel [03:53] inky_ has joined the channel [03:55] yangbin has joined the channel [03:57] neshaug has joined the channel [03:57] ericnakagawa has joined the channel [04:04] yangbin has joined the channel [04:04] orospakr: what tends to be the norm more in the node.js world: javascript files named with underscores or with hyphens? [04:05] mikeal has joined the channel [04:06] ROBOTARMY has joined the channel [04:10] ericnakagawa has joined the channel [04:11] inky_: i just finished installing nodejs and was running a hello world script. the server boots fine, but when i try to access the hosted webpage via my browser, it crashes, returning these messages [04:12] inky_: response.sendHeader(200, {"Content-Type": "text/html"}); [04:12] inky_: ^ [04:12] inky_: TypeError: Object # has no method 'sendHeader' [04:12] inky_: with more messages following that, if u need them. [04:13] inky_: i think the build failed somewhere, somehow, but i dont know enough about all of this to know how to go about fixing it. [04:13] abraham_ has joined the channel [04:13] pauls: @inky_: try doing "writeHead" instead of sendHeader [04:14] inky_: @pauls: i will give that a try, one sec [04:14] inky_: nice, now we get an error on response.close() [04:14] inky_: Object # has no method 'close' [04:14] pauls: inky_: try res.end() [04:15] inky_: u work [04:15] pauls: you can also put a res.write(..) in between those [04:15] mfernest has joined the channel [04:15] inky_: u rock*** [04:15] inky_: and it worked*** [04:15] inky_: yes, i did that to output "hello world!". [04:15] inky_: thanks a lot, pauls =] [04:15] pauls: my pleasure... :) [04:21] broofa has joined the channel [04:23] MattDiPasquale has joined the channel [04:25] elux has joined the channel [04:25] chrischris has joined the channel [04:26] mikeal has joined the channel [04:31] joelklabo has joined the channel [04:33] kubrow has joined the channel [04:35] kevwil has joined the channel [04:35] herbySk has joined the channel [04:36] aaronblohowiak has joined the channel [04:39] warz: hrm. ive seen an automatic jsonp wrapper feature mentioned in express.js changelogs. a search for jsonp on the docs doesn't bring up anything, though. [04:42] warz: ah, app.settings['jsonp callback'] [04:43] skm has joined the channel [04:43] rhyolight has joined the channel [04:44] langworthy has joined the channel [04:45] rhyolight: Hi all. I want to stress test my server with socket.io by connecting thousands of clients to it. Is there a node.js module for socket clients I can use for that? Or a better way? [04:47] peol has joined the channel [04:47] peol has joined the channel [04:48] RevoOf has left the channel [04:49] rhyolight: BOOM https://github.com/pgriess/node-websocket-client [04:52] kevwil has left the channel [04:55] Me1000 has joined the channel [04:58] randy_ has joined the channel [04:58] ncb000gt has joined the channel [05:00] perezd has joined the channel [05:00] Me1000 has joined the channel [05:01] briznad has joined the channel [05:02] mscdex: orospakr: almost always hyphens from what i've seen [05:04] sechrist: boom [05:05] mike5w3c has joined the channel [05:05] abraham has joined the channel [05:06] iszak has joined the channel [05:06] iszak: Anyone want to review some of my coad? [05:07] aaronblohowiak has joined the channel [05:08] siculars has joined the channel [05:09] aaronblohowiak: does indexzero hang out here? [05:11] paulrobinson has joined the channel [05:13] joelklabo: I am trying to setMaxListeners for an http-proxy server, this is what I'm doing: proxyServer.setMaxListeners(0); but it isn't taking effect. Is there something wrong with this? [05:13] aaronblohowiak: zero might be a magic number [05:14] joelklabo: yeah, i want infinite [05:14] isaacs has joined the channel [05:14] joelklabo: is using the method on proxyserver the same as a vanilla server though? [05:16] Mike_Rice has joined the channel [05:16] pauls: gnite all [05:16] Mike_Rice: g'morning [05:16] pauls: haha [05:16] iszak: good afternoon. [05:17] Mike_Rice: good evening [05:17] inky_: good evening [05:17] inky_: ah shit [05:17] pauls: "guten taaag" http://www.youtube.com/watch?v=kKgBdrsqvjs [05:17] inky_: good night [05:17] inky_: no that's been done as well [05:17] inky_: bhahahahaha [05:17] iszak: who wants to look at my code and give me feedback? [05:17] Mike_Rice: is there a way to throttle request so I don't kill a website when I'm scraping it? [05:18] iszak: Mike_Rice, throttle node.js requests serving? or the scraping? [05:18] iszak: you could use setInterval? [05:18] Mike_Rice: iszak, scraping [05:18] Mike_Rice: iszak, that's a good easy way [05:18] Mike_Rice: handn't thought of that [05:18] Mike_Rice: thanks [05:18] iszak: no problem. [05:19] ncb000gt: Mkie_Rice: you could also pool your requests using one of the few libraries around. [05:19] ncb000gt: erm Mike_Rice even =\ [05:20] Mike_Rice: ncb000gt, example library? [05:21] ncb000gt: Mike_Rice: https://github.com/mikeal/node-utils/tree/master/pool [05:22] mikeal: that's not current [05:22] mikeal: github.com/mikeal/request [05:22] mayfield has joined the channel [05:22] mikeal: ok [05:22] mikeal: fixes in search.npmjs.org [05:22] mikeal: http://search.npmjs.org/#/request [05:22] iszak: mikeal, i don't think that allows you to add a delay. [05:22] iszak: and if anything i'd want a wrapper for cURL. [05:22] Mike_Rice: mikeal, I'm using request, does he have some form of throttling? [05:23] Mike_Rice: he => it [05:23] mikeal: you can throttle if you use your own streams [05:23] Mike_Rice: ahh [05:23] Mike_Rice: k [05:23] mikeal: but honestly, that shit doesn't work [05:23] mikeal: throttling [05:23] mikeal: in node [05:23] mikeal: or even in curl [05:23] Mike_Rice: because of asyncronosity? [05:23] Mike_Rice: is that a word? [05:23] mikeal: no [05:23] mikeal: because the kernel keeps a big at buffer in TCP [05:24] gf3 has joined the channel [05:24] mikeal: so even when you pause it all the time [05:24] mikeal: or hold back on writes [05:24] mikeal: it's not necessarily sending the proper messages to the socket [05:24] mikeal: best way to do throttling is to incur loss [05:24] Mike_Rice: I'm just don't want to DOS my client sites. :-) [05:24] Mike_Rice: I* [05:24] mikeal: at the TCP layer [05:25] mikeal: you can do it with some kernel modules, works best in FreeBSD last time i checked [05:25] mjr_: It does help to slow down writes in node, if you are a client. [05:25] Mike_Rice: k [05:25] mikeal: Mike_Rice: then using pooling [05:25] ncb000gt: right, you're looking to simply make fewer requests per second right? [05:25] mjr_: But it does not help much to pause reads [05:25] mjr_: Because of kernel buffering, etc. [05:25] mikeal: if you only keep a couple clients up [05:25] mikeal: it'll be fine [05:25] Mike_Rice: mikeal, will your pooling work? [05:25] ncb000gt: mikeal: that's why i suggested your pooling code, but you mentioned it's not current [05:26] ncb000gt: current being with 0.3.x? [05:26] mikeal: well, pool will never work with 0.3.6+ [05:26] mikeal: because there is pooling in the node core http client :) [05:26] iszak: 0.3.x is unstable anyway. [05:26] mikeal: you should be able to create an Agent object and specify it when making requests [05:26] mikeal: and bring down the number of clients in the agent [05:26] iszak: cURL <3 [05:27] mjr_: Only complete maniacs would use 0.3.x [05:27] ncb000gt: lol [05:27] ncb000gt: <.< [05:27] Mike_Rice: <-- hmm... [05:27] Mike_Rice: should I not be using 0.3? [05:27] iszak: mjr_, or people who like living on the edge. [05:27] iszak: Mike_Rice, it's considered unstable, i've found no problems with it but you may find lack of module support for it because of the API changes. [05:28] Mike_Rice: I'm on HEAD with JSDOM, per tmpvar [05:28] inky_: if u git cloned Node.JS today, does that mean ur using 0.3.x?? [05:28] inky_: and if so, how could one download and use an older, more stable version? [05:28] ncb000gt: Mike_Rice: I believe 0.4.0 is to release this week [05:28] ncb000gt: inky_: yes [05:28] Mike_Rice: ncb000gt, that's what the mailing list said [05:28] Mike_Rice: well it said, "dev's get your shit straight, cause we going stable." [05:28] ncb000gt: inky_: all the versions are tagged [05:28] Mike_Rice: or something like that [05:29] iszak: ncb000gt, NICE! [05:29] inky_: nxb000gt: hmmm, so is it really worth it to go back to an older version? or would it make more sense just to continue using 0.3.x?? [05:29] mikeal: inky_: 0.3.8pre [05:29] inky_: mikeal: right on, thanks =] [05:30] ncb000gt: Mike_Rice: yea, i saw that email. :) gotta make sure my modules are up to date... [05:30] Aria has joined the channel [05:30] thermal has joined the channel [05:30] ncb000gt: inky_: you should be fine, just note that you might have some changes to make in your code or may find bugs [05:31] iszak: I disagree. [05:31] ncb000gt: hell, you might find bugs in the "stable" code, but those are less likely [05:31] ncb000gt: iszak: with? [05:31] iszak: sticking with 0.3.8 or going back to 0.2.x [05:31] ncb000gt: iszak: depends on the purpose of the project i guess, and how high your risk tolerance is [05:32] ncb000gt: :) [05:32] iszak: i'm not sure how the update rate of 0.2.x modules to 0.4.x will be, sure it will weed out the poorly maintained projects. so you may find lack of modules for 0.4.x [05:32] Mike_Rice: HAHA! My scraper is finally returning shit properly from the DOM, all hail Ry... and Mikeal... and TmpVar... and everyone else who's modules I'm using! [05:33] ncb000gt: lol [05:33] Mike_Rice: now to figure out how to wire in MySQL... this could be a whole new adventure [05:34] joelklabo: how do you go about downgrading? [05:35] Mike_Rice: what's the preferred MySQL module? [05:35] ncb000gt: joelklabo: if you want to use an earlier version of node you can either get the copy from nodejs.org and build from source or checkout a version from the git repo [05:35] ncb000gt: and build from source [05:35] ncb000gt: you'll need to rebuild any c/c++ based modules though [05:36] amerine has joined the channel [05:36] mike5w3c has joined the channel [05:36] phleet has joined the channel [05:36] ncb000gt: Mike_Rice: no idea. i rarely use MySQL anymore. [05:37] Mike_Rice: ncb000gt: are you a NoSQL person? [05:37] ncb000gt: Mike_Rice: have been for some time now, however I had heard something about there being a lack of async mysql libs. [05:37] konobi: mysql? people actually use that bunch of files loosely mapped with an "index" and a shoddy network app on top? [05:37] phleet: does anybody have any idea why I would be getting "TypeError: Cannot call method 'destroy' of null" every time I run node? Coming from this.socket.destroy(error) in http.js:330 [05:37] ncb000gt: that could be a lie tho [05:38] ncb000gt: phleet: not without more context [05:38] Aria: konobi: MySQL 4 came out a while ago ;-) [05:38] ncb000gt: Mike_Rice: http://search.npmjs.org/ [05:39] Mike_Rice: konobi: Lol, I don't have time for another bunch of files loosely mapped with some JSON wrapper thingy [05:39] ncb000gt: search for mysql and you'll find a couple of libs [05:39] phleet: ncb000gt: Context - http://pastebin.com/iaHY5RtT - happens regardless of what I'm running with node [05:39] Mike_Rice: ncb000gt, I did. I just didn't know if there was a preferred one [05:40] ncb000gt: Mike_Rice: gotcha [05:40] mayfield has joined the channel [05:40] phleet: ..ignore what I just said [05:40] phleet: that's a complete lie [05:40] konobi: Aria: ahahahahahaha [05:40] phleet: it happens when I'm running stuff with node.io [05:40] ncb000gt: phleet: i was just about to say so [05:40] ncb000gt: :) [05:41] phleet: ncb00gt: any ideas? or should I just go find a more node.io specific help source? [05:42] ncb000gt: phleet: which version of node are you running? [05:42] jchris has joined the channel [05:42] phleet: ncb000gt: v0.3.7-pre [05:42] tmpvar: Mike_Rice, nice job man [05:43] ncb000gt: phleet: i'm not sure, though from looking at the node docs that code shouldn't even be necessary. [05:44] Mike_Rice: tmpvar: Thanks! [05:44] ncb000gt: I'm sure there was a reason for it, but I don't know what it was. [05:44] Mike_Rice: node.js has been a learning experiance. A good one. Forcing me outside of Microsoft's box. [05:44] ncb000gt: Mike_Rice: excellent. [05:45] Mike_Rice: If I said Bill Gate's box would that have too much enuendo? [05:45] ncb000gt: o.0 [05:46] Mike_Rice: ncb000gt, nevermind... I'm too tired. Probably not funny [05:49] ncb000gt: Mike_Rice: all good. glad you're enjoying node. it's a great platform to work with. [05:50] ncb000gt: phleet: have you tried checking out node.io itself and removing those lines to see what happens? [05:51] Mike_Rice: ncb000gt, it really is. You just have to be willing to change (or at least experiment), which a lot of my co-workers aren't. :-/ [05:51] Z10x6k6h has joined the channel [05:52] Mike_Rice: well, I'm out. Thanks guys! Later. [05:52] phleet: ncb000gt: taking a look [05:53] vipaca has joined the channel [05:53] vipaca has joined the channel [05:54] mikeal has joined the channel [05:54] phleet: ncb000gt: okay, so it seems that it _works_ with that stuff commented out - unfortunately it doesn't close the connection after it has all the data [05:54] ryan[WIN] has joined the channel [05:56] dgathright has joined the channel [05:57] onar_ has joined the channel [05:57] ncb000gt: phleet: gotcha. let me look again. [05:58] phleet: ncb000gt: it seems the behaviour and location of the code to destroy the socket has moved around through each release of node [05:58] phleet: ncb000gt: this comment is in the code near there: "I'll clean up this mess once I figure out which destroy() to call (API is unclear with 0.2.4 => 0.3.1) " [05:58] ncb000gt: phleet: i noticed...not exactly inspiring [05:59] ncb000gt: though, if the new release of node is hitting this week then hopefully it'll stablize [06:00] kawaz_air has joined the channel [06:00] ncb000gt: phleet: what if you change it to use socket.end() instead of socket.destroy() [06:03] kawaz_air has joined the channel [06:04] phleet: ncb000gt: awesome, the debugger crashes if i try to print anything there :P [06:05] ncb000gt: phleet: that's useful :) [06:06] dipser has joined the channel [06:07] davidascher has joined the channel [06:08] dgathright has joined the channel [06:09] enotodden has joined the channel [06:11] phleet: ncb000gt: so.. it seems that http.createClient is in 0.3.7, but it isn't in the documentation for 0.3.7 [06:11] matbee has joined the channel [06:13] ncb000gt: phleet: well, not exactly. createClient no longer exists iirc. [06:13] ncb000gt: now you just do http.request() [06:14] ncb000gt: if you need to specify the port and host explicitly you'd use http.Agent [06:15] ncb000gt: phleet: but afaik, you can specify those things in the options object sent to the requet function [06:15] phleet: ncb00gt: it's still being exposed https://github.com/ry/node/blob/master/lib/http.js#L1301 [06:16] ncb000gt: phleet: i see, not sure if this is deprecated though. i wouldn't rely on it. [06:17] rachelbutts has joined the channel [06:17] phleet: ncb000gt: just reading through some of the node.io code - createClient is used in there [06:17] ncb000gt: phleet: sure. it's used in any module that was written on the old system [06:18] ncb000gt: i have a few projects that are going to need to major updates once i move to 0.4.0 [06:18] kawaz_air has joined the channel [06:23] yangbin has joined the channel [06:24] rachelbutts has joined the channel [06:27] JohnnyL: have any of you used Web Workers in conjunction with Node.js? [06:27] gf3 has joined the channel [06:27] ncb000gt: JohnnyL: I had some issues when I first tried but haven't had a need for them since. [06:28] JohnnyL: ncb000gt: right [06:28] bronson has joined the channel [06:29] ncb000gt: JohnnyL: why do you ask? [06:30] JohnnyL: ncb000gt: I am a consultant. It's good to know these things in a negotiation. [06:31] ncb000gt: JohnnyL: sure. i do know that there are people using them successfully. [06:32] fangel has joined the channel [06:32] ncb000gt: IIRC the folks over at LearnBoost are and then there is Streamie.org [06:32] yangbin has joined the channel [06:32] ncb000gt: so, at least a couple pretty high profile groups using them. [06:34] ncb000gt: JohnnyL: actually, i take that back, looks like streamie.org isn't using it [06:34] rachelbutts has joined the channel [06:34] bronson has joined the channel [06:34] JohnnyL: lokos like the common 'thread' suggests to use multiple instances of node with a load balancer in front of them. [06:34] davidthings has joined the channel [06:34] tilgovi has joined the channel [06:35] gf3 has joined the channel [06:35] ncb000gt: JohnnyL: that's the approach that we've been taking on our projects until web sockets implementations get a bit more mature. [06:37] masahiroh has joined the channel [06:38] JohnnyL: Erlang is pretty sweet out of the box. But the syntax is rather cumbersome. [06:39] bronson has joined the channel [06:39] JohnnyL: ncb000gt: what lb do you use? [06:39] ncb000gt: for? [06:40] mikeal has joined the channel [06:40] JohnnyL: ncb000gt: your 'projects'. [06:41] yangbin has joined the channel [06:41] dguttman has joined the channel [06:41] ncb000gt: JohnnyL: by lb you mean? I assumed lib, but I'm confused now. :) [06:41] ncb000gt: doh [06:41] ncb000gt: you mean load balancer [06:41] ncb000gt: /facepalm [06:42] ncb000gt: getting tired fast [06:42] ncb000gt: We have a hardware load balancer that we use, mostly because we have it so why not use it... [06:44] ncb000gt: JohnnyL: we use an F5 for anything we've had to load balance, however i know nothing about the configuration of the device, our ops guys mostly deal with that. [06:45] skm has joined the channel [06:46] kawaz_air has joined the channel [06:48] saschagehlich has joined the channel [06:50] genbit has joined the channel [06:51] JohnnyL: ncb000gt: ah ok [06:52] yangbin has joined the channel [06:52] skm has joined the channel [06:52] derferman has joined the channel [06:53] mayfield has joined the channel [06:54] admc has joined the channel [06:56] benburkert has joined the channel [06:56] mikeal has joined the channel [06:58] muhqu has joined the channel [06:59] kawaz_air has joined the channel [07:00] bronson has joined the channel [07:01] Jaye has joined the channel [07:01] yangbin has joined the channel [07:03] warz has joined the channel [07:06] statim has joined the channel [07:08] statim: hitting an odd problem that seems to be somewhat out there on google, but i have a hard time believing it could be true: i spawn 2 processes, each listen on 0.0.0.0, one on port 8200 and the other on 8201. if i start them very fast at the same time, i get an EADDRINUSE, Address already in use [07:08] mraleph has joined the channel [07:09] ROBOTARMY has joined the channel [07:09] statim: people are saying its an os limitation, but i dont recall ever running into this limitation ever before. if i put a sleep 1 in between each spawn, it works. so trying to figure out what the cause of this could be [07:10] matjas has joined the channel [07:10] yangbin has joined the channel [07:11] skm has joined the channel [07:12] mscdex: statim: what platform? [07:13] statim: ubuntu 10.05 tls in a virtualbox vm, host comp is osx [07:16] bronson has joined the channel [07:17] statim: mscdex: googling through im seeing talk about file descriptors and kernel port ranges etc, but thats not adding up for me.. we're talking just 2 ports that are not the same [07:17] admc1 has joined the channel [07:18] mikeal has joined the channel [07:18] yangbin has joined the channel [07:19] statim: im wondering if somewhere node itself is utilizing a port of its choosing temporarily (like VERY temporarily) while it starts trying to listen on the port ive said, and the 2 processes spawned at the same time are colliding on that. seems really odd [07:23] curtischambers has joined the channel [07:24] keyvan has joined the channel [07:24] herbySk has joined the channel [07:24] bentomas has joined the channel [07:27] mscdex: statim: hmm, i just tried it and didn't get that error [07:27] mscdex: that's on a native ubuntu 10.04 install [07:27] stagas has joined the channel [07:28] mikeal has joined the channel [07:28] mscdex: statim: however, you can get that error if you just restarted the processes and the sockets are still lingering in a time_wait state or whatever [07:28] yangbin has joined the channel [07:29] mscdex: s/sockets/ports [07:29] statim: mscdex: i dont think thats occurring but good to know this might just be my vm… will keep trying to debug. [07:30] jakehow has joined the channel [07:30] stagas_ has joined the channel [07:36] mscdex: statim: i'm curious though, why are you using node in a vm when you are on osx? [07:37] bronson has joined the channel [07:39] iszak: because linux has a better command set blatently. [07:41] sriley has joined the channel [07:41] statim: mscdex: all dev happens in vm's provisioned with the same recipes as prod here, so all developers are using the same stuff and environments arent all different [07:41] mscdex: maybe, but it's not like windows, where you pretty much have no other option than a vm at this point [07:42] mscdex: statim: ah, i see [07:42] statim: mscdex: i actually prefer it quite a bit.. my osx can stay clean [07:44] bronson_ has joined the channel [07:46] ivanfi has joined the channel [07:47] iszak: mscdex, you can build node.js with Windows. [07:47] iszak: I am successfully done it too. [07:48] zk has joined the channel [07:48] zk has left the channel [07:51] ph^ has joined the channel [07:52] mscdex: iszak: in my opinion cygwin doesn't count and the native port isn't all there yet [07:52] rictic has joined the channel [07:53] iszak: mscdex, yeah I know, it's a cripple CLI [07:55] dekz has joined the channel [07:57] nook has joined the channel [07:59] pgte_ has joined the channel [08:01] stephank has joined the channel [08:02] stagas has joined the channel [08:05] joelklabo has joined the channel [08:06] neshaug has joined the channel [08:06] fangel has joined the channel [08:08] peol has joined the channel [08:08] neshaug has joined the channel [08:10] DoubleV has joined the channel [08:11] thermal has joined the channel [08:11] bronson has joined the channel [08:13] perezd has joined the channel [08:14] CrazyGoogle has joined the channel [08:14] bronson has joined the channel [08:16] Miljar has joined the channel [08:18] kal-EL_ has joined the channel [08:18] guybrush: wow! jquery comes with a nodejs-buildsystem (using uglifyjs) [08:18] guybrush: sounds awesome [08:19] meso_ has joined the channel [08:21] Jonasbn_ has joined the channel [08:23] SubStack: uglify! [08:25] hellp has joined the channel [08:25] Vertice has joined the channel [08:27] bentomas has left the channel [08:29] jbpros has joined the channel [08:29] nailer has joined the channel [08:31] altamic has joined the channel [08:32] isaacs has joined the channel [08:35] [AD]Turbo has joined the channel [08:36] mAritz has joined the channel [08:36] [AD]Turbo: yo [08:37] SubStack: GREETINGS [08:38] tanepiper: good morning noders [08:38] peol has joined the channel [08:38] peol has joined the channel [08:44] langworthy has joined the channel [08:45] bronson has joined the channel [08:45] altamic has joined the channel [08:45] altamic has joined the channel [08:46] luke` has joined the channel [08:48] SamuraiJack has joined the channel [08:49] slaskis: i tried my app (developed for 0.2.6) with 0.3.7 and i get a massive memory leak [08:49] slaskis: it's a rather simple express api [08:51] slaskis: it takes all my available memory for some reason (currently freezing my computer after allocating 3.5gb) [08:52] cwo has joined the channel [08:55] mAritz has joined the channel [08:56] snearch has joined the channel [08:56] julienXX has joined the channel [08:58] slaskis: strange, it seems to only happen when i hit the server with my browser, when running my tests (using testosterone) it works fine [08:58] slaskis: ryah: ^^ any ideas what may cause this? or how to debug it? [08:59] tilgovi has joined the channel [09:00] tanepiper: have you used node-inspector + v8-profiler to do tracing? [09:00] matjas has joined the channel [09:02] slaskis: tanepiper: hmm, good idea. i'll look those up [09:04] perezd has joined the channel [09:04] torvalamo has joined the channel [09:05] opengeard has joined the channel [09:05] tfe_ has joined the channel [09:05] SubStack: v8: 2.2250738585072012e-308 [09:05] v8bot: SubStack: 2.2250738585072014e-308 [09:06] chapel: haha SubStack [09:06] chapel: reading hacker news? [09:06] clarkfischer has joined the channel [09:07] ntelford has joined the channel [09:07] SubStack: chapel: actually the link was in another channel [09:07] chapel: oh [09:08] chapel: I had just read that link on HN so wasn't sure [09:08] chapel: :) [09:08] tanepiper: link ? [09:08] chapel: http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/ [09:08] SubStack: now I want to paste that number in every textbox I can find and see which sites stop responding [09:08] tanepiper: PHP and Java both break on big ints [09:08] tanepiper: because they SUCK [09:09] aklt has joined the channel [09:09] peol has joined the channel [09:09] davidc_ has joined the channel [09:10] ROBOd has joined the channel [09:10] yangbin has joined the channel [09:13] slaskis: tanepiper: haha, i can't even profile it, it totally kills my machine so i can't take a snapshot [09:13] jetienne has joined the channel [09:13] webben has joined the channel [09:13] aklt has joined the channel [09:16] aklt has joined the channel [09:16] webben has joined the channel [09:17] tanepiper: ouch [09:17] gattuso has joined the channel [09:18] webben has joined the channel [09:19] tanepiper: nice, jQuery is now built with nodejs [09:19] chapel: what do you mean? [09:19] Ezku\: and it supports commonjs promises [09:19] guybrush: tanepiper: right! i like it :) [09:19] chapel: I saw someone else mention it [09:20] Yuffster_work has joined the channel [09:20] guybrush: and they use uglyjs [09:20] tanepiper: Finally, we’ve made some changes to jQuery’s internal build system. We’ve worked to standardize all of our build process upon the excellent server-side JavaScript environment: NodeJS. We especially appreciate this as we’re able to reduce our dependency upon legacy Java/Rhino systems and focus more squarely on up-and-coming JavaScript environments. [09:20] tanepiper: Additionally with this switch we’ve moved to using UglifyJS from the Google Closure Compiler. We’ve seen some solid file size improvements while using it so we’re quite pleased with the switch. [09:20] yangbin has joined the channel [09:20] guybrush: *uglifyjs [09:20] tanepiper: they used to use ant + lint through rhino [09:21] webben has joined the channel [09:21] guybrush: did not like that [09:21] chapel: ah sweet [09:21] chapel: it would be sweet if they built in commonjs require [09:21] guybrush: tanepiper: in your opinion it would be even better when they switch to coffee, right? :p [09:21] guybrush: damn coffee [09:22] Ezku\: guybrush: totally :P [09:22] SubStack: I seem like the kind of person who would like coffeescript [09:22] SubStack: that's why I haven't tried it yet [09:22] tanepiper: guybrush: probably not, they aren't using coffee for internals [09:22] guybrush: zomg SubStack please do not port your modules to coffee! :/ [09:23] SubStack: oh I doubt I would go /that/ far [09:23] chapel: heh [09:23] webben has joined the channel [09:23] chapel: Ive heard coffee can actually make faster/better js code [09:23] [AD]Turbo has joined the channel [09:23] SubStack: oh I don't care about that part [09:23] Ezku\: yes, because it does certain optimizations that are cumbersome to do by hand [09:23] SubStack: i just care about how pretty it looks [09:23] chapel: :) [09:24] julienXX has joined the channel [09:24] Ezku\: that means underscore.coffee is faster than its javascript equivalent, for instance [09:24] chapel: like the coffee version of backbone is supposedly faster/better [09:24] SubStack: I am so superficial about programming [09:24] chapel: heh [09:24] adambeynon has joined the channel [09:24] chapel: SubStack: yeah, ie with dnode, you would make it look better than faster [09:24] chapel: if you had the choice [09:24] SubStack: correct [09:24] SubStack: especially since it's fast enough [09:24] chapel: yep [09:25] void_ has joined the channel [09:25] guybrush: SubStack++ [09:25] v8bot: guybrush has given a beer to SubStack. SubStack now has 6 beers. [09:25] sechrist has joined the channel [09:25] SubStack: I figure making my code faster is somebody else's job [09:25] SubStack: probably the v8 devs [09:25] chapel: now do you have any examples of a dnode system that would spawn children and keep track of them all? [09:25] tanepiper: what i like is I don't have to think about callbacks [09:25] SubStack: unless it's actually measurably a problem [09:25] webben has joined the channel [09:25] tanepiper: i just indent code blocks, coffee handles the async output for me [09:25] chapel: does it tanepiper ? [09:26] SubStack: chapel: I hacked a little on telescreen, which uses forever for that [09:26] SubStack: but that project is nowhere near complete [09:26] chapel: well not so much forever [09:26] tanepiper: chapel: https://gist.github.com/c041904d4ba49f24eb03 [09:26] tanepiper: that's some async blocks [09:26] chapel: oh, I see what you mean, you just indent, so its not all {} everywhere [09:27] guybrush: omg those `->` are so ugly :p [09:27] chapel: and its still easy to read, even though its doing a bunch of callback blocks [09:27] opus_ has left the channel [09:27] micheil has joined the channel [09:27] tanepiper: chapel: totally [09:27] chapel: okay, I thought you meant it handled the async nature automatically [09:27] tanepiper: guybrush: mehh, it's not that bad - it's consistant and cheaper than typing function :) [09:27] guybrush: just take a look at npm-code, thats art! [09:28] chapel: instead of function (blah) { } you just do (blah) -> [09:28] webben has joined the channel [09:28] guybrush: i agree on the function-argument [09:28] tanepiper: chapel: yea [09:28] SubStack: a bit like haskell's \(x,y) -> ... [09:28] SubStack: actually pretty much exactly that [09:28] isaacs: chapel: what about if you wanna have the same cb get passed to 3 different functions? [09:28] SubStack: minus the \ [09:28] Ezku\: SubStack: exactly [09:28] SubStack: Ezku\: and you should know! [09:29] Ezku\: ? O_o [09:29] SubStack: what with that \ after the u [09:29] Ezku\: :D [09:29] tanepiper: it's like the best bits of python, ruby, haskell - but it outputs javascript :D [09:29] chapel: isaacs: umm, example? [09:29] isaacs: chapel: say you want to do 3 actions, and when they're *all* done, do some other thing [09:29] Ezku\: tanepiper: yes \o/ [09:29] SubStack: isaacs: named functions, you mean? [09:29] isaacs: i do that kind of thing in npm a bunch [09:29] SubStack: oh that [09:29] isaacs: SubStack: well, yeah, that's how you'd implement it [09:30] isaacs: or, at times, do A, and then depending on the result, do B and then C, or just C [09:30] SubStack: I wonder how flow control libs look in coffee [09:30] chapel: coffee doesn't really change js, it just changes how you write it (well their classes are different) [09:30] webben has joined the channel [09:30] isaacs: any async block sugar that removes first-class function objects from the equation is not a solution, imo [09:30] chapel: or, that they have what you would consider traditional classes [09:30] isaacs: they don't have to be spelled "function", of course. [09:31] isaacs: but it should have feature-parity [09:31] isaacs: or even allow extra things [09:31] chapel: you can do namedFunction(blah) -> [09:31] chapel: or whatever [09:31] Ezku\: chapel: um, no [09:31] isaacs: chapel: so, if this clientdb.create block took a named function instead of anon cb, what would that look like? [09:31] chapel: I am not a coffee expert :( [09:32] Ezku\: chapel: to do what? namedFunction = (blah) -> or namedFunction((blah) ->)? [09:32] webben has joined the channel [09:32] peol has joined the channel [09:32] peol has joined the channel [09:33] chapel: clientdb.create namedFunction error, ok [09:33] Ezku\: isaacs: clientdb.create yourNamedHandlerFunctionForThisSpecificOperation [09:33] chapel: or [09:33] chapel: no error,ok [09:34] chapel: since you dont have to pass those by hand [09:34] chapel: in fact it probably wouldn't work if you did :( [09:35] indutny has joined the channel [09:35] webben has joined the channel [09:35] slaskis: how does npm handle different node versions? [09:35] slaskis: when requiring, will it require the version of the module that works with the current node version? [09:36] q_no has joined the channel [09:37] webben has joined the channel [09:39] webben has joined the channel [09:42] webben has joined the channel [09:43] slaskis: tanepiper: i think i found it, i just had to recompile the node-compress module and it stops freezing :) [09:43] slaskis: node-inspector is so cool btw [09:44] webben has joined the channel [09:44] tanepiper: yea, i have yet to fully go through it, seems buggy but i wonder if it's a chrome10 issue rather than a node-inspector issue [09:45] yangbin has joined the channel [09:46] TomY_ has joined the channel [09:47] webben has joined the channel [09:48] rsms has joined the channel [09:49] webben has joined the channel [09:49] markwubben has joined the channel [09:51] webben has joined the channel [09:54] webben has joined the channel [09:55] eevin has joined the channel [09:56] ttpva has joined the channel [09:56] webben has joined the channel [09:56] yangbin has joined the channel [09:57] altamic has joined the channel [09:58] mraleph has joined the channel [09:59] webben has joined the channel [10:01] webben has joined the channel [10:01] bzinger has joined the channel [10:02] peol has joined the channel [10:02] peol has joined the channel [10:03] webben has joined the channel [10:04] bronson has joined the channel [10:05] yangbin has joined the channel [10:06] webben has joined the channel [10:07] bronson has joined the channel [10:08] webben has joined the channel [10:11] webben has joined the channel [10:12] Druid_ has joined the channel [10:13] webben has joined the channel [10:14] yangbin has joined the channel [10:15] markwubben has joined the channel [10:15] webben has joined the channel [10:17] devrim: hi guys - how can i retrieve all get/post parameters altogether in an array without saying req.param("X") in expressjs? [10:17] niklasfi has joined the channel [10:18] webben has joined the channel [10:18] chapel: well isn't req.params an array? [10:18] devrim: no [10:19] devrim: that's what i thought at first [10:19] devrim: but it's a function only returns specified parameter [10:20] niklasfi: hi... i have a problem with res.on('data') and the res callback. altough i call res.pause() in the very beginning i still get 'data' events... is there anything i can do about that? [10:20] webben has joined the channel [10:21] tanepiper: devrim: it's an object, so you would have to itterate over the keys and put into an array would you not? [10:21] chapel: well [10:21] devrim: i tried that - let me see if i did something wrong [10:21] chapel: param looks through params, query, and body [10:22] chapel: req.params should be an array [10:22] niklasfi: the problem is that i want to open the file the data will go only after i recieved a response. so i want to pause the result to open the file, then resume and on data write it all out. but at the moment the data event fires before the file is open [10:22] CrazyGoogle has joined the channel [10:22] yangbin has joined the channel [10:22] webben has joined the channel [10:23] chapel: niklasfi: why not open the file around the data event and have the data event fire inside the callback of the opened file [10:23] chapel: and then you can write knowing the file is open [10:23] chapel: the other option is to buffer the data then write when complete [10:23] chapel: or to use a streamable file and stream the data into the file that way [10:24] niklasfi: chapel: what if two data events fire before the file is opened? [10:24] [AD]Turbo: how can I compare an mongodb _id in Javascript? for example, with a query I extracted a record, its _id is 4cfe01efbd6deb1048000004; now, if I would compare it in javascript, how can i do? if (record._id == "4cfe01efbd6deb1048000004" ?? [10:24] chapel: if you have the res.on('data'... inside the open file callback, the file should be open [10:25] webben has joined the channel [10:25] felixge has joined the channel [10:25] felixge has joined the channel [10:25] niklasfi: chapel: i did that initially.. but that lead to the 'data' event not fireing at all... presumably because all data events fired before the file was opened [10:26] chapel: for simplicity and getting it to work, I would buffer the data [10:26] chapel: and when complete ie res.on('end'... write it [10:27] sholmes has joined the channel [10:27] sholmes: hi [10:27] sveimac has joined the channel [10:27] webben has joined the channel [10:28] sholmes: how would you compare Ni to Express, which is better and why? [10:28] niklasfi: chapel: in the end several hundred megabytes will be transfered... buffering is not really an option... the only way i could think of is buffering until the file is opened.. but that sound really really dirty [10:28] devrim: if req.param is an array, why wouldn't req.param.join() work? [10:29] devrim: iterating it over as an obj doesnt work either.. :s [10:29] chapel: devrim: req.params [10:29] chapel: not req.param [10:29] chapel: they are two separate things... [10:29] devrim: ah [10:29] chapel: param looks at params, query and body [10:29] chapel: which are three different things [10:29] chapel: params are /name/:id [10:30] chapel: query is ?id=query [10:30] webben has joined the channel [10:30] chapel: body is for forms [10:30] herbySk has joined the channel [10:30] chapel: niklasfi: look into streaming [10:30] sholmes: params are the path parts? [10:31] sholmes: what does the _ mean after nicks? [10:31] niklasfi: chapel: that is another thing i really liked until i was told by micheil, that the current streaming implementation is somewhat flawed... writeStream writes whenever it recieves something. so if it recieves a million 1 byte buffers it will flush to disk 1 million times [10:32] webben has joined the channel [10:32] CrazyGoogle2: sholmes: nothing special [10:32] peol has joined the channel [10:32] peol has joined the channel [10:32] chapel: niklasfi: well that is expected [10:32] sholmes: why do it then? [10:33] chapel: you could build in a better buffer, that flushes after so many bytes [10:33] CrazyGoogle2: sholmes: its set automaticaly if wanted nickname already in use [10:33] chapel: CrazyGoogle2 sholmes it depends on the client and person [10:33] sholmes: oh [10:33] sholmes: i c [10:33] chapel: some people choose to use nick_ as the alternate if nick isn't available [10:34] sholmes: why is it in express we pass wierd things to app.use? [10:34] CrazyGoogle2: if you want login from two different workplaces [10:34] chapel: niklasfi: this might be old, but here is an idea http://substack.net/posts/cb328d [10:34] chapel: weird things? [10:34] chapel: CrazyGoogle2: I use an irc bouncer [10:34] sholmes: app.use(express.methodOverride()) //function call? [10:34] sholmes: app.use(express.router) //function call? [10:34] sholmes: app.use(express.router) //not a function call? [10:34] webben has joined the channel [10:34] CrazyGoogle2: chapel: its offtopic here anyway [10:35] chapel: eh CrazyGoogle2, not strictly enforced here [10:35] chapel: should see some of the convos [10:35] sholmes: what does app.use do? [10:35] chapel: app.use is like an all purpose catch all [10:36] chapel: every connection goes through app.us [10:36] chapel: app.use [10:36] stagas: sholmes: it depends on whether the middleware returns the function or not [10:36] chapel: so you could do app.use(function(req, res, next) { ... }); [10:36] MikhX has joined the channel [10:37] webben has joined the channel [10:37] niklasfi: sholmes: micheil has a patch in the pipe for that but apparently that patch is not wanted. the devs favoured an fwrite implementation [10:39] cyraxx: felixge: ich glaub wir haben uns eben im flur getroffen :) [10:39] sholmes: what does app.use do with it's argument? [10:39] chapel: sholmes: look at the source [10:39] felixge: cyraxx: kann sein : ). Ich sitze hier hinten um die ecke bei den DW leuten [10:39] webben has joined the channel [10:39] hellp has joined the channel [10:40] stagas: sholmes: it adds a middleware function [10:40] chapel: https://github.com/visionmedia/express/blob/master/lib/express/server.js#L44 [10:40] syntheze has joined the channel [10:40] mscdex: oi it's 15 til 6 [10:40] sholmes: stagas, what is middleware? [10:40] mscdex: time flies when you're coding! [10:40] chapel: middleware is like a middleman [10:40] hwinkel has joined the channel [10:40] stagas: sholmes: things after request and before response [10:41] sholmes: they're like plugins? [10:41] chapel: could say that [10:42] webben has joined the channel [10:42] sholmes: hmm [10:42] jetienne: anybody used backbone.js ? any feedback from the field ? [10:42] stagas: sholmes: yeap, basically each one gets its own copy of req, res, next, they manipulate the first two usually and call next() which jumps to the next middleware [10:43] stagas: correction- not a copy, the objects as they are [10:43] sholmes: interesting, and that's basically what connect does? [10:43] chapel: jetienne: feedback in what way? [10:43] stagas: sholmes: yes [10:44] sholmes: and connect only does that, it's pretty lightweight? [10:44] webben has joined the channel [10:45] Ezku\: yes. [10:46] jetienne: chapel: which part was nice, which part was not nice [10:46] sholmes: interesting. so connect sort of just extends the http.createServer function to except an arbitrary number of callbacks [10:46] jetienne: chapel: obviously this is valid only if you actually used it :) [10:46] chapel: jetienne: well backbone is pretty good, depends on what you want to do [10:46] webben has joined the channel [10:47] jetienne: chapel: on what did you use it ? [10:47] chapel: well working on using it :) [10:47] jetienne: ok :) [10:48] jetienne: chapel: so you seem at the same stage as me [10:48] chapel: but what are you looking to use it on? [10:48] chapel: I have done a bit of research on it [10:48] chapel: I just haven't actually implemented what I want to do yet [10:48] peol has joined the channel [10:48] peol has joined the channel [10:49] jetienne: chapel: currently im trying to understand the technology [10:49] webben has joined the channel [10:49] jetienne: chapel: it seems to be written by somebody serious [10:49] gg411 has joined the channel [10:50] chapel: it allows an mvc paradigm in the browser [10:50] matjas_ has joined the channel [10:50] chapel: which is pretty nice, if you use similar on the server [10:50] jetienne: chapel: doc is good. project still young, but a serious author may counter balance [10:50] jetienne: chapel: yep similar to sproutcore [10:50] jetienne: chapel: what about the bugs ? [10:51] jetienne: chapel: did you hit many bugs ? [10:51] webben has joined the channel [10:51] chapel: not any yet [10:52] stagas: sholmes: yeap exactly, also connect offers a bunch of useful middleware already [10:52] chapel: it is a sound project [10:52] chapel: smart people behind it [10:52] chapel: one of the guys behind it also made coffeescript [10:52] jetienne: chapel: this is ok, he may do a mistake or two :) [10:52] sholmes: stagas, what kind of middleware? [10:53] jetienne: chapel: he did underscore tho, which is nice in my book [10:53] stagas: sholmes: take a look here http://senchalabs.github.com/connect/ [10:54] webben has joined the channel [10:54] maushu has joined the channel [10:54] jetienne: http://ryth.posterous.com/sproutcore-vs-jquery-backbonejs?a <- chapel may be of interest [10:54] EGreg_ has joined the channel [10:55] chapel: yeah I read that when it was posted [10:55] chapel: I like backbone because it is simple enough to extend [10:55] chapel: I enjoy jquery as well, because I can use as much or little as I like [10:56] webben has joined the channel [10:58] k04n has joined the channel [10:58] webben has joined the channel [11:01] Vertice has joined the channel [11:01] webben has joined the channel [11:02] sveimac_ has joined the channel [11:02] sholmes: express uses connect to handle sessions? [11:02] andree has joined the channel [11:03] webben has joined the channel [11:04] jetienne: chapel: yep i decided i will do a toy with backbone.js. just to see how it works. now which toy ? :) [11:04] jetienne: chapel: do you have suggestion ? [11:04] chapel: umm, well backbone is meant for ajax stuff [11:04] yangbin has joined the channel [11:05] jetienne: a backend storage on the google doc would be nice [11:05] mnot has joined the channel [11:05] webben has joined the channel [11:06] mnot: mranney, you about? [11:07] markwubben has joined the channel [11:08] webben has joined the channel [11:09] andrzejsliwa has joined the channel [11:09] sholmes: so app.use in express, you pass the same kind of middleware function as you would in connect. Does app.use actually use connect under the hood? [11:10] dstufft: I'm a little stumped, i'm just learning node.js, and i really don't know a ton about js, but what would be the best way to make an app that you can extend it's functionality via plugins? [11:10] chapel: sholmes: express uses connect for a lot of things [11:10] altamic has joined the channel [11:10] altamic has joined the channel [11:10] webben has joined the channel [11:10] chapel: as far as I know, tj rolled connect into its own thing so as not to confound express [11:11] chapel: dstufft: there are a lot of different ways to approach that [11:11] chapel: by default node uses modules, which you could look at like plugins [11:11] chapel: but it depends on how you want to handle said plugins, and who you plan on targeting with the plugins [11:13] webben has joined the channel [11:13] dstufft: in python I would have a settings file that had a list of "installed" plugins and just import them, I suppose i could do similar with require now that i think of it [11:13] dstufft: though im not exactly sure how javascript searches for a module you are trying to import [11:13] sonnym has joined the channel [11:13] chapel: that is a node thing [11:13] chapel: require has a few scopes [11:14] chapel: but you can always revert to local require('./module'); [11:15] kubrow has joined the channel [11:15] bronson has joined the channel [11:15] dstufft: ok [11:15] webben has joined the channel [11:17] webben has joined the channel [11:17] hwinkel1 has joined the channel [11:20] webben has joined the channel [11:20] kawaz_air has joined the channel [11:21] hobodave has joined the channel [11:22] webben has joined the channel [11:23] yangbin has joined the channel [11:23] chrisfrog has joined the channel [11:24] webben has joined the channel [11:26] maritz has joined the channel [11:27] webben has joined the channel [11:27] bronson has joined the channel [11:29] webben has joined the channel [11:32] webben has joined the channel [11:33] fermion has joined the channel [11:33] sveimac has joined the channel [11:33] MattJ has joined the channel [11:34] webben has joined the channel [11:34] peol has joined the channel [11:34] peol has joined the channel [11:35] void_ has joined the channel [11:36] webben has joined the channel [11:38] shaunau has joined the channel [11:39] webben has joined the channel [11:39] altamic has joined the channel [11:39] altamic has joined the channel [11:41] webben has joined the channel [11:42] kawaz_air has joined the channel [11:42] case__ has joined the channel [11:42] case__: hi there [11:43] case__: i'm try to redirect express.logger() to a dedicated file but can't find doc, nor where logger is implemented in express sources... [11:43] case__: any clues? [11:44] webben has joined the channel [11:45] bronson has joined the channel [11:46] tanepiper: case__: yea, i think it's stream and you point to a fs.writeFile [11:46] webben has joined the channel [11:46] tanepiper: it's in the connect docs [11:47] case__: tanepiper, thanks [11:48] tanepiper: case__: https://gist.github.com/8ce7bbe5ae68dd1622dd [11:48] case__: tanepiper, i was confused because i didn't expect "express.logger" to be found in connect [11:48] tanepiper: express just wraps all the connect middleware into it's own namespace [11:48] tanepiper: so if you don't find something in the express docs, check the connect docs [11:49] webben has joined the channel [11:49] case__: got it. thanks a lot [11:49] c4milo has joined the channel [11:49] tanepiper: Ok, anyone think of a decent way to do this. I have a pin entry system, each pin is 6 digits long, and on login the user needs to select 3 - so i need to create an array of 3 unique values from the 6, and in order [11:50] tanepiper: so for example [1, 2, 5], [2, 3, 4], [1, 5, 6], etc [11:50] tanepiper: but can never be [2, 1, 4] or [3, 2, 3] [11:51] webben has joined the channel [11:51] zorzar has joined the channel [11:52] cwo has joined the channel [11:52] crohr has joined the channel [11:52] tanepiper: oh and also never be 0 [11:52] piscisaureus has joined the channel [11:52] fly-away has joined the channel [11:53] webben has joined the channel [11:58] tanepiper: nvm, think i've got it [11:58] altamic has joined the channel [11:58] altamic has joined the channel [12:03] bronson has joined the channel [12:03] sveimac has joined the channel [12:06] xla has joined the channel [12:07] emerleite has joined the channel [12:08] bronson has joined the channel [12:13] Tatham has joined the channel [12:20] davidc_ has joined the channel [12:22] Miljar has left the channel [12:23] Tatham has joined the channel [12:24] FireFly|n900 has joined the channel [12:24] Tatham has joined the channel [12:25] Tatham: Hi everyone - new to node.js / npm and looking for help on a question if anyone has a sec [12:26] perlmonkey2 has joined the channel [12:31] chapel: Tatham: ask away [12:31] tanepiper: just ask :) [12:31] Tatham: Cool. :) [12:32] Tatham: For reference, here's my github repo: https://github.com/tathamoddie/sydjs [12:32] peol has joined the channel [12:32] peol has joined the channel [12:32] Tatham: It runs using node.js fine, and an earlier version is deployed to http://sydjs.com (which is heroku) [12:32] Tatham: Now I want to use haml with it [12:32] Tatham: It is also running fine locally [12:32] Tatham: But I don't think node_modules is working properly [12:32] Tatham: And it can't resolve the module when I deploy to heroku [12:33] Tatham: 1) running 'npm bundle' locally creates node_modules but all the doco talks about .node_modules (with the dot) [12:33] Tatham: I had to add require.paths.unshift('./node_modules'); for it to work locally [12:34] okuryu has joined the channel [12:34] sveimac_ has joined the channel [12:35] Tatham: 2) It all falls over on Heroku with: [12:35] Tatham: module:252 [12:35] Tatham: throw new Error("Cannot find module '" + request + "'"); [12:35] Tatham: ^ [12:35] Tatham: Error: Cannot find module './../.npm/hamljs/0.4.5/package/index' [12:35] Tatham: at loadModule (module:252:15) [12:35] Tatham: at require (module:378:12) [12:35] Tatham: at Object. (node_modules/hamljs@0.4.5/index.js:11:18) [12:35] Tatham: at Module._compile (module:427:23) [12:35] Tatham: at Module._loadScriptSync (module:437:8) [12:35] Tatham: at Module.loadSync (module:310:10) [12:35] Tatham: at loadModule (module:255:16) [12:35] Tatham: at require (module:378:12) [12:35] Tatham: at Object. (/mnt/home/slugs/a32a05ab-d601-4869-b61b-4907da2a398d/mnt/server.js [12:35] Tatham: at Module._compile (module:427:23) [12:35] Tatham: -----> Your application crashed. [12:35] Tatham: Any ideas? [12:36] shaunau has joined the channel [12:38] felixge has joined the channel [12:38] felixge has joined the channel [12:38] MattDiPasquale has joined the channel [12:43] rjrodger_ has joined the channel [12:47] rjrodger_ has joined the channel [12:49] lukegalea has joined the channel [12:52] nolan_d has joined the channel [12:53] broofa has joined the channel [12:53] torvalamo: it literally says what the problem is [12:56] Tatham: Right ... it's looking for a module in a particular path and can't find it [12:56] Tatham: I can read that too [12:56] Tatham: 1) Why is it looking for it in that path on Heroku, but not locally [12:57] Tatham: 2) Why do I need to unshift the './node_modules/' path in if I'm supposedly using all the defaults [12:57] torvalamo: no idea how heroku works [12:58] torvalamo: it's probably a problem with that? [12:58] torvalamo: is it some sort of vm? [12:58] Tatham: Ok - I'll pursue #1 elsewhere. [12:59] Tatham: Any ideas on #2 thought? Why does running "npm bundle" create ./node_modules/ yet node looks in ./.node_modules/ (with the extra dot)? [12:59] torvalamo: may wanna post that on npm issues [12:59] Tatham: Is that another IRC channel or a mailing list? [13:00] Tatham: http://nodejs.org/ isn't the most helpful set of community links [13:01] Tatham: Or do you mean https://github.com/isaacs/npm/issues ? [13:02] indutny1 has joined the channel [13:02] peol has joined the channel [13:02] peol has joined the channel [13:03] stepheneb has joined the channel [13:03] mape: Yeah that one [13:03] Tatham: Right. Will raise #2 there. Thanks. [13:04] sveimac has joined the channel [13:04] d0k has joined the channel [13:05] hosh_work has joined the channel [13:05] Twelve-60 has joined the channel [13:06] hosh_work has joined the channel [13:07] amikitik has joined the channel [13:08] rachelbutts has joined the channel [13:10] genbit has joined the channel [13:14] sivy has joined the channel [13:16] Vertice has joined the channel [13:19] bradleymeck has joined the channel [13:25] tc77 has joined the channel [13:26] heavysixer has joined the channel [13:26] tc77 has left the channel [13:26] jamescarr has joined the channel [13:27] unomi has joined the channel [13:27] kriszyp has joined the channel [13:29] mike5w3c has joined the channel [13:31] Z10x6k6h has joined the channel [13:33] peol has joined the channel [13:33] peol has joined the channel [13:34] sveimac has joined the channel [13:37] severla has joined the channel [13:39] djanowski has joined the channel [13:40] colinclark has joined the channel [13:44] margle has joined the channel [13:47] bronson has joined the channel [13:48] maritz has joined the channel [14:01] trotter has joined the channel [14:01] bshumate has joined the channel [14:02] boaz has joined the channel [14:03] lintaba has joined the channel [14:03] peol has joined the channel [14:03] peol has joined the channel [14:04] arpegius has joined the channel [14:05] Lorentz: async coding sure is unconventional to how I usually wrote code. [14:06] backthatzachup_ has joined the channel [14:08] Vertice has joined the channel [14:08] pHcF has joined the channel [14:08] altamic has joined the channel [14:08] altamic has joined the channel [14:10] mape: Lorentz: Less magic :) [14:11] jlecker has joined the channel [14:12] bronson has joined the channel [14:15] montylounge has joined the channel [14:15] lintaba has left the channel [14:15] saschagehlich has joined the channel [14:15] maushu: Lorentz: more magic :) [14:17] davidsklar has joined the channel [14:19] gattuso has joined the channel [14:28] Vertice has joined the channel [14:31] fumanchu182 has joined the channel [14:32] markwubben has joined the channel [14:33] yx has joined the channel [14:34] peol has joined the channel [14:34] peol has joined the channel [14:35] sveimac has joined the channel [14:37] unomi has joined the channel [14:39] bronson has joined the channel [14:40] arpegius has joined the channel [14:43] bronson_ has joined the channel [14:44] jtsnow has joined the channel [14:44] bbttxu has joined the channel [14:45] backthatzachup_ has left the channel [14:47] perlmonkey2 has joined the channel [14:49] SwiftLayer has joined the channel [14:50] BillyBreen has joined the channel [14:52] shaver: hrm [14:52] shaver: pretty hard to debug these all-in-node's-js stack traces [14:56] slaskis: shaver: word [14:56] charlenopires has joined the channel [14:59] ajashton has joined the channel [15:01] Lorentz: Huh, didn't know mongoose reached 1.0 [15:04] shaver: how does one do https now? I don't see a flag listed in the http.request or http.get docs [15:04] peol has joined the channel [15:04] peol has joined the channel [15:05] mraleph has joined the channel [15:05] sveimac has joined the channel [15:06] benburkert has joined the channel [15:07] shaver: oh, https! [15:07] akahn has joined the channel [15:11] amacleod has joined the channel [15:11] mayfield has joined the channel [15:12] hornairs has joined the channel [15:13] Ori_P has joined the channel [15:17] stagas has joined the channel [15:18] jchris has joined the channel [15:18] mikeal: yes [15:18] mikeal: same api, different' module [15:19] Gruni has joined the channel [15:19] rwaldron has joined the channel [15:20] severla has joined the channel [15:21] severla: how do i create a node app that does not exit and it's not blocking? [15:22] severla: non [15:22] void_ has joined the channel [15:23] paulrobinson has joined the channel [15:23] shaver: I wonder why my program isn't exiting [15:23] shaver: I think all my requests are complete [15:23] losing has joined the channel [15:26] paulrobinson has left the channel [15:27] felixge: shaver: you might need to do client.end() [15:27] felixge: not sure [15:27] felixge: try to isolate it [15:27] felixge: :) [15:27] jdalton has joined the channel [15:27] shaver: I'm doing that, yeah [15:27] jdalton has left the channel [15:27] jankoprowski has joined the channel [15:27] felixge: (I'm suggesting client.end() because keep-alive could keep a connection open even so all of your requests are done) [15:28] shaver: you mean http.end()? [15:28] mandric has joined the channel [15:28] shaver: I'm just using http.get, and my callback is being called, and the response.onend is being called [15:30] dguttman has joined the channel [15:30] luke` has joined the channel [15:31] tanepiper: Has anyone got Stylus's connect middleware to work yet? [15:32] ericnakagawa has joined the channel [15:33] yhahn has joined the channel [15:34] peol has joined the channel [15:34] peol has joined the channel [15:35] vipaca has joined the channel [15:35] sveimac has joined the channel [15:36] figital has joined the channel [15:36] CrazyGoogle2: there is an error in docu for inherit [15:36] CrazyGoogle2: http://nodejs.org/docs/v0.3.7/api/util.html#util.inherits [15:36] CrazyGoogle2: function MyStream() { events.EventEmitter.call(this); } [15:37] CrazyGoogle2: its better to use super_.constructor.call(this) [15:37] CrazyGoogle2: isnt it ? [15:37] mischief has joined the channel [15:37] akahn has joined the channel [15:38] mape: mscdex: Around? [15:38] sth: CrazyGoogle2: I normally just events.EventEmitter.call(this) and util.inherit(foo, events.EventEmitter) [15:39] shaver: felixge: nothing in the agent's queue [15:39] shaver: hrmph [15:39] CrazyGoogle2: sth: this works, but its bad coding style [15:39] CrazyGoogle2: sth: assoon you will change superclass in util.inherit, you have to change you construktor [15:39] sth: afaik, it's the only way to do inheritence in node [15:39] CrazyGoogle2: i think best way would be : [15:40] felixge: CrazyGoogle2: yeah. Another problem is that "class methods" are not inherited [15:40] felixge: I like to define class methods on my constructor [15:40] CrazyGoogle2: var MyStream=function() { MyStream.super_.apply(this, arguments); } [15:41] CrazyGoogle2: so if you change inheritence, you dont need rewrite your code [15:41] felixge: CrazyGoogle2: even better: this.constructor.super_.apply(this, arguments) [15:41] felixge: :) [15:41] CrazyGoogle2: felixge: i like this one too, but i use static superclass reference normaly [15:42] CrazyGoogle2: anyway i think documentation should show user best way to work [15:42] felixge: CrazyGoogle2: why? Feels wrong from the DRY perspective you seem to argue for [15:42] CrazyGoogle2: not fastest [15:44] mikeal has joined the channel [15:45] ericnakagawa has joined the channel [15:45] Poetro has joined the channel [15:45] CrazyGoogle2: felixge: you think that this.constructor is best way ? [15:46] CrazyGoogle2: my way is faster [15:46] CrazyGoogle2: you have one "." less [15:46] felixge: CrazyGoogle2: faster? [15:46] felixge: CrazyGoogle2: you're kidding me, right? [15:46] CrazyGoogle2: so its faster for JS engine to get to the needed function [15:46] CrazyGoogle2: no, i am seriosly [15:47] FireFly|n900 has joined the channel [15:47] felixge: CrazyGoogle2: if you want fast, don't use inheritence ;) [15:47] felixge: a prototype chain ain't traversing itself [15:47] CrazyGoogle2: obj1.obj2.method is faster then obj0.obj1.obj2.method [15:47] felixge: CrazyGoogle2: this stuff will never become your bottleneck [15:47] felixge: I promise [15:47] CrazyGoogle2: :D [15:47] felixge: I have written and benchmarked some high performance node code [15:48] CrazyGoogle2: i learned that local variables are best way to work with in JS [15:48] felixge: in fact, you probably don't want to create objects on your critical path if you can avoid it [15:48] CrazyGoogle2: no idea how its right for v8 [15:48] felixge: because creating objects in v8 is slow as hell [15:48] felixge: compared to property access [15:48] felixge: but then again, if you're at the point where that matters, you have a really interesting use case :) [15:48] CrazyGoogle2: thats so true :( but i like objects and specialy inheritance [15:49] felixge: The big problem is parsing buffers [15:49] CrazyGoogle2: it leads me to less code and better maintanence of the code [15:49] felixge: that's difficult to do fast [15:49] felixge: parsing anything really [15:49] felixge: unless you can boyer-moore it, looking at every byte of a stream is expensive [15:49] CrazyGoogle2: i know [15:49] shaver: ah, I might need to explicitly redis.quit() [15:50] felixge: shaver: yeah, that sounds right [15:50] felixge: :) [15:50] shaver: seems strange, though [15:50] felixge: shaver: why? [15:50] shaver: if there aren't any requests outstanding [15:50] felixge: shaver: how would your redis lib know it's done? [15:50] jchris has joined the channel [15:50] shaver: felixge: it knows that there are no requests outstanding [15:50] felixge: shaver: well, should it always close the connection in that case? [15:50] shaver: and node knows that there are no more events pending [15:50] CrazyGoogle2: anyway i think doc has a bad codestyle, can i report it anywhere ? [15:50] p4p4p4 has joined the channel [15:50] felixge: shaver: because that what gets things to hang, an open socket [15:50] Kingdutch has joined the channel [15:50] shaver: I guess I want a weak reference sort of thing for events [15:51] felixge: CrazyGoogle2: there is a thread on the mailing list, I think Marco or Mikeal are organzing a docs team [15:51] shaver: if there aren't any events coming back, quit [15:51] felixge: shaver: you don't know that [15:51] mikeal: micheil is doing that [15:51] shaver: all the event-listener stuff adds/removes a count [15:51] CrazyGoogle2: felixge: danke [15:51] mikeal: other crazy spelling michael :) [15:51] felixge: shaver: the redis server could send data at any point [15:51] pandeiro has joined the channel [15:51] shaver: redis doesn't send unsolicited requests, does it? [15:51] felixge: shaver: and unless node becomes aware of redis, it's not something node can solve [15:51] shaver: oh, pubsub [15:52] mikeal: micheil smitth is the "docs michael" [15:52] muhqu has joined the channel [15:52] ncb000gt has joined the channel [15:52] felixge: shaver: so yeah, the redis driver could fix that [15:52] shaver: felixge: well, node_redis can tell node ... right [15:52] felixge: shaver: but your idea of fixing it might be undesirable as you'll have to do more connections on a busy server [15:52] shaver: no, I don't want it to be aggressively closed [15:52] mikeal: redis can push data to node using pubsub [15:52] felixge: mikeal: ah, sorry, right [15:52] shaver: I want redis to say "events are pending", "events are no longer pending" [15:52] CrazyGoogle2: i would so much love to have issue web management in node, something like redmine [15:53] CrazyGoogle2: maillists are pain for me. [15:53] softdrink has joined the channel [15:53] shaver: and when node sees that all its event sources have dropped to not-pending, it tells them all to clean up [15:53] felixge: CrazyGoogle2: there are the github issues, but I don't think ryan really cares about those too much [15:53] mikeal: CrazyGoogle2: you can log tickets on github [15:53] mikeal: ry looks at them [15:53] felixge: mikeal: he does? [15:53] shaver: because by definition nothing else can happen in the program [15:53] mikeal: not all the time, but i see him close them out [15:53] yozgrahame has joined the channel [15:53] shaver: node_redis would need to track subscriptions, but i think it already does [15:53] CrazyGoogle2: github issue management is poor, but better than maillists :D [15:54] CrazyGoogle2: ACTION going to github [15:54] lep_ has joined the channel [15:54] mikeal: it's intentionally minimalist [15:54] mikeal: which works well for node, we don't need a much of milestones and categorizations [15:54] shaver: yay! [15:54] shaver: it works [15:54] felixge: I guess I should start picking bugs from the github list [15:54] felixge: and start fixing them [15:54] mikeal: everything is being worked on, it's all being worked on now :) [15:54] mikeal: felixge: that would be awesome :) [15:55] mikeal: i think a lot of them are windows right now [15:55] mikeal: because of this whole cygwin -> mingw transition [15:55] felixge: I had a dream about using node on windows the other night [15:55] felixge: it was very strange [15:55] tanepiper: Windows OS is to nodejs, as IE6 is to general web dev :D [15:55] Kingdutch: lol [15:55] ceej has joined the channel [15:56] halfhalo: To damn common? [15:56] shaver: Windows should run node really well [15:56] mikeal: strangely enough [15:56] felixge: ACTION goes back to fix IE7 bugs. See how modern I am @ tanepiper ? [15:56] mikeal: windows has a natvie non-blocking API [15:56] shaver: its IO completion model is a great fit [15:56] mikeal: and by all accounts it's really nice [15:56] mikeal: and pretty performant [15:56] shaver: it's just that msys hurts you in your tender places [15:56] shaver: yeah, the Linux SIGIO model was heavily inspired by it [15:56] mikeal: shaver: i think right now it just uses select [15:56] shaver: and Linux's aio stuff is still woefully immature [15:56] mikeal: not the good windows native non-blocking stuff [15:57] shaver: mikeal: yeah, that's like trying to use visual basic on Linux -- not if you care about perf! [15:57] mikeal: it's a stepping stone [15:57] shaver: yeah [15:57] mikeal: some Microsoft guys are talking about doing the native port [15:57] shaver: excellen [15:57] tanepiper: Visual COBOL [15:57] tanepiper: ftw [15:57] mikeal: the problem currently isn't having the support, it's maintaining it [15:57] mikeal: basically, only ryah works on it [15:57] CrazyGoogle2: 201 issues [15:57] CrazyGoogle2: ... [15:57] danoyoung has left the channel [15:58] tanepiper: CrazyGoogle2: a bunch have probably been fixed, they just need tickets closed [15:58] mikeal: we need some good Windows contributors before we take on a lot more related work [15:58] charlenopires_ has joined the channel [15:58] tanepiper: so it's not a correct representation of all bugs, and some will be feature requests too [15:58] shaver: mikeal: yeah [15:58] CrazyGoogle2: tanepiper: we cant get people at my work projekt also not to closing theirs tickets :( [15:59] rjrodger_ has joined the channel [15:59] mikeal: first of the month email list reminders [15:59] mikeal: yay! [15:59] tanepiper: CrazyGoogle2: i suspect on/before 0.4 hits ryah will clean them up [15:59] mikeal: yeah, he goes in to bug squashing phases before releases [16:00] mikeal: thing is, the ticket trackers isn't an accurate representation of *everything* that is being worked on [16:00] mikeal: tracker [16:01] nook has joined the channel [16:01] CrazyGoogle2: thats because you github issue tracker is little bit poor [16:01] dmcquay has joined the channel [16:02] felixge: mikeal: bert belter is working on the windows port like crazy [16:02] CrazyGoogle2: if you can categorize, or prioritize, or set mailstains [16:02] felixge: * belder [16:02] felixge: mikeal: not sure why you credit ryan with it [16:02] CrazyGoogle2: it could be better used for planing of the project [16:02] felixge: I mean I guess he's involved [16:02] felixge: but Bert is working his ass of [16:02] felixge: * off [16:02] FireFly has joined the channel [16:02] mikeal: mingw or cygwin? [16:03] felixge: mikeal: mingw! [16:03] Me1000 has joined the channel [16:03] mikeal: i see, that's why ry has to do the cygwin work [16:03] felixge: unless I'm really confused now, but he is co,miting all the time [16:03] mikeal: i remember him dealing with it a while back [16:03] mikeal: no, that makes sense [16:03] felixge: mikeal: in fact, he passed all of us in terms of commits, he is #2 after ryan [16:03] felixge: so credit where credit is due :) [16:03] mikeal: cause i remember ryan saying that mingw would be great once someone else wrote it :) [16:03] sonnym has joined the channel [16:04] mikeal: the problem with those commit stats, is that node doesn't have a whole lot of code :) [16:04] mikeal: so lines effected maps really poorly to real changes occurring [16:04] felixge: mikeal: I use them as general "activity" indicators [16:04] felixge: no, this is commits, not lines [16:04] felixge: lines are useless [16:04] mikeal: i would rather see monthlies than all time [16:05] ROBOTARMY has joined the channel [16:06] sveimac has joined the channel [16:06] pietern has joined the channel [16:06] mikeal: OH! Bert Belder === piscisaureus [16:06] mikeal: now it all makes sense [16:07] ryanfitz has joined the channel [16:08] felixge: yip [16:08] mikeal: what is the native windows async io called? [16:08] EyePulp has joined the channel [16:09] kylefox has joined the channel [16:10] shaver: completion ports [16:10] kylefox: So my iMac was getting kernel panics a lot lately. I took it to the Apple store and they found in the logs: "BSD process name corresponding to current thread: node" [16:10] kylefox: Has anyone ever experienced this? It seems like Node is causing kernel panics? [16:10] shaver: node can't cause kernel panics [16:11] BillyBreen: haven't seen that on my mbp [16:11] shaver: it's a userspace app [16:11] mikeal: my friend russell saw my tweet [16:11] shaver: if the kernel panics because of something node does, it's a kernel (or hardware) bug [16:11] mikeal: he works at micrsoft and is a big "side project" guy [16:11] kylefox: Hm. Okay, thanks [16:11] mikeal: being needing an excuse to play with node [16:11] mikeal: need to get him on completion ports support :) [16:11] kylefox: (did a HW scan, it seems ok. must be something else) [16:12] shaver: I have been waist-deep in apple kernel and framework bugs for weeks now, you have my sympathies [16:12] felixge: shaver: I have caused kernel panics with node [16:13] shaver: kernel bug [16:13] shaver: by definition [16:13] shaver: that's the whole point of userspace [16:13] felixge: shaver: well, I was calling fork() in node's REPL [16:13] mikeal: a fried of mine accidentally wrote a proxy in node that kept proxying to itself [16:13] shaver: sure [16:13] felixge: this was an addon I wrote [16:13] felixge: ;) [16:13] mikeal: aftera minute OS X kernel panic'd :) [16:13] shaver: forkbombing shouldn't cause a panic [16:13] felixge: shaver: yeah [16:13] felixge: shaver: but I doubt the apple store folks will fix kernel bugs [16:13] felixge: ;) [16:13] shaver: yeah, OS X and other Apple software doesn't handle resource exhaustion well [16:14] shaver: felixge: no, but they could file them [16:14] mikeal: but they are geniuses :) [16:14] mcroydon has joined the channel [16:15] genbit has left the channel [16:16] kylefox: lol [16:16] sprout has joined the channel [16:16] estrathmeyer has joined the channel [16:16] kylefox: The "genius" was able to plug my imac into some automatic hardware scanning/testing device [16:17] kylefox: and when it said the HW looked good, the genius concluded he "had no idea" what the problem was [16:17] djanowski has joined the channel [16:17] kylefox: Anyway, I'll stop blaming node and try to find the real reason my imac is crashing :/ [16:18] mikeal: reset the PRAM :) [16:18] halfhalo: reverse polarity! [16:18] mikeal: i couldn't believe it, i was in Germany last September [16:18] mikeal: and my usb ethernet wasn't working [16:19] mikeal: crazy random error [16:19] kawaz_air has joined the channel [16:19] mikeal: the fix was resetting the PRAM [16:19] mikeal: i was like "they still have that!" [16:19] mikeal: i hadn't heard about the PRAM since OS 9 [16:19] estrathmeyer has left the channel [16:20] MatthewMueller has joined the channel [16:21] felixge: mikeal: ethernet is now broken in egypt [16:21] felixge: mikeal: but they need to reset government [16:21] felixge: ;) [16:21] felixge: so you got it easy [16:21] felixge: : p [16:21] mikeal: need to reset Cairo's PRAM [16:23] tjholowaychuk has joined the channel [16:25] [AD]Turbo: having a record id as a string (e.g. "4cfe028fbd6deb1048000005"), how can I (correctly) query the db in Javascript? I have to "cast" the string into an ObjectId but I don't know how [16:25] claudiu__ has joined the channel [16:26] kylefox: Have you guys worked with Nave at all? I'm trying to figure out the best way to install node, npm, etc. without screwing things up system-wide, heh. [16:26] kylefox: and preferably keeping things isolated (like rvm or virtualenv) [16:26] mikeal: [AD]Turbo: are you writing or reading that ? [16:27] mjr_ has joined the channel [16:28] mikeal: read: db.get("4cfe028fbd6deb1048000005", function (query) {…}); write: db.write("4cfe028fbd6deb1048000005", {key:"value"}, function (err, success) {…}) [16:31] [AD]Turbo: mikeal, read [16:31] [AD]Turbo: collection.findOne({ '_id': strId }, function(err, doc) { [16:32] [AD]Turbo: I have to cast strId into the right type [16:34] kevwil has joined the channel [16:34] hornairs has joined the channel [16:35] matt_c has joined the channel [16:36] sveimac has joined the channel [16:36] mikeal has joined the channel [16:37] enotodden has joined the channel [16:38] matt_c has joined the channel [16:40] altamic has joined the channel [16:40] curtischambers has joined the channel [16:40] ajashton has joined the channel [16:41] Evet has joined the channel [16:41] matt_c has left the channel [16:42] matt_c has joined the channel [16:45] proj has joined the channel [16:46] hobodave has joined the channel [16:47] strmpnk has joined the channel [16:47] syntheze has joined the channel [16:48] dmcquay has joined the channel [16:49] aguynamedben has joined the channel [16:50] tanepiper: bahh, no cloudhead when you need him :( [16:51] jetienne: i can crash chrome stable :) [16:52] altamic has joined the channel [16:52] tjholowaychuk: I crash android almost every day [16:54] jetienne: i win! [16:54] PyroPeter: firefox crashes on windows when you open a mp3-url [16:54] djanowski has joined the channel [16:54] stephank has joined the channel [16:55] jakehow has joined the channel [16:55] joelklabo has joined the channel [16:55] Kingdutch: My nvidia display driver just crashed :S [16:56] jetienne: im taking over the crashing world [16:56] stagas: my system is always in a crash-by state anything can trigger a crash [16:56] stagas: :P [16:57] jetienne: :) [16:57] halfhalo: mine isn't..... but that's because I don't do any fancy stuff on my laptop [16:57] Vertice has joined the channel [16:58] tanepiper: ahh goddamit - sometimes it's annoying that js does call by reference! [16:58] stagas: mine is due to the fact it's a windows I haven't formatted since 2001 [16:59] tanepiper: i was doing newsettings = settings.database, then setting newsettings.auth.username, and it was overiding settings.database.auth.username! [17:00] djanowski has joined the channel [17:00] sprout has joined the channel [17:01] briznad has joined the channel [17:01] eee_c has joined the channel [17:02] KungFuHamster has joined the channel [17:02] tanepiper: i wish Object had a native .copy method [17:02] yhahn has joined the channel [17:02] djanowski has joined the channel [17:03] jetienne: i wish js had destructor :) [17:03] noahcampbell has joined the channel [17:04] peol has joined the channel [17:04] MatthewMueller has joined the channel [17:05] djanowski has joined the channel [17:06] bronson has joined the channel [17:07] sveimac has joined the channel [17:07] amerine has joined the channel [17:09] xla has joined the channel [17:09] isaacs has joined the channel [17:10] isaacs: Tatham: it's future-proofing [17:11] isaacs: Tatham: node doesn't look in ./.node_modules. It looks in ~/.node_modules (not the ~ meaning your home dir) [17:11] isaacs: Tatham: the "node_modules" bundle location will be where node looks in the next version. [17:11] isaacs: Tatham: for now, do require("./node_modules/blah") [17:11] FireFly: Hm [17:12] tanepiper: tjholowaychuk! I can't get the connect middleware for stylus to work :( [17:13] tjholowaychuk: tanepiper: no? did oyu look at the example? [17:13] tanepiper: yea, does it matter if my .styl and .css files want to live in the same place? [17:13] tjholowaychuk: depends on your config, but no. by default the destination dir is the same as the source dir [17:13] tjholowaychuk: so i you only pass in source then yes [17:14] tjholowaychuk: maybe send a gist [17:14] tanepiper: https://gist.github.com/cb46b92e96108d8becb9 [17:14] tjholowaychuk: ah :) [17:14] tjholowaychuk: well it has to be above the staticProvider [17:14] tjholowaychuk: the stylus middleware doesn't serve them [17:14] tjholowaychuk: just compiles [17:15] tjholowaychuk: and favicon() should be at the top so that it is a quick hit [17:15] MatthewMueller: Ahh my server.js is getting incredibly large.. How are people splitting up their controller logic? [17:15] stagas: MatthewMueller: wrap into a module [17:15] tjholowaychuk: and router should be moved down, otherwise you wont (or shouldnt at least) get request bodies, sessions etc [17:15] creationix has joined the channel [17:16] aheckmann has joined the channel [17:16] tanepiper: to the bottom? [17:16] tjholowaychuk: more or less yeah [17:16] tjholowaychuk: i usually have staticProvider below it [17:16] tjholowaychuk: so that my routes can intercept files [17:16] davglass has joined the channel [17:17] dnyy has joined the channel [17:17] springmeyer has joined the channel [17:17] MatthewMueller: stagas: okay that makes sense to me for library components, but its unclear to me how I would wrap my routing up into module [17:17] Aikar: MatthewMueller: app = express.createServer(); fs.readdir('./controllers/', function(err, files) { if(!err) { files.forEach(function(file) { require('./controllers/' + file }).registerController(app); } }); [17:17] tanepiper: hrmm, ok moved it and still not getting anything. the default ext is .styl ? [17:18] bartt has joined the channel [17:18] tjholowaychuk: tanepiper: yup .styl, all I can suggest is maybe trying the example I have, and i that does not work maybe it is a versioning issue with node or connect [17:18] Aikar: then in each file in controllers dir, exports.registerController = function(app) { app.get('/foo', function(){}); } [17:18] Aikar: MatthewMueller: thatll quickly let you just throw files in a controllers dir and all execute [17:19] qFox has joined the channel [17:19] MatthewMueller: Aikar: Okay this looks promising - I'll check try that out. Thanks! [17:19] tanepiper: connect 0.5.7, nodejs 0.3.7, express 1.0.3 [17:20] Aikar: MatthewMueller: change fs.readddir to readdirSync [17:20] Aikar: and use files as a return var [17:20] Aikar: otherwise itll run async, but i dont think that matters actually unless you have to define routes before listening [17:20] MatthewMueller: Aikar: so this basically just creates the notion of include(...) in node right? [17:20] Aikar: MatthewMueller: yep [17:21] tjholowaychuk: tanepiper: hmm I suspect maybe 0.3.x is the issue [17:21] tjholowaychuk: maybe double check with `n` or similar and grab 0.2.6 [17:21] MatthewMueller: Aikar: wasn't there a reason include(...) wasn't added? For global namespace issues? [17:21] Aikar: this isnt putting in global [17:21] Aikar: these are all in their own scope [17:21] Aikar: but your passing a reference to your server to them [17:21] tanepiper: tjholowaychuk: k, will do [17:22] tanepiper: i've got a compile step in my build anyway for now [17:22] MatthewMueller: Aikar: Yah true. [17:23] tjholowaychuk: tanepiper: ok cool. ive been adding more compilation stuff to stylus(1) [17:23] tjholowaychuk: still need a --watch in there [17:23] mape: Anyone here played around with node-ncurses? [17:23] Aikar: MatthewMueller: theres really nothing 'bad' about the approach i just gave you other than you cant safely ensure 'this controller will be loaded before that one', unless you manually list the order of them instead of relying on fs.readdir [17:24] w0rse: Hi. Can anybody help me with sessions in Express? I'm running an app from examples and always get "viewed 1 times" (counter doesn't increment) [17:24] Aikar: unless you name the files alphabetically and sort the files array before forEaching it [17:24] w0rse: I'm on 0.3.7pre [17:24] MatthewMueller: Aikar: I see.. Well that's an issue for routing that uses next(). [17:24] tjholowaychuk: w0rse: hmm just tried with 0.2.6, works for me [17:25] Aikar: MatthewMueller: doesnt next do it by 'has the same match' ? [17:25] tjholowaychuk: w0rse: and tried with 0.3.7 [17:25] Aikar: oh, yeah itll be an issue [17:25] tjholowaychuk: works [17:25] Aikar: but if you sort the array and ensure order by file names, that can work [17:25] w0rse: tjholowaychuk: does this one work? http://184.154.37.78:3000/ I'm thinking about expiry/timezones thing [17:25] Aikar: you can even export a sort index, and write a custom sort function that rearranges the order based on sort index [17:26] tjholowaychuk: w0rse: hmm nope [17:26] Aikar: module.exports.sortindex = 1; module.exports.registerController=function(app) {}; [17:26] Aikar: module.exports.sortindex = 2; module.exports.registerController=function(app) {}; [17:26] MatthewMueller: Aikar: Well it passes the request onto the next route that will capture it. Its not a big deal because you probably wouldn't want catching being done in separate controllers, because more than likely they're related. [17:26] Aikar: then your sort func will make the first one load before 2 [17:26] Aikar: yep [17:26] MatthewMueller: Aikar: Yah, I'm not worried about that. Thanks. [17:27] Aikar: but what i just said above would handle it if you DID need to ensure order, but really if your codes layed out right you shouldnt [17:27] rjrodger_: for stylus, +1 for --watch [17:27] m64253 has joined the channel [17:27] tjholowaychuk: :) [17:28] MatthewMueller: Now, one more question: Does anyone have an elegant solution for the scaling a growing number of socket messages that need to be handled between the client and server as functionality is added? [17:30] Aikar: MatthewMueller: use a similiar approach, dynamically load files with exported funcs [17:31] Me1000 has joined the channel [17:31] MatthewMueller: Aikar: How about on the client-side? I'm determined to find a one-size fits all approach. [17:31] creationix has left the channel [17:31] darklajid: Using node-mysql here, trying to insert text with umlauts leads to a mess. What can I possibly miss? Server is using utf-8 only [17:31] Kingdutch has joined the channel [17:32] Aikar: MatthewMueller: or, id probally do it as so: have a "SocketCommands" handler, and any code that has commands associated with it, let them require('SocketHandler') and 'registerCommand', and on client, have a .js request that goes to a route thatll parse the currently registered commands and read in client side files and build a js file of the client code based on current registered funcs [17:33] Aikar: ideally this would all be built on process start and cached [17:33] w0rse: tjholowaychuk: pulled latest express and submodules - still no luck [17:33] steffkes has joined the channel [17:33] w0rse: anything else I can try? [17:34] emerleite has joined the channel [17:34] tjholowaychuk: w0rse: hmmm... is this with the memory store? [17:34] tjholowaychuk: w0rse: if it's the example then yeah. hmm.. fuck.. haha [17:34] tjholowaychuk: really weird [17:34] w0rse: tjholowaychuk: yes, just standard app.js from examples [17:34] tjholowaychuk: not a cookie issue because i tried in my browser [17:34] springmeyer has joined the channel [17:34] tjholowaychuk: very odd.. [17:35] w0rse: tjholowaychuk: I see it tries to set a cookie in headers. Like: connect.sid=XSj3vxxN0h869vbCq3MANzJx.HI4f6sojs8R%2FMWYzNhSY5Vpqg%2FwgOhjKu%2FTS%2F4EHJOM; path=/; httpOnly; expires=Tue, 01 Feb 2011 11:30:42 GMT [17:36] MatthewMueller: Aikar: Hmm. Okay, that makes sense. I'll look into that approach. Thanks! [17:37] sveimac has joined the channel [17:40] dgathright has joined the channel [17:46] marek_z has joined the channel [17:47] julienXX: Hello! Is it possible to set a timeout for a http client request? [17:48] mraleph1 has joined the channel [17:49] pedrobelo has joined the channel [17:50] w0rse: tjholowaychuk: I hardcoded the expires=null in session.js and it worked. It probably has to do something with timezones [17:51] ryah: julienXX: req.connection.setTimeout [17:51] tjholowaychuk: w0rse: weird :sss [17:52] ryah: julienXX: by default set to 2 minutes [17:52] shaver: ryah: does that apply to all requests on that connection? [17:52] ryah: yes [17:52] shaver: ok [17:52] ryah: it's an idle timeout [17:52] shaver: so with keepAlive and pipelining you might get some crosstalk [17:52] shaver: is there a way to just req.cancel? [17:52] shaver: then I could setTimeout to victory [17:52] ryah: there is not [17:52] julienXX: ryah: ok thanks. Is there a timeout event? [17:52] ryah: but here should be [17:52] shaver: OK [17:52] shaver: I'll try forking and making it [17:53] shaver: I have a slow-ass web service that is unpredictably slow [17:53] ryah: julienXX: req.connection.on('timeout') [17:53] julienXX: ryah: great! thanks. [17:54] tanepiper: tjholowaychuk: is redis session store broken with connect session? [17:54] tjholowaychuk: tanepiper: shouldnt be [17:54] tjholowaychuk: we use it [17:54] tanepiper: hmm, let me disable it again and check it's not my code [17:54] mikeal has joined the channel [17:54] tjholowaychuk: like i said if your middleware is in a wonky position it wont work [17:55] fermion has joined the channel [17:55] tanepiper: hmm yea, breaks when I add a new RedisStore using connect-redis. Here is my current order: https://gist.github.com/14a36b07ba3a3e0f041e [17:56] tanepiper: when i console.log req.session i get undefined :( [17:57] fermion has joined the channel [17:57] jchris has joined the channel [17:57] tanepiper: whoops, nope that was a typo [17:57] tjholowaychuk: so it is working? or no? [17:58] TooTallNate has joined the channel [17:58] tanepiper: well it is there, and it's redirecting to the right url, but rendering the wrong view [17:58] tanepiper: but when i turn off redis store it works as expected [17:58] broofa has joined the channel [17:59] tjholowaychuk: tanepiper: i think you are right [17:59] tjholowaychuk: wtf [17:59] tjholowaychuk: ill look into it [17:59] davida has joined the channel [17:59] w3dot0 has joined the channel [17:59] mape: tjholowaychuk: I've also had issues with connect-redis [17:59] mape: * tanepiper [17:59] tanepiper: hmm yea, it doesn't seem to set req.session.user [17:59] tjholowaychuk: messed, looking into it right now [17:59] zylo has joined the channel [17:59] mape: kept getting a new cookie [17:59] tanepiper: when i got to the view, it only has lastAccess set [18:00] tanepiper: yup mape is right, it's setting a new connect.sid [18:02] ROBOTARMY has joined the channel [18:02] matbee has joined the channel [18:03] mscdex: mape: pong [18:04] mape: mscdex: Hey, I've been playing around with ncurses, and I can't for the life of me get .on('inputChar' to work [18:05] akahn has joined the channel [18:05] mape: I've set the listener to every single window I have and it still never frites [18:05] mape: *fires [18:05] mscdex: mape: are you using the version from npm or the latest from the repo? [18:06] djanowski has joined the channel [18:06] mape: mscdex: npm [18:06] q_no has joined the channel [18:07] sveimac has joined the channel [18:08] kixxauth has joined the channel [18:08] mscdex: hmm [18:08] omni5cience has left the channel [18:08] mape: mscdex: Works fine besides that (except it seems to render strangely every now and then) http://mape.me/ncurse-logalizer.png [18:09] mscdex: node version and platform/terminal? [18:09] mape: v0.3.5-pre, debian, OSX terminal [18:10] akahn has joined the channel [18:10] altamic has joined the channel [18:10] hornairs has joined the channel [18:11] dguttman has joined the channel [18:12] tjholowaychuk: mape / tanepiper: weird, i didnt change anything really and its working now [18:12] tjholowaychuk: haha [18:12] tjholowaychuk: .. [18:12] tjholowaychuk: wtf [18:12] liquidproof: tjholowaychuk: is it possible to have stylus middleware to watch files from multiple paths? [18:12] darklajid: Hmm.. Did anyone run into "TypeError: Object # has no method 'setSecure'" using node-mail? [18:12] tjholowaychuk: liquidproof: multiple middleware [18:12] herbySk: v8: Array(3) [18:12] v8bot: herbySk: [undefined, undefined, undefined] [18:12] liquidproof: aight, ha that's actually obvious [18:13] claudiu__ has joined the channel [18:13] aaronblohowiak has joined the channel [18:13] aaronblohowiak: GOOD MORNING [18:13] statim has joined the channel [18:13] lep_: depends, eh :> [18:14] dachary has joined the channel [18:14] langworthy has joined the channel [18:14] dachary: Hi, I try to npm install sqlite on nodejs-0.3.7 but get the following error http://pastebin.com/vqEFEsVB . Is it a known issue ? [18:15] fission6 has joined the channel [18:15] fission6: .join #python [18:15] mape: mscdex: https://gist.github.com/3dab5e60caecbf02b835 doesn't do anything [18:15] tanepiper: tjholowaychuk: did you update it? unless it's a 0.3.x problem (I assume your running 0.2?) cos everything else i'm running the latest version on 0.3 [18:15] tjholowaychuk: tanepiper:i was trying with 0.2.6 [18:16] tjholowaychuk: it was failing, i refactored a tinnnny bit [18:16] tjholowaychuk: and now it works [18:16] tjholowaychuk: but i literally changed no logic [18:16] tjholowaychuk: i'll release anyway [18:16] tjholowaychuk: haha [18:16] tanepiper: please :) i also assume if i install it via apt-get it'll run on the default redis port on localhost, so i don't have to change host/port options? [18:17] tjholowaychuk: yeah defaults should work [18:18] tjholowaychuk: tanepiper: released it, if it still breaks let me know [18:18] tjholowaychuk: im thinking its a connect issue [18:19] tanepiper: yea, just updated and ran, still creating a new session id every refresh [18:19] mape: mscdex: Also, I found some info on resizing in the docs, but is there an example on how to trigger reflow on terminal resize? [18:19] tjholowaychuk: fuck [18:19] mscdex: mape: i'm still working on that one. i had it implemented at one point over the holidays, but it wasn't working properly in all situations :\ [18:20] tjholowaychuk: 0.3.7 works for me as well [18:20] CIA-99: node: 03Ryan Dahl 07master * r45b30a8 10/ lib/tls.js : tls: superficial clean up - http://bit.ly/gQZA96 [18:20] CIA-99: node: 03Ryan Dahl 07master * r33e8e3d 10/ test/simple/test-tls-throttle.js : Add simpler failing tls throttle test - http://bit.ly/i47eZk [18:20] CIA-99: node: 03Ryan Dahl 07master * r3e5b568 10/ lib/tls.js : TLS: Add _pendingBytes() - http://bit.ly/gfWyPE [18:20] CIA-99: node: 03Joe Walnes 07master * rdf6e497 10/ (4 files in 4 dirs): (log message trimmed) [18:20] CIA-99: node: dgram: setMulticastTTL, setMulticastLoopback and addMembership. [18:20] CIA-99: node: These are options needed for real-world multicasting. [18:20] mape: mscdex: Hmm k, and this.. http://mape.me/ncurse-logalizer-strange.png any idea why that happens? If I do nc.redraw() it works again after a couple of tries [18:21] mscdex: whoa [18:21] mscdex: never seen that before [18:21] mscdex: when does that happen? [18:22] mape: Every now and then [18:22] dachary: what is "node-waf configure build" ? [18:22] mape: That function can run and doesn't do that, then after a while it starts messing up, then works fine again. [18:22] tjholowaychuk: tanepiper: not good that I cant reproduce this now haha [18:23] tjholowaychuk: tanepiper: connect 0.5.7? [18:24] tanepiper: tjholowaychuk: https://gist.github.com/0af2927222fa73132c41 [18:24] tanepiper: yes [18:24] CIA-99: node: 03Jorge Chamorro Bieling 07master * rff7fc09 10/ test/simple/test-next-tick-ordering.js : [18:24] CIA-99: node: Longer nexttick ordering test [18:24] CIA-99: node: Closes GH-604. - http://bit.ly/hBD4Y0 [18:24] tanepiper: that's my server config file [18:24] FIQ has joined the channel [18:24] mattly has joined the channel [18:24] tanepiper: i just did npm update so everything should be the latest [18:24] atmos has joined the channel [18:25] tjholowaychuk: k thanks, i will do similar [18:25] q_no has joined the channel [18:26] dgathright has joined the channel [18:26] mscdex: dachary: it configures and builds a binding [18:27] tilgovi has joined the channel [18:27] dachary: mscdex: thanks. I more or less figured that now. Where does it come from ? [18:27] mscdex: dachary: node-waf comes with node [18:27] tjholowaychuk: tanepiper: bah, it works for me lol [18:28] tjholowaychuk: this is messed [18:28] pr2012 has joined the channel [18:28] davglass has joined the channel [18:28] dachary: mscdex: I see. It's not installed by the debian package, hence my troubles ;-) [18:28] mscdex: ah [18:29] mscdex: i always build from source [18:29] stagas: tanepiper: did you try a different browser? [18:29] tanepiper: stagas: actually, no [18:29] dachary: since 0.2.6 is packaged I thought I could give it a shot. But it's in experimental and such lossage is to be expected. Thanks for your help mscdex [18:30] mscdex: not sure why someone would've removed it in the debian package [18:30] tanepiper: oh wow stagas ! [18:30] tanepiper: oh wait, nope [18:30] tanepiper: hang on [18:30] tjholowaychuk: haha [18:30] tjholowaychuk: fuck [18:30] tjholowaychuk: im using chrome btw [18:30] tjholowaychuk: ill try more as well [18:30] tanepiper: nope, happens in both FF and chrome [18:31] tjholowaychuk: works for me in safari/FF/chrome [18:31] tanepiper: i though it worked in FF, but i had forgot to rebuild :) [18:31] blueadept has joined the channel [18:31] tjholowaychuk: "Redis server version 2.1.10 (4b2499cf:0)" [18:31] altamic has joined the channel [18:31] altamic has joined the channel [18:31] tanepiper: how do i get my local version? [18:31] tanepiper: redis-cli -v ? [18:32] tjholowaychuk: redis-server --version [18:32] tanepiper: ohfuck [18:32] tanepiper: 01 Feb 10:32:09 * Fatal error, can't open config file [18:32] tilgovi_ has joined the channel [18:32] tanepiper: hmm, but it is running in htop [18:32] dachary: when I try to npm install sqlite on 0.3.7 I get usr/local/lib/node/.npm/sqlite/1.0.0/package/deps/mpool-2.1.0/libmpool.a: could not read symbols: Archive has no index; run ranlib to add one [18:32] dachary: is it a known issue ? [18:33] tanepiper: lemme restart this vm [18:33] dachary: the same with 0.2.6 [18:33] dachary: [6/6] cc_link: build/default/deps/sqlite/sqlite3_1.o -> build/default/deps/sqlite/libsqlite3.so.so [18:33] dachary: /usr/local/lib/node/.npm/sqlite/1.0.0/package/deps/mpool-2.1.0/libmpool.a: could not read symbols: Archive has no index; run ranlib to add one [18:34] alek_br has joined the channel [18:36] tanepiper: tjholowaychuk: this is weird - redis is running, as a redis user on this machien and i can see it in top [18:36] tanepiper: but when i try to redis-server --version i get this fatal error message [18:36] tjholowaychuk: tanepiper: do $ redis-cli info [18:37] warz has joined the channel [18:37] tilgovi has joined the channel [18:37] tokumine has joined the channel [18:37] tanepiper: redis_version:1.2.0 [18:37] tanepiper: gahh, ubuntu is so GHEY [18:37] tanepiper: why are they still on 1.x ? [18:37] Poetro1 has joined the channel [18:38] sveimac has joined the channel [18:38] tjholowaychuk: tanepiper: setex should be there though [18:38] tjholowaychuk: i think [18:38] mscdex: mape: well, i installed the master branch just now on osx and used the latest node-ncurses from the repo and the inputChar event fires as expected [18:38] mape: mscdex: Mind testing my code in a sec? [18:39] mscdex: mscdex: ok [18:39] kjeldahl has joined the channel [18:39] mscdex: mape: ok [18:39] mape: hehe [18:39] mscdex: hah tab fail [18:39] markwubben has joined the channel [18:39] ryanfitz has joined the channel [18:39] tanepiper: tjholowaychuk: going to download stable from the site and try again [18:40] tjholowaychuk: tanepiper: aight [18:40] tjholowaychuk: AH [18:40] tjholowaychuk: it says available since 1.3.10 [18:40] tjholowaychuk: for SETEX [18:40] tjholowaychuk: that explains it [18:40] tjholowaychuk: mape ^^ [18:40] tjholowaychuk: not sure if that is your issue as well [18:40] tanepiper: tjholowaychuk: yes it was, works fine now :( [18:40] tanepiper: :) [18:40] mape: hmm [18:40] tanepiper: GAHH! Ubuntu, you suck [18:40] tjholowaychuk: I should add that to the docs [18:41] bartmax has joined the channel [18:41] curtischambers has joined the channel [18:41] Rixius has joined the channel [18:41] Rixius: is there an npm nodule for managing saved preferences? [18:42] tilgovi_ has joined the channel [18:42] Rixius: something like prefs.store('key','value') [18:42] softdrink: hah.. i love github's 404 [18:42] Rixius: maybe a managed JSON store? [18:42] tjholowaychuk: Rixius: redis? [18:42] Rixius: Maybe, i'll give it a looksie [18:43] Rixius: is redis cloud-store only? [18:43] tjholowaychuk: cloud-store? [18:43] tanepiper: oh damn! I've been using memory for sessions and was storing functions in my session, breaks in redis! [18:44] tanepiper: dammit [18:44] Rixius: network, over the internet [18:44] tjholowaychuk: tanepiper: baha [18:44] tjholowaychuk: why are you storing functions lol [18:44] Rixius: or is redis stored on the local machine? [18:44] SubStack: that sounds like something I would do! [18:44] abraham has joined the channel [18:44] tanepiper: tjholowaychuk: because the way cradle works, you have to set up auth with a plain text password [18:44] Rixius: I need to store a secure token [18:44] stride: Rixius: if you run redis on your machine, it's on your machine [18:45] tanepiper: so for users, i would need to store their plain text password in the session somewhere, which i don't want [18:45] Rixius: I'm working on an open source Battle.net Blizzard Authenticator in Node.js [18:45] tjholowaychuk: tanepiper: ah [18:45] tanepiper: so on login, i was creating their database session. May have to consider dropping cradle and using request lib, as i can at least base64 encode the auth string and pass that around with a salt [18:46] tanepiper: unless i can somehow do cookie based auth with couchdb and store the cookie in the session [18:46] sprout has joined the channel [18:46] mikeal has joined the channel [18:47] darklajid: Hmm.. I see that 0.3.x contained quite some tls related fixes/changes. Maybe that's breaking node-mail then.. [18:47] tanepiper: glad i'm catching crap like this now though :D [18:48] bronson has joined the channel [18:49] hornairs has joined the channel [18:49] mape: mscdex: https://gist.github.com/7140800ee1d6d17d1695 [18:49] mape: mscdex: at the bottom you see how to get it running [18:50] softdrink: tjholowaychuk: vim syntax for stylus. GO GO GO [18:50] softdrink: ¬¬ [18:50] tjholowaychuk: :D [18:50] tjholowaychuk: I gotta get a pygments one going too [18:50] mape: and TM syntax plz [18:50] tjholowaychuk: for github [18:50] tjholowaychuk: mape: there is one :p [18:50] tjholowaychuk: thats all the TM bundle is [18:50] mape: Bah, then I can't ask you for something [18:50] softdrink: dang. guess i'll have to write one [18:50] softdrink: or bribe tpope [18:51] altamic has joined the channel [18:51] benburkert has joined the channel [18:51] aurynn has joined the channel [18:52] mape: mscdex: Btw the code probly is horrendus in the use of ncurses but feel free to point in the correct direction :) Ended up using an entire separate window just to get the frame, since the frame scrolled along otherview [18:52] jakehow has joined the channel [18:52] Rixius: is there a safe place to put a SQLite DB that would be safe while using node.js? and preferably still be available after updating? [18:52] cronopio has joined the channel [18:53] Rixius: I mean while using NPM [18:53] jamescarr has joined the channel [18:53] springmeyer_ has joined the channel [18:54] mscdex: mape: ok, looking into it [18:55] Country has joined the channel [18:56] Qbix1 has joined the channel [19:00] drudge: tjholowaychuk: the mongoose site has <dev@learnboost.com> [19:00] tjholowaychuk: doh [19:00] cronopio has joined the channel [19:01] drudge: really glad this hit 1.0 [19:01] drudge: congrats :) [19:01] altamic has joined the channel [19:01] altamic has joined the channel [19:01] mape: tjholowaychuk: btw, image-size, how perf heavy is it? [19:01] tjholowaychuk: mape: probably not brutal, it only reads the first 10ish bytes [19:02] tjholowaychuk: but nothing is cached (yet) [19:02] mape: k [19:02] tjholowaychuk: jpeg is the only loser that you need to read way more data in to grab the dimensions [19:02] tjholowaychuk: rawr [19:02] mape: throw new Error('image-size() jpeg support not yet implemented'); :/ [19:02] tjholowaychuk: hehe [19:03] mape: sad pandas all around [19:03] tjholowaychuk: :) [19:03] tjholowaychuk: it will get in there, no worries [19:03] russell_h: do the timeout options on child_process.exec() work for anyone else? [19:04] mape: mscdex: seems I don't get the wonky character issues if I'm only outputting numbers, think it has to do with some strange chars that come from Faker.js [19:05] p4p4p4 has joined the channel [19:06] jesusabdullah: tjholowaychuk: Stylus is kinda like jade for css? [19:06] tjholowaychuk: jesusabdullah: kinda yeah [19:06] tjholowaychuk: much more powerful than jade though [19:06] tjholowaychuk: jade is tiny in comparison [19:06] broofa_ has joined the channel [19:06] maushu has joined the channel [19:06] jesusabdullah: Hmm! [19:06] jesusabdullah: Why's jade so small? [19:06] tjholowaychuk: just does a lot less [19:06] mape: It looks really nice, all I need to add to it is the base64 injected images and I'll be set [19:06] atmos has joined the channel [19:06] tjholowaychuk: mape: I have that [19:07] ezmobius has joined the channel [19:07] tjholowaychuk: .define('url', stylus.url({ options })) [19:07] tjholowaychuk: its an optional function that replaces url() in the stylesheets [19:07] tjholowaychuk: mape: http://learnboost.github.com/stylus/docs/functions.url.html [19:07] Twelve-60 has joined the channel [19:07] tjholowaychuk: baha.. that page looks realy bad [19:07] ryan[WIN] has joined the channel [19:08] tjholowaychuk: actually that paths option could concat with the regular paths [19:08] tjholowaychuk: i should change that [19:08] sveimac has joined the channel [19:08] mape: tjholowaychuk: Ah nice, does stylus have any conditionals like serving non base64 images to shitty browsers? [19:08] mape: Or should that be handled outside [19:09] tjholowaychuk: mape: just a limit right now [19:09] tjholowaychuk: open to suggestions [19:09] tjholowaychuk: because IE fails on certain bytesizes [19:09] tjholowaychuk: i forget what the # is [19:09] mape: 32KB I think [19:09] drudge: tjholowaychuk: why do you hate semicolons and colons so much? [19:09] tjholowaychuk: drudge: why wouldnt i? :p [19:09] drudge: they are cute :P [19:09] hellp has joined the channel [19:10] tjholowaychuk: i dont want to type them lol [19:10] drudge: where would smileys be without them [19:10] mape: drudge: Not everyone can afford them [19:10] Rixius: looking for a permanent way to store a json list across npm updates [19:10] tjholowaychuk: drudge: the colons are optional though [19:10] mape: drudge: That is why a lot of startups stopped using them [19:10] montylounge has joined the channel [19:10] drudge: tjholowaychuk: yeah i know, i just like them and feel odd using them with stylus [19:10] drudge: mape: ah, now i understand [19:10] Rixius: or maybe a "update script" for npm to run that will handle transferring the data from the old version to the new version? [19:10] tjholowaychuk: haha [19:10] wink_: mape: what was your graphing demo (the system monitoring thing) url? [19:11] mape: wink_: hmm, not sure [19:11] wink_: did you forget? :p [19:11] drudge: tjholowaychuk: same thing with curly braces. where would the mustache be without them! [19:11] mape: wink_: think I threw it away [19:11] tjholowaychuk: :p [19:11] wink_: noooooo [19:12] tjholowaychuk: im not a huge fan of mustache [19:12] tjholowaychuk: i dont hate it [19:12] tjholowaychuk: but its meh [19:12] mape: wink_: It wasen't working anyway [19:12] wink_: i know, but it was pretty [19:12] drudge: :-{) <( bonjour! ) [19:12] wink_: and i wanted to steal some of it :< [19:12] tjholowaychuk: hahhaha [19:12] drudge: all french people have mustaches, it's a fact [19:13] mape: wink_: source or just look? [19:13] wink_: look [19:13] wink_: <3 [19:14] mape: wink_: http://mape.me/node-monitoring-ipad.jpg [19:15] mape: http://mape.me/node-profiler-monitor-ipad.png [19:15] Gruni has joined the channel [19:15] wink_: aha! [19:15] mape: Think that is all I have left [19:15] tjholowaychuk: mape: badass! [19:15] wink_: and he threw it away! [19:15] altamic has joined the channel [19:15] mape: tjholowaychuk: Would have been more bad ass with some dtrace hooked up :P [19:16] wink_: mape: thanks [19:16] tjholowaychuk: :) [19:16] wink_: <3 [19:16] mape: wink_: np [19:17] softdrink: mape: awestacular. [19:17] softdrink: is that protoviz? [19:17] mape: yup [19:17] softdrink: good stuff [19:18] wkmanire has joined the channel [19:19] tlrobinson has joined the channel [19:20] mape: wink_: http://smoothiecharts.org/ for the charts, I had a more optimized version that worked for the iPad but guess that is gone as well [19:20] mape: The iPad was slow as dirt :/ [19:21] drudge: if by slow you mean awesome [19:21] aklt has joined the channel [19:21] mape: drudge: Nope, just slow as hell [19:21] drudge: but.. [19:21] mape: still slow [19:21] drudge: apple said it was revolutionary with the A4 chip [19:22] mape: I said it was slow :/ [19:22] Rixius: When writing a module for npm, is there folder I can target to store a .json file for safe keeping that can be accessed across versions? [19:22] mape: mscdex: Find anything magic? [19:22] Twelve-60 has joined the channel [19:22] mscdex: mape: still working on it :-) [19:23] mape: mscdex: Mess getting my code to work or found issue? [19:23] c4milo: hey guys, I wonder how are you doing async test on the browser [19:23] zach has joined the channel [19:23] c4milo: I have try with jasmine, jspec and no love [19:24] dachary: hi, I get a weird error message with nodejs 0.2.6 trying to npm install sqlite [19:24] dachary: npm info sqlite@0.0.6 Failed to exec preinstall script [19:24] dachary: npm ERR! install failed Error: sqlite@0.0.6 preinstall: `node-waf clean configure build` [19:24] dachary: npm ERR! install failed `sh` failed with 1 [19:25] matt_c has left the channel [19:25] dachary: and then a traceback but no other error message [19:25] zach: anyone have any experience with crypto.createCredentials() ? [19:26] admc has joined the channel [19:26] dachary: http://stackoverflow.com/questions/4407531/twitter-node-failing-to-build-node-js-npm-install-twitter-node suggests it's npm related [19:28] zach has left the channel [19:28] zdzolton has joined the channel [19:31] jetienne: twitternode is able to handle oauth now ? [19:31] mape: mscdex: Are there any issues with ncurse api being sync but it messes up if you "queue" a ton of actions? [19:32] zdzolton: hello, can you see this? [19:32] dmcquay2 has joined the channel [19:33] mape: yup [19:33] sechrist has joined the channel [19:33] zdzolton: thanks! [19:33] tilgovi has joined the channel [19:34] mrkurt: gah [19:34] mscdex: mape: shouldn't be [19:34] mrkurt: what could be causing require('nodeunit') to blow up after I installed it with npm? [19:34] dachary: I found traces of the same problem at http://pastebin.com/F7Agrkek [19:34] dachary: I sense it's a FAQ but the answer to it is not obvious to m [19:34] sechrist: I don't really get the allure of waf [19:35] zdzolton: has anyone every tried to use crypto.createCredentials() with a private that has a pass phrase? can't figure out how to provide it without manual intervention... [19:37] tanepiper: mikeal: ping [19:37] mikeal: pong [19:38] tanepiper: is request completly broken in 0.3.7 ? [19:38] sveimac has joined the channel [19:39] altamic has joined the channel [19:40] mikeal: yes [19:40] mikeal: i'm fixing this week [19:40] mikeal: also adding a new api [19:41] bronson has joined the channel [19:41] tanepiper: damn :( can't work with cradle because it would need me to store the users couchdb password in plain text for auth, can't use request cos it's broken [19:41] dachary: how can I remove the "colors" from npm output ? [19:42] tanepiper: makes me feel like this: http://2.bp.blogspot.com/_3NrzKklYDVU/TAL91swj3UI/AAAAAAAAAYg/_-NYmNcnQm8/s1600/khaaaaaan.jpg [19:44] isaacs has joined the channel [19:44] darklajid: Trying to understand the tls changes: It seems the old application supported the starttls upgrade with setSecure() (I'm new. Is that wrong?) while the new architecture seems to offer nothing but tls.connect. What's the right way to migrate? [19:44] davglass_ has joined the channel [19:45] jesusabdullah: dachary: How come? I don't have an answer for you---I'm just curious. [19:45] jesusabdullah: ACTION likes colors! [19:45] dachary: because http://pastebin.com/vqEFEsVB does not look too good in addition to not being readable [19:45] dachary: i also like colors [19:45] jesusabdullah: What the Hell..? [19:45] jesusabdullah: I haven't had that issue copy-pasting D: [19:46] jesusabdullah: isaacs: Check out that pastie. Wth? [19:46] ryanfitz has joined the channel [19:46] jesusabdullah: dachary: For me, when I copy-paste, the color codes just go away :S [19:46] rjrodger_ has joined the channel [19:46] dachary: :-) [19:46] isaacs: dachary: can you paste that output with `--color false` added to the command line? [19:47] isaacs: ie, run it again, and then paste without the colors. [19:47] softdrink: speaker-phones should be outlawed in cube environments [19:47] softdrink: ACTION shakes his fist [19:47] mape: mscdex: Updated to v0.3.8-pre and now I'm getting segmentation fault. [19:48] wkmanire: softdrink: lol [19:48] wkmanire: softdrink: The entire customer service and sales department cube farm is directly behind the developer cubes here. [19:48] dachary: isaacs: there are less colors indeed, thanks. Still some though, go figure. [19:49] wkmanire: softdrink: I need some noise cancelling headphones. [19:49] isaacs: yeah, some of them are from node-waf, i don't control that [19:50] dachary: isaacs: is there a way to redirect the output ? > foo 2>&1 does not seem to work the way they are used to [19:50] dachary: npm --color false install sqlite@0.0.6 | pastebinit [19:50] dachary: that's what I'm after [19:50] isaacs: npm --no-color install sqlite@0.0.6 2>&1 | pastebinit [19:51] isaacs: ah, it looks like the addition of "clean" to the default node-waf install script is causing issues. [19:52] dachary: http://pastebin.com/12QKmLCw [19:52] isaacs: that sucks. [19:52] isaacs: yeah Nothing to clean (project not configured) [19:52] isaacs: that is a bug, i think [19:53] dachary: I'm confused : sqlite@0.0.6 would be bugous ? [19:53] isaacs: and, actually, the reason for it being there isn't even really fixed by it being there, so i'm gonna rip that out. [19:53] isaacs: it's an npm issue. [19:53] isaacs: thanks for finding it [19:53] dachary: oh [19:53] dachary: :-D [19:53] dachary: I'm glad it's not just me [19:53] dachary: ACTION hugs isaacs [19:54] mape: mscdex: seems var window = new nc.Window(1,1); window.scrollok(true); causes the error, https://gist.github.com/3614963dd0e42ccd7f96 [19:54] isaacs: i tried to solve an issue with a 6-char patch, but it turns out that it's not so simple. [19:55] maushu: isaacs, recomended db to use with node.js? [19:55] softdrink: wkmanire: that's freaking torture [19:56] softdrink: i have noise-isolating earbuds but they only do so much [19:56] softdrink: and i find music distracting sometimes anyway [19:56] aurynn has joined the channel [19:56] isaacs: maushu: depends on what you'er using it for. couchdb is great for document-based stuff where you need lots of persistence. redis is a nice distributed global space that's very high performance. and postgresql is one of the best relational databases, and has some pretty good bindings. [19:56] mrkurt: I hate asking questions multiple times, but can someone help me troubleshoot require failures after installing nodeunit with npm? [19:56] mjr_: maushu: I recommend CouchDB for data you don't want to lose, or Redis for data you would mind losing a little bit of. [19:57] FireFly: Hmm [19:57] maushu: Why couchdb and not mongodb? [19:57] dmcquay2 has joined the channel [19:57] prettyrobots has joined the channel [19:57] mjr_: maushu: until very recently, mongodb didn't try very hard to not lose your data [19:57] isaacs: maushu: because i trust couchdb more. [19:58] mjr_: CouchDB has always tried very hard not to lose your data, which is why its so slow. [19:58] mjr_: And CouchDB's HTTP interface works really well with node. [19:58] mjr_: A speed demon, it is not. [19:58] skohorn has joined the channel [19:58] mjr_: speed daemon? [19:59] maushu: I see what you did there. [19:59] isaacs: CouchDB is very fast in many situations. [19:59] codetonowhere1 has joined the channel [19:59] mjr_: Yeah, it is plenty fast for a vast number of problems. [19:59] isaacs: if you have a very read-heavy app, and you'er doing ETag caching, it's pretty ok [20:00] isaacs: note that `npm ls` is really slow the first time, but then it's crazy fast afterwards. [20:00] chapel: :) [20:00] chapel: couchdb is great for data aggregation [20:00] chapel: mapreduce [20:00] isaacs: chapel: especially if you hit the same view repeatedly [20:00] maushu: Hmm. [20:00] chapel: because the mapreduce is stored and incrementally updated [20:01] bartt has joined the channel [20:01] chapel: where as mongo, it has to be calculated every time you view it [20:01] chapel: yeah isaacs [20:01] joelklabo has joined the channel [20:01] daniellindsley has joined the channel [20:01] FireFly: Hrm.. any tips on how to best express some kind of "EventEmitter factory" (with specific subtypes to EventEmitters, not just generic EventEmitters)? I'm not sure if I should simply specify the factory object to be an object with a 'create' method, or if I should design it as an EventEmitter itself. [20:03] w3dot0 has joined the channel [20:04] isaacs: Picking a database is like picking a wife. You don't have time to really try them all, and by the time you figure out what's wrong with it, it's probably too expensive to switch. [20:04] maushu: isaacs, exactly. [20:04] maushu: That is why Im asking. [20:04] isaacs: :D [20:04] w3dot0: we just switched from Mongo to Couch - the divorce is ugly but the new wife looks much prettier.... [20:05] dachary: isaacs: would I be better off trying a "stable" version of npm ? [20:05] maushu: w3dot0, why? [20:06] w3dot0: why prettier? [20:06] w3dot0: or why ugly? [20:06] isaacs: dachary: there's a "stable" version...? [20:06] isaacs: ;) [20:06] dachary: ahahah [20:06] admc has joined the channel [20:06] dachary: isaacs: do I have a way out ? I'm new to node.js and npm and I'm not sure how to fallback [20:06] isaacs: i'll have a 0.2.17 with this fix within the hour. [20:07] maushu: w3dot0, why the divorce? [20:08] philipharrison has joined the channel [20:08] w3dot0: Mongo initially supported map/reduce the way we liked and the newer versions deprecated that functionality [20:09] sveimac has joined the channel [20:09] clarkfischer has joined the channel [20:09] w3dot0: a few other things added up: stability issue, yet another query language to learn, map/reduce looks like an afterthought and litters temp views all over the place [20:09] w3dot0: anyway - for us Couch seems to fit the bill better [20:10] dachary: isaacs: Oo that's great, I'll be patient then :-D [20:10] chapel: also, couch can be fast, just for different reasons [20:10] maushu: I've decided! [20:10] maushu: I will use flat files. [20:10] chapel: haha [20:10] mjr_: nice [20:10] chapel: might as well use couch :P [20:10] isaacs: maushu: now THAT is a well-understood hell! [20:10] chapel: or maushu check out node-chaos [20:10] maushu: Guys, guys, just kidding. [20:11] mjr_: I'm using a combination of CouchDB and Redis, each for what it is good at. It is working out well. [20:11] maushu: I think I will use mongodb, seems to fit the bill better. (And redis for non-important data.) [20:11] w3dot0: in-memory clone of couchdb in node.js (API compatible) - check it out: https://github.com/pcapr/memcouchd [20:11] mjr_: At first I tried to put everything in couch, and for data that changes quickly, couch runs out of room. [20:12] Rixius has joined the channel [20:12] maushu: The reason I want to use mongodb instead of couchdb its because I don't need good mapreduce and having the db handle small files would be great. [20:12] w3dot0: exactly our experience - the deleted records are retained even after compaction [20:13] chapel: they shouldn't be [20:13] maushu: Why not? [20:13] maushu: Performance! \o/ [20:13] mjr_: w3dot0: our first design was changing docs a lot, and I hadn't quite understood the impact of keeping those old versions around. Sure, you can compact, but it is an expensive process. [20:14] mjr_: Anyway, talking to your DB with HTTP and JSON is fantastic. [20:14] pifantastic_ has joined the channel [20:15] maushu: Now if mongo had master-master replication... [20:15] maushu: mjr_, depends on the data. [20:15] chapel: well choosing a db is more than just slapping the data in and going with it [20:16] chapel: playing to the strengths and weaknesses is important [20:16] maushu: Yeah, its slapping the data in and slapping the db just to make sure it keeps the data. [20:16] mjr_: Using Slap over IP [20:16] chapel: heh [20:16] mjr_: For distributed multicast slaps. [20:17] maushu: DDoS [20:17] maushu: Distributed Denial os Slaps. [20:17] maushu: *of [20:17] dmcquay2 has joined the channel [20:19] cloudhead has joined the channel [20:19] liar has joined the channel [20:22] pjackson has joined the channel [20:23] Insanity5902 has joined the channel [20:24] rburhum has joined the channel [20:25] jetienne: ok any country with .js as tld ? /) [20:28] Evet: jetienne: no. and wont be one [20:29] stepheneb has joined the channel [20:30] getify has joined the channel [20:31] jetienne: Evet: ah ? why that [20:31] jimt has joined the channel [20:32] jchris has joined the channel [20:32] maushu: If you want .js for javascript projects (as if anyone hadn't that idea before) you could probably ask an alternative dns root, like opennic. [20:33] Evet: or, use .asia [20:33] jetienne: thinking about it io could do [20:33] Evet: its $99 [20:34] maushu: And it takes months. [20:34] maushu: I think. [20:34] maushu: Unless I'm thinking of other tld. [20:34] Evet: nope, they create instantly [20:34] aphelion has joined the channel [20:34] Evet: you can buy directly from nic.io, i think [20:35] Evet: jetienne: buy js. [20:35] matbee has joined the channel [20:35] Evet: and use subdomains [20:35] jetienne: yep my usual dns guy is not selling it [20:36] jetienne: nah if i do, i will go for .org [20:36] svenlito has joined the channel [20:36] Evet: myjavascriptapplivation.org? [20:36] Evet: *c [20:36] jetienne: or just derive from jetienne.com... which maybe ok as it is mostly toys [20:36] jetienne: Evet: yep [20:36] jetienne: myjsapp.jetienne.com like stagas.com [20:37] Evet: is it for chrome web store? [20:37] jetienne: Evet: nope, why do you ask [20:37] Evet: just curious. i was looking for a domain for my js apps too [20:38] jetienne: mine is more blog posts kindof [20:38] codeed has joined the channel [20:38] jetienne: aka simple toys coded in a few days [20:38] liquidproof: 22:25 < jetienne> ok any country with .js as tld ? /) [20:38] liquidproof: js.gs? [20:38] Evet: yes, thats what i was talking about [20:39] getify has left the channel [20:39] wkmanire: playwith.it [20:39] wkmanire: :D [20:39] liquidproof: Evet: you did? [20:39] ryah: mraleph: are you going to land that BitCast patch? [20:39] sveimac has joined the channel [20:39] Evet: liquidproof: yup. but not js.bla [20:40] curtischambers has joined the channel [20:42] philipha1rison has joined the channel [20:43] ryah: mraleph: also - gdbjit for arm, sweet [20:43] mraleph1: ryah: will land it right now. thanks for reminding. [20:44] ryah: gdbjit = amazingly useful [20:44] mraleph1: glad to hear [20:45] joao has joined the channel [20:45] joao: hi [20:46] joao has left the channel [20:46] dahankzter has joined the channel [20:46] philipharrison has joined the channel [20:47] dachary: I'm would like to store on disk a fairly small amount of information (megabytes) so that it can be loaded when the node.js server starts and it restarts where it left off. What storage would you advise ? JSON.stringify() + write in file ? Something more sophisticated and yet simpler than sqlite ? [20:48] nook has joined the channel [20:48] mscdex: mape: update: the reason the inputChar doesn't fire on keyboard presses is because of the piping [20:48] mraleph1: ryah: commited. I will watch V8 bots now. if something goes red I will revert :-) [20:48] mape: mscdex: oh k [20:49] mscdex: mape: i got everything else seemingly working, minus some odd screen artifacts [20:49] mape: mscdex: what version of node are you on? [20:50] mscdex: mape: this is with a copy of the latest node master [20:50] dtrasbo has joined the channel [20:50] mape: Guess the ncurses on npm is borked then? [20:51] piscisaureus has joined the channel [20:51] piscisaureus: ACTION howdie folks [20:52] Rixius: is there a better http.client abstraction? [20:53] philipharrison has joined the channel [20:53] mscdex: mape: i dunno, i wouldn't think so.. there's only been a couple upstream ncurses updates since the latest version on npm -- and they don't fix any bugs related to what you're experiencing [20:53] mape: ok [20:54] ryah: mraleph1: thanks [20:55] mscdex: is there some way to find out the uploaded date for a npm package? [20:55] Ond has joined the channel [20:55] jashkenas_work has joined the channel [20:55] isaacs: mscdex: there's a "time" field or somethingorothers [20:56] isaacs: mscdex: npm view mongoose time [20:56] MatthewMueller has joined the channel [20:57] wkmanire: What are folks using ncurses with nodejs for? [20:57] mscdex: isaacs: i did that, but it shows the same time for all 3 versions of ncurses [20:58] mscdex: but even so, that date is right [20:58] mscdex: for the latest [20:58] nonnikcam has joined the channel [20:59] losing has joined the channel [21:01] mape: wkmanire: http://mape.me/ncurse-logalizer.png I'm trying to create an interface for debug log filtering, allowing you to filter streams of output in real time [21:01] Vertice has joined the channel [21:02] wkmanire: mape: looks neat [21:03] davidascher has joined the channel [21:03] yhahn has joined the channel [21:03] yhahn has left the channel [21:03] juan77 has joined the channel [21:03] mape: yeah I think it could be useful, and if anything fun to play around with ncurses [21:05] wkmanire: mape: Have you messed with seed at all? [21:06] isaacs: mscdex: that's probably because the "time" feature was added somewhat recently [21:06] mape: wkmanire: seed? [21:06] mscdex: :S [21:06] isaacs: mscdex: the logic now will set the current date for any date-less versions. [21:06] isaacs: mscdex: so there's a bit of history mangling, but it's generally for the good [21:06] isaacs: and eventually, packages published in 2011 will just part of the Before Time, the Long Long Ago [21:07] wkmanire: mape: gtk+ applications written using javascript. [21:07] sveisvei has joined the channel [21:07] mape: wkmanire: oh, nope, no use for gtk personally [21:07] ncb000gt has joined the channel [21:07] drudge: ew gtk [21:07] wkmanire: mape: http://live.gnome.org/Seed [21:07] k04n has joined the channel [21:08] drudge: JSCocoa! [21:08] wkmanire: mape: Javascript is taking over :) [21:08] juan77: Hi, I'm not sure if I can post something like this, my apologize if not... [21:09] juan77: hi, I know that I have a global named __filename for retrieve the path of the current object, but how I can retrieve the path of a Class instead of an object, I have created class BC.User that extends class BM.Model, and I have made a method in model named myFileName, and when I call BC.User.myFileName returns me the path of BM.Model instead, what I'm missing? [21:09] pomodoro has joined the channel [21:09] mnot has joined the channel [21:10] sveimac has joined the channel [21:10] philipharrison has joined the channel [21:12] juan77: What i'm doing is that BM.Model.myFileName = function() { return __filename; } and BC.User = BM.Model.extend({}); [21:13] juan77: But when calling BC.User.myFileName returns me tne filename of BM.Model instead of BC.User's filename... :S [21:13] juan77: ani idea?? [21:13] juan77: any idea [21:13] ncb000gt: juan77: are they in two sep files? [21:14] wkmanire: juan77: patience :P [21:14] ncb000gt: BM.Model and BC.User that is [21:14] juan77: yes, they are in two separate files :P [21:14] ncb000gt: i assumed, just wanted to make sure [21:14] ryah: ACTION shakes his fist at OpenSSL [21:14] juan77: wkmanire I'm a bit anxious, sorry for that... [21:14] ncb000gt: ryah: love the openssl [21:14] dmcquay2 has joined the channel [21:15] wkmanire: juan77: no need to apologize. Just need to realize that most of us are also working right now. :) [21:15] dachary: Hi, I'm running nodejs 0.3.7 + npm 0.2.11 + express 1.0.3 and when I run a script containing just require('express') it shows Error: Cannot find module 'express' (as in the full log with strace http://pastebin.com/J2JBarJy ). Another module (log) that was installed using the same method as express (npm install) loads without a glitch. [21:15] juan77: wkmanire: :D [21:15] isaacs: dachary: try updating npm [21:15] isaacs: and then npm install express [21:16] juan77: ncb000gt: yes, they are two separate files... [21:16] dachary: isaacs: ok [21:16] ncb000gt: juan77: ok, and if you overwrite the method on bc.user you get the path you're looking for right? i suspect that you're running into an issue of scope. the scope of the function/path you're looking for is relative to where it's being called [21:16] isaacs: dachary: oh, also, with that sqlite thing... i'm out of time, sorry. [21:16] isaacs: dachary: it's coming. just a few more minutes. got distracted by a burrito [21:16] dachary: I will manage with 0.2.11 in the meantime ;-) [21:16] m0rganic has joined the channel [21:17] dachary: trying with 0.2.16 for express [21:17] ncb000gt: juan77: so i don't think what you're attempting to do will work, since __filename is based on the module within which it's called the inheritance wouldn't work the way you think (i could be wrong, but this is my suspicion). [21:17] juan77: ncb000gt: Yes, exactly. When I override I get the path I want! but I don't want to override of course.... [21:18] ncb000gt: juan77: copy & paste...it's what all the cool kids are doing... [21:18] dachary: isaacs: express works better with npm 0.2.16 indeed, thanks for the hint. It looks like I'll have to chos between sqlite and express for the time being ;-) [21:18] brianm has joined the channel [21:19] juan77: ncb000gt: nahhh, you mean that I need to override each file that I extend with BM.Model? Isn't there any other solution? [21:20] unomi has joined the channel [21:21] ncb000gt: juan77: i haven't attempted what you are so i can't say one way or the other. [21:21] isaacs: dachary: pushed. `npm i npm` to get the latest. [21:21] isaacs: dachary: installs sqlite properly [21:22] lightharut has joined the channel [21:22] tmcw has joined the channel [21:22] lightharut: How to use findAndModify function from mongodb-native-driver in node? [21:22] MikhX has joined the channel [21:23] dachary: isaacs: <3 [21:23] juan77: ok, no problem ncb000gt, thx you. I you have any other clue of how should retrieve the filename I would appreciate a lot :D [21:24] dachary: isaacs: I confirm that it does, thanks. [21:24] ryah: programming stuff client-side is such a joy [21:24] isaacs: sweet :) [21:24] isaacs: ryah: https://github.com/isaacs/ryp [21:24] ryah: it's amazing how /right/ they got everything [21:24] isaacs: ryah: happy birthday [21:24] ncb000gt: juan77: is there a specific reason you need to know the filename? [21:24] isaacs: ryah: also, shut your lying face. [21:24] isaacs: ryah: client-side programming is a huge pita [21:25] creationix has joined the channel [21:25] isaacs: ryah: $ ryp install connect <-- BAM! latest connect installed to ./node_modules/ [21:25] zzak: ryah++ [21:25] v8bot: zzak has given a beer to ryah. ryah now has 1 beers. [21:25] juan77: ncb000gt: yes, because I want to build using the filename and the directory containing in the name of the table, for example I havea folder system which contain user.js (BC.User) and from that I build t_sys_users; [21:26] isaacs: ryp install express <-- creates ./node_modules/express/node_modules/connect [21:26] ryah: isaacs: ! [21:26] ryah: hey that's pretty good [21:26] creationix: isaacs: s/connect/stack/ ;) [21:26] isaacs: ryah: none of this "versions" crap. you get the latest. if it's not working, complain to the author [21:26] creationix: isaacs: what is ryp? [21:27] isaacs: ryah: also, cyclical deps? you'd better have a big hard drive. [21:27] ryah: heh [21:27] creationix: hard-links! [21:27] isaacs: it'd be nice to maybe have it detect that. [21:27] isaacs: also, a .bat version for windows. [21:27] eddanger has joined the channel [21:27] juan77: ncb000gt: I know that is there another way to do, like just mapping in a file.property 'BC.User' with table 't_sys_users'... [21:27] isaacs: that'd be good [21:27] bronson has joined the channel [21:27] piscisaureus: maybe a node version for windows :-) [21:27] ryah: isaacs: this is great [21:28] ryah: isaacs: i think we should package it with node [21:28] isaacs: ryah: yeah, sure. [21:28] isaacs: ryah: then npm could still be the "fancy" packager. [21:28] isaacs: ryah: and a way to publish, search, etc. [21:28] isaacs: i'm gonna make it handle cycles smartly. [21:28] creationix: ahh, so it's a minimalist npm client [21:28] creationix: sounds cool [21:28] ryah: should probably write it in node [21:28] ncb000gt: juan77: gotcha. [21:28] isaacs: creationix: yeah, just an installer. [21:29] ryah: so as not to have the external dep on curl [21:29] isaacs: ryah: yeah, i'd not want to make this work on Solaris, and windows is probably impossible. [21:29] isaacs: egrep -o [21:29] isaacs: like, a lot [21:29] isaacs: and perl [21:29] MatthewMueller has joined the channel [21:29] jetienne: nice [21:30] piscisaureus: isaacs: ryp is such an ugly name [21:30] piscisaureus: sounds like rape [21:30] isaacs: piscisaureus: it's the Ry Packager [21:30] isaacs: i pronounce it "ripe", cuz it smells like melon [21:30] jetienne: npkg [21:30] piscisaureus: can I download ry now? [21:30] dachary: Hi, I'm running nodejs 0.3.7 + npm 0.2.17 + express 1.0.3 and when I run a script containing just require('express') it shows Error: Cannot find module 'express' (as in the full log with strace http://pastebin.com/J2JBarJy ). Another module (log) that was installed using the same method as express (npm install) loads without a glitch. [21:31] dachary: (sorry ignore the above) [21:31] ryah: piscisaureus: how can chdir not be thread safe? [21:31] dachary: wrong cut/paste [21:31] isaacs: dachary: i felt like i was having deja vu [21:31] dachary: ;-) [21:31] ryah: rape install socket.io [21:32] dachary: I'm would like to store on disk a fairly small amount of information (megabytes) so that it can be loaded when the node.js server starts and it restarts where it left off. What storage would you advise ? JSON.stringify() + write in file ? Something more sophisticated and yet simpler than sqlite ? [21:32] tjholowaychuk: ryah: rape socket.io [21:32] dachary: isaacs: the above is not because I can't use sqlite. But not having it made me realize that I may not need it at all because it's overkill. [21:32] tjholowaychuk: rape express [21:32] ryah: ACTION is imagining the logo posibilities [21:32] piscisaureus: ryah: [21:32] piscisaureus: _OS internals_ [21:33] piscisaureus: struct process_info_block() { [21:33] tjholowaychuk: rape creationix (bahaha, bad time to have a named mod) [21:33] piscisaureus: char[MAX_PATH] cwd; [21:33] piscisaureus: } process_info; [21:33] piscisaureus: int chdir(char *new) { [21:33] piscisaureus: strcpy(process_info.cwd, new); [21:33] piscisaureus: } [21:33] Evet_ has joined the channel [21:34] piscisaureus: well something like that, probably this doesn't compile heh [21:34] aaronblohowiak: piscisaureus: gist.github.com is your friend [21:34] piscisaureus: aaronblohowiak: it is. why? [21:34] tmcw: - hey, anyone noticed that sys.pump doesn't behave correctly when given binary inputs & outputs? [21:35] aaronblohowiak: piscisaureus: pasting multiple lines of code into the channel not so fun for the rest of us =) [21:35] pandark_ has joined the channel [21:35] aaronblohowiak: isaacs: mmm, i wonder if ryp uses herbal essences shampoo ;) [21:35] ryah: piscisaureus: 'struct process_info_block()' that looks like a syntax error [21:36] Evet_ has joined the channel [21:36] piscisaureus: yah. it was just to demonstrate how chdir couldnt be thread-safe. I don't know how windows does that actually, but it *could* be like this [21:37] ryah: are you suggesting we lock chdir? [21:37] piscisaureus: ryah: the thing is that msdn puts big fat warnings about SetCurrentDirectory not being thread-safe so probably it isn't [21:37] sprout has joined the channel [21:37] piscisaureus: ryah: either get rid of it or absolutize pathnames on the main thread [21:37] piscisaureus: either shouln't be so hard [21:37] onar_ has joined the channel [21:38] ryah: what do you mean by 'absolutize pathnames on the main thread' ? [21:38] piscisaureus: just a matter of calling path.resolve in js before calling binding.open / symlink / mkdir / ... [21:39] dmcquay has joined the channel [21:39] ryah: oh, not allowing relative paths to be passed to fs.* ? [21:39] ryah: hm [21:39] piscisaureus: yeah [21:39] piscisaureus: could do that in C as well [21:39] piscisaureus: but it shouldn't be delayed until in an libeio thread [21:40] sveimac has joined the channel [21:41] piscisaureus: ryah: I think locking chdir takes away performance [21:41] piscisaureus: because you need to obtain that lock also in a thread [21:41] piscisaureus: (effectlively rendering libeio useless btw) [21:42] ryah: forcing people to resolve their paths might be okay [21:42] ryah: or just doing it in fs.js [21:43] ryah: we should have a require('path').isAbsolute() function [21:43] piscisaureus: i'd vote for just doing it in fs.js [21:43] ericnakagawa has joined the channel [21:44] sholmes has joined the channel [21:44] ryah: nod [21:44] ryah: require('path').resolve() [21:44] ryah: ^-- calls process.cwd() if necessary [21:44] ashleydev has joined the channel [21:44] piscisaureus: ryah: I know. I wrote that :-) [21:44] ryah: oh, does it exist already? [21:44] ryah: :) [21:45] ryah: i was suggesting we make that [21:45] piscisaureus: yeah. You landed it even :-) [21:45] ryah: okay, let's call that on fs.open then [21:45] fly-away has joined the channel [21:45] ryah: it would be nice to have that test too [21:45] piscisaureus: should be anything with pathnames, except for a symlink link target [21:46] fallsemo has joined the channel [21:46] ryah: piscisaureus: you going to do it? if not can you make an issue? [21:47] piscisaureus: ryah: I can do it but I'm a bit busy now. Making it an issue anyway. [21:47] tim_smart: ryah: Would you just determine a path as absolute if it began with '/'? [21:47] ryah: piscisaureus: danke [21:47] piscisaureus: remind me if U roger? [21:47] juan77: hi, is there a way to check that a path is a directory with fs? [21:47] piscisaureus: * if I forget [21:47] creationix: tjholowaychuk: what's with all this raping? [21:47] ryah: tim_smart: windows [21:47] tjholowaychuk: haha [21:48] tim_smart: ryah: RAWR [21:48] ashleydev has joined the channel [21:48] snearch has joined the channel [21:48] creationix: tjholowaychuk: I pronouce ryp "ripe" [21:48] tim_smart: I thought cygwin resolved c:\\ to /c/ [21:48] peol has joined the channel [21:48] piscisaureus: tim_smart: forget about cygwin. this is windows [21:49] tjholowaychuk: creationix: http://nodejs.debuggable.com/2011-02-01.txt [21:30] [21:49] softdrink: i don't know how anyone can do modern web dev in windows [21:49] piscisaureus: tim_smart: quiz: which of these is relative? [21:49] piscisaureus: d:\my fancy stuff [21:49] piscisaureus: d:gory [21:49] piscisaureus: \foo [21:50] tim_smart: piscisaureus: Call a friend? [21:50] tim_smart: ACTION calls piscisaureus  [21:50] awenkhh has joined the channel [21:50] tim_smart: I haven't used windows for too long. [21:51] tim_smart: I would punch in b) though. [21:51] onar_ has joined the channel [21:51] piscisaureus: well, b and c are both :-) [21:51] EHL has joined the channel [21:51] creationix: I was about to saw b and c [21:51] creationix: but got distracted reading the backlog [21:51] jamund has joined the channel [21:51] piscisaureus: heh [21:51] tim_smart: Oh yes, this is windows where root is always a drive name :/ [21:51] creationix: s/saw/say/ [21:53] dekz has joined the channel [21:53] piscisaureus: tim_smart: sure? what about \??\Volume{030ec78b-aa09-11df-830c-806e6f6e6963}\my\fancy\stuff [21:53] onar__ has joined the channel [21:54] stagas: there's also \\network_computer_name\blah [21:54] tim_smart: Damn windows and its retard-ness. [21:54] aurynn: And now for the process of ripping postgres.js apart and plugging strtok in. [21:54] creationix: aurynn: that sounds like fun [21:55] aurynn: creationix, I'm looking forward to it :) [21:55] tim_smart: Does Windows have a syscall for checking absolute paths? [21:56] ryah: a syscall? [21:56] piscisaureus: tim_smart: ehm. not checking them, but getting them I guess [21:56] ryah: that would be disgusting [21:57] tim_smart: Well Windows just obviously wants developers to work harder. [21:57] jbpros has joined the channel [21:57] dgathright has joined the channel [21:57] bradleymeck has joined the channel [21:58] aurynn: creationix, I was going to switch to using the crypto library for md5, as well [21:58] piscisaureus: tim_smart: GetFullPathName [21:58] creationix: good idea, except I heard it's on the way out [21:58] dmcquay has joined the channel [21:58] rburhum has left the channel [21:58] creationix: ryah: are you really pulling the crypto module? [21:58] bradleymeck: whats a good echo server site that will spew back POST variables as the body [21:58] pHcF has joined the channel [21:58] aurynn: unless ryah's pulling it [21:59] tjholowaychuk: aurynn: pretty sure he is [21:59] aurynn: well crpa. [21:59] jashkenas_work has left the channel [21:59] aurynn: ryah, why're you pulling crypto? [22:01] SubStack: so long as it lands in userspace [22:01] ashleydev has joined the channel [22:03] creationix: well, the problem with moving crypto to userspace is it's a compiled module [22:03] creationix: there are many environments where those are very painful [22:03] hasenj has joined the channel [22:03] tjholowaychuk: yeah that is the main reason im not happy about it [22:04] tjholowaychuk: its annoying more than anything i guess [22:04] devdazed has joined the channel [22:04] creationix: I guess we need to make compiles addons easier [22:04] creationix: *compiled [22:07] ryah: aurynn, creationix: unknown. obviously i need to have an alternative solution before i remove it [22:07] proj has joined the channel [22:07] ryah: in any case i can't do it for v0.4 [22:08] creationix: good to know [22:08] stephen_mcd has joined the channel [22:08] aurynn: is 0.3 considered stable yet? [22:08] creationix: aurynn: when it is, it will be 0.4 [22:08] aurynn: ah-hah. [22:08] creationix: that tag will mean stable [22:08] creationix: 0.4 will be the exact same code and api as 0.3 [22:11] mikeal has joined the channel [22:11] sveimac has joined the channel [22:11] onar_ has joined the channel [22:11] EHL: anyone with experience with express+cradle? [22:12] jchris has joined the channel [22:12] ossareh has joined the channel [22:13] devdazed: ryah: why is it that the default behavior of a process recieving a signal results in the process exiting? [22:15] ryah: devdazed: why wouldn't that be the default behavior? [22:15] mjr_: ryah: do you think you'll address the HTTP API issue where you need to req.connection.on("end") in order to detect an abort? [22:15] mjr_: I mean, in 0.4 [22:15] Jaye has joined the channel [22:16] devdazed: ryah: it's inconsistent with other languages. also, if my app receives a SIGUSR1, i dont want it to exit. the typical default behavior of SIGHUP results in a restart [22:16] ryah: mjr_: i can try. can you open an issue for it so we have a thread going? [22:16] mjr_: sure [22:16] ryah: mjr_: a test with the expected api would help dramatically [22:16] mjr_: OK, I'll submit one of those as well. [22:17] mjr_: I guess I should start using the new HTTP client API. [22:17] mjr_: Does HTTPS client work yet? [22:17] shaver: seems to [22:17] shaver: though I've only done GET to default port [22:17] mjr_: fantastic [22:17] shaver: using 0.3.7 [22:18] mjr_: Have you used the new HTTP client API, shaver? [22:18] ryah: devdazed: [22:18] ryah: Signal Value Action Comment [22:18] ryah: ────────────────────────────────────────────────────────────────────── [22:18] isaacs: ryah: just pushed a -h, ls, and rm commands for yp [22:18] eddanger has joined the channel [22:18] ryah: SIGHUP 1 Term Hangup detected on controlling terminal [22:18] isaacs: *ryp [22:18] ryah: or death of controlling process [22:18] devdazed: i also ran into some unexpected behavior when it comes to file handles. if I do a fs.createWriteStream("foo") and rename that file to "bar" the handle goes to the new file [22:18] wkmanire: ryah: You just made my irssi cry. [22:18] mjr_: devdazed: that's Unix for you. [22:19] isaacs: i'm slappin a 1.0 on this puppy. it's don.e [22:19] bradleymeck: yay for not being bound to names! [22:19] isaacs: that's how you do software! [22:19] isaacs: bam! bugs? what are those? [22:19] aslakhellesoy_ has joined the channel [22:19] ryah: devdazed: also, node claims USR1, sorry [22:19] mjr_: Unless you close and re-open the file, the fd is bound to the original file, no matter what the name changes to. [22:19] creationix: ryah, did my patch for the https server test work for you? [22:19] devdazed: what does node use SIGUSR1 for? [22:19] ryah: creationix: yes, i have failing https tests [22:19] bradleymeck: its not a bug when you do a reverse for loop in ruby and it goes through the list twice, its a feature! [22:19] ryah: devdazed: starting the debugger [22:19] aslakhellesoy_: Does anyone know if tobi understands pages with web sockets? [22:19] charlenopires has joined the channel [22:20] devdazed: ryah: is SIGUSR2 up for grabs? [22:20] ryah: yes [22:20] MKzero has joined the channel [22:21] devdazed: is SIGUSR1 only used in the console? or will it start the debugger when the proc is runnning? [22:22] ryah: always [22:24] piscisaureus: 205 issues? ryah, do you even look there at all? [22:24] MikhX has joined the channel [22:25] ryah: yes [22:25] piscisaureus: ok [22:25] piscisaureus: just wonderin' [22:25] ryah: we're building a new platform, it's complicated :) [22:26] piscisaureus: ryah: if I were you I would get sad from only looking at that number [22:26] piscisaureus: ACTION happy he's not ry [22:26] Lorentz: Hmm hmm, compilan 0.3 [22:26] MKzero: hey there, anybode here with some expirience on building node on cygwin? [22:26] devdazed: ryah: i agree that even though SIGHUP is used as a restart for a lot of apps, it inferrs disconnection. However, I still dont think SIGUSR1 & SIGUSR2 should result in the process quitting [22:27] creationix: MKzero: there are good instructions on the wiki [22:27] bradleymeck: piscisaures more to the issue is ry doesnt close like half of the things he could :/ [22:27] creationix: devdazed: it doesn't cause the process to quit I thought [22:28] creationix: the intent I thought, was to enable debug mode on the fly for a running production server [22:28] MKzero: creationix: I read them and got the libv8 err#2 thingy, I exported /bin/bash but that didn't help :( [22:28] devdazed: creationix: if no listener is defined, it will cause the process to quit with the message sigusr [22:28] CIA-99: node: 03Ryan Dahl 07master * r2ff593a 10/ (lib/tls.js src/node_crypto.cc src/node_crypto.h): [22:28] CIA-99: node: TLS: better error reporting at binding layer [22:28] CIA-99: node: Closes GH-612. - http://bit.ly/e7mFAp [22:28] creationix: devdazed: what version of node? [22:28] devdazed: creationix: this may be the case for SIGUSR1, but not in node 2.6 [22:29] fission6: how would i want to take a timestamp of how long it took for a callback to be called [22:29] creationix: fission6: you can do it in js using Date.now() and subtracting the difference [22:30] creationix: function calls are pretty fast though [22:30] jtsnow has joined the channel [22:30] fission6: so i just do it before the function i am trying to time and first thing in the callback creationix [22:30] jonaslund has joined the channel [22:30] creationix: right, but it's going to be sub-ms [22:31] creationix: so that isn't going to help [22:31] devdazed: fission6: i would do it after your final callback has completed [22:31] tjholowaychuk: fission6: var start = new Date; ....; var duration = new Date - start [22:31] creationix: function calls are extremely fast in v8 [22:31] fission6: ok well thats kind of what i am doing [22:31] fission6: in one sense [22:31] fission6: hey also random but how do i properly exit a node terminal / prompt [22:32] creationix: fission6: you can mark once when you call the async function that you pass the callback, and then in the first line of your callback mark again [22:32] devdazed: .exit [22:32] creationix: and get the difference [22:32] devdazed: or .quit [22:32] fission6: creationix: right [22:32] fission6: exactly [22:32] fission6: ok and are there other useful commands devdazed [22:32] creationix: Date.now() will give you a ms timestamp [22:33] fission6: yeah i think i got it, justn eed to do it now woo [22:33] devdazed: fission6: also, .help gives you a list [22:33] creationix: I always just control+d, but I guess that doesn't work everywhere [22:33] matt_c has joined the channel [22:33] devdazed: i got so used to ctrl+c [22:34] devdazed: and if it doesnt work the first time just furiously repeat [22:34] springmeyer_ has joined the channel [22:35] jonaslund: i saw a changelog note about a mingw build of node 0.3 , is that the "best" way on windows now or still cygwin ? [22:36] sonnym has joined the channel [22:36] ossareh has joined the channel [22:37] wadey has joined the channel [22:37] admc has joined the channel [22:38] markwubben has joined the channel [22:39] piscisaureus: yeah. surely half of the github issues should be closed for sure [22:39] tjholowaychuk: ryah: cool thanks for the os mod! very nice to have [22:39] tjholowaychuk: finally playing with 0.3.x [22:39] briznad has joined the channel [22:39] creationix: isaacs: I like your package.json parser written in bash, that must have hurt [22:40] isaacs: creationix: nah, it was fun [22:40] creationix: still, why not use node, clearly the person has node installed [22:40] creationix: was bash just easier [22:40] hobodave has joined the channel [22:40] isaacs: creationix: i'm a bit ashamed to have fallen back to perl for it, though. my patience with sed is limited. [22:40] CIA-99: node: 03Ryan Dahl 07master * r807fca6 10/ (src/node_crypto.cc src/node_crypto.h): [22:40] CIA-99: node: TLS: Set ssl.receivedShutdown after each read [22:40] CIA-99: node: Closes GH-613. - http://bit.ly/gjIY3c [22:40] isaacs: ACTION shrug. i dunno. bash is kind of an awesome language. [22:41] isaacs: i enjoy using it sometimes. [22:41] tjholowaychuk: ditto [22:41] isaacs: but yeah, i'll wanna write that in node. [22:41] sveimac has joined the channel [22:41] technoweenie has joined the channel [22:41] creationix: bash is great, it's just now rpy depends on bash, curl, awk, egrep, and perl [22:41] isaacs: it was actually the product of a debate with ryan where i was kind of trying to do a little reduction to absurdity of something that he was saying, and then while i was doing it, i was like, "wait a second, this could actually be neat..." [22:41] creationix: rpy? [22:41] isaacs: ryp [22:41] isaacs: rpy would be ryah's python [22:41] svenlito has joined the channel [22:42] joelklabo has joined the channel [22:42] ashleydev has joined the channel [22:43] isaacs: but yeah, depending on bash, curl, egrep, perl, not ok [22:43] pengwynn has joined the channel [22:43] creationix: yeah, no perl in my environment, hmmm [22:43] mikeal has joined the channel [22:43] creationix: though egrep and awk are on most posix systems [22:43] creationix: even busybox usually has them [22:50] jdub has joined the channel [22:50] onar__ has joined the channel [22:51] bradleymeck: ACTION ponders if a library will ever use $_ in node [22:53] tanepiper: anyone think there would ever be traction for a proposal for a Object.copy/clone method for ECMA Harmony? [22:54] creationix: tanepiper: doubt it, since it would only be sugar [22:54] w0rse_ has joined the channel [22:54] creationix: but you can try [22:54] silence has joined the channel [22:54] tanepiper: since var bar = {a: 1, b: 2} var foo = bar; foo.a = 3 console.log(bar.a) // 3 [22:55] k04n has joined the channel [22:55] tanepiper: took me 3 days to track down a stupid bug because of that [22:55] creationix: tanepiper: right, but that's js [22:55] bart2 has joined the channel [22:55] creationix: tanepiper: shallow copy is easy [22:56] creationix: but deep copy/clone is a bit harder and there is no one correct way to do it [22:56] creationix: how deep do you go? [22:56] SubStack: require('traverse').clone ^_^ [22:56] creationix: do you clone the builtins [22:56] creationix: do you deep clone the inheritance hierarchy [22:56] viirya_ has joined the channel [22:56] SubStack: there is a prototype trick all up in it [22:57] tanepiper: SubStack: is that documented? [22:57] SubStack: tanepiper: which? [22:57] tanepiper: traverse.clone ? [22:57] strmpnk_ has joined the channel [22:57] MikhX has joined the channel [22:57] tanepiper: doesn't seem to be in the readme of js-traverse [22:57] onar_ has joined the channel [22:57] wadey: I like to use the underscore extend method for shallow copies. It is very flexible: http://documentcloud.github.com/underscore/#extend [22:57] jimt_ has joined the channel [22:57] tanepiper: if i had know that i would have used it right away, but i'm cetainly going to use it now! [22:58] briznad1 has joined the channel [22:58] SubStack: tanepiper: it's in there, the readme is just a little cluttered [22:58] SubStack: but anyhow just throw a hash at it [22:58] creationix: I find a shallow copy is usually what I need, not a deep clone [22:59] SubStack: or an array or whatevs [22:59] SubStack: shallow copy with require('traverse').copy(obj) [22:59] tanepiper: yea, i just need a shallow copy, it's a settings hash i want to copy [23:00] SubStack: 7 of my modules depend on traverse [23:00] SubStack: mostly I just use the hash part of it [23:00] SubStack: speaking of which, I should spin that off into its own thing now that npm is all different [23:00] isaacs: SubStack: npm isn't all different yet :) [23:00] tanepiper: i might submit better docs for you ;) [23:01] SubStack: isaacs: but soon! [23:01] isaacs: SubStack: by the end of March [23:01] SubStack: right [23:01] isaacs: implemented by the end of feb [23:01] SubStack: but I need to update all of my packages that depend on it [23:01] viirya has joined the channel [23:01] wadey: is there any guess yet for when node 0.4.x might be released? [23:02] creationix: wadey: between the next second and 6 months [23:02] wadey: creationix: thanks [23:02] creationix: 95% certain [23:02] wadey: :) [23:02] creationix: I trust it's soon [23:02] creationix: within 2 weeks would be my guess [23:03] bradleymeck: creationix, there are ways to clone anything, its just prohibitively hard, i have a deep copy somewhere on my home comp [23:03] tanepiper: I suspect there will not be many major API changes between now and 0.4, 95% bug fixes [23:04] creationix: tanepiper: right [23:04] creationix: hence ryah's email to start getting ready now [23:04] creationix: the API is stable and node will be stable soon [23:04] tanepiper: http/https should at least be stable now [23:04] creationix: actually, that's probably the least stable of the APIs [23:05] creationix: but shouldn't change unless it just doesn't work [23:05] tanepiper: although the main issue is modules updating to the new API's [23:05] atmos has joined the channel [23:06] devrim has joined the channel [23:06] bronson has joined the channel [23:08] SubStack: hah but I can use npmdep now to know exactly which packages I need to update [23:09] chrischris has joined the channel [23:10] creationix has left the channel [23:10] tanepiper: i'm mainly waiting on request + connect/express being updated to the new apis [23:10] tanepiper: HTTPS Express! [23:11] daniellindsley has joined the channel [23:11] sveimac has joined the channel [23:13] dmcquay has joined the channel [23:14] tjholowaychuk: tanepiper: one sec [23:14] tjholowaychuk: ill patch [23:15] tjholowaychuk: what's the new api again? new https.Server(options, fn)? [23:15] aaronblohowiak_ has joined the channel [23:16] ryah: yes [23:16] ryah: which reminds me... [23:16] ryah: i want to make https.Server(fn) default to self-signed [23:16] tjholowaychuk: would look nicer swapped [23:16] tjholowaychuk: https [23:16] tjholowaychuk: ? http.Server.call(this, {}, this.handle) [23:16] tjholowaychuk: : http.Server.call(this, this.handle); [23:16] tjholowaychuk: is lame [23:16] Alex3000 has joined the channel [23:16] tjholowaychuk: but not a huge deal [23:17] ryah: tjholowaychuk++ [23:17] v8bot: ryah has given a beer to tjholowaychuk. tjholowaychuk now has 9 beers. [23:17] onar_ has joined the channel [23:18] piscisaureus: holy moly tj [23:18] piscisaureus: pquerna: ping [23:18] tanepiper: tjholowaychuk: oh i wasn't buggin, but woop :D [23:18] tanepiper: tjholowaychuk++ [23:18] v8bot: tanepiper has given a beer to tjholowaychuk. tjholowaychuk now has 10 beers. [23:19] tanepiper: tjholowaychuk is gonna get drunk on codebeer! [23:19] tjholowaychuk: piscisaureus: what? lol [23:19] tjholowaychuk: ahaha [23:19] opengeard has joined the channel [23:19] piscisaureus: jips [23:20] slickplaid: tjholowaychuk++ for making my life a bit easier today :D [23:20] SubStack: what kinds of beers are these I wonder [23:20] slickplaid: aw [23:20] slickplaid: can't type anything after it [23:20] slickplaid: tjholowaychuk++ [23:20] v8bot: slickplaid has given a beer to tjholowaychuk. tjholowaychuk now has 11 beers. [23:20] slickplaid: there :D [23:20] SubStack: I like a thick stout or an IPA [23:20] tjholowaychuk: i dont even drink beer [23:20] tjholowaychuk: haha [23:20] tjholowaychuk: only e-beer [23:20] slickplaid: today is a wonderful day to start! [23:20] piscisaureus: maybe that's why ur fridge is full [23:20] mscdex: gah, ncurses is such a strange beast [23:20] mikeal: wow [23:21] mikeal: request tests are passing on node master [23:21] tjholowaychuk: ryah: do you _have_ to pass the options to the constructor? or can you createServer({}, fn).setOptions(...) ? [23:21] jimt has joined the channel [23:21] mikeal: and i didn't actually change anything yet [23:21] SubStack: mikeal: how [23:21] SubStack: bah silly keys [23:21] mikeal: so [23:21] SubStack: how's yammer, I meant to type [23:21] mikeal: there are a bunch of fixes in master and 0.3.7 [23:21] tjholowaychuk: ryah: my plan for the connect support was just to swap the inheritance, and then people can use setOptions() [23:21] mikeal: to handle backwards compat [23:21] mikeal: SubStack: i start next week [23:21] tbeseda has joined the channel [23:22] tbeseda has joined the channel [23:22] SubStack: neat [23:23] tanepiper: mikeal: yay [23:23] tanepiper: mikeal++ [23:23] v8bot: tanepiper has given a beer to mikeal. mikeal now has 6 beers. [23:23] astropirate has joined the channel [23:23] mikeal: anyway [23:23] mikeal: i'm changing a ton of stuff in request [23:23] tanepiper: i might actually get to replace cradle with request this week ;) [23:23] SubStack: also update response while you're at it! [23:23] SubStack: I want setCookie [23:23] SubStack: and setHeader [23:24] SubStack: so you can set stuff before you writeHead() [23:24] SubStack: hard to write middleware that works reliably without those [23:24] mikeal: i don't maintain that library :) [23:24] mikeal: that's Marak's [23:24] pquerna: piscisaureus: pong [23:24] tjholowaychuk: SubStack: the only thing that sucks with that is it forces middleware compatibility out of wack [23:24] SubStack: oh this is a separate lib [23:24] tjholowaychuk: so thins wont work on say tim's Stack [23:24] tjholowaychuk: if Connect fucked with res.* [23:25] piscisaureus: pquerna: just a question. How easy is it for you to get access to a vps that runs/can run windows? [23:25] pquerna: piscisaureus: sorry been lagging this week, in san antonio for 'rookie-o' / racker orientation stuff. [23:25] pquerna: piscisaureus: we can do that [23:25] saikat has joined the channel [23:25] tjholowaychuk: so IMO if it were to work it would need to be in node [23:25] piscisaureus: pquerna: np. I'm still waiting for a piece of paper [23:25] piscisaureus: pquerna: would be great to set up a buildbot [23:25] statim has left the channel [23:25] pquerna: yup [23:26] piscisaureus: I myself have nothing cloudy that runs windows [23:26] SubStack: tjholowaychuk: yeah for now I hacked up some middleware thing that sets them itself, and it seems to work with express and connect but I've been having some issues with it and dnode-stack [23:26] tjholowaychuk: SubStack: depending on what the names are it might clash with express since express has a bunch of those already [23:26] SubStack: tjholowaychuk: it seems to work in practice [23:28] Me1000 has joined the channel [23:28] rjrodger_ has joined the channel [23:29] CarterA has joined the channel [23:30] CarterA: ryah needs to install libssl-dev on his build slaves... [23:34] ryah: ? [23:36] CarterA: ryah: Could've sworn it was your boxes that were erroring out on that, but now that I check again it isn't [23:36] CarterA: Whoever runs the FreeBSD boxes is missing ssl. [23:38] CarterA: Waaait....it the Solaris Nevada box. It's missing ssl. The FreeBSD boxes [23:38] c4milo1 has joined the channel [23:38] CarterA: The freebsd boxes are just totally failing at building. [23:38] xla has joined the channel [23:40] floby has joined the channel [23:40] floby has left the channel [23:41] ryah: someone needs to port V8 to fbsd [23:41] ryah: (easy) [23:41] sveimac has joined the channel [23:42] ryah: ~30 min [23:42] ryah: :) [23:42] CarterA: Seems like it just doesn't have the right #define in it. [23:42] davidpad_ has joined the channel [23:42] CarterA: To do that, should I patch v8? Or what? [23:42] CarterA: Should it be done in node-space, or v8-space? [23:42] skm has joined the channel [23:44] MikhX_ has joined the channel [23:44] derferman has joined the channel [23:45] jashkenas has joined the channel [23:46] jimt has joined the channel [23:46] Me1000 has joined the channel [23:48] keyvan has joined the channel [23:50] Me1000 has joined the channel [23:50] charlenopires_ has joined the channel [23:52] ryah: v8 [23:52] v8bot: ryah: undefined [23:52] silence has joined the channel [23:53] CarterA: And then it should be sent as a patch to them? Or do we just apply it each time we update v8 in node? [23:53] mscdex: mape: well, i got something that works fine on linux, but on osx the screen freaks out constantly :\ [23:53] ryah: send to them [23:53] mscdex: mape: not sure what's causing that, same terminal type and everything [23:53] mape: mscdex: nice [23:53] CarterA: Alright. [23:55] CarterA: ryah: You're aware of the https-large-response bug, right? [23:56] emerleite has joined the channel [23:57] ericnakagawa has joined the channel [23:57] davidc_ has joined the channel [23:58] mscdex: mape: fwiw here's what i came up with at the moment: https://gist.github.com/b0282efd41c045b1906b