[00:01] zomgbie has joined the channel [00:01] levi501d has joined the channel [00:02] sivy has joined the channel [00:04] nivoc has left the channel [00:06] aho has joined the channel [00:07] hipe: elliottcable: ohai i've been folowing you forever on github i don't remember why! but anyway good to see you ec|detached [00:07] ceej: what's the equivalent to http://php.net/manual/en/function.time.php time() in node? [00:07] hipe: ceej: new Date(); ? [00:07] ceej: hipe: not the current unix timestamp [00:07] hipe: d = new Date(); g.getTime(); // milliseconds epoch [00:08] elliottcable: hipe: oi, what’s up? [00:08] hipe: so (new Date()) / 1000 ; // ? [00:08] elliottcable: hipe: it may be a little hard for me to follow you right now, my irssi is *very* fucked up at the moment. [00:09] hipe: elliottcable: :D i'm finishing a little mvc framework, unit testing framework and cli parser in node. then i'll look and see what else is out there. by fw i mean < 500 LOC [00:09] elliottcable: hipe: => ##Paws if you wanna talk to me [00:09] losing has joined the channel [00:09] hipe: join ##Paws [00:09] hipe: doh! irssi is failiing me to not for fault of irssi [00:09] prettyrobots has joined the channel [00:10] isaacs has joined the channel [00:11] davidc_ has joined the channel [00:11] ceej: hipe: so Math.round(((new Date()) / 1000)) [00:12] ceej: ty [00:13] MikhX has joined the channel [00:13] nornagon_ has joined the channel [00:15] [[zz]] has joined the channel [00:15] loktar_ has joined the channel [00:17] ChrisPartridge: SubStack: node-ssh-server? Go you! [00:20] ion- has joined the channel [00:24] msch has joined the channel [00:26] ion- has joined the channel [00:26] AphelionZ has joined the channel [00:26] vonkow has joined the channel [00:28] AphelionZ: Hi, I have what I think is a really basic question, but I can't find the answer anywhere. I'm using the mysql module and I'm just trying to get the results out so I can return them in a function. However, the results are in the callback function's scope, not the parent function. What's the best method of getting them out? See: http://pastie.org/1614992 [00:32] ceej: is there any extension for express or connect to do rest calls? [00:35] hipe: AphelionZ: if the mysql driver only supports asynchronous calls, you will have to work with that, i'm a noob but the pattern seems to be that you throw callback handlers around all the place, seems to be the whole point of node.js [00:35] polotek: ceej: you mean to have them serve a REST api? or make rest calls during a request? [00:35] hipe: so maybe you can't jsut the return the results in a funciton, nor would you want to, unless you wrote some ridiculous loop to wait for the results [00:36] ceej: polotek: I think https://github.com/ciaranj/connect-auth will work [00:36] ceej: actually I don't want it hooked into routes... [00:36] AphelionZ: yeah it's just tripping me up because it seems I have two different closures that apparently need to be inside of each other - my socket.io on.connect function, and my main app functionality which has the mysql queries [00:36] polotek: ceej: not sure I'm following you [00:36] piscisaureus has joined the channel [00:37] ceej: polotek: something like https://github.com/danwrong/restler with digest auth [00:38] AphelionZ: check out server.js and server/tweue.js: https://github.com/aphelionz/Tweue [00:40] perezd has joined the channel [00:40] AAA_awright: AphelionZ: Take some time to adjust to the asynchronous paradigm... Note that the callback function isn't (likely) going to be executed right away, it's going to be executed after all the code after it is finished. [00:41] ChrisPartridge: AphelionZ: I'd suggest taking a look at some of the async libs [00:41] AphelionZ: ChrisPartridge: sure, where's a good place to start? [00:41] nornagon_ has joined the channel [00:41] ChrisPartridge: AphelionZ: I'm using async.js with the mysql module [00:41] ChrisPartridge: AphelionZ: simply using the waterfall method to process results [00:42] AAA_awright: AphelionZ: http://metaduck.com/post/2675027550/asynchronous-iteration-patterns-in-node-js [00:42] prettyrobots: How is SSL coming along? [00:42] ChrisPartridge: prettyrobots: Working fine for me :-) [00:43] prettyrobots: We're able to run servers in Node.js SSL now? [00:43] hornairs has joined the channel [00:43] ChrisPartridge: prettyrobots: I put one into production last friday [00:43] ChrisPartridge: no complaints so far [00:43] prettyrobots: ChrisPartridge: Really? You're aware of the issues historically? [00:43] ChrisPartridge: prettyrobots: It's an internal system, so no major risks [00:44] prettyrobots: Are you using v0.4.x? [00:44] ChrisPartridge: 0.4.1, yes [00:44] prettyrobots: I'd like to hear from someone who worked on it that the SSL issues were addressed, if anyone knows. [00:44] bingomanatee has joined the channel [00:44] prettyrobots: But, that's good to hear, ChrisPartridge. [00:45] ChrisPartridge: prettyrobots: Look at the changelog, 0.4 had https re-write, 0.4.1 addressed some minor issues [00:45] polotek: prettyrobots: I'm not the guy [00:45] AphelionZ: AAA_awright: thanks. ChrisPartridge: can you paste some example code? [00:45] polotek: but there was extensive work done on ssl for 0.4.0 [00:45] ChrisPartridge: AphelionZ: Sure, give me a few minutes [00:45] polotek: complete refactor with tests [00:45] AphelionZ: awesome [00:45] polotek: supposed to work pretty well [00:46] rchavik has joined the channel [00:46] prettyrobots: Fix throttling in TLS connections [00:46] prettyrobots: I see that in 0.3.8. That's great! [00:46] prettyrobots: polotek: Great news. Thanks. [00:48] charlenopires has joined the channel [00:49] unomi has joined the channel [00:49] freakyfractal has joined the channel [00:53] EyePulp has joined the channel [00:53] lukus has joined the channel [00:53] lukus has joined the channel [00:54] stagas has joined the channel [00:56] kriszyp has joined the channel [01:01] nornagon_ has joined the channel [01:05] ryah: prettyrobots: let me know about your experiences [01:05] ryah: at the moment it think people are using it okay [01:05] rfay has joined the channel [01:05] ryah: interested to know if people hit bugs with ssl [01:06] prettyrobots: ryah: Sure. [01:06] prettyrobots: I've been waiting for it to go from road map to rear view. [01:06] aho: how's node on windows these days? [01:07] aho: any progress? :) [01:08] prettyrobots: I'm going to build some server to server SSL stuff that does some significant transfers. This used to trigger the throttling. [01:10] glitterfang has joined the channel [01:12] prettyrobots: I mean, as long as ya'll have gotten around to it, I'm sure it works fine. I've been working on other things. Glad to see all that is in 0.4.x. Node.js is my goto language for web development and server administration. [01:12] iszak has joined the channel [01:12] iszak has joined the channel [01:12] gravyrobber has joined the channel [01:15] losing has joined the channel [01:15] mmattozzi has left the channel [01:16] davidc_ has joined the channel [01:18] ziro` has joined the channel [01:19] CIA-39: node: 03isaacs 07v0.4 * r2cfe7b8 10/ lib/repl.js : Closes GH-184 Clear require cache on repl .clear - http://bit.ly/hoc5FJ [01:19] CIA-39: node: 03isaacs 07v0.4 * rf3d3641 10/ (lib/fs.js lib/tty_win32.js): [01:19] CIA-39: node: Closes GH-85 Emit error rather than throwing. [01:19] CIA-39: node: Since "error" events will throw when unhandled anyhow, it makes no sense [01:19] CIA-39: node: to throw from an EventEmitter's method, especially for such a minor [01:19] CIA-39: node: misdemeanor as attempting to write to a non-writable stream. - http://bit.ly/efadg6 [01:19] isaacs: w00t [01:19] CIA-39: node: 03isaacs 07v0.4 * r3599c71 10/ (doc/api/modules.markdown lib/module.js): Closes GH-690 node_modules folders should be highest priority - http://bit.ly/hSdcAZ [01:19] CIA-39: node: 03isaacs 07v0.4 * rd664bf3 10/ (lib/url.js test/simple/test-url.js): (log message trimmed) [01:19] CIA-39: node: Closes GH-711 URL parse more safely [01:19] CIA-39: node: This does 3 things: [01:19] CIA-39: node: 1. Delimiters and "unwise" characters are never included in the [01:19] CIA-39: node: hostname or path. [01:19] CIA-39: node: 2. url.format will sanitize string URLs that are passed to it. [01:19] CIA-39: node: 3. The parsed url's 'href' member will be the sanitized url, which may [01:19] CIA-39: node: 03isaacs 07v0.4 * ra48f73d 10/ lib/repl.js : Closes GH-232 Make the repl's global the right thing - http://bit.ly/e4Hhxn [01:20] unomi has joined the channel [01:21] astralab has joined the channel [01:22] prettyrobots: How is Windows coming along? [01:27] sigue has joined the channel [01:28] lemonhall has joined the channel [01:29] jimt has joined the channel [01:29] ceej: is there a function in node to make strings url safe? [01:29] konobi: nope... there are plenty of javascript libraries out there though [01:30] AAA_awright: ceej: encodeURI and family [01:30] AAA_awright: or maybe it's encodeURL [01:30] AAA_awright: Yeah encodeURI [01:30] lemonhall has left the channel [01:30] sivy has joined the channel [01:30] AAA_awright: encodeURIComponent [01:30] ceej: AAA_awright: thank you [01:31] AAA_awright: It's a global function that comes with V8 I'm not sure it's an ECMAScript standard [01:31] strmpnk: encodeURI() is standard. [01:32] itissid has joined the channel [01:32] itissid has left the channel [01:32] boogyman_ has joined the channel [01:35] AAA_awright: It probably is [01:35] mm2001 has joined the channel [01:35] utunga has joined the channel [01:37] lemonhall_ has joined the channel [01:37] riven has joined the channel [01:37] riven has joined the channel [01:37] mm2001: isaacs: fyi, failed npm update from 0.3.7 to 0.3.9: https://gist.github.com/082e868c7c85c288398a [01:37] lemonhall_ has left the channel [01:37] versificator has joined the channel [01:38] utunga has left the channel [01:40] mm2001: isaacs: never mind, user error - I broke the path [01:41] versificator: hi, did the github change? i am told to dl git from github.com/joyent/node.git ? [01:41] riven` has joined the channel [01:41] riven has joined the channel [01:41] lakin: I'm install node in a sub directory of my home directory by configuring it with --prefix. Then I'm using the PATH env variable to point to the appropriate bin directory to run that version of node and I install npm v0.3.9. Then I am using npm to install the mongodb driver. All of this works great. But when I run my node script - it complains that it can't find: Error: Cannot find module 'mongodb/bson/bson' [01:42] mm2001: versificator: yes, it switched from Ryan's account a few days ago iirc [01:42] lakin: am I missing some sort of ENV? How else would I track down what's wrong with my install? [01:42] versificator: i think it switched back [01:42] versificator: http://nodejs.org/#download points back to http://github.com/ry/node/tree/master [01:43] versificator: oh nmind it's a clever redir [01:43] sigue has joined the channel [01:43] versificator: what's node's version of "system()" or "passthru()" called? [01:44] NuckingFuts has joined the channel [01:45] ryah: versificator: require('child_process').exec [01:46] alystair has joined the channel [01:47] versificator: ryah cool thanks [01:47] lgl has joined the channel [01:48] dthompson has joined the channel [01:49] tmzt: what about popen? [01:50] elux_ has joined the channel [01:50] Ond has joined the channel [01:53] lakin: what's the appropriate version of npm for node v0.4.1 ? [01:53] jacobolus has joined the channel [01:54] lemonhall has joined the channel [01:54] JimBastard has joined the channel [01:54] lemonhall has left the channel [01:54] johnnywengluu: anything new in the node world? [01:55] JimBastard: is there any magic way to tell node to start up as 32bit if you have installed it as 64bit? i have a deps issues with https://github.com/tmpvar/node-irrklang since irrKlang doesn't support 64bit archs [01:55] johnnywengluu: JimBastard: when will nodejitsu be ready for the public? [01:55] JimBastard: johnnywengluu: soon :-) [01:55] johnnywengluu: within one month? [01:55] JimBastard: we've got some big news coming [01:55] JimBastard: yeah [01:55] JimBastard: we just opened up west coast hack haus [01:56] JimBastard: so we are on both coasts now [01:56] johnnywengluu: oh .. u bastard .. always making me curious =) [01:56] JimBastard: i gotta fix this JSONloops problem before tomorrow morning's standup so i can get back to real work [01:57] JimBastard: i need to make the npm install work [01:57] JimBastard: https://www.kickstarter.com/projects/1141308765/jsonloops-open-source-real-time-multiuser-audio-se [01:57] JimBastard: so people can try it out [01:59] elliottc1ble has joined the channel [02:00] shimondoodkin has joined the channel [02:01] Utkarsh_ has joined the channel [02:03] skm has joined the channel [02:04] mscdex: JimBastard: why not just always compile for 32-bit then? [02:05] JimBastard: mscdex: takes 20 minutes to rebuild node with the flag [02:05] mscdex: 20 minutes? [02:05] JimBastard: and can i do that as part of a npm install? i dont think id want to [02:05] JimBastard: maybe 10 [02:05] shimondoodkin: 5 [02:05] JimBastard: i need JSONloops to have a one line install [02:06] lgl has joined the channel [02:06] mscdex: if it takes that long to compile for 32-bit, maybe you're compiling too much ... [02:07] sivy has joined the channel [02:07] JimBastard: mscdex: could you recommend a quick and easy way to recompile node as part of an install process? [02:07] JimBastard: maybe i was just doing it in a bad way? [02:08] tilgovi has joined the channel [02:08] mscdex: JimBastard: you can specify --dest-cpu=ia32 when configuring node to compile for 32-bit [02:09] JimBastard: i was doing that.. [02:09] JimBastard: ive got a 64 bit build active right now [02:09] JimBastard: ill rebuild it and see how long it takes [02:09] mscdex: how many cores do you have make set up to use? [02:10] JimBastard: im not sure, whatever the default is [02:10] JimBastard: macbook pro [02:10] mscdex: 1 [02:10] JimBastard: new one [02:10] mscdex: if you set the JOBS env var, you can have make use additional cores [02:11] tmzt: any reason linux32 wouldn't work? [02:11] mscdex: my core i7-860 uses JOBS=8 [02:11] JimBastard: nice [02:11] JimBastard: does that speed things up? [02:11] mscdex: it builds node in ~30 sec [02:11] mscdex: for 64 bit anyway [02:12] mscdex: even if you just have dual core, it'll help out a lot [02:13] mscdex: i guess the reason my core i7 reports 8 cpus is because of hyperthreading or something [02:13] eyesUnclouded has joined the channel [02:13] mscdex: but it really has 4 cores [02:14] mscdex: s/my core i7/python [02:14] themoa has joined the channel [02:15] edude03 has joined the channel [02:15] versificator: hrm just wondering mayb e i'm going about this in the wrong thinking way, I want to have my server run a cmd on the local machine and output the stdout of the cmd to the server.. is require("child_process").exec("./mybin", function ... ); the best way to do this? or is there something better [02:15] JimBastard: i really have telling people they have to rebuild node as part of the install though [02:15] JimBastard: it kinda ruins the one-line install [02:15] AAA_awright: mscdex: Same here [02:15] jashkenas has joined the channel [02:15] zzak: mscdex: what about 2 cores? [02:15] versificator: JimBastard: aren't they tracking it with git? [02:16] AAA_awright: mscdex: To the OS it actually is 8 processors [02:16] AAA_awright: So don't single out python [02:16] JimBastard: versificator: you can try something like https://github.com/nodejitsu/nexpect [02:16] davidascher has joined the channel [02:16] possibilities has joined the channel [02:16] AAA_awright: Which you shouldn't be using anyways... [02:16] mscdex: AAA_awright: yeah. i know [02:16] JimBastard: versificator: huh? [02:16] mscdex: i just mentioned python specifically because that's what's used for node's build system :) [02:17] mscdex: JimBastard: why doesn't irrklang work on 64-bit? [02:17] AAA_awright: That was getting moved to autotools at one point (a step UP), whatever happened to that? [02:17] mscdex: i dunno, i guess cmake turned out to be better? [02:17] JimBastard: mscdex: no idea, if you google a little you will see multiple forum posts. its apparently going to be support eventually, but i have no idea how / when [02:18] JimBastard: node-sfml is suppose to work, but i cant get it to install right [02:18] jacobolus has joined the channel [02:19] tmzt: writing a build system in node? [02:19] tmzt: self hosting node [02:22] mscdex: JimBastard: what version of irrklang do you have? in the changelog it says it now runs on linux 64 bit as of 1.3.0 [02:22] micheil has joined the channel [02:22] saikat has joined the channel [02:22] lakin: anyone have suggestions on how I can debug the reason why a require("mongodb/bson/bson"); isn't working? mongodb was installed via npm and local/lib/node/mongodb/lib/mongodb/bson/bson.js is the appropriate file? [02:23] boucher has joined the channel [02:24] mscdex: oh that's silly, it's not open source [02:24] JimBastard: mscdex: really? what about macos? [02:24] JimBastard: yeah the lic is a little stange too [02:24] mscdex: well i guess you can forget that one then :) [02:24] JimBastard: we need node-sfml working [02:25] JimBastard: and use open al [02:25] rtomayko has joined the channel [02:26] jetienne has joined the channel [02:26] dspree has joined the channel [02:26] dspree has joined the channel [02:27] micheil: JimBastard: I hear your in town? [02:27] JimBastard: micheil: arent you from aus? [02:28] luke`_ has joined the channel [02:28] micheil: yeah [02:33] willwhite has joined the channel [02:38] micheil: ryah: y'know, we've not seen a Q1 roadmap yet.. :/ [02:38] micheil: (the project organisation page on the wiki just totally reminded me about those) [02:41] langworthy has joined the channel [02:43] tmzt: does express support X-Method PUT by default or is there a middleware for that? [02:44] micheil: not sure, check the source code perhaps? [02:44] Ond: http://expressjs.com/guide.html#HTTP-Methods [02:47] hij1nx has joined the channel [02:47] xastey has joined the channel [02:48] ryah: micheil: yeah, im very behind with everything [02:48] mikeal has joined the channel [02:48] micheil: ryah: fair enough :) [02:55] isaacs: lakin: the "lib" dir isn't mapped any more. do mongodb/actual/paht/to/bson/bson [02:56] mjr_: ryah: we are about to start sending a lot of iOS clients through 0.4.1 with https. [02:56] mjr_: I'll let you know how it goes. [03:00] johnnywengluu: is anyone using the async library in production? [03:02] MikhX has joined the channel [03:02] c4milo1: who is using mongoose in production? [03:04] lakin: isaacs, hrmm. Something is afoot then, as npm is mapping to a directory that contains lib/mongdb instead of mapping directly to lib/mongodb [03:04] lakin: I've worked around it at the moment [03:05] isaacs: lakin: no, that is intended behavior [03:05] isaacs: do require("mongo/lib/mongo/blahblabhlah") [03:05] lakin: oh [03:05] isaacs: specify the full path. it's mapping the package as-is [03:05] lakin: I'm supposed to change my require [03:05] isaacs: as of 0.3, that's the way to do it, yes [03:05] lakin: ok. Thanks [03:05] lakin: I'll remember that [03:05] isaacs: if the package specifies a "main" module, then you can just do require("mongo") and that'll work [03:05] PyroPete1 has joined the channel [03:05] glitterfang has joined the channel [03:05] isaacs: this was required to get away from the dirty magic [03:06] lakin: I'm all for moving away from magic [03:06] lakin: I guess I missed that part of the docs this time around [03:08] mscdex: JimBastard: what do you mean you couldn't get node-sfml to install right? [03:08] eee_c has joined the channel [03:08] JimBastard: mscdex: it just wont npm install [03:08] mike5w3c_ has joined the channel [03:08] mscdex: did you try building from the repo? [03:08] JimBastard: that was gonna be my next step [03:09] mscdex: maybe you're missing a dependency or something [03:09] JimBastard: did the npm install work for you? [03:09] mscdex: i had to make a couple modifications to the binding, then it compiled [03:09] mscdex: no, i used a copy of the repo [03:10] JimBastard: mscdex: do you know how to play wav files using open al ? :-D [03:10] mscdex: never dabbled in audio [03:10] themoa has joined the channel [03:11] mscdex: unless you include playing mp3s :p [03:11] JimBastard: i do [03:11] mscdex: ... in winamp [03:11] mscdex: :D [03:11] jgautier has joined the channel [03:12] mscdex: JimBastard: it looks like there's an example of playing a wav in test/test.js [03:12] mscdex: in node-sfml [03:12] JimBastard: maybe ill try adding it as a npm dep to another project and see it if installs that way [03:12] jgautier: is there anything *wrong* with using sys.inherits? [03:13] mscdex: jgautier: no [03:13] nornagon_ has joined the channel [03:13] mscdex: jgautier: just don't use it after you've already defined part of your prototype :) [03:13] jgautier: but i cant set additional functions on the prototype using a JSON object right? [03:14] jgautier: yeah so after i inherit and i add methods i have to do like [03:14] jgautier: object.prototype.newfunction= [03:14] jgautier: and not [03:14] jgautier: object.prototype={} [03:14] jgautier: ? [03:14] jgautier: right [03:14] mscdex: correct [03:14] rchavik has joined the channel [03:14] jgautier: ok....minorly annoying [03:14] jgautier: :P [03:14] jgautier: not that bad though [03:15] Aikar: jgautier: or use some mixin helper :p [03:15] mscdex: util.inherits changes the prototype, so doing foo.prototype = {}, you're basically undoing what inherits did [03:15] jgautier: yeah [03:15] jgautier: object.prototype should have a += :P [03:15] mscdex: well, you can do like Aikar suggestion [03:16] jgautier: yeah [03:16] mscdex: er suggested [03:16] isaacs: JimBastard: what's goin on? [03:16] jgautier: not a big deal when im making new object but i already hae this one made using object.prototype={} [03:16] Aikar: here ill write a snippet sec [03:16] isaacs: JimBastard: want some help? [03:16] mscdex: i actually prefer the other way really [03:16] mscdex: object.prototype.foo = [03:16] jgautier: yeah ill get in a habit of doing it that way now [03:17] JimBastard: isaacs: i was just seeing some really strange issue when trying to sudo npm install sfml, it was asking for my password again during the install and not accepting it [03:17] isaacs: odd [03:17] isaacs: what version of npm? [03:17] isaacs: < 0.3.9, i'm guessing [03:17] JimBastard: 0.3.9 [03:18] isaacs: oh, weird [03:18] JimBastard: i dont know what password it was looking for [03:18] muk_mb has joined the channel [03:18] Aikar: jgautier: https://gist.github.com/846891 this then Object.mixin(newclass.prototype, {foo: function(){}, bar: function(){}}); [03:18] jgautier: if im already in a callback is there any benefit of using EventEmitter? [03:19] jgautier: thanks Aikar ill take a look [03:21] isaacs: JimBastard: what's sfml? [03:22] thebard has joined the channel [03:22] isaacs: it's taking a *really* long time to download the sfml source [03:22] JimBastard: isaacs: thats the other problem too [03:22] JimBastard: lol [03:22] JimBastard: its bindings for open-al i think [03:22] isaacs: oh, holy hell, there's an svn repo in here. [03:23] isaacs: no wonder it's taking ages. [03:23] mscdex: heh [03:23] isaacs: why do people even use svn? it's so utterly terrible. [03:23] isaacs: it's like cvs, but they made the commands 10% less insane, and twice as slow. [03:23] mscdex: i just installed the libs from the distro repos [03:23] isaacs: talk about solving the wrong problem. [03:24] mscdex: isaacs: you've seen linus's git talk at google? [03:24] Aria: Because it has a hope in hell of tracking multiple file changes, and is otherwise easy. [03:24] isaacs: mscdex: yeah [03:24] isaacs: Aria: git can track multiple file changes [03:25] isaacs: Aria: git can track file renames [03:25] nornagon_ has joined the channel [03:25] Aria: Oh, well, yes. If git's an option, you should just use it. [03:25] zemanel_ has joined the channel [03:25] robotarmy has joined the channel [03:25] Aria: But svn is a path of least resistance from CVS. That's why people use it. It's centralized, and makes managers happy and is easy(ish) to set up. [03:26] isaacs: Aria: yeah, like i said, it makes cvs 10% less stupid, but at the cost of downloading 3 copies of everything, per branch or tag [03:26] Aria: yep! [03:26] Aria: If you download the whole repo, at least. [03:26] isaacs: cvs is actually a lot better, imo [03:26] Aria: ACTION cringes at the thought. [03:26] isaacs: you just have to read a lot more documnetation, and write more bash shortcuts [03:26] Aria: Until you need to merge anything. [03:26] Aria: Then you might as well go use git to do it. [03:26] mscdex: ACTION cringes at anything that's not distributed [03:26] mscdex: :p [03:27] Aria: And just commit the result of the merge done with git via CVS ;-) [03:27] tmzt: v8: Object.forEach({x:1, y:1}, function(o) { console.log(o) }); [03:27] v8bot: tmzt: TypeError: Object function Object() { [native code] } has no method 'forEach' [03:27] tmzt: v8: Array.forEach({x:1, y:1}, function(o) { console.log(o) }); [03:27] v8bot: tmzt: TypeError: Object function Array() { [native code] } has no method 'forEach' [03:27] tmzt: any way to do that in v8/chrome? [03:28] isaacs: tmzt: forEach is on arrays, not on the Array constructor [03:28] isaacs: v8: ;[1,2,3].forEach(function(o) { console.log(o) }) [03:28] v8bot: isaacs: CONSOLE: [1, 2, 3], OUTPUT: undefined [03:28] isaacs: v8: ;[1,2,3].forEach(function(o, i, list) { console.log(o, i, list) }) [03:29] v8bot: isaacs: CONSOLE: [1, 0, [1, 2, 3], 2, 1, [1, 2, 3], 3, 2, [1, 2, 3]], OUTPUT: undefined [03:29] tmzt: isaacs: can I use a prototype? [03:29] tmzt: with apply [03:29] mscdex: Object.keys({foo: 1, bar: 2}).forEach(function(x){console.log(x)}) [03:29] mscdex: that gets you the key names [03:29] tmzt: keys, there it is [03:29] tmzt: thanks [03:29] isaacs: v8: Array.prototype.forEach.call({0:1,1:2, 2:3, length:3}, function(o, i, list) { console.log(o, i, list) }) [03:29] v8bot: isaacs: CONSOLE: [1, 0, {"0": 1, "1": 2, "2": 3, "length": 3}, 2, 1, {"0": 1, "1": 2, "2": 3, "length": 3}, 3, 2, {"0": 1, "1": 2, "2": 3, "length": 3}], OUTPUT: undefined [03:30] mscdex: tmzt: https://github.com/joyent/node/wiki/ECMA-5-Mozilla-Features-Implemented-in-V8 [03:30] tmzt: a little confused by that second example [03:30] isaacs: JimBastard: so, after many minutes, it failed, because of various compile errors. [03:31] JimBastard: yeah.. [03:31] tmzt: but I think keys is what I wanted, thanks [03:31] sivy has joined the channel [03:31] isaacs: JimBastard: and also the cp is trying to cp something that doesn't exist. [03:31] isaacs: a lot of this stuff: ../src/NodeSFML.cc:665: error: ‘sf’ has not been declared [03:31] BillyBreen has joined the channel [03:31] tmzt: now to get mongo to print a nice list with id's [03:32] ako has joined the channel [03:32] JimBastard: any ideas? tmpvar swore he got it to build [03:32] mscdex: i got it built [03:32] mscdex: just had to make a few changes [03:32] mscdex: two errors related to Buffer changes and one had to do with ButtonClick [03:32] isaacs: Making SFML [03:32] isaacs: ld: unknown option: -soname [03:32] isaacs: collect2: ld returned 1 exit status [03:32] isaacs: make[2]: *** [libsfml-system.so] Error 1 [03:32] isaacs: make[1]: *** [sfml-system] Error 2 [03:32] isaacs: make: *** [sfml] Error 2 [03:32] isaacs: JimBastard: then it fails to find any of the cpp files [03:32] isaacs: maybe you have to install something else first. [03:33] mscdex: although, i've got sfml 1.5 installed [03:33] mscdex: maybe the ButtonClick thing is in newer versions [03:33] JimBastard: mscdex: you install sfml first [03:33] JimBastard: ? [03:33] mscdex: yeah [03:33] JimBastard: isaacs: is there something i can do to fix the installer? [03:33] mscdex: libsfml-* [03:33] mscdex: and its dependencies [03:33] isaacs: JimBastard: no idea. i don't even know what sfml is [03:34] _mql has joined the channel [03:34] isaacs: JimBastard: it's odd that it spends 10 minutes downloading source code, and then doesn't manage to get the deps in the right place. [03:34] isaacs: JimBastard: maybe wscript needs an obj.include_path = "..." or something? [03:34] isaacs: JimBastard: check out the build for node-glob [03:34] isaacs: (the wscript, that is) [03:35] mbrochh has joined the channel [03:35] mbrochh has joined the channel [03:36] Spion_ has joined the channel [03:36] JimBastard: isaacs: hrmmm [03:39] MikhX_ has joined the channel [03:39] mscdex has joined the channel [03:40] therrg has joined the channel [03:46] SubStack: a JimBastard! [03:46] dingomanatee has joined the channel [03:47] SubStack: ChrisPartridge: INDEED, ssh server is going to be such win [03:47] ryah: ssh server? [03:48] SubStack: node-ssh-server [03:48] SubStack: everything hookable [03:48] jgautier: is it possible to compare two buffers? [03:48] jgautier: see if they are equal [03:49] SubStack: v8: Buffer [03:49] v8bot: SubStack: ReferenceError: Buffer is not defined [03:49] SubStack: pesky [03:50] jgautier: convert them to strings and compare them? [03:51] SubStack: jgautier: function cmp (buf1, buf2) { return buf1.length === buf2.length && [].every.call(buf1, function (x,i) { return x === buf2[i] }) } [03:51] SubStack: :p [03:51] ChrisPartridge: SubStack: yes, can't wait to see what you come up with :) [03:52] SubStack: ChrisPartridge: I basically want it to be as easy to create an ssh server as it is to create an http server [03:52] jgautier: haha did you test that? [03:52] SubStack: jgautier: a few tests [03:52] SubStack: seems to work [03:52] jgautier: ok [03:52] SubStack: just wrote it and tested it in like 30 seconds [03:52] MikhX has joined the channel [03:53] SubStack: you could also write it the lame (and probably faster) way with `for` [03:53] SubStack: but pssh [03:54] jgautier: hahaha [03:54] SubStack: this way you can do it all in one line [03:55] SubStack: while abusing prototype resolution at the same time! [03:55] ChrisPartridge: you abuser, you [03:55] SubStack: ACTION can't help it [03:56] elliottcable has joined the channel [03:59] AAA_awright: SubStack: Why not buf1.toString()==buf2.toString() ? [03:59] ckoenig has joined the channel [03:59] SubStack: AAA_awright: stringification is scary [03:59] SubStack: base64 maybe [03:59] AAA_awright: Base64 certainly [04:00] AAA_awright: Of course two identical buffers will encode to utf8 the same, but will two utf8 strings encode back identically? i.e. is it isomorphic? [04:02] beawesomeinstead has joined the channel [04:03] tglines has joined the channel [04:04] meso has joined the channel [04:06] MikhX_ has joined the channel [04:07] daveluke has joined the channel [04:07] snover has joined the channel [04:09] snover: I’m using node 0.4.1 and trying to load a module that attempts to load another file relatively (down one path), but for some reason this relative load fails (strace shows it trying to stat “../_util.js” instead of the actual down-one-path location). Any thoughts or suggestions? [04:10] tglines: i know this is hackish but what happens if you say './../_util.js' ?? [04:11] snover: identical thing [04:11] snover: :\ [04:11] snover: I thought that myself and tried it first, actually :) [04:11] dthompson has joined the channel [04:12] tglines: haha nice ... idk [04:12] Evet: SubStack: module request: SIP server [04:12] Evet has joined the channel [04:12] snover: I wish I knew why this was so much of a problem :) [04:13] gravyrobber has joined the channel [04:13] zachsmith has joined the channel [04:13] Aria: Yeah, that's not how it's supposed to work. [04:16] snover: Aria: are you referring to my issue? [04:16] Aria: Yeah [04:17] snover: node bug, or I’m doing it wrong? [04:18] snover: Aria: ^ [04:19] Aria: Can't tell without context. [04:19] Aria: What paths are involved? [04:20] snover: right. so. [04:20] MikhX_ has joined the channel [04:21] ChrisPartridge: snover: pastebin/gist your code [04:22] snover: one sec. [04:25] ceej: is there a reason crypto.createHmac 'sha256', 'test' would give a blank object? [04:26] andrewfff has joined the channel [04:27] ceej: o wait key is the perm [04:27] ChrisPartridge: ceej: openssl installed? [04:27] ceej: yee [04:27] ceej: ChrisPartridge: http://php.net/manual/en/function.hash-hmac.php works fine [04:28] ChrisPartridge: ceej: It's not returning a hmac object? [04:28] mikeal has joined the channel [04:28] ceej: just {} [04:29] Evet: ryah: feature request: ios application packager [04:29] snover: ChrisPartridge Aria: https://gist.github.com/ec670867bfb70580390a [04:29] snover: sorry for the crappy paste [04:29] ChrisPartridge: ceej: What version of node? [04:29] SubStack: Evet: I've never even heard of SIP >_< [04:29] ceej: 0.4.0 [04:30] Evet: SubStack: signal-processing, voip stuff [04:30] Aria: So where is the _util.js ? [04:30] ryah: Evet: that's not quite my layer [04:30] snover: /app/js/lib/websocket-server/lib/_util.js [04:30] micheil: ohhh.. [04:30] micheil: erm [04:30] micheil: snover: if you're using node-websocket-server, please install it from npm, rather then vendoring it [04:31] Aria: And what is requiring it? [04:31] micheil: it'll be internal code to node-websocket-server [04:31] snover: /app/js/lib/websocket-server/lib/ws/server.js [04:31] micheil: it's a shim between util and sys [04:31] snover: https://github.com/miksago/node-websocket-server is the affected code [04:31] micheil: snover: yeah, I wrote the code. [04:31] Aria: Hey, ryah -- Any objections to splitting node::Start up for embedding purposes -- separate out the process setup, the debug setup, and the loop start and post-loop? [04:31] snover: micheil: ha, cheers :) [04:31] Aria: Or suggestions for embedding node cleanly? [04:32] micheil: Aria: perhaps talk to tim? [04:32] Evet: ryah: then feature request: libnodejs [04:32] MikhX__ has joined the channel [04:32] abraham has joined the channel [04:32] SubStack: require('node') [04:32] Aria: Evet: make dynamiclib [04:33] willwhite has joined the channel [04:33] micheil: SubStack: kinda meta isn't it? [04:33] SubStack: a bit! [04:34] Evet: Aria: static linking would be better for iphone [04:34] Aria: Evet: make staticlib [04:34] Evet: hrm [04:35] snover: The other thing of it is that I tried symlinking _util.js directly so that it wasn’t going down a level and it *still* didn’t try to load it from the path of the script that was requiring it [04:35] snover: it just tried to stat "_util.js" instead of "../_util.js" [04:36] micheil: if you replace "_util.js" with "sys" or "util" I think it'll work, not sure [04:37] micheil: that library is in need of a rewrite [04:37] micheil: however, the rewrite will only support -05, not -75 and -76 [04:38] ceej: so I'm using https://github.com/marak/node_hash [04:38] ceej: uses the built in crypto lib and it's still returns just {} [04:39] flow3r has joined the channel [04:41] rfay has joined the channel [04:41] langworthy has joined the channel [04:42] snover: micheil: that won’t help for lang/mixin, ../_events, ./manager, ./connection, etc. which are all getting loaded improperly somehow [04:43] micheil: it's because of module loading changes I think. [04:43] snover: I mean, I’m reading the 0.4 docs and it seems pretty clear that it’s not working how it is supposed to be working [04:43] micheil: and at the moment I can't exactly spend the time updating it yet, I'd recommend trying socket.io in the mean time. [04:43] snover: “A module prefixed with './' is relative to the file calling require().” [04:43] zorzar has joined the channel [04:44] micheil: snover: have you tried using it from npm, instead of vendoring it? [04:44] snover: I haven’t, no [04:44] micheil: try that. [04:46] snover: ok. mumble ;) [04:49] snover: socket.io has the same loading problems [04:50] snover: I remember giving up the first time I tried node because I couldn’t figure out why it wouldn’t load files [04:51] btipling has joined the channel [04:52] snover: also I’m not even sure I can install npm, node is just being run from a directory in /home [04:52] Adman65 has joined the channel [04:55] micheil: ryah: hmm.. I'm getting some really odd errors in the doctool at the moment [04:55] davidascher has joined the channel [04:55] micheil: I'm not requiring in the net.js module anywhere, yet an error is throwing from it [04:56] micheil: https://gist.github.com/846954 [04:58] saikat has joined the channel [04:59] gravyrobber has joined the channel [04:59] zemanel has joined the channel [04:59] snover: micheil: If I put the module in ~/.node_modules and then just require('websocket-server') it works fine :\\\ [04:59] micheil: yeah, that's how it was designed to work [04:59] softdrink has joined the channel [05:00] snover: what possible reason would there be for things to just not work unless they are in node_modules? [05:00] snover: why is node not resolving relative paths? [05:00] snover: unless it’s in node_modules and being loaded that way, in which case they work fine? [05:00] Iszak[Work]: snover, what are you banging on about? [05:00] snover: Iszak[Work]: relative paths not working correctly [05:00] Iszak[Work]: relative paths work fine. [05:01] Iszak[Work]: how are you using relative paths? [05:01] Emmanuel_ has joined the channel [05:01] Iszak[Work]: just require('./path/to/file.js'); ? [05:01] snover: without .js [05:01] Iszak[Work]: right, that's fine. [05:02] Iszak[Work]: try using __dirname [05:02] snover: require('./lib/foo/bar') and then lib/foo/bar.js has require('./blah'), it will fail to load blah.js [05:02] Iszak[Work]: __dirname + '/path/to/file' [05:02] snover: that’s great but they are 3rd party libraries that I can’t just modify willy-nilly like that [05:02] Iszak[Work]: even console.log __dirname [05:02] Iszak[Work]: no of course not, but just check if it's relative to what you think it is [05:03] Iszak[Work]: and you're using 0.4.1 I'm sure? [05:03] snover: well when I watch with strace, stat just tries to stat "blah.js" [05:03] snover: yeah, 0.4.1 [05:03] snover: and then it tries to stat through the root directory of requirejs [05:03] Iszak[Work]: snover, try with .js ? [05:03] snover: and then it fails [05:04] snover: but if I put it in ~/.node_modules then everything is hapy and it works fine [05:04] Iszak[Work]: yeah because that's in the include paths. [05:04] snover: I’d love to fuck with it more tonight but I can’t really :\ [05:04] snover: it’s late [05:04] Iszak[Work]: alright, sure. [05:04] Iszak[Work]: Another time I guess. [05:04] snover: this is, at least, exactly the same problem I had when I tried to get started with node back when it was still 0.1.x [05:05] Iszak[Work]: I've never had any problems with it [05:05] snover: I tried to load, like, ./lib/foo [05:05] Iszak[Work]: NEVER [05:05] snover: and it didn’t work [05:05] snover: Iszak[Work]: well I’ll send you a testcase or something sometime ;) [05:05] Iszak[Work]: well how about this [05:05] Iszak[Work]: tar it up and send it to me [05:05] Iszak[Work]: and I'll test it [05:06] Iszak[Work]: snover, whenever you're ready. [05:07] davidascher has joined the channel [05:07] snover: Iszak[Work]: not tonight, I need to go [05:07] snover: I put it on my to-do list though. [05:07] snover: good night! [05:07] Iszak[Work]: Night [05:07] snover has left the channel [05:08] ceej: is there an http://php.net/manual/en/function.implode.php function in node? [05:08] Aria: No. [05:08] Aria: If you're doing that, you're doing it wrong. [05:08] SubStack: ceej: it's called join [05:09] SubStack: like in sensible languages [05:09] SubStack: v8: ['a','b','cxd'].join(' => ') [05:09] v8bot: SubStack: "a => b => cxd" [05:09] ceej: ha stupid me.... that's what being up at 7am and going to bed at 3am for 2+ weeks does to your brain [05:09] razvandimescu has joined the channel [05:09] Aria: Oh. I was thinking of extract, not implode. [05:09] Aria: My PHP is getting rusty! Nice! [05:10] SubStack: v8: ['a','b','cxd'].join(' => ').split(' => ') // identify! [05:10] v8bot: SubStack: ["a", "b", "cxd"] [05:10] SubStack: *identity [05:10] SubStack: >_< [05:11] ceej: SubStack: for what I need I can actually do query_string= req.url.replace /.+\?/, '' :) [05:12] SubStack: ceej: careful, .+ is greedy [05:12] dingomanatee: Jourkey: thanks - I've revised the title. [05:12] SubStack: v8: 'foo/bar/baz?quux=quibble&moosy?zimble'.replace(/.+\?/, '') [05:12] v8bot: SubStack: "zimble" [05:12] SubStack: probably not what you want! [05:13] eyesUnclouded has joined the channel [05:13] ceej: SubStack: yeee should do [a-z\D]+ [05:13] SubStack: v8: 'foo/bar/baz?quux=quibble&moosy?zimble'.replace(/^.+?\?/, '') [05:13] v8bot: SubStack: "quux=quibble&moosy?zimble" [05:13] SubStack: ^^^ probably what you want [05:13] ceej: ah I get ya [05:13] AAA_awright: extract() is pretty evil though [05:13] SubStack: actually [05:13] Iszak[Work]: use [05:13] Iszak[Work]: v8: 'foo/bar/baz?quux=quibble&moosy?zimble'.replace(/^[^?]+?\?/, '') [05:13] v8bot: Iszak[Work]: "quux=quibble&moosy?zimble" [05:14] Iszak[Work]: v8: 'foo/bar/baz?quux=quibble&moosy?zimble'.replace(/^[^?]+\?/, '') [05:14] v8bot: Iszak[Work]: "quux=quibble&moosy?zimble" [05:14] Iszak[Work]: it's better [05:14] ceej: anyone got a goo album to keep me up working? [05:14] SubStack: probably should be [^?]* [05:14] Iszak[Work]: no [05:14] Iszak[Work]: because there'd always be http:// [05:14] Iszak[Work]: or some url beforei t [05:14] warz has joined the channel [05:15] ceej: not in this case [05:15] ceej: SubStack: ty [05:15] ceej: any music album suggestions? :P [05:15] Iszak[Work]: Ill Nino [05:15] dingomanatee: Men At Work::Business as Usual [05:17] ceej: Iszak[Work]: that'll definitely keep me up [05:17] Iszak[Work]: hells yeah [05:17] Lorentz: I prefer EPMD::Business as Usual [05:19] dingomanatee: Do you mean Strictly Business? [05:19] Lorentz: Strictly Business is awesome too [05:19] dingomanatee: Google Keepin It Real [05:19] MikhX has joined the channel [05:20] binaryjohn has joined the channel [05:20] dingomanatee: okay my bad [05:21] jakehow has joined the channel [05:26] rfay has joined the channel [05:26] bingomanatee has joined the channel [05:27] pyrony has joined the channel [05:27] colinsullivan has joined the channel [05:28] pyrony has left the channel [05:31] mre has joined the channel [05:36] AAA_awright: On my Ubuntu box (but not this Gentoo box) Node's `make` is giving me a python error, "ImportError: Bad magic number in /tools/jsmin.pyc" [05:36] Aria: Remove the pyc file and try again [05:36] MikhX has joined the channel [05:36] Aria: It's a compiled copy from an incompatible version of python [05:37] AAA_awright: Ah yeah, python symlinks to 2.7 [05:37] AAA_awright: (ugh why are we still using python) [05:38] eaton has joined the channel [05:38] Aria: Got a better alternative? That doesn't require compiling node first? [05:39] mr_daniel has joined the channel [05:42] AAA_awright: Well yeah it's a problem build systems universally suck. It's like there's some law or something. Like revision control systems before Git came along... [05:43] Aria: Build systems are like printers. [05:43] Aria: They're the interface between nice neat logical stuff and ugly reality. [05:43] Aria: And unfortunately, that predisposes us to think of them as being part of the nice neat logical stuff. [05:43] Aria: Which is NOT TRUE. [05:43] SubStack: PC LOAD LETTER [05:43] dingomanatee: are you talking about printer drivers or printer hardware? [05:43] AAA_awright: What's ugly about running "c++" with a few arguments? [05:44] Aria: AAA_awright: is that msvcc or gcc or clang? [05:44] Aria: AAA_awright: is that gcc-armv4-eabi or x86_64-gcc-linux? [05:44] AAA_awright: It's irrelevant [05:44] Aria: Why? they work entirely differently. [05:44] AAA_awright: We're talking about taking one form and converting it into another. The method of doing so may change but the functionality, the meaning, doesn't. [05:44] Aria: And one will spit out a tool you can run on the build host, and one will spit out a tool that will only run on another system. [05:45] dingomanatee: ACTION is just happy the node works (on Ubuntu) at all. [05:45] AAA_awright: I should be able to install semantics for msvc, gcc, icc, etc, and based on what the source code *does* and what I say I *want* it figures out how to call it all by itself. [05:45] SubStack: quick, somebody write node-c-compiler [05:46] AAA_awright: But no, build systems never thought of that idea [05:46] Aria: Good luck with that, AAA_awright. When you can decsribe all the things authors come up with wanting ... you'll be a god. [05:46] pyrony has joined the channel [05:46] Aria: (though I think it's possible to get the most cases.) [05:46] andrewfff has joined the channel [05:47] dingomanatee: Node will Apt-get install sooner or later. [05:47] AAA_awright: Aria: Well I think you've seen my semantic build system idea, here's more details about it [05:47] AAA_awright: *there are [05:50] Aria: Indeed. [05:50] Aria: I'm a fan. [05:50] Aria: Not sure that the source code should describe it completely, but I think that the source code should describe how its parts fit together. [05:50] Aria: Then a build script can specify what you want to get out of that wad of things that fit together. [05:52] gstrock has joined the channel [05:52] ryah: want build system [05:52] jb55: The best build system will be an AI that can reason about dependencies, compilers and environments :) [05:52] ryah: want to require('binding') and have it auto-compile binding.cc [05:53] ryah: binding.js contains build instructions [05:53] Aria: I'm not sure I want intelligence involved there, jb55. Considering how much humans make it complificated. [05:54] andrewfff has joined the channel [05:55] Lorentz: Then the AI realises it was made through an even more complex build system, goes into existential crisis from being born from such a thing, and deletes itself. [05:55] Lorentz: Salute to the poor AI that must build our code [05:55] gstrock: I got a blog running wheat on v0.2.6. I upgraded to 4.1 and wheat throws an error. Can anyone help? [05:56] SubStack: this is why friendly AI is so hard [05:56] SubStack: build systems [05:56] SubStack: biggest remaining hurdle [05:57] fR_ has joined the channel [05:57] Aria: ACTION laughs. [05:57] mjr_: gstrock: I don't think creationix has updated wheat for 0.4.x yet. [05:58] slickplaid has joined the channel [05:58] davidascher has joined the channel [05:59] zhware has joined the channel [05:59] Aikar has joined the channel [05:59] Aikar has joined the channel [06:01] mrkurt has joined the channel [06:01] amerine has joined the channel [06:02] dustinwhittle has joined the channel [06:03] gstrock: mjr: thanks. [06:04] arlolra has joined the channel [06:05] mikeal has joined the channel [06:06] EyePulp has joined the channel [06:10] w0rse_ has joined the channel [06:10] rfay has joined the channel [06:12] dingomanatee: mikeal: ping [06:12] mikeal: pong [06:14] dingomanatee: Hey I double booked the 22nd of March - are you available on the 23rd of march for the South Bay LAMP group? [06:15] mikeal: can i get back to you tomorrow on that? [06:15] dingomanatee: sure [06:16] dnolen has joined the channel [06:20] micheil: ryah: seriously, is the stdout module borked at the moment? [06:21] micheil: I keep getting an error coming from the net module saying "cannot read property 'length' of undefined" [06:30] Utkarsh has joined the channel [06:35] stonebranch has joined the channel [06:36] jankoprowski has joined the channel [06:38] utunga has joined the channel [06:40] jimt_ has joined the channel [06:40] andrewfff has joined the channel [06:41] meng has joined the channel [06:42] ryah: micheil: not that i know of [06:42] micheil: hmm.. okay [06:42] micheil: seems to be the new "undefined" error [06:43] ryah: you get a stack trace? [06:43] micheil: slowly weeding out errors and stray bugs in the parser [06:43] micheil: https://gist.github.com/846954 [06:43] micheil: says utterly nothing [06:44] SamuraiJack has joined the channel [06:45] jimt has joined the channel [06:45] dspree has joined the channel [06:45] dspree has joined the channel [06:48] meng has joined the channel [06:49] dguttman has joined the channel [06:50] razvandimescu has joined the channel [06:51] mengxy has joined the channel [06:52] mengxy has left the channel [06:54] dahankzter has joined the channel [06:54] utunga has joined the channel [06:56] robotarmy has joined the channel [06:59] mnot has joined the channel [06:59] Sebmaster has joined the channel [07:01] ryanfitz has joined the channel [07:01] Aria: Yarr. All the functions I want are either not exported or calls would have to be hacked into the middle of node::Start. [07:01] langworthy has joined the channel [07:03] andrewfff has joined the channel [07:05] abraham has joined the channel [07:05] cilantro has joined the channel [07:06] pau|c has joined the channel [07:07] __tosh has joined the channel [07:10] fumanchu187 has joined the channel [07:11] Iszak[Work] has joined the channel [07:12] torgeir has joined the channel [07:13] dnyy has joined the channel [07:13] astropirate has joined the channel [07:14] utunga has joined the channel [07:16] neshaug has joined the channel [07:28] therrg has joined the channel [07:30] lemonhall has joined the channel [07:32] w0rse has joined the channel [07:35] versificator: can one overload operators in node? [07:37] SubStack: versificator: s/node/v8/, and no [07:38] SubStack: versificator: you can always write your own language that compiles to javascript [07:39] groom has joined the channel [07:39] ph^ has joined the channel [07:40] aabt has joined the channel [07:40] Yuffster has joined the channel [07:43] seivan has joined the channel [07:45] zomgbie has joined the channel [07:46] hoodoos: SubStack, it's a popular subject.. that operator overload :) [07:46] andrewfff has joined the channel [07:46] loob2 has joined the channel [07:46] jesusabdullah: Sometimes I kinda wish it were possible [07:46] jesusabdullah: but it's not a dealbreaker for me [07:47] dingomanatee has joined the channel [07:47] Utkarsh_ has joined the channel [07:47] hoodoos: it's very tasty for business apps ans since nobody really do buisness login in node it's not yet there. And there's always coffee, which may support it [07:48] jesusabdullah: I think the one thing that makes me sad is that doing math stuff ends up with a lot of calls to Math functions [07:48] Jourkey has joined the channel [07:48] jesusabdullah: like, Math.pow(x,y) vs. x**y [07:48] jesusabdullah: but it's a minor point [07:48] Jourkey: what's the best async lib? [07:48] jesusabdullah: umm [07:48] SubStack: business apps? [07:48] mikeal1 has joined the channel [07:48] jesusabdullah: idk about the BEST (probably up to personal opinion), but SubStack's seq is popular enough [07:48] Aria: ... best ... async lib? Like ... libnode.so ? [07:49] hoodoos: ah, I'm used to Math.pow.. for me it's problem when I want to replace numbers in 500k of code with some object, I understand it's a lack of architecture, but still :) [07:49] jesusabdullah: if that's what you mean [07:49] Jourkey: yep, thanks [07:49] Jourkey: but what about step and async.js? [07:49] jesusabdullah: Huh [07:49] jesusabdullah: My feeling is that it depends on what you want [07:49] jesusabdullah: step is, iirc, relatively simple as compared to seq [07:49] SubStack: use seq if you know what you're doing and you like functional pipeline style [07:50] hoodoos: Jourkey, step is really nice one, very simple [07:50] SubStack: use step if you want something simple [07:50] jesusabdullah: Exactly [07:50] SubStack: if you don't like either of those, write your own! [07:50] jesusabdullah: and I don't remember re: async.js [07:50] Jourkey: ok, what's in seq that's not in step? [07:50] SubStack: Jourkey: concurrency limits, parallel maps, chainable error propagation [07:51] andrewfff has joined the channel [07:51] Jourkey: thank you veyr much :) [07:51] SubStack: stack modifiers [07:51] jesusabdullah: async.js looks like it uses yield. I didn't think javascript had yield. [07:51] SubStack: I wrote it for me so it has what I want [07:51] hoodoos: step should be based on seq :) [07:52] SubStack: writing your own flow control lib is fun times! [07:53] stephank has joined the channel [07:53] Jourkey: https://github.com/fjakobs/async.js [07:53] Jourkey: meant this one [07:53] hoodoos: like writing your non-blocking http server/client [07:53] hoodoos: always funny :) [07:53] SubStack: I never really *got* async.js :/ [07:54] jesusabdullah: Heh [07:55] jesusabdullah: I think that's really the biggest thing---whichever one has the API that jibes with your thoughtpatterns best, y'know? [07:55] SubStack: it's this bizarre mish-mash of promises with i/o primitives and parallel list functions [07:55] SubStack: it lacks focus [07:55] Jourkey: i think it's popular because of its name [07:57] jesusabdullah: Mayhaps [07:57] kieren has joined the channel [07:58] SubStack: I like how step/flowjs approach the problem [07:59] SubStack: but I got tired of checking `err` inside every call [07:59] SubStack: also I don't like how functions in a list look [08:00] ph^_ has joined the channel [08:01] mAritz has joined the channel [08:01] andrewfff has joined the channel [08:01] stonebranch has joined the channel [08:03] Lorentz has joined the channel [08:04] SamuraiJack_ has joined the channel [08:05] kal-EL_ has joined the channel [08:05] mraleph has joined the channel [08:10] hoodoos: SubStack, btw, your sample page on github misses some samples with error handling [08:11] nilcolor has joined the channel [08:11] SubStack: hoodoos: because it's implicit ;) [08:11] nilcolor: hello everybody! [08:12] pomodoro has joined the channel [08:12] jbpros has joined the channel [08:12] SubStack: so in most programs you don't actually need to write your own .catch() [08:12] SubStack: that's why I omitted a catch example on the readme [08:12] ivanfi has joined the channel [08:12] nilcolor: can some1 help me? Is it possible to use CLI tools from node.js? Say i'd like to use rtorrent... or transmission cli - is it possible? [08:13] SubStack: nilcolor: http://nodejs.org/docs/v0.4.1/api/all.html#child_process.spawn [08:13] nilcolor: SubStack: thanks [08:14] clarkfischer has joined the channel [08:15] msch has joined the channel [08:19] MikhX has joined the channel [08:19] fangel has joined the channel [08:19] xmilliard has joined the channel [08:19] cilantro has joined the channel [08:23] rex_fernando has joined the channel [08:25] floby has joined the channel [08:27] mr_daniel has joined the channel [08:27] jbpros has joined the channel [08:29] muhqu has joined the channel [08:30] venom00ut has joined the channel [08:33] Sebmaster has joined the channel [08:36] [AD]Turbo has joined the channel [08:38] Aria: Woot! https://github.com/joyent/node/pull/733 [08:38] Aria: Time to go to bed. [08:38] Aria: Night, all [08:38] gstrock: I had the wheat blogging software running on node 0.2.6. It wouldn't run on 0.3.7 or 0.4.1. I updated spark, which gets wheat running, then wheat wouldn't run at all. [08:39] [AD]Turbo: yo [08:39] gstrock: I finally got it working on 0.4.1, but I had to hard code a path to require('connect/utils') because it couldn't find it. [08:39] andrewfff has joined the channel [08:39] saikat_ has joined the channel [08:42] dingomanatee: 0.4 does have new policies for paths - the modules documentation covers that in detail. [08:45] pt_tr has joined the channel [08:45] gozala has joined the channel [08:46] darkredandyellow has joined the channel [08:46] jbpros has joined the channel [08:48] gstrock: I also had to comment out this line in prettify.js: window.console = console;, because I got this error:TypeError: Cannot set property console of # which has only a getter [08:48] utunga has joined the channel [08:49] Weltraumschaf has joined the channel [08:51] randallagordon has joined the channel [08:53] __tosh has joined the channel [08:54] tosh has joined the channel [08:59] daglees has joined the channel [08:59] seivan has joined the channel [09:00] msucan has joined the channel [09:03] seivan has joined the channel [09:03] nivoc has joined the channel [09:04] meso has joined the channel [09:08] seivan has joined the channel [09:10] aklt has joined the channel [09:11] ngw has joined the channel [09:12] ntelford has joined the channel [09:12] ngw: hi * [09:13] ngw: what library/framework would you suggest for an HTTP web service ? [09:13] ngw: with node.js of course [09:13] Sebmaster: express [09:13] SubStack: not enough information [09:14] markwubben has joined the channel [09:15] ngw: this web service doesn't have any view but generates HTML files that need to be uploaded on S3 [09:16] Ond: Then you don't need a web service do you [09:16] julienXX has joined the channel [09:17] ngw: I actually do, I need to schedule jobs and have a ping back when it's over [09:17] ngw: and of course I don't want it to block the main app while it's doing the hard work [09:19] hwinkel has joined the channel [09:20] davidc_ has joined the channel [09:21] jimt has joined the channel [09:23] ngw has left the channel [09:23] galaxywatcher has joined the channel [09:24] Pesch has joined the channel [09:25] gozala has joined the channel [09:26] SubStack: gozala: hey I know you from npmtop! [09:26] eirikurn has joined the channel [09:26] gozala: Hi SubStack [09:26] gozala: Actually I'm not sorry :( [09:27] SubStack: not sorry what? [09:27] gozala: But tell me maybe I can help [09:27] SubStack: oh hah [09:28] SubStack: (not, sorry), but I parsed it as (not sorry) [09:28] gozala: Maybe I misunderstood [09:28] gozala: Opps yeah have to use punctuation :) [09:29] gozala: Anyway, I think you wanted something, no ? [09:30] SubStack: I just commented that I recognize your handle from npmtop, a program I wrote that ranks npm contributions [09:30] SubStack: anyhow! [09:31] gozala: Wow cool [09:31] gozala: :) [09:32] gozala: Did not knew about npmtop [09:32] gozala: ;) [09:32] gozala: Don't know how I got to the top 3 :) [09:32] SubStack: 25 packages is how! [09:35] emattias has joined the channel [09:36] andrewfff has joined the channel [09:36] mlins has joined the channel [09:38] q_no has joined the channel [09:40] muhqu_ has joined the channel [09:42] dans_ has joined the channel [09:44] nivoc has joined the channel [09:46] mbrochh has joined the channel [09:48] wilmoore has joined the channel [09:51] kristsk has joined the channel [09:51] davidc_ has joined the channel [09:51] kristsk` has joined the channel [09:54] [ADTurbo] has joined the channel [09:55] bzinger has joined the channel [09:56] markwubben has joined the channel [09:56] sveimac has joined the channel [10:00] saikat has joined the channel [10:00] Utkarsh has joined the channel [10:03] teemow has joined the channel [10:04] Tobias| has joined the channel [10:04] meso has joined the channel [10:05] [AD]Turbo has joined the channel [10:05] dk_ has joined the channel [10:06] dk_: hello [10:10] SamuraiJack__ has joined the channel [10:12] Ond: Greetz [10:12] mkopras has joined the channel [10:12] Sebmaster has joined the channel [10:13] FireFly|n900 has joined the channel [10:14] seivan: :( [10:14] seivan: everytime I move from node to obj-c I miss node and functional programming [10:14] seivan: At least I got blocks in OBJ-C [10:16] [AD]Turbo: I updated nodejs to 0.4.1 (from 0.2.6) and all modules (mongodb-native); I get this error: Error: Cannot find module 'mongodb/connection' [10:17] [AD]Turbo: var mongoConnection = require('mongodb/connection'); <-- in order to access to mongoConnection.Connection.DEFAULT_PORT; [10:17] breccan has joined the channel [10:17] [AD]Turbo: any idea? [10:20] jetienne has joined the channel [10:23] dk_: I usually do this "var Connection = require('mongodb').Connection;" [10:23] Gent has joined the channel [10:24] Gent: Is there a site with a list of free node.js apps? [10:24] [AD]Turbo: dk_ I will try it [10:24] [AD]Turbo: thx [10:24] MrTopf has joined the channel [10:24] dk_: like apps implemented in node.js? [10:24] Gent: yeah [10:24] Gent: like that you can download and run [10:25] dk_: maybe try this https://github.com/joyent/node/wiki/Projects,-Applications,-and-Companies-Using-Node [10:26] [AD]Turbo: dk_, many thanks, with your "syntax" it works :) [10:28] dk_: [AD]Turbo awesome! [10:28] mcahornsirup has joined the channel [10:30] ximo has joined the channel [10:30] dk_: Anyone know how to set a timeout for an http.get ? [10:30] nook has joined the channel [10:30] unomi has joined the channel [10:32] cloudhead: anyone get socket hang ups on 0.4.1? [10:34] snearch has joined the channel [10:35] ChrisPartridge has joined the channel [10:51] unomi has joined the channel [10:57] teemow has joined the channel [11:03] fly-away has joined the channel [11:06] mlins_ has joined the channel [11:08] xmilliard has joined the channel [11:13] vandenoever has joined the channel [11:16] seivan has joined the channel [11:19] vyvea has joined the channel [11:22] lemonhall_ has joined the channel [11:22] lemonhall_ has left the channel [11:22] tbassetto has joined the channel [11:23] seivan: Hmm [11:23] seivan: Is 1000 gb traffic enough? [11:24] prof-freud has joined the channel [11:28] malkomalko has joined the channel [11:29] ph^ has joined the channel [11:32] Gent: enough for what? [11:32] [AD]Turbo: i have a 2d index over a 'pos' field that is an array [longitude, latitude] (e.g. pos: [12, 44]) [11:32] [AD]Turbo: geo location queries seems to work very well, but how if I have to "select" just one field? eg. db.Markets.find( { pos[0]: { $gt: 12 } } ) ? this syntax seems to not work [11:33] Gent has left the channel [11:38] d0k has joined the channel [11:39] fermion has joined the channel [11:40] okuryu has joined the channel [11:42] seivan: Hmm [11:42] seivan: For a TCP server, serving 200k users [11:42] seivan: how much bandwith should I expect if all I send is like [12, 3232, 233] [11:42] seivan: ugh [11:42] seivan: I know that question is stupid [11:42] seivan: but just trying to get an estimate [11:47] tktiddle has joined the channel [11:48] malkomalko has joined the channel [11:49] seivan: Regarding node, if I want to keep roughly 50-60k connections on a server, how much ram should I roll with? [11:49] xla has joined the channel [11:49] adambeynon has joined the channel [11:49] Sorella has joined the channel [11:51] daveluke has joined the channel [11:52] riven` has joined the channel [11:52] huang47 has joined the channel [11:53] piscisaureus has joined the channel [11:54] seivan: Also anyone know how to benchmark socket servers? [11:55] riven has joined the channel [11:59] jetienne: if you got 200k user you dont need to get a single server [12:00] seivan: Nah I know [12:00] seivan: multiple servers [12:00] seivan: but right now I am trying to figure out how much traffic... [12:01] riven has joined the channel [12:01] riven has joined the channel [12:11] eee_c has joined the channel [12:11] nivoc1 has joined the channel [12:13] mike5w3c has joined the channel [12:15] eee_c has joined the channel [12:15] glitterfang has joined the channel [12:17] emattias has joined the channel [12:20] Dreamer3 has joined the channel [12:21] iszak has joined the channel [12:24] charlenopires has joined the channel [12:27] kwik101 has joined the channel [12:27] indutny has joined the channel [12:28] indutny: hey everyone! [12:28] kwik101: hey [12:28] indutny: ryah: around? [12:28] kwik101: idntnw [12:28] indutny: ryah: I'm trying to use position arguments in fs.read and fs.write [12:29] indutny: ryah: but b/c of int32 limit in javascript, I can't use it for large files (Over 1G) [12:29] SubStack: ryah has a real job and it's 04:30 PST so I doubt he's around [12:29] indutny: ryah: probably we can use something like {hi: , lo: } ? [12:29] indutny: oh [12:29] indutny: SubStack: thanks [12:30] SubStack: speaking of which, what am I doing up at this hour... [12:30] indutny: SubStack: was that discussed anywhere around? [12:30] kwik101: SubStack: are you using mongoosejs? [12:30] indutny: SubStack: I mean fs.read position argument limitation [12:30] Determinist has joined the channel [12:30] SubStack: http://nodejs.org/docs/v0.4.1/api/all.html#fs.createReadStream [12:31] SubStack: you can pass start and end in the options [12:31] aabt has joined the channel [12:31] SubStack: oh! [12:31] indutny: SubStack: so? [12:31] SubStack: 32 bits >_< [12:31] indutny: SubStack: yep [12:31] SubStack: yeah that sounds hard [12:31] indutny: SubStack: why not use {hi: ..., lo: ...} [12:32] indutny: as position [12:32] SubStack: why not paint the bike shed purple? [12:33] SubStack: actually ints in javascript are actually floats so [12:33] indutny: yep [12:33] Ond: Damn a pretty good joke could be made here. [12:33] SubStack: 2^53 ought to be enough for anyone [12:33] indutny: but how will you use float number as position ? :D [12:33] indutny: lol [12:33] jetienne has left the channel [12:34] indutny: 2gb +/- 10mb [12:34] jetienne has joined the channel [12:34] indutny: yep ? :) [12:34] indutny: and [12:34] indutny: GET_OFFSET(a) (a)->IsInt32() ? (a)->IntegerValue() : -1; [12:34] indutny: is converting from Int32 value [12:34] indutny: not floating [12:34] indutny: it's from src/node_file.cc [12:35] eee_c has joined the channel [12:35] indutny: https://github.com/joyent/node/blob/master/src/node_file.cc#L643 [12:35] indutny: btw, is there any B+ tree module for node.js? [12:35] jetienne: indutny: i guess this is compiled with 32b file offset [12:37] indutny: jetienne: so probably fs.seek() should be available [12:37] indutny: so we'll be able to do multiple seeks [12:37] jetienne: as node.js api you mean ? [12:38] jetienne: Local <- what is this Local everywhere ? what does it mean [12:38] SubStack: indutny: npm -s ls btree says nothing found [12:38] SubStack: write one! [12:39] indutny: SubStack: done [12:39] indutny: :D [12:39] indutny: SubStack: append-only b+ tree [12:40] jetienne: is there a istty in node ? [12:40] SubStack: jetienne: http://nodejs.org/docs/v0.4.1/api/all.html#tty.isatty [12:41] hoodoos has joined the channel [12:41] indutny1 has joined the channel [12:44] jetienne: SubStack: thx [12:44] xandrews has joined the channel [12:45] jetienne: i got a stream and i would like the matching fd, any body got this one ? [12:45] stonebranch has joined the channel [12:47] SubStack: jetienne: with some streams you can just do stream.fd [12:47] SubStack: at least, once the fd is created [12:47] SubStack: like this: [12:48] SubStack: > var s = require('fs').createReadStream('./index.js'); s.on('fd', function () { console.log('fd = ' + fd + ', s.fd = ' + s.fd) }) [12:48] jetienne: ? [12:48] SubStack: oh wait! [12:48] jetienne: SubStack: according to the doc, this fd is for interprocess [12:48] SubStack: ah [12:48] SubStack: would explain why fd is null [12:49] jetienne: http://nodejs.org/docs/v0.4.1/api/all.html#event_fd_ [12:49] jetienne: :) [12:49] SubStack: anyhow I should be finishing this keyx manager [12:49] SubStack: managing cryptographic keys outside of openssl is not actually very hard [12:50] SubStack: just takes forever reading the rfcs to figure out what they're on about [12:52] mlins has joined the channel [12:53] devrim has joined the channel [12:55] SubStack: wheeeeee [12:56] indutny1: haha [12:56] indutny1: SubStack: congrats [12:56] SubStack: congrats about what? [12:56] Twelve-60 has joined the channel [12:57] hwinkel has joined the channel [12:57] SubStack: throwing off the shackles of openssh? [12:57] SubStack: fuckin' thing sucks I'll rewrite it in node.js and we'll do it live! [12:58] SubStack: soon I'll have a nifty key parser/packer lib to go with my bigint stuff [12:58] SubStack: I've already got the generator figured out for dss at least [12:58] matyr has joined the channel [12:58] SubStack: and then I can just use the crypto module for signing [12:59] lgl has joined the channel [12:59] SubStack: I don't even want to think about certs yet though >_< [13:01] eee_c has joined the channel [13:05] eee_c1 has joined the channel [13:06] xastey` has joined the channel [13:10] maushu has joined the channel [13:11] maushu: So, what happened with Joyent? [13:11] frodenius: what you mean, happened? [13:12] SubStack: the thing on HN? [13:13] fairwinds has joined the channel [13:14] huang47 has left the channel [13:15] maushu: SubStack: Yup. [13:16] ocrampal has joined the channel [13:16] antris has joined the channel [13:17] matclayton has joined the channel [13:19] antris: what are the names of django-like node frameworks other than djangode? [13:19] SubStack: now to write some tests [13:19] maushu: At least there are some interesting points in that thread. [13:19] maushu: Like the fact that shared hosting is already squeezed. [13:20] ocrampal has joined the channel [13:20] razvandimescu has joined the channel [13:22] seivan: antris: Go for Express, it looks good, except it's routing sorta sucks. [13:22] seivan: hmm [13:23] SubStack: you can always write your own routing middleware [13:23] seivan: Any got any numbers on open TCP connections with specification on server and bandwith? [13:23] seivan: Btw how is the ram consumption on a node server with let say 60k open connections? [13:24] gozala has joined the channel [13:25] Druid_ has joined the channel [13:25] jetienne: anybody knows a npm package with native extensions ? [13:27] jmar777 has joined the channel [13:27] indutny1: jetienne: nTPL [13:27] jetienne: thanks [13:28] eyesUnclouded has joined the channel [13:28] jetienne: OSError: [Errno 2] No such file or directory: '/cygdrive/d/fedor/github/nTPL/build' <- this one doesnt compile on linux [13:28] jetienne: indutny1: any other ? :) [13:30] kwik101 has joined the channel [13:31] jetienne: oh wait this is likely me missing nodewaf options [13:33] jetienne: ok i dont get node-waf :) [13:35] lukegalea_ has joined the channel [13:35] BrianTheCoder has joined the channel [13:35] aphelion has joined the channel [13:36] vyvea has joined the channel [13:37] Vertice has joined the channel [13:37] razvandimescu has joined the channel [13:39] pauls has joined the channel [13:40] zemanel has joined the channel [13:40] killfill_ has joined the channel [13:41] pastak has joined the channel [13:45] jetienne has left the channel [13:45] killfill has joined the channel [13:46] unomi has joined the channel [13:49] kriszyp has joined the channel [13:50] Emmanuel_ has joined the channel [13:51] jankoprowski has joined the channel [13:51] SubStack: wow dsa is awesome, just turn up L to turn up the crypto strength [13:52] killfill has joined the channel [13:52] silbion has joined the channel [13:52] mike5w3c has joined the channel [13:52] hellp has joined the channel [13:54] cnu has joined the channel [13:55] ianward has joined the channel [13:56] xandrews has joined the channel [13:56] Throlkim has joined the channel [14:01] mbrochh has joined the channel [14:01] mbrochh has joined the channel [14:03] coobr has joined the channel [14:05] niklasfi has joined the channel [14:05] jlecker has joined the channel [14:05] niklasfi has left the channel [14:06] pandeiro has joined the channel [14:07] svenlito_ has joined the channel [14:09] lukegalea_ has joined the channel [14:10] dazld has joined the channel [14:10] argb has joined the channel [14:11] dazld: hey, i was just reading about node frameworks [14:11] dazld: but the article was from june 2010 [14:11] dsirijus has joined the channel [14:11] dazld: is there a more recent roundup..? [14:11] SubStack: ancient history! [14:11] dazld: truly :) [14:12] dazld: i was really just looking for a simple mvc style framework to get something up and running quickly [14:12] SubStack: bwahaha check out the awesomely sexy tests https://github.com/substack/node-keyx/blob/master/key.js [14:12] SubStack: erm [14:12] SubStack: https://github.com/substack/node-keyx/blob/master/test/keys.js [14:12] antris: seivan: and the template system, too :) [14:12] antris: i know express [14:12] SubStack: generates a dss key, renders it to ssh2 and openssh, and then parses them back to ensure the identity hooray! [14:13] antris: i just think it sucks [14:13] zachsmith has joined the channel [14:13] mike5w3c has joined the channel [14:13] antris: MTV > MVC :) [14:13] dazld: ;) [14:14] SubStack: I want my MVC [14:14] antris: mvc is horrible for web apps [14:14] dazld: i dunno, i only had issues with the URL stuff [14:14] dazld: the rest seemed to make sense [14:14] dazld: and active record [14:14] SubStack: *cue dire straits* [14:14] dazld: which is horrible [14:15] dazld: but - been using YUI3 a lot recently [14:15] dazld: so was hoping to find something which was similar in structure [14:16] liquidproof has joined the channel [14:16] SubStack: I should make anarchy.js [14:16] SubStack: MVC without the C [14:16] prettyrobots has joined the channel [14:17] FireFly|n900 has joined the channel [14:20] aphelion has joined the channel [14:20] aphelion has joined the channel [14:23] zemanel has joined the channel [14:24] boaz has joined the channel [14:24] saschagehlich has joined the channel [14:24] willwhite has joined the channel [14:25] ncb000gt has joined the channel [14:26] dylang has joined the channel [14:26] Poetro has joined the channel [14:27] boaz has joined the channel [14:27] dazld: while node is running, is there a shortcut to reload, or do you have to kill it then restart? [14:28] saschagehlich: dazld: you have to restart it, but you could also use my "hotnode" script: http://github.com/saschagehlich/hotnode [14:28] boaz has left the channel [14:28] saschagehlich: it watches .js files and as soon as they change it kills the node process and starts a new one [14:28] trotter has joined the channel [14:28] dazld: neat :) [14:28] boaz has joined the channel [14:30] jetienne has joined the channel [14:30] dazld: that's really cool [14:30] dazld: does it monitor dependencies too? [14:30] brapse has joined the channel [14:30] dazld: saschagehlich: [14:31] saschagehlich: dazld: it watches all files that are in subfolders of your node script [14:31] dazld: perfect, ty :) [14:31] amacleod has joined the channel [14:31] hij1nx has joined the channel [14:35] dylang has joined the channel [14:36] sivy has joined the channel [14:37] eee_c has joined the channel [14:37] floby has joined the channel [14:38] stepheneb has joined the channel [14:39] GasbaKid has joined the channel [14:42] hunterloftis has joined the channel [14:42] zomgbie has joined the channel [14:43] prof-freud has joined the channel [14:43] hunterloftis has joined the channel [14:44] pauls has joined the channel [14:44] mlncn has joined the channel [14:46] dyer has joined the channel [14:46] stepheneb has joined the channel [14:46] jetienne: mape: you run a npm website no ? has it an api to search ? [14:47] ncb000gt: jetienne: http://npm.mape.me/ [14:47] ncb000gt: jetienne: there is also the npm search page too [14:47] ncb000gt: search.npmjs.org [14:48] davidsklar has joined the channel [14:49] jetienne: ncb000gt: thanks. using debugger to see if it got api :) [14:49] ncb000gt: :) [14:52] mscdex: i don't think mape's npm site updates anymore [14:52] ddollar has joined the channel [14:52] FireFly|n900 has joined the channel [14:55] Determinist has joined the channel [14:56] jetienne: all i want is a rest api to search npm database. where can i find that ? [14:58] jetienne: http://registry.npmjs.org/-/jsonp/callback?callback=callback ok mape get the whole npm database in the browser. and handle it there [14:58] ajashton has joined the channel [14:59] mraleph has joined the channel [14:59] jetienne: 5sec to get it [15:00] tracker1 has joined the channel [15:01] sirkitree has joined the channel [15:02] c4milo has joined the channel [15:02] sivy has joined the channel [15:03] ncb000gt: jetienne: take a look at search.npmjs.org [15:03] jetienne: ncb000gt: i tried but this is a couch app... they do call i dont get [15:03] [AD]Turbo has joined the channel [15:03] jetienne: ncb000gt: even the source i dont get [15:04] jetienne: https://github.com/isaacs/npmjs.org/tree/master/www [15:04] ncb000gt: jetienne: they are just making requests to couchdb [15:04] zachsmith_ has joined the channel [15:05] lakin has joined the channel [15:06] ncb000gt: jetienne: there is a function in there called "fetch" which looks like it makes a request to "request" which actually makes the calls [15:06] arpegius has joined the channel [15:07] pauls has joined the channel [15:07] bentruyman has joined the channel [15:07] jetienne: in there ? where more precisely ? [15:08] ncb000gt: jetienne: https://github.com/isaacs/npmjs.org/blob/master/www/attachments/site.js#L568 [15:08] ncb000gt: there are things that call fetch with callbacks [15:08] ncb000gt: but those aren't the meat [15:08] mike5w3c_ has joined the channel [15:09] jetienne: https://github.com/isaacs/npmjs.org/blob/master/www/attachments/site.js#L16 <- request is just a wrapper on jquery ajax [15:09] jetienne: the key is the url. but i think firebug is helped [15:09] jetienne: helping [15:09] ncb000gt: jetienne: but you'll want your url to be something like [15:09] ncb000gt: bleh, wont let me past [15:09] ncb000gt: paste* [15:09] ncb000gt: jetienne: https://github.com/isaacs/npmjs.org/blob/master/www/attachments/site.js#L584 [15:10] ncb000gt: the url should be something like that line [15:10] jetienne: ok [15:10] jetienne: curl "http://search.npmjs.org/_view/updated?descending=true&limit=15&include_docs=true" | jsonpretty | less [15:10] jetienne: this gives the "updated" seen on left column [15:10] Dreamer3 has joined the channel [15:11] jimt has joined the channel [15:11] ncb000gt: jetienne: http://search.npmjs.org/api/_all_docs?include_docs=true&limit=100&skip=0 [15:11] jetienne: http://search.npmjs.org/_view/search?startkey=%22prout%22&endkey=%22proutZZZZZZZZZZZZZZZZZZZ%22&reduce=false [15:11] DoNaLd`: plz. some sophisticated nodejs module for generate PDF ? (except PDF.JS or jsPDF) [15:12] jetienne: ncb000gt: this all_docs provide everything [15:12] ncb000gt: DoNaLd`: what? [15:12] ncb000gt: jetienne: yea, but you should be able to skip with limits [15:12] ncb000gt: they are using pagination in their to limit the result set [15:12] jetienne: http://search.npmjs.org/_view/search?startkey=%22prout%22&endkey=%22proutZZZZZZZZZZZZZZZZZZZ%22&reduce=false <- yep but this one is already doing search [15:12] jetienne: ncb000gt: this was me searching "prout" [15:13] ncb000gt: ok [15:13] jetienne: ncb000gt: any idea what are those startkey? endkey ? [15:13] jetienne: and the ZZZ ? [15:13] ncb000gt: they are the keys within couchdb [15:13] thebard has joined the channel [15:13] ncb000gt: no idea about the zzzzz [15:13] ncb000gt: bit [15:13] dahankzter has joined the channel [15:13] ncb000gt: seems like a convention to me [15:13] DoNaLd`: ncb000gt: i need generate PDF from my nodejs app .. but i need also some extra features, which are not implemented into PDF.jS .. to example, rotate text, color text, load image etc. [15:13] ncb000gt: but i could be wrong there [15:13] lukegalea has joined the channel [15:14] [[zz]] has joined the channel [15:14] ncb000gt: DoNaLd`: i only know of pdf.js [15:14] DoNaLd`: ncb000gt: i also only pdf.js [15:14] ncb000gt: DoNaLd`: you might be able to contact the maintainer and ask for those features to be implemented [15:14] jetienne: ncb000gt: thx btw :) [15:14] ncb000gt: jetienne: np [15:16] jimt has joined the channel [15:16] sonnym has joined the channel [15:16] jetienne: https://github.com/isaacs/npmjs.org/blob/master/www/attachments/site.js#L276 , endkey: JSON.stringify(term+'ZZZZZZZZZZZZZZZZZZZ') that simple :) [15:16] kkaefer: any intelligence on how far express is away from a 2.0 release? [15:17] ncb000gt: kkaefer: last i hear it was "real soon now" [15:17] ncb000gt: :) [15:17] jetienne: he was doing connect 1.0 recently [15:17] Evet has joined the channel [15:19] jeromegn: Have any of you guys been experimenting a high rate of lost connections with socket.io? [15:19] jeromegn: *exeriencing [15:19] Tom-Tomaso has joined the channel [15:19] jeromegn: *experiencing [15:20] BillyBreen has joined the channel [15:20] dazld: saschagehlich: hotnode is really superb, thanks for this [15:21] dazld: it's a great thing :) [15:21] jetienne: jeromegn: nope, it seems to work well here [15:21] jeromegn: alright, I must be doing something wrong somewhere... [15:22] FireFly|n900 has joined the channel [15:22] dylang has joined the channel [15:22] jeromegn: seems to be stable atm [15:22] jeromegn: mm [15:24] saschagehlich: dazld: np, thank you :) [15:25] jmar777: sorry this is late, but regarding the endkey= term + 'ZZZZZ' bit, that's a way to basically search for term*, assuming that terms are always alpha/numeric [15:25] jmar777: jetienne: oops, that was for you ^^ [15:26] staliv has joined the channel [15:26] jmar777: jetienne: that startkey/endkey combination would match term, termFoo, termBar, termZ, etc. [15:27] jetienne: jmar777: ok thanks. do you have an url when i could learn this ? [15:27] tc77 has joined the channel [15:27] indutny1 has left the channel [15:28] jmar777: jetienne: since he seems to be using CouchDB, i'd look here: http://wiki.apache.org/couchdb/HTTP_view_API#Querying_Options [15:28] jetienne: jmar777: perfect! thanks [15:28] jmar777: jetienne: np [15:29] flow3r has left the channel [15:30] flippyhead_ has joined the channel [15:30] jbpros has joined the channel [15:30] erabuj has joined the channel [15:31] losing has joined the channel [15:33] bradleymeck has joined the channel [15:34] lakin has joined the channel [15:35] Aikar: < antris> mvc is horrible for web apps [15:36] saschagehlich: Aikar: why? [15:36] Aikar: no, its really not. the CONCEPT of MVC is fine. now you may say how some implementations are done are horrible [15:36] Aikar: saschagehlich: he said that not me [15:36] Aikar: i was responding [15:36] saschagehlich: ah okay [15:36] Aikar: the point of MVC is to provide a seperation of the different aspects of your code [15:36] Aikar: which is something that is great to do for webapps [15:36] saschagehlich: definitely [15:36] Aikar: how you implement the pattern is up to you [15:37] Tom-Tomaso has joined the channel [15:37] Aikar: saying mvc is bad is essentially saying "you should mix all your db presentation and logic all in 1 file" [15:37] kristsk`: separation of aspects is fine. but mvc-as-taken-from-java just is insane for web [15:37] saschagehlich: spaghetti code, yay [15:37] Aikar: yeah like i said 'implementation wise' can be bad :P [15:37] jetienne: backbone.js seems nice [15:37] Aikar: the concept itself of seperation is the main point of mvc [15:38] aheckmann has joined the channel [15:38] jmar777: i do think there's room for improvement in that space for making real-time (i.e., socket/streaming/feeding) style applications easier to build [15:39] Aikar: in node if your using a template engine, which you are unless your a masochist and enjoy building concatenated strings of html, your already doing the VC portion of MVC [15:40] nook has joined the channel [15:40] Aikar: jmar777: the code to do so is so trivial in node, literally can be written from the ground up in under an hour [15:41] Aikar: load express, load socket.io, setup express, attach socket io, handle a connection on socket.io, call socket.broadcast to push data [15:42] jmar777: if that's all you're doing, yes. but trying to get good code reuse between authorizing/formatting/routing/etc. between static responses, and streaming responses can be a little difficult [15:42] dazld: routing is complex [15:42] ceej has joined the channel [15:42] Aikar: what your application does and what a library provides should be 2 diff things [15:42] dazld: and standard mvc routing without using custom paths is pretty hideous [15:42] dazld: like, cake, ci, etc etc [15:43] jmar777: Aikar: just saying that doing one or the either is trivial, because most frameworks seem to favor one or the other. but mixing them together becomes more of an architectural challenge [15:43] dazld: it works but its ugly [15:43] hornairs has joined the channel [15:43] dazld: and it doesnt associate what your page actually represents with the address [15:43] dazld: which is crap for seo [15:43] dazld: and for usability [15:43] dazld: also why you'd want to expose application logic in the address bar is beyond me ;) [15:43] dazld: [15:44] dazld: final point, consider multilanguage sites [15:44] Aikar: RESTful URL's and MVC get mixed up way too much [15:44] jmar777: Aikar++ [15:44] v8bot: jmar777 has given a beer to Aikar. Aikar now has 1 beers. [15:44] Aikar: MVC is a code layout pattern, having urls that map to classes is writing a controller that parses RESTful URL's [15:44] jmar777: Aikar: that's very true. MVC makes it easy to do "clean urls", which is 90% of what people understand about REST (pardon the over generalization). pet peeve of mine... [15:45] Aikar: can still use MVC and use /?page=blah&id=322 type url's [15:45] dazld: those are horrible too ;) [15:45] dazld: im thinking mainly about translations [15:45] Aikar: i know, my point was that /foo/bar/baz type urls are not a definition of MVC ;) [15:45] tktiddle: Aikar: is nodejs a mvc framework? just reading your earlier convo [15:45] jmar777: as much as it almost hurts to admit, you can even do REST with urls like that too [15:46] warz has joined the channel [15:46] jmar777: tktiddle: no. it's much lower level than an architectural style like that [15:46] pandeiro has joined the channel [15:46] Aikar: tktiddle: no, you could do res.write('... ;( [16:16] Me1000 has joined the channel [16:16] Aikar: but yeah at work i run Geany/Gedit and Aptana. I load up Geany/Gedit (whichever i seem to click first, but Geany is better) for when i need to act fast and aptana is doing its slow indexing crap [16:16] Aikar: geany is a decent lightweight ide [16:17] zzak: redcar is good i hear and works on all platforms [16:17] ncb000gt: *cough* VIM *cough* [16:17] Aikar: but nowhere close on features [16:18] Aikar: id really like to see some platform add support for commonjs project types [16:18] Aikar: i added a ticket to Aptana for it but no response :( [16:19] jmar777: haven't seen redcar before. looks interesting [16:20] briznad has joined the channel [16:20] snover: I added a ticket to get Komodo to update their code completion to use jsdoc v2 tags and they did it in a release :) [16:20] Aikar: there really is no 'perfect ide', not even VIM :P but i wish there was one ;( [16:20] floby has joined the channel [16:20] jetienne: snover: fill bugs to include node.js api ? [16:21] snover: komodo has vi emulation? ;) [16:21] pyrony_ has joined the channel [16:21] jmar777: snover: what's new in jsdoc v2? [16:21] bradleymeck: is there a (s)ftp module somewhere [16:21] jmar777: snover: last time i was looking around it seemed that scriptdoc was better at the time [16:21] jasong_at_apache has joined the channel [16:22] snover: jetienne: http://bugs.activestate.com/show_bug.cgi?id=88863 [16:22] fumanchu182 has joined the channel [16:23] jetienne: snover: nice :) [16:23] snover: reported by one of the activestate dudes themselves [16:25] davidascher has joined the channel [16:25] TomTomaso has joined the channel [16:27] Aikar: snover: the shebang should be a seperate ticket :P i opened one on aptana last night about that. [16:27] snover: Aikar: WELL IT IS ALREADY FIXED ALREADY :) [16:28] bingomanatee has joined the channel [16:28] Aikar: if komodo ide gets commonjs support then i def will be giving it a strong try [16:28] Aikar: i havent really tried komodo, hmm [16:28] Aikar: i guess its due for its turn [16:28] lgl has joined the channel [16:29] Aikar: does the licensing permit use on multiple computers, ie work home laptop? [16:29] snover: Aikar: Komodo Edit is free [16:29] snover: and open source [16:29] snover: Komodo IDE is their paid product [16:29] snover: which I assume has an extremely fair license [16:30] Aikar: yeah i meant the ide one, i dont mind paying if its a solid product, but not gonna pay multiple times just for diff devices [16:30] versificator: ok sorry for the silly question but does http://www.mozilla.org/js/language/js20-2000-07/index.html have anything to do with modern javascript syntax (in this case v8)? thanks. [16:30] wilmoore has joined the channel [16:30] Aikar: like ultraedit has the bullshit diff license per OS scheme, but i bitched enoug hat them they gave me a free key after i switched to ubuntu off windows finally lol [16:31] bradleymeck: versificator no [16:31] Aikar: if i pay for software, i expect to be able to use it on my computers, no matter device or OS [16:31] versificator: bradleymeck: sweet. thanks. i have no idea what that spec is for then [16:32] dthompson has joined the channel [16:32] bradleymeck: it was an idea for where to take the language that never really caught momentum, es5/harmony is bigger now [16:33] dahankzter has joined the channel [16:33] Aikar: really wish we could get some the newer JS 1.8 stuff in node :( [16:34] jetienne has left the channel [16:34] jmar777: Aikar: some of it is: https://github.com/joyent/node/wiki/ECMA-5-Mozilla-Features-Implemented-in-V8 [16:34] Aikar: yeah i know that [16:34] Aikar: but like [foo,bar] = baz(); would be nice [16:34] Aikar: and let [16:35] bradleymeck: i want array comprehensions/generators :( [16:35] jmar777: definitely - would enable some cool stuff [16:35] Aikar: bradleymeck: im unfamiliar with that, got link? [16:35] mraleph: I want Haskell instead of JavaScript. [16:35] bradleymeck: https://developer.mozilla.org/en/new_in_javascript_1.8 [16:35] Aikar: oh i read this page so i prolly did see it [16:36] bradleymeck: mraleph if haskell looked readable sure [16:36] Aikar: ooo i didnt see that expression closures [16:36] mraleph: for everything else you can just implement JavaScript 1.8 => ECMAScript 5 compiler [16:36] mraleph: like a piece of cake. [16:36] tjholowaychuk has joined the channel [16:37] snover has left the channel [16:37] mraleph: it's pretty readable. but you need a couple of PhDs to write it... [16:37] bradleymeck: lol [16:38] mraleph: I have none so I dropped it to the floor and sometimes return back to kick it. [16:38] mraleph: but it is so cool :-) much cooler than JS. [16:38] bradleymeck: i think its too all encompasing [16:39] hij1nx has joined the channel [16:39] bradleymeck: then again it has a lot of high level stuff i wish we had XD [16:39] Aikar: bradleymeck: hmm yeah that kind of stuff can be useful [16:39] sprout has joined the channel [16:40] robotarmy has joined the channel [16:40] fangel has joined the channel [16:41] Aikar: a typical class definition scheme that still implements the same workflow of prototypal inheritance would be nice too. ie class foo extends bar { baz:f(){} } being equiv to foo.prototype.__proto__ = bar.prototype; foo.prototype.baz = f(){}; [16:41] Aikar: would rock [16:42] bradleymeck: bleh i would avoid the term class [16:42] eresair has joined the channel [16:42] jmar777: we very nearly had a class keyword: http://blog.jeremymartin.name/2008/03/web-20-meet-javascript-20.html [16:43] jmar777: that blog post also happens to be one of my epic failures in predicting the future of JS [16:43] herbySk has joined the channel [16:44] dahankzter has joined the channel [16:45] ekes: var sys = require('sys'); sys.extends(foo, bar); is almost as readable. [16:45] jmar777: ekes: .inherits? [16:45] ekes: sorry yes [16:46] ekes: ACTION still wrapping head round  [16:46] jmar777: ekes: get used to it :) [16:49] robotarm_ has joined the channel [16:51] bradleymeck: ACTION wonders what the wtfs/minute for avg node.js user is [16:51] halfhalo: 6000000 [16:52] davidwalsh has joined the channel [16:52] eirikur has joined the channel [16:53] pekim has joined the channel [16:54] ntelford has joined the channel [16:57] mAritz: i have updated to v4 and npm 0.3.7. now i have noticed that there are modules i need that don't have v4 support. what's the best way to downgrade? (npm and node since npm 0.3.x doesn't support node 0.2.x anymore) [16:57] tjholowaychuk: mAritz: I had to roll back to an old npm [16:57] tjholowaychuk: for now [16:59] walkah has joined the channel [16:59] mAritz: tjholowaychuk: how did you do it? uninstall and reinstall? :/ [16:59] tjholowaychuk: mAritz: from the repo [16:59] Gregor: mraleph: (Response to a response from days ago :P ) I have a test environment where I set ulimit -v to prevent test programs from going crazy ... unfortunately, although v8 is surely capable of functioning in the 256MB I allow, it doesn't seem to be willing to restrict itself to it ... I suspect it's being too clever about detecting how much memory is "available", while not being clever enough to check resource limits. Unfortunately your solution didn't seem to [16:59] Gregor: make it work. [16:59] tjholowaychuk: or maybe $ npm install npm@n.n.n [17:00] astralab has joined the channel [17:00] mraleph: Gregor: does not work? hmm [17:01] nivoc has joined the channel [17:01] astralab has joined the channel [17:01] mraleph: Gregor: what happens if you do --max-old-space-size=128 ? [17:02] Gregor: I maxed it all the way down to 32, and got the same error. One sec, I'll repro and give you the message. [17:02] amerine has joined the channel [17:03] Venom_X_ has joined the channel [17:04] Gregor: mraleph: FATAL ERROR: v8::Context::New() V8 is no longer usable [17:04] mraleph: that means out-of-memory happened. [17:04] mraleph: and V8 died [17:05] mraleph: probably your application requires more then 32 Mb of heap to run. [17:05] JojoBoss has joined the channel [17:05] Gregor: My program right now is console.log("Hello, world!"); [17:05] Gregor: And won't run with --max_old_space_size=2048 [17:06] Gregor: If "Hello, world!" needs 2 gigs, we're in trouble. [17:06] pyrony_ has joined the channel [17:06] rfay has joined the channel [17:08] mraleph: hmm [17:08] Aikar: hello world is complicated shit man [17:09] mraleph: this is very. let me try to compile node locally and see how it plays with --max-old-space-size [17:09] mraleph: btw what version of node you are using? [17:09] mike5w3c has joined the channel [17:10] Pesch has joined the channel [17:11] mraleph: Gregor: ^^^^^ [17:11] Dreamer3 has joined the channel [17:12] nivoc has joined the channel [17:13] brapse has joined the channel [17:13] Jonasbn_ has joined the channel [17:13] dnolen has joined the channel [17:15] jmar777: is there anything in the works for v8 on raising the max heap size? [17:16] mraleph: there is a branch gc/experimental that does not have any heap limit [17:16] mraleph: argh. experimental/gc [17:16] mraleph: but I personally think that if you what more than 1gc JS heap you are probably doing something wrong. [17:17] mraleph: *if you want [17:18] colinsullivan has joined the channel [17:18] mraleph: Gregor: I just tested ./node --max-old-space-size=32 benchmark/http_simple.js --- works perfectly fine. [17:18] bluesnoop has joined the channel [17:18] jmar777: mraleph: could be true. haven't personally run into anything, but could be useful for in-memory caching solutions [17:19] ajnasz has joined the channel [17:20] ryanfitz has joined the channel [17:21] dguttman has joined the channel [17:22] mraleph: Gregor: If you use very old node you will probably have to use 32000000 instead of 32 because some time ago it was in bytes instead of Mb. [17:22] rednul has joined the channel [17:23] mraleph: jmar777: the problem here is that for large heaps you need completely different GC. [17:23] meso has joined the channel [17:24] tktiddle has joined the channel [17:24] jmar777: mraleph: true. though better than most, i wouldn't quite say that the current solution is perfect for server side solutions either though. [17:24] jdalton has joined the channel [17:27] robotarmy has joined the channel [17:28] tanepiper: ACTION keeps reading --max-old-space-size as --max-old-spice-size [17:29] zachsmith_ has joined the channel [17:29] Dreamer3 has joined the channel [17:32] broofa has joined the channel [17:32] springmeyer has joined the channel [17:33] perezd has joined the channel [17:35] floby has joined the channel [17:36] mAritz: tjholowaychuk: i tried installing npm@0.2.18 and then downgrading node, now npm is broken and i don't have some modules registered anymore. xD [17:36] mAritz: maybe i did something wrong though, trying again [17:36] erabuj has joined the channel [17:36] sprout has joined the channel [17:36] astoon has joined the channel [17:37] tjholowaychuk: mAritz: dunno i just did the repo route [17:37] Aria has joined the channel [17:38] KurokiKaze has joined the channel [17:38] KurokiKaze: hi all [17:39] mraleph: KurokiKaze: \o/ [17:44] isaacs has joined the channel [17:44] davidascher has joined the channel [17:45] isaacs: npm install cookies [17:45] isaacs: this is awesome^ [17:45] darkredandyellow has joined the channel [17:45] felixge has joined the channel [17:45] felixge has joined the channel [17:45] stagas has joined the channel [17:46] felixge: ryah: ping [17:46] aconran has joined the channel [17:46] venom00ut has joined the channel [17:46] davidc_ has joined the channel [17:46] langworthy has joined the channel [17:47] ryah: felixge: pong [17:47] felixge: ryah: I was wondering if you saw this yet? https://github.com/joyent/node/pull/727 [17:47] felixge: there might be other places where this kind of patch is needed as well [17:47] felixge: but I ran into it with dns [17:48] steffkes has joined the channel [17:48] noahcampbell has joined the channel [17:48] Dreamer3 has joined the channel [17:49] zylo has joined the channel [17:50] Sebmaster has joined the channel [17:51] yozgrahame has joined the channel [17:51] couchquid has joined the channel [17:52] Kingdutch has joined the channel [17:53] ryah: felixge: oh, great [17:53] ryah: thanks [17:55] CIA-39: node: 03Felix Geisendörfer 07v0.4 * r0304f1f 10/ (src/node_cares.cc test/simple/test-http-dns-fail.js): [17:55] CIA-39: node: Expose errno with a string for dns/cares [17:55] CIA-39: node: This is to mirror the behavior introduced in [17:55] CIA-39: node: aa95e5708f240810cd434911cf029f5ee70047d8. [17:55] CIA-39: node: Closes GH-727. - http://bit.ly/g1KcNj [17:55] malkomalko has joined the channel [17:57] felixge: ryah: thanks for merging [17:58] mjr_ has joined the channel [17:58] liar has joined the channel [17:59] bentruyman has joined the channel [17:59] qFox has joined the channel [18:00] zemanel has joined the channel [18:01] colinclark has joined the channel [18:01] Gregor: mraleph: Argh, sure enough, my development computer has a new Node but the system that runs the tests has an ancient one. 32 bytes is PROBABLY not enough memory to do much with :P [18:02] mikeal has joined the channel [18:02] Dreamer3 has joined the channel [18:04] strmpnk has joined the channel [18:04] q_no has joined the channel [18:04] Gregor: mraleph: Hmm, never mind, that only got me one error further. With ulimit -v on in the testing environment I get FATAL ERROR: v8::Debug::SetDebugMessageDispatchHandler V8 is no longer usable [18:05] mraleph: well that still looks like out of memory to me :-) [18:05] utunga has joined the channel [18:06] mr_daniel has joined the channel [18:06] Gregor: Looks like out of memory to me too, but why? -v 256MB with --max_old_space_size=32 shouldn't even come close. [18:06] pifantastic_ has joined the channel [18:06] felixge: mraleph: I was talking to piscisaureus a while ago about my speed issues with node-mysql, and he mentioned it might be a problem with the fast-api-call stuff in v8? [18:07] xerothermic has joined the channel [18:07] felixge: What happened is the buffer.toString() is really slow in my real-world benchmark, and if I take it out everything is blazing fast. But if I benchmark buffer.toString() in a simple loop, it's very fast, so fast that it can't possibly cause the slowdown I see in my realworld test [18:07] Aikar: obviously your world is fake! lol [18:07] mraleph: Gregor: is it still console.log? maybe do a --trace-gc to see heap size. [18:08] mraleph: felixge: hmm. strange. [18:08] felixge: so I was wondering if there is any reason why JS -> C++ call would be much faster when executed in a loop repeatedly [18:08] felixge: or if it shouldn't matter how much JS / C++ is executed in between [18:08] Gregor: mr_daniel: Yeah. --trace-gc does nothing different, doesn't seem to even get that far. [18:08] mraleph: if you share your benchmarks I will take a look. [18:08] Gregor: Erm [18:08] Aikar: felixge: remember there is alot of v8 optimization done on compile time [18:08] Gregor: mraleph: Thing I said to mr_daniel (sorry) :P [18:09] felixge: mraleph: Thanks, I'll ping you at some point. Just wanted to make sure the is no V8 JS -> C++ magic that would explain this right away. [18:10] Aikar: man, HR offered me a 1000$ bonus for referral. anyone an 'above junior' PHP dev who can move to raleigh nc real quick and say your local? ;) [18:10] Aikar: (my boss doesnt wanna relocate someone he isnt sure is perfect for job) [18:10] mraleph: Gregor: oh. btw. does it (simple console.log("aaa")) work when you don't specify anything (like no --max-bla-bla)? [18:11] Gregor: mraleph: Not under ulimit -v [18:12] stride: where the heck is raleigh? :D [18:12] mraleph: Gregor: ah. we should have started from this :-) [18:13] abraham has joined the channel [18:13] mraleph: Gregor: are you running 64bit or 32bit node? [18:13] Gregor: 64-bit [18:13] Gregor: mraleph: Sorry, I just assumed that it was trying to overallocate beyond my -v limit, and that restricting it would prevent that ... [18:13] mraleph: argh. it probably fails to reserve codespace chunk [18:14] isaacs: if you get fed up with the github issues website, i hacked this up over the weekend: http://izs.no.de/joyent/node [18:14] isaacs: de-ajaxed [18:14] mraleph: so on x64 V8 tries to reserve 2gb of virtual space for future use [18:14] isaacs: remember when you just had html and you'd click a link and then you'd see a different page with a different url and it'd make another web request? wasn't that rad? [18:15] Chris_Biscardi has joined the channel [18:15] Gregor: mraleph: FYI, the failing call to mmap is trying to allocate 512MB [18:15] pomodoro has joined the channel [18:15] mraleph: hmm. [18:15] mraleph: I don't remember anything like that. [18:15] mraleph: do you have stack trace? [18:15] floby has joined the channel [18:16] Kingdutch: npm wont upgrade :O [18:16] Gregor: mraleph: No, just an strace. Not sure where to break for a stacktrace ... [18:16] isaacs: Kingdutch: from which version? [18:16] Kingdutch: 0.2.14-6 [18:16] BrianTheCoder_ has joined the channel [18:16] Kingdutch: (pretty heavily outdated) [18:16] Kingdutch: on node0.5.0-pre [18:16] Kingdutch: github issues search is down but I can pastebin you the log [18:16] ossareh has joined the channel [18:17] mraleph: Gregor: let me just grep through all the sources [18:17] vnguyen has joined the channel [18:17] Kingdutch: isaacs: http://pastebin.com/x16p4F0n [18:17] dguttman has joined the channel [18:18] isaacs: Kingdutch: try just doing the curl|sh trick [18:18] isaacs: Kingdutch: curl http://npmjs.org/install.sh | sh [18:18] Kingdutch: The ah uh what? [18:18] Kingdutch: Ah ok [18:18] isaacs: or download the file and read it, and when you trust it, run it, or do the things it contians [18:18] Kingdutch: It worked [18:18] isaacs: hooray! [18:18] Kingdutch: Yeh I've seen it before ;) I trust it [18:20] pyrony has joined the channel [18:20] phidelta has joined the channel [18:20] mraleph: Gregor: yeah. it's code range as I said before. it does not try to commit 2gb it starts from 512 mb [18:21] mraleph: Gregor: you have to edit file deps/v8/src/heap.cc. find code_range_size_ and fix it. [18:22] mraleph: Gregor: unfortunately it's not configurable. [18:22] pyrony has joined the channel [18:22] Gregor: mraleph: A special-case fix isn't too bad, I only need it to run in this configuration on one machine :P [18:23] Kingdutch: isaacs: Does your ncurses lib work with node0.5? [18:23] isaacs: Kingdutch: not my ncurses lib [18:23] isaacs: Kingdutch: i mean, the ncurses lib isn't mine [18:23] pyrony has joined the channel [18:23] Kingdutch: then mcsdex's lib :') [18:23] Kingdutch: mscdex* [18:23] isaacs: Kingdutch: yeah, i dont' know. don't use it [18:23] isaacs: i don't use it [18:23] Kingdutch: Hmm [18:24] Gregor: mraleph: That fixed it, thanks! :) [18:24] pyrony has joined the channel [18:24] Tom-Tomaso has joined the channel [18:24] mraleph: you are welcome. just do not make it too small :-) [18:25] Gregor: I made it 0 like it is on the other platforms, I assumed that means "don't preallocate" ... [18:25] mraleph: oh. this is not going to work well on x64 [18:25] Gregor: Define "well" :P [18:26] Gregor: I don't care about speed for running these tests, just correctness. [18:26] mraleph: code range is not needed on ia32. it sole purpose it to guarantee that offset from every code object to every other code object fits into 32-bits. [18:26] mraleph: on x64 this does not hold. [18:26] pyrony has joined the channel [18:26] Gregor: Ahhhhhhhhhhhhhh hmmmmmmmmm. [18:26] Gregor: OK, I'll see if I can make it 32MB then. [18:27] mraleph: that's why we reserve some continuous space and use it for subsequent allocations of code. [18:28] pedrobelo has joined the channel [18:28] EyePulp has joined the channel [18:29] isaacs: ashb: hey [18:29] zcopley has joined the channel [18:29] mjijackson has joined the channel [18:30] Gregor: mraleph: OK, still seems to work with 32MB code size ... that should at least tide me over for a while. Thanks again. [18:31] zcopley: Question about node's event loop: does it use native threads? In other words, is the I/O happening in a multi-threaded way? [18:31] isaacs: zcopley: yes. io happens on the thread pool [18:31] isaacs: zcopley: but *only* io is threaded [18:32] isaacs: zcopley: so, your code is only running in one thread. you never have to worry about anything "breaking in" [18:32] zcopley: Gotcha. But it's not doing something like cooperative multi-tasking for I/O, right? [18:33] ngs has joined the channel [18:33] Kingdutch: isaacs: My only problem is being unable to exit some examples =/ [18:33] bingomanatee has joined the channel [18:34] zcopley: isaacs: Thanks. [18:34] isaacs: zcopley: no. [18:34] malkomalko: anybody use cluster with session stuff set? I'm seeing some weirdness after upgrading to cluster and using multiple node processes.. it looks like my sessions are getting crossed [18:34] isaacs: zcopley: there's a "fibers" lib out there that does that [18:35] malkomalko: before a request I'll find the current user via req.session.auth.user.id, but every once in a while it looks as though people are seeing a different users session [18:35] isaacs: malkomalko: where are you keeping your session info? [18:35] malkomalko: has anybody bumped up to something like this before? [18:35] malkomalko: mongodb [18:35] isaacs: malkomalko: oh, ok. dunno [18:36] tjholowaychuk: malkomalko: multiple should not influence it at all [18:36] tjholowaychuk: unless you use the mem store [18:38] sprout has joined the channel [18:39] kawaz_home has joined the channel [18:40] malkomalko: hmm, damn, ok thanks [18:42] jstritar has joined the channel [18:42] nejucomo has joined the channel [18:42] kylefox has joined the channel [18:42] lukegalea has joined the channel [18:43] jmar777: tjholowaychuk: would a cluster plugin be able to "get involved" in the right places to route based on session id (for the sake of in memory session)? [18:43] jmar777: tjholowaychuk: or is that all at the mercy of the available fd's? [18:44] stephank has joined the channel [18:44] tjholowaychuk: jmar777: meh. no one should use the memory store in production [18:44] tjholowaychuk: its only really useful for a test env [18:44] tjholowaychuk: sometimes dev, but not really since you lose the session on restart [18:44] dustinwhittle has joined the channel [18:44] perlmonkey2 has joined the channel [18:45] jmar777: tjholowaychuk: gotcha. so for testing/dev, would you recommend just using one process then? [18:46] tjholowaychuk: jmar777: well its fine to use more if you are not using the mem store. I would typically still dev with at least 2 workers so that you can make sure you do not rely on weird module state [18:46] tjholowaychuk: the mem store leaks less in connect 1.0 [18:46] tjholowaychuk: but [18:46] tjholowaychuk: still not worth using [18:46] jmar777: tjholowaychuk: aight. thanks [18:48] patcito has joined the channel [18:48] jimt has joined the channel [18:49] apoc has joined the channel [18:50] nivoc has joined the channel [18:51] pifantastic_ has joined the channel [18:52] pavelz_ has joined the channel [18:53] nivoc has joined the channel [18:53] mkrecny has joined the channel [18:55] langworthy has joined the channel [18:56] thomsonit has joined the channel [18:57] jetienne has joined the channel [18:58] kiddphunk has joined the channel [18:59] perezd has joined the channel [19:01] prettyrobots has joined the channel [19:04] raidfive has joined the channel [19:06] MikhX has joined the channel [19:07] sh1mmer has joined the channel [19:07] Dreamer3 has joined the channel [19:09] Country has joined the channel [19:09] insin has joined the channel [19:14] jamesarosen has joined the channel [19:14] technoweenie has joined the channel [19:14] tim_smart: Anyone looking for work in the Bay area? [19:14] tim_smart: (node.js work) [19:15] bingomanatee has joined the channel [19:15] micheil has joined the channel [19:16] warz: i want to move there, if that counts [19:16] tim_smart: warz: Are you in the US? [19:17] warz: yup [19:17] micheil: tim_smart: that's kinda useful :) [19:17] tim_smart: micheil: Yeah it helps, visa's aren't easy to get ;) [19:18] micheil: exactly. [19:18] jetienne: tim_smart: gimme a visa and i come :) [19:18] tim_smart: jetienne: Haha I wish. [19:19] warz: ive been debating just taking an extended "vacation" out there, for about 3 months or so, until my $10,000 runs out. [19:19] gozala has joined the channel [19:19] warz: networking, etc. [19:20] CIA-39: node: 03Ryan Dahl 07v0.4 * ra14bb04 10/ src/node_stdio.cc : [19:20] CIA-39: node: tty.setWindowSize should use the correct function [19:20] CIA-39: node: Thanks to Matthew Woolman - http://bit.ly/iavYam [19:20] jakehow has joined the channel [19:21] daveluke has joined the channel [19:21] zomgbie has joined the channel [19:21] utunga has joined the channel [19:22] hwinkel has joined the channel [19:22] saikat has joined the channel [19:23] stonecobra has joined the channel [19:24] bingomanatee: warz: where do you want to vactation? [19:24] matclayton has left the channel [19:25] francescop has joined the channel [19:25] francescop has left the channel [19:26] marteau has joined the channel [19:27] apoc has joined the channel [19:27] peeps[work] has joined the channel [19:28] marteau: i'm looking for a way to determine max connections supported by node, and to extend that limit if possible. can someone point me to a reference link? [19:28] bingomanatee: what kind of connections? [19:28] marteau: tcp, sometimes http [19:28] Aikar: http is a tcp connection :p [19:29] marteau: thanks. but sometimes it's tcp without the http protocol on top of it. [19:29] tbranyen: ryah: you need to do a talk in boston soon! [19:30] bingomanatee: Have you tried brute-force testing it? [19:30] bingomanatee: put a very long setTimeout in the recipient HTTP request handler and counting the connections? [19:30] marteau: was going to be my first route, but i wouldn't know where to go to push it up after hitting a limit. [19:31] Aikar: yeah but its still not a diff connection type lol. # of connections depends on what your doing on said connections. so would have to improve a specific task of a connection, or if you think you can improve the underlying aspects of tcp connections in node [19:31] hoodoos: Aikar, he's talking about tcp connections :) [19:32] Kryckan has joined the channel [19:32] bingomanatee: I've seen demos of hundreds of connections. [19:32] Kryckan has left the channel [19:33] marteau: i've seen references in other conversation suggesting that 65536 is an upper limit for connections, and i'm looking for something that will push up to the 1Meg as a limit. [19:33] brianmcd has joined the channel [19:33] jetienne: grumble i hate you node [19:34] technoweenie has joined the channel [19:34] nivoc has joined the channel [19:34] jetienne: now i have to code the http follows redirection [19:34] Aikar: marteau: thats due to the kernel i believe, i dont think you can fix that [19:34] Aikar: marteau: i think the kernel assigns an outbound port to connections, and since theres only 64k ports it runs out [19:35] bingomanatee: Keep an eye on http://groups.google.com/group/nodejs-dev/browse_thread/thread/3d23fc57b7ba5f66 - I posted your question to node dev [19:35] marteau: hmm. ok, i guess i'll start with some testing to see how far it'll push. i figured that as an open source project there was a chance that there was an int somewhere that could be hacked to be a long... [19:36] bingomanatee: I suspect if you are expecting 10k size loads you are better off using normal load balancing at that point. [19:36] marteau: my assumption was that i could fan out traffic over multiple instances if necessary, but haveing the least number of instances is still a goal. [19:37] bingomanatee: I don't know your budget but personally if I were engineering this system I would engineer it such that no one server is expected to manage more than 5k connections with load balancing. [19:37] jamesarosen has joined the channel [19:37] bingomanatee: Sure fair enough. Like, er, one. [19:37] marteau: why 5K, as a particular number? [19:37] bingomanatee: pulling it out of my ass. [19:37] marteau: ok :) done that too... [19:37] Fuu` has joined the channel [19:37] Aikar: im hoping were still talking about numbers here and not other things [19:38] marteau: ick [19:38] bingomanatee: Its just a gut feeling that given each connection is likely to be interacting with a database and those would probably want to mirror as well, that that is about the amount of traffic I would personally look at scaling. But we will see what emerges on the node dev mail group. [19:38] lukegalea: marteau: I have some no node experience with this... maybe I can help. [19:39] technoweenie has joined the channel [19:39] ashb: isaacs: hey. whats up? [19:39] lukegalea: there's the 65k max.. but I think you can get around that by having multiple interfaces.. [19:39] isaacs: ashb: hey, i just posted the issue on evilstreak/markdown-js [19:39] lukegalea: it's 65k/interface, not 65k / machine. [19:39] isaacs: ashb: no more overlay in npm 0.3 [19:39] marteau: lukegalea: I'll take all the help i can get. [19:39] lukegalea: so you could have eth0 through to eth25 and it would have a huge number of ports.. [19:40] Aikar: ideally you should design your app to support horizontal scaling and if on a cloud based environment you can monitor load and spawn up new instances as load sees fit [19:40] marteau: aha! so, (dumbass mode on) how do i imploment multiple interfaces? [19:40] lukus has joined the channel [19:40] lukegalea: how are you hosting? [19:40] Aikar: marteau: you need multiple IP's assigned to server [19:40] CIA-39: node: 03Ryan Dahl 07v0.4 * r6442cbe 10/ (67 files in 8 dirs): Upgrade V8 to 3.1.7 - http://bit.ly/gi3tcu [19:40] CIA-39: node: 03Bert Belder 07v0.4 * r4a34692 10/ (deps/v8/SConstruct deps/v8/src/SConscript): [19:40] CIA-39: node: Autodetect no-strict-aliasing, propagate toolchain option to SCons [19:40] CIA-39: node: BUG=v8:884 - http://bit.ly/eQWR5h [19:40] Aikar: then you configure the network for each IP [19:40] Aikar: then server.listen(8080, '12.34.56.78') to bind to a specific interface [19:41] lukegalea: also, you need to look at ephemeral port range [19:41] Aikar: lukegalea: will the OS auto distribute outbound connections over all interfaces? [19:41] marteau: right now pure test mode on a pair of laptops. tryint to use small message push of control messages (brief) to a large nmber of devices. [19:41] Aikar: ie if bound to all [19:41] marteau: simulating devices on one lt. [19:41] strmpnk has joined the channel [19:41] bradleymeck has joined the channel [19:42] lukegalea: Aikar: I'm not sure.. that's a good question. If you were talking inbound connections I would just load balance across the IPs so you wouldn't have to worry, but for outbound I'm pretty sure you'd need to manage that yourself and make sure you distribute it across the interfaces. [19:42] hornairs has joined the channel [19:42] marteau: lukegalea: this looks very interesting. thanks very much. this could buy me a whole lot of connections without multiple instances of the server. [19:43] teemow has joined the channel [19:43] lukegalea: re: ephemeral ports, you can set how much of the port space should be available for short lived ports.. (ie: not bound ports). [19:44] emacsen has joined the channel [19:44] mikegerwitz has joined the channel [19:44] lukegalea: there's some OS fuckery to change the ephemeral ports per interface. I think ubuntu defaults to far less than it could be. [19:44] lukegalea: cat /proc/sys/net/ipv4/ip_local_port_range [19:45] lukegalea: echo " " > /proc/sys/net/ipv4/ip_local_port_range [19:46] lukegalea: but I believe ephemeral ports only apply to client connections. I'd have to know more about what you are trying to accomplish to know if you need to increase that.. but hopefully that's enough info to get you started. [19:46] shaver: ephemeral port numbers can also be reused, though I don't know that they are [19:46] Aikar: ACTION is gonna take notes on some this stuff for when im near that stage to worry about it [19:46] Aria: You can bind an ephemeral port for a service, too. [19:47] shaver: in that (local-port, local-IP, remote-port1, remote-IP1) can exist at the same time as (local-port, local-IP, remote-port2, remote-IP2) [19:47] shaver: well, if you bind to it then by definition it's not ephemeral [19:47] marteau: lukegalea: i'm done catching up now. i get it now. interfaces as in physical interfaces. I thought you might be referring to a construct inside of Node itself. [19:47] shaver: but you can bind to non-privileged ports too [19:48] marteau: lukegalea: this is indeed enought to get me started, thanks (to all) for all of the input. but my little brain is full now. gotta go... [19:48] Aikar: marteau: a server can have multiple IP addresses, i have 4 on my box. i got apache listening on 1 specifically and node listening on another, so 2 servers on same physical box listen to port 80 [19:48] Aria: Basically, the constraint is that (local-ip, remote-ip, local-port, remote-port) must be a unique tuple. [19:49] jamesarosen has joined the channel [19:51] xandrews has joined the channel [19:51] Aikar: ryah: when crankshaft was first released i remember it saying it was 32bit only. did it ever land for 64bit? [19:51] hosh_work has joined the channel [19:51] shaver: is crankshaft in the default stream now? [19:51] Aikar: yep [19:51] shaver: I guess so, if it's in the dev builds [19:51] Aikar: it came in V8 .3 [19:51] Aikar: 3.0* [19:51] ryah: Aikar: yes there's a x64 version [19:52] Aikar: 'version'? as in seperate or 'theres x64 support now' ? [19:52] ryah: you may need to use --crankshaft to enable it [19:52] Aikar: oh so your not auto turning it on? [19:53] springify has joined the channel [19:54] fermion has joined the channel [19:54] Fullmoon has joined the channel [19:59] ezmobius has joined the channel [20:00] yhahn has left the channel [20:00] jimt_ has joined the channel [20:03] tiemonster has joined the channel [20:03] dthompson has joined the channel [20:03] tiemonster: I seem to remember hearing about a continuous integration server built on Node.js. Does that sound familiar? [20:03] dthompson1 has joined the channel [20:05] altamic has joined the channel [20:05] MikhX_ has joined the channel [20:06] Dreamer3 has joined the channel [20:07] bingomanatee: Ryan: which mail group specifically should I repost the max connections thing to? [20:07] SlexAxton has joined the channel [20:08] SlexAxton: Any normal cause for `Cannot find module 'redis'` after doing an 'npm install hiredis redis' ? [20:08] zomgbie has joined the channel [20:08] SlexAxton: using: nvm use v0.4.1 [20:09] Vladimir1 has joined the channel [20:09] SlexAxton: with just a 'var redis= require('redis');' [20:09] SlexAxton: I'm guessing some sort of path problem [20:11] rfay has joined the channel [20:11] real_ate_ has joined the channel [20:12] herbySk has joined the channel [20:12] jdalton has left the channel [20:12] skrug has joined the channel [20:14] Kryckan has joined the channel [20:15] tktiddle has joined the channel [20:17] ezmobius has joined the channel [20:17] SlexAxton: got it. $NODE_PATH isn't available when you use sudo, which you have to do to run on port 80 on os x [20:17] SlexAxton: well, the user's node path [20:18] SlexAxton: just in case anyone else runs into that in the future! [20:18] ryah: Aikar: just using what v8 sets as default [20:18] ryah: Aikar: i think by defaul it's off [20:18] ryah: Options: [20:18] ryah: --crankshaft (use crankshaft) [20:18] ryah: type: bool default: false [20:18] mraleph has joined the channel [20:19] nilcolor has joined the channel [20:19] Aikar: so why they make this new awesome feature yet turn it off by default lol.. [20:21] hellp has joined the channel [20:22] bradleymeck: ACTION wants typed arrays and having them turned on now that we have cranky [20:24] arlolra has joined the channel [20:24] ncb000gt has joined the channel [20:26] jetienne: bradleymeck: any use case of typed array on server side ? i only know 3D on the client side [20:26] Vladimir1 has joined the channel [20:26] daveluke has joined the channel [20:26] bradleymeck: jetienne my pixel buffer impls are the blow [20:26] jetienne: ah :) [20:27] Me1000 has joined the channel [20:29] daveluke_ has joined the channel [20:30] eyesUnclouded has joined the channel [20:30] malkomal_ has joined the channel [20:30] Aikar: my group is code named "HR Nightmare" [20:30] Aikar: i wouldnt be fired [20:30] Aikar: err mt [20:30] Aikar: wrong channel >_> [20:31] emacsen has joined the channel [20:31] evanmeagher has joined the channel [20:31] mscdex: Kingdutch: eh? [20:32] Kingdutch: Huh? [20:32] prettyrobots has joined the channel [20:32] mscdex: you were having problems with node-ncurses? [20:33] davidc_ has joined the channel [20:33] Kingdutch: Oh yeh [20:33] Kingdutch: Couldn't get out of the fileview example [20:33] mscdex: escape didn't work? [20:36] stonebranch has joined the channel [20:38] sh1mmer has joined the channel [20:38] tim_smart: isaacs: Why are log messages on stderr for npm? [20:38] sivy: would it be possible to fire up servers on different ports from one script? [20:38] isaacs: tim_smart: because they're debugging and warnings and errors. [20:38] Kingdutch: mscdex: Nope [20:39] isaacs: tim_smart: "desired" output (like ls, view, etc.) goes to stdout [20:39] Kingdutch: mscdex: Could be because I'm doing it over SSH though, but still =/ [20:39] reid has joined the channel [20:39] isaacs: tim_smart: you can do `--logfd=1` to send them to stdout. (or just 2>&1) [20:39] tim_smart: isaacs: Hmm. OK. Just seems weird to get output on stderr when there was no errors. [20:40] zomgbie has joined the channel [20:40] isaacs: tim_smart: yeah, eventually the default loglevel will be warn. but for now, it's too handy [20:41] isaacs: https://github.com/isaacs/npm/issues#issue/647 [20:41] isaacs: tim_smart: related ^ [20:41] xerothermic has joined the channel [20:43] mscdex: Kingdutch: hrmm, what does `echo $TERM` give you at the console? [20:43] Kingdutch: xterm [20:44] tiemonster has left the channel [20:44] tbranyen: SlexAxton: hmmm did you install redis in the /root/.node_libraries path/ [20:44] tbranyen: because the node path for modules shouldn't be affected by which user you are? [20:44] eyesUnclouded has joined the channel [20:45] mscdex: Kingdutch: i dunno, maybe it's your terminal settings then. i'm using putty right now with default settings and it escapes just fine [20:45] Kingdutch: Hmm [20:45] tilgovi has joined the channel [20:46] ximo has joined the channel [20:47] SlexAxton: tbranyen: i did, the $NODE_PATH is defined in the .zshrc/.bashrc file, so when you sudo it would have to be in /etc/bashrc - which is where i added it, and it works like a charm now [20:47] Aikar: isaacs: on your doc for 1.0, why put dependencies in the modules folder? that seems like alot of duplication. imo should do "if module does not have a specific version requirement for a dependency, then install that dep in same node_modules as current module. and only if it has a specific dep install to node_modules/foo/node_modules/bar. so in most cases itll share the same install of a dep [20:48] Aikar: majority of modules wont have a max version dependency, so makes more sense to share each [20:48] isaacs: Aikar: it's not a lot of duplication. [20:49] gozala has joined the channel [20:49] Kingdutch: mscdex: Tested again, but pressing the escape key doesn't work =/ [20:49] zaiste has joined the channel [20:49] isaacs: the reason is that you'll normally be installing things locally [20:49] isaacs: Aikar: you're talking about the "Squash left" algorithm [20:49] isaacs: which is complicated, for very little gain [20:49] Aikar: isaacs: if foo and bar both depend on baz, under the word of your doc baz would be installed into nm/foo/nm/baz and nm/bar/nm/baz [20:49] Kingdutch: mscdex: Oh now apart from an error it does work :O [20:49] Kingdutch: Error: Error: ENOENT, No such file or directory '/home/kingdutch/local/lib/node/.npm/ncurses/0.1.0/package/examples/undefined' [20:49] tbranyen: SlexAxton: interesting NODE_PATH is not on my system, it pulls from the require.path variable internal to node [20:50] tbranyen: which uses root when sudo'd and my user when not [20:50] Aikar: why not nm/{foo,bar,baz} [20:50] isaacs: Aikar: that's "squash left" [20:50] isaacs: Aikar: it makes dependency updating trickier. [20:50] isaacs: Aikar: not saying it can't or shouldn't ever be done, just that it's not a huge win [20:50] isaacs: Aikar: the disk space is cheaper than the added lstats [20:50] isaacs: (to walk up the tree) [20:51] isaacs: also, you can solve a lot of the disk space even more efficiently using symlinks where available. [20:51] isaacs: so nm/foo/nm/baz could be a symbolic link to nm/bar/nm/baz [20:54] mkrecny has joined the channel [20:55] galaxywatcher has joined the channel [20:56] badas has joined the channel [20:57] Vladimir1: Hi! current master fails to build v8 on 32-bit linux (debian 6.0); due to -Werror afaics [20:57] CIA-39: node: 03isaacs 07v0.4 * rbc8e9b3 10/ src/node_child_process.cc : Closes GH-734 Do the setuid() after chdir() - http://bit.ly/evjOwA [20:57] xmilliard has left the channel [20:58] ryah: Vladimir1: thanks [20:58] bingomanatee: Is that a band? [20:59] CIA-39: node: 03Ryan Dahl 07v0.4 * r5f95d9a 10/ deps/v8/SConstruct : Remove -Werror from V8 - http://bit.ly/e1AanW [20:59] Vladimir1: np. i did sudo make uninstall; git pull; make ... and now have nothing to run :) that's definitely a sign to sleep :) [20:59] francescop has joined the channel [21:00] zubairov has joined the channel [21:01] bingomanatee has joined the channel [21:01] tfe_ has joined the channel [21:03] mscdex: Kingdutch: ah ok, what did you change to get it to work? i saw that error too, not catastrophic since it's just an example, but i'll be fixing that soon [21:04] Kingdutch: Don't think I changed anything [21:04] francescop has left the channel [21:04] lukegalea_ has joined the channel [21:04] Kingdutch: the upgrade to node 0.5.0-pre might've done it, not sure [21:04] Kingdutch: don't think it did [21:04] Kingdutch: I reinstalled though [21:06] mscdex: ok [21:06] Kingdutch: Anyway I'm gonna head for bed [21:06] Kingdutch: I'll be abck tommorow [21:06] Jourkey: i'm a lil confused on events emitter [21:07] Jourkey: i have events = require('events') [21:07] Jourkey: do i need to declare an event emitter var [21:07] Jourkey: in order to emit events? [21:07] piscisaureus: isaacs: that looks pretty promising [21:08] viirya has joined the channel [21:08] isaacs: piscisaureus: what does? [21:08] piscisaureus: the issues thing I mean [21:08] piscisaureus: (sorry didn't notice i had scrolled :-/) [21:08] eyesUnclouded has joined the channel [21:08] piscisaureus: now we need to attach patches :-) [21:08] stride: Jourkey: nah [21:08] EyePulp: tjholowaychuk: thanks for getting the hostname issue resolved in cluster - now to learn all of what I can do with it! [21:08] Jourkey: ok thanks stride [21:08] stride: Jourkey: you want your own object to emit events or just an eventemitter? [21:08] tjholowaychuk: EyePulp: no problem [21:08] tktiddle has joined the channel [21:09] isaacs: piscisaureus: yeah, it's easier to look at, and the back button works [21:09] piscisaureus: ... and you don't need to click "more" a hundred times [21:09] piscisaureus: ^-- that's what annoyed me msot [21:09] isaacs: SRSLY [21:10] Jourkey: strike I would like my own object to emit events yeah [21:10] stride: Jourkey: var EventEmitter = require('events').EventEmitter, util = require('util'); function YourObject() { EventEmitter.call(this); } util.inherits(YourObject, EventEmitter); <- is what I use most of the time [21:10] jetienne: http://www.youtube.com/watch?v=WFmWhwyA0NU&feature=fvw [21:11] Jourkey: so unless I have all that I can't do object.emit('foo')? [21:11] FireFly|n900: Correct [21:11] FireFly|n900: well, you could always do new EventEmitter [21:11] kawaz_air has joined the channel [21:11] Jourkey: ok thanks [21:11] jetienne: wrong channel :) [21:12] FireFly|n900: also, sans the requres it's basically util.inherits [21:12] FireFly|n900: not all that "much" :) [21:12] FireFly|n900: requires* [21:12] Jourkey: ok tyvm [21:15] bubbafat has joined the channel [21:16] piscisaureus: isaacs: it could be the next rietveld ^_^ [21:17] joshfng has joined the channel [21:17] olauzon has joined the channel [21:17] ngw has joined the channel [21:19] strmpnk has joined the channel [21:19] Chunk has left the channel [21:19] razvandimescu has joined the channel [21:20] EyePulp: so is there a way to embed/reference a single document/schema in mongoose versus an array of [Schema] ? [21:20] galaxywatcher has joined the channel [21:20] aho has joined the channel [21:20] linnk has joined the channel [21:20] springify has joined the channel [21:22] stride: hm. what node version does cloud9 currently require? [21:23] ngw: hi, I'm probably missing something here, so please bear with me [21:23] necromancer has joined the channel [21:24] ngw: I'm writing a service that needs to be called from a main app, do a lot of things without blocking this app, and ping back when it's done [21:24] ngw: it should basically receive a POST and return a POST at the end [21:24] stonebranch has joined the channel [21:25] ngw: "return a POST" is obviously wrong, just make a "POST" back to the main app [21:26] ngw: I don't see a way in express to just return something like "OK, received" and to defer everything to some other code [21:26] ngw: I'm obviously wrong, but at least for now everything seems sync [21:27] ngw: I make a request, a route matches, and I res.send something [21:27] stride: don't know about express but doesn't it have some .end() function on the response? [21:27] ngw: what am I missing ? [21:28] ngw: stride: it should and I'm sure it does [21:28] ngw: I just don't see it [21:29] rtomayko has joined the channel [21:31] rburhum has joined the channel [21:31] stride: hm. I don't see one in the docs either. you might have to defer further actions by using process.nextTick or putting them in some message queue or something where it'll be processed later [21:32] stride: (though process.nextTick would surely be the wiser approach for now :)) [21:32] ngw: I think I will ask on the ML [21:32] ngw: too strange to be true :p [21:33] stride: why don't you just look at the code if you're that desperate? :)) [21:34] ngw: because I'm a newbie [21:34] silbion has joined the channel [21:35] ngw: both with node.js and express.js, literally started today [21:35] paulrobinson has joined the channel [21:36] zachsmith_ has joined the channel [21:37] stride: hmkay :) [21:39] TooTallNate has joined the channel [21:40] daveluke has joined the channel [21:40] paxcoder has joined the channel [21:41] bingomanatee_ has joined the channel [21:42] Evet has joined the channel [21:44] Jourkey: anyone here uses node.js with backbone.js? [21:44] Jourkey: i mean backbone on the server [21:45] rburhum has left the channel [21:45] jetienne: Jourkey: i havent but im interested to know how it goe [21:45] jetienne: s [21:46] nejucomo has joined the channel [21:46] Poetro1 has joined the channel [21:47] mnot has joined the channel [21:47] bentruyman has joined the channel [21:47] piscisaureus: felixge: ping [21:47] zubairov has joined the channel [21:48] davidc_ has joined the channel [21:48] Determinist has joined the channel [21:49] wesw02 has joined the channel [21:49] paxcoder: hey peeps. i apologize for ignorance right from the start. having heard about "server side scripting" my first thought was JS as a server-side scripting language, not one for writing servers. having to write a server in JS that crashes because of a typo somewhere (or alternatively, spending a lot of time designing a good one) does not appeal to me. my question is: is there a way to use node.js simply as a js extension w/ support for server-sid [21:49] paxcoder: e apps (DB, file system, calling other progs), rather than a language for writing a full blooded server? or should i perhaps look into another project i'm not aware of to satisfy my needs? [21:50] silbion has left the channel [21:50] wesw02 has left the channel [21:51] dustym has joined the channel [21:51] stonecobra: paxcoder, I think you would just use someone else's node app to extend that is a server [21:51] ngw: stride: I think I got it, the function you pass is the callback [21:52] stonecobra: paxcoder, another alternative is Tomcat and Rhino, I have used that before when I did Java work. [21:52] paxcoder: stonecobra, would Rhino allow me to read files and connect to DBMS'? [21:52] stride: ngw: to nextTick? yeah [21:52] tjholowaychuk: ew rhino [21:53] tanepiper: tjholowaychuk: do i spy your releasing connect 1.0 tonight? [21:53] stride: so you want php, just with js? [21:53] utunga has joined the channel [21:53] tjholowaychuk: tanepiper: haha :p [21:53] tjholowaychuk: sneaky [21:53] paxcoder: the fact is i fear that even a third-party server written in JS may crash or be slow. so i'd prefer a CGI-like approach with either Apache, or a light weight server such as Cherokee. [21:53] paxcoder: stride, yes [21:54] tjholowaychuk: tanepiper: if I can get the docs in better shape yup [21:54] paxcoder: to put it that simplistically [21:54] tanepiper: sweet just in time for our new app :D [21:54] stonecobra: paxcoder: Rhino is just a JS engine for the JVM. If you can do it in Java, you can do it in Rhino. The answer is yes. It is the same with node. I think you just need to choose a higher level of abstraction [21:55] paxcoder: stonecobra, that would sound nice if it weren't for the fact that I deprecate Java (also why JS on JVM if you can J on JVM)? [21:55] paxcoder: s/)?/?)/ [21:55] stonecobra: paxcoder: node.js is only at 0.4.0 right now, so will not stabilize on API for a bit, but the actual running server is as rock solid as most 1.0 releases I have seen [21:55] Sebmaster has joined the channel [21:57] paxcoder: stonecobra, i didn't mean the underlying server code will crash (of itself). i meant my falsely written script will crash it (that's what happened in a video i watched anyway). i don't see a need for each one of us writing their own web server, and that's why i'm asking the question. [21:57] paxcoder: so... what would you suggest? [21:58] nejucomo has joined the channel [21:58] martypdx has joined the channel [21:58] freakyfractal has joined the channel [21:58] stonecobra: I think that the web frameworks will be taking care of these things, so you can just focus on your app. Thinking about connect/express as an example [21:59] stonecobra: I am currently using connect for an OAuth demo app, and I don't feel like I am writing a server, though willing to let it crash. [21:59] tjholowaychuk: paxcoder: anything will crash eventually.. [21:59] stonecobra: I can edit/save/restart with node-dev faster than I can switch between editor and browser to test [22:00] mdl has joined the channel [22:00] stonecobra: so I am very happy with node.js, even at this stage in its lifecycle [22:00] paxcoder: tjholowaychuk, hmm. i'm fine with anything that crashes as often as Apache does due to badly written scripts :-P [22:00] mdl: hi [22:00] slickplaid: anyone know of a module that works with 0.4.0 to send mail? [22:01] stonecobra: I was Java, then went Python (twisted), then D (super fast, but unstable community), and now node.js [22:01] tjholowaychuk: paxcoder: ah :) [22:01] tjholowaychuk: well, most are pretty stable [22:01] tjholowaychuk: but nothing can keep your code stable but you :) [22:01] paxcoder: ACTION notices stonecobra went around C and C++ [22:01] ezmobius_ has joined the channel [22:02] stonebranch has joined the channel [22:02] mdl: I'm fooling around with the basic http example. When I'm adding Content-length my browser hangs. [22:02] maf has joined the channel [22:02] isaacs: mdl: is the content-length accurate? [22:02] tbranyen: mdl: heh are you making a huge content-length? [22:02] paxcoder: tjholowaychuk, if one user is supposed to get "error with the script" type message, i don't want all users to get 404. i also don't want to have to write the code that will make said a reality. [22:03] mdl: yes. body.length. [22:03] reid: for text? [22:03] stonecobra: paxcoder, I have the same pragmatism, let me write functionality, not wrapping crap to satisfy the language. [22:03] malkomalko has joined the channel [22:03] mdl: no just a simple example [22:03] stonecobra: C and C++ aren't my bag because of that [22:03] yozgrahame has joined the channel [22:03] stonecobra: D was the best combination of C and C++ [22:03] reid: pastebin? [22:04] colinsullivan has joined the channel [22:04] tjholowaychuk: paxcoder: i dont get it [22:04] paxcoder: stonecobra, that's redundant as C is a subset of C++ :-) [22:04] tjholowaychuk: you dont like the exception handling? [22:04] mdl: pastebin: just a second [22:05] paxcoder: tjholowaychuk, basically i don't like writing anything that i wouldn't have to with (say) PHP. [22:05] tjholowaychuk: :s [22:05] fly-away has joined the channel [22:05] tjholowaychuk: well I can tell you I MUCH prefer node to php lol [22:05] paxcoder: i'd like to use JS as the server *scripting* language, running on a server that i have not written [22:06] maf: I think I found a memory when using setTimeout or setInterval. I created this very basic example: https://gist.github.com/848138. Can someone look at it and see if I did something stupid? :) [22:06] tjholowaychuk: i love that they are one and the same [22:06] tjholowaychuk: hated ruby for that [22:06] zemanel has joined the channel [22:06] perezd has joined the channel [22:06] mdl: http://pastebin.com/E4GWBFBm [22:06] insin: turtles all the way down [22:06] paxcoder: tjholowaychuk, that's cool. i respect that. but i have a specific assignment, and you're not exactly answering my question(s) ;-) [22:06] tjholowaychuk: :) [22:06] ijan has joined the channel [22:07] tjholowaychuk: definitely give it a go if you havent already [22:07] martypdx: I have a test harness that uses http.request to simulate POST request to app that's using express.bodyDecoder. Is there an easy way to produce application/x-www-form-urlencoded data? [22:07] reid: delete the ":" [22:08] reid: mdl: "Content-Length" not "Content-length:" [22:08] mdl: reid: thanks a lot [22:08] paxcoder: tjholowaychuk, tbh i like distributed things. my plan for this is to present JS as the single scripting language that one needs to learn. in reality, i'd like everything to run on the client side. down with the cloud i say. and this is a step towards that goal in my view. [22:09] reid: mdl: np! [22:09] mdl: can you guess what happend there? [22:09] ijan: maf [22:09] slickplaid: anyone know of a module that works with 0.4.0 to send mail through an SMTP? node_mailer and nodemailer don't seem to work (Socket is not writable err) [22:09] reid: what happened in that example? [22:09] paxcoder: i also realize that for some cases the above said doesn't make any sense :-) but with the introduction of webstorage, localstorage, webworkers, websockets, and IPv6 i hope it'll make more and mroe sense. [22:09] tjholowaychuk: martypdx: just regular querystring-ish stuff, foo=bar&blah=blahblah [22:10] mdl: yes. why adding "Content-length:" broke it. [22:10] Kryckan has left the channel [22:10] seivan has joined the channel [22:10] fugoki has joined the channel [22:11] paxcoder: tjholowaychuk, do you really parse the /dir/subdir/script type strings and then enter /dir/subdir/ to load script file? [22:11] strmpnk has joined the channel [22:11] paxcoder: *manually? [22:11] mdl: my uneducated guess is that node added/removed some other headers. which broke the whole http transaction. [22:11] nejucomo has joined the channel [22:12] stride: paxcoder: huh? [22:12] reid: something choked on that colon, can't say what though. could be that node.js didn't send the transfer-encoding header since there appeared to be content-length present [22:12] reid: if you don't specify a content-length, node.js will add transfer-encoding: chunked, which would make the example work [22:12] paxcoder: stride, :-/ [22:13] stride: paxcoder: there are routing modules in the web frameworks to take care of that. though it's mostly a bit saner than mapping an url to a file [22:14] Benn has joined the channel [22:14] tjholowaychuk: paxcoder: no [22:14] tjholowaychuk: hell no [22:14] tjholowaychuk: haha [22:14] tjholowaychuk: that would be really annoying [22:14] tjholowaychuk: NOT mapping to a file is far more flexible [22:15] mdl: reid: ok I will stare at some http headers until they make sense. thanks again. [22:15] paxcoder: stride, i am, unlike you, a do it manually kind of guy. I do C primarily. as such, i dislike frameworks. however, i have a deadline yet and i don't want to make the same mistake of trying to write a perfect app. This time, i just want good third-party code to run my JS scripts with some server side I/O and DB support. [22:16] paxcoder: tjholowaychuk, basically what you said is you have to do that, and THEN there are cases in which you don't do that, so you have to cover those too XD [22:16] paxcoder: *that = mapping to files [22:16] tjholowaychuk: uh [22:16] tjholowaychuk: no [22:16] tjholowaychuk: app.get('/some/segments, handleFunction) [22:16] tjholowaychuk: with a ' after segments haha [22:17] paxcoder: tjholowaychuk, that's cool [22:17] stride: paxcoder: I don't have problems with manual stuff. it's just that web development has come to some common solutions that are pretty helpful, especially when on a deadline (at least once you get used to it) [22:18] paxcoder: stride, exactly [22:19] paxcoder: stride, i'd like to be able to just write a blah.js (which reads from a DB), and put it in /var/www or someplace, run a (preferably non-JS) server in the back that calls it. [22:19] tjholowaychuk: paxcoder: https://github.com/visionmedia/express/blob/master/examples/route-separation/app.js [22:19] davidc_ has joined the channel [22:19] tjholowaychuk: paxcoder: see you can map pathname segments to functions which either respond [22:19] tjholowaychuk: or call next() allowing routes defined below it to respond if they want [22:19] stride: in that case.. why exactly are you looking at node? :) [22:20] warz: paxcoder, is there a reason why you cant put nodejs behind nginx or something? [22:20] paxcoder: stride, for I/O and DB reading. can't do that with vanilla [22:20] paxcoder: warz, i don't know, is there? :-D [22:21] warz: yes, you can bind nodejs to a unix socket, and use that as an nginx upstream, if youre just doing generic http serving [22:21] jpick has joined the channel [22:22] paxcoder: warz, excuse me, what is "nginx upstream"? and how do i bind node.js to a unix socket? got any links perhaps? [22:22] nejucomo has joined the channel [22:23] warz: http.createServer().listen('/tmp/foo.sock'); [22:23] martypdx: tjholowaychuk: Thanks. Key was setting Content-Type header on request :) [22:23] warz: nginx upstream is just an nginx term [22:23] tjholowaychuk: martypdx: ah :) yup that will do it [22:24] ryanfitz has joined the channel [22:25] paxcoder: warz, but hey, i still need to handle all the proper HTTP conversation. seems to me you're just redirecting nginx request to node.js, which still has to handle all the important stuff. am i wrong? [22:25] clarkfischer has joined the channel [22:26] paxcoder: warz, for example, the previous example of ours: i have to write (or use) something which maps URI's to respective files [22:26] brianc: paxcoder: if you reverse-proxy to node you can have nginx serve static assets (.html files, .css, client side .js files, etc) while letting node to the database/filesystem stuff [22:26] Hello71 has joined the channel [22:26] Hello71 has joined the channel [22:27] eyesUnclouded has joined the channel [22:27] herbySk has joined the channel [22:27] bingomanatee has joined the channel [22:27] brianc: paxcoder: or just put node on port 80, relax, and have a beer [22:27] brianc: as they say [22:28] brianc: they = the voices that tell me to keep drinking [22:28] paxcoder: brianc, that's still only some of the HTTP work on nginx. I want it to handle everything. I only want node.js to add I/O functionality to a simple JS script. [22:28] paxcoder: brianc, i can't [22:28] reid: paxcoder: in that case, the upstream server is handling http with your end-user, not node.js. [22:28] paxcoder: it'll crash [22:28] paxcoder: it's bad design. cannot sleep [22:28] paxcoder: ;-) [22:28] binarypie has joined the channel [22:28] w0rse_ has joined the channel [22:29] paxcoder: reid, ok, so walk me through it. the server (nginx or smth) gets a request for blah.js. What happens then? [22:29] reid: paxcoder: at some point, you have to pass messages to your other server... warz recommended http as the format [22:29] brianc: paxcoder: i don't understand...if you want node.js to handle no http work, then what? You want cgi? [22:29] paxcoder: reid, aaaawwhhwhh [22:29] paxcoder: brianc, YES. basically [22:29] brianc: paxcoder: you can have code read from stdin and write to stdout [22:29] hornairs has joined the channel [22:30] reid: paxcoder: brianc has the idea, my point is you can just write to stdout if you want to pass the result up to your other server. just like old times [22:30] paxcoder: brianc, that's more like it. granted, it'll still have to respond in HTTP [22:30] Spion_: paxcoder, you're looking at the wrong thing. see v8cgi [22:30] jakehow has joined the channel [22:30] paxcoder: Spion_, thanks mate [22:31] Spion_: but, you will regret it :D [22:31] paxcoder: XD [22:31] paxcoder: why? [22:31] Spion_: because the node way is vastly superior [22:31] paxcoder: Spion_, quite frankly, that's like saying C is superior to node.js. (if you catch my drift) [22:32] Spion_: gives you a lot more control. and its fully async I/O. [22:32] Spion_: No, its like saying that closures are superior to functors (they are). [22:32] paxcoder: Spion_, i don't see it... [22:33] Spion_: the code to create a totally awesome http server in node (with express) is about 5 lines. [22:33] paxcoder: in C you can set your buffers, you can custom creat TCP packages, you can do threading just the way you want it etc... but it's just insane to do that to simply have a website [22:33] Spion_: the rest can be your, say, MVC framework. [22:34] paxcoder: Spion_, but come on. that 5 line code gives 404 for everyone if i write a.parseint(b, 10); //notice lowercase [22:34] paxcoder: and i'd have to carefully design it not to do that [22:34] paxcoder: whereas the CGI approach just says: that script doesn't work [22:34] paxcoder: the server still serves everyone else [22:34] Spion_: how about comet? [22:34] paxcoder: long polling? [22:35] Spion_: yes. but also more; see Socket.IO [22:35] ryah: paxcoder: you're worried you're not putting enough work on nginx? [22:36] paxcoder: ryah, i'm worried half of that work will fall onto me. [22:36] ryah: paxcoder: like what? [22:37] ryah: i think express takes care of most things for you [22:37] jamesarosen has joined the channel [22:37] paxcoder: ryah, like parsing URL's and reading corresponding files, making sure the server doesn't crash because of typos etc [22:37] paxcoder: Spion_, sec, lemme try to wrap my head around what Socket.IO is [22:37] DoNaLd`: hi .. all .. played somebody with FPDF ? [22:37] insin: ACTION wonders which programming languages are typo-resistant [22:37] ryah: node has a url parser built-in, making sure the server doesn't crash needs to be handled by some external process monitoring thing [22:38] possibilities has joined the channel [22:38] tjholowaychuk: paxcoder: if you have a typo it wont magically go away for subsequent requests [22:38] tjholowaychuk: so they will all fail regardless [22:38] tjholowaychuk: paxcoder: use cluster [22:38] tjholowaychuk: paxcoder: http://learnboost.github.com/cluster/ [22:39] thomsonit has joined the channel [22:40] paxcoder: suggestions: connect/express, v8cgi, comet, cluster [22:40] Spion_: v8cgi is not node-related [22:40] colinclark has joined the channel [22:40] paxcoder: Spion_, sure. [22:41] bubbafat: You seem really focused on static v. dynamic typing bugs. [22:41] reid: paxcoder: i run my serious-business node programs behind another web server, which handles faults in my node program. [22:41] ryah: paxcoder: express, monit, nginx (maybe cluster) [22:41] ryah: paxcoder: take that advice and go read up :) [22:42] paxcoder: ryah, seems like i have my material :-) [22:42] paxcoder: thanks guys. [22:43] tjholowaychuk: ryah: I might have some more small node patches in a bit so that cluster can monitor itself but I need to spawn a small process with a new pgid [22:43] dthompson has joined the channel [22:44] Metapony has joined the channel [22:45] ryah: tjholowaychuk: i don't mind patches - but i think you should reconsider that feature [22:45] olauzon_ has joined the channel [22:45] ryah: you control the code in cluster - just make it not crash [22:45] ryah: it has a master process already - or? [22:45] Venom_X has joined the channel [22:45] ShizWeaK_ has joined the channel [22:46] tjholowaychuk: ryah: haha yeah true, that would be the goal [22:46] paxcoder: bb [22:46] paxcoder has left the channel [22:47] bingomanatee_ has joined the channel [22:47] blueadept has joined the channel [22:47] ryah: tjholowaychuk: yeah, just fix the bugs in the master process so it doesn't crash [22:48] ryah: if people need extra security they can use monit or smf or launchd [22:48] tjholowaychuk: ryah: it may not be much of a problem now, I had what I thought was a huge bug but I was just clobbering an env variable by accident [22:49] tjholowaychuk: unfortunately had the side-effect of recursively spawning itself haha [22:49] tjholowaychuk: but [22:49] tjholowaychuk: yeah [22:49] tjholowaychuk: should be all good now [22:50] stephen_mcd has joined the channel [22:50] mikeal: ryah: since when does fs.watchFile use inotify under the hood? [22:50] bingomanatee has joined the channel [22:51] pedrobel_ has joined the channel [22:51] therrg has joined the channel [22:51] piscisaureus: Anyone: I am under the impression that node does not emit all data I receive over a tcp connection [22:52] ryah: mikeal: since always [22:52] piscisaureus: What is a suitable linux tool to capture raw socket data [22:52] piscisaureus: ? [22:52] piscisaureus: (so I can verify that) [22:52] ryah: piscisaureus: tcpdump [22:52] mikeal: hrm..... [22:52] shaver: tcpdump [22:52] piscisaureus: ACTION sudo apt-get install tcpdump [22:52] mikeal: ryah: why would node be needing half a core just to watch a large filesystem? [22:53] ryah: mikeal: on linux? [22:53] mikeal: Mac [22:53] ryah: because it polls with stat() [22:53] ryah: inotify is only on linux [22:53] mikeal: what would it take to get kqueue support [22:53] mikeal: Mac has kqueue for files right? [22:54] ryah: i think mac has a better facility for watching for file changes called FS events? [22:54] ryah: http://en.wikipedia.org/wiki/FSEvents [22:54] mikeal: this is all in libeio right [22:54] ryah: no, in libev [22:55] mikeal: hrm..... [22:56] brianc: So I need to pass an array of char* into a C function. I've got an array of JS strings in V8. It seems after some undisclosed amount of time after building the char** in C the strings get 'moved' by V8. Any info on how long or best practice of when to strcpy or when to just use the String::Utf8Value? [22:58] brianc: I was initially just adding the String::Utf8Value char* into the C array...but after passing that C array to another function the places pointed to by the pointers was now empty, or full of trash [22:58] Stephen_ has joined the channel [22:58] ryah: mikeal: start here: https://github.com/joyent/node/blob/98515742b771eb35cc48f54d04822c41e19327d7/deps/libev/ev.c#L3312 [22:58] strmpnk has joined the channel [22:59] freeformz_ has joined the channel [22:59] ryah: mikeal: also https://github.com/joyent/node/blob/98515742b771eb35cc48f54d04822c41e19327d7/deps/libev/ev.c#L3149 [23:00] ryah: infy = inotify [23:00] ryah: not infinity [23:00] ryah: :) [23:00] bluesnoop1 has joined the channel [23:00] Ls_Away has joined the channel [23:00] mrkurt_ has joined the channel [23:00] ollie_ has joined the channel [23:00] w0rse has joined the channel [23:00] ryah: http://developer.apple.com/library/mac/#documentation/Darwin/Reference/FSEvents_Ref/FSEvents_h/index.html#//apple_ref/c/func/FSEventStreamCreate [23:00] ryah: looks good [23:01] ryah: can you mimic that API with inofity? [23:01] ryah: i think not [23:01] real_ate__ has joined the channel [23:01] ryah: i htink inotify only works on open fd [23:02] ryah: i wonder if windows has functionality like this [23:02] ryah: watching a directory i think is the most common use case [23:02] ircretary has joined the channel [23:02] ryah: piscisaureus: do you know? [23:02] sugyan_ has joined the channel [23:02] ybit_ has joined the channel [23:02] Twelve-60` has joined the channel [23:02] shaver_ has joined the channel [23:02] jlewis_ has joined the channel [23:03] nejucomo has joined the channel [23:03] piscisaureus: ryah: know what? [23:03] piscisaureus: (sorry my connection dropped for a moment) [23:03] zaiste_ has joined the channel [23:03] ryah: piscisaureus: if there is a way to watch for changes to a directory in windows? [23:03] ajpiano_ has joined the channel [23:04] jlewis_ has joined the channel [23:04] markeeto has joined the channel [23:04] killfill_ has joined the channel [23:04] secoif has joined the channel [23:04] polyrhyt1mic has joined the channel [23:04] piscisaureus: ryah: directory changes is the *only* thing you get asynchronously on windows [23:04] sverrej has joined the channel [23:04] CIA-125 has joined the channel [23:04] linnk has joined the channel [23:04] secoif: Hi, how can I send some script for my node server to execute, from the browser [23:04] tfe__ has joined the channel [23:04] piscisaureus: if you'd want to watch individual files, you'd end up watching its containing directory and then filtering [23:04] maru_cc__ has joined the channel [23:05] ryah: piscisaureus: ah - nice [23:05] ryah: piscisaureus: what's the API? [23:05] Kinbote_ has joined the channel [23:05] tswicegood has joined the channel [23:05] sugardav1 has joined the channel [23:05] secoif: ie, I want to draw some stuff using canvas, then send that to my node-canvas implementation to render as a png [23:06] pifantastic_ has joined the channel [23:06] Vekz has joined the channel [23:06] tjholowaychuk: secoif: usually you dont really want to trust that lol [23:06] hosh_ has joined the channel [23:06] Spion__ has joined the channel [23:06] tjholowaychuk: I did that for the node-canvas test suite [23:06] tjholowaychuk: but [23:06] secoif: tjholowaychuk: yeah of course [23:06] phiggins_ has joined the channel [23:06] Vekz: anyone in here affiliated with the express framework? [23:06] ShizWeaK_: ryah: http://msdn.microsoft.com/en-us/library/aa365465.aspx [23:06] secoif: it's just for local though [23:06] tjholowaychuk: that is really dangerous haha, but you can write a commonjs module and share it [23:06] piscisaureus: ryah: ReadDirectoryChangesW [23:06] tjholowaychuk: Vekz: yup [23:06] zachsmith_ has joined the channel [23:06] tjholowaychuk: Vekz: whats up? [23:07] perezd_ has joined the channel [23:07] devrim1 has joined the channel [23:07] piscisaureus: ryah: what ShizWeak_ said [23:07] Vekz: tjholowaychuk: how can I set multiple "SET-COOKIE" headers on the response [23:07] BillyBreen1 has joined the channel [23:07] secoif: yeah I'm just mucking around at this point, [23:07] hoodoos_ has joined the channel [23:07] tjholowaychuk: Vekz: res.cookie(name, val, options) should work [23:07] ChrisPartridge: ryah: or this http://msdn.microsoft.com/en-us/library/aa364417.aspx [23:07] nichdiekuh has joined the channel [23:07] piscisaureus: ChrisPartridge: nonono. that blocks. [23:08] drudge: tjholowaychuk: i got all that stuff working today, holy crap it's awesome :P [23:08] stonecobra has joined the channel [23:08] tfe_ has joined the channel [23:08] tjholowaychuk: drudge: which stuff? [23:08] jasong_at_apache has joined the channel [23:08] ChrisPartridge: piscisaureus: hmm does it? [23:08] tjholowaychuk: drudge: ohhh the faye stuff? [23:08] daveyjoe has joined the channel [23:08] arpegius has joined the channel [23:08] piscisaureus: ChrisPartridge: prove me wrong :-p [23:09] drudge: tjholowaychuk: yeah faye + express goodness [23:09] themcgruff has joined the channel [23:09] Vertice has joined the channel [23:09] secoif: tjholowaychuk: I'm not what you mean about using commonjs [23:09] secoif: :/ [23:09] willwhite has joined the channel [23:09] ryah: yeah, it'd be really great if someone wrote a cross-platform libev directory watching watcher [23:09] tjholowaychuk: secoif: a js module that you can require on both the SS and CS [23:09] ryah: fs events, inofity, and ReadDirectoryChangesW [23:09] tjholowaychuk: to share the code [23:09] secoif: oh [23:10] secoif: I see [23:10] secoif: wow [23:10] tktiddle has joined the channel [23:10] secoif: for a quick fix should I look at your node-canvas tests? [23:10] deoxxa has joined the channel [23:10] peol has joined the channel [23:10] tjholowaychuk: secoif: sure, just dont use it in anything live haha [23:10] tjholowaychuk: ever [23:10] piscisaureus: Oh ChrisPartridge, it doesn't block, but it requires all that freaking wait thread juggling. Please use iocp :-) [23:10] mikeal has joined the channel [23:11] ChrisPartridge: piscisaureus: Yeah, i've used this before for some medical software - it was a nightmare [23:11] springmeyer has joined the channel [23:11] rfay has joined the channel [23:11] ChrisPartridge: trying to find the code in our old SVN!! repo [23:11] secoif: tjholowaychuk: :D [23:11] jeromegn has joined the channel [23:12] sirkitree has joined the channel [23:12] cilantro has joined the channel [23:12] justin____ has joined the channel [23:12] Hello71 has joined the channel [23:12] Hello71 has joined the channel [23:13] bingomanatee has joined the channel [23:14] zcopley has joined the channel [23:14] johnnywengluu has joined the channel [23:14] freakyfractal has joined the channel [23:14] boucher has joined the channel [23:15] inimino has joined the channel [23:15] jacobolus has joined the channel [23:15] gmci has joined the channel [23:16] possibil_ has joined the channel [23:18] colinsullivan has joined the channel [23:18] benvie has joined the channel [23:18] tktiddle has joined the channel [23:18] jamesarosen has joined the channel [23:20] hassox has joined the channel [23:20] dmcquay has joined the channel [23:21] [[zz]] has joined the channel [23:22] Kudos: is there some way of telling node to break out of a callback? [23:23] yozgrahame has joined the channel [23:23] Kudos: rather than have yet another indentation, i want to say something like if(blah){ continue;} [23:24] tjholowaychuk has joined the channel [23:25] mikegerwitz: Kudos: a callback is a function, so to 'break' from it, you'd simply use 'return'. Is this what you mean? [23:26] Vekz: tjholowaychuk: does the express response object extend the base http response object? [23:26] Kudos: mikegerwitz: yes, thanks [23:26] tjholowaychuk: Vekz: yup [23:26] Kudos: it's been a long day ;P [23:26] EyePulp: is there an exit or escape function I can call to kill a script from within the script? [23:27] EyePulp: or quit() [23:27] Kudos: process.exit() [23:27] tjholowaychuk: Vekz: previous to node 0.4.x we had no way to progressively set header fields, so I added res.header(field, val) etc [23:27] EyePulp: cool [23:27] tjholowaychuk: and a bunch of other helpers [23:27] EyePulp: thanks Kudos [23:27] Vekz: tjholowaychuk: so should I beable to do something like this: http://caolanmcmahon.com/posts/multiple_set_cookie_headers_in_node_js I think this example may be from and older version of node [23:27] tjholowaychuk: Vekz: kinda yeah but please dont use arrays haha [23:27] Kudos: EyePulp: beware, things executing in callbacks will not be given time to complete [23:27] tjholowaychuk: ideally those would be removed from node [23:28] tktiddle: can node js be run in a browser? [23:28] tjholowaychuk: Vekz: do res.header('Set-Cookie', 'string') or the method express provides res.cookie() [23:28] rfay_ has joined the channel [23:29] dguttman_ has joined the channel [23:30] mikegerwitz: tktiddle: If you're asking if your code written for node.js can be run in a web browser, that depends on what you're doing. [23:30] secoif: tjholowaychuk: so in your tests, the client doesn't actually send code to the backend, they simply share the same js code... [23:30] secoif: I see [23:31] perlmonkey2 has joined the channel [23:31] tktiddle: so its not possible to run a webserver from your browser via node? [23:31] Vekz: tjholowaychuk: I would use the .cookie method but I am getting the set_cookie strings from other services and passing them through the node service as kind of a proxy and using the .cookie method i have to parse out the data and there are discrepencies and they are not bing picked up by the browser [23:31] tjholowaychuk: secoif: it does a fn.toString() and sends that body [23:31] secoif: oh [23:31] tjholowaychuk: Vekz: hmm [23:31] secoif: I don't see where /render is handled [23:31] Aikar: what you do in your own personal time in your own home isnt any of your employers business if its not competing [23:31] Aikar: mt [23:31] sechrist has joined the channel [23:32] mikegerwitz: tktiddle: no [23:32] secoif: tktiddle: that's crazy talk [23:32] tktiddle: wishful thinking / no thinking [23:32] tktiddle: soz [23:33] sveimac has joined the channel [23:34] Nevtus has joined the channel [23:34] Nevtus has joined the channel [23:34] softdrink: tjholowaychuk: around? [23:34] tjholowaychuk: yup [23:35] softdrink: is there a sexy way to flag a parameter as optional with Dox? [23:35] ceej has joined the channel [23:35] tjholowaychuk: nope :( not right now [23:35] tjholowaychuk: some day dox will be replaced [23:35] softdrink: alrighty [23:36] softdrink: what with? [23:36] tjholowaychuk: with some extended syntax but not right now nope [23:36] tjholowaychuk: with whatever I end up writing haha [23:36] softdrink: fair enough [23:36] Vekz: tjholowaychuk: should i beable to set multiple cookies using the res.header('Set-Cookie', ) method? [23:36] softdrink: let me know if/when heh [23:36] tjholowaychuk: Vekz: yup [23:36] EyePulp: how does one query for and return a particular embedded document via mongoose/mongodb ? [23:36] tjholowaychuk: Vekz: the state of multiple headers with node is kinda fucked up though [23:36] tjholowaychuk: softdrink: will do [23:36] tjholowaychuk: Vekz: some things clobber them, since it is not supported in core [23:37] Kudos: EyePulp: read the relevant documentation [23:37] tjholowaychuk: Vekz: and then that lame array syntax [23:37] Vekz: tjholowaychuk: hmm will that create multiple set-cookie headers? or try and one line them? if so do i need a delmiter between cookies like newline or somethign? [23:37] EyePulp: Kudos: I've stared at it for the last month. [23:37] EyePulp: =) [23:37] tjholowaychuk: Vekz: concats them [23:37] Kudos: the native driver? [23:37] tjholowaychuk: Vekz: it does that automagically for you [23:38] Kudos: i cba with mongoose, what's the point in a schemaless document store when you're forced to design a schema for the API [23:38] Vekz: tjholowaychuk: can you think of any way for me to validate my cookie headers. I can see them being passed in firebug but the browser does not set the cookie [23:38] Kudos: EyePulp: https://github.com/christkv/node-mongodb-native/blob/master/examples/simple.js [23:39] davidc_ has joined the channel [23:39] Kudos: simple example [23:39] perlmonkey2: Why do people choose mongodb over mysql? I get that puts and non-complex queries are blazing fast, but isn't the business logic always in the complex queries, which require tedious mapreduce functions in a norel db? [23:39] Kudos: mongo is pretty flexible for querying, tbh [23:40] SlexAxton: Any reason an https request stream object doesn't have a connection.remoteAddress property? Is that not sent? [23:40] Kudos: it suits the high concurrency rates that nodejs can acheive too [23:40] kuhrt has joined the channel [23:40] Aikar: perlmonkey2: if your not doing joins, mongo is almost the same as mysql [23:40] Aikar: find where foo = bar and baz = bingo [23:41] rtomayko has joined the channel [23:41] Aikar: and if you stop thinking in terms of relational tables and design your data differently in the way mongo allows it be designed, you dont need any/many joins [23:41] perlmonkey2: But everything does joins. At least unless you are creating giant monolithic documents. The question is are you doing a "join" in a mapreduce function, or in a relational join. [23:41] daveluke has joined the channel [23:41] EyePulp: Kudos: that example is just for inserting 3 sample docs. I'm just looking for a simple route to returning an embedded doc from an array of embedded docs -- I'll look @ the mongodb syntaxtand work backwards. [23:41] Kudos: find wher foo > bar and baz in (a, b, c) [23:42] Aikar: (saying join as in merging data in the app side) [23:42] Kudos: EyePulp: i only started looking at it an hour ago and i have querying and inserting working in my app [23:42] perlmonkey2: Aikar: I get that part. I guess i'm driving at, why use this new method which seems to require quite a bit more forethought and planning, plus more dev time, if you don't already have 100million users and need 'web scale'. [23:43] Kudos: why not? [23:43] Aikar: perlmonkey2: if your not wanting your app to get to that point, why are you bothering make said app? [23:43] Kudos: Aikar: there's plenty of reasons to make an app an not target 100mm users [23:43] perlmonkey2: Aikar: if it takes you 50% longer to do you DB layer, that might mean your project failed for lack of time/money. [23:44] Aikar: any proper project will have a proper planning phase, you still have to design schemas for mysql. so instead of doing it for mysql, do it for mongo [23:44] Kudos: there's no fucking way db development with mongo takes longer than with MySQL [23:45] perlmonkey2: Kudos: it seems to me that unless you are a seasoned norel schema designer, it will take quite a bit more time. [23:45] lakin has joined the channel [23:45] Aikar: perlmonkey2: it really boils down to getting your head out of the mysql koolaid and start thinking of storing data in different ways. once youve depolarized yourself from relational dbs, your dev time wont be as long [23:45] Kudos: if it's taking you longer now, it's simply because you're calling on your mysql experience to distort your perspective [23:45] Aikar: perlmonkey2: compared to a dev with no relational schema design skills either? [23:45] perlmonkey2: Kudos: making the decision on if 1-manies will be contained docs or refs is crucial and seems non-trivial. [23:46] Kudos: take a look at mongo, you can end up with schemas fairly similar to mysql [23:46] Kudos: and you don't have a sea of map reduces to wade through to get to it [23:47] Aikar: perlmonkey2: and not all of us do programming only as a day job ;) its a hobby for me. me learning mongo in my free time doesnt hurt me in some terms of money on a project [23:47] Kudos: Aikar: same here [23:48] eee_c has joined the channel [23:48] jakehow has joined the channel [23:48] perlmonkey2: Kudos: the example mapreduce for mongo is the blogs with multiple authors, each with tags, and with comments. Trying to list who commented on a person's blog of a given tag is trivial in sql, but requires a mapreduce in norel. [23:48] EyePulp: Kudos: apparently pulling embedded docs directly is a no-go: http://groups.google.com/group/mongodb-user/browse_thread/thread/4e6f5a0bac1abccc# [23:48] loob2: evenin' - has anyone experienced issues with the redis module preventing a process from exiting? [23:48] Aikar: your question really boils down to do you have the time to train yourself in a new DB system. as an inexperienced dev working with mysql will have the exact same problem [23:48] Kudos: i used mongo on a hobby project, we're rolling it out as a caching layer at work as a result of my experience with it [23:48] perlmonkey2: Aikar: oh, I love playing with mongo. And mongoose is a brilliant ORM. [23:48] perlmonkey2: Just trying to learn more about how people use it and the decision making for using it on a project. [23:49] Kudos: EyePulp: ah, now i understand what you were looking for, apologies [23:49] trotter has joined the channel [23:50] EyePulp: Kudos: no worries. I am irked to find out it's not doable though, or at least not in a simple fashion. [23:50] Aikar: tthe requestion really is, do you feel its the better tool for the job, and are you willing to add onto the projected timeline for your project to get training for it since you/your devs are inexperienced with it. so if you feel its the rigth choice and worth the time to learn (which you can then use in future projects w/o the learning curve), go for it [23:50] EyePulp: it reduces the usefulness of embedded docs a bit. [23:51] Aikar: mongo has some huge advantages, just you eventually got to take the time to learn it once then itll be a resource availible for your future projects too [23:51] softdrink: does Dox not like tab indentation? [23:52] yozgrahame1 has joined the channel [23:52] tjholowaychuk: softdrink: possibly not [23:52] softdrink: >.< [23:52] tjholowaychuk: softdrink: I use soft-tabs so probably didnt try [23:53] softdrink: ah [23:53] Spion has joined the channel [23:54] softdrink: ohsnap. changed to spaces, works [23:54] freakyfractal has joined the channel [23:54] malkomalko has joined the channel [23:55] perlmonkey2: Aikar: Do you know about the 4square incident and can you explain what went wrong? Something to do with using guids for id's and that causing index fragmentation? [23:55] Aikar: not familiar with what went wrong but i think they posted the details publicly? [23:55] ryah: perlmonkey2: something about it not being able to compact while running? [23:55] Aikar: http://www.infoq.com/news/2010/10/4square_mongodb_outage [23:57] Nevtus has joined the channel [23:57] Nevtus has joined the channel [23:57] jashkenas has joined the channel [23:58] secoif: woah, commas at the start of the new line instead of end of previous line? [23:58] secoif: is that cool? [23:58] softdrink: secoif: don't get me started on that.... [23:58] kkaefer: secoif: it's debated [23:59] kkaefer: secoif: but recently I tend to see it less and less [23:59] softdrink: fills me with rage, but it's not my code, so whatever :) [23:59] ajpiano has joined the channel [23:59] hij1nx has joined the channel [23:59] secoif: it looks, messy to me