[00:00] chapel: http://expressjs.com/guide.html#Passing-Route-Control [00:01] siculars has joined the channel [00:03] chapel: https://github.com/visionmedia/express/blob/master/examples/route-middleware/app.js#L63 [00:03] Stan____ has left the channel [00:03] pyrotechnick has joined the channel [00:05] zylo has joined the channel [00:09] ajpiano has joined the channel [00:10] bronson has joined the channel [00:10] [[zz]] has joined the channel [00:11] rictic has joined the channel [00:13] bstimmerman: chapel: Nice. I just found that example myself. Looks like that would do it. [00:14] sholmes has joined the channel [00:15] derferman has joined the channel [00:16] charlenopires has joined the channel [00:17] ROBOTARM_ has joined the channel [00:18] saschagehlich has joined the channel [00:18] bingomanatee: what is the best mysql drivers for node? [00:19] augustl: in my postgres db, I have a primary key with an auto incrementing sequence. Is there a way to get that value from the callback of an INSERT statement, or do I have to do a query? [00:19] bingomanatee: MatthewMueller: I am pretty sure you can dispense with the routing by simply saying app.all('*', all_handler) with express. [00:20] bbttxu has joined the channel [00:21] bingomanatee: Also if you have a directory pattern that is consistent with your app you can create a generic parser as in app.get(':model/:controller/:whatever*', handler) and get some useful variables up front. You'll want to eyeball the express routing docs/functions closer to make sure thorugh. [00:21] admc has joined the channel [00:21] augustl: brianc: ping, if you can spare a moment (see above) [00:21] chapel: bingomanatee: app.all the all is for get/put/post/del [00:21] chapel: or whatever [00:22] bingomanatee: yeah. I realized I boned the example . [00:22] pauls: you guys are awesome. i didn't know that [00:22] bingomanatee: but app.all is the rigth one. [00:22] chapel: but app.use, is used for all views [00:22] piscisaureus: ryah: köln, this year, really? [00:22] bingomanatee: use?? [00:22] chapel: app.use is like for connect middleware [00:22] chapel: like a logger [00:22] chapel: or a prebuilt error handler [00:22] bingomanatee: okay. [00:23] chapel: but you can also add your own code as long as it follows function (req, res, next) [00:23] jashkenas has joined the channel [00:23] chapel: hmm, odd that tj isn't here [00:23] chapel: he is almost always here [00:23] saikat has joined the channel [00:24] ajpiano has joined the channel [00:27] augustl: brianc: found it - RETURNING. [00:27] flippyhead has joined the channel [00:28] cagdas has joined the channel [00:29] Coal has joined the channel [00:29] MatthewMueller: bingomanatee: Great - thanks a lot for clearing that up. I'm really hoping to use app.use as chapel is alluding to [00:30] chapel: I haven't used it, but look at the things that are used with .use [00:30] MatthewMueller: It's not clear how to author middleware that's based on connect using express dependencies. [00:31] MatthewMueller: Yah, I'm trying, but its confusing :-P [00:32] lukegalea has joined the channel [00:32] chapel: https://github.com/visionmedia/express/blob/master/lib/express/server.js#L44 [00:33] skm has joined the channel [00:34] chapel: https://github.com/senchalabs/connect/blob/master/lib/connect/middleware/logger.js#L77 [00:35] unomi has joined the channel [00:36] linac has joined the channel [00:37] omygawshkenas has joined the channel [00:37] bingomanatee: Happy to help. [00:37] MatthewMueller: chapel: Thanks for the resources. Hm. so maybe the middleware has access to the "app" object. Logger does its own writeHead, etc. I'm really hoping to use app.get(...) inside of the middleware. I'll look into it. Thanks! [00:37] ericnakagawa has joined the channel [00:38] rjack has joined the channel [00:44] mscdex: awesome! icq works! [00:46] jchris has joined the channel [00:47] cloudhead has joined the channel [00:54] charlenopires has joined the channel [00:58] kris_ has joined the channel [01:00] kris_ has joined the channel [01:00] vacuoustruth has left the channel [01:01] jakehow has joined the channel [01:05] zentoooo has joined the channel [01:07] admc has joined the channel [01:14] eee_c has joined the channel [01:14] liar has joined the channel [01:14] sudoer has joined the channel [01:15] montylounge has joined the channel [01:16] kawaz_air has joined the channel [01:16] pHcF has joined the channel [01:19] cainus: hey... anyone have experience hooking connect-auth up to express ? [01:19] atmos: yup [01:20] cainus: to use it I need connect.createServer() ? for express I need express.createServer() ... I'ma bit baffled [01:20] atmos: i've used the github and twitter auth [01:21] cainus: not sure how I can use both when that's the api [01:21] cainus: just trying to get basic http auth [01:21] atmos: https://github.com/atmos/http-pulse-app/blob/master/lib/app.js [01:21] sveimac: its just middleware [01:21] atmos: that app should still work i think [01:21] atmos: it's from august [01:22] wdperson has joined the channel [01:23] cainus: isn't connect-auth the preferred way to do basic http auth? [01:23] cainus: seems like that example is using something else [01:24] atmos: https://github.com/atmos/http-pulse-app/blob/master/lib/app.js#L34 [01:24] bingomanatee: Interesting channel trivia - though there are many "aliases", there have been nearly 4,000 discrete logins in the node.js channel. [01:24] atmos: that should be using connect auth, i just have it as the Auth constant [01:24] sveimac: cainus: http://nodetuts.com/tutorials/13-authentication-in-express-sessions-and-route-middleware.html#video [01:24] atmos: i dunno how much that library has matured in the last 6 months though [01:24] mikeal has joined the channel [01:25] cainus: sveimac: spoon-feed me... thanks ;) [01:25] sveimac: just folllow that and you are on the go I think :) [01:28] cainus: hmmm that doesn't look like basic http auth [01:28] cainus: shouldn't need sessions as far as I know [01:30] sveimac: might remember wrong, but doesnt it use connect-auth? [01:30] sveimac: via express? [01:30] cainus: it's express, but I don't see connect-auth used [01:30] cainus: and it's not basic http auth [01:30] unomi has joined the channel [01:31] ryah: piscisaureus: yeah, koeln. [01:31] saschagehlich has joined the channel [01:31] saschagehlich has joined the channel [01:33] cainus: I got a better idea of how middleware works at least [01:33] sveimac: :) [01:33] piscisaureus: ryah: Nice! How do you guys get that done so fast? I asked mikeal the other day and he told me 'not this year' [01:34] mikeal: what did you get done? [01:36] piscisaureus: mikeal: I didn't mean to step on you toe :-) [01:37] piscisaureus: *your [01:37] eee_c has joined the channel [01:37] mikeal: i was just offline when the subject of this was in the channel [01:37] mikeal: and only picked up the end [01:37] mikeal: so i actaully don't know what this is referring to :) [01:38] piscisaureus: nodeconf in europe [01:38] sveimac: nice :) [01:38] kawaz_air has joined the channel [01:38] mikeal: who is doing nodeconf in europe? [01:38] piscisaureus: I don't know. Ask ryah :-) [01:39] mikeal: ryah: who is doing a nodeconf.eu? [01:39] mscdex: heh [01:40] breccan_ has joined the channel [01:40] mikeal: we actually have a policy for using jsconf and nodeconf for conferences [01:40] mikeal: we're not against it, but using the exact name we like to at least know them, and they should have been to a jsconf [01:40] mikeal: and understand that standard for the parties :) [01:41] mikeal: the jsconf.eu haven't said anything about doing a nodeconf [01:41] mikeal: jsconf.eu crew [01:43] ryah: mikeal: my cologne friends [01:43] mikeal: oh awesome [01:43] mikeal: i was going to say "if they are calling it the european nodeconf it better be in germany for sentimental reasons" [01:44] mikeal: were they at jsconf.eu? [01:49] Mike_Rice has joined the channel [01:50] Mike_Rice: Hey guys, is 0.3.7 having issues building under Cygwin? I know 0.3.2 did, but I thought Ryan fixed it a couple weeks ago [01:52] bbttxu has joined the channel [01:52] unomi has joined the channel [01:54] Qbix1 has joined the channel [01:55] sveimac: Mike_Rice: From mailinglist: cygwin is not supported in v0.3.7. Try mingw. [01:56] ryah: i dont know what they're calling it [02:05] sechrist: SubStack: How the heck am I supposed to use bufferlist with just a clone of the repo? I'm trying to cleanly require it without much hacking [02:05] sechrist: adding specific projects to the path list is unsavory for me [02:06] bronson has joined the channel [02:06] SubStack: sechrist: use node-binary instead [02:06] sechrist: egh I know that but i mean in general [02:07] sechrist: how do people typically use modules? I've been cloning into a "thirdparty" or "vendor" folder and symlinking into a lib folder [02:08] sechrist: Did you get performance up with binary since I last mentioned it? [02:08] sechrist: I believe that is why I haven't adopted it [02:09] sechrist: ooh binary has a much nicer import structure I see [02:10] sechrist: fixed performance test, binary is actually faster than bufferlist hurrah! [02:10] sechrist: ^^ nice [02:11] SubStack: well, for that one test [02:12] cainus: I can't find an http auth example anywhere... can anyone throw me a clue? using connect-auth or otherwise? [02:13] cainus: digest, preferably [02:15] kris_ has joined the channel [02:16] HAITI has joined the channel [02:16] skm has joined the channel [02:17] cainus: https://github.com/ciaranj/connect-auth/blob/master/lib/auth.strategies/http/digest.js looks like it will do it, but I have no idea how to plug that in [02:18] kiddphunk has joined the channel [02:20] sholmes has joined the channel [02:21] kawaz_ai_ has joined the channel [02:25] micheil: ryah: hmm, catch: https://twitter.com/thenoded/status/31900627646816257 :) [02:26] ROBOTARMY has joined the channel [02:33] iszak has joined the channel [02:33] iszak: Is there a new release cycle for node.js? Like every week or so? [02:33] iszak: This is 0.3.x that is. [02:34] dspree has joined the channel [02:36] Kinbote has left the channel [02:36] chapel: nice micheil [02:37] chapel: do you have a website or rss up? [02:37] micheil: sorry, neither [02:37] dgathright has joined the channel [02:37] micheil: iszak: the release cycle is "when it's done" [02:37] chapel: you could always use soundcloud to host the files and rss, or feedburner for proper url [02:37] micheil: could, but haven't for now [02:38] chapel: I listen to podcasts on my phone, using a podcast app [02:38] chapel: lack of rss :( [02:38] iszak: micheil, seems like it's weekly based. [02:39] Ond has joined the channel [02:39] ericnakagawa has joined the channel [02:40] luke`_ has joined the channel [02:40] MattDiPasquale has joined the channel [02:41] sechrist: I seem to like TheChangelog [02:41] sechrist: for whatever reason [02:42] unomi has joined the channel [02:44] zentoooo has joined the channel [02:45] hunterloftis has joined the channel [02:49] boaz has joined the channel [02:51] aheckmann has joined the channel [02:52] aheckmann has left the channel [02:52] meso has joined the channel [02:52] btipling has joined the channel [02:53] micheil: iszak: not at all [02:53] micheil: sechrist: well, fwiw, mikeal and myself haven't been in the podcasting game quite as long as wynn and adam (they actually have about 6 different podcasts) [02:54] sechrist: oh I wasn't comparing I was just saying something random [02:54] sechrist: where can I listen to your podcasts? [02:55] brianmario has joined the channel [02:59] ryah: micheil: oh great [03:00] jpld has joined the channel [03:00] ryah: you guys put on a good radio show :) [03:02] atmos has joined the channel [03:02] SubStack: sechrist: oh right, npm link too [03:04] konobi: ryah: is jsjohnst on IRC? [03:04] kawaz_air has joined the channel [03:05] jbrantly has left the channel [03:07] tfe__ has joined the channel [03:07] dannycoates has joined the channel [03:07] dannycoates: la [03:07] ryah: konobi: don't know :/ [03:08] konobi: ryah: mkay [03:08] dannycoates: anyone know how many talks there will be at nodeconf? [03:12] ryah: dannycoates: i think he's trying to decide on two tracks or one still [03:15] dannycoates: cool. I'm thinking of submitting a proposal for a debugging talk. any interest? [03:17] curtischambers has joined the channel [03:18] zentoooo has joined the channel [03:19] ReshadN has joined the channel [03:19] ReshadN: Hello all! [03:20] pauls: hi there [03:20] ReshadN: I've recently switched from a pc to a mac and am stuck with warnings when trying to ./configure node.js [03:20] ryah: dannycoates: definitely! [03:20] ryah: ReshadN: what kind of warnings? [03:21] ReshadN: node-v0.2.6/wscript:138: error: could not configure a cxx compiler! [03:21] ReshadN: Checking for program g++ or c++ : not found [03:23] chapel: you need xcode [03:23] ReshadN: can't figure out how to download or install the g++ or c++ compiler [03:23] chapel: install xcode [03:23] chapel: should be on your osx install disk [03:23] ReshadN: xcode? free download from Apple? or developer account required? [03:24] chapel: http://www.askdavetaylor.com/how_to_install_apple_developer_tools_cc_gcc_mac_os_x.html [03:24] v8bot has joined the channel [03:24] stride has joined the channel [03:24] ReshadN: Thank you very much. @chapel and @ryah Going to check it out now. [03:27] jacobolus has joined the channel [03:31] rictic has joined the channel [03:32] ericnakagawa has joined the channel [03:37] fairwinds has joined the channel [03:38] luke` has joined the channel [03:39] luke`_ has joined the channel [03:40] jacobolus has joined the channel [03:41] mikeal has joined the channel [03:48] mravaux has joined the channel [03:50] piscisaureus: ACTION time to go to bed [03:51] iszak: Night piscisaureus. [03:52] pauls: nite nite [03:52] Lorentz: Hmm, so no websockets through nginx reverse proxy. [03:53] piscisaureus: thnx all [03:54] silence has joined the channel [03:55] mscdex: Lorentz: no draft 76 websockets through any reverse proxy except node [03:56] mscdex: not sure about the latest version/draft [03:57] warz: i dont even think websockets work anywhere other than chrome and iphone safari, from what ive seen [03:58] iszak: nothing wrong with that. [03:58] iszak: Firefox 4 no doubt supports it too, but not out yet obviously. I would rather have websockets with longpolling fallback. [03:58] micheil: yeah drafts prior to -05 or -04 won't work through most proxies [03:58] Lorentz: Thought ff4 dropped websockets due to that security thing. [03:59] Lorentz: Or did they put it back in? [03:59] iszak: oh wow [03:59] iszak: No you're probably right. [03:59] warz: last i read it was dropped [03:59] micheil: as for most browsers, they are currently either disabling them or actively working on -04+ [03:59] micheil: firefox and opera have disabled websockets [03:59] micheil: safari is unconfirmed [04:00] micheil: chrome is continuing to have websockets, as they can upgrade every user of their browser in about 24 hours supposedly [04:00] dipser_ has joined the channel [04:00] iszak: more browsers should take that approach [04:01] micheil: as far as chrome and google are concerned, that while there is an expliot, it's something that's existed in flash and java for far longer [04:01] iszak: All browsers should basically be rolling releases. [04:01] Lorentz: It's really the fault of badly implemented proxies, as far as I could tell. [04:01] micheil: as it was through flash and java plugins that this hack was possible [04:01] Lorentz: But nobody wants to fix those. [04:02] mscdex: iirc firefox 4 has websocket support built-in, it's just disabled by default [04:02] micheil: actually, Lorentz, having data after the headers in a request, but not declaring that data in Content-Length or transfer-encoding chunked is against spec, iirc [04:02] micheil: mscdex: right. [04:02] ReshadN: Success! Running Node.js 0.2.6 on my new mac! [04:03] ReshadN: thanks! [04:03] pauls: grats! [04:03] pauls: have fun and build something awesome :D [04:03] iszak: if you're a baller you'll be running 0.3.8-pre! [04:03] mike5w3c has joined the channel [04:04] Lorentz: micheil: Hmm, I see [04:05] ReshadN: that sounds like a challenge. Is 0.3.7 or 0.3.8 stable? [04:06] gkatsev: ff4 does have websocket support, however, it is disabled by default. [04:08] Twelve-60: the data event on net.Stream(), can i make it wait until newline? [04:08] Twelve-60: or do i have to keep reading it [04:08] Twelve-60: until newline [04:09] iszak: ReshadN, neither are stable, the whole 0.3.x is classified as unstable AFAIK [04:10] ReshadN: how do i revert back? [04:10] amerine has joined the channel [04:12] mscdex: Twelve-60: just keep buffering the data into a variable until you see a newline [04:12] ReshadN: 0.2.6 running like a dream [04:13] fairwinds: am just looking for simple in memory cache for express. what are my options? [04:14] pauls: @ReshadN as isaacs taught me earlier today, there are a few utils you can use to manage your node version, like nave and nvm. you can install them via npm (node package manager) by doing something like `npm install nave`. if you use nave then you can do something like this, `nave usemain 0.2.6` if you want to revert back to 0.2.6 [04:15] pauls: at least that's what i thought you were asking :P [04:15] themiddleman has joined the channel [04:17] mravaux has left the channel [04:17] fairwinds: found this: https://github.com/ptarjan/node-cache [04:22] ReshadN: thanks @pauls [04:23] ReshadN: node -v still shows v0.2.6 so I'm good to go. [04:24] Twelve-60: mscdex: there clearly should be inbuilt functionality for this :P [04:26] stride has joined the channel [04:28] mscdex: Twelve-60: meh, it's not that difficult to do really [04:28] mscdex: i think someone even wrote a module for it [04:29] fairwinds: looks like connect has an in memory cache as well. [04:29] mscdex: Twelve-60: https://github.com/pgte/carrier [04:30] Twelve-60: mscdex: oo ty [04:30] mscdex: Twelve-60: although, imho even that module is too verbose and complicated [04:32] breccan has joined the channel [04:32] sechrist: Is there a way to add to the require paths that affects the paths of modules? [04:33] Twelve-60: true [04:36] PyroPeter has joined the channel [04:38] mscdex: Twelve-60: https://gist.github.com/803646 [04:38] pt_tr has left the channel [04:38] Twelve-60: oh wow :D [04:38] mscdex: actually, wait [04:38] mscdex: need to make a change [04:38] Ond has joined the channel [04:39] andrewfff has joined the channel [04:41] mscdex: Twelve-60: ok there. untested, but you get the idea [04:43] mischief has joined the channel [04:43] mischief has joined the channel [04:43] sechrist: Ok so am I supposed to make some directory that my git clones go into, and then symlink the lib directory in there into ~/.node_modules? [04:43] sechrist: Man this is kind of a mess [04:43] ROBOTARMY has joined the channel [04:44] Aria: That's one option. Or just install them into node_modules. [04:44] sstephenson: sechrist: you can `npm link` in the git checkout [04:44] Aria: (I have ~/Projects and npm links into ~/.node_modules) [04:44] sechrist: I'd prefer not to use npm [04:44] sechrist: I have to automate this to be deployed [04:45] sstephenson: npm bundle helps with deployment [04:45] sechrist: actually it may just be easier to hack node itself to add more library search paths [04:45] sechrist: :\ [04:45] beawesomeinstead has joined the channel [04:45] iszak: sechrist, don't resist, give in to npm [04:46] sechrist: well I know for a fact I can't even use the npm repo [04:46] iszak: i mean do you really want to use trunk builds? [04:46] sechrist: those machines don't have routes to the inet [04:46] sstephenson: you can depend on urls in package.json - if the git repo is on github, you can use the tarball url from the download button for a specific revision [04:46] sstephenson: or have a local mirror [04:46] ReshadN has joined the channel [04:46] iszak: sechrist, so why not just git clone remove the git directory and put it directly in .node_modules, not like you'd be doing a git pull anytime soon. [04:47] sstephenson: so you can just give your app a package.json file, then run npm bundle on the server after you deploy [04:47] zzak: cool, got my nodester invite :) [04:47] sechrist: the .node_modules is throwing me off [04:47] Aria: Er. .node_libraries. [04:47] sechrist: our convention is to have libraries and stuff inside a directory with our app [04:48] sechrist: so chef doesn't have to screw with user-specific things [04:48] sstephenson: npm bundle installs all dependencies in node_modules/ [04:48] andrewfff has joined the channel [04:48] Aria: You can do that, too, you know. (and it's a good practice for publishing and deploying things that need to keep dependencies tight.) [04:48] sechrist: how can I do that without manually hacking the require paths of every module? [04:48] sechrist: or is that the minimum level of pain to endure? [04:49] sechrist: it seems that require.paths.unshift() doesn't seem into included modules. [04:49] sechrist: seep* [04:50] Aria: It should. Also, you can set it in the environment. [04:51] sechrist: ahh that is much better [04:51] sechrist: that's what we do for LD_LIBRARY_PATH and PYTHONPATH [04:51] Aria: That's underused, I think. [04:51] shaver: do we need a virtualenv for node? [04:52] chapel: mikeal micheil ryah great podcast, want more :) [04:53] micheil: chapel: there's actually about 4 new interviews [04:53] chapel: awesome [04:53] micheil: I just need to mix them down and then release them [04:53] chapel: nice to have some nodeness to listen to [04:59] bingomanatee: I've put some documentaition on my site for using mongo + node, with some useful classes. Its not complete but hopefully some here may find it useful: http://wonderlandlabs.com/wll_drupal/os/node/mongodb.html [04:59] sudoer has joined the channel [05:00] warz: hrm. im trying to get express.js to handle an "OPTIONS" request. does anyone have any pointers as to how to handle this type? i recall seeing how to do this in the docs, i think, but i cant seem to locate it now. [05:00] pauls: thanks! i use mongoose, myself, but have been considering looking into the native driver so that i can get support for map reduce [05:01] iszak: Is there any ambitions to port console.profile(name) and console.profileEnd(name); to Node.js? [05:01] bingomanatee: I have got map reduce down - I'll put the docs up tomorrow [05:02] bingomanatee: its a real ballbuster [05:02] iszak: Because having the profile methods would be greatly beneficial. [05:03] pkrumins: Hey, anyone wants to contract hire a talented node.js developer (me)? Looking to making some additional money. I am best at writing C++ bindings for node.js! I am the StackVM / Browserling guy and I run the http://www.catonmat.net blog. Basically if we can't raise money within end of February, I will want to do contract work. [05:03] micheil: iskren: I think they may already exist [05:03] micheil: iszak: see console.time and console.timeEnd [05:04] micheil: iszak: is the console module documented? [05:04] pauls: @pkrumins you might want to try hacker news. i've heard people have some succeess there [05:04] pkrumins: dont want to go that public with that [05:05] pauls: ic [05:05] pauls: goodl uck though :) [05:05] pkrumins: thx [05:05] iszak: micheil, nay [05:05] micheil: iszak: could you create an issue on github.com/votizen/node/issues to document it? [05:05] iszak: the fact that console.time isn't mentioned in the documentation? [05:06] andrewfff has joined the channel [05:06] micheil: yeah, if that console module isn't documented, just say "Document "console" module [05:09] sprout1 has joined the channel [05:09] iszak: is there any way to load a module export via a variable? e.g. var require('foo').variable? [05:10] Aria: var variable = require('foo') ? [05:11] iszak: sorry [05:11] iszak: i meant like var xyz = require('foo').variable; [05:11] Aria: Sure. [05:11] Aria: just set exports.variable in the module. [05:11] micheil: yeah, if 'foo' exports variable [05:13] iszak: no variable is a variable. [05:14] shiawuen has joined the channel [05:15] softdrink has joined the channel [05:15] iszak: so lets say I have var someVar = 'foo'; and I want to do var foo = require('bar').someVar; [05:16] wadey has joined the channel [05:16] softdrink has joined the channel [05:16] Aria: Then exports.someVar = someVar in the module. [05:16] Aria: You can't get at locals if they're not exported -- no peeking inside modules. [05:16] iszak: not sure you understand.. [05:20] bstimmerman has joined the channel [05:21] bstimmerman has left the channel [05:23] rictic has joined the channel [05:25] mscdex: iszak: you mean like: var someVar = 'baz', foo = require('bar')[someVar]; where the 'bar' module has: exports.baz = 'blah'; ? [05:25] mscdex: :S [05:25] iszak: perfect. [05:26] Aria: Ah, variable name of variable. Yeah. [] [05:28] kawaz_air has joined the channel [05:30] matyr has joined the channel [05:34] Coal has joined the channel [05:35] Sumit has joined the channel [05:35] Sumit: Hey Guys, I am new to node.js and very new to Java Script as well, ( I am from C,C++ Background) -- I wanted to understand node.js code , [05:36] Sumit: Can you please (any one) can provide any guidelines to understand node.js code [05:36] Aria: The code of the interpreter, or code written to use node.js? [05:36] Sumit: code written to use node.js [05:36] micheil: Sumit: I would suggest learning the JavaScript language first, the Mozilla Developer Center has a fairly decent tutorial for doing this [05:36] atmos has joined the channel [05:36] Sumit: e.g; http.js [05:37] Sumit: buffer.js [05:37] micheil: as for understanding the actual code of node.js, it generally requires a high level of knowledge of JavaScript and some knowledge of C/C++ [05:37] Sumit: I have good knowledge of C/C++ [05:37] Sumit: but for javascript nothing!! [05:38] Sumit: But basic stuff of javascripts I can understand [05:38] micheil: I would also suggest that you look at the API documentation: http://nodejs.org/docs/v0.2.6/api.html [05:38] micheil: (that's for the current stable release of Node.js, for the unstable releases, see: http://nodejs.org/docs/v0.3.6/api/ [05:39] Sumit: But it uses what -- prototypes, customized objects ,exports etc [05:39] Sumit: Is there any documentation which tells anything about its code ? [05:39] micheil: not really. [05:39] Sumit: All eample just explain *Hello World!* [05:39] warz: Ah. I see the master version of Express supports app.options() [05:39] micheil: Node.js follows the CommonJS patterns, but only loosely [05:39] EyePulp has joined the channel [05:39] warz: Guess it's time to move to master. [05:40] micheil: Sumit: if you are just starting to learn JavaScript / Node.js, then I wouldn't really suggest diving straight into the node core code. [05:40] Sumit: That's what I am going to do on next -- trying to understand CommonJs Stuff [05:40] stride has joined the channel [05:40] micheil: Sumit: a popular thing to do is to write API wrapper modules, or database drivers or similar [05:40] Sumit: Actually as my work assignments require some changes in code, [05:41] Sumit: I suppose to write http-proxy app by using node.js [05:41] micheil: the main pieces of CommonJS that node uses are explained in the documentation [05:41] Sumit: Node.Js documentation ? [05:41] micheil: Sumit: okay, so you'd need something that is a http.Server and a http.Client [05:42] Sumit: Yes [05:42] micheil: see above for the documentation links [05:42] micheil: they can both also be found on http://nodejs.org [05:43] Sumit: Yes - Micheil, I have already installed node.js in my system, and I can easily understand node.js http client/server [05:43] micheil: okay, so you just need to figure out how to connect it all up [05:43] Sumit: On next - I suppose to write some APIs by using node.js frameworks, and it also require to add some plugins for file transfer etc. [05:44] comster has joined the channel [05:45] curtischambers has joined the channel [05:45] aaronblohowiak has joined the channel [05:45] micheil: Sumit: start simple, then grow. [05:46] Sumit: Thanks Micheil [05:46] Sumit: You are right , I am doing in similar way [05:47] iszak: how do I inject variables into a module? [05:47] Sumit: I have already understood this http.client/server stuff, studied all node.js apis etc !! // thanks I will follow the way you explained just [05:48] micheil: iszak: as in? [05:48] iszak: hmm. [05:49] iszak: dw [05:49] iszak: for now.. [05:49] micheil: generally information is passed about either as variables or function arguments [05:49] micheil: myModule.myvar = "foo" [05:49] micheil: myModule = require("myModule") [05:50] micheil: (reverse those two lines) [05:50] iszak: ah, perfect. [05:50] micheil: and then myModule just needs to know that myvar exists [05:50] micheil: that assumes that myModule is an instance of myModule [05:51] micheil: iszak: for example, see the code at http://github.com/votizen/facebook-graph-client [05:51] micheil: specifically the tests and then the index.js [05:55] aaronblohowiak: Hahahaha, we're still waiting for the one that forces people to urinate [05:55] ajpiano has joined the channel [05:56] aaronblohowiak: (best interview with our BDFL, ever:) http://thenoded.com/ep02.mp3 [06:01] benburkert has joined the channel [06:01] richcollins has joined the channel [06:07] iszak: hmm can't seem to export the variable.. [06:08] matyr_ has joined the channel [06:08] micheil: aaronblohowiak: cheers :) [06:08] aaronblohowiak: :) [06:09] micheil: aaronblohowiak: I quite like the quote by Mikeal about being down in the trenches in the early days [06:09] aaronblohowiak: iszak: module.exports.blah = "foo"; [06:09] aaronblohowiak: micheil: when node is done, what are we going to do? [06:09] aaronblohowiak: ACTION has never finished anything [06:10] micheil: aaronblohowiak: node will never be finished; and when it is, will use it. [06:10] aaronblohowiak: yay! [06:10] iszak: aaronblohowiak, you don't understand. [06:10] Me1000 has joined the channel [06:11] aaronblohowiak: iszak: you're right, i'm sorry [06:11] aaronblohowiak: iszak: i'm going to go to bed then. [06:11] iszak: my fault, I should've elaborated. [06:12] iszak: Basically I want to pass a variable to the module I'm loading. [06:13] wadey: iszak: not sure how well I can explain, but the way I do this is by exporting a function from my module [06:13] wadey: in the module: [06:14] wadey: module.exports = function(settings) { return {a: 1, b: 2} } [06:14] wadey: then, when you want to use it [06:14] wadey: require('./module')(settings) [06:14] matyr has joined the channel [06:14] iszak: is that standard practice? [06:14] MikhX has joined the channel [06:15] wadey: i'm not sure, it seems to work pretty well for me [06:15] aaronblohowiak: iszak: yes. your module should generate new things for the libraries that consume it, it should not be shared across its consumers [06:15] aaronblohowiak: think of your module like a factory [06:15] aaronblohowiak: and the things that require() it, the consumers [06:17] softdrink has joined the channel [06:18] iszak: still don't understand, but wadey thanks for the module.exports, that helped with something else [06:18] iszak: wadey++ [06:18] v8bot: iszak has given a beer to wadey. wadey now has 1 beers. [06:18] wadey: no problem! [06:19] matyr has joined the channel [06:20] iszak: is it advised to use full paths, relative paths in require? [06:20] Aria: Depends on what you want. You almost never want full paths. [06:20] iszak: really? [06:20] Aria: Yeah. Things get moved and installed and whatnot ;-) [06:20] iszak: I would've assumed full paths always as otherwise it'll have to resolve. [06:21] iszak: full path based on __dir that is. [06:21] Aria: No, don't do that. use ./ for that. [06:21] Aria: If it's part of the same structure, use ./ or ../whatever. (foo.js and bar.js in the same directory, require('./bar') in foo.js, etc.) [06:21] iszak: but wouldn't it have to resolve ./ all the time? [06:21] Aria: All what time? [06:21] iszak: well it'll have to resolve ./ to a full path [06:22] Aria: It has to resolve it when you call it, sure. [06:22] Aria: What do you think _dir is? [06:22] Aria: or __dirname, actually. [06:22] iszak: it's a full path of the current directory the file is in. [06:22] Aria: It's not a complicated resolution. It's not a critical path either. [06:22] Aria: That's called resolution ;-) [06:22] iszak: so what's wrong with using __dirname? [06:22] Aria: It's complicated. [06:22] Aria: It's the same thing as ./. [06:23] wadey: it's key to know that './' is relative to __dirname, not to the current working directoy. So it should always do what you want [06:23] wadey: you dont have to worry about it [06:23] iszak: oh wait [06:24] iszak: so if I do like node /path/to/folder/script.js it'll use the current directory I'm in not /path/to/folder/ ? [06:24] wadey: require('./file') will use the diretory that the script is in [06:24] wadey: not the current working directory [06:24] Aria: Right. [06:24] wadey: './file' === __dirname + '/file' [06:24] iszak: I understand what the relative path is. [06:24] aaronblohowiak: cwd is used by file, but not require. interesting inconsistency i hadn't noticed before, but matches what i expect [06:25] iszak: I think I want __dirname. [06:25] aaronblohowiak: iszak: you are just typing more unnecessarily if you use __dirname [06:25] Aria: Yeah. [06:25] sudoer has joined the channel [06:26] Aria: And doing string manipulation to load a module. [06:26] aaronblohowiak: Aria: that does not matter [06:26] Aria: I find it does -- it's yet another concept to read and think about (and try to remember if you need a / in there...) [06:26] aaronblohowiak: oh, cognitively, yes. it does. [06:26] aaronblohowiak: good point [06:26] aaronblohowiak: Aria++ [06:26] v8bot: aaronblohowiak has given a beer to Aria. Aria now has 1 beers. [06:27] aaronblohowiak: Aria, do you have a github account? [06:27] Aria: "aredridel", yes. [06:28] sechrist has joined the channel [06:28] aaronblohowiak: oh, you're the fork() guy [06:28] aaronblohowiak: oh wait, you forked that lib [06:28] aaronblohowiak: n/, [06:28] MikhX has joined the channel [06:28] Aria: Hehe. I'm the html5 parser gal ;-) [06:29] Aria: But I was talking about fork() rather a lot. [06:29] aaronblohowiak: Aria: =) ah, i see you're contributing to jsdom as well. neat [06:29] Aria: Indeed. I keep breaking it ;-) [06:29] iszak: aaronblohowiak, not at all [06:29] aaronblohowiak: ;) [06:29] aaronblohowiak: iszak: eh? [06:30] aaronblohowiak: Aria: also, sorry about the gender confusion =/ [06:30] iszak: it's a user defined variable that's being used throughout the application. [06:30] Aria: Hehe, no worries. I'm rather used to that. [06:30] iszak: so i'm using like var.path [06:31] aaronblohowiak: iszak: well, if you really really absolutely must have a global variable... there is a way [06:31] aaronblohowiak: i heard that it requires a blood sacrifice, though [06:31] iszak: well it's not global per say. [06:31] iszak: it's a "module" kinda, which is really just an object. [06:31] aaronblohowiak: iszak: "per se" [06:31] Aria: Like a configuration object? [06:32] iszak: aaronblohowiak, meh. [06:32] Aria: A list of settings? [06:32] iszak: Aria, yes like a config obj. [06:32] Aria: The kind of thing that /is/ nearly global, eh? [06:32] iszak: not necessarily. [06:33] matyr_ has joined the channel [06:33] aaronblohowiak: if you need to pass its values around as a dependency, use the module-as-factories.. if you need it to be a global, then go that route.. there *is* a way to evaluate a script within a given context, but you probably dont want to do that [06:35] wadey: yeah, I like the dependency injeciton route [06:36] skot has joined the channel [06:37] pauls has joined the channel [06:37] aaronblohowiak: wadey: part of me wants to make an "ironic" dependency injection framework for node [06:37] aaronblohowiak: "Enterprise Node Dependency Management and IoC Container Context" [06:37] wadey: :) [06:37] aaronblohowiak: i will try to make it three lines or less. [06:39] jchris has joined the channel [06:41] amerine has joined the channel [06:43] matyr has joined the channel [06:45] warz has joined the channel [06:45] stride has joined the channel [06:46] _jud has left the channel [06:46] iszak: hmm, i've come to realise modules aren't really restricted to "middleware" in that sense. [06:46] statim has joined the channel [06:47] derferman has joined the channel [06:47] flippyhead_ has joined the channel [06:48] statim: im trying to package up my app with all dependencies tarballed, since unfortunately where it needs to be deployed it has crazy firewalls that dont allow any outbound. i think im on the right track with npm bundle and package.json dependencies, but i cant see to put it all together. anyone done this? [06:51] zylo has joined the channel [06:53] Twelve-60 has joined the channel [06:58] mlins has joined the channel [07:03] luke` has joined the channel [07:04] micheil: statik: I'll have something useful to you in the coming weeks. [07:04] micheil: statim: ^^ [07:04] micheil: statim: `npm install deploy` will be it. [07:05] micheil: it's no where near ready yet though [07:05] statim: micheil: cool, look forward to it. i assume for now i could manually get tarballs of everything i know it needs and then npm install each tgz [07:05] isaacs has joined the channel [07:05] micheil: statim: pretty much. [07:05] iszak: micheil, is my statement above correct? ^ [07:05] micheil: isaacs: why hello there, we were just talking about npm and deploying [07:06] micheil: iszak: uhh, I guess [07:06] micheil: iszak: modules are anything. [07:06] iszak: exactly. [07:06] statim: it would be cool if it was possible to have a completely self-contained deploy.. where even node was specific to the app. not sure if thats too uncommon for people though [07:07] micheil: statim: this tool won't automatically do that for you, but I'm sure you could do it with a pre-deploy script.. [07:08] mikeal has joined the channel [07:09] SamuraiJack has joined the channel [07:09] mraleph has joined the channel [07:09] tc77 has joined the channel [07:10] liar has joined the channel [07:11] nu- has joined the channel [07:14] ajcates has joined the channel [07:18] Coal has joined the channel [07:18] vineyard has joined the channel [07:18] muhqu has joined the channel [07:20] MatthewMueller has left the channel [07:23] losing has joined the channel [07:23] galaxywatcher has joined the channel [07:25] matyr_ has joined the channel [07:26] rictic has joined the channel [07:27] ajcates: Hey [07:27] ajcates: so im coming from a php background [07:27] ajcates: and am used to useing varible varibles [07:28] ajcates: and am wodering how i could achive the same thing in js [07:31] Ond: Varible varibles [07:31] Fuld_ has joined the channel [07:33] micheil: ajcates: by definition a variable is variable.. [07:34] ajcates: http://php.net/manual/en/language.variables.variable.php [07:34] Fuld_: Eww don't swear :p [07:35] JimBastard has joined the channel [07:35] Aria: As in PHP, you usually want a hash (array) [07:36] AAA_awright: ajcates: Variable variables are evil! You shouldn't need them anyways, I think... if object={a:2} then object.a == object["a"] == 2 [07:36] Aria: instead of $$a, $a['foo'] [07:36] Aria: in javascript, same sort of deal -- and nicely, object.foo and object['foo'] are the same [07:36] ajcates: yea but i want to store the path to a['foo']['meh'] in a varible [07:37] Aria: And so v = 'foo'; object[v] [07:37] ajcates: or well dynamicly access a nested object [07:37] oyvind has joined the channel [07:37] Aria: So store two variables. [07:37] Aria: f = 'foo'; m = 'meh'; a[f][m] [07:37] AAA_awright: For an arbritary depth, you need a recusive function and an Array [07:37] neshaug has joined the channel [07:38] Aria: Aright. I'm out, my brain is mush thanks to HTML5 parsing. Night, all! [07:38] AAA_awright: function(object, path){return arguments.callee(object(path.shift(), path);} [07:38] AAA_awright: That should work [07:38] AAA_awright: er [07:38] AAA_awright: function(object, path){return arguments.callee(object[path.shift()], path);} [07:39] AAA_awright: v8: (function(object, path){return arguments.callee(object[path.shift()], path);})( {a:{b:{c: 2}}}, ['a','b','c'] ); [07:39] v8bot: AAA_awright: TypeError: Cannot read property 'undefined' of undefined [07:39] AAA_awright: hmm [07:39] AAA_awright: Oh [07:41] AAA_awright: v8: (function(object, path){return path.length?arguments.callee(object[path.shift()], path):object;})( {a:{b:{c: 2}, x:4}}, ['a','b','c'] ); [07:41] v8bot: AAA_awright: 2 [07:41] AAA_awright: Ta-da [07:41] AAA_awright: v8: (function(object, path){return path.length?arguments.callee(object[path.shift()], path):object;})( {a:{b:{c: 2}, x:4}}, ['a','x'] ); [07:41] v8bot: AAA_awright: 4 [07:46] matyr has joined the channel [07:47] stride has joined the channel [07:51] vyvea has joined the channel [07:52] meder: hey all [07:53] matyr has joined the channel [07:53] meder: i'd like to move my Mongoose .model declarations out to an external file.. right now var db = mongoose.connect() is the reference i have in my script. If I make a module, how could I make sure that the reference stays intact? [07:54] meder: var db = require('./vendor/mongoose/mongoose'); in the mongoose file, how do i make sure the reference is to .connect()? [07:57] skm has joined the channel [07:57] jimt_ has joined the channel [08:00] mraleph has joined the channel [08:02] svenlito has joined the channel [08:03] matyr has joined the channel [08:03] tilgovi has joined the channel [08:04] mikeal has joined the channel [08:05] fangel has joined the channel [08:05] MikhX has joined the channel [08:08] nejucomo has joined the channel [08:08] losing has joined the channel [08:09] ericnakagawa has joined the channel [08:09] dekz has joined the channel [08:10] jimt has joined the channel [08:11] ajcates: https://gist.github.com/803756 [08:11] ajcates: say i want to take a dir and turn it into an object [08:12] ajcates: whats the best way about going about that? [08:12] ajcates: is there like some scanRecusiveDir function that i don't know about? [08:13] Fuld_: ajcates: Sounds like a good idea for another node.js module :) [08:15] ph^ has joined the channel [08:15] iszak: ajcates, use shell commands? [08:16] ajcates: iszak no thank you [08:16] ajcates: Fuld_: you don't know of any premade modules? [08:16] iszak: why not? [08:17] iszak: won't be very portable for those windows boys, but oh well. [08:18] mAritz has joined the channel [08:21] Twelve-60 has joined the channel [08:22] dekz has joined the channel [08:22] iszak: ajcates, why not create one? [08:22] ajcates: i think i might [08:23] ajcates: although it would have to use my async plugin [08:23] iszak: ajcates, it'll be a good learning experience. [08:23] ajcates: im kinda trying to write my own framework with node.js [08:23] iszak: lets see? [08:23] ajcates: i already got an async module [08:23] iszak: async module.. i see [08:23] ajcates: i haven't pushed the framework to github [08:23] ajcates: but i can [08:23] ajcates: the async is up [08:23] ajcates: https://github.com/ajcates/lsd [08:24] ajcates: it works alot like the flow-js module [08:24] ajcates: but i wrote it [08:24] hwinkel has joined the channel [08:25] dekz has joined the channel [08:26] dekz: is it possible to run a http request in node.js through something like tsocks? [08:26] ajcates: anything is possible with node.js [08:26] ajcates: just have to use the power of imagination or really good programing [08:26] ajcates: lol [08:26] dekz: >< [08:26] ajcates: haha [08:27] ajcates: that didn't really answer your question did it? [08:27] void_ has joined the channel [08:29] slaskis: anyone here tried the testosterone test module? [08:37] TomY_ has joined the channel [08:38] Druid_ has joined the channel [08:39] [AD]Turbo has joined the channel [08:39] [AD]Turbo: yo all [08:39] timemachine3030 has joined the channel [08:41] Ezku\ has joined the channel [08:41] torgeir has joined the channel [08:41] masahiroh has joined the channel [08:42] mscdex: SubStack: ping [08:53] matyr_ has joined the channel [08:54] stride has joined the channel [08:57] admc1 has joined the channel [08:58] ntelford has joined the channel [08:59] ntelford has joined the channel [09:03] SubStack: mscdex: pong [09:04] chapel: SubStack: poying? [09:07] kal-EL_ has joined the channel [09:11] gattuso has joined the channel [09:11] stagas_ has joined the channel [09:12] rsms has joined the channel [09:12] aklt has joined the channel [09:12] ROBOd has joined the channel [09:14] ajcates: k [09:15] ajcates: so about the file module thing that loads a dir into a nice nested object [09:15] ajcates: this is what i got: https://gist.github.com/803804 [09:15] clarkfischer has joined the channel [09:16] ajcates: its giving me https://gist.github.com/803758 when log out the templates variable. https://gist.github.com/803758 [09:16] ajcates: i want to get something that looks more like: https://gist.github.com/803756 [09:18] nuke-- has joined the channel [09:18] bingomanatee: Okay I put up an article on map/reduce and Christkov's mongodb native libs here: http://wonderlandlabs.com/wll_drupal/os/node/mongodb/map_reduce.html [09:18] bingomanatee: enjoy. Hopefully it will save someone the grind I had to go through to get it. [09:18] chapel: couchdb [09:18] chapel: :) [09:18] bingomanatee: It's on the way. [09:19] bingomanatee: Let's just say it will come after Rails. [09:19] chapel: well no need for couchdb guide, well maybe useful for some people, but its really straight forward in node [09:19] chapel: good on you getting stuff out though [09:19] bingomanatee: Yeah - can't say I've been overjoyed with my MongoDB experience in node. [09:20] bingomanatee: Fairly excruciating - not that PHP was much better. [09:20] chapel: heh [09:20] chapel: have you played with couchdb? [09:20] mraleph has joined the channel [09:20] bingomanatee: Not yet. I was going to crash test it with a client but he finked on me. [09:20] skm has joined the channel [09:20] chapel: you should play with it [09:21] bingomanatee: I have a pretty tight schedule of private tasks. Couch is definately on the plate but RoR is first. [09:21] bingomanatee: I think it would be cool. [09:21] chapel: its pretty nice, really simple, but powerful [09:21] mscdex: SubStack: there is no way to skip an arbitrary number of bytes with node-binary? [09:21] bingomanatee: I Definately want to do Couch and Redis this year. [09:21] chapel: ror, why ror? [09:21] mscdex: SubStack: i saw node-bufferlist had something like that [09:21] bingomanatee: Well, its a thing I've not tried yet. [09:21] bingomanatee: Want to see what all the fuss is about. [09:21] chapel: eh [09:21] chapel: before node, I would have said try it [09:22] chapel: but all it will do is show how great node is [09:22] chapel: so hell, try it [09:23] bingomanatee: I've noticed that it has set a few industry standards for Rest ET ALL and as I do want to create more industry standard components for Node I think I'll find it at least a little instructive. [09:23] dekz: anyone know if it's possible to tunnel a node.js HTTP client using tsocks? [09:23] bingomanatee: Right now my points of reference for frameworks are Zend Framework, Drupal (leave me alone), XOOPS, Joomla, and Express. [09:24] chapel: heh bingomanatee [09:24] SubStack: mscdex: there's no skip() in binary but there is buffer() [09:24] chapel: well express is based on sinatra [09:24] chapel: which is a ruby framework [09:24] chapel: competing with rails [09:24] kubrow has joined the channel [09:24] bingomanatee: Yeh - and Cake. [09:24] stagas_ has joined the channel [09:24] mscdex: SubStack: i saw that, but i don't want to save the values in the vars [09:25] mscdex: since it's throwaway data [09:25] SubStack: mscdex: here I'll add it real quick [09:25] bingomanatee: I also want to give Backbone a go. [09:25] mscdex: heh [09:25] bingomanatee: I think I'm going through my engineering midlife crisis. [09:26] chapel: backbone is pretty cool [09:26] chapel: specially if you hook it directly to node [09:27] q_no has joined the channel [09:27] ajcates: any body willing to help me? [09:27] bingomanatee: Thats what I plan to try. Not sure what I'd try it on. [09:28] bingomanatee: Does it play well with Express or just replace it? [09:28] lumino has joined the channel [09:28] SubStack: the heck, some bug slipped into binary, fixing that too [09:29] mscdex: SubStack: also, what about a method that advances the offset until a certain string of bytes is found? [09:29] chapel: bingomanatee: doesn't replace it [09:29] chapel: well, depends on what you are making [09:29] mscdex: maybe that could be the same method [09:30] mscdex: .skip() that takes an number or an array [09:30] bingomanatee: Well I hope to have fun. [09:30] SubStack: mscdex: sounds useful [09:30] bingomanatee: I am actually starting to wish that the industry wasn't so hot right now. [09:31] bingomanatee: Getting a HUGE amount of traffic / work - honestly haven't seen demand like this since the mid 90's. [09:31] bingomanatee: Feels perverse with so many people on the rocks. [09:33] bingomanatee: Night all. [09:33] bingomanatee: Happy noding. [09:33] chapel: ajcates: hmm, the log module, is that custom? [09:33] matyr has joined the channel [09:33] ajcates: yea [09:33] ajcates: it just prints stuff to the terminal as the script runs [09:33] ajcates: really basic [09:34] ajcates: https://github.com/dylang/logging [09:34] ajcates: i think thats the logging module i use [09:34] ajcates: but yea [09:34] ajcates: i really want to figure out how i can load a dir into an object [09:34] ajcates: it will make working with templates and stuff retardly easy [09:35] ajcates: also after i have them loaded into an object i have to parse them with the haml module [09:35] iszak: why would it make it retardly easy? [09:36] ajcates: becuase [09:36] ajcates: i could just call templates.common.nav [09:36] ajcates: and blam have the nav template all ready togo [09:37] tilgovi has joined the channel [09:39] pdelgallego_ has joined the channel [09:39] pdelgallego has joined the channel [09:39] caolanm has joined the channel [09:44] jimt_ has joined the channel [09:44] seemann has joined the channel [09:44] hellp has joined the channel [09:45] svenlito_ has joined the channel [09:46] codetonowhere has joined the channel [09:47] d0k has joined the channel [09:51] vineyard has joined the channel [09:52] ErikCorry has joined the channel [09:55] Paul___ has joined the channel [09:59] SubStack: mscdex: ok I have numeric skip working [09:59] SubStack: search string skip is harder, writing [09:59] bzinger has joined the channel [10:00] SubStack: aha I can write it in terms of loop() [10:04] dsirijus has joined the channel [10:04] admc2 has joined the channel [10:04] admc3 has joined the channel [10:06] mscdex: woot! it works :-D [10:06] mscdex: awesome [10:06] SubStack: oh here I'll publish what I have [10:07] mscdex: i haven't noticed a bug yet [10:08] SubStack: it's not a bug as such, just an EventEmitter leak [10:08] SubStack: ok 0.1.1 out, it has skip() and that bugfix [10:08] torvalamo has joined the channel [10:09] SubStack: calling this buffer version find [10:10] syntheze has joined the channel [10:11] webben has joined the channel [10:12] matjas has joined the channel [10:12] mamassiv has joined the channel [10:13] ajcates: so anybody wanna help me with my module [10:13] webben has joined the channel [10:14] mscdex: SubStack: cool [10:14] mscdex: ajcates: what's the problem? [10:15] ajcates: ts giving me https://gist.github.com/803758 when log out the templates variable. https://gist.github.com/803758 [10:15] ajcates: 01:16 [10:15] ajcates: i want to get something that looks more like: https://gist.github.com/803756 [10:15] SubStack: aha and then you can give an optional callback to find if you care about the data up to the search string [10:18] jimt has joined the channel [10:19] webben has joined the channel [10:19] ajcates: SubStack: ? [10:20] shajith has joined the channel [10:21] webben has joined the channel [10:21] ajcates: so about the file module thing that loads a dir into a nice nested object [10:21] ajcates: 01:15 [10:21] ajcates: this is what i got: https://gist.github.com/803804 [10:21] ajcates: i forgot about the actaul code [10:21] ajcates: lol [10:23] mscdex: SubStack: why was the one line changed from (!done) to (!done[0]) if done is always a boolean ? [10:23] mscdex: :S [10:23] SubStack: because it was an array briefly [10:23] webben has joined the channel [10:24] SubStack: but then I forgot [10:24] mscdex: oh [10:26] jetienne has joined the channel [10:26] webben has joined the channel [10:26] jimt has joined the channel [10:27] mscdex: weird stuff is afoot at github [10:27] mscdex: ok, nevermind, downloads are working now :S [10:27] mscdex: well, kind of [10:28] CrazyGoogle has joined the channel [10:28] webben has joined the channel [10:30] maushu has joined the channel [10:33] webben has joined the channel [10:33] daglees has joined the channel [10:33] daglees has joined the channel [10:34] mamassiv: can anyone maybe help me with the "carrier" module? [10:35] ajcates: link to the carrier module? [10:35] ajcates: what you need help/ [10:35] matyr has joined the channel [10:35] mamassiv: i think i am missing something obivious, but am i not able to write to a tcp stream once i let it be carried? [10:35] mamassiv: https://gist.github.com/803877 [10:35] mamassiv: like that [10:36] webben has joined the channel [10:36] mamassiv: Carrier module: [10:36] mamassiv: https://github.com/pgte/carrier [10:38] ajcates: woah [10:38] ajcates: this is way above me [10:38] ajcates: wtf is a new line terminited line [10:39] mamassiv: yeah, i read out a protocol that runs over tcp [10:39] mamassiv: a device sends positions to the server [10:39] mamassiv: and every message is terminated by a new line [10:40] mamassiv: so carrier helps you so you don't have to parse stuff for new lines, but you just get the message in one chunk [10:41] webben has joined the channel [10:41] catch23 has joined the channel [10:41] mamassiv: so that works for me, but i can't write back to the tcp socket - that would normally work inside a net.createServer(function(socket){}); [10:41] jetienne has left the channel [10:42] jetienne has joined the channel [10:42] matyr has joined the channel [10:43] webben has joined the channel [10:44] mamassiv: i suspect i am messing up something with the scope i am operating in, but can't seem to wrap my thoughts around tht [10:44] fly-away has joined the channel [10:45] kristsk has joined the channel [10:45] kristsk: labdien, calitis Biruta iesaka nevis gausties, bet pelnit labu naudu. [10:45] kristsk: ups, wrong channel. [10:47] matyr_ has joined the channel [10:48] ttpva has joined the channel [10:49] mscdex: mamassiv: here is something much simpler: https://gist.github.com/803646 [10:49] mscdex: SubStack: thanks for the changes, it works great now! :-D [10:50] sriley has joined the channel [10:51] mamassiv: mscdex: thanks, i'll give it a try [10:53] markwubben has joined the channel [11:00] kubrow has joined the channel [11:03] matyr has joined the channel [11:06] kubrow_ has joined the channel [11:06] matyr_ has joined the channel [11:07] Coal has joined the channel [11:07] zentoooo has joined the channel [11:12] SubStack: mamassiv: node-lazy can do line-buffering [11:12] SubStack: just do Lazy(stream).lines.forEach(...)_ [11:12] SubStack: s/_$// [11:14] mamassiv: ahh, that looks nice! [11:15] SubStack: there are some other line-buffering modules on npm too [11:24] Sami_ZzZ__ has joined the channel [11:24] matyr has joined the channel [11:27] altamic has joined the channel [11:31] xla has joined the channel [11:34] Z10x6k6h has joined the channel [11:35] nr has joined the channel [11:35] MikhX has joined the channel [11:35] w0rse has joined the channel [11:37] nr: hi, is this the right place to ask about express js or is there another channel ? [11:38] chapel: here is fine nr [11:39] nr: cool [11:39] nr: learning express and trying to use its test framework [11:40] nr: which works until you enable sessions and then the test no longer run [11:40] nr: Anyone have any clues? [11:45] statim has joined the channel [11:47] fermion has joined the channel [11:47] piscisaureu_ has joined the channel [11:54] zorzar_ has joined the channel [11:57] matyr_ has joined the channel [12:01] fairwinds has joined the channel [12:01] pomodoro has joined the channel [12:04] matyr has joined the channel [12:07] matyr_ has joined the channel [12:08] p4p4p4 has joined the channel [12:12] pgte has joined the channel [12:14] pomodoro has joined the channel [12:15] spetrea has joined the channel [12:21] hellp has joined the channel [12:23] MattJ has joined the channel [12:23] montylounge has joined the channel [12:26] micheil has joined the channel [12:29] amruthraj has joined the channel [12:30] silence has joined the channel [12:41] dberlinger has joined the channel [12:45] lukegalea has joined the channel [12:51] perlmonkey2 has joined the channel [12:58] adambeynon has joined the channel [12:58] svenlito_ has joined the channel [13:03] matyr has joined the channel [13:04] ajcates has joined the channel [13:07] svenlito_ has joined the channel [13:08] slaskis: how should i document my express routes, any suggestions? [13:08] rachelbutts has joined the channel [13:14] Coal has joined the channel [13:17] Gruni has joined the channel [13:21] pietern has joined the channel [13:23] ilpoldo has joined the channel [13:23] piscisaureus has joined the channel [13:25] matyr has joined the channel [13:26] jetienne: q. i look for a reference on "why modifying prototypes of global types is a bad idea" [13:26] jetienne: any suggestion [13:29] okuryu has joined the channel [13:31] Aikar: jetienne: 3rd party code may be sloppy and not use hasownproperty when doing for (var i in Object); but if your using your own code / good code from others, its not a problem [13:32] Aikar: jetienne: or always use Object.defineProperty(Object.prototype, 'blah' as that sets enumerable to false by default so it wont be in for(var i = in obj) [13:32] jetienne: Aikar: so you think it may be ok for modify Math.* and such ? [13:32] Aikar: yep, if you use Object.defineProperty its safe in Node world [13:32] jetienne: Aikar: you are not afraid of the conflict with other libraries ? they may do the same [13:33] Aikar: jetienne: if you use defineproperty, it wont affect other libs [13:33] Aikar: in browser world, not all browsers have defineProperty so thats an issue [13:33] Aikar: but in node, you have it, so your golden [13:33] jetienne: Aikar: hmmm maybe i dont understand defineProperty then [13:33] Aikar: its the same thing as doing object.blah but it sets some hidden flags and such [13:33] Aikar: lets you do getter/setter etc [13:34] Aikar: its an internal v8 thing [13:34] Aikar: !google Object.defineProperty [13:34] jetienne: Aikar: if i create a Math.slota, and you do the same, and both code are running together... this will conflict no ? [13:34] jetienne: my Math.slota gonna crush yours, or the opposite, no ? [13:35] Mike_Rice has joined the channel [13:35] Aikar: well anytime your doing it for code to share, id say its not a good idea to modify core, but for self use its fine. so most likely no lib you load will be doing it [13:36] Aikar: but yes if 2 ppl tried someones gets erased [13:36] jetienne: ah ok :) [13:37] jetienne: one of my code provider is modifying global stuff, so i look for a reference that no it is not "everyone is modyfying global prototypes" :) [13:37] chrischris has joined the channel [13:37] Aikar: or you could just give it a unique name that isnt like to be used by anyone else, or if your adding something with a specific name or action, if someone else uses same name they prolly do same thing [13:37] jetienne: yep namespace kindof thing [13:38] chrischris has joined the channel [13:40] Aikar: man wish i didnt have to go to work, tired, was up late last night >< [13:40] Aikar: welp time to head out [13:42] arpegius has joined the channel [13:50] fumanchu182 has joined the channel [13:54] rwaldron has joined the channel [13:55] stagas_ has joined the channel [13:57] dipser has joined the channel [14:00] herbySk has joined the channel [14:02] hunterloftis has joined the channel [14:03] Ori_P has joined the channel [14:06] fumanchu182 has joined the channel [14:07] svenlito_ has joined the channel [14:09] mike5w3c has joined the channel [14:10] Ori_P_ has joined the channel [14:12] chrisfrog has joined the channel [14:13] garrensmith has joined the channel [14:13] garrensmith: morning [14:13] Mike_Rice: g'morning [14:14] sveimac: ello ello [14:14] Mike_Rice: is there anyone awake with experience writing node modules? [14:14] jlecker has joined the channel [14:15] sveimac: probably (not me), but just ask :) [14:15] Mike_Rice: OK, here goes... [14:16] Mike_Rice: I'm writing a module that has a namespace wrapper, like. [14:17] Mike_Rice: exports.Bob = function(jquery) { exports.config = {foo: "bar"};}; [14:17] Mike_Rice: one, am I exporting correctly [14:17] sveimac: its module.exports [14:17] Mike_Rice: and two, would I do this to access foo [14:17] Mike_Rice: bob = require("Bob"); [14:17] Mike_Rice: myvar = bob.foo [14:18] Mike_Rice: the doc just says exports. [14:18] Mike_Rice: actually, I meant to say, myvar = bob.config.foo [14:19] chrisfrog: huys [14:19] garrensmith: Mike_Rice: its just exports.foo = "bar" [14:19] chrisfrog: guys [14:19] chrisfrog: What is the best way to create a https server? [14:20] garrensmith: Mike_Rice: why have function(jquery) ? [14:20] Mike_Rice: garrensmith, I'll be passing in a jquery object to do DOM manipulation [14:20] Mike_Rice: from JSDom [14:21] Mike_Rice: I'm writing a screenscraper and pulling out certain fields from the Dom to store in a DB [14:21] garrensmith: Mike_Rice: ok then Exports.Bod = function(jQuery) { return exports.config = {foo: "bar"};}; [14:22] garrensmith: *s/Bod/bob [14:22] garrensmith: Mike_Rice: oops sorry remove exports.config and just make it config [14:22] Mike_Rice: garrensmith, and if I'm defining multiple functions in there? [14:23] Mike_Rice: won't return end execution [14:23] Mike_Rice: it's a wrapper class for multiple methods [14:23] Mike_Rice: I don't know the javascript nomenclature [14:23] garrensmith: Mike_Rice: OK, you want to return the object with all the functions from Bob [14:24] sivy has joined the channel [14:24] Mike_Rice: garrensmith, yes [14:24] garrensmith: Mike_Rice: you know how? [14:24] Mike_Rice: and right now, my code is saying, "Cannot read property 'foo' of undefined. [14:26] garrensmith: Mike_Rice: just a second let me do a gist [14:26] Mike_Rice: k, thanks [14:26] Ari-Ugwu has joined the channel [14:26] sveimac: ouh, im not up to date... :S [14:28] garrensmith: Mike_Rice: this is one way of doing it https://gist.github.com/804091 [14:29] jherdman has joined the channel [14:29] Mike_Rice: let me try that [14:29] garrensmith: Mike_Rice: then var new_object = require('Bob')(jquery) [14:30] sprout has joined the channel [14:30] chrisfrog: I am using this code: http://pastebin.com/LTEPT99t html files are working fine, but when I try and load javascript files the browser is hanging, node isn't crashing or erroring, how can I start to debug this? [14:31] amacleod has joined the channel [14:31] montylounge has joined the channel [14:31] pauls: @chrisfrog you probably want to serve your js files as text/javascript [14:32] pauls: and html as text/html couldn't hurt either [14:34] chrisfrog: pauls: thanks i'll have a look at that now [14:34] pHcF has joined the channel [14:35] pietern has joined the channel [14:46] kris_ has joined the channel [14:47] pdelgallego__ has joined the channel [14:51] lukegalea has joined the channel [14:51] aklt: Does anyone know if node v0.4 is far in the future? [14:52] slaskis: argh, i'm trying to debug my node server with wireshark, but i can't seem to get the traffic to it, any ideas? [14:52] EricL has joined the channel [14:52] nu- has joined the channel [14:52] davidsklar has joined the channel [14:52] slaskis: should i use the lo1 interface? (i'm on osx btw) [14:52] garrensmith: anyone got testing Express with Expresso working for http requests? [14:54] jchris has joined the channel [14:55] ivanfi has joined the channel [14:56] fairwinds: am still quite new to node. am interested in using a couple libs in global scope such as a date lib or lib that provides notion of a class. If I just require these libs without doing anything to wrap them with exports, I am assuming they will be available to node in global scope [14:57] fairwinds: am I right with this thinking [14:57] charlenopires has joined the channel [15:01] mandric has joined the channel [15:03] backthatzachup_ has joined the channel [15:04] lukegalea has joined the channel [15:05] garrensmith: fairwinds: no, each module isolates its global scope [15:07] Z10x6k6h has joined the channel [15:07] garrensmith: Mike_Rice: did it work? [15:07] [AD]Turbo has joined the channel [15:07] hobodave has joined the channel [15:08] pyrotechnick has joined the channel [15:08] garrensmith: what does this mean? 'content-type': 'application/x-www-form-urlencoded' [15:09] eevin has joined the channel [15:09] sonnym has joined the channel [15:09] fairwinds: garrensmith: so if for example I take a class library with a Class object and require(./path/to/lib/class.js), I won't be able to access unless I have exported it, is that correct? [15:10] garrensmith: fairwinds: yes, you will have to do var mylib = require('path/to/mylib'); [15:10] tokumine has joined the channel [15:13] bzinger has joined the channel [15:14] luke` has joined the channel [15:14] fairwinds: garrensmith: thanks. I have been looking to use some existing libs in nodejs without modifying. I guess at the very least it looks that I will have to export the object, use require and call new when I use it in node. [15:15] garrensmith: fairwinds: most likely [15:15] luke`_ has joined the channel [15:15] davglass has joined the channel [15:16] frodenius has joined the channel [15:16] lukegalea has joined the channel [15:17] eee_c has joined the channel [15:19] flippyhead has joined the channel [15:20] mcrittenden has joined the channel [15:22] losing has joined the channel [15:23] losing has joined the channel [15:23] akahn has joined the channel [15:23] djanowski has joined the channel [15:24] HAITI has joined the channel [15:24] HAITI has joined the channel [15:24] boaz has joined the channel [15:24] Kingdutch has joined the channel [15:24] Aikar: damnit. [15:25] Aikar: my nicklist in irssi is drawing in middle of my window due to another session being logged into the screen lol [15:25] Aikar: usually reattaching fixes it >< [15:26] danoyoung has joined the channel [15:26] danoyoung has left the channel [15:27] lukegalea has joined the channel [15:29] gattuso has joined the channel [15:30] konobi: Aikar... try Ctrl+l [15:31] ceej has joined the channel [15:33] Poetro has joined the channel [15:33] Aikar: hmm reattaching fully seemed to of redid it [15:34] Aikar: work just switched to exchange, trying to figure out how to get it setup with Evolution on ubuntu >< evolution seems to expect a url :/ [15:35] wink_: Aikar: does evolution finally support a real exchange connector? [15:35] Aikar: yeah [15:35] wink_: the url might be for owa? [15:35] Aikar: yeah ive tried putting in owa url and the local server address they said to use [15:36] zzak has joined the channel [15:36] zzak has joined the channel [15:36] Aikar: neither work [15:36] wink_: ah i got nothing then, i had our guys turn on imap :p [15:37] Aikar: i can prolly get imap to work, what does exchange activesync really offer better than imap? [15:37] warz has joined the channel [15:37] lukegalea has joined the channel [15:39] ryanfitz has joined the channel [15:39] hasenj has joined the channel [15:39] pauls has joined the channel [15:39] Aikar: support guy is helping another person near me and he uses ubuntu, gonna ask him when hes free [15:39] Country has joined the channel [15:39] c4milo has joined the channel [15:39] pauls: @chrisfrog i had to sign off for a few minutes -- did that encoding change work for you? [15:40] matbee has joined the channel [15:41] softdrink has joined the channel [15:42] devrim has joined the channel [15:44] rhyolight has joined the channel [15:45] mandric has joined the channel [15:45] ajashton has joined the channel [15:46] hasenj has joined the channel [15:46] p4p4p4 has joined the channel [15:46] konobi: Aikar: evolution probably uses the exchange "Outlook Web" interface [15:46] julienXX has joined the channel [15:47] mcrittenden has left the channel [15:47] konobi: (same as entourage on OSX) [15:47] figital has joined the channel [15:47] Aikar: hmm, sshfs vs smbfs, which would be better performance wise? [15:47] julienXX has joined the channel [15:47] Mike_Rice: tmpvar, are you awake? [15:47] Aikar: the box id ssh to has the drive mounted that the smb is sharing from [15:48] charlenopires has joined the channel [15:49] piscisaureus has joined the channel [15:49] tmpvar: Mike_Rice, hi [15:50] pr2012 has joined the channel [15:50] lukegalea has joined the channel [15:50] Mike_Rice: tmpvar, any reason why my callback wouldn't be getting called in jQuerify? [15:51] tmpvar: version? [15:51] Mike_Rice: tmpvar, let me check [15:51] Mike_Rice: tmpvar, easy way to check? [15:51] paulrobinson has joined the channel [15:52] edw: Speaking of jquerify, does it work with 1.4.4 yet? [15:52] paulrobinson has left the channel [15:53] tg has joined the channel [15:53] pauls has joined the channel [15:53] yangbin has joined the channel [15:53] tmpvar: Mike_Rice, in either case i would recommend using HEAD if you are disabling script execution [15:53] tmpvar: and using jqueryify [15:54] tmpvar: edw, why wouldnt it? [15:54] djanowski: tmpvar: hey there. quick question, is there a way to run jsdom's test suite and see exactly what is failing? i want to fix HTMLOptionElement.text [15:54] Mike_Rice: does npm pull head? [15:54] edw: Well, it didn't when I was writing a spider a month ago or so. [15:54] edw: Had to fall back to 1.4.3. [15:55] jeromegn: Anyone has experience with mongoose? specifically unique indexes returning a new model even though that index is not respected and the mongodb database does not create a record... [15:55] weepy has joined the channel [15:55] pauls: @jeromegn what do you mean by returning a new model? do you mean that the unique idx already exists in an object in the mongo db? [15:56] weepy: hiya - is it possible to require specific versions of libraries that have been installed via npm ? [15:57] jeromegn: pauls: my "email" field is set to be an index and to be unique. If I create two instances of that model with the same email, the save callback returns a new model with the created_at being different and all, but the email is the same... mongodb does not create a new record in the database though... I'm puzzled. I thought it should throw an error. [15:57] tmpvar: dj, yes [15:57] tmpvar: djanowski, [15:57] tmpvar: yes [15:58] Mike_Rice: tmpvar, 0.1.23 [15:58] jpld has joined the channel [15:58] m0rganic has joined the channel [15:59] djanowski: tmpvar: great. what's the secret? :) [15:59] rpflo has joined the channel [16:00] tmpvar: npm install mjsunit.runner [16:00] pauls: jeromegn: could i see how you're defining that it's a unique idx? [16:00] tmpvar: node test/runner.js [16:00] tmpvar: see mjsunit.runner for runtime args [16:01] tmpvar: Mike_Rice, use HEAD or wait a few days [16:01] tmpvar: for 0.1.24 [16:01] jeromegn: pauls: yup. https://github.com/LearnBoost/mongoose/issues/#issue/194 (basically in my mongodb shell if I getIndexes(), I see it there being just fine... so I'm guessing mongoose registers it properly) [16:01] Mike_Rice: how do I pull HEAD? [16:01] hobodave has joined the channel [16:02] djanowski: tmpvar: cool, thx [16:02] tmpvar: Mike_Rice, do you know how to use git? [16:02] Mike_Rice: I'm learning. :-/ [16:02] tmpvar: ok [16:03] Mike_Rice: git pull http://github/tmpvar/jsdom...? [16:03] tmpvar: so if you go: git clone http://github.com/tmpvar/jsdom.git && cd jsdom && npm link . [16:03] tmpvar: you should have HEAD installed [16:03] pauls: @jeromegn not sure i'll be of much help in this case... you've actually got yours set up differently from mine. you might want to check this out http://dailyjs.com/2010/12/06/node-tutorial-5/ [16:04] pauls: @jeromegn i use something like that, where you go "mongoose.model(..." to define the model [16:04] jeromegn: pauls: Oh yes, I used to use that, but mongoose got updated and the API changed a lot! I like it better for the relationships between my models, but if that bug persists then it doesn't make much sense to use it :( [16:05] davglass has joined the channel [16:06] pauls: jeromegn wow it has changed a lot... it's been a while since i looked at the mongoose github page. i've had to write so much code to manage relationships but it sounds like i might be better of not upgrading yet :\ [16:06] masahiroh has joined the channel [16:07] EyePulp has joined the channel [16:07] jeromegn: pauls: probably not indeed :( I'm hoping for an answer today, else I'll have to revert back to an older version. Kind of waiting for that before I can launch my startup's "prelaunch" page! sucks... [16:09] genbit has joined the channel [16:11] tjholowaychuk has joined the channel [16:11] benburkert has joined the channel [16:14] jakehow has joined the channel [16:14] rsms has joined the channel [16:14] piscisaureus: any windows users here? [16:14] Kingdutch: Plenty of them [16:14] Kingdutch: Although no cygwin [16:14] Kingdutch: Atleast not me [16:15] piscisaureus: ok. I'm not talking node on windows :-) [16:15] rpflo has joined the channel [16:15] Kingdutch: Ok good, what's the problem? [16:15] Kingdutch: :') [16:15] pengwynn has joined the channel [16:15] piscisaureus: suppose you were installing a package with npm on a native-windows nodejs [16:15] piscisaureus: where would it go? [16:15] Aikar: hmm [16:16] piscisaureus: on linux it goes to ~/.node_modules [16:16] Kingdutch: Good question [16:16] Aikar: i was going to write my own MongoDB class since mongo was in bad shape before, but looks like 1.0 is looking really good. saves me the trouble that its finally out with documentation! [16:16] Kingdutch: Is npm windows native or is it run through cygwin? [16:16] Aikar: since mongoose* [16:16] Kingdutch: I think it depends on your cygwin config (Seeing as node isn't native windows yet, is it) [16:16] piscisaureus: on windows it should be either My Documents/.node-modules or users/yourname/appdata/roaming [16:16] Kingdutch: Otherwise, look in your user folder [16:16] Aikar: Kingdutch: npm is just js code [16:16] konobi: piscisaureus: probably under USERDATA in your user account [16:16] Aikar: Kingdutch: no binary to it [16:16] Kingdutch: my bad [16:16] Kingdutch: oh well [16:17] piscisaureus: npm is not currently currently supported on the native windows build. [16:17] piscisaureus: but Im working on it [16:17] piscisaureus: konobi: that sounds sane [16:17] briznad has joined the channel [16:17] piscisaureus: but suppose you would want to install a library to be shared between all users [16:17] BillyBreen has joined the channel [16:18] piscisaureus: in linux it would be in /lib/node/themodule for as much as I can tell [16:18] piscisaureus: but where would you want to have it on windows? [16:18] Aikar: im working on something to compliment npm sort of that isaacs can hopefully use (or plain copy if he wants, id rather see it implemented into npm) for installing modules into a projects folder instead of global libs, and gets rid of all the symlinks [16:18] Aikar: piscisaureus: in windows if cygwin itll be same place [16:18] konobi: piscisaureus: how do firefox, etc. do it? [16:19] Aikar: as for a real windows port, i dunno where it would be. is the windows port running? [16:19] piscisaureus: konobi: I don't think FF stores anything thats shared between users [16:19] piscisaureus: Aikar: it works partially [16:19] konobi: Aikar: piscisaureus is working on a native port... this is just theoretical talk [16:19] Aikar: ah [16:20] konobi: piscisaureus: it can do, for addons/extensions, etc. [16:20] konobi: ACTION remembers this from writing such and addon for thunderbird [16:20] pyrotechnic has joined the channel [16:20] Me1000 has joined the channel [16:20] Aikar: well in a windows port id say /installdir/bin/node and /installdir/lib/node/ [16:20] piscisaureus: addons are in your user profile [16:20] piscisaureus: extension go to c:\program files\firefox\extensions afaict [16:20] floby has joined the channel [16:20] piscisaureus: well, plugins that is [16:21] Aikar: so C:/dev/lib/node and C:/dev/bin/node if the install prefix was C:/dev/ [16:21] silence has joined the channel [16:21] adambeynon has joined the channel [16:21] piscisaureus: hmmm.. [16:21] piscisaureus: I'm not excited of the idea creating a lib folder on windows [16:21] Aikar: or default install to C:/Program Files (x86)?/node.js/bin/node and ../lib/node [16:21] Aikar: i meant as a base node folder [16:21] Aikar: user could choose not to use a 'node folder' [16:22] Aikar: that would likely be the best 'expected' layout [16:22] konobi: Progam Files/node/{lib,bin,etc,.npm} [16:22] Aikar: keep the same nix file structure, but with a windows prefix path [16:22] Aikar: yes [16:22] sh1mmer has joined the channel [16:22] Aikar: cept .npm is inside of lib/node [16:23] Aikar: since thats where node is designed to auto add to paths [16:23] Aikar: keep it identical to linux but C:/Program Files/node/ instead of /usr/local/ [16:23] c4milo has joined the channel [16:23] piscisaureus: Aikar. I was thinking of that as well but it still looks like you're trying to the linux bolt on a windows screw [16:24] Aikar: or id really vote to default it to C:/node/ instead of program files. Spaces are evil and would lower support issues with spaces in file names [16:24] piscisaureus: maybe c:\program files\node\node.exe and stuff libs in c:\program files\node\lib? [16:24] Aikar: piscisaureus: nothing wrong with that style, anyone devving for node is going to be familiar with linux style. [16:24] Aikar: were not targetting grandma sue here [16:25] Aikar: we dont have to be super user friendly [16:25] piscisaureus: Aikar. we do have to be super user friendly! [16:25] Aikar: take $INSTALLPREFIX/bin/node and add $INSTALLPREFIX/bin to the users PATH [16:25] konobi: piscisaureus: there's also some way of adding things to PATH [16:26] aheckmann has joined the channel [16:26] piscisaureus: Does that work in linux? If you add a folder to $PATH, will node try to find your modules there? [16:26] matt_c has joined the channel [16:27] ericnakagawa has joined the channel [16:28] pyrotechnic: what's a good irc server/channel for getting some advice about periphials? [16:28] pyrotechnic: like keyboards/mice etc [16:29] chapel: #yourface ? [16:29] chapel: :P [16:29] chapel: you already looking for a new kb? [16:29] pyrotechnic: nah a mouse [16:29] chapel: ah [16:29] chapel: gaming? [16:29] pyrotechnic: im loving this blackadder [16:29] chapel: I thought you had a razer? [16:29] pyrotechnic: anything. i dont mind razers but ive driven this lachesis into the ground [16:29] pyrotechnic: ill probably just go get a new one [16:29] chapel: oh, old [16:30] chapel: hmm [16:30] chapel: I just have a logi mx518 [16:30] chapel: does me well [16:30] pyrotechnic: i think if i cleaned the lense the only probel would be that the wheel slips on the innerwheel [16:30] Aikar: piscisaureus: modules no, but node adds ../lib/node/ to its require.paths automatically, so keeping same folder structure makes porting easier [16:30] pyrotechnic: like the rubber slides on the plastic [16:30] chapel: ah [16:30] pyrotechnic: and it's giving my a sore finger [16:30] konobi: $5 optical mouse from $local_cheap_computer_supply_store [16:30] chapel: get a magic pad [16:30] chapel: :P [16:30] pyrotechnic: i got one ;) [16:30] chapel: haha [16:30] pyrotechnic: i dunno why but i still prefer a mouse [16:31] chapel: yeah [16:31] pyrotechnic: its nice for some things [16:31] chapel: gaming [16:31] pyrotechnic: but not browsing the web [16:31] pyrotechnic: yeah and games [16:31] montylounge has joined the channel [16:31] chapel: I like the idea of the new magic mouse [16:31] chapel: but it feels odd [16:31] pyrotechnic: yeah i just paired my comrades onto my mac [16:31] pyrotechnic: giving it a spin [16:31] Aikar: piscisaureus: var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node')]; [16:31] fangel has joined the channel [16:31] piscisaureus: Aikar: would $ProgramData/node/lib make sense (that is c:\documents and settings\all users\application data on XP) [16:31] pyrotechnic: i dont like the sliders [16:31] ajcates has left the channel [16:31] piscisaureus: Aikar: that code is going to change anyway :-) [16:31] pyrotechnic: there's just two thin ones and they kind of scrape along [16:31] chapel: you mean the touch interface? [16:31] pyrotechnic: on the desk and on my mouse pad [16:32] pyrotechnic: nah underneath [16:32] daniellindsley has joined the channel [16:32] pyrotechnic: the gliders [16:32] chapel: oh [16:32] Aikar: piscisaureus: id discourage that, i know i hated having to go into appdata folder manually on windows [16:32] Aikar: such a long path [16:32] chapel: yeah, surface matters [16:32] Aikar: piscisaureus: why change it? [16:32] chapel: pyrotechnic: I was thinking about our db idea (database) [16:32] pyrotechnic: i think theyre supposed to be used on smooth hard surfaces [16:32] Aikar: if you just keep same folder structure, all that code is fine [16:32] pyrotechnic: whereas my desk is quite rough and my mousepad is quite soft [16:32] pyrotechnic: so it's not nice on either of them [16:32] pyrotechnic: yeah chapel? [16:32] chapel: ah, I have a stained wood desk [16:32] pyrotechnic: wanna pm me [16:32] pyrotechnic: yeah same but mines taken quite the beating over teh years [16:32] piscisaureus: Aikar: because I would like node to be in c:\program files\node\node.exe and your solution would imply that libs end up in c:\program files\lib [16:33] pyrotechnic: about to get new desks and chairs for our office ;) [16:33] pyrotechnic: check what we're getting [16:33] piscisaureus: Oh you mean why that code needs to change [16:33] piscisaureus: well maybe that part can stay, but $HOME is not usable on windows so the module resolution code needs to change [16:33] Aikar: piscisaureus: why does it need to be program files\node\node.exe? whats wrong with node\bin\node.exe like many other language interpreters (ie Java) do it? [16:33] konobi: pyrotechnic: just hack something onto the bottom instead? [16:33] pyrotechnic: yeah i have considered trying to take off the bars and put on proper glider pads [16:34] pyrotechnic: i do like the 2d scroll, but thats about it [16:34] pyrotechnic: id rather buttons [16:34] pyrotechnic: like proper physical buttons [16:34] pyrotechnic: im becomming quite the fan of tactile feedback again [16:34] pyrotechnic: especially after using this blackwidow mechanical keyboard [16:34] Aikar: the user wont really be going into the program files folder and double clicking an exe anyways... the item is simply going to be added to PATH, so having it in a bin folder is harmless [16:34] piscisaureus: Aikar: seems like java does what you are proposing indeed [16:34] pyrotechnic: my gf hates it because it's noisy, but it's so nice to type on [16:35] Aikar: java isnt only one, its a pretty common format for command line based tools to keep it similar to nix path style [16:36] piscisaureus: Aikar: yeah and it sucks. When you access ~/something from the git shell, do you know where it goes? Certainly different from where it goes when you use cygwin, or mingw, or anything else [16:36] Aikar: shouldnt it be C:/Users/aikar/ ? [16:37] piscisaureus: All these apps think they should create their own equivalent to the linux root FS and your stuff ends up scattered everywhere where you don't wnat it [16:37] piscisaureus: Aikar: that would be great for 'user-specific' libs, e.g. the equivalent of ~/.node_libraries [16:38] ph^ has joined the channel [16:38] Aikar: 'user specific' is already outside of the 'node install path' for linux too [16:38] Aikar: but were talking about developers here, not grandmas. installing user specific modules to C:/users/user/.node_modules is fine [16:39] piscisaureus: Yeah. An equivalent for /lib/node is what troubles me most [16:39] Aikar: that is the users user folder, accessible by clicking your username on start menu [16:39] Aikar: the user has the choice on where to install node [16:39] Aikar: if they choose PREFIX=C:/node/ itll be C:/node/lib/node/ [16:39] rsms has joined the channel [16:40] tmcw has joined the channel [16:40] Aikar: developers are going to expect something close to that, its not painful to a dev to do stuff like that. [16:41] Aikar: same way you could do PREFIX=/node on nix and get /node/lib/node/ and /node/bin/node [16:41] genbit has joined the channel [16:42] piscisaureus: Aikar: I didn't know that one but it sounds kinda sane. I'm going to send a 'poll' to nodejs-dev, see what ppl think [16:42] Aikar: and cd ~ on git bash on windows also does /c/Users/user/ just like cygwin [16:42] Aikar: cause that is your userdir [16:43] Aikar: %USERDIR% i think is code [16:44] Aikar: lol? aptana seems to support git out of the box now but not SVN [16:44] kjeldahl has joined the channel [16:47] peol has joined the channel [16:47] peol has joined the channel [16:48] Aikar: anyone on ubuntu 10.10 have an issue where workspace switcher set to use 2 rows resets to 1 on reboot then have to delete it from panel and readd and reset? [16:49] gartenstuhl has joined the channel [16:53] piscisaureus: Aikar: for me `cd ~` on win goes to c:\program files\cygwin\home\user\ [16:53] piscisaureus: cygwin [16:54] liar has joined the channel [16:54] kristsk: node on cygwin seems like a pine in the lower bottom of back. [16:54] torvalamo: well ~ IS home [16:54] piscisaureus: node on cygwin should be forbidden [16:54] piscisaureus: we should change the license to disallow it [16:55] kristsk: mhh [16:55] lukegalea has joined the channel [16:55] kristsk: isnt running a VM more viable and more easy solution? [16:55] piscisaureus: running node on cygwin should give you a multibillion fine or captial punishment [16:56] torvalamo: cygwin can run windows apps [16:56] torvalamo: that's the difference [16:56] torvalamo: a huge difference [16:57] piscisaureus: torvalamo: o yeah? try `start c:\\` on cygwin :-) [16:57] amerine has joined the channel [16:57] torvalamo: not like that [16:58] torvalamo: you still need to access the right executable [16:58] piscisaureus: All this crazy path translation that it does breaks a lot of stuff [17:00] torvalamo: how so? you can still install most the linux utils [17:00] torvalamo: and access it through bash like normal [17:00] rsms_ has joined the channel [17:00] torvalamo: i'm not saying you should, just that you can [17:01] piscisaureus: yeah. you can [17:01] torvalamo: i can totally see how windows utils are desirable sometimes [17:02] piscisaureus: me too. I use msys a lot [17:02] matjas has joined the channel [17:02] torvalamo: but then the app would be written with cygwin in mind, so the path translation wouldn't be an issue [17:02] isaacs has joined the channel [17:02] torvalamo: know what i mean? [17:02] piscisaureus: Do we want to tell people that they need to get familiar with msys or linux to be able to use node. I don't like the idea [17:03] piscisaureus: Ehm [17:03] piscisaureus: I don't think any app ever was written with cygwin in mind :-) [17:03] piscisaureus: apart from cygwin itself [17:03] torvalamo: if the app uses both ms and unix tools for, say, conversion purposes [17:03] kal-EL_ has joined the channel [17:03] pauls has joined the channel [17:04] piscisaureus: Could be. Never seen that tho [17:04] pauls has left the channel [17:04] torvalamo: then using the cygwin platform is one way to solve it [17:04] Mike_Rice has joined the channel [17:04] torvalamo: well you haven't seen everything [17:04] torvalamo: i'm pretty sure of it [17:05] c4milo has joined the channel [17:06] strmpnk has joined the channel [17:07] JojoBoss has joined the channel [17:09] Vertice has joined the channel [17:13] eresair has joined the channel [17:13] WarriorSl has joined the channel [17:14] ROBOTARMY has joined the channel [17:14] noahcampbell has joined the channel [17:15] sriley has joined the channel [17:16] nonnikcam has joined the channel [17:16] micheil: mikeal: I told you I'd submit a talk to nodeconf, so I have. (If you want, I can also do the other talk idea) [17:18] ericnakagawa has joined the channel [17:21] eee_c has joined the channel [17:21] lukegalea has joined the channel [17:21] losing has joined the channel [17:23] tjholowaychuk: micheil: do you know who is talking so far? [17:23] micheil: tjholowaychuk: I have to say, only those listed on the nodeconf.org site [17:23] tjholowaychuk: oh really [17:24] micheil: ryan, isaac, tim and rauchg [17:24] isaacs: yo [17:24] tjholowaychuk: wonder if tim will actually talk about node this time lol [17:24] yhahn has joined the channel [17:25] torvalamo: what else is there to say [17:25] mikeal: micheil: i also remembered yesterday that we're going to do a The Noded Live [17:25] mikeal: probably close out with it [17:26] syntheze has joined the channel [17:26] micheil: hmm.. [17:26] micheil: was that at nodeconf? [17:26] mikeal: yes [17:26] micheil: mikeal: we need a site before we can do anything like that. [17:26] mikeal: i can finish the site this week [17:26] micheil: awesome [17:26] micheil: I can probably mixdown another episode by next monday. [17:27] mikeal: cool [17:27] mikeal: i'll have some time mid week [17:28] steffkes has joined the channel [17:28] micheil: mikeal: yeah, just poke me with the files (is there a GH project for it?) and I'll upload / change cnames [17:29] pyrotechnick has joined the channel [17:30] tanepiper: anyone know with less if there is a way to do `lessc path/to/foo/*.less path/to/output` ? [17:31] micheil: tanepiper: perhaps cat ... > [17:31] sprout has joined the channel [17:32] pyrotechnick: was less orginally written in ruby? [17:32] pyrotechnick: i cant find the gem anymore [17:32] tjholowaychuk: yeah it was [17:32] lukegalea has joined the channel [17:32] stepheneb has joined the channel [17:32] pyrotechnick: because the js one's a bit buggy and we wanted to try the gem for a bit [17:32] pyrotechnick: but cant find it [17:32] pyrotechnick: for instance it cant handle transform: perseverve3d; [17:32] pyrotechnick: transform: perseverve-3d; [17:33] pyrotechnick: it wigs out with -3 [17:33] q_no has joined the channel [17:33] tjholowaychuk: shitty [17:33] pyrotechnick: yeah [17:33] pyrotechnick: id patch it [17:33] pyrotechnick: we're going to [17:33] tjholowaychuk: we are releasing something (today i believe) that might help :) [17:33] pyrotechnick: but id rather just use the rubygem [17:33] pyrotechnick: sweet! [17:33] pyrotechnick: keep us in the loo [17:33] pyrotechnick: loop [17:33] pyrotechnick: not the loo [17:33] pyrotechnick: that's gross [17:34] tjholowaychuk: hahha [17:34] tanepiper: ahh never mind, i got the less compiler in express working :D [17:35] curtischambers has joined the channel [17:35] mikekelly has left the channel [17:35] piscisaureus: SF waking up :-) [17:36] tjholowaychuk: tanepiper: the compiler middleware needs a bit of love, im going to probably have to change it from enable ['less', 'sass'] etc to just one per-middleware so that it can handle options better [17:36] beawesomeinstead has joined the channel [17:39] piscisaureus: isaacs or ryah: you here? [17:39] isaacs: hi [17:39] piscisaureus: hi [17:39] isaacs: piscisaureus: i'm responding to your "modules on windows" email [17:39] piscisaureus: isaacs: good. do that on the ml [17:40] micheil: piscisaureus: re: "SF waking up", Australia hasn't slept. [17:40] piscisaureus: micheil: yeah I have that often :-) [17:40] isaacs: piscisaureus: headline: instead of figuring out what the module system path should be on windows, let's get rid of the "module system path" concept. [17:40] tanepiper: tjholowaychuk: cool, i should only need less myself - tbh we don't do much in the way of css in our app, it's all ExtJS's theme stuff [17:40] tanepiper: this is just for the nice signup and login pages which are standard html [17:40] tjholowaychuk: tanepiper: fair enough [17:40] piscisaureus: isaacs: welcome [17:41] tjholowaychuk: tanepiper: they are all pretty similar though so its easy to contain them in one middleware [17:41] c4milo: tjholowaychuk: yt? [17:41] tjholowaychuk: c4milo: yup [17:41] micheil: lol. [17:41] mjr_ has joined the channel [17:41] piscisaureus: isaacs: when u are done, can you explain to me what setgid and setuid do. what are the use cases for it? how does it affect child processes and fs operation? Because I need to think about sandboxing on a certain platform as well [17:42] isaacs: piscisaureus: i think that's the only way that npm is going to work natively on windows. here's a plan: https://github.com/isaacs/npm/blob/master/doc/future-ideas/new-module-system.md [17:42] isaacs: piscisaureus: setgid and setuid change the group id or user id of the process. it's only allowed if you'er root [17:43] isaacs: piscisaureus: which means, you can only do it once. [17:43] isaacs: piscisaureus: (since then you're not root afterwards) [17:43] piscisaureus: okay. that's one thing you can never do on windows :-) [17:43] isaacs: you can also set a gid/uid on a child process, which runs that child process as the specified user, and requires root access, as well. [17:44] isaacs: piscisaureus: is there any comparable way to downgrade permissions? windows does have admin/user/guest, right? [17:44] isaacs: some kind of levels? [17:44] jchris has joined the channel [17:44] yangbin has joined the channel [17:45] gartenst_ has joined the channel [17:46] dahankzter has joined the channel [17:46] FireFly has joined the channel [17:46] maushu: Hmmm, doesn't make more sense to make a single connection to the database and reuse it instead of creating one for every request? [17:46] lukegalea has joined the channel [17:47] piscisaureus: isaacs: few things: [17:47] piscisaureus: - changing the user is hard. you need to hardcode the password and username. you can't the the user for the current process, even when you are admin (but you could do that for child processes) [17:47] piscisaureus: - on vista / 7 there is the concept of 'elevated mode'. It's like sudo for windows. You are still the same user but the process gets more privileges. [17:48] piscisaureus: to effectively run in a sandbox you would need the process to switch to a lower 'integrity level' if you weren't on a low level already [17:48] adambeynon has joined the channel [17:48] cloudhead has joined the channel [17:48] piscisaureus: this trick is used by e.g. browsers to limit the amount of damage that a plugin could do [17:48] derferman has joined the channel [17:49] piscisaureus: I'm not sure if it is possible to change the level of the current process, but you can do that to child processes for sure [17:49] piscisaureus: Trying to figure that out but the api is crazy complex [17:49] aklt: cloudhead: Hi! [17:50] d0k_ has joined the channel [17:50] ROBOTARMY has joined the channel [17:50] yozgrahame has joined the channel [17:50] joshthecoder has joined the channel [17:50] isaacs: piscisaureus: wait, you mean something that's one syscall on unix is half-implemented on windows with a crazy complex api? [17:50] isaacs: no!! [17:50] isaacs: ;P [17:51] aklt: cloudhead: I created a patch to add --xunit to vows, but have some questions... Do you have a minut? [17:51] piscisaureus: isaacs: no on windows a lot more is possible and the api is like that. [17:51] piscisaureus: for some fun, look at http://msdn.microsoft.com/en-us/library/aa375742%28v=VS.85%29.aspx [17:51] cloudhead: aklt: sure [17:51] isaacs: i'd be fine with jsut replacing those functions with a no-op if it's too hard or impossible to do on windows. ask ry, though [17:52] isaacs: i'm not sure if it'd be better if process.setuid(7) failed loudly, simply didn't exist, or failed silently. [17:53] jamesarosen has joined the channel [17:53] piscisaureus: isaacs: I wouldn't mind, but my almost-employer ... [17:55] piscisaureus: isaacs: that's why I want to understand what the use case is. If it's just a program thinking 'I'm going to do something dangerous, lets drop some priviledges' or 'I don't trust this to-be child process, run it in a sandbox' we can figure out an api and I know what to support [17:56] isaacs: yeah, that's basically it [17:56] isaacs: i'm working on refactoring npm to use that for any scripts that packages run, so that their capacity for malicious/accidental harm is reduced. [17:57] murz has joined the channel [17:57] piscisaureus: isaacs: I think the reason that you shouldn't sudo npm on linux applies to windows as well. We need a cross-platform solution for that in the future [17:58] isaacs: piscisaureus: once this refactor lands, it'll be *better* to sudo npm [17:58] AAA_awright has joined the channel [17:58] piscisaureus: much fun [17:58] isaacs: since the "nobody" user has less privileges than your user account, and i can't switch to nobody if i'm "bert" [17:58] rachelbutts has joined the channel [17:59] piscisaureus: ah! [17:59] isaacs: only root can change their uid [18:00] piscisaureus: but then we would just need process.impersonateNobody() or process.setTrustLevel('low') to do that in a X-platform way [18:00] piscisaureus: setuid etc -> move to the os module [18:01] isaacs: yeah [18:01] isaacs: that'd be nice [18:01] isaacs: on *nix systems, it's customary to have a customizable nobody-user for a given program. [18:01] piscisaureus: like, one for each program? [18:01] isaacs: so, for instance, all of the things that the Apache process can serve and manage are owned by "www-data" [18:01] isaacs: sometimes [18:01] piscisaureus: oh yeah that has bitten me :-) [18:01] isaacs: mysqld runs as "mysql" [18:02] isaacs: "nobody" is sort of a catch-all [18:02] piscisaureus: on windows, normally you run this kind of stuff as a service using 'NetworkService' and 'LocalService' etc accounds [18:02] piscisaureus: and to protect folders and files you use ACLs [18:04] piscisaureus: so you generally don't need file permission bits kind of stuff, it's not even supported [18:04] zemanel has joined the channel [18:04] pauls has joined the channel [18:04] isaacs: right [18:04] micheil: setuid / setgid and umask 007 is awesome. [18:05] micheil: (upstart is also really awesome) [18:05] piscisaureus: the moon is awesome [18:05] perlmonkey2 has joined the channel [18:05] jchris has joined the channel [18:06] piscisaureus: twinkies are awesome [18:06] Insanity5902 has joined the channel [18:06] zylo has joined the channel [18:06] isaacs: I think Solaris has teh best system. [18:06] isaacs: (it's awesome) [18:07] isaacs: you can say that a given user has access to very specific things. so, you could say that the "bert" user is not a sudoer, but can change his uid to nobody, or "www-data" [18:07] boaz has joined the channel [18:07] piscisaureus: I don't know much about linux, but about Solaris i know Absolutely Nothing® ™ [18:08] piscisaureus: isaacs: I think on windows you can pretty much configure everything per-user as well [18:09] isaacs: yeah, i don't know much about it either, but i work for a solaris shop, so i have lots of incredibly authoritative experts to ask about these sorts ofthings. [18:09] isaacs: i personally kind of dig the standard unix way of managing permissions. it's not featurey, but it's nice and simple, and lets you make things reasonable secure [18:09] heavysixer has joined the channel [18:09] isaacs: where it concerns security, more features are usually just more crinkles in the armor. [18:09] herbySk has joined the channel [18:09] isaacs: places for things to break or slip through [18:10] piscisaureus: isaacs: that's true. Room for conceptual error. Plus when it is so complex most admins don't care to set up anything at all. Or something doesn't work and then they give some user way too many privileges [18:11] philipharrison has joined the channel [18:11] isaacs: yeah [18:11] dgathright has joined the channel [18:11] isaacs: at least with the standard unix way, you *know* you're giving someone unlimited power when you give them root access. [18:12] qFox has joined the channel [18:12] mnbvasd: isaacs: are you explaining how most people just turn off selinux, rather than make it work? [18:12] isaacs: the only feature i'd ask for would be a way to specify a user with no privileges (like "nobody") that anyone could setuid to [18:12] isaacs: mnbvasd: what's selinux? [18:12] mnbvasd: indeed. [18:13] sechrist has joined the channel [18:13] piscisaureus: ACTION gotta go. hungy as a horse [18:15] dguttman has joined the channel [18:16] snearch has joined the channel [18:17] sechrist: horses are never hungry [18:17] piscisaureus: isaacs: one more thing. Is solaris really so much better than linux when u r running a hosting service? [18:17] isaacs: piscisaureus: yes. [18:17] isaacs: quite. [18:17] mnbvasd: haha [18:17] sechrist: ..solaris? my knee jerk reaction is bsd [18:18] piscisaureus: faster? [18:18] pauls_ has joined the channel [18:18] isaacs: the virtualization level is a bit higher. [18:18] mnbvasd: surely that all depends. [18:18] montylounge has joined the channel [18:18] isaacs: so, whereas xen virtualizes the hardware, zoneadm virtualizes the OS [18:18] mnbvasd: isaacs: for zones, over say lxc? [18:18] sechrist: Oh I see, in the context of VPSes [18:18] isaacs: that means you can spike and take advantage of un-used CPU and RAM [18:19] sechrist: Is that comparable to KVM? [18:19] mnbvasd: zones are more comparable to lxc, or openvz. [18:19] mnbvasd: or bsd jails. [18:19] isaacs: but really, i'm not in the hosting business. my employer is. i'm in the npm business. [18:19] isaacs: mnbvasd: yeah, t's comparable to bsd jails [18:20] isaacs: but with way more management features. [18:20] isaacs: also: zfs. holy MOLY zfs. [18:20] isaacs: it's like the git of file systems. [18:20] mnbvasd: yeah, zfs gives most people sexual pleasure. [18:20] isaacs: mnbvasd: never quite heard it put that way, but i think you may be right. [18:21] jesusabdullah: zfs? [18:21] mnbvasd: it's like btrfs, but works, now. [18:21] piscisaureus: isaacs: ok thanks for the update :-) [18:21] mnbvasd: snapshots, dedupe, checksumps, lvm, raid, all roled into one. [18:22] MikhX has joined the channel [18:22] kriszyp has joined the channel [18:24] davidascher has joined the channel [18:24] Bosmon has joined the channel [18:25] ajcates has joined the channel [18:26] jimt has joined the channel [18:26] jpld has joined the channel [18:26] jpld has joined the channel [18:28] sprout has joined the channel [18:31] Vertice has joined the channel [18:32] ajashton has joined the channel [18:33] tmcw has joined the channel [18:34] mandric has joined the channel [18:36] stagas_ has joined the channel [18:36] kepheus has joined the channel [18:36] eee_c1 has joined the channel [18:37] pauls_: has anyone used mongoose 1.0 much yet, and know whether its embedded documents support can do anything that previous versions couldn't do? the docs don't make it very clear [18:37] pauls_: https://github.com/LearnBoost/mongoose [18:37] lukegalea has joined the channel [18:37] Poetro1 has joined the channel [18:37] maushu has joined the channel [18:37] jimt has joined the channel [18:37] ezmobius has joined the channel [18:39] davidwalsh has joined the channel [18:40] maushu_ has joined the channel [18:41] stagas has joined the channel [18:41] generalov has joined the channel [18:42] eee_c has joined the channel [18:42] garrensmith has joined the channel [18:43] aklt has joined the channel [18:46] pauls has joined the channel [18:48] jherdman has joined the channel [18:49] CIA-99: node: 03Ryan Dahl 07master * r6ede26c 10/ (4 files in 4 dirs): Add socket.bufferSize - http://bit.ly/g9Vx6r [18:49] CIA-99: node: 03Ryan Dahl 07master * ref12360 10/ test/simple/test-https-large-response.js : Add artificial timeout to broken test-https-large-response - http://bit.ly/e8zdfm [18:52] stagas has joined the channel [18:52] dgathright has joined the channel [18:54] opengeard has joined the channel [18:54] svenlito has joined the channel [18:54] langworthy has joined the channel [18:55] stagas_ has joined the channel [18:56] dguttman_ has joined the channel [18:56] lukegalea has joined the channel [18:56] Qbix1 has joined the channel [18:57] springmeyer has joined the channel [18:57] Coal has joined the channel [18:58] bronson has joined the channel [18:58] ryah: mjr_: bufferSize--^ [18:58] mjr_: nice [18:58] mjr_: Aww, but large HTTPS is still broken? [18:58] Nomon: pauls: I have been playing with it for a few days, I have to say I like the 1.0 a lot more than the 0.0.x versions. There are still some bugs and some of them can be quite catastrophic to your data. I also like the new middleware support in it for pre save etc. [18:58] ryah: mjr_: not large, but throttling in TLS [18:59] ryah: my task today is to fix that [18:59] Nomon: pauls: Also a lot less code to write once you get the hang of it. [18:59] ryah: but yes, there is a known issue. [18:59] tjholowaychuk: ryah: if you have a WriteStream if you hit it really hard (say 200,000 writes a second) they should eventually flush even if they are slow no? [18:59] tjholowaychuk: for me they just flat-out fail [18:59] mjr_: ryah: anyway, great to expose socket.bufferSize. [19:00] ryah: tjholowaychuk: fs.WriteStream ? [19:00] tjholowaychuk: ryah: yup [19:00] ryah: it should, yes [19:00] tjholowaychuk: ryah: k cool thanks I will look into it [19:00] ryah: fs.WriteStream performance is pathetic [19:00] tjholowaychuk: something funky going on [19:01] tjholowaychuk: i was going to wrap with some adhoc buffering [19:01] tjholowaychuk: but it scares me that it fails like that [19:01] colinclark has joined the channel [19:02] CIA-99: node: 03Ryan Dahl 07master * r9f3a20c 10/ lib/net.js : net: Add hook for when writeQueue changes - http://bit.ly/hDTTvi [19:02] hornairs has joined the channel [19:02] mjr_: ryah: I'd take slow and reliable over fast and unreliable for fs operations. [19:03] bronson has joined the channel [19:03] mjr_: tjholowaychuk: how many total writes do you have queued before it fails? [19:04] ryah: mjr_: it's badly slow [19:04] tjholowaychuk: mjr_: I think roughly 80% of them failed [19:04] ryah: like 10 minutes to write 1mb of data [19:04] tjholowaychuk: mjr_: I was just reproducing it with something like 200k writes of n + '\n' [19:05] mjr_: ryah: that's either new or only under certain circumstances. I write 1MB of data all the time in far less than 10 mins. [19:05] ryah: pquerna: did you see this http://www.mail-archive.com/libevent-users@monkey.org/msg01730.html [19:06] mjr_: I group my fs writes into 4096 byte chunks first though. [19:06] ryah: pquerna: (you seem like you would be a libevent sympathizer) [19:06] pauls has joined the channel [19:06] marcosvm has joined the channel [19:07] ryah: mjr_: if you do it in 1 byte chunks it's bad [19:07] ryah: tries to go to the thread pool for each byte [19:07] tjholowaychuk: mjr_: yeah same. I am doing some redis stuff so the writes are very small [19:08] tjholowaychuk: but if i buffer them into a few chunks its fine [19:08] micheil: isaacs: I like where modules is hitting [19:08] micheil: It fits in well with npm install deploy [19:08] tjholowaychuk: for now im just going to inherit from the WriteStream and buffer internally [19:08] derferman has joined the channel [19:08] micheil: ryah: I had a fix for that 1byte chunks bug [19:08] vipaca has joined the channel [19:09] rburke has joined the channel [19:09] rburke has joined the channel [19:09] micheil: which was to queue every 40960 bytes, assuming same encoding, like net.Socket [19:09] piscisaureus has joined the channel [19:09] ryah: micheil: oh right, i still haven't looked at that- where is it? [19:09] micheil: umm.. one sec [19:10] micheil: https://gist.github.com/797991 [19:10] tjholowaychuk: micheil: would be nice to have a buffering option, defaulting to nothing i guess [19:10] tjholowaychuk: unless that is what you did [19:10] tjholowaychuk: lol [19:10] tjholowaychuk: ill check out the patch [19:11] mjr_: I did a bunch of tests with different write sizes on Linux, and 4096 bytes seemed to be a sweet spot. [19:11] ryah: ACTION wonders if he should add a default high-water mark for sockets [19:11] ryah: and print error messages [19:11] micheil: mjr_: okay, well, yeah, I just took the number from net.js [19:11] ryah: ("warning you are queueing up a lot of data") [19:11] mjr_: Also, I did this test quite a long time ago, so things are probably different now. [19:12] mjr_: Too bad writev didn't make things any faster. [19:12] ajcates has joined the channel [19:12] ryah: writev will be revisited when we do the refactor for iocp [19:12] Country has joined the channel [19:13] micheil: isaacs: Okay, I'm going to take the same cache setup from npm future [19:13] mjr_: It's a bummer that 1 byte fs writes are insanely slow, but for now, users should just not do that. [19:13] micheil: for deploy [19:13] tjholowaychuk: mjr_: it was more of surprise to me that they just didnt work haha [19:13] tjholowaychuk: slowness still sucks but I can deal with it [19:14] isaacs: micheil: ok [19:14] mjr_: Yes, failing is really bad. [19:14] isaacs: micheil: that's actually pretty much the cache setup from npm current. I didnt' change that aspect of it much. [19:14] isaacs: just dropped the dot and moved packages into a "packages" folder. [19:14] isaacs: probably should've done that in the first place, but .cache came later, and i didn't want to change things around. [19:14] micheil: isaacs: so, it'll load up all the modules into the node_modules path [19:14] stephank has joined the channel [19:14] isaacs: but windows hates dot folders [19:14] jchris has joined the channel [19:15] micheil: so: [19:15] micheil: ./deploy.json [19:15] micheil: ./node_modules [19:15] micheil: ./package.json [19:15] isaacs: why do you need the extra json file, again? [19:15] isaacs: just for the git+path stuff? [19:16] micheil: it's containing the private modules (git+path) [19:16] micheil: and it also contains deployment locations and post-deploy/pre-deploy hooks [19:17] liar has joined the channel [19:17] micheil: deploy is for getting your code on to your server(s) [19:17] Coal has joined the channel [19:17] micheil: isaacs: If foo depends on bar, and bar depends on baz, then there will also be a ./node_modules/foo/node_modules/bar/node_modules/baz, and so on. [19:18] micheil: watch out with max file-path lengths [19:18] isaacs: micheil: yes. [19:18] isaacs: what's the max file-path length? [19:18] isaacs: (in practice) [19:18] isaacs: i mean, java gets away with some absurdly long path names. [19:18] micheil: some os's iirc, have a maximum filename length, although, this also extends down to the absolute paths [19:18] isaacs: i see. [19:18] micheil: I think I've hit it a few times, but not often [19:18] isaacs: so it's not number of path segments, but actual length of the full filename path [19:19] micheil: yeah [19:19] isaacs: worth testing. maybe we could shorten "node_modules" or something. [19:19] micheil: yeah, if we see that limit being hit [19:19] isaacs: seems like people prefer using "deps" anyway. [19:19] micheil: isaacs: is there anything I can do to help? [19:19] isaacs: just that that's too generic, and it'd be better to use something specific to node. [19:19] isaacs: micheil: keep thinking up edge cases :) [19:19] Me1000 has joined the channel [19:20] micheil: isaacs: nothing code wise? [19:20] isaacs: micheil: explicitly write out how you think certain features should work. [19:20] micheil: ACTION would prefer "deps" over node_modules [19:20] isaacs: not really at teh coding stage yet. [19:20] micheil: if theres a package.json, it's more then likely for node [19:20] CIA-99: node: 03Ryan Dahl 07master * rc501785 10/ (doc/api/_toc.markdown doc/api/dgram.markdown): Make availability of UDP bindings more apparent - http://bit.ly/g179CL [19:20] micheil: isaacs: when would you expect to approach that stage? [19:20] isaacs: micheil: weeks, maybe. [19:20] micheil: ryah: I'll have to pull that into votizen/node [19:21] micheil: isaacs: before NodeConf? [19:21] isaacs: i dont' really know how to share that kind of core thing very well. [19:21] isaacs: yeah, definitely pre-nodeconf [19:21] micheil: good. [19:21] isaacs: my usual approach for stuff like this in npm is to document the hell out of it, and then write it all in an afternoon or something once the whole image is crystalized in my mind. [19:21] kris_ has joined the channel [19:22] isaacs: the coding bit is usually not hte hard part. you start the coding when the hard part is done. [19:22] micheil: isaacs: okay, well, deploy depends on npm; so, yeah. [19:22] isaacs: i'll definitely be in constant communication about it :) [19:22] isaacs: very very soon (once securify lands) i'm going to fork npm, and only do bugfixes on the current implementation, and then go nuts on this new thing [19:22] deepthawtz has joined the channel [19:23] micheil: securify? [19:23] kris_: is there a quote/escape function-- use case escaping part of a command (input filename) that will be run with exec [19:23] isaacs: kris_: i usually just do child_process.spawn("sh", ["-c", theCommand]) [19:24] isaacs: micheil: securify is the branch where i'm making sudo ok [19:24] micheil: ah [19:24] micheil: okay [19:24] isaacs: right now it works if you use sudo for everything, and fails if you don't. [19:24] micheil: once again, let me know if there's anything I can do to help. [19:24] isaacs: i am working on making it work if you're not sudo, for things that shouldnt' require sudo, or if the relevant folders aren't root-owned. [19:25] lumino has joined the channel [19:25] isaacs: you shouldn't have to use sudo for `npm ls`, for instance [19:25] isaacs: but since the .cache folder is root-owned, you kinda do. [19:26] micheil: "When doing a localized installation, executables are linked (or, on windows, shimmed) to ./node_modules/.bin" [19:26] sveimac: tjholowaychuk: how long did you guys work on this stylus thing .)? [19:26] micheil: should be: ./node_modules/bin/ [19:27] tjholowaychuk: sveimac: little over a month [19:27] derferman has joined the channel [19:27] tjholowaychuk: of course with other maintinance / projects on the go [19:28] robert_c has joined the channel [19:29] sveimac: Seams neat.. think ill port some frameworks over :) [19:29] sveimac: hows the speed comparison btw? [19:29] sveimac: compilespeed [19:30] micheil: isaacs: as for cycles, I think that it should look at: node_modules/foo@0.0.1/node_modules/bar@0.0.1/node_modules/baz@0.0.1 [19:30] derferman has joined the channel [19:30] fly-away has joined the channel [19:30] tjholowaychuk: sveimac: I have not benched it, it's irrelevant though [19:30] sveimac: latest sass is sloooow (alpha thought) [19:30] micheil: perhaps [19:30] isaacs: micheil: if node walks up the ancestor paths for node_modules, then cycles are easy to resolve. [19:30] micheil: okay [19:30] bartmax has joined the channel [19:30] bartmax has joined the channel [19:30] sveimac: tjholowaychuk: its not imho - not when you liveedit :) [19:30] isaacs: just don't install stuff a second time if it's already in the ancestry [19:30] micheil: still reading the documentation [19:31] tjholowaychuk: sveimac: I suppose. tons of optimizations could be made in that regard [19:31] tjholowaychuk: but that was not much of a concern [19:31] tjholowaychuk: (not saying that wont ever change) [19:33] syntheze_ has joined the channel [19:33] micheil: tjholowaychuk: also, I needed to talk to you about line-by-line parsers like dox, jade and co [19:33] micheil: tjholowaychuk: do you have any best practices for writing them? [19:33] micheil: (this is for the new doctool for node.js) [19:33] tjholowaychuk: micheil: well dox doesnt even count [19:33] tjholowaychuk: its just a stupid hack [19:33] micheil: k [19:34] tjholowaychuk: but all of mine are pretty typical recursive descent parsers [19:34] tjholowaychuk: with the exception of stylus [19:34] tjholowaychuk: which is a crazy contextual beast [19:34] micheil: explain? [19:34] tjholowaychuk: of crazyness [19:34] tjholowaychuk: lol [19:34] tjholowaychuk: usually my grammars are context-free [19:34] micheil: okay, here's the file I need to parse: [19:35] micheil: https://github.com/votizen/node/raw/master/doc/api/fs.markdown [19:35] micheil: see the Param: ... [19:35] micheil: lines after fs.rename? [19:35] curtischambers has joined the channel [19:37] micheil: isaacs: hmm, an npm tarball would be hot. [19:37] isaacs: bbiab [19:37] jimt_ has joined the channel [19:38] micheil: ircretary: tell isaacs fwiw, lgtm. [19:38] ircretary: micheil: I'll be sure to tell isaacs [19:38] xla has joined the channel [19:38] lukegalea has joined the channel [19:39] rburke has joined the channel [19:39] rburke has joined the channel [19:40] TomY__ has joined the channel [19:41] sveimac: tjholowaychuk: btw, shouldnt overwrite file if error :) [19:42] tjholowaychuk: sveimac: what? [19:42] tjholowaychuk: overwrite what [19:43] Anti-X has joined the channel [19:43] sh1mmer has joined the channel [19:43] pauls has joined the channel [19:44] drewmiller has joined the channel [19:44] Fuld: Can someone help me find a good user management module for node.js? [19:45] blueadept has joined the channel [19:45] Fuld: If not, I'm going to build another hackish node.js module :-) [19:45] sveimac: tjholowaychuk: if I stylus < test.styl > test_output.css, and introduce a import error at least, it overwrites the test_output with a empty file :) [19:45] tjholowaychuk: sveimac: well yeah redirection will do that :p [19:46] tjholowaychuk: nothing I can do about that [19:46] Fuld: hmm: https://github.com/Marak/session.js/blob/master/lib/session.js [19:49] Coall has joined the channel [19:49] ROBOTARMY has joined the channel [19:49] sveimac: tjholowaychuk: generating a 1500 lines css from 5 files takes 0.5 second at least [19:49] admc has joined the channel [19:49] sveimac: with very complex rules [19:49] tjholowaychuk: not great [19:49] tjholowaychuk: meh [19:49] tjholowaychuk: lol [19:51] sveimac: hehe, well if it hasnt been a consideration its understandable :). But kudos for a great lib :) [19:51] losing has joined the channel [19:52] guybrush: tjholowaychuk: http://learnboost.github.com/stylus/docs/import.html that "will render to" does not make much sense :) [19:52] tjholowaychuk: guybrush: it's a literal [19:53] guybrush: `@import "reset.css"` renders to `@import "reset.css"` ? [19:53] tjholowaychuk: yes [19:53] tjholowaychuk: an @import literal [19:53] tjholowaychuk: @import 'foo' == stylus @import 'foo.css' == css [19:53] tjholowaychuk: ill update the docs a bit [19:54] guybrush: ahhh now i get it [19:54] void_ has joined the channel [19:54] tjholowaychuk: :) [19:54] swistak has joined the channel [19:54] mAritz: tjholowaychuk: i tried your suggestion to use jade.compile on the serverside and pass the functions as .js to the browser. it doesn't work at all :( [19:54] tjholowaychuk: mAritz: oh :( [19:54] tjholowaychuk: boo [19:55] tjholowaychuk: lol [19:55] tjholowaychuk: any specific reason? [19:55] mAritz: Object.keys() for exampel [19:55] tjholowaychuk: ah [19:55] tjholowaychuk: yeah that will do it [19:55] mAritz: but not sure if that's the main issue [19:56] pedrobelo has joined the channel [19:57] mAritz: it throws in the rethrow function with "Object # has no method 'split'" where # is str which is an array... making mistakes in your templates thus becomes tedious :D [19:57] mape: tjholowaychuk: nice work with stylus [19:57] tjholowaychuk: mape: thanks man [19:57] isaacs has joined the channel [19:58] mape: Finding new cool things just makes it more and more painful to things back at work :/ [19:58] isaacs: micheil: awesome. just added documentation of how "npm link" will work in npm-future [19:58] micheil: k [19:58] mape: tjholowaychuk: Any chance you'll make a php version of it? ;) [19:58] tjholowaychuk: mape: never haha [19:58] tjholowaychuk: :) [19:59] mAritz: is there any jade like template engine for the browser? (that is not haml because i get strange errors from using haml) [19:59] tjholowaychuk: doubt i even could anymore [19:59] tjholowaychuk: php is alien to me now [19:59] guybrush: lol [19:59] mape: Guess I'll keep working with the nice stuff on my spare time and poke at wordpress when I has to [19:59] Fuld: Anyone know of a user management module that's more complete? [20:00] mape: tjholowaychuk: Btw how does that work with TM and syntax hilighting? Doesn't it mess up bad? [20:00] tjholowaychuk: mape: stylus? [20:00] mape: tjholowaychuk: Yeah [20:00] tjholowaychuk: its fine [20:01] tjholowaychuk: im not the best at writing the weird TM languages though [20:01] mape: Hmm doesn't hilight at all in TM, owell [20:01] mape: Btw invert might be a handy built in function [20:02] piscisaureus has joined the channel [20:02] tjholowaychuk: mape: .styl should highlight [20:02] tjholowaychuk: and yeah I agree :) [20:02] tjholowaychuk: good call [20:02] tim_smart has joined the channel [20:03] tjholowaychuk: feel free to ping me with any suggestions or patches [20:04] piscisaureus: isaacs: looking at your npm-future proposal now [20:04] piscisaureus: isaacs: can you name a package other than npm that distributes binaries? [20:05] sveimac: tjholowaychuk: btw, testet with 28 files and generated 0.5 meg css in 0.9 sec [20:05] sveimac: tjholowaychuk: seams faster than sass at least :) [20:05] tjholowaychuk: sveimac: hmm lol well that is good [20:05] tjholowaychuk: still slow [20:05] tjholowaychuk: but faster is good [20:05] mAritz: omfg... tjholowaychuk: do you remember the weird haml problem i had 2 days ago? i fixed it by breaking the indentation in a way it's not supposed to work :D [20:05] kris_: how's less.js' speed? my small uses of it seem pretty fast [20:06] tjholowaychuk: mAritz: nope i dont remember lol [20:06] kris_ has left the channel [20:06] kris_ has joined the channel [20:06] tjholowaychuk: kris_: I suspect it would be faster [20:06] tjholowaychuk: it should be at least since it is meant for the browser as well [20:06] jimt has joined the channel [20:07] mAritz: https://gist.github.com/800908 :x [20:08] Fuld: What do you noders do for user management? [20:08] sveimac: tjholowaychuk: are variables global in stylus? [20:08] tjholowaychuk: sveimac: they are lexically scoped, but the root-level ones are yup [20:09] sveimac: tjholowaychuk: then I could probably just keep it all in memory and only recompile the file thats changed, will make the watch-recompile process fast when working with large projects [20:10] Fuld: Something like Rails Authentication is what node needs [20:10] tjholowaychuk: sveimac: when im working on a stylesheet I just do `watch --interval=1 stylus < foo > bar` right now [20:10] sveimac: my current project has 50 files :S, and compass/sass takes 5 -8 seconds to compile atm (alpha) [20:10] tjholowaychuk: but would be nice to add that to stylus(1) [20:10] tjholowaychuk: woah [20:13] lukegalea has joined the channel [20:13] guybrush: the best feature of stylus is the js-api, thanks a lot tj! [20:14] tjholowaychuk: guybrush: np [20:14] guybrush: finaly there is a clean solution to build dynamic css (at least for me) [20:14] linkmauve has joined the channel [20:14] nonnikcam has joined the channel [20:15] pauls: tjholowaychuk: that scrollbar youve got on your docs site is sweet too [20:15] Fuld: inimino: Any plans to augment session.js with some db middleware? [20:15] jimt has joined the channel [20:16] Fuld: ACTION doesn't want to re-invent the wheel coding stuff like password resets, e-mail verification, and authn/authz. [20:16] admc has joined the channel [20:17] Fuld: But without SSH I suppose most noders aren't creating those types of web services. [20:17] dmcquay has joined the channel [20:17] Fuld: *ssl [20:20] SubStack: Fuld: hack stuff up as middleware and throw it on npm! [20:20] SubStack: that's what I do [20:20] Fuld: SubStack, yup [20:21] pgte has joined the channel [20:21] losing_ has joined the channel [20:21] Fuld: SubStack, just like my node-spell module, only I probably won't write this one in C++ :) [20:21] Vertice has joined the channel [20:21] eirikb has joined the channel [20:21] nuba has joined the channel [20:22] Fuld: But seriously, node.js had made web dev gigs fun again for me. :) [20:22] eirikb: Hello. Are there any open and free (at least for testing) node.js cloud hosts (PaaS)? I have seen nodester, duostack and nodejscloud, but all seems to need beta registration [20:22] Fuld: eirikb, yes [20:23] eirikb: Fuld: Like? [20:23] bingomanatee: anyone know a good stat library for js? (std. deviation etc. ) [20:23] Fuld: Fuld, the guys that isaacs work for I think host [20:23] Fuld: J something? [20:23] pyrotechnick: tjholowaychuk: ping [20:23] admc: no.de [20:23] eirikb: admc: Service Unavailable [20:23] admc: but that also requires a beta key [20:23] Fuld: Are there any Amazon-based node hosts? [20:23] eirikb: Seems so [20:24] admc: https://no.de/ [20:24] Fuld: What about Joylent? Aren't they a host? [20:24] admc: seems to work for me [20:24] jimt_ has joined the channel [20:24] eirikb: Fuld: That would not be PaaS [20:24] bingomanatee: Joyent [20:24] eirikb: admc: I got it after some refreshes :) [20:24] Fuld: yeah [20:24] bingomanatee: They aren't the chepest hosts out ther.e [20:24] admc: eirikb: most people I know are using http://www.linode.com/index.cfm [20:24] eirikb: bingomanatee: PaaS or Iaas? [20:24] elux has joined the channel [20:24] admc: and just installing what they need for node [20:25] admc: basically node npm and git [20:25] eirikb: I don't have any issues getting a IaaS, I already have some of those. Would be cool to have a PaaS [20:25] broofa has joined the channel [20:25] Fuld: Just get Linode and install node. It's easy. [20:25] eirikb: I got rackspace, and EC2 got this free trial now [20:26] eirikb: Fuld: I know it's easy. I know how to do it. But it's not quite the same [20:26] Fuld: ACTION got an incredible deal, a dual core dedicated server for $40/month [20:26] Fuld: eirikb, yeah IT sucks [20:26] nuba has joined the channel [20:27] bingomanatee: The server is great but Linode has slightly cheaper servers. [20:27] Fuld: I want to be Mechanical Turk my IT out lol [20:27] eirikb: Fuld: That's not a bad deal. I got my box at home with enough power if I need power though :) [20:27] SamuraiJack_ has joined the channel [20:27] pdelgallego has joined the channel [20:27] pdelgallego__ has joined the channel [20:27] Fuld: eirikb: Ditto, but NYC internet isn't the best ;p [20:27] pdelgallego_ has joined the channel [20:27] Fuld: I could get fibre pretty cheap though [20:27] eirikb: Fuld: My connection here in Norway is not that bad [20:28] lukegalea has joined the channel [20:28] eirikb: Far from great though, but I manage :) [20:28] Fuld: eirikb: Do they let you run servers? [20:28] dguttman has joined the channel [20:28] Fuld: I imagine the big buffers in their routing make them suboptimal for hosting [20:28] eirikb: Fuld: My home? Yeah I let myself run servers [20:29] eirikb: My ISP let me run most stuff [20:30] bronson has joined the channel [20:30] Fuld: The problem is it's hard to find an affordable colo that doesn't run on coal :( [20:30] inimino: Fuld ⋱ Maybe eventually, I'm just using HTTP Auth right now but I'm going to use some Cookie-based auth soonish. Haven't done any work on session.js in ages though. [20:31] inimino: Fuld ⋱ If you're using Connect, and wire something up, I'd be interested in seeing it (I'm not using Connect, but I need to add some kind of middleware support). [20:32] Fuld: inimino, cool. I'm building a user management module for a gig and I'll be putting it on github. [20:32] Fuld: I'll probably get some "inspiration" from session.js :) [20:33] Fuld: ACTION has been contracted to build a market vertical-centric CRM and gets to use node.js :) [20:33] inimino: Aha :-) [20:33] pyrotechnick: YAY [20:33] pyrotechnick: CMS [20:34] Fuld: nyc is great, no one dictates to you what language to use on a project. Just that it works. [20:34] inimino: Yeah, I've also been able to use node.js in a recent client project. Very satisfying. [20:34] jimt has joined the channel [20:34] fairwinds: seeing util.p will be removed in future versions of Node when I am using node couchdb but not sure where it is being emitted from [20:35] fairwinds: deprecation warning is advising to use util.puts(util.inspect()) instead. [20:35] bronson has joined the channel [20:37] JohnnyL has joined the channel [20:38] fairwinds: am assuming coming from http module that is imported. Not sure if this is something I need to be concerned with at the moment or will go away as I increase my node version. I am at 0.3.5 [20:39] jimt_ has joined the channel [20:39] tim_smart: ACTION has submitted his Nodeconf proposal. [20:42] tjholowaychuk: pyrotechnick: pong [20:42] tim_smart: fairwinds: Depreciation warning usually don't go away, but instead that feature eventually disappears. (Breaking your app) [20:42] tim_smart: warnings* [20:42] pyrotechnick: tjholowaychuk: i see a fairly old express example here using some kind of DSL [20:43] Evet has joined the channel [20:43] pyrotechnick: tjholowaychuk: 1) did that ever exist? in "plugins" by the looks. 2) is it still supported somewhere? [20:43] tjholowaychuk: pyrotechnick: before the commonjs module system was really in place express had globals, that was all wayyy back [20:43] pyrotechnick: ahh [20:43] colinclark_ has joined the channel [20:43] pyrotechnick: so it's been abolished? [20:43] tjholowaychuk: plugins became connect middleware etc [20:43] tjholowaychuk: connect was derived from that old stuff [20:43] pyrotechnick: yeah [20:43] eirikb has left the channel [20:44] pyrotechnick: so it's all just app.watever now [20:44] pyrotechnick: (i much prefer it this way, just reasoning with my boss) [20:44] pyrotechnick: moving back from zappa ;) [20:44] fairwinds: tim_smart: sure. The deprecation warning is really not telling me where I will find the offending code to change unfortunately [20:44] Evet: hey pyrotechnick [20:44] pyrotechnick: zappas cool but we've kinda outgrown it for this app [20:44] pyrotechnick: yes Evet [20:44] piscisaureus: ryah: ping [20:44] jimt has joined the channel [20:44] tim_smart: fairwinds: Just grep around. [20:44] pyrotechnick: thanks tjholowaychuk [20:45] tjholowaychuk: pyrotechnick: np, let me know if you have suggestions/patches etc [20:45] tjholowaychuk: I havent had much time to work on it lately [20:45] pyrotechnick: yeah i am going to make it work again like that soon [20:45] pyrotechnick: ill run it by you, im sure you'll hate it but there is deman [20:46] pyrotechnick: haven't run into anything yet, using about.... 25% of express i'd say [20:46] jtsnow has joined the channel [20:46] lukegalea has joined the channel [20:46] pyrotechnick: Evet: what's up mate? [20:47] joelklabo has joined the channel [20:47] Vertice has joined the channel [20:47] pyrotechnick: i likes your auth example tjholowaychuk [20:47] pyrotechnick: it makes me consider how we used to do it in rails [20:47] joelklabo: anyone know how to deal with this? (node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit. [20:48] ajcates has joined the channel [20:48] AAA_awright_ has joined the channel [20:48] pyrotechnick: joelklabo: read the docs [20:48] pyrotechnick: ill link you [20:48] Evet: pyrotechnick: sup? [20:48] joelklabo: ty [20:48] pyrotechnick: http://nodejs.org/docs/v0.3.7/api/events.html#emitter.setMaxListeners [20:48] pyrotechnick: By default EventEmitters will print a warning if more than 10 listeners are added to it. This is a useful default which helps finding memory leaks. Obviously not all Emitters should be limited to 10. This function allows that to be increased. Set to zero for unlimited. [20:48] pyrotechnick: we've certainly seen that a few times writing an MMO ;) [20:49] pyrotechnick: we know aaaaaaaaaaaall about it [20:49] clarkfischer has joined the channel [20:49] ROBOTARMY has joined the channel [20:49] pyrotechnick: you're not doing anything wrong joelklabo [20:49] AAA_awright has joined the channel [20:49] pyrotechnick: as it says, it's only a warning [20:50] pyrotechnick: i assume it will have to be explicitly enabled in 1.0 [20:50] pyrotechnick: but for now it's on by default [20:50] jimt has joined the channel [20:50] hellp has joined the channel [20:50] floby has joined the channel [20:51] joelklabo: cool, looks good now [20:52] TobiasFar has joined the channel [20:53] mikeal has joined the channel [20:55] warz: hrm. before i simply start documenting all of this stuff of mine in like, notepad, are there any tools for documented things like a REST API? [20:55] boaz has joined the channel [20:55] warz: documenting* [20:55] warz: for the web, that is [20:57] lukegalea_ has joined the channel [21:00] mscdex: node.js rules! [21:00] sh1mmer has joined the channel [21:05] svenlito has joined the channel [21:05] skampler: indeed! [21:06] dahankzter has joined the channel [21:07] catch23 has left the channel [21:07] hosh_work has joined the channel [21:09] piscisaureus: ACTION writing a bot that trolls anyone who shouts 'nodejs rules' [21:09] sh1mmer: nodejs rules [21:09] sh1mmer: the seas [21:09] sh1mmer: in straight lines [21:10] mjr_: Wow, 500 people on this channel. [21:10] thermal has joined the channel [21:10] sh1mmer: mjr_: and 1 [21:10] piscisaureus: sh1mmer: The C's rule node.js [21:10] piscisaureus: (C/C++ that is) [21:11] mjr_: good one [21:11] CrazyGoogle has joined the channel [21:12] jetienne: who rules the ocean [21:12] syntheze has joined the channel [21:14] tilgovi has joined the channel [21:15] mraleph: three callback for the filesystem under solaris, seven for the sockets in their kernel space, nine for express sitting on top of this, and one for the user, one callback to rule them all, etc.etc.etc. [21:17] piscisaureus: npm install mount-doom [21:18] niklasfi has joined the channel [21:18] jetienne: rfc1925.6a It is always possible to add another level of indirection. http://tools.ietf.org/html/rfc1925 :) [21:19] slickplaid: lol [21:20] slickplaid: mraleph++ [21:20] v8bot: slickplaid has given a beer to mraleph. mraleph now has 2 beers. [21:20] piscisaureus: rule 11: fibers ftw [21:20] genbit has joined the channel [21:21] mraleph: elves prefered continuations. dwarfs --- fibers. humans --- plain threads. that's why they attacked sauron. [21:21] mraleph: ACTION sighs.  [21:22] WarriorSl has joined the channel [21:22] mraleph: I spent to much time in debugger today. [21:22] pdrummond has joined the channel [21:22] slickplaid: tolkien.js [21:24] CIA-99: node: 03Ryan Dahl 07master * r0634e3a 10/ (29 files in 9 dirs): Upgrade V8 to 3.1.0 - http://bit.ly/fCE9E7 [21:25] rwaldron has left the channel [21:25] piscisaureus: ryah: the -no-builtin-memcpy patch no longer needed? [21:26] ryah: no. i'll reapply. [21:26] piscisaureus: or whatever mr aleph suggests you should do [21:27] CIA-99: node: 03Bert Belder 07master * r9526fef 10/ deps/v8/SConstruct : [21:27] CIA-99: node: Workaround for V8 bug 884 [21:27] CIA-99: node: See http://code.google.com/p/v8/issues/detail?id=884 - http://bit.ly/fTKskB [21:28] piscisaureus: v8 source code is like magic to me [21:29] mraleph: why is that? [21:29] ryah: because it's unimaginably complex :) [21:30] killfill: ACTION trying to compile node from git on win32...  [21:30] killfill: still breakes with the libv8.a thingy.. [21:30] piscisaureus: what ryah said. You need a glossary and a reading guide [21:31] piscisaureus: __ LoadRoot(ip, Heap::kHeapNumberMapRootIndex); [21:31] bronson has joined the channel [21:32] piscisaureus: killfill: it will not go away that way. why/how does it fail? [21:32] ncb000gt has joined the channel [21:32] killfill: exit [21:32] killfill: aahr [21:32] ryah: killfill: mingw? [21:33] killfill: nope, cygwin [21:33] ossareh has joined the channel [21:33] killfill: (have VS.NET installed if that matters) [21:33] ryah: ry/master does not compile on cygwin [21:34] ryah: the v8 platform stuff needs to be ported to newer versions of v8 [21:34] ryah: im not even applying the patches anymore [21:34] piscisaureus: ryah: I don't know but I think it is hard [21:34] killfill: oh [21:34] killfill: ryah: on mingw it works? [21:34] ryah: no, it should be easy [21:35] ryah: piscisaureus: it should be a 1hour job [21:35] ryah: killfill: yes [21:35] killfill: oh [21:35] piscisaureus: killfill: but on mingw your VS.Net might get in the way [21:35] killfill: oh :( [21:36] fairwinds: Is there any i18 support for express? [21:36] linkmauve: Hi all! [21:36] daharon has joined the channel [21:36] rylie has joined the channel [21:36] piscisaureus: ryah: You know how to port the Sampler:: stuff? [21:37] piscisaureus: ryah: It's easy to get it going without but Erik said that would kill crankshaft [21:37] killfill: ACTION getting mingw [21:37] killfill: should i delete my cygwin?.. i got it just for node .. :P [21:37] daharon: Hey guys, I'm looking for a RHEL based rpm for the latest node.js. Can someone point me in the right direction? I see no spec file in the github repo... [21:37] tjholowaychuk: fairwinds: nothing bundled with the framework [21:37] tjholowaychuk: but you can use anything you like really [21:37] tjholowaychuk: Express has no copy [21:37] tjholowaychuk: well very little [21:37] piscisaureus: killfill: it shouldn't hurt. Get rid of it if you want to [21:38] fairwinds: tjholowaychuck: anything you can suggest? [21:38] linkmauve: I get a POST request, it’s URI-encoded, and when I unescape() it I get a double UTF-8 encoding. How can I fix that? [21:38] tjholowaychuk: fairwinds: we are just using some custom stuff right now [21:38] lukegalea_ has joined the channel [21:39] fairwinds: tjholowaychuk: k, will look around [21:39] ironfroggy__ has joined the channel [21:39] benburkert has joined the channel [21:39] ironfroggy__: mikeal: lies! [21:39] ryah: piscisaureus: i just mean to get it running [21:40] lukegalea: any of the mongoose hackers around? [21:41] piscisaureus: ryah: so just turn all Sampler methods into no-ops. :-) Pretty crippled stuff that gets you [21:41] piscisaureus: anyway [21:41] mscdex: daharon: try here: https://build.opensuse.org/package/binaries?package=nodejs&project=home%3ASannisDev&repository=CentOS_CentOS-5 [21:41] ryah: piscisaureus: porting the sampler stuff can be done by copying the linux platform [21:42] piscisaureus: I don't thing that that works. But try it anyway. I tried one day and it gave me a node that compiled fine but didn't work at all [21:42] dmcquay has joined the channel [21:43] admc has joined the channel [21:44] daharon: mscdex: thanks. I'll try it out. [21:44] stephen_mcd has joined the channel [21:45] isaacs: piscisaureus: express, couchapp, pcap, npmdep, expresso, test, nodeunit, yeti, json-command, several others [21:45] isaacs: piscisaureus: (packages that create executables) [21:45] tjholowaychuk: technoweenie: ping [21:46] mjr_: I'm slowly moving those pcap executables into their own packages, due to complications with that bin issue. [21:46] mjr_: On a related matter, json-command is great. [21:47] piscisaureus: isaacs: looks like this .bat shimming isnt good [21:47] isaacs: piscisaureus: ok [21:48] isaacs: what would be a better way? [21:48] piscisaureus: don't know yet ... [21:48] isaacs: you can't do shebangs on windows, right? [21:48] piscisaureus: nope [21:48] isaacs: ACTION cries [21:48] isaacs: what's the problem with the bat shimming? [21:49] sh1mmer: it attracts vampires [21:49] piscisaureus: you need to be really smart [21:49] piscisaureus: I don't like npm to be smart [21:49] isaacs: piscisaureus: suresure. i liked npm more when it was dumb, too [21:49] isaacs: this whole thing is basically a lobotomy for it :) [21:50] piscisaureus: because you would need to make shebanged apps work, and make it understand that .js files should be ran with node and .sh files must be started with bash etc [21:50] piscisaureus: too brittle [21:50] piscisaureus: will think about it [21:50] severla has joined the channel [21:51] jimt has joined the channel [21:51] ryah: we definitely need to separate "executables" from "modules" [21:51] isaacs: ryah: why? [21:51] killfill: how do i go to c: with mingw [21:51] ryah: they are not the same thing, and i don't like "modules" shipping iwth "executables" [21:51] ryah: they are different things [21:51] severla: hi, may someone tell me what args.This() means? what does that contain? of course, within v8 [21:52] isaacs: ryah: well, yeah, but they're often extremely tightly coupled, and a lot of times an executable has a lot of library bits that others can benefit from using. [21:52] isaacs: qv npm [21:52] ryah: we need to adjust people's expectations [21:52] isaacs: or are you suggesting that we split the npm-lib off from npm-bin? [21:52] ryah: something like that [21:52] mikeal: ryah, isaacs: example, couchapp ships with a command line tool for syncing, but your also need to require('couchapp') in the module you wish to push [21:52] piscisaureus: killfill: cd /c [21:52] isaacs: yeah, exactly [21:52] kepheus has left the channel [21:53] isaacs: you can call htem "different things", but it's sort of an arbitrary place to draw the line. [21:53] mikeal: i would call it a "package" rather than a module vs executable [21:53] isaacs: it's just different api's around the same bit of functionality, usually. [21:53] dekz has joined the channel [21:53] isaacs: mikeal: i think ry wants to install "modules" without installing "packages" [21:53] ryah: the "module" installer should not have anythign to do with my $PATH [21:54] mikeal: so [21:54] mikeal: i think "installing" a package [21:54] mikeal: module, executable, whatver [21:54] mikeal: should shove it somewhere locally [21:54] isaacs: ryah: well, sure, and you'll be able to get that functionality just fine. your use case is satisfied. now we're working on satisfying the other use cases. [21:54] ryah: the "executable installer", which i won't use - but homebrew user's will need, can drop stuff into /usr/bin [21:54] mikeal: and "using" that module in a particular package can copy it from where it was installed locally [21:54] dw_ has joined the channel [21:54] deepthawtz has joined the channel [21:54] mikeal: like, if i want to get on a plane and start a new project [21:55] mikeal: i should be able to easily use all the packages I have locally [21:55] mikeal: but not like, via sym links or global paths [21:55] mikeal: it just keeps a cache [21:55] ryah: i'm fine with modules shipping with .sh files - but the module installer should not attempt to link them into my path [21:55] ryah: nor have code to do it [21:55] AAA_awright: Seperation of executables from Javascript libraries (CommonJS modules) [21:55] mikeal: and that same "install" process can install executables when relevant [21:56] mikeal: ryah: it's useless if it doesn't [21:56] mikeal: you should be able to install a module without installing executables, optionally [21:56] ajcates has joined the channel [21:56] ryah: only. [21:56] AAA_awright: I'm assuming "module" means CommonJS modules and Node.js compiled libraries [21:56] mikeal: but the installer should be usable as a "bin" installer [21:56] isaacs: ryah: why? [21:56] isaacs: i mean, what is gained by not having that functionality? [21:56] ryah: an extra tool can link it into my path [21:56] isaacs: that's *easy* [21:56] isaacs: and without it, a lot of things are more difficult to do [21:56] mikeal: what extra tool? [21:57] mikeal: npm is already an extra tool :) [21:57] isaacs: mikeal: ryah wants two tools. [21:57] ryah: mikeal: apt.js [21:57] isaacs: one to install modules, and another to install programs. [21:57] mikeal: oh i see [21:57] mikeal: here is the problem [21:57] isaacs: and that's fine, but just saying, "ok, you can't easily deploy node cli programs any more" is not acceptable. [21:57] lukegalea_ has joined the channel [21:57] mikeal: when you're developing that tool [21:57] brapse has joined the channel [21:57] isaacs: "hold on, we've got another tool coming, eventually, which will put back that functionality we've all grown to depend on" [21:57] AAA_awright: Any other package manager has libraries/modules and executables in the same type of package [21:58] mikeal: you need the development link system to apply both to modules and to executables [21:58] isaacs: it's almost the same exact task, too [21:58] ryah: we're conflating two ideas: installing a program that im a user of, and installing a module that i'm going to hook into my process [21:58] isaacs: it just makes sense to have one program that does it [21:58] isaacs: ryah: no, they're the same idea. [21:58] mikeal: ryah: here's the thing, and let me finish explaining [21:58] isaacs: ryah: in both cases, you're "installing a program that i'm a user of" it's just that in the second, you're using the program programmatically [21:58] mikeal: npm is only going to install executables that are used by developers [21:58] isaacs: ACTION hands mikeal his talking stick... [21:59] mikeal: it's not installing end user stuff [21:59] mikeal: end users are going to use apt-get [21:59] mikeal: or they will homebrew [21:59] mikeal: and homebrew will install a big ass bundle package [21:59] mikeal: that was prebuilt for that package manager [21:59] mikeal: the excutables npm installs are for developers, and that's why the integration with their existing npm package manger is importnat [22:00] AAA_awright: Well, then you have to work around package managers. Getting a package for Ubuntu fixed/corrected is insane. [22:00] isaacs: mikeal: i'd argue that that's a very fuzzy boundary you just drew there. [22:00] Nomon: A bit like php does with pecl and pear I guess? [22:00] mikeal: so, i built a python package for semi-normal people [22:00] ryah: i don't care that it's hard for tjholowaychuk to ship his css-transformation-script into everyone's PATH. this is not the problem we're setting out to solve. [22:00] mikeal: basically software testers who are not developers [22:00] tjholowaychuk: woah? [22:00] tjholowaychuk: what? [22:00] ryah: distributing software is hard [22:01] isaacs: ryah: i care about that. i want to play with his css-transofrmation-script, and i don't want to dick around with a bunch of crap manually to do that. [22:01] mikeal: and they could not install it with regular packaging tools, it had to be an apt-get packager [22:01] ryah: then that can be a different tool [22:01] tjholowaychuk: bins are not installing? [22:01] isaacs: tjholowaychuk: discussing the future. don't be alarmed :) [22:01] mikeal: tjholowaychuk: this is future talk [22:01] tjholowaychuk: oh haha ok [22:02] mikeal: ryah: it already is a different tool, it's called apt-get and homebrew [22:02] tjholowaychuk: I think its important to install the executables if that is what this is about [22:02] severla: Hi, I'm working on bindings for Node; been studying different bindings code; would like to understand what's in args.This() within v8 [22:02] isaacs: mikeal, ryah: in the https://github.com/isaacs/npm/blob/master/doc/future-ideas/new-module-system.md spec, i think this is adequately handled to everyone's liking. [22:02] tanepiper: The #node.js debate team [22:02] mikeal: but when you're a node developer using npm you want integration [22:02] tanepiper: GO TEAM! [22:02] ryah: you guys hate simplicity [22:02] AAA_awright: No I just like semantics [22:03] isaacs: ryah: no one hates simplicity. [22:03] tjholowaychuk: simplicity is nice, but being useless is not so nice [22:03] isaacs: ryah: but i don't think that having to do things manually is simpler than having a tool that does them in a predictable way. [22:03] Nomon: More tools != simplicity [22:03] ryah: ^-- thank you [22:03] ryah: isaacs: do you use eclipse? [22:03] isaacs: Nomon: depends on what your tools do, and how good a typist you are. [22:03] tanepiper: isaacs: so what i get from this is npm won't be a distribution tool anymore for apps, but just for libs [22:04] isaacs: ryah: no. i use vim. [22:04] JoeB_ has joined the channel [22:04] isaacs: tanepiper: no, it'll be for everything still. [22:04] ryah: but eclipse provides many menu items that do things in predictable ways [22:04] ryah: like generate massive xml files [22:04] isaacs: i'm not going to remove bin support, because i use it, a lot, and npm is for me. [22:04] ryah: it makes it easy [22:04] AAA_awright: Simplicity isn't the highest good here, it's usability, simplicity necessary for usability but it's not the end-all be-all requirement [22:04] AAA_awright: *is necessary [22:04] isaacs: ryah: come on, you know that's a silly comparison. those xml files have more lines than npm's whole codebase. [22:04] mikeal: isaacs: in your spec, i don't understand the new "global" install [22:05] ryah: i'm just saying - less tools = better almost always [22:05] isaacs: ryah: do you write code with ed? [22:05] isaacs: or vi? [22:05] ryah: i choose my tools carefully [22:05] mikeal: ryah: if people don't want to use npm to install their executables they'll just do a bundle package and push it to apt [22:06] ryah: i like the module repository, i like being able to get socket.io and its dependencies easily [22:06] ryah: i want those tools [22:06] isaacs: ok [22:06] AAA_awright: Would you like to see all the various package managers consolidated into one, let's say there's a package manager where you could add-on Node.js package semanics so now you can use your OS package manager to install libs and executables and whatnot [22:06] isaacs: so, in the new version of npm, it'll be easy to do just that if you want, and the end result will be that you'll have it how you like it. [22:06] AAA_awright: That's certainly simpler and more usable, I would argue, but right now it isn't very economical with the package hell Linux distros have [22:07] Nomon: isaacs: I do not see it simplify a process having separate tools to install libs and bins vs having 1 tool do them both at the cost of getting a binary or two in your PATH you might never use. I am all for fine grain controll and options to do specific tasks/parts of a process in a tool [22:07] mikeal: the commonjs guys hate the module repostiory [22:07] mikeal: they think you should refer to a web API end point in your package.json [22:07] mikeal: it's totally unusable [22:07] ryah: i also like forcing my way of doing things on others [22:07] mikeal: but it's the same logic as not installing executables [22:07] JoeB_: Hello, I am having a problem installing on W7, can anyone help with resolution of build error [22:07] ryah: :) [22:07] markwubben has joined the channel [22:08] ryah: like forcing people to not use blocking i/o [22:08] isaacs: ryah: npm config set binroot false ; npm config set global false [22:08] isaacs: ryah: and then npm will behave how you're wanting it to. [22:08] mikeal: there we go [22:08] ryah: default [22:08] devrim has joined the channel [22:08] mikeal: hahaha [22:08] isaacs: ryah: no. the defautl configs in npm will be the ones that i like. [22:08] mikeal: ryah isn't happy with an option specifically made just for him [22:08] mikeal: it MUST BE DEFAULT [22:08] ncb000gt: lol [22:08] mikeal: ryah: isaacs also likes forcing his way on to other people :) [22:09] mikeal: npm style guide FTW! [22:09] isaacs: i like forcing flexibility on the unflexible. [22:09] tanepiper: ^5 [22:09] JoeB_: I get a build err#2 libv8.a [22:09] isaacs: JoeB_: cygwin? [22:09] JoeB_: yes [22:09] isaacs: JoeB_: what version of node are you trying to build? 0.3.7 does not build properly. [22:10] JoeB_: which should i use [22:10] isaacs: JoeB_: try `git checkout v0.3.6` and then ./configure && make clean install [22:10] JoeB_: thanks [22:10] isaacs: or download the 0.3.6 code [22:10] isaacs: np [22:10] jimt_ has joined the channel [22:10] ryah: you guys haven't thought about modules enough. you'll come around. [22:10] isaacs: ryah: i think this plan is good. [22:11] severla: please anyone explain me what's in v8::Arguments::This :( [22:11] mikeal: i think we're all in agreement now about modules [22:11] Poetro has joined the channel [22:11] isaacs: ryah: i still am not completely sure about the "squishing the path" stuff, have to flesh out with more use cases. [22:11] mikeal: just not executables :) [22:11] isaacs: ryah: but that's an implementation detail [22:11] AAA_awright: I see everyone thinking about packages and build systems the same old way, "what to do to each resource" instead of "what each resource does" [22:11] AAA_awright: "what to do to *with each resource" instead of "what each resource does" [22:12] ryah: isaacs: i think it's an improvement on a system that is already superior to other similar systems. [22:12] isaacs: i think it's unanimous, though: no NODE_PATH, no require.paths, search in ./node_modules, ../node_modules ../../node_moduoes, ... [22:12] isaacs: ryah: thanks :) [22:12] AAA_awright: isaacs: Wait what? Absolutely not [22:12] isaacs: ryah: it owes a lot to your influence. [22:12] isaacs: AAA_awright: yes. it has been Decided by The Decider. [22:12] Nomon: so its like CPAN style vs gem style :D [22:13] mscdex: severla: "The value you get when calling 'This()' is what would have been bound to [22:13] mscdex: 'this' if the function had been an ordinary javascript function." [22:13] AAA_awright: isaacs: The parent directory searching isn't a bad idea, but elimination of the search path... That's a pretty core OS concept, of the search path [22:13] piscisaureus: isaacs: actually I like require.paths [22:13] ryah: isaacs: squishing the path is what i expected to happen last time i did npm bundle install [22:14] mikeal: i'm even skeptical about working your way up the tree [22:14] ryah: isaacs: which, btw i couldn't use because i didn't want to store npm metadata in my repo [22:14] davidascher has joined the channel [22:14] isaacs: ryah: yeah, bundle is kinda shit. [22:14] mikeal: just ./node_modules [22:14] AAA_awright: I would end up symlinking .node_modules to whatever system directory [22:14] AAA_awright: Is that the idea there? [22:15] danoyoung has joined the channel [22:15] isaacs: it has some good aspects, but it's time to fold those in. [22:15] tjholowaychuk: isaacs: i like bundle, i just splice the require.paths to only include my node_modules [22:15] ryah: socket.io-node has a large dependency that it uses just for testing. i wonder if we could mark up dependencies as optional [22:15] tjholowaychuk: conceptually it makes more sense than global stuff IMO [22:15] jimt has joined the channel [22:15] isaacs: mikeal: the reason for walking up the path is that it allows cyclic dependencies, nested packages, etc. [22:15] tjholowaychuk: ryah: development deps should not even be in package.json really [22:15] isaacs: ryah: testing things should be in devDependencies, not in dependencies [22:15] mikeal: fuckin cyclic deps [22:15] tjholowaychuk: subomdules are fine for that [22:15] mikeal: they make everything harder [22:15] ryah: tjholowaychuk++ [22:15] v8bot: ryah has given a beer to tjholowaychuk. tjholowaychuk now has 8 beers. [22:15] isaacs: mikeal: they are real, and they become painful eventually. [22:16] mikeal: fuck submodules [22:16] mikeal: i hate submodules, more than anything in the world [22:16] AAA_awright: The PATH variable is great because individual users and even programs can append onto it, it's the very core of how I manage my Gentoo system, what would you do in replacement? [22:16] isaacs: acutally, fuck packages. [22:16] tjholowaychuk: mikeal :D [22:16] isaacs: just put code in your file. [22:16] ryah: not ++ to submodules, to the idea that dev deps are not in package.json [22:16] isaacs: fuck require() [22:16] mikeal: who wants to depend on the master of some package [22:16] mikeal: that's terrible [22:16] isaacs: copy and paste. [22:16] mikeal: everyone has a different version [22:16] isaacs: you wanna provide a lib? use gist.github.com [22:16] isaacs: we're javascripters, right? [22:16] isaacs: concat that shit. [22:16] mikeal: because they updated their submodules at different times [22:17] tjholowaychuk: am I the only one that doesnt have issues with submods lol [22:17] ajcates has joined the channel [22:17] mikeal: write code that works with a dep, lock that deps code in locally and check it in [22:17] AAA_awright: isaacs: require() is what makes Node.js better than anything else, I mean, "import" seriously? How many languages use some sort of import syntax and namespace horrors [22:17] ncb000gt: isaacs: +1 [22:17] isaacs: AAA_awright: ok, let's get rid of import() too [22:17] isaacs: copy and paste. [22:17] mikeal: tjholowaychuk: you may not personally, but everyone you're collaborating with now *may* have differing versions [22:17] isaacs: javascript has closures. use those if you want to limit scope. [22:17] tjholowaychuk: mikeal: if they dont update yeah [22:17] tjholowaychuk: i think they should update automatically [22:17] isaacs: breaking code into multiple files just makes it more complicated [22:17] mikeal: again, why are you running master of a dep package instead of a release? [22:17] aconran_ has joined the channel [22:17] isaacs: ACTION is being facetious and silly, don't take him seriously. [22:18] mikeal: no, they shouldn't update automatically [22:18] tjholowaychuk: mikeal: because they are all mine [22:18] AAA_awright: I was getting worried there, isaacs [22:18] mikeal: that just means that yo break whenever the package breaks [22:18] tjholowaychuk: I know where they are at [22:18] mikeal: most people don't write all their dependencies [22:18] isaacs: mikeal: so, seriously, take a look at https://github.com/isaacs/npm/blob/master/doc/future-ideas/new-module-system.md [22:18] mikeal: i did [22:18] tjholowaychuk: and your submod can be any sha.. so i dont think that is an issue really [22:18] mikeal: i don't understand the globals section [22:18] isaacs: mikeal: there are some use cases that i mention in there that would be unpossible without walking up the path. [22:18] tjholowaychuk: i dunno, pointless argument, works fine for me [22:19] mikeal: walking the path i get now [22:19] mikeal: cyclic deps, grrr [22:19] isaacs: mikeal: the global path /usr/local/lib/npm/or/whatever, would be a place to store package metadata and install things outside of a project dir. [22:19] tim_smart: Git fake submodules <3 [22:19] darvvin has joined the channel [22:19] tjholowaychuk: tim_smart: agreed :) [22:20] isaacs: mikeal: yeah, we can probably optimize the lookup somewhat, but that'll be an implementation detail. effectively, it'll walk up "forever" [22:20] mikeal: can you keep a cache there so that i can install those packages in to new projects without having a network? [22:20] tim_smart: Then you just git checkout whatever [22:20] mikeal: i like fake submodules [22:20] mikeal: they make way more sense [22:20] isaacs: mikeal: let's say you install json-command, which drops a cli program into binroot/json [22:20] mikeal: but i don't like relying on git magic for packaging [22:20] mikeal: or for deployment [22:21] isaacs: mikeal: you probably don't want json-command installed in some package folder. it's a program. you want to install it so that you can use it anywhere. [22:21] mikeal: right [22:21] tim_smart: git fake submodules just appear as static files in a repo. [22:21] mikeal: but nothing in there is global for require(), right? [22:21] gggg has joined the channel [22:21] isaacs: so, --global is for installing stuff that you use in your terminal, and --local is for stuff that you require() or use in your app (like spark2's bin, for instance) [22:21] isaacs: mikeal: right [22:21] isaacs: require() won't look there. [22:21] mikeal: technoweenie told me last night that someone did a 200meg commit message and pushed to github [22:22] mape: ryah: Am I remembering correctly that there is somekinda standard IPC thingy for node being worked on? [22:22] mikeal: people do stupid stupid shit with git [22:22] wdperson_ has joined the channel [22:22] tilgovi has joined the channel [22:22] Nomon: :D [22:22] ryah: mape: yes [22:22] mape: ryah: How is it progressing? [22:22] ryah: slowly [22:23] mikeal: i think i have Ryan on tape saying that 0.4 would be out at the beginning on January :) [22:23] mape: Won't be done for 0.4.0 then? [22:23] mape: mikeal: or late feb :) [22:23] tim_smart: mikeal: "Or end of February" [22:23] ryah: 0.4 will be done next week [22:23] mape: Neat [22:23] tim_smart: 'next' is a subjective word. [22:23] aklt: Cool! [22:23] tim_smart: :p [22:23] ryah: the ipc thing won't be included in node, probably [22:24] mikeal: really? [22:24] mikeal: i thought it was going to be in core [22:24] ryah: still debating [22:24] liquidproof: what's ipc [22:24] mape: ryah: So what is perks with the IPC you are developing? Just quick and handy? Or a lot of fancy features? [22:24] tim_smart: What happened about node webworkers? Is pgriess still maintaining it? [22:24] ryah: inter process communication [22:25] matbee has joined the channel [22:25] liquidproof: okies [22:25] ryah: mape: fancy features [22:25] gbot2 has joined the channel [22:25] tim_smart: Fancy, like cake. [22:25] mape: ryah: Uses json? [22:25] ryah: yes [22:26] CrazyGoogle: may i post this on twitter ? [23:23] 0.4 will be done next week [22:26] mape: Fancy features like syncinc state or have any examples? [22:26] ryah: sure [22:26] CrazyGoogle: tnx :d [22:26] isaacs: CrazyGoogle: Every week is the next week from the point of view of some other week. [22:26] isaacs: tomorrow never comes. [22:26] mape: *syncing [22:26] CrazyGoogle: :D [22:27] CrazyGoogle: soon (tm) [22:27] eevin has joined the channel [22:27] ryah: we have a hard deadline to meet [22:27] ryah: so it will be next week [22:27] ryah: it's pretty stable rightnow [22:27] ryah: htere is a https bug [22:27] ryah: the debugger could use some work too [22:27] isaacs: So, if the only major point of contention about the new npm approach is where/if it puts executables, then i think that's pretty rad. [22:28] mape: ryah: Well, looking forward to taking a look at it :) My current project really could use some need system for keeping processes in sync [22:28] CrazyGoogle: it would be great release anyway [22:28] ryah: isaacs: well - that's my major point of contention [22:28] ryah: isaacs: you should probably open a thread on the ML at some point [22:28] isaacs: ryah: i'm going to. [22:28] isaacs: like i said, there's another few use scenarios that i thought of this morning and i'm not sure how it'd handle them. [22:28] isaacs: i like doc-driven-development [22:29] wdperson has joined the channel [22:29] CrazyGoogle: http://twitter.com/#!/crazy_google/status/32203171656892416 :D [22:29] AAA_awright: isaacs: I showed you this but I was wondering if you had any other thoughts, a build system+package manager that does things based on what the package does, instead of what the package manager/build system is told to do. For instance, simply saying "This file is C source that builds a user-level executable, and uses (these) libraries, etc" and it could build the executable, put it in a package maybe (with those semantics attached), or [22:29] AAA_awright: install it to the system (where the user has defined user-level binaries to go, probably /usr/bin or /usr/local/bin, maybe /opt/(package)/bin) [22:30] nailer has joined the channel [22:30] nailer: Hi folks [22:30] mjr__ has joined the channel [22:31] niklasfi has left the channel [22:32] piscisaureus: isaacs: "Ok, this is where npm lives, I guess." is the right approach I guess [22:33] piscisaureus: It is far more commong to have data files in a binaries folder than vice versa [22:33] piscisaureus: $programData is a no go area for real binaries (.exe files) [22:34] isaacs: piscisaureus: ok. [22:34] isaacs: piscisaureus: so, if you put npm in ~/my-node-stuff/npm/ let's say, you'd have ~/my-node-stuff/npm/{stuff} [22:35] clarkfischer: What's the best way to run a script in detached mode? [22:35] piscisaureus: isaacs: lgtm [22:35] clarkfischer: child_process.spawn(script &)? [22:35] isaacs: clarkfischer: nohup node my-script.js [22:35] isaacs: clarkfischer: or have your script listen to process.on("SIGHUP" and respond by not dying. [22:36] dw_ has left the channel [22:38] Country has joined the channel [22:42] mjr_ has joined the channel [22:43] eee_c has joined the channel [22:43] ryanfitz has joined the channel [22:43] [[zz]] has joined the channel [22:44] w0rse_ has joined the channel [22:45] CrazyGoogle: 0.3.7 compilation still hangs on obj/release/mksnapshot obj/release/snapshot.cc [22:45] CrazyGoogle: with gcc 4.5.2 [22:45] CrazyGoogle: on 64 bit [22:46] piscisaureus: ryah: fs.symlink(target, path, [type], [cb]) ok? [22:46] ryah: piscisaureus: ... [22:46] admc has joined the channel [22:46] piscisaureus: ryah: &ellip; ? [22:46] ryah: piscisaureus: can't you punt that for now? [22:46] chrischris has joined the channel [22:47] ryah: it doesn't work on XP anyway [22:47] piscisaureus: ryah: junction point type would [22:47] piscisaureus: ACTION cries [22:48] CrazyGoogle: is there any way to find v8 version from node ? [22:48] ryah: CrazyGoogle: node -e process.versions.v8 [22:48] CrazyGoogle: something like nodeinfo() ? [22:48] CrazyGoogle: ok, thnx ryah [22:49] mikeal: ok, new nodeconf site [22:49] mikeal: less silly fonts [22:49] mikeal: http://www.nodeconf.com/ [22:50] mjr__ has joined the channel [22:50] tmpvar: mikeal, what is the status of spider.js? [22:50] mikeal: oh dude, i totally forgot about that project [22:50] lukegalea has joined the channel [22:50] mikeal: umn…. i don't know [22:50] mikeal: i'll probably get back to it soon enough [22:51] mikeal: i need it for some stuff [22:51] mikeal: top of my list right now is getting request 2.0 working and on the new http API [22:51] TomY__ has joined the channel [22:51] bbttxu has joined the channel [22:52] dmcquay has joined the channel [22:53] CrazyGoogle: wow (node) warning: possible EventEmitter memory leak detected. :D [22:53] CrazyGoogle: cool [22:53] CrazyGoogle: thats realy cool feature ! [22:53] tmpvar: mikeal, nps, thanks! [22:54] mikeal: tmpvar: still waiting on your nodeconf proposal :) [22:54] tmpvar: of course, I was shooting to submit it tonight [22:55] mikeal: cool : [22:55] mikeal: :) [22:55] w0rse has joined the channel [22:58] tjholowaychuk: mikeal: stylus isnt really good for a talk like that hey? it's not exactly a node-specific project [22:59] mikeal: it's not out of the bounds of stuff that nodeconf will cover [22:59] mikeal: but it might be a better fit at JSConf [22:59] mikeal: just because the audience is a little more rounded [22:59] tjholowaychuk: is there a cssconf haha, just seems out of place I guess [22:59] ericnakagawa has joined the channel [22:59] mikeal: did you submit it to both? [23:00] tjholowaychuk: nope [23:00] mikeal: cause Chris and I are working together on the nodeconf proposals so we can figure out where it fits better if it's accepted [23:05] DoNaLd`: hi .. i need make some nodejs script, which will be have interval every day check some data in my DB .. and i need this script execute automaticly in loop every day .. exist some example for this ? [23:05] Ond has joined the channel [23:06] pauls: DoNaLd`: if you're on unix, you might want to have the periodic execution handled by the cron [23:06] DoNaLd`: pauls: jj i'm on unix [23:06] DoNaLd`: s/jj/yes [23:09] DoNaLd`: and nodejs can't manage this looping ? ... only over cron ? [23:09] pauls: would have to defer to the experts on that one [23:09] isaacs: mikeal: so, another thing i forgot to mention, the global location is important for doing `npm link`. [23:09] isaacs: mikeal: basically, link will be a two-stage thing. the first links it into the globlal location, and then the second links it into the project that uses it [23:10] mikeal: right [23:10] mikeal: makes sense [23:10] tanepiper: tjholowaychuk: just saw stylus, nice :D [23:10] tjholowaychuk: tanepiper: :) [23:10] tanepiper: is the an express compiler? [23:11] jchris has joined the channel [23:11] tanepiper: just add ['stylus'] instead of less? [23:11] Vertice has joined the channel [23:11] lukegalea has joined the channel [23:11] tjholowaychuk: tanepiper: stylus accepts a lot more options so I wrote a custom middleware for it, require('stylus').middleware [23:11] tanepiper: cool. shall check it out tomorrow :) [23:12] warz has joined the channel [23:12] drewmiller: DoNaLd` that looks like a great cron job. Although in javascript you could try using setInterval to check the date & time occasionally.. [23:13] tanepiper: drewmiller: cron is prefered over setInterval for long loops, less chance of memory leaks or breakage [23:13] tanepiper: setInterval is good for short timed loops [23:14] DoNaLd`: ok thanx [23:14] jchris1 has joined the channel [23:15] perezd has joined the channel [23:15] bruce has joined the channel [23:16] jimt has joined the channel [23:17] neshaug has joined the channel [23:22] akahn has joined the channel [23:22] rburhum has joined the channel [23:22] jimt has joined the channel [23:24] echosystm has joined the channel [23:30] mraleph has joined the channel [23:30] drewmiller: tanepiper makes sense [23:33] lukegalea has joined the channel [23:35] perlmonkey2 has joined the channel [23:38] pyrotechnick: tjholowaychuk: what have you guys made exactly? [23:38] pyrotechnick: is it better than less? [23:39] tjholowaychuk: pyrotechnick: has more features than anything else for node [23:39] tjholowaychuk: ATM [23:39] pyrotechnick: sweet [23:39] tjholowaychuk: more than sass even in some ways [23:39] pyrotechnick: im looking forward to it [23:39] tjholowaychuk: but sass has been around for yearrrrrs [23:39] dmcquay has joined the channel [23:40] tjholowaychuk: but stylus is really robust for such a young project [23:43] mandric_ has joined the channel [23:43] jimt_ has joined the channel [23:48] nailer has joined the channel [23:48] Aikar: 05:33:30pm] < piscisaureus> $programData is a no go area for real binaries (.exe files) [23:48] Aikar: google does it all the time ;) [23:48] piscisaureus: Aikar: yeah. chrome ... [23:48] piscisaureus: umm I think it stuffs it in $appdata but it is kind of the same [23:49] piscisaureus: It is a mean way to get around restrictions that prevent a user from installing software [23:49] killfill: how do you guys use node on osx?.. brew and ports has old versions... you compile and install it on what dir? [23:50] rjbs: Do I need to do something special to enable "let" definitions of lexical variables? [23:50] jimt has joined the channel [23:50] piscisaureus: rjbs: not supported. that is moz-only [23:52] saikat has joined the channel [23:52] rjbs: Wat a bummer. Thanks. [23:53] tjholowaychuk: major bummer [23:54] piscisaureus: bummer the size of a planet [23:54] jesusabdullah: mozilla has "let?" [23:54] jesusabdullah: That's cool [23:54] jesusabdullah: I wonder how hard that would be to implement yourself [23:55] piscisaureus: jesusabdullah: https://developer.mozilla.org/en/JavaScript/Reference/Scope_Cheatsheet#let_statements_and_expressions [23:55] jherdman has joined the channel [23:56] jesusabdullah: Interesting. I don't know how I feel about their implementation, though [23:56] lukegalea has joined the channel [23:56] piscisaureus: jesusabdullah: don't bother. it's of no use to you :-) [23:56] jesusabdullah: Tssch [23:57] jesusabdullah: I use "let" in all sorts of places! [23:57] jimt has joined the channel [23:57] chapel: jesusabdullah: I'll let you use let when I feel like letting you! [23:57] piscisaureus: yeah me too. Like when I say "who let the dogs out?" [23:57] marcosvm has left the channel [23:59] tjholowaychuk: "Bad argument" gah [23:59] tjholowaychuk: these suck [23:59] tjholowaychuk: oh fuck i was using readFile instead of read, my bad [23:59] jesusabdullah: Gaga, ooh la la, want your bad argument [23:59] djanowski has joined the channel