[00:00] heavysixer has joined the channel [00:02] _jdalton has left the channel [00:02] phiggins has joined the channel [00:06] amerine has joined the channel [00:07] ezmobius has joined the channel [00:08] stalled has joined the channel [00:10] willwhite has joined the channel [00:10] boaz has joined the channel [00:11] pquerna: piscisaureus: sorry, internal crap, should have it done today [00:11] pquerna: piscisaureus: i was off most of last week at company training stuff and didn't have time to deal with anything :-/ [00:11] isaacs: piscisaureus: i thought it was just NODE_DEBUG=1 node_g blah.js [00:12] piscisaureus: pquerna: you have an eta for when everything is in place? [00:12] q_no has joined the channel [00:12] piscisaureus: isaacs: that changed somewhere in 0.3.x [00:12] isaacs: piscisaureus: cool [00:12] piscisaureus: should ask ryah for the dirty details [00:12] isaacs: ACTION still uses alert() cuz he's old sk00l [00:12] pquerna: piscisaureus: hopefully should get a mail to you tomorrow. [00:13] pquerna: (already past COB in us central time) [00:13] piscisaureus: pquerna: I'm getting quite used to that :-) [00:13] trefn has joined the channel [00:13] MikeMakesIt: Did anyone have an answer as to whether 0.4.0-pre was the "right" version of node to be using? Or is there another version considered more stable? [00:14] jeromegn: zemanel: what have you read on the subject as of yet? I'm interested in knowing too ;) [00:14] zemanel: jeromegn: this thread http://groups.google.com/group/socket_io/browse_thread/thread/7c0cffb5621b3a65/3eec384ddf1c4bba [00:14] mscdex: MikeMakesIt: 0.2.x is current stable, but the new stable branch 0.4.x is coming out very soon [00:14] jeromegn: thanks [00:15] mscdex: MikeMakesIt: odd numbered branches are unstable (0.3.x, 0.5.x, etc) [00:15] zemanel: jeromegn: these links actually: http://paste.pocoo.org/show/334087/ [00:15] MikeMakesIt: Thanks, so once 0.4.0 hits, it should be the one to use if you want stable rather than bleeding edge? [00:15] piscisaureus: pquerna: PM [00:16] mscdex: MikeMakesIt: correct [00:16] jeromegn: zemanel: that google group thread sounds like it, have you tried it? [00:17] mscdex: MikeMakesIt: however, it is possible not all module authors will have updated their modules to work with 0.4.0 when it lands, so just keep that in mind when it does roll out [00:17] ryah: MikeMakesIt: you should use 0.3 now. [00:17] ryah: 0.3.8 [00:17] heavysixer has joined the channel [00:18] zemanel: jeromegn: cant remember, tried a couple of things. but there was a comment on StackOverflow warning agaisnt its use, as it would hold the last connectec user or something [00:19] MikeMakesIt: Yeah I think I'm having a problem with wheat & 0.4.0 - https://github.com/creationix/wheat/ [00:19] MikeMakesIt: it's throwing an error on his code - window.console = console [00:20] ryah: MikeMakesIt: hm.. strange [00:20] MikeMakesIt: TypeError: Cannot set property console of # which has only a getter [00:20] ryah: MikeMakesIt: more detail? [00:20] zemanel: jeromegn: havent worked on it extensibly, but the 1st answer here kind of works: http://stackoverflow.com/questions/4641053/socket-io-and-session [00:20] MikeMakesIt: throw e; // process.nextTick error, or 'error' event on first tick [00:20] MikeMakesIt: ^ [00:20] MikeMakesIt: TypeError: Cannot set property console of # which has only a getter [00:20] MikeMakesIt: at Object. (/home/dev/local/lib/node/.npm/wheat/0.1.5/package/lib/wheat/prettify.js:62:20) [00:20] MikeMakesIt: at Module._compile (module.js:302:26) [00:20] MikeMakesIt: at Object..js (module.js:308:10) [00:20] MikeMakesIt: at Module.load (module.js:234:31) [00:20] MikeMakesIt: at Function._load (module.js:201:10) [00:20] MikeMakesIt: at require (module.js:246:19) [00:20] MikeMakesIt: at Object. (/home/dev/local/lib/node/.npm/wheat/0.1.5/package/lib/wheat/renderers.js:5:16) [00:20] MikeMakesIt: at Module._compile (module.js:302:26) [00:20] MikeMakesIt: at Object..js (module.js:308:10) [00:20] MikeMakesIt: at Module.load (module.js:234:31) [00:20] jeromegn: zemanel: I'm thinking: when the client connect, have him send his session... store this client with its session in an array of clients, then on every message you send from the client, also send the user_id or something to identify him... retrieve it from the array and send him messages specific to him, makes sense? [00:20] isaacs: MikeMakesIt: gist.github.com is your friend [00:20] isaacs: MikeMakesIt: don't set "console" on the global object. it's a getter. [00:20] MikeMakesIt: sorry [00:20] kris_ has joined the channel [00:20] ryah: MikeMakesIt: and let's see lib/wheat/prettify.js:62 [00:21] isaacs: it's ok :) [00:21] Lorentz has joined the channel [00:21] jeromegn: interesitng [00:21] MikeMakesIt: line 62 is [00:21] MikeMakesIt: window.console = console [00:21] isaacs: MikeMakesIt, ryah: if window === global, and you're setting window.console, then you're going to have that problem. [00:21] MikeMakesIt: It's not my code, just trying to get a npm package working [00:21] isaacs: MikeMakesIt: yeah [00:21] isaacs: MikeMakesIt: but, i'm saying, that's howthat happens. global.console is a getter. [00:21] mnot: ryah: *finally* getting a chance to look at the HTTP client API changes (yeah, it was a long holiday) [00:22] ryah: mnot: what do you think? [00:22] mnot: ryah: looks good overall [00:22] ryah: mnot: built in connection pool now [00:22] MikeMakesIt: Has it always been the case? Cos then the package would not have worked in the past? [00:22] ryah: MikeMakesIt: you should try to fix it [00:22] mnot: ryah: oh good, that saves me some work ;) [00:22] mnot: ryah: BUT the lack of symmetry between the server and client APIs makes me sad [00:22] mnot: ryah: and the ability to set trailers on a HTTP request seems to have disappeared [00:23] mnot: ryah: also, there was a long discussion last year about changing the data structure for headers to something list-based. Is that off the table now? [00:23] Vezquex has joined the channel [00:24] zemanel: jeromegn: possibly, if you sign the data sent to the client [00:24] mnot: ryah: trailers aren't a showstopper, btw, just would be good to cover the cases (otherwise it leaves intemediaries with a bad choice to make). [00:25] blowery_off has joined the channel [00:25] ryah: mnot: agreed [00:25] MikeMakesIt: isaacs: here is the block of code surrounding that line [00:25] hunterloftis: Anybody else notice that socket.io flashsocket is super slow? [00:25] MikeMakesIt: https://gist.github.com/815589 [00:25] MikeMakesIt: Because window is explicitly set to GLOBAL, it will always fail, correct? [00:25] trefn: i'm getting an error writing to a socket: http://dpaste.com/396247/ [00:26] MikeMakesIt: I'm new to node and trying to understand what he is doing there [00:26] ziro` has joined the channel [00:27] isaacs: MikeMakesIt: yeah, looks like he's trying to monkey-patch the "console" object, but it's unnecessary there. [00:27] Me1000 has joined the channel [00:27] isaacs: MikeMakesIt: i don't know why he's testing for "require" rather than testing for "console" there [00:28] isaacs: that's a bug. [00:28] isaacs: post it to the author :) [00:28] MikeMakesIt: Yeah I posted an issue on his github [00:28] isaacs: kewl [00:28] MikeMakesIt: was just trying to shortcut the process as well :) [00:28] shiawuen has joined the channel [00:28] MikeMakesIt: thanks for your help [00:28] isaacs: "if (typeof require === 'function') {" should probabl be "if (typeof GLOBAL.console !== 'object') {" [00:28] isaacs: or something along those lines [00:29] MikeMakesIt: thanks [00:29] jeromegn has joined the channel [00:29] jeromegn: zemanel: just tried it... works perfectly! [00:29] jeromegn: zemanel: that stackoverflow solution [00:29] isaacs: np :) [00:30] aro has joined the channel [00:30] zemanel: jeromegn: thats the code i have atm, only that sometimes an object on client.request.headers.cookie comes undefined [00:30] zemanel: maybe client.request.headers [00:30] sprout has joined the channel [00:30] jeromegn: zemanel: I'll kick the tires some and see what happens [00:31] wvl has joined the channel [00:31] zemanel: sorry im not better help, i havent worked extensibly on it [00:32] jeromegn: zemanel: you've already saved me a ton of time... [00:32] jeromegn: :) [00:33] dominictarr has joined the channel [00:34] piscisaureus: isaacs: where/why does npm change process.ENV? [00:34] isaacs: piscisaureus: i dont' think it does... [00:34] isaacs: it just reads from procss.env [00:34] cloudhead has joined the channel [00:34] isaacs: it sets the env for child processes that it runs [00:35] piscisaureus: uhh ok for me it complains that setenv is not implemented [00:35] isaacs: oh, weird. [00:35] isaacs: hey, probably because of setting it for child_process.spawn? [00:35] piscisaureus: no because for child processes it *is* supported [00:35] isaacs: oh, odd. [00:36] softdrink has joined the channel [00:36] piscisaureus: but if you don't know either, i guess I can find out muself [00:36] CIA-99: node: Bert Belder master * r61af420 / (lib/dns.js src/node_os.cc): Fix dns on windows - http://bit.ly/f8IhoT [00:36] isaacs: oh, it looks lik ei do that in lib/repl.js: lib/repl.js: process.env.NODE_NO_READLINE = 1 [00:37] torvalamo: what happened to the perdy colours on cia-99? [00:37] torvalamo: there were colors, right? [00:37] isaacs: oh, hey, hahaha [00:37] torvalamo: i'm not just imagining shit [00:37] isaacs: piscisaureus: nvm, found it. good catch, thanks :) [00:38] isaacs: piscisaureus: https://github.com/isaacs/npm/blob/master/lib/cache.js#L423-425 [00:38] piscisaureus: heh [00:38] piscisaureus: *wrong* [00:39] josh1 has joined the channel [00:40] doki_pen: is there a way to make an array of _n_ length filled with the same value in one line? [00:40] piscisaureus: seems like bug finding through porting works both ways [00:42] mnot: ryah: I'm inclined to split up http.js into http.js / http_server.js / http_client.js (sort of like pquerna did); any thoughts? [00:42] FireFly|n900: torvalamo, yep. Prolly the chanmodes [00:42] FireFly|n900: e.g. no color channel flag [00:42] FireFly|n900: hm [00:42] ryah: mnot: let's wait until the v0.5 fork for that [00:42] FireFly|n900: i.e.* [00:42] doki_pen: for instance, in ruby you could do [1]*10 or Array.new(10){1} [00:42] mnot: ryah: k, np [00:43] ryah: mnot: some tests for the trailing headers failing out be great [00:43] ryah: s/out/would/ [00:43] vnguyen has joined the channel [00:43] mnot: ryah: ok [00:43] FireFly|n900: doki_pen, not in a nice fashion [00:43] boogyman has joined the channel [00:43] FireFly|n900: v8> Array(10).join("1") [00:43] v8bot: FireFly|n900: "111111111" [00:44] FireFly|n900: v8> Array(10).join("1").split("") [00:44] v8bot: FireFly|n900: ["1", "1", "1", "1", "1", "1", "1", "1", "1"] [00:44] FireFly|n900: but it's ugly [00:44] doki_pen: ('1'*10).split('') [00:44] doki_pen: no, doesn't work [00:45] FireFly|n900: nope, '1'*10 = 10 [00:45] doki_pen: alright, maybe I just need to change up my algorithm [00:46] isaacs: you can use that trick to check if a number is prime with a regular expression. [00:46] FireFly|n900: heh... [00:46] blueadept has joined the channel [00:47] mnot: ryah: actually, seems to be a documentation error; at least, OutgoingMessage.prototype.addTrailers is still there. [00:47] isaacs: v8: Array(10).join("1").match(/^1?$|^(11+?)\1+$/) [00:47] v8bot: isaacs: ["111111111", "111"] [00:47] ryah: also should be writeTrailers() to match writeHead() [00:47] isaacs: v8: Array(11).join("1").match(/^1?$|^(11+?)\1+$/) [00:47] v8bot: isaacs: ["1111111111", "11"] [00:47] mnot: ryah: works for me [00:47] isaacs: hm, doesn't seem to work [00:48] doki_pen: heh. I just turned things inside out and now I don't need it [00:48] mikeal has joined the channel [00:48] mnot: although it basically adds trailers to a buffer, it doesn't write them when the call is made [00:48] aurynn has joined the channel [00:49] mike5w3c has joined the channel [00:50] hornairs: does anyone in here use handlebars.js? [00:50] dominictarr has joined the channel [00:50] syntheze has joined the channel [00:51] mw has joined the channel [00:52] SubStack: sweet replication trick! [00:53] unomi has joined the channel [00:53] ryah: mnot: setTrailer would be okay [00:54] mnot: ryah: that's better. [00:54] zemanel: jeromegn: http://mattmueller.me/blog/quick-tip-node-js-socket-io-authentication [00:55] jeromegn: zemanel: sounds like the same thing, right? the session store is in a cookie on the client side! [00:56] zemanel: y [00:57] isaacs: FireFly|n900: oh, you have to add 1 to the number. [00:57] eirikurn has joined the channel [00:57] isaacs: v8: Array(10).join("1").length [00:57] v8bot: isaacs: 9 [00:58] isaacs: v8: function isPrime (n) { return ! Array(n+1).join("1").match(/^1?$|^(11+?)(\1+)$/) } ; var o = {}; for (var i = 0; i < 25; i ++) o[""+i] = isPrime(i); o [00:58] v8bot: isaacs: {"0": false, "1": false, "2": true, "3": true, "4": false, "5": true, "6": false, "7": true, "8": false, "9": false, "10": false, "11": true, "12": false, "13": true, "14": false, "15": false, "16": false, "17": true, "18": false, "19": true, "20": false, "21": false, "22": false, "23": true, "24": false} [00:58] MikeMakesIt: Any reason why it has to be on one line? [00:58] isaacs: MikeMakesIt: why what has to be? [00:59] MikeMakesIt: the 1111111111 thing? [00:59] MikeMakesIt: doki_pen [00:59] MikeMakesIt: is there a way to make an array of _n_ length filled with the same value in one line? [00:59] isaacs: MikeMakesIt: well, it's here in irc, and v8bot parses each line as a separate program [00:59] MikeMakesIt: right [00:59] isaacs: MikeMakesIt: but you could do it in multiple statements, sure. [01:00] MikeMakesIt: but his original question was to do it in one line, was just wondering why [01:00] isaacs: v8: n = 10; arr = Array(n+1) ; str = arr.join("1") [01:00] v8bot: isaacs: "1111111111" [01:00] doki_pen: MikeMakesIt: why in one line? [01:00] MikeMakesIt: doki_pen: yeah [01:01] doki_pen: MikeMakesIt: because it's trivial and interferes with the flow of the code. I suppose I could make a function, but it seems like something someone else probably already made. [01:01] mnot: ryah: although the current code doesn't blow away the existing trailers ('set'), it appends to them ('add') [01:01] isaacs: doki_pen: i'd probably make it a function, since you have to do that stupid +1 thing and it's not exactly obvious what it is. [01:01] MikeMakesIt: cool [01:01] doki_pen: MikeMakesIt: anyway, I restructured the code and it's much better now, and I no longer needed it, so praise the gods [01:02] doki_pen: needing it was probably a sign that I was being dumb [01:02] doki_pen: isaacs: right, the hack would be worse then multiple lines of code [01:03] doki_pen: unless it was idiomatic [01:03] c4milo1 has joined the channel [01:03] ossareh has joined the channel [01:03] doki_pen: I'm fairly new to node, so I thought there might be a way that I didn't know [01:03] MikeMakesIt: doki_pen: Can't hurt to ask [01:03] dnolen has joined the channel [01:04] doki_pen: at least we got an interesting discussion about detecting prime numbers with regexes :P [01:04] bbn has joined the channel [01:05] doki_pen: does anyone use vows? I want to take a table of data (input, expected result) and run them all instead of making a vow for each one seperately. What's the best structure? Any examples? [01:06] bradleymeck has joined the channel [01:06] hunterloftis: I'm about to wrap a DOM-based library (KnockoutJS) into a NodeJS module. Any tips on quick ways to do that, or is this inevitably going to take some rewriting? [01:07] atmos: doki_pen: you mean like fit testing or cucumber tables ? [01:07] ryah: mnot: good point. well - whatever. i don't care about the spelling much. [01:07] atmos: hunterloftis: if they're common js modules it shouldn't be too insane [01:07] hunterloftis: atmos: No such luck, it's a DOM/view templating library [01:07] dominictarr has joined the channel [01:09] doki_pen: atmos: yes, I'm porting my ruby cucumber tests to vows [01:09] atmos: hunterloftis: https://github.com/janl/mustache.js might help some [01:09] hunterloftis: atmos: thanks [01:09] doki_pen: atmos: if there is a better tool, I'm open to trying it [01:09] atmos: doki_pen: word, i have no idea :( [01:10] atmos: i have some really simple stuff in vows but still haven't figured out how to do multiple calls with callbacks and stuff [01:10] atmos: the duplication annoyed me but having things tested kinda helped [01:11] doki_pen: right, I can come up with something that generates a hash programmatically, then merge it into the batch. I just don't want to reinvent the wheel if I don't have to [01:11] doki_pen: I'll try that [01:11] atmos: lemme know how that goes [01:11] Vertice has joined the channel [01:11] doki_pen: I'll release the code sometime this week [01:12] atmos: i think you can prolly do that but i always screw up the chaining of the vows object :) [01:12] doki_pen: it will be at https://github.com/embedly [01:12] Vertice has joined the channel [01:12] piscisaureus: isaacs: so you're downloading packages to /tmp, uncompressing them, then recompressing them to lib/.npm/.cache? [01:13] isaacs: piscisaureus: yes. [01:13] piscisaureus: why? [01:13] isaacs: piscisaureus: so as to filter out garbage and detect many potential issues. [01:13] isaacs: you'd be amazed what kind of stuff people try to publish. [01:13] piscisaureus: heh lol [01:13] piscisaureus: ok sounds sane [01:13] isaacs: in the securify branch, it's even more stringent. [01:13] hswe_ has joined the channel [01:13] isaacs: also enforces permissions and ownership (if possible) [01:14] isaacs: since the cache step is a precursor to both publish and install, it creates a very consistent base and eliminates many edge cases. it is a bit of extra back and forth, but meh. [01:14] isaacs: cheaper to let the computers do that, so as to save the humans some time later. [01:14] piscisaureus: :-) [01:15] piscisaureus: I don't mind, but I just needed confirmation that this behaviour was actually expected [01:15] stepheneb has joined the channel [01:15] isaacs: yep [01:15] piscisaureus: not some glich [01:15] isaacs: it's awesome having you smoke-test this stuff :0 [01:15] piscisaureus: *glitch [01:15] isaacs: wanna be my new QA? [01:15] piscisaureus: isaacs: nope [01:15] piscisaureus: well for a while that's ok [01:15] isaacs: sure [01:15] isaacs: only half-kidding [01:15] isaacs: :) [01:16] isaacs: seriously, i really do appreciate it. thank you. please keep doing this as much as you like and for as long as you like. [01:16] piscisaureus: isaacs: you wanna be my test-case writer [01:16] jpstrikesback has joined the channel [01:16] cronopio has joined the channel [01:17] sechrist has joined the channel [01:17] isaacs: ryah: removing the hashing/cipher from require("crypto"). pre- or post-0.5 split? [01:17] piscisaureus: gern geschehen [01:18] arpegius has joined the channel [01:18] ryah: post [01:19] iszak has joined the channel [01:19] atmos: so is 0.4.x coming out soonish ? [01:19] dominictarr has joined the channel [01:19] muk_mb has joined the channel [01:20] losing has joined the channel [01:20] ryah: atmos: this week [01:20] atmos: badass [01:20] jpstrikesback has joined the channel [01:20] edude03: Damn. [01:20] edude03: Any changes I should worry about between 0.3.8 and 4? [01:21] ryah: no [01:21] ryah: 0.3.8 is 0.4.0 :) [01:21] atmos: i haven't touched 0.3.x much at all [01:21] ryah: atmos: https://github.com/ry/node/wiki/Migrating-from-v0.2-to-v0.3 [01:21] ryah: atmos: not much to fear [01:21] atmos: sweet [01:22] edude03: 4 is 0.3.8 stable? [01:22] atmos: oh damn, awesome [01:23] atmos: i'll have to fix a few things for some https code but it looks better from a quick glance [01:23] Jaye has joined the channel [01:25] zentoooo has joined the channel [01:25] isaacs: woot. securify landed on github. https://github.com/isaacs/npm [01:25] isaacs: not published yet. anyone feeling brave? [01:26] isaacs: ryah: awesome. (re crypto disappearing) [01:26] brapse has joined the channel [01:29] piscisaureus: isaacs: I know this is a sensitive subject, but [01:29] zhesto has joined the channel [01:29] piscisaureus: 9 out of 10 cases you should be using path.resolve instead of `if (folder[0] != '/') folder = process.cwd() + "/" + folder` [01:30] arpegius has joined the channel [01:31] Vertice has joined the channel [01:33] isaacs: piscisaureus: not sensitive. just that that code predates path.resolve [01:33] isaacs: patches welcome :) [01:34] isaacs: piscisaureus: also, using path.resolve means that i have to be willing to require node 0.3.x [01:34] piscisaureus: isaacs: yeah I understand [01:34] isaacs: piscisaureus: which, really, is fine eventually, but kinda has to be as broad as possible, since it's the thing you use to install other things. [01:35] isaacs: but 0.3.x is required for https and setuid anyhow, so after the 0.4 split, i'm gonna just require 0.4.0 or higher [01:35] isaacs: and 0.2 will be left behind [01:35] piscisaureus: isaacs: sounds ok [01:35] isaacs: ok, school time. see ya :) [01:35] isaacs: thanks again :) [01:35] davidsklar has joined the channel [01:35] piscisaureus: later [01:35] piscisaureus: np [01:35] davidsklar has left the channel [01:36] doki_pen: atmos: got something working: https://gist.github.com/815675 [01:37] doki_pen: not exactly easy on the eyes though [01:38] perlmonkey2 has joined the channel [01:38] atmos: yeah :\ [01:40] unomi has joined the channel [01:40] richcollins has joined the channel [01:42] ryah: man. i can't figure out why chrome is hanging on the https server... [01:44] piscisaureus: welcome to the land of frustrated noobs [01:44] sprout has joined the channel [01:50] cjm has joined the channel [01:52] xonecas has joined the channel [01:53] hunterloftis: Good resources on how to write a commonJS module? [01:53] piscisaureus: ryah: you're the network man. Is it possible to gracefully close a network connection to an application that is blocked? [01:53] piscisaureus: (more specifically: suppose I have an ipv4 socketpair, can I make a blocking call on one end that gracefully disconnects it from the main thread) [01:54] thegaw has joined the channel [01:54] stepheneb has joined the channel [01:55] ryah: define graceful disconnect. shutdown? [01:55] dominictarr has joined the channel [01:56] BillyBreen has joined the channel [01:56] mscdex: hunterloftis: attach stuff to the 'exports' object. require it from another file and you'll get everything you attached [01:56] hunterloftis: mscdex: Okay, that's what I always do. Trying to make it browser compatible as well [01:56] airhorns has joined the channel [01:56] jashkenas has joined the channel [01:56] hunterloftis: mscdex: (writing something for both sides of the stack) [01:56] piscisaureus: ryah: like the other end doesn't die with ECONNRESET [01:57] piscisaureus: oh shutdown * [01:57] mscdex: hunterloftis: i think someone wrote a layer that provides require and stuff for the browser [01:57] hunterloftis: mscdex: k thanks [01:58] mscdex: hunterloftis: requirejs.org is one [01:59] Jaye: requirejs is async and a little annoying, someone in here posted node-browserify that packages modules and gives you sync require yesterday, ahh substack https://github.com/substack/node-browserify [02:00] SubStack: me! [02:00] SubStack: yeah I hate async [02:00] mscdex: SubStack to the rescue! [02:00] Rixius has joined the channel [02:00] SubStack: for module loading [02:01] Jaye: same, im used to sync module loading thanks to node [02:01] Aria has joined the channel [02:01] Jaye: SubStack++ [02:01] v8bot: Jaye has given a beer to SubStack. SubStack now has 12 beers. [02:01] jonaslund: ACTION wrote his own require [02:01] jonaslund: xhr based sync loading [02:01] hunterloftis: ah substack looks excellent [02:01] SubStack: jonaslund: I've done that [02:01] edude03 has left the channel [02:02] jonaslund: not exactly rocket science :) [02:02] SubStack: it works ok but then if you want to load too many modules chrome kills it [02:02] SubStack: because the requests lock up the page [02:02] hunterloftis: SubStack: yeah? I was wondering about that [02:02] jonaslund: mmh [02:02] hunterloftis: SubStack: Hard to find a reliable require() in the browser [02:02] SubStack: browserify just bundles them all into /browserify [02:02] SubStack: .js [02:02] jonaslund: all the roundtrips would be annoying from a user-interface perspective aswell [02:03] jonaslund: SubStack: ahh excellent [02:03] SubStack: also true [02:03] mjr_: ryah: I was just about to tell you that Chrome was hanging on HTTPS, but I guess you are on it. [02:03] mjr_: ryah: I figured it must be my certs or something. [02:03] SubStack: next I'll set up watches on all the source files so you can update your client script files without restarting the server [02:03] jonaslund: SubStack: might use that for release versions then [02:04] SubStack: plus dependencies for wrapped npm modules and builtins like util [02:05] Jaye: i had been using oni apollo's require but i took a look at the generated code the other day and it is terrifying [02:05] kris__ has joined the channel [02:05] jonaslund: SubStack: does browserify minify aswell ? [02:05] SubStack: nope [02:05] SubStack: possible to do however [02:07] jpstrikesback: hey, has there been any talk of a centralized nodejs.org community site? kinda like drupal.org? [02:07] edw has joined the channel [02:08] jonaslund: personally i'm unsure if the commonJS require definition is good for quick development [02:08] jonaslund: while scoping stuff up into separate things is a good thing, it's a bit of an impedient when doing iterative development [02:09] ryah: mjr_: not sure what it is. really strange [02:09] ryah: but im debugging it now [02:09] mjr_: I just noticed that it started working. [02:10] jonaslund: what i guess i'm thinking of would be to have the repl be able to "eval" in different module contexts [02:10] mjr_: Is there some extra validation that Chrome does that other browsers do not do? [02:10] hunterloftis has joined the channel [02:10] ryah: i think there is a bug in the tls layer [02:11] Jamool has joined the channel [02:15] mjr_: I think there are bugs in my room. [02:15] mjr_: Due to an accidentally left open door. [02:15] mjr_: It's basically an Indiana Jones situation. [02:16] josephhitchens: does http.Client attempt to follow any redirects? [02:16] tokumine has joined the channel [02:22] MikhX has joined the channel [02:23] dnyy has joined the channel [02:24] Mike_Rice has joined the channel [02:24] astropirate has joined the channel [02:24] MikeMakesIt: I'm amazed at how fast node & npm move [02:24] ryah: josephhitchens: no [02:25] davidascher has joined the channel [02:25] astropirate: Greetings [02:25] josephhitchens: thx ry [02:25] MikeMakesIt: Normally with software when features are discussed about being included in the future or a new version coming out, theres a significant delay [02:25] MikeMakesIt: ryah & isaacs: you guys seems to burn through code :-) [02:26] jamescarr has joined the channel [02:26] Mike_Rice: ryah: are there any good references on the web to understanding asynchronisity, specifically related to javascript and/or node? I've got some holes in my current app and I need to better understand what is going on. [02:26] ryah: we're just moving fast because of our deadline [02:27] MikeMakesIt: What drives the deadline? [02:27] piscisaureus: I'm giving up. [02:27] piscisaureus: Farewell [02:27] Mike_Rice: pisciasaureus: me to [02:28] piscisaureus: rightly so [02:28] Mike_Rice: :-) [02:28] MattDiPasquale has joined the channel [02:29] jpstrikesback: what's the deadline? 2012? :P [02:29] jashkenas: nodeconf perhaps. [02:29] Mike_Rice: can anyone point me to some intro to async stuff? [02:29] konobi: the deadline is just moar awesome [02:31] ryah: jpstrikesback: we're releasing v0.4 this week [02:32] SubStack: intro to async? hmmmm [02:32] jpstrikesback: aaf course :) I read that [02:32] MikeMakesIt: ryah: What set the deadline to release this week? [02:32] jchris has joined the channel [02:32] jpstrikesback: moar awesome [02:33] Mike_Rice: then let me ask this questions since the room is so lively [02:34] josephhitchens: is 2.6 still the latest stable? that's what the website says. [02:34] Mike_Rice: if Node.js is single-threaded, do callbacks and event notifications run in other threads? [02:34] jpstrikesback: so I guess there's no talk yet of a community site that kinda pulls it all together in one monolithic chunk - anyone interested in that? [02:34] Mike_Rice: josephhitches: I believe 0.4.0 will be next week, which will be the next stable [02:34] ryah: Mike_Rice: no, it's single-threaded [02:34] josephhitchens: joy! [02:34] jpstrikesback: josephhitchens: even = stable, odd = unstable [02:35] jpstrikesback: sorry hitches [02:35] Rixius: Mike_Rice: IT's an event loop, the callbacks hapen on their turn in line. [02:35] Mike_Rice: ryah: everything runs on one thread? [02:35] ryah: Mike_Rice: yes [02:35] JohnnyL: 0 is neither odd nor even. [02:35] ryah: Mike_Rice: that's what is meant by 'single-threaded' [02:35] jpstrikesback: 0 is awesome [02:35] Mike_Rice: ryah: just trying to fully understand this. [02:36] Mike_Rice: so what if I'm not using callback and listeners and simply programming old-school, can normal function complete out of order? [02:36] Jaye: in the same vein as Python Twisted or Event Machine if you have used those [02:36] Mike_Rice: Jaye: I have not. I'm C# and Php [02:36] Rixius: Mike_Rice: It's exactly like the event loop JAvaScript in the browser [02:36] Mike_Rice: Rixius: which I still don't fully understand [02:37] josephhitchens: I really must write my book, "The Joy of Closures" [02:37] Mike_Rice: I'm trying to become a more proficient programmer [02:37] SubStack: josephhitchens: I'll illustrate it! [02:37] Mike_Rice: and obviously event driven is beyond my current repertoire [02:38] Jaye: Basically async functions return immediately with no meaningful value so the code continues, when they are done they call whatever function you have as your callback [02:38] jpstrikesback: Mike_Rice: this blog has some nice tips on event driven - http://bit.ly/fyUgIm [02:38] Mike_Rice: Jaye: is there a declaration for an async function [02:38] russell_h: anyone know of a good javascript parser for node? [02:39] SubStack: russell_h: what are you parsing? [02:39] russell_h: SubStack: javascript files [02:39] SubStack: oh [02:39] russell_h: SubStack: I'm bored and want to ipmlement a javascript interpreter in javascript [02:39] SubStack: for ASTs or something more specific? [02:39] Mike_Rice: jpstrikesback: thanks, I'll give it a read [02:39] lbayes has joined the channel [02:39] broofa has joined the channel [02:39] SubStack: bored! [02:39] russell_h: mmm, maybe thats the wrong word [02:40] SubStack: russell_h: you can trawl random github projects and submit patches [02:40] russell_h: it seems like a good way to familiarize myself more with javascript [02:40] dominictarr has joined the channel [02:40] lbayes: Hey folks, I'm new to node, trying to do some experiments. Can anyone point me at a clean project setup that includes support for TDD? [02:41] Jaye: Mike_Rice: nodes callback style is: asyncFunc(args, function(err, result) {if (err)// error: propagate it or handle it else // do something with result}); [02:41] lbayes: I'm thinking some github project or other... Was stoked to see this: http://howtonode.org/testing-your-javascript [02:41] lbayes: but couldnt' get it working [02:41] zemanel: lbayes: express has a cli tool that generates a small sample project [02:42] zemanel: expressjs.com [02:42] lbayes: thanks zemanel, will check it out. [02:42] zemanel: are you aware of npm yet? [02:43] ryah: what's with chrome. it's closing the connection on node :/ [02:43] Jaye: vowsjs is more recently updated and very similar to shoulda if you cant get it working [02:43] ryah: it might be the non-domain name CN ? [02:43] lbayes: 'aware' is probably a good description. I have it installed, got express with it, but I'm admittedly a little freaked out about another package manager.... [02:45] zemanel: lbayes: it runs on node so it's OS agnostic [02:45] lbayes: yeah, I have a long (sometimes painful) history of working with Rubygems... [02:45] lbayes: :-) [02:46] SubStack: there's expresso too [02:47] SubStack: and more! [02:47] zzak: lbayes: ive been using jasmine for some js stuff [02:47] lbayes: OK - thanks for the tip zemanel, are there any non-web projects going on? I'm mainly looking for the (testable) hello world of terminal applications with node... [02:47] zzak: its comforting to a rubyist [02:48] Jamool has joined the channel [02:48] zemanel: lbayes: dunno, you can at least check node github project for the cli interface [02:48] chris6F: i've got a lib for creating CLI apps - chriso/cli [02:48] chris6F: that what you mean? [02:48] zemanel: chris6F: ye [02:49] zemanel: i was just about to write that something like that would be useful [02:49] mkidder has joined the channel [02:50] cjm has joined the channel [02:50] chris6F: i'd check out https://github.com/ry/node/wiki/modules before writing anything - chances are someone's tried [02:51] zemanel: nice [02:51] indexzero has joined the channel [02:51] lbayes: nice [02:52] jamesarosen has joined the channel [02:53] braddunbar: what auth middleware is most stable for express? [02:54] tfe_ has joined the channel [02:54] zemanel: found at least 6/7 couchdb clients :/ [02:55] mscdex: there's also ncurses for more complex console user interfaces :-D [02:56] josh2 has joined the channel [02:56] konobi: ryah: tried testing the same cert against nginx? [02:57] strmpnk has joined the channel [02:58] konobi: ryah: is it SSL or TLS? [03:01] Jamool: hello [03:01] Jamool: anyone down to answer some socket.io questions for me? [03:02] zemanel: Jamool: yo dawg [03:02] zemanel: sup [03:02] Jamool: hey [03:02] joshdavey_ has joined the channel [03:02] Jamool: i am trying to combine a draw together type app with a chat as well [03:02] Jamool: both use socket.io [03:03] Jamool: anyway i can get them to run at the same time [03:03] zemanel: im doing something similar except its a board game [03:03] Jamool: cool [03:03] mikekidder has joined the channel [03:03] zemanel: its gonna be done around 2022 [03:03] Jamool: haha [03:04] Jamool: i am in architecture school, but we get a random class to just explore whatever direction you want [03:04] Jamool: so i did node [03:04] mkidder has joined the channel [03:04] zemanel: so whats up [03:05] Jamool: but trying to make it architectural at the same time [03:05] Silks has joined the channel [03:05] zemanel: architectural is over at #java [03:05] mscdex: well, monopoly is architectural! [03:05] mscdex: :p [03:05] Jamool: umm how do you get socket to listen and communicate with two different apps [03:05] zemanel: here ppl get shit done :) [03:06] Jamool: the chat and the draw canvas [03:06] lbayes: so... I'm trying to use jasmine outside of a browser context, and it feels like I'm doing something stupid. [03:06] lbayes: I grabbed the download here: http://pivotal.github.com/jasmine/download.html [03:06] lbayes: which is really cool if you're using a browser, but I'm trying to work strictly in node. [03:07] kris_ has joined the channel [03:07] lbayes: So, instead of the 'SpecRunner.html' file, I have something more like: require.paths.push('./src'); [03:07] lbayes: require.paths.push('./lib/jasmine-1.0.1'); [03:07] lbayes: require.paths.push('spec'); [03:07] lbayes: require('song'); [03:07] lbayes: require('player'); [03:07] lbayes: require('spec_helper'); [03:07] lbayes: require('player_spec'); [03:07] lbayes: (sorry for the multi-line junk) [03:07] jakehow has joined the channel [03:07] lbayes: when I try to run this with: node spec_runner.js, I get: node.js:116 [03:07] lbayes: throw e; // process.nextTick error, or 'error' event on first tick [03:07] lbayes: ^ [03:07] lbayes: ReferenceError: beforeEach is not defined [03:07] lbayes: at Object. (/Users/lbayes/Projects/Nasc/spec/spec_helper.js:1:63) [03:07] lbayes: at Module._compile (module.js:302:26) [03:08] lbayes: ... [03:08] zemanel: lbayes: paste.pocoo.org [03:08] Rixius: use a pastebin please [03:08] lbayes: thanks, I'll do that. Kind of a noob at irc. [03:08] lbayes: sorry. [03:08] lbayes: Essentially, the methods defined in the jasmine library aren't accessible to the spec. [03:09] konobi: lbayes: you're pushing the path, but not requiring the library [03:09] lbayes: nice [03:09] lbayes: just a sec [03:09] Rixius: its fine [03:09] dominictarr has joined the channel [03:09] lbayes: yeah - same behavior even after requiring the lib. [03:12] konobi: lbayes: "lib/jasmine-1.0.1/lib", require("jasmine") [03:12] Vezquex has left the channel [03:12] lbayes: Here's a more legible example: http://paste.pocoo.org/show/334138/ [03:12] piscisaureus: ryah: More fallout from porting npm: https://github.com/piscisaureus/node/commit/38458335b2138a3b93e96ca5605d168434709912 [03:13] mkidder has joined the channel [03:13] piko has joined the channel [03:14] piko: [03:15] Yuffster_work has joined the channel [03:15] paulrobinson has joined the channel [03:16] perlmonkey2: Anyone have a link to the mongoose API for retrieving embedded data in the ObjectId? [03:16] piscisaureus: ryah: ... or, rebased, https://github.com/piscisaureus/node/commit/8f5e9f14064594e2746afa52282a5117c773733e [03:19] Blink7 has joined the channel [03:19] zemanel: lbayes: the way node works is var mod = require('mod').mod ; [03:20] zemanel: lbayes: i dont know jasmine so i supose its something like var jasmine = require('jasmine').something [03:20] zemanel: lbayes: read the docs bro http://nodejs.org/docs/v0.2.6/api.html [03:20] lbayes: yeah, that's what I'm afraid of... it seems like libraries that weren't designed for node aren't working within it.... [03:21] zemanel: they tell a true story [03:21] tlrobinson has joined the channel [03:21] zemanel: there's jasmine on npm registry so [03:22] ezmobius has joined the channel [03:24] benreesman has joined the channel [03:24] gf3 has joined the channel [03:26] lbayes: Does this look like how you would recommend running a collection of specs? [03:26] lbayes: https://github.com/zir/varmony/blob/d2604966996ae112485d02e8c05d6c74968faf4b/test/run_specs.js [03:27] jamesarosen has joined the channel [03:30] zemanel: lbayes: what about expresso that was refered? https://github.com/visionmedia/expresso [03:31] perlmonkey2: MongoDB's docs state the first 4 bytes of an ObjectID are an epoch. It doesn't appear Mongoose offers a way to extract this value. Anyone know if it does? [03:31] NuckingFuts: Is there any reason why Date().getHours() is returning UTC, and getTimezoneOffset is returning 0? [03:32] NuckingFuts: Is this a known issue on NodeJS, and if so, what, if any, workarounds are there? [03:32] chapel: v8: Date().getHours() [03:32] v8bot: chapel: TypeError: Object Mon Feb 07 2011 22:32:47 GMT-0500 (EST) has no method 'getHours' [03:32] chapel: v8: new Date().getHours() [03:32] v8bot: chapel: 22 [03:33] chapel: v8: new Date().getTimezoneOffset() [03:33] v8bot: chapel: 300 [03:33] jamescarr has joined the channel [03:33] Aria: Is your TZ set right, NuckingFuts? [03:33] astropirate: Should I think of and treat Modules in node as Classes? or just a loose collection of functions? [03:33] Aria: astropirate: As a loose collection of values, including functions! [03:33] NuckingFuts: Aria: Yeah [03:34] tmpvar has joined the channel [03:34] astropirate: Aria, so more like a namespace? [03:34] NuckingFuts: Or do I hafta set it in V8 or something? [03:34] Aria: Yeah. It's very much a namespace. [03:34] tmpvar: hai [03:34] edw has joined the channel [03:35] konobi: NuckingFuts: it will be a server locale setting [03:36] sprout1 has joined the channel [03:38] lbayes: zemanel: It doesn't look like expresso actually has any tests... just foo, bar, etc. I see that it's a testing framework, but I'm hesitant to trust one I've never heard of that has a single, huge source file (in bin/), and no substantive tests of itself.... [03:38] konobi: NuckingFuts: http://paste.scsys.co.uk/87082 [03:38] zemanel: lbayes: it has tests on /test ? [03:40] lbayes: I got distracted by the junk files in test/ (foo.test.js, bar.test.js, and async.test.js) [03:41] heavysixer has joined the channel [03:41] kawaz_air has joined the channel [03:43] lbayes: thanks for the pointers zemanel, I'll hack around some more and see what I find.... [03:43] zemanel: lbayes: what junk? [03:44] Astro has joined the channel [03:44] zemanel: everyone says foo == bar but expresso is the only one who has tests for it [03:45] lbayes: nice [03:45] zemanel: it was a joke :) [03:45] bradleymeck has joined the channel [03:46] jchris1 has joined the channel [03:47] caike has joined the channel [03:47] sprout has joined the channel [03:47] lbayes: :-) [03:48] kawaz_air has joined the channel [03:48] mkidder has joined the channel [03:49] tilgovi has joined the channel [03:50] Marnixvdb has joined the channel [03:51] noahcampbell has joined the channel [03:51] mattly has joined the channel [03:52] bradleymeck has joined the channel [03:52] davidascher has joined the channel [03:53] muk_mb has joined the channel [03:54] iszak: So was the idea of a glue framework for node.js accepted? [03:54] cjm has joined the channel [03:57] davidascher has joined the channel [03:59] jxh has joined the channel [04:00] luke` has joined the channel [04:02] hobodave has joined the channel [04:02] langworthy has joined the channel [04:06] Jamool has joined the channel [04:08] brapse has joined the channel [04:12] Mike_Rice: any node experts want to make some cash tonight? [04:13] mikeal has joined the channel [04:13] Mike_Rice: mikeal: would you have some time for a quick consulting gig tonight? [04:14] mikeal: definitely not [04:14] mikeal: i'm exhausted [04:14] mikeal: first day at Yammer today [04:14] Mike_Rice: erg [04:14] Mike_Rice: k [04:14] mikeal: then got home and cleaned the entire kitchen [04:14] mikeal: now i've gotta make dinner soon :) [04:14] zzak: mikeal grats ^^ [04:14] piscisaureus has joined the channel [04:14] Aria: What's the gig, Mike_Rice? [04:14] Mike_Rice: well, congrats on starting at yammer [04:14] zzak: mikeal++ [04:14] v8bot: zzak has given a beer to mikeal. mikeal now has 9 beers. [04:14] Mike_Rice: Aria: looking over some code, figuring out what I've done wrong/stupid [04:15] ryan[WIN] has joined the channel [04:15] Aria: Aw. Fun! [04:15] mikeal: is it in request? [04:15] zzak: dont drink all those beers in one night then miss your second day of work! [04:15] Mike_Rice: mikeal: request, jsdom, node-mysql [04:15] mikeal: hrm… indexzero or tmpvar could handle that [04:16] Mike_Rice: tmpvar is out tonight apparently [04:16] tmpvar: what did i miss? [04:16] Mike_Rice: I've IMed him [04:16] Lorentz has joined the channel [04:16] Mike_Rice: hasn't responded yet [04:16] tmpvar: really? [04:16] tmpvar: im right here! [04:16] Mike_Rice: tmpvar: did you get my GTalk? [04:16] warz has joined the channel [04:17] mikeal: i'm totally going to add oauth support to request eventually [04:18] misterm has joined the channel [04:18] amerine has joined the channel [04:19] jxh has joined the channel [04:21] dguttman_ has joined the channel [04:25] JimBastard has joined the channel [04:26] tg has joined the channel [04:28] Vertice has joined the channel [04:31] mikeal: ryah: you around? [04:33] blaines has joined the channel [04:33] saschagehlich_ has joined the channel [04:34] andrewfff has joined the channel [04:35] micheil has joined the channel [04:35] micheil: ryah: hmm, with process.on('exit'), it is possible to do fs.*Sync methods, right? [04:36] micheil: (ie, fs.unlinkSync(pidfile) ) [04:39] softdrink has joined the channel [04:40] bartt has joined the channel [04:40] liar has joined the channel [04:41] gstrock_ has joined the channel [04:41] springmeyer has joined the channel [04:43] mkidder: quit [04:44] davidascher has joined the channel [04:47] saikat has joined the channel [04:50] arrty has joined the channel [04:53] JimBastard: whats a good node.js application [04:56] thrumins: your mom [04:56] JimBastard: its a good thing i dont have a @ [04:56] thrumins: hahaha, just kidding. [04:56] JimBastard: ACTION isn't. [04:56] thrumins: JimBastard: it's safe, this is pkrumins [04:56] mikeal has joined the channel [04:56] JimBastard: lol [04:57] JimBastard: you have any suggestions? im compiling a list of node.js apps that should exist [04:57] JimBastard: ive got a few already [04:57] thrumins: should or do? [04:57] JimBastard: both [04:57] JimBastard: do, but need to be better is a good one [04:58] thrumins: do you have browserling on your list? :) [04:58] iszak: JimBastard, full stack glue framework [04:58] iszak: that should keep you busy for some time [04:58] thrumins: you mean like real applications [04:58] thrumins: or frameworks [04:58] thrumins: too [04:58] iszak: DO IT [04:58] JimBastard: iszak: i think im going to abstain from frameworks in this [04:58] JimBastard: mostly apps, which could be worth actual value [04:58] iszak: JimBastard, no but that's the thing. [04:59] iszak: JimBastard, create decoupled components [04:59] iszak: components => modules [04:59] JimBastard: im not disputing that [04:59] iszak: Something like Zend Framework in Node.js [04:59] saikat has joined the channel [04:59] Ond has joined the channel [04:59] JimBastard: this is geared towards actual applications, not tools [05:00] JimBastard: they could be built however [05:00] JimBastard: i.e: - An instant message application that can be include on site with one line of javascript [05:00] JimBastard: or [05:00] JimBastard: - A real-time multiuser sketchpad [05:01] JimBastard: ill add proper blog / cms, thats a good one [05:03] zzak: define value [05:03] JimBastard: zzak: an application that people could take, customize, and sell to a client [05:03] zzak: just because a tool doesnt fit your needs doesnt strip it of value [05:03] JimBastard: or just use it out of the box [05:04] zzak: what kind of applications do you sell? [05:04] JimBastard: huh? [05:05] Aria: A simple ticket tracker. [05:05] JimBastard: Aria: ive got a PM tool with vows and cuke integration [05:05] JimBastard: you think maybe just a really generic one? [05:06] Aria: Yeah. I still want to nuke RT, and don't mind building pieces to do the integration. [05:06] JimBastard: sorry, RT? [05:06] Aria: RequestTracker. [05:06] JimBastard: no clue, sorry [05:06] zzak: acronyms always lose me [05:06] Aria: Written in perl, this huge behemoth that does everything I need, but weighs like 900 lbs. [05:07] JimBastard: http://bestpractical.com/rt/screenshots.html ? [05:07] Aria: That's the one. [05:07] Aria: I can at once heartily endorse it and say I hate it. [05:07] JimBastard: Aria: does it integrate with VCS at all? [05:07] Aria: No. [05:08] zzak: redmine / chilliproject is pretty good [05:08] Aria: (It pretty much occupies the "ticket" space outside of software management.) [05:08] Aria: (It's much more aimed at being a /business/ tool than a /software/ tool.) [05:08] Aria: (I'm happy with a dozen things from Bugzilla to trac to redmine for software stuff -- there's a bazillion of those tools.) [05:08] hij1nx has joined the channel [05:09] Aria: (But we use RT for customer interaction both at the ISP I run, and at the one in New York that I consult for.) [05:09] zzak: (you dont need to parenthesize all of your statements ;)) [05:09] Aria: (Habit. I'm used to highly tangential discussion.) [05:10] zzak: (good times) [05:11] edw has joined the channel [05:12] chapel: JimBastard: is nodejitsu updated yet? [05:12] chapel: oh and do you support websockets on nodejitsu? [05:12] JimBastard: chapel: yeah, websockets and real sockets [05:12] chapel: well socket.io basically [05:12] CIA-99: node: Ryan Dahl master * r448e0f4 / (lib/https.js lib/tls.js src/node_crypto.cc): tls fixes - http://bit.ly/ehLnNj [05:12] aro has joined the channel [05:12] Tim_Smart_ has joined the channel [05:12] chapel: since its not just port 80, but there are flash ports [05:13] briznad has joined the channel [05:14] iszak: My favourite commands git pull && ./configure && make && make install && make test && make doc [05:14] NuckingFuts: Why doesn't Node get the time zone from the OS? [05:14] jdub: Aria: ha ha [05:14] jdub: Aria: heartily endorse and hate. yup, RT in a nutshell. [05:15] tilgovi_ has joined the channel [05:15] jdub: NuckingFuts: would have to include different ways of doing it for different platforms... can easily be done by an app or framework instead [05:15] willwhite has joined the channel [05:15] jchris1 has joined the channel [05:15] jdub: NuckingFuts: (not official answer, but an educated guess) [05:16] MikhX has joined the channel [05:16] CIA-99: node: Ryan Dahl master * r6b50a9f / test/simple/test-next-tick-ordering.js : (won't) fix test-next-tick-ordering - http://bit.ly/gCEQQB [05:16] NuckingFuts: jdub: I'm pretty sure getting the system time zone is a common task tho :slow: [05:16] NuckingFuts: oh wait, you aren't deviantART chat derp [05:17] NuckingFuts: No :slow: emote [05:17] NuckingFuts: ACTION has been spoiled XD [05:17] mde has joined the channel [05:17] iszak: I need to write a bot to configure, make, make install, make test, make doc on CIA-99 announcement. [05:18] iszak: and git pull ofc. [05:18] softdrink1 has joined the channel [05:18] NuckingFuts: iszak: So a buildbot? [05:18] iszak: yes, precisely. [05:18] NuckingFuts: Seems simple enough [05:18] iszak: sure enough, it is. [05:19] jdub: NuckingFuts: common among platforms or commonly used? there are lots of commonly used things not included in nodejs core :-) [05:19] NuckingFuts: If you could set up a bot on IRC, it's as easy as executing a series of commands [05:19] iszak: yep, I know, might do it WHEN I GET TIME [05:19] NuckingFuts: jdub: common among platforms. [05:19] jdub: NuckingFuts: linux, solaris, windows? not on your life :-) [05:20] NuckingFuts: jdub: I mean common in implementations XD [05:20] NuckingFuts: There's hundreds of them [05:20] jdub: NuckingFuts: do you mean abundant rather than common? [05:20] NuckingFuts: PHP does it, and I'd have thought that V8 did it already too. [05:20] jdub: php only fairly recently gained support for platform timezonedb [05:20] jdub: previously it provided its own [05:20] losing has joined the channel [05:21] jdub: i don't think java supports platform timezonedb either [05:21] NuckingFuts: jdub: Either way, JS has had it for years lol [05:21] jdub: NuckingFuts: JS hasn't, but browsers may have... but i don't think that's the case anyway [05:21] NuckingFuts: jdub: Yeah, it has. [05:21] NuckingFuts: It's called getTimezoneOffset [05:22] NuckingFuts: It's been there for almost a decade lol [05:22] Jaye: isnt that a browser method, just common [05:22] jdub: you can get the timezone offset, but that's not entirely useful [05:22] NuckingFuts: Jaye: Pretty sure it's real. [05:22] NuckingFuts: jdub: I know system time, and I know time zone. That's enough. [05:22] jdub: not really [05:22] NuckingFuts: All I want is local time [05:23] Misao-chan has joined the channel [05:23] jdub: time/date handling is extraordinarily complicated [05:23] chapel: NuckingFuts: new Date() gives you a date object that you can use anywhere and translate into any time zone accurately [05:23] Jaye: w3c/mozilla agrees, Date.getTimezoneOffset() [05:23] NuckingFuts: chapel: Yeah, but I'd like to avoid configuration on that lol [05:23] chapel: v8: var tiem = new Date(); time.getTimezoneOffset() [05:23] v8bot: chapel: ReferenceError: time is not defined [05:23] chapel: haha [05:23] chapel: v8: var tiem = new Date(); tiem.getTimezoneOffset() [05:23] v8bot: chapel: 300 [05:24] chapel: v8: var tiem = new Date(); tiem [05:24] v8bot: chapel: "Tue Feb 08 2011 00:24:04 GMT-0500 (EST)" [05:24] shiawuen has joined the channel [05:24] NuckingFuts: chapel HAs to be set with an environment variable [05:24] jamescarr has joined the channel [05:24] kiddphunk has joined the channel [05:24] NuckingFuts: Namely "process.env['TZ'] = 'America/Vancouver';" [05:24] beawesomeinstead has joined the channel [05:24] beawesomeinstead has joined the channel [05:26] chapel: NuckingFuts: I dont see the issue, getTimezoneOffset works for me [05:27] jdub: Yes, node/v8 provides the right offset without TZ being set (before or within). [05:27] NuckingFuts: orly? [05:27] jdub: > process.env['TZ'] [05:27] jdub: > t.getTimezoneOffset() / 60 [05:27] jdub: -11 [05:27] jdub: [05:28] NuckingFuts: jdub: Then why's it fail for me and the other 3 people testing with me? :/ [05:28] jdub: NuckingFuts: node version? os platform? [05:28] tedsuo has joined the channel [05:28] jdub: ah, you're probably on osx which i forgot to include above [05:28] NuckingFuts: jdub: I think mostly 0.3.1 [05:29] NuckingFuts: With both Linux and Windows users [05:29] NuckingFuts: I haven't upgraded my code to 0.3.8 yet [05:29] NuckingFuts: I'll prolly upgrade to 0.4.0 when it comes out tho :P [05:29] jdub: could be a v8 problem [05:29] chapel: jdub: I use osx [05:29] jdub: you should be using 0.2.x or the very latest of 0.3.x [05:29] chapel: and it works [05:30] superjudge has joined the channel [05:30] chapel: works on centos (my shared hosting) [05:30] Aria: And on my OSX and PLD-linux. [05:30] chapel: 0.3.1 on there [05:31] Aria: (0.3.8 for me) [05:31] chapel: so NuckingFuts, its something on your end [05:31] jdub: works on trunk too [05:31] superjudge has joined the channel [05:32] nolan_d has left the channel [05:32] admc has joined the channel [05:32] Jaye: fails on my dev server/arch linux, the catch - i know for a fact the system TZ isn't set right [05:33] jdub: Jaye: how does it fail? [05:33] nolan_d has joined the channel [05:33] Utkarsh_ has joined the channel [05:33] strmpnk has joined the channel [05:33] themiddleman has joined the channel [05:33] NuckingFuts: Hmmmm.... [05:34] jacobolus has joined the channel [05:34] Viriix has joined the channel [05:35] NuckingFuts: I'm on the Cygwin build of 0.3.1 lol [05:35] NuckingFuts: Could that be it? [05:35] jimt has joined the channel [05:35] NuckingFuts: What is that, triple-abstraction? [05:35] jdub: NuckingFuts: surprise, you might have a platform problem! [05:35] Jaye: i mean its probably a config somewhere causing it, works fine on my (correctly configured) workstation, but not my incorrectly configured dev server [05:35] NuckingFuts: jdub: But it is also on Ubuntu lol [05:36] chapel: its not set on my centos node install [05:36] chapel: tz that is [05:36] jdub: Jaye: yes, but in what way does it fail? returns bad data, traceback, segfault, etc.? [05:36] NuckingFuts: In fact, it was my 2 Ubuntu users who first brought it to my attention :P [05:36] Ratty_: Oh shit, I'm actually using DOS EDIT to create a .bat file. [05:36] Jaye: just returns the wrong offset, as you would expect it to [05:37] jdub: NuckingFuts: in what way does yours fail? [05:37] davidascher has joined the channel [05:37] shiawuen has joined the channel [05:38] NuckingFuts: NuckingFuts: Defaults to UTC [05:38] NuckingFuts: jdub: ^ [05:38] NuckingFuts: Must be getting tired, tabbing myself derp [05:39] jdub: NuckingFuts: on the ubuntu machines, what's in /etc/timezone? [05:42] NuckingFuts: Lemme ask :V [05:42] NuckingFuts: LMAO [05:42] NuckingFuts: "Etc/UTC " [05:42] NuckingFuts: I rofled [05:43] jdub: sudo dpkg-reconfigure tzdata [05:43] jdub: :-) [05:43] Jaye: lol [05:44] NuckingFuts: I can't imagine why Ubuntu wouldn't autoconfigure that... [05:44] jdub: much like you couldn't imagine why node/v8 wouldn't give you the offset, i suspect it might not be ubuntu's fault :-) [05:45] NuckingFuts: lol very true [05:45] willwhite has joined the channel [05:45] NuckingFuts: I can't imagine my peeps being tards tho [05:45] NuckingFuts: I mean, they're both developers, and they both run linux. One of them installed gentoo or whatever that one PITA distro is [05:45] jdub: ah [05:45] jdub: well [05:45] NuckingFuts: Just for lulz, mind you [05:46] jdub: you just said one of them used gentoo [05:46] jdub: there's your answer to the tard question :-) [05:47] peol has joined the channel [05:47] peol has joined the channel [05:48] andrewfff has joined the channel [05:48] Jaye: remember when gentoo still offered stage 1 install? "expect install to take up to 2 days" [05:49] mikeal has joined the channel [05:49] Marnixvdb has joined the channel [05:49] JohnnyL: I wonder what will come after Node.js/JavaScript. [05:50] zzak: COBOLSCRIPT [05:50] pauls has joined the channel [05:50] slickplaid: asmscript [05:50] Solsys has joined the channel [05:51] chapel: applescript baby [05:54] NuckingFuts: lololololololol it borked logging [05:54] andrewfff has joined the channel [05:54] robotarmy has joined the channel [05:55] Lorentz: C++script [05:55] Viriix: you guys see that lunascript lulz? [05:55] Viriix: http://asana.com/luna/ [05:55] Viriix: failed though, they abondoned it for JS [05:55] Viriix: cool concept though [05:56] zzak: coffee-script [06:00] Jaye: <3 coffee-script [06:00] Jaye: its just JS though, dont think it counts [06:00] chapel: heh [06:00] chapel: its nice [06:01] chapel: though I think you could match what they were doing with luna using cs + some node magic :P [06:01] void_ has joined the channel [06:03] aguynamedben has joined the channel [06:03] losing has joined the channel [06:03] Lorentz has joined the channel [06:03] Jaye: the problem i have with stuff like that, lunascript, stratified-js etc is they are a PITA to debug properly [06:03] astoon has joined the channel [06:03] chapel: no doubt [06:03] chapel: its one thing to go from cs to js [06:04] chapel: but its another to have this abstract language that goes into something else entirely [06:04] tim_smar1 has joined the channel [06:04] Jaye: yeah, you always end up using 'alert debugging', sometimes its easier just to refactor than find the problem... might be better as they improve their toolchains though [06:06] dominictarr has joined the channel [06:07] mikedeboer has joined the channel [06:07] blaines has joined the channel [06:08] Coal has joined the channel [06:10] andrewfff has joined the channel [06:13] dabailey has joined the channel [06:14] johnnywengluu: its possible to throw in a Mixing in a SC.Record? [06:15] johnnywengluu: like this: MyApp.User = SC.Record.extend(MyApp.Seller, MyApp.Buyer, {...}) ? [06:16] andrewfff has joined the channel [06:16] johnnywengluu: to have it DRY [06:16] johnnywengluu: MyApp.Individual = SC.Record.extend(MyApp.Seller, MyApp.Buyer, {...}) [06:16] johnnywengluu: MyApp.Corporate = SC.Record.extend(MyApp.Seller, MyApp.Buyer, {...}) [06:17] trentm has joined the channel [06:20] dominic_ has joined the channel [06:21] mikekelly has joined the channel [06:22] amerine has joined the channel [06:23] andrewfff has joined the channel [06:27] JohnnyL: the dude abides. [06:32] borgenk has joined the channel [06:35] dominic_ has joined the channel [06:36] andrewfff has joined the channel [06:36] tlrobinson has joined the channel [06:36] shiawuen has joined the channel [06:36] isaacs has joined the channel [06:36] Marnixvdb has joined the channel [06:38] Tim_Smart has joined the channel [06:39] herbySk has joined the channel [06:40] dguttman has joined the channel [06:40] jimt_ has joined the channel [06:44] edw has joined the channel [06:44] dominic_ has joined the channel [06:45] razvandimescu has joined the channel [06:45] andrewfff has joined the channel [06:47] mikeal has joined the channel [06:51] wao has joined the channel [06:51] andrewfff has joined the channel [06:51] konobi: ryah: ping [06:53] dnyy has joined the channel [06:54] konobi: isaacs: also ping [06:56] iszak: konobi, ping. [06:58] Viriix has left the channel [06:58] Martin_ has joined the channel [06:59] creationix has joined the channel [06:59] konobi: iszak: eh? [06:59] Martin_: Hey all! [06:59] Martin_: Can someone help me real quick? I installed cygwin and node and now i'm trying to install npm [06:59] iszak: just felt like it. [07:00] andrewfff has joined the channel [07:00] Martin_: but the install stalls .. no error [07:00] mjr_ has joined the channel [07:00] konobi: just give up and use a real operating system [07:00] konobi: =0) [07:00] Martin_: i won't just yet :D [07:01] davidascher has joined the channel [07:01] konobi: davidascher: hey david, how's things? [07:01] Martin_: it just prints npm info shasum and then it halts [07:01] Martin_: even ctrl+c doesn't work [07:01] Vertice_ has joined the channel [07:01] Vertice_ has joined the channel [07:02] mape: Martin_: I think npm is a no go on windows from what I've heard [07:02] davidascher: konobi: uh, fine. [07:02] Martin_: and installing with curl .. the same thing .. install just halts [07:02] yozgrahame has joined the channel [07:03] konobi: davidascher: mozilla messaging treating you well? [07:03] davidascher: konobi: indeed. do I know you? =) [07:03] dominic_ has joined the channel [07:03] konobi: davidascher: yup, ex-sophos-ite and current joyeur [07:03] davidascher: oh, i see =) [07:04] Vertice_ has joined the channel [07:04] Vertice_ has joined the channel [07:04] davidascher: ah, finally mapped nick to name to face [07:04] konobi: davidascher: =0) [07:06] Martin_: so no help? [07:06] Jaye: node git HEAD is 0.4.0-pre, no 0.3.9? [07:06] riven has joined the channel [07:06] riven has joined the channel [07:08] vineyard has joined the channel [07:08] andrewfff has joined the channel [07:08] JohnnyL: konobi: It would be rather amusing if IT MANAGERS just told their programmer's 'JUST GIVE UP AND USE A REAL OPERATING SYSTEM'. [07:08] mscdex: node.js rules! [07:09] chapel: <3 mscdex [07:09] chapel: always reaffirming the truth [07:09] mscdex: heck yeah, no harm in continuing to boost morale [07:09] JohnnyL: mscdex: ODoyle rules too... Until some programmer says 'JUST GIVE UP AND USE A REAL FRAMEWORK'. [07:09] chapel: JohnnyL: it would be nice if it managers were told to use a real operating system [07:09] Martin_: well i have ubuntu as well, node up and running there .. but i'd like to get it running on windows as well [07:10] mscdex: Martin_: i think most of the effort is being done with the mingw port nowadays as far as windows goes [07:10] mscdex: Martin_: but ryah said he'd get cygwin working for 0.4.0 [07:10] mscdex: last i heard anyway [07:12] Martin_: okay .. i've got an error now .."failed unpacking the tarball" [07:12] Martin_: i'm starting to suspect my cygwin install might be faulty [07:12] JohnnyL: Martin_: There are many managers who think running Windows is fine. [07:13] evanrmurphy has joined the channel [07:13] andrewff1 has joined the channel [07:13] evanrmurphy: hi all [07:13] Jaye: it is, if you are running .net stuff [07:14] JohnnyL: Jaye: What about Excel? [07:14] JohnnyL: Jaye: What about Word? [07:14] Utkarsh__ has joined the channel [07:14] JohnnyL: Jaye: What about any known browser? [07:14] JohnnyL: Jaye: What about any known emulator? [07:14] JohnnyL: Jaye: What about VB? [07:14] Jaye: umm i think we are talking past eachother, i was agreeing [07:15] JohnnyL: Jaye: What about consitency in interface? [07:15] JohnnyL: a shame node.js isn't supported under windows. [07:15] chapel: lol [07:15] chapel: consistency in interface? [07:15] chapel: is that a joke? [07:15] JohnnyL: yes, under Linux it is, i know. [07:15] chapel: anyways [07:16] mraleph has joined the channel [07:16] chapel: windows isn't terrible, but it isn't the desired platform for node [07:16] JohnnyL: chapel: what if I denied you and forked it? [07:16] chapel: I think it is good that people are trying to get it working properly [07:16] mape: JohnnyL: If you got it working I'm sure everyone would be real happy [07:16] chapel: denied me? [07:16] JohnnyL: mape: yay! [07:17] mape: chapel: Battle you to the end of time etc etc [07:17] mscdex: there can be only one! [07:17] chapel: haha [07:17] mscdex: cue some epic Queen music [07:17] JohnnyL: mape: like that old Star Trek episode where that time traveller fights his anti self. [07:17] chapel: or jet li in that terrible movie, but I still like it [07:18] muhqu has joined the channel [07:19] JohnnyL: JOHNNYL: MOV AX,1 IN AX,BX OUT BX,AX [07:19] chapel: madness [07:20] mscdex: this is #node.js! [07:20] SamuraiJack has joined the channel [07:21] JohnnyL: mscdex: your code, calls *my* code. [07:21] chapel: haha [07:21] chapel: I was waiting for it [07:21] chapel: while I went to the bathroom [07:21] mscdex: you threaten my people with synchronous operations and windows! [07:22] dominic_ has joined the channel [07:22] JohnnyL: mscdex: where in node.js is multithreaded, multicore or concurrent anything?. (which windows has) [07:22] jesusabdullah: haha [07:23] jesusabdullah: Ah, but multithreaded stuff is usually written as synchronous things (threads) that communicate with each other [07:24] mscdex: neato, another interactive google homepage! [07:24] chapel: heh [07:24] JohnnyL: Look at my finger, it points to the moon! [07:24] mape: they should just have a simple.google.com [07:25] Jaye: asynchronous eventloop whats that, there is only threading [07:25] mape: stop with the dumb autosearch things that searches slower then I type [07:26] chapel: mape: I use chrome with instant search or whatever on it [07:26] mape: chapel: same, it still doesn't bring anything to the table [07:27] chapel: eh, instant gratification :) [07:27] mape: I know what I want to search for, I've never stopped in the middle thinking "oh, that is what I really wanted" [07:27] mike5w3c has joined the channel [07:27] Utkarsh has joined the channel [07:29] jameshome has joined the channel [07:30] andrewfff has joined the channel [07:34] ph^ has joined the channel [07:35] wadey has joined the channel [07:36] Lorentz has joined the channel [07:39] mikedeboer has joined the channel [07:39] tc77 has joined the channel [07:40] andrewff1 has joined the channel [07:44] janm has joined the channel [07:46] ivanfi has joined the channel [07:47] sveisvei has joined the channel [07:49] mikedeboer has joined the channel [07:50] andrewfff has joined the channel [07:51] hobodave has joined the channel [07:51] gggg has joined the channel [07:52] JohnnyL has left the channel [07:56] Utkarsh_ has joined the channel [07:57] blaines has joined the channel [07:58] andrewfff has joined the channel [08:02] mscdex: mjr_: ping [08:02] mjr_: hey [08:04] hwinkel has joined the channel [08:07] mscdex: mjr_: do you know if node-pcap works under cygwin? [08:07] mjr_: Someone told me that they got it working [08:07] mscdex: ok cool [08:07] mjr_: But then never sent me a patch [08:07] mjr_: It doesn't work out of the box [08:07] mscdex: d'oh [08:07] mscdex: :( [08:07] mjr_: For reasons that elude me, because I don't use cygwin [08:07] mjr_: May YOU can shine a light on that darkness [08:07] mscdex: i don't either, but i'm just trying something out [08:08] maritz has joined the channel [08:12] kal-EL_ has joined the channel [08:13] derferman has joined the channel [08:13] saikat has joined the channel [08:13] rchavik has joined the channel [08:13] rchavik has joined the channel [08:14] aabt has joined the channel [08:15] Blink7_ has joined the channel [08:16] wilmoore has joined the channel [08:16] mscdex: i sent him a message, hopefully he's still got the patch around somewhere :-D [08:18] Pingwincheg has joined the channel [08:18] andrewfff has joined the channel [08:23] edw has joined the channel [08:26] josh2 has left the channel [08:27] void_ has joined the channel [08:30] Jonasbn_ has joined the channel [08:34] agnat has joined the channel [08:35] Utkarsh__ has joined the channel [08:43] tedsuo has joined the channel [08:43] svenlito has joined the channel [08:43] adambeynon has joined the channel [08:46] tfe_ has joined the channel [08:49] syntheze has joined the channel [08:50] mhausenblas has joined the channel [08:50] saikat has joined the channel [08:50] mhausenblas_ has joined the channel [08:51] Druid_ has joined the channel [08:53] q_no has joined the channel [08:56] xla has joined the channel [08:57] aklt has joined the channel [08:57] janm has joined the channel [09:00] ROBOd has joined the channel [09:01] creationix has left the channel [09:02] aklt has joined the channel [09:04] superjudge_ has joined the channel [09:06] devkorcvince has joined the channel [09:07] hobodave has joined the channel [09:10] zomgbie has joined the channel [09:10] nook has joined the channel [09:10] hwinkel1 has joined the channel [09:12] kristsk has joined the channel [09:16] jbpros has joined the channel [09:21] fly-away has joined the channel [09:23] tedsuo has joined the channel [09:26] mraleph has joined the channel [09:29] andrewfff has joined the channel [09:34] dipser has joined the channel [09:34] jetienne has joined the channel [09:39] mpoz2 has joined the channel [09:39] hwinkel has joined the channel [09:42] sriley has joined the channel [09:42] brian has joined the channel [09:42] jarlssen has joined the channel [09:43] herbySk has joined the channel [09:43] Guest91781 has left the channel [09:47] prettyrobots has joined the channel [09:48] adambeynon has joined the channel [09:48] jarlssen has joined the channel [09:48] kjeldahl_ has joined the channel [09:52] [AD]Turbo has joined the channel [09:52] xla has joined the channel [09:53] jarlssen: hi @all [09:54] mikedeboer has joined the channel [09:56] mscdex: yo [09:57] jarlssen: i'm experiencing a "max call stack size exceeded error" with node.js from v3.1 to 3.7, always at a particular line of my code - i don't think that the call stack is actually that high there. has anybody experienced similar issues? [09:58] TomY_ has joined the channel [10:00] bzinger has joined the channel [10:01] mscdex: jarlssen: have you tried outputting the current call stack right before that line of code? [10:01] jarlssen: i tried by console.trace [10:01] jarlssen: it's about 10 calls [10:02] mscdex: maybe see what (new Error()).stack shows [10:02] mlouro has joined the channel [10:02] mscdex: there might be more in the call stack than just what is in your script [10:02] mscdex: that's my guess [10:03] sveimac has joined the channel [10:04] jarlssen: i suppose this is true because there are a lot of async callbacks going on - I'll try that error trace and see what it shows - thank you! [10:04] jacobolus has joined the channel [10:05] ilpoldo has joined the channel [10:05] bradleymeck has joined the channel [10:08] Utkarsh has joined the channel [10:09] SamHasler has joined the channel [10:09] ROBOd has joined the channel [10:10] SamHasler has left the channel [10:10] wao has joined the channel [10:13] edw has joined the channel [10:17] kjeldahl has joined the channel [10:19] mysterion` has joined the channel [10:25] vineyard has joined the channel [10:25] muk_mb has joined the channel [10:28] caolanm has joined the channel [10:28] micxer has joined the channel [10:30] temp01 has joined the channel [10:32] mraleph: jarlssen: any chance that you are doing something like f.apply(obj, huge_array) on that particular line? [10:33] kjeldahl_ has joined the channel [10:33] jarlssen: no, i do not currently have huge data sets, but thanx [10:35] adambeynon has joined the channel [10:35] torvalamo has joined the channel [10:35] pietern has joined the channel [10:46] matt_c has joined the channel [10:46] benburkert has joined the channel [10:47] yozgrahame has left the channel [10:48] webben has joined the channel [10:49] agnat has joined the channel [10:50] webben has joined the channel [10:50] prettyrobots has joined the channel [10:51] andrewfff has joined the channel [10:53] webben has joined the channel [10:55] webben has joined the channel [10:56] floby has joined the channel [10:56] kristsk has joined the channel [10:57] webben has joined the channel [10:59] kristsk` has joined the channel [10:59] fly-away has joined the channel [11:00] webben has joined the channel [11:01] shinmei has joined the channel [11:02] webben has joined the channel [11:05] webben has joined the channel [11:06] shiawuen has joined the channel [11:06] guid has joined the channel [11:07] webben has joined the channel [11:07] rjrodger has joined the channel [11:08] Coal has joined the channel [11:09] Jaye: jarlssen: if you are still here, try wrapping any loops in process.nextTick to see if you can avoid filling the stack before the next tick in the event loop [11:09] FireFly has joined the channel [11:09] ROBOd has joined the channel [11:09] webben has joined the channel [11:10] jarlssen: could you give an example? [11:12] webben has joined the channel [11:13] Jaye: s [11:13] jarlssen: <- afk 1h (lunch break) [11:14] Jaye: for (i = 0, len = array.length; i < len; i++) {item = array[i]; [11:14] Jaye: process.nextTick(function() { [11:14] Jaye: <> [11:14] webben has joined the channel [11:16] mscdex: woot! got node_pcap working under cygwin! [11:16] mscdex: :-D [11:17] webben has joined the channel [11:18] razvandimescu has joined the channel [11:19] anupbishnoi has joined the channel [11:20] anupbishnoi has left the channel [11:21] matt_c has joined the channel [11:22] hij1nx has joined the channel [11:22] webben has joined the channel [11:24] tokumine has joined the channel [11:24] webben has joined the channel [11:26] d0k has joined the channel [11:26] webben has joined the channel [11:29] webben has joined the channel [11:30] prettyrobots has joined the channel [11:31] webben has joined the channel [11:32] rwhitby has joined the channel [11:34] webben has joined the channel [11:36] webben has joined the channel [11:37] fermion has joined the channel [11:38] webben has joined the channel [11:39] jpstrikesback has joined the channel [11:40] dominic_ has joined the channel [11:40] xandrews has joined the channel [11:41] webben has joined the channel [11:43] altamic has joined the channel [11:43] cjm has joined the channel [11:43] felixge has joined the channel [11:43] webben has joined the channel [11:43] felixge has joined the channel [11:46] relix has joined the channel [11:46] relix: hello, I'm trying to "require" a module I downloaded from github but node says it cannot find the module [11:47] dominic_ has joined the channel [11:47] relix: the weird thing is it works with one of them, formidable [11:47] relix: but with IRC-js (or even Jerk) it says "Cannot find module" [11:49] relix: http://pastebin.com/9L9qvTPH [11:49] relix: I downloaded the three modules in the same way using git clone [11:50] matt_c has joined the channel [11:50] prettyrobots has joined the channel [11:50] mscdex: relix: require('./formidable') [11:50] relix: mscdex: check line 16 [11:50] mscdex: that's assuming formidable has an index.js in the formidable directory though [11:50] relix: formidable works in this way [11:50] chapel: relix: well there has to be a file for require to read, not just a directory [11:50] relix: ah ok I'll check it [11:51] relix: yes there's none [11:51] mscdex: yeah i guess the other two modules don't provide an index.js in the root [11:51] mscdex: so you'll have to specify the file [11:52] relix: I'll just add the index.js in a similar way as formidable's [11:52] relix: thanks for the help! [11:53] superjudge has joined the channel [11:54] edw has joined the channel [11:57] zorzar_ has joined the channel [12:06] shaunau has joined the channel [12:12] prettyrobots has joined the channel [12:16] floby has joined the channel [12:17] skm has joined the channel [12:20] Wizek has joined the channel [12:20] xandrews has joined the channel [12:22] TobiasFar has joined the channel [12:25] skohorn has joined the channel [12:25] astoon has joined the channel [12:25] aro has joined the channel [12:25] floby has left the channel [12:25] okuryu has joined the channel [12:26] ziro` has joined the channel [12:27] andrewfff has joined the channel [12:28] fairwinds has joined the channel [12:30] jpstrikesback has joined the channel [12:32] liar has joined the channel [12:32] dominic_ has joined the channel [12:36] fred_ has joined the channel [12:36] fred_: hi [12:37] AndroUser has joined the channel [12:37] jpstrikesback has joined the channel [12:37] fred_h: is there any way to get node 0.3.7 or above running on cygwin so far? [12:39] arrty has joined the channel [12:39] jpstrikesback has joined the channel [12:40] jonaslund: fred_h: If you port V8 to it [12:40] jonaslund: fred_h: 0.4 is planned to have a cygwin port again [12:40] fred_h: jonaslund: ah, ok ... wait a sec ;) [12:40] jonaslund: afaik, it's not an enormous job, atleast if you know a bit of the V8 internals [12:41] jessica-m has joined the channel [12:41] fred_h: jonaslund: thanks, so I'll have to wait for 0.4 or get this damn VM running ... [12:41] kris_ has joined the channel [12:42] hwinkel has joined the channel [12:42] Rixius has joined the channel [12:42] Utkarsh_ has joined the channel [12:42] fred_h: jonaslund: btw, why takes extra afford for each v8 version to provide a cygwin build? or is this just on lower priority, because most node-devs work on *nix/mac? [12:44] mscdex: fred_h: newer versions of V8 (especially versions with crankshaft) incorporate stuff that's not trivial to implement in cygwin/windows afaik [12:45] mscdex: there's also a mingw port in the works [12:46] mscdex: piscisaureus is the one working on that port [12:46] fred_h: mscdex: do they change the engine that much that you can't "just" take the working version from node 0.3.1 and port it to 0.3.8 (with some adjustments)? [12:47] mscdex: no, afaik it's the same problem [12:47] jonaslund: mscdex: the mingw port is actually mostly a win32 port, so that we could compile it with mingw or MSVC [12:48] mscdex: well either way, it's better than using cygwin :) [12:48] fred_h: usually, I work on mac, but now I have some spare time at work and swear at my cygwin because I can't continue with the code I've started ;) [12:48] jonaslund: mscdex: cygwin does give us alot of unixism that makes it easier to "run" code [12:48] mscdex: fred_h: fwiw 0.2.6 compiles under cygwin [12:48] jonaslund: right now alot of code has unixisms [12:49] fred_h: mscdex: I need 0.3.7+ because of package dependencies. [12:49] mscdex: oh [12:49] mscdex: run a VM! :p [12:49] fred_h: thanks anyway. [12:49] jonaslund: yes, a VM might not be that bad [12:50] mscdex: or log into your mac remotely [12:50] mscdex: heh [12:50] fred_h: msdcex: I'll give it a try ... [12:50] fred_h: thanks guys, cu. [12:51] bradleymeck has joined the channel [12:52] AndroUser2 has joined the channel [12:56] pjackson has joined the channel [12:57] perlmonkey2 has joined the channel [13:00] unomi has joined the channel [13:00] tiemonster has joined the channel [13:03] benburkert has joined the channel [13:07] ZiXon: . [13:07] ZiXon: . [13:07] ZiXon has joined the channel [13:07] bzinger_ has joined the channel [13:08] mscdex: :S [13:09] dhofstet has joined the channel [13:09] michelb has joined the channel [13:09] michelb: hi ! I'm trying to build node.js under W7 64 bits [13:10] michelb: everything went ok until i tried "make", then : [13:10] tjholowaychuk has joined the channel [13:10] michelb: I've got erroirs in node/deps/v8/SConstruct [13:10] Jonasbn_ has joined the channel [13:11] jonaslund: michelb: what version ?' [13:11] michelb: line 1200 1156 897,, if env['os'] == 'win32'] etc... [13:11] michelb: last one, I just dlded it [13:11] jonaslund: cygwin after 3.1 uses a new V8 engine that hasn't been ported [13:11] michelb: apparently the makefile does not match my os [13:11] jonaslund: so that doesn't work [13:12] michelb: ah [13:12] jonaslund: latest might build with mingw with a bit of fiddling [13:12] michelb: so what would you recommend me to do ? [13:13] jonaslund: if you don't need to run something fresh then go with 2.6 or 3.1 [13:13] michelb: you are talking about cygwin version or node.js version ? [13:13] jonaslund: node.js [13:13] sonnym has joined the channel [13:13] michelb: I just need to run some html5 websocket clients [13:14] tiemonster: who do I have to know to get included in Joyent's no.de hosting BETA? [13:14] hellp has joined the channel [13:14] jonaslund: michelb: check out socket.io [13:15] Atmosphereum has joined the channel [13:15] jonaslund: a lot of people run 2.6 still (mainly because of windows) but there is a bunch of new modules written for 3.x [13:15] Bioxyde has joined the channel [13:15] michelb: its a npm, so I install it on node.js [13:15] jonaslund: oh and 2.x is "stable" aswell [13:15] michelb: ? [13:15] michelb: ok, I just try again with 2.6 [13:16] jonaslund: or download 3.1 [13:16] jonaslund: (2.x and 3.x has a slightly different api) [13:16] Atmosphereum has left the channel [13:16] jonaslund: although i'm not sure if 3.x versions has the same api [13:16] michelb: jonaslud : so I will get for 3.1 + socket.io ? [13:16] jonaslund: anyhow i gotta go for a trip [13:17] jonaslund: michelb: i think you should try 2.6 first, might give you some porting work later but on the other hand the thing you have right now is fairly stable (and will prolly be for a while) [13:17] michelb: ok, thanks ! [13:18] ianward has joined the channel [13:19] pt_tr has joined the channel [13:22] dominic_ has joined the channel [13:22] Zenergy has joined the channel [13:23] perlmonkey2: when I install mongoose with npm mongoose it says everything is fine. But when I 'node mongooseexample.js' which is the app from the example in github, I get 'native library not built'. Does this mean mongoose depends on some other lib? [13:24] chrischris has joined the channel [13:25] tjholowaychuk: http://cocos2d-javascript.org/demo?test=cocos2d/TileMapTest [13:25] tjholowaychuk: lol [13:25] tjholowaychuk: look familiar [13:25] tjholowaychuk: "tim"s game [13:26] perlmonkey2: looks like the mongoose issue is here: https://github.com/LearnBoost/mongoose/issues/issue/211 whups. [13:26] ZiXon: so what is the problem? ;) [13:26] ZiXon: so what is the problem? ;) [13:27] ZiXon has left the channel [13:27] ZiXon has joined the channel [13:27] somebody has joined the channel [13:29] somebody: hi, i'm new to js/coding in general. i am trying to load a textfile and then have each line of the txt file as a different element of an array. i just cant figure out the right terms to google :P [13:30] somebody: i can load the file, but how do i split it? i'm looking for like a fs.splittxt function or something [13:31] JohnDav has joined the channel [13:31] kristsk`: contentsOfFile.split("\n") [13:31] JohnDav: is there a squid / greasyspoon alternative in node ? [13:32] somebody: kristsk`: thanks! [13:32] jpstrikesback has joined the channel [13:35] brian_irish has joined the channel [13:35] edude03 has joined the channel [13:35] Remoun has joined the channel [13:35] edude03: Hello everyone [13:36] edude03: I was wondering what happens if a socket.io client disconnects while waiting for a callback? [13:36] torvalamo: it tries to reconnect [13:36] arpegius has joined the channel [13:37] dnolen has joined the channel [13:37] torvalamo: the callback is queued [13:37] edude03: socket.io does? [13:37] edude03: ah [13:37] torvalamo: not sure the specific details though [13:37] edude03: So upon reconnect its popped off socket.io's queue [13:37] torvalamo: i'm sure there are issues with it, but more like corner cases [13:37] edude03: Though, I though socket doesn't keep session info [13:39] edw has joined the channel [13:40] fermion has joined the channel [13:43] torvalamo: it keeps a session id [13:43] torvalamo: afaik [13:43] torvalamo: or connection id would be more appropriate [13:43] edude03: I guess I'll find out once I've coded my app :P [13:44] somebody: kristsk`: do you know off the top of your head how i can count the number of lines in a text file? [13:45] devrim has joined the channel [13:46] torvalamo: count '\n's [13:46] Sebmaster has joined the channel [13:46] mike5w3c has joined the channel [13:46] somebody: hmm [13:47] FireFly|n900 has joined the channel [13:48] xandrews has joined the channel [13:50] FireFly has joined the channel [13:50] ph^ has joined the channel [13:50] piscisaureus has joined the channel [13:51] hij1nx has joined the channel [13:52] jano has joined the channel [13:52] fumanchu182 has joined the channel [13:53] btipling: that Int8Array is in Google Chrome but not in node is interesting [13:54] btipling: since both are powered by v8 [13:55] aabt has joined the channel [13:55] edude03: That is weird btipling [13:55] pietern has joined the channel [13:55] btipling: same with Int16Array, UInt.. etc [13:56] tjholowaychuk: btipling: they are in there (v8) [13:56] tjholowaychuk: we just dont expose them I guess [13:56] tjholowaychuk: but I believe they are there [13:56] btipling: I see [13:57] tjholowaychuk: why we dont im not sure [13:57] tjholowaychuk: lol [13:57] btipling: heh [13:57] Ari-Ugwu has joined the channel [13:59] edude03: With socket.io, how do I return messages to the user when they become available? [13:59] edude03: Just a async call in a loop? [13:59] btipling: there are methods [14:00] edude03: while() { socket.write(getMessage(sessionID)) } ? or something like that [14:00] btipling: don't need a while [14:00] btipling: http://socket.io/ has some examples [14:00] somebody: gah [14:00] somebody: its hard wrapping my brain around that one [14:01] edude03: same somebody I'm new to this async programming stuff : / [14:02] somebody: i'm trying to figure out how to just open a text file and load each line into an array :P [14:02] somebody: i suck [14:02] stagas: somebody: async or not? [14:02] somebody: no [14:03] edude03: I do use events heavily in C# but thats glued to regular code with delegates and such [14:04] btipling: edude03: just use callbacks [14:04] Poetro has joined the channel [14:04] btipling: when something has finished, the callback is called and you handle the next steps [14:04] edude03: haha well true [14:04] btipling: socket.on('message', function (obj) { }) [14:05] edude03: on message is Client —> Server though [14:05] edude03: Not when the server has a message for the client [14:06] btipling: create a server, have socket io listen to the server [14:06] davidsklar has joined the channel [14:06] jlecker has joined the channel [14:06] devdazed has joined the channel [14:07] btipling: then either send a message to the user via their id or use broadcast to send to everyone [14:07] edude03: No it would be sent via their ID [14:07] btipling: all using callbacks, example on http://socket.io/ [14:07] edude03: Yeah I'm looking at it [14:08] btipling: it's the websocket api [14:08] btipling: edude03: http://howtonode.org/websockets-socketio [14:09] stagas: somebody: fs.readFile(filename, function(err, data) { var lines = data.toString().split(/\n|\r\n/gm); console.log(lines) }) [14:09] edude03: Thanks btipling [14:09] stagas: I think [14:10] dominic_ has joined the channel [14:10] somebody: thanks [14:10] eee_c has joined the channel [14:11] btipling: edude03: no problemo [14:11] somebody: that all makes sense except the data.toString() part. [14:11] stagas: somebody: or var lines = fs.readFileSync(__filename).toString().split(/\n|\r\n/gm); console.log(lines) [14:12] vyvea has joined the channel [14:12] edude03: I know this is OT, but does redis's x:y notation mean anything? [14:12] stagas: somebody: it'sa Buffer so it doesn't have split, so we convert toString() [14:12] edude03: because when I think of a keypair I think key => value [14:13] btipling: edude03: just a convention [14:13] btipling: a very good one [14:13] edude03: OK [14:13] kristsk: edude03, no [14:13] tjholowaychuk: edude03: yeah it's just kind of a namespacing convention [14:13] edude03: Lets say I have server:bob "12" and server:john "14" [14:13] tjholowaychuk: edude03: but you can pattern match like user:0, user:1, with user:* etc [14:14] somebody: hmm i didn't realize you could add on functions like that. i thought you just had xxxx.function to work with [14:14] somebody: hmm [14:14] kristsk: but i suggest you look into hashmaps, you might find them useful [14:14] edude03: Is server an object to redis then [14:14] edude03: Or would those be considered two completely seperate things [14:14] btipling: server is a string [14:15] KOBA789 has joined the channel [14:15] btipling: it's part of a key [14:15] tokumine has joined the channel [14:16] btipling: "server:bob" in your example [14:17] edude03: so to redis "server:bob" is all one string? [14:17] btipling: yep [14:17] btipling: looks like a lookup index, you know the server name but you want its id [14:17] btipling: and then if you want other info about the server you'd probably use the id instead of the name [14:17] jpstrikesback: has anyone seen a good example of mapReduce using node-mongodb-native? [14:17] sivy has joined the channel [14:17] ineation has joined the channel [14:17] edude03: That would make sense [14:18] btipling: like server::ip to get the ip address ('server:14:ip", "server:12:ip", etc) [14:19] stagas: somebody: what do you mean add on? [14:19] nilcolor has joined the channel [14:19] amacleod has joined the channel [14:19] nilcolor: hi! [14:20] btipling: hi [14:21] nilcolor: can some1 help me with cross-origin requests (POST)? I have node.js server and i'd like to make a POST request. I receive OPTIONS request first. How i should responce to receive real POST request? [14:21] hwinkel has joined the channel [14:22] malkomalko has joined the channel [14:22] somebody: stages: well im just confused a bit about all the "."s basically. like i thought you declared sys and fs and whatever you need at the top, and that gave you functions and subfunctions (like fs.open, fs.close, etc) which makes sense [14:23] somebody: stages: but then your taking on stuff like .split [14:23] arpegius has joined the channel [14:23] Aikar: somebody: thats internal to the js lang [14:24] Aikar: google "prototypal inheritance javascript", itll teach you how JS does inheritance. theres tons of fuctions built into the prototype of every type [14:24] somebody: basically i get confused without having $ in front of variable's that i have defined, i think :P [14:24] Aikar: everything in js is essentially an object [14:24] Aikar: object has methods [14:24] stagas: somebody: . accesses a function property which can be of any type [14:24] stagas: an object property rather [14:24] Aikar: var fs = require('fs') is giving fs a link to the fs object [14:24] fumanchu182 has joined the channel [14:25] matt_c has joined the channel [14:26] Aikar: PHP uses $ to denote variables, JS does not. anything "assigned" is a variable" [14:26] Aikar: var foo = 1; puts foo into a local scope, and plain foo = 1; puts foo into a global scope [14:26] Twelve-60 has joined the channel [14:26] somebody: hmm [14:27] Aikar: though you should really try to avoid using globals at all cost [14:27] stagas: somebody: you need to read a bit about the basics of js [14:27] somebody: yes, yes i do [14:29] edude03: OK, so looking at the socket.io documentation, it seems there isn't a way to send a message to a specific user [14:29] shiawuen has joined the channel [14:29] piscisaureus has joined the channel [14:29] eee_c has joined the channel [14:30] edude03: Its seem to need to be incontext to do a socket.send("message") since there isn't a socket.send("message", clientID) [14:30] edude03: Am I wrong? [14:30] shiawuen has left the channel [14:31] shiawuen has joined the channel [14:31] malkomal_ has joined the channel [14:33] mpoz2 has joined the channel [14:34] lukegalea has joined the channel [14:37] floby has joined the channel [14:38] rjrodger: question on http module - is there a way to capture the raw data sent and received? It kinda looks like you could hack some sort of log into OutgoingMessage._writeRaw in http.js? [14:39] hosh_work has joined the channel [14:39] bshumate has joined the channel [14:39] bshumate has joined the channel [14:40] floby has left the channel [14:42] c4milo has joined the channel [14:44] Twelve-60 has joined the channel [14:45] nilcolor: can some1 help me with cross-origin requests (POST)? I have node.js server and i'd like to receive a POST requests. I receive OPTIONS request first. How i should response to receive real POST request? [14:45] Vertice has joined the channel [14:46] willwhite has joined the channel [14:48] BradleyMeck has joined the channel [14:51] tiemonster has joined the channel [14:53] boaz has joined the channel [14:54] trotter has joined the channel [14:54] jherdman has joined the channel [14:54] diggersf has joined the channel [14:55] eee_c has joined the channel [14:55] astoon has joined the channel [14:56] kal-EL_ has joined the channel [14:57] Twelve-60 has joined the channel [14:59] evl has joined the channel [15:00] edw has joined the channel [15:00] evl: I'd like to host a node app somewhere, I'm going to use it for a socket project, any recommendations? [15:00] stalled has joined the channel [15:01] lukegalea: evl: I'm just running it on an ec2 instance.. [15:01] lukegalea: micro instances are free these days (for the first year).. [15:01] evl: I'm quite new, what is EC2 [15:01] muhqu: evl: ec2 would also be my recomm [15:01] muhqu: amazon webservices [15:01] lukegalea: evl: It's amazon web services cloud computing platform. [15:01] evl: ah, neat :) [15:01] dingomanatee: v8: var $foo = 2 [15:01] v8bot: dingomanatee: undefined [15:01] dingomanatee: v8: $foo = 2 [15:01] v8bot: dingomanatee: 2 [15:02] muhqu: you maybe still can get a 1 year free [15:02] dingomanatee: v8: $bar = 6 [15:02] v8bot: dingomanatee: 6 [15:02] dingomanatee: v8: $foo + $bar [15:02] v8bot: dingomanatee: ReferenceError: $foo is not defined [15:02] losing has joined the channel [15:02] dingomanatee: v8: foo = 2 [15:02] v8bot: dingomanatee: 2 [15:02] dingomanatee: v8: bar = 4 [15:02] v8bot: dingomanatee: 4 [15:02] dingomanatee: v8: foo + bar [15:02] v8bot: dingomanatee: ReferenceError: foo is not defined [15:02] danyork: evl: there are whole bunch of Node.js hosting services now, including http://nodejitsu.com http://no.de http://nodester.com [15:02] dingomanatee: v8: $a = 1; $b = 2; $a + $b [15:02] v8bot: dingomanatee: 3 [15:03] dingomanatee: see, js uses dollar signs too :D [15:03] lukegalea: evl: Ya, the free tier at amazon is still around. [15:03] lukegalea: all those other hosting services use ec2 AFAIK [15:03] lukegalea: they just present a layer on top. [15:04] dingomanatee: Is there anyone in the Node community looking for freelance work? [15:05] beta_ has joined the channel [15:05] c4milo has joined the channel [15:05] evl: Ah thanks a bunch for the EC2 tip! [15:06] lukegalea: evl: no prob. [15:08] aheckmann has joined the channel [15:09] JohnDav has joined the channel [15:10] JohnDav: is there a way to do what squid + icap greasyspoon does in node ? [15:10] sonnym has joined the channel [15:10] JohnDav: i want to fetch pages and modify content on the fly [15:10] JohnDav: and serve it back [15:10] edude03: dingomanatee: What are you looking to have done? [15:12] maushu has joined the channel [15:12] noahcampbell has joined the channel [15:14] eee_c1 has joined the channel [15:14] dguttman has joined the channel [15:15] BradleyMeck: JohnDav im not familiar with that, but you basically just want to be able to edit the files you are serving? [15:15] MikhX has joined the channel [15:15] BradleyMeck: err proxying* [15:15] Me1000 has joined the channel [15:15] JohnDav: BradleyMeck: thats right [15:15] JohnDav: its not actually a proxy... im passing the url to serve back as a query parameter [15:15] romainhuet has joined the channel [15:15] JohnDav: http://nodeserver:nodeport/?fetch=http://www.google.com/ [15:16] JohnDav: like this [15:16] lukegalea: that should be easy using the http client... [15:16] lukegalea: but you want to cache it? [15:17] lukegalea: ie. cache the modified content? [15:17] Utkarsh has joined the channel [15:17] lukegalea: you could throw the cached content in redis or memcached. [15:17] lukegalea: I don't think I'd keep that in node. [15:17] BradleyMeck: i think he wants to run a diff and replace with something he provides [15:17] BradleyMeck: not a hard cache [15:18] lukegalea: the "Squid" bit was what threw me off [15:18] dingomanatee: erude03: I want someone to push noogle ahead a few steps. [15:18] lukegalea: but ya, that should be more or less trivial I'd think. [15:18] JohnDav: actually, its working that far [15:18] JohnDav: but for some reason [15:18] JohnDav: some sites throw me back page not found [15:19] dingomanatee: right now it works, fundamentally but I want to shif my attention to node documentation and have someone permute noogle in a few fundamental ways. [15:19] JohnDav: http.createClient(80, host).request('GET', href, {host: host}); [15:19] JohnDav: im using this [15:19] dingomanatee: First off I want it to update itself automatically, not just when I push data. [15:19] lukegalea: JohnDav: have you dealt with escaping that host? [15:19] lukegalea: or rather unescaping? [15:19] JohnDav: yep [15:19] JohnDav: var href = url.parse(q).href [15:19] chapel: JohnDav: which version of node? [15:20] JohnDav: similarly .host [15:20] JohnDav: chapel: 0.3.5 [15:20] chapel: hmm [15:20] chapel: k [15:20] squeek has joined the channel [15:20] dingomanatee: Secondly I have some user centric features done but I want them im proved a bit. I want the aliases of the canonic nick to show stats not just for the canonical nick but for the sum of the canonical nick and their aliases. [15:20] chapel: newer versions, up to head have a new http client api [15:20] zzak has joined the channel [15:20] zzak has joined the channel [15:21] dingomanatee: Lastly I want people to be able to claim a nick and associate an email/password with their identity, and a link to their git repo and their image. [15:21] JohnDav: oh k [15:21] JohnDav: but why would some websites work fine [15:21] JohnDav: and others would throw "page not found" to you [15:21] JohnDav: whereas the page does exist if i open the actual url [15:21] davglass has joined the channel [15:22] dingomanatee: Any candidate for this project would have to prove they can get the existing noogle codebase up and running on their server, then we can talk money. [15:22] squeek: Question: is running node as suid all that's required for it to bind to ports < 1024? [15:22] chapel: dingomanatee: do you have host masks available in the logs? I hadn't checked [15:23] dingomanatee: say what now? [15:23] Lorentz has joined the channel [15:23] chapel: doesn't look like it [15:23] dingomanatee: doubt it. [15:23] chapel: if you had host data, you could easily link names [15:23] dingomanatee: I just parse the dumps - don't do real time monitoring on the IRC channel. [15:24] chapel: might be worth looking into though [15:24] dingomanatee: Yeah well honestly would like to do real time monitoring - that would be a real win. [15:24] chapel: having a logger bot is easy peasy [15:24] dingomanatee: But I can't exatly do that to the history. [15:24] chapel: just a matter of getting the data the way you want it, which again isn't that hard [15:24] rjrodger has joined the channel [15:24] wilmoore has joined the channel [15:24] edude03: Noogle as in IRC search engine? [15:24] dingomanatee: I'm sure it is - I just have very limited times to code around my new job with is in teh South bay with a killer commute. [15:24] dingomanatee: yes. [15:24] chapel: ah fun dingomanatee [15:24] dingomanatee: narrative.io:3000 [15:25] chapel: http://narrative.io:3000 [15:25] chapel: the 3000 cut out on my client [15:25] chapel: :) [15:25] dingomanatee: I'm bad at providing context. [15:25] dingomanatee: I'm still kind of amazed that it hasn't crashed yet :D I don't have good try/catch on noogle. [15:26] dingomanatee: I am actually developing a ruby stack for node documentation. I've never used Ruby and want to give it a shot. [15:26] devdazed: hmm 1 is the most popular eh? [15:26] chapel: ruby for node? [15:26] chapel: not a fan tbh [15:26] chapel: :P [15:26] dingomanatee: I have never used it -- its the "thing I haven't done yet" so I am giving it a go. [15:26] tjholowaychuk: what about Cake, and Coffeescript, and all that other crap lol [15:26] squeek: lot of Ruby people have come over to Node, you have to admit [15:26] tjholowaychuk: ruby is invading us [15:26] tjholowaychuk: with uselessness [15:27] dingomanatee: I might just redact back to Node / MVC but I just want to get a quick blog/ doc site up and spare myself a lot of the maintanence tactics. [15:27] devdazed: to be fair, i went to ruby from c#/java then circled back to node [15:27] squeek: gah, I need to rename my as yet incomplete node package :( [15:27] dingomanatee: Honestly - I would do it in Drupal but I think the peasants would revolt :D [15:27] edude03: dingomanatee: I could get it up and running no problem [15:27] dingomanatee: Plus I do want to see if it is possible to develop a hybrid Ruby/ Node stack [15:28] dingomanatee: Cool. [15:28] dingomanatee: Do you know MongoDB [15:28] NuckingFuts: dingomanatee: Use JSPP lol [15:28] dingomanatee: I doubt thats a healthy suggestion but I don't understand it. [15:28] NuckingFuts: Also, my NodeJS chatbot seems to silently lose socket on all computers :/ [15:28] altamic has joined the channel [15:28] altamic has joined the channel [15:28] dingomanatee: It sems to me that Ruby has set a standard in a lot of web app areas and I want to give it a poke. [15:28] NuckingFuts: dingomanatee: jspp.io [15:29] froots has joined the channel [15:29] NuckingFuts: Anyone know why my socket is closing spontaneously and without an error? [15:30] dingomanatee: Looks pretty exciting. [15:30] edude03: Sure dingomanatee, I'd be interested in working on this [15:30] elux_ has joined the channel [15:30] dingomanatee: but I do want to give Ruby a shot for at least a week. [15:30] Jonathon has joined the channel [15:30] Jonathon: anyone available that can help me with a cygwin install of nodejs [15:30] NuckingFuts: dingomanatee: Don't go to our big competitor for awesome! [15:31] NuckingFuts: Jonathon: https://github.com/ry/node/wiki/Building-node.js-on-Cygwin-%28Windows%29 <-- this worked for me in past. [15:31] Jonathon: yeah im following that [15:31] Jonathon: it says to come here in case of problems that aren't listed [15:31] Jonathon: lol [15:31] dingomanatee: I'm not looking for "AWESOME". I'm looking for geting it done considering I am doing most of the work from 10 pm to 2 am [15:31] Jonathon: :P [15:31] nilcolor: if somebody want to know about cross-domain POST requests - you have to responce at OPTIONS request first (smthng like this: https://gist.github.com/816580) and then you'll receive real POST request from browser [15:31] NuckingFuts: Jonathon: Then what's the problem? [15:31] Jonathon: on make, im getting different errors each time I try relating to ares_search.c and ares_search_1.o [15:32] Jonathon: tried both 0.3.1 and 0.2.6 [15:32] dingomanatee: And as I've said many times before that if you really crae about node you need to package it as a way to improve Ruby and market it to the existing Ruby crowd. [15:32] jakehow has joined the channel [15:32] NuckingFuts: Jonathon: Well, there's prcompiled binaries if all else fails lol [15:32] dingomanatee: Trust me: I'm a dinosaur - I know what I'm doing. [15:32] Jonathon: where can I get a hold of those? [15:33] ncb000gt has joined the channel [15:33] NuckingFuts: Jonathon: http://node-js.prcn.co.cc/ <-- I use them. Though I'm gonna try building 0.3.8 on Cygwin today [15:33] dingomanatee: Like the Cylons, there are 12 models of me. And we have a plan. [15:33] Jonathon: NuckingFuts: and I just unzip them to my cygwin folder? [15:34] jamesarosen has joined the channel [15:34] dingomanatee: I have a very large strategic vision of how I want to build node into an enterprise centric solution set. I have it in writing and I am willing to fund its creation. [15:35] dingomanatee: However the first step is to present a proper documentation site and for that I need help and time. [15:35] Jonathon: NuckingFuts: or to C:\cygwin\home\user\ ? [15:35] dingomanatee: edude03: cool - give me a ping at bingomantee@me.com when you have the Node up and running. By the way the key is that you have to run the scripts on the Jobs folder and go to the "pages" urls to load the data files. [15:36] dingomanatee: my AIM is also bingomanatee. [15:38] stalled has joined the channel [15:38] nook has joined the channel [15:39] dingomanatee: BTW, viewing other frameworks as competitors is a losing strategy. [15:39] Nohryb has joined the channel [15:39] dingomanatee: You have to view the status quo as services that you can help in order to expand Node's visibility. [15:40] edude03 has joined the channel [15:40] edude03: : / damn I hate D/C [15:41] Lorentz: Should totally write out the objectives and etc for my new project [15:42] Lorentz: Even if this is probably the fourth time or fifth I'm doing it. [15:42] edude03: Its a good idea [15:42] eresair has joined the channel [15:44] rjrodger has joined the channel [15:46] WhenRaptors has joined the channel [15:46] WhenRaptors: hey guys [15:47] WhenRaptors: anyone check out cloud9 yet? [15:47] Kingdutch has joined the channel [15:48] xla has joined the channel [15:51] linopolus: WhenRaptors: It's a nice tool, but far away from old editors like textmate or vim [15:52] stagas_ has joined the channel [15:52] necromancer has joined the channel [15:52] necromancer: are there any rails-like mvc frameworks for node.js? [15:52] necromancer: or maybe javascriptMVC but for node.js? [15:53] dingomanatee: I already have a MVC project in my repo [15:53] dingomanatee: It has a mongo persistence layer and a route/controller system [15:53] dingomanatee: Its an extenstion of express.js, the domainant web system developed by TJ. [15:53] strmpnk has joined the channel [15:54] WhenRaptors: lino: does it allow any collab work? [15:54] dingomanatee: However I'd encourage you to look at the codebase of noogle itself as its a little more advanced - I still have to pull some of the stuff from noogle back into MVC. [15:54] willwhite1 has joined the channel [15:55] WhenRaptors: I have a game server built on top of node and would like to embed cloud9ide into it. [15:55] vipaca has joined the channel [15:56] xla_ has joined the channel [15:56] jchris has joined the channel [15:56] dguttman has joined the channel [15:58] cwo has joined the channel [15:59] mrtrosen has joined the channel [15:59] xla has joined the channel [15:59] adambeynon has joined the channel [16:00] stagas_ has joined the channel [16:01] dmcquay has joined the channel [16:03] cjm has joined the channel [16:04] MrTopf has joined the channel [16:05] BradleyMeck: WhenRaptors I use cloud9ide [16:05] mr_daniel has joined the channel [16:06] BradleyMeck: its fairly good, some quirks w/ the file system tree ui though [16:07] cjeske has joined the channel [16:07] eee_c has joined the channel [16:07] dominic_ has joined the channel [16:08] colinclark has joined the channel [16:10] borgenk has joined the channel [16:12] ceej has joined the channel [16:15] stagas has joined the channel [16:15] astoon has joined the channel [16:15] colinclark has joined the channel [16:17] BillyBreen has joined the channel [16:19] jetienne has joined the channel [16:19] edw has joined the channel [16:23] herbySk has joined the channel [16:26] edude03 has joined the channel [16:26] EyePulp has joined the channel [16:26] zylo has joined the channel [16:27] AB__ has joined the channel [16:28] AB__ has left the channel [16:29] jherdman has joined the channel [16:29] brapse has joined the channel [16:31] dberlinger has joined the channel [16:32] arpegius has joined the channel [16:33] hobodave has joined the channel [16:37] slaz has joined the channel [16:40] sprout has joined the channel [16:41] Adman65 has joined the channel [16:42] necromancer has joined the channel [16:44] wilmoore has joined the channel [16:44] bartmax has joined the channel [16:44] bartmax has joined the channel [16:45] jherdman has joined the channel [16:46] Sebmaster has joined the channel [16:48] mw has joined the channel [16:48] mw has joined the channel [16:50] jano has joined the channel [16:52] eee_c has joined the channel [16:52] robotarmy has joined the channel [16:52] cronopio_ has joined the channel [16:52] jchris has joined the channel [16:52] here has joined the channel [16:53] TobiasFar has joined the channel [16:53] daniellindsley has joined the channel [16:53] MikhX has joined the channel [16:54] bingomanatee has joined the channel [16:56] broofa has joined the channel [16:56] necromancer: are there any MySQL ORMs for node? [16:56] shinmei has joined the channel [16:58] cognominal has joined the channel [16:59] paulrobinson has joined the channel [16:59] gkatsev: sure [16:59] aurynn has joined the channel [17:00] gkatsev: necromancer: you can find packages in search.npmjs.org [17:00] necromancer: oh cool thanks [17:00] gkatsev: also: http://github.com/ry/node/wiki/modules [17:00] altamic has joined the channel [17:00] altamic has joined the channel [17:01] EyePulp has joined the channel [17:01] EyePulp: yo ho ho [17:01] aurynn: and a bottle of rum. [17:02] kristsk: and a room full of scrum. [17:02] briznad has joined the channel [17:02] springmeyer has joined the channel [17:02] aurynn: Scrumptious. [17:02] kristsk: now hurry up with those nails and hammer before they get out! [17:02] gkatsev: agile development goes best with rum [17:02] WhenRaptors: I'm surprised by how much a community has grown around node [17:03] WhenRaptors: there are alot of great modules/apps out there [17:03] aurynn: Node is awesome and cool [17:03] aurynn: and has the mindshare of awesome, coolness. [17:03] gkatsev: its because we can finally use the good parts and awesomeness of js and not worry about the crappy browser end of things [17:03] WhenRaptors: but I guess like in presentation, Javascript developers were already trained to be event oriented [17:03] EyePulp: oh boy, a love fest [17:04] WhenRaptors: yeah, I implemented a Web -> XMPP proxy with open id authentication [17:04] aurynn: So I discovered my PG driver fails badly on NULLs. This was amusing to discover. [17:04] WhenRaptors: took like two days [17:04] WhenRaptors: it was great [17:04] EyePulp: aurynn: which PG driver? [17:04] aurynn: EyePulp, postgres-js [17:04] aurynn: it's on my github [17:04] aurynn: I need to rename it, since I forked from creationix [17:05] mattly has joined the channel [17:05] EyePulp: is he still working on his? seems like it's been a while [17:05] aurynn: He's not [17:05] aurynn: I'm officially the maintainer [17:05] EyePulp: cool [17:05] jonaslund has joined the channel [17:05] paulrobinson has left the channel [17:05] EyePulp: I was just there yesterday out of frustration with mongo in our curent project. [17:05] EyePulp: (on creationx's repo) [17:06] aurynn: I really ought to publicize my fork more. [17:06] Sebmaster: is there any mysql driver which can deal with prepared statements [17:06] tokumine has joined the channel [17:06] aurynn: Push it into npm [17:06] aurynn: Name it [17:06] aurynn: stuff like that. [17:07] nmtmason has joined the channel [17:07] EyePulp: aurynn: how complete is it? Other than dying on nulls... =P [17:07] willwhite has joined the channel [17:07] jakeskik: WhenRaptors: I guess quite a few ruby/ror fellows have also jump into node.js bandwagon. Getting google to optimize your vm is quite an advantage :) [17:07] aurynn: EyePulp, other than dying on nulls, it's pretty complete [17:07] aurynn: It handles prepared statements properly [17:07] dmcquay has joined the channel [17:07] WhenRaptors: haha yah [17:08] EyePulp: aurynn: you can pass args and such? [17:08] aurynn: EyePulp, Yep [17:08] EyePulp: cool [17:08] WhenRaptors: it also means node only needs to focus on the framework, not the VM/etc [17:08] jakeskik: and with coffee script, js development is fun again [17:08] aurynn: and it parameterizes them properly at the PG level [17:08] WhenRaptors: I'm a fan of jQuery [17:08] aurynn: EyePulp, so injection attacks through fucking up the escaping don't happen. [17:09] aurynn: (yay!) [17:09] WhenRaptors: but yeha coffeescript is much cleaner [17:09] tfcoding has joined the channel [17:09] EyePulp: aurynn: nice. also keeps you from having to do validation - let PG do the heavy lifting. [17:09] aurynn: EyePulp, Exactly. [17:09] jakeskik: WhenRaptors: and you can use both :) [17:10] EyePulp: aurynn: how clean is error handling? [17:10] WhenRaptors: what overhead does it add? [17:10] aurynn: EyePulp, the buffer stuff that creationix wrote isn't great, I'm about to tear it apart and use strtok [17:10] aurynn: EyePulp, ? [17:10] WhenRaptors: other than unreadable javascript [17:10] WhenRaptors: xD [17:10] jakehow has joined the channel [17:10] necromancer: is http://search.npmjs.org/#/_publish supposed to be a blank white page? because that's what i see on OS X firefox & chrome [17:11] Sebmaster: mysql has a really crappy documentation on its protocol :( [17:11] EyePulp: aurynn: just wondering what comes back when I send a malformed query or invalid parameter through [17:11] Sebmaster: quite hard to implement a proper driver [17:11] aurynn: EyePulp, it passes your callback an err object that gently wraps the PG error [17:11] aurynn: So I'm using EJS for templating in my webapp thing, [17:11] shapeshed has joined the channel [17:11] Sebmaster: especially since mysql delivers results of a prepared statement in a binary format [17:11] aurynn: and I was wondering if anyone knew how to import template fragments? [17:11] edude03: In javascript can I pass the current content to the method that is going to be called back? [17:12] zomgbie has joined the channel [17:12] peol has joined the channel [17:12] peol has joined the channel [17:12] edude03: getMessages(params, deliverMessage(this)); ? [17:12] edude03: *context [17:13] shapeshed has left the channel [17:13] stephank has joined the channel [17:13] devkorcvince has joined the channel [17:13] aurynn: since I am apparently unable to find documentation today [17:14] Sebmaster: edude03: .bind() [17:14] davidwalsh has joined the channel [17:14] aurynn: Sebmaster, getting prepared statements working on PG wasn't easy, either. [17:14] Sebmaster: aurynn: how did you solve the 64bit problem? [17:15] aurynn: Sebmaster, 64-bit problem? [17:15] aurynn: (clearly I haven't run into it yet!) [17:15] Sebmaster: aurynn: I can only speak of mysql on this part, so i dont know, if you have such a problem on PG [17:16] Sebmaster: but if i get a 8byte integer for example [17:16] dominic_ has joined the channel [17:16] Sebmaster: i have to decode it [17:16] Sebmaster: but JS/v8 doesn't really support 64 bit [17:16] aurynn: no, it drops off around 54-bit [17:16] aurynn: or 53 [17:17] Sebmaster: yea [17:17] Sebmaster: so i cant really decode an 8byte number [17:17] Sebmaster: it could be possible with a string workaround maybe [17:17] aurynn: Someone will come up with a Math::BigInt-alike [17:17] aurynn: and I'll use that. :) [17:17] balaa has joined the channel [17:18] Sebmaster: what are you returning atm for such high numbers? [17:18] Sebmaster: an approximate value? [17:18] edude03: Sebmaster: What would I be binding to exactly? [17:18] aurynn: I don't think it tests for very large numbers atm [17:18] eee_c has joined the channel [17:19] Sebmaster: edude03: you could bind the function to the current context [17:19] Sebmaster: aurynn: okay :( [17:19] amerine has joined the channel [17:19] noahcampbell has joined the channel [17:19] edude03: Oh how does that work? [17:19] kristsk has joined the channel [17:19] Sebmaster: Function.bind(this) [17:20] WhenRaptors: npm has become a standard huh [17:20] Sebmaster: if you refer to this in the function, if refers to the prvious conectext [17:20] aurynn: Sebmaster, I haven't run into the issue, so I couldn't test for it [17:20] Sebmaster: *context [17:20] Sebmaster: aurynn: okay [17:21] kristsk: is there a nice and easy way to get home dir of current user in node ? [17:21] aurynn: now I can write a test for it :) [17:21] Sebmaster: guess ill continue to return undefined until i have time to write myself a 64bit to string conversion or something [17:21] Sebmaster: aurynn: :D [17:22] edude03: Async programming is frying my brain T_T' [17:22] kristsk: looks like 'process.env.HOME' will do [17:22] Sebmaster: edude03 you get used to it^^ [17:22] daniellindsley has joined the channel [17:23] edude03: Sebmaster: So I want to return the retreieved message once its available to the connection that requested it [17:23] SamuraiJack has joined the channel [17:24] Sebmaster: edude03: Is your connection your own object? [17:24] edude03: No using socket.io [17:25] edude03: hmm [17:25] pgte has joined the channel [17:25] Sebmaster: edude03: You have your retrieve-method. If you .bind() the method to this you can use this in the function as if it runs in this context [17:26] Sebmaster: edude03: You could pass this as a parameter too ofc. [17:26] edude03: So with socket.io, each connect client gets their own socket object right? [17:27] edude03: errr client object [17:27] Sebmaster: didnt use socket.io till now [17:28] WhenRaptors: where does NPM install modules to? [17:28] Sebmaster: i want to, but i didnt program a node project for a browser till now [17:28] edude03: Ah then we can learn together :P [17:28] edude03: Though you're already ahead since this is my first node project [17:28] altamic has joined the channel [17:28] altamic has joined the channel [17:29] Sebmaster: edude03: I'm still working on a mysql client for node before i can write any web project for it [17:29] WhenRaptors: ah I found it [17:29] edude03: You mean mongo right Sebmaster [17:29] edude03: ;) [17:30] Sebmaster: edude03: Im missing relations in mongo [17:30] jpick has joined the channel [17:30] Sebmaster: errr... transactions^^ [17:31] ryanfitz has joined the channel [17:31] edude03: I was about to say, yeah I think you'd be missing relations from a non relational databases [17:31] wadey has joined the channel [17:31] zylo has joined the channel [17:31] edw has joined the channel [17:32] aurynn: Relational databases are nice. [17:32] edude03: OK since I'm still having a mental disconnect here [17:32] edude03: If a message is waiting for a user that is connected [17:32] edude03: Do I use a blocking pop, or something else? [17:33] edude03: *if a message is queued for a user [17:34] Rixius has joined the channel [17:35] dominic_ has joined the channel [17:35] softdrink has joined the channel [17:35] benburkert has joined the channel [17:36] shiawuen1 has joined the channel [17:36] shiawuen has joined the channel [17:37] sprout has joined the channel [17:38] danoyoung has joined the channel [17:39] danoyoung has left the channel [17:39] paulrobinson_ has joined the channel [17:40] edude03: Or do I use eventEmitter for the MQ to signal when a message arrrives [17:41] davidascher has joined the channel [17:42] pandeiro has joined the channel [17:42] hornairs has joined the channel [17:43] tfe_ has joined the channel [17:44] CrazyGoogle has joined the channel [17:44] mikeal has joined the channel [17:44] mikeal has joined the channel [17:45] paulrobinson has joined the channel [17:45] agnat_ has joined the channel [17:46] paulrobinson has left the channel [17:48] isaacs has joined the channel [17:49] isaacs: WhenRaptors: (re: "where does npm install things to?") npm config ls [17:49] arpegius has joined the channel [17:49] WhenRaptors: yeah I found it [17:49] isaacs: WhenRaptors: specifically: npm config get root [17:49] isaacs: kewl :) [17:49] WhenRaptors: had to patch cloud9 [17:49] isaacs: WhenRaptors: also, `npm faq` is handy. if you know of anything that you'd like to add to that, lmk. [17:50] WhenRaptors: it doesn't come with auth support but connect-auth works great [17:50] isaacs: ah, i see. [17:50] isaacs: `npm explore cloud9` will plop you right into the package dir so you can poke around. [17:50] blueadept has joined the channel [17:50] WhenRaptors: oh thats sweet [17:50] WhenRaptors: I already did the patch tho ;) [17:50] isaacs: of course, it's easy to break stuff, so be careful. you can always re-install if you really flub it up [17:50] WhenRaptors: but npm explore is useful [17:50] isaacs: yeah, it's handy [17:52] tykelewis has joined the channel [17:53] steffkes has joined the channel [17:53] prettyrobots has joined the channel [17:54] admc has joined the channel [17:55] mjijackson has joined the channel [17:56] juan77 has joined the channel [17:56] warz has joined the channel [17:57] dguttman has joined the channel [17:58] Sebmaster: isaacs: Does npm store the password for publishing smth? [17:58] isaacs: Sebmaster: yes. [17:59] juan77: hi, maybe is a dumb question, but how I can chain a callback? for example I have a callback when I return ´show table´, and then for each table I add another callback for retrieving the columns of each table, actually only returns the first callback, and I need to "chain", when all second´s callback ends, then returns the first callback.... I have searched but no luck... any idea? [17:59] isaacs: Sebmaster: it stores it in the .npmrc file, which (at least in the latest version?) shoudl be moded 0600, and is encrypted using your .ssh/id_rsa as a cipher [17:59] Sebmaster: isaacs: Ah, i see [18:00] derferman has joined the channel [18:00] edude03 has joined the channel [18:00] isaacs: Sebmaster: i'm probably going to remove the cipher bit, though, and just store it in plain base64 text, since a) it's not all that much more secure, and b) ciphering is not going to be in node-core soon, and c) if someone can read 0600 files on your computer, then they can read your ssh key anyhow [18:00] isaacs: Sebmaster: and, as it is, if you change your ssh keys, then the _authCrypt breaks, and you can't send the .npmrc to another computer, etc. [18:00] Sebmaster: isaacs: Yea i guess 0600 should be okay [18:01] isaacs: Sebmaster: as long as it's user-owned. [18:01] isaacs: Sebmaster: and, of course, root can read it. [18:01] Sebmaster: isaacs: Oh shit, i chown-ed .npmrc to another user on my pc, wat do?^^ [18:01] isaacs: Sebmaster: can you jsut chown it back? or ask them to chown it for you? [18:02] Sebmaster: isaacs: Its okay, i was just making fun :p [18:02] isaacs: heh [18:02] Coal has joined the channel [18:05] jimt has joined the channel [18:07] aguynamedben has joined the channel [18:08] q_no has joined the channel [18:08] siong1987 has joined the channel [18:08] Sebmaster: isaacs: When should I use `npm version`? [18:09] tlrobinson has joined the channel [18:10] admc1 has joined the channel [18:12] eee_c has joined the channel [18:13] necromancer has joined the channel [18:13] jano has joined the channel [18:14] Utkarsh has joined the channel [18:16] necromancer has joined the channel [18:18] nejucomo has joined the channel [18:18] m14t has joined the channel [18:19] m14t has left the channel [18:19] ryah: tjholowaychuk: query is fucking awesome. [18:20] tjholowaychuk: ryan: haha thanks. thought of it last night, was like wow that would be easy/handy [18:22] tilgovi has joined the channel [18:22] binaryjohn has joined the channel [18:22] cjm has joined the channel [18:23] darvvin has joined the channel [18:23] zzak: yah good idea [18:25] mraleph has joined the channel [18:25] Aikar: mongoose 1.0 is looking really damn good. nice upgrade [18:25] Aikar: update* [18:26] zzak: its like xpath on steroids [18:26] tjholowaychuk: haha [18:26] Aikar: ryah: did you see my pullreq for improving require.paths on startup? [18:26] admc has joined the channel [18:27] davidvanleeuwen has joined the channel [18:27] Aikar: https://github.com/ry/node/pull/630 [18:28] ryah: Aikar: i don't like cache-ing stats [18:28] zemanel: is there something like this for node? fq.query("/some/dir").each(function(it){console.log(it.filename)}); [18:28] ryah: we're going to redo this in v0.5 [18:28] admc1 has joined the channel [18:28] Me1000 has joined the channel [18:28] nilcolor has joined the channel [18:28] Aikar: ryah: caching? [18:29] ryah: yeah [18:29] tjholowaychuk: zemanel: readdir [18:29] zemanel: :) [18:29] ryah: you're caching the information that those dirs exist or not [18:29] Aikar: if the dir doesnt exists, no real reason to keep searching in them. not too much to ask to restart the process if they decide to start using them lol [18:29] Aikar: if it didnt exists on startup, no libs would of been in them anyways [18:29] ryah: the dir could begin to exist after 5 minutes... [18:29] Aikar: so it would need a program restart in order to pick em up [18:30] rwaldron has joined the channel [18:30] ryah: module stats are not in the hot path [18:30] ryah: (for most apps) [18:30] ryah: so i don't want to optimize it [18:31] jspiros has joined the channel [18:31] jamesarosen has joined the channel [18:31] tlrobinson_ has joined the channel [18:32] Aikar: require.paths is something iterated on every require, im confused by what you mean. shouldnt reducing the # of paths to lookup improve require time since your stating paths.length * extensions.length (6 vs 2)? [18:33] ryah: it will but require-ing modules isn't something that is slow currently [18:33] ajcates has joined the channel [18:35] Aikar: slow no, but just seems wasteful to keep checking 2 directories (before the main /usr/local/lib/node/ at that) that are 'known to be dead' and usually only going to be used in a local dev environment and never on production. doesnt sound like too much to ask to restart app to pickup the home dir folders [18:35] ttt has joined the channel [18:35] mjr_ has joined the channel [18:35] edude03 has joined the channel [18:36] eddanger has joined the channel [18:36] Aikar: and if the app itself creates the dirs, they could add them to paths. [18:37] devkorcvince has left the channel [18:38] Poetro1 has joined the channel [18:38] kixxauth has joined the channel [18:40] perlmonkey2 has joined the channel [18:40] dgathright has joined the channel [18:41] linopolus: WhenRaptors: I'm not 100% sure, but I think no [18:41] pydroid has joined the channel [18:41] perlmonkey2: Anyone know what this 'native library not built' error means when trying to run mongoose? Google shows it is a recorded bug but doesn't shed any light on how to correct it. [18:41] dominic_ has joined the channel [18:41] altamic has joined the channel [18:42] ryah: does Object.keys({ a: 1, b: 2, c: 3}) have a defined ordering? [18:42] edude03 has joined the channel [18:43] tjholowaychuk: ryah: yup [18:43] gkatsev: doesn't spec says to no rely on the keys being in a certain order? though, most often, you will get them in the order a,b,c? [18:44] mscdex: gkatsev: that's true, but i'm not sure about the output of Object.keys() [18:44] mscdex: and about V8 specifically [18:44] langworthy has joined the channel [18:45] benreesman has joined the channel [18:45] mjr_: ryah: it does not, sadly [18:45] mjr_: You have to sort it [18:45] ryah: i think it does but implicitly [18:45] gkatsev: mscdex: I just figured that because the spec says not to rely on an order, then object.keys probably won't be reliable either [18:45] ryah: and i think all browsers do the same [18:45] mjr_: Most often, you'll get them back in the order you set them, but if you modify the object, that order can change. [18:46] ryah: and v8 actively tries to maintain compat [18:46] mjr_: I'd like to believe that, but I think it's actually different between Chrome and FF. [18:46] mjr_: Unless I'm totally on crack. [18:46] mjr_: Crack being ignorance. [18:46] gkatsev: I think it is different between chrome and ff [18:47] wink_: so the ashy lips are unrelated? [18:47] edw has joined the channel [18:48] mjr_: I do not know enough about actual crack usage to know how funny that is. [18:48] Aikar: lol... [18:48] Twelve-60 has joined the channel [18:48] charlenopires has joined the channel [18:48] gkatsev: http://javascriptweblog.wordpress.com/2011/01/04/exploring-javascript-for-in-loops/ mentions iteration sequence in chrome which I assume is the sequence that Object.keys returns stuff in [18:48] mjr_: I'll assume pretty funny. [18:49] mscdex: there's a V8 issue about the key ordering [18:49] EyePulp: anyone have a debug strategy for mongoose when running into this: CALL_NON_FUNCTION ? Other than randomly commenting out everything and turning one bit back on at a time. [18:49] tedsuo has joined the channel [18:49] tjholowaychuk: EyePulp: look at the stack trace? [18:50] EyePulp: tjholowaychuk: it's all within mongoose and the native driver - any way to extend the stack back to my originating call? [18:51] gkatsev: long-stack-traces? [18:51] tjholowaychuk: EyePulp: well yeah but that will give you the line in mongoose at least so you should be able to have a better idea from that [18:52] jchris has joined the channel [18:53] dc` has joined the channel [18:53] wadey: Thrift 0.6.0 has been released, with support for Node.js. http://bit.ly/ifG6zh [18:53] dc` has left the channel [18:53] wadey: You can install the client libraries with "npm install thrift" [18:53] EyePulp: fair enough - https://github.com/LearnBoost/mongoose/blob/master/lib/mongoose/model.js#L72 something being saved. [18:54] mscdex: apparently v8 reorders numeric keys in an object [18:54] mscdex: but leaves non-numerical keys untouched [18:54] EyePulp: trying to figure out what the attempted save is [18:54] agnat has joined the channel [18:54] tjholowaychuk: EyePulp: looks like you omitted a callback or something [18:55] EyePulp: do you *have* to send a callback with saves? [18:56] EyePulp: (i assume no ) [18:56] mscdex: v8: Object.keys({foo:'bar',3:'a',1:'b',2:'c'}) [18:56] v8bot: mscdex: ["1", "2", "3", "foo"] [18:56] gkatsev: js> Object.keys({foo:'bar',3:'a',1:'b',2:'c'}) [18:56] gbot2: gkatsev: ["foo","3","1","2"] [18:57] EyePulp: tjholowaychuk: and please note - I appreciate you taking the time to talk about it, regardless of whether I figure this out right now. [18:57] tjholowaychuk: no worries [18:57] perlmonkey2: How are people currently using mongoose if this latest build is broken? [18:57] mscdex: v8: Object.keys({ a: 1, b: 2, c: 3}) [18:57] v8bot: mscdex: ["a", "b", "c"] [18:57] isaacs has joined the channel [18:57] mscdex: as you can see, you can't really rely on the ordering heh [18:58] gkatsev: js>/gbot2 is spidermonkey 1.8.5, fwiw [18:58] piscisaureus: ryah: you cannot rely on ordering, see http://code.google.com/p/v8/issues/detail?id=164 [18:59] EyePulp: perlmonkey2: I've spent the last 4 days trying to migrate to the current mongoose. I'm getting weary. =) [19:00] liar has joined the channel [19:00] piscisaureus: ryah: also, there's more npm porting fallout https://github.com/piscisaureus/node/commit/8f5e9f14064594e2746afa52282a5117c773733e -- care to land? [19:02] perlmonkey2: EyePulp: Yeah, I've spent quite a bit of time porting my project from mysql to mongoose. Looks like this might have been a mistake. [19:02] isaacs: holy crap, vim opens tar files as a directory [19:02] isaacs: <3 <3 <3 [19:02] piscisaureu_ has joined the channel [19:03] perlmonkey2: isaacs: pretty cool. [19:03] gkatsev: isaacs: netrw in vim is great [19:03] altamic has joined the channel [19:03] altamic has joined the channel [19:03] isaacs: oh, it doesn't actually let you edit the files and save them back... [19:03] EyePulp: tjholowaychuk: it looks like .save() at least in this case, for some unknown reason, is requiring a function callback to be passed in. foo.save(function(){}); gets past the error. [19:03] isaacs: 200 unit + integration tests [20:05] jetienne: http://pastebin.com/wM0uVA5F <- this is for a poll, which alternative do you prefere ? both versions are doing the same thing [20:06] EyePulp: brianc: nice - we use PG for everything else, so it's not a great leap [20:06] brianc: EyePulp: for everything but node? [20:07] jacobolus has joined the channel [20:09] wink_: EyePulp: if you're looking for postgres bindings, why not ryah's? [20:11] EyePulp: brianc: pretty much all pg - a bit of older stuff on SQL Server [20:11] stride: jetienne: chained with linebreaks [20:11] EyePulp: wink_: I'm not using node + pg for anything atm - so I have no truck with any implementation [20:12] jetienne: stride: ok thanks [20:12] wink_: EyePulp: ah gotcha, well if you're looking, check out ryah's binding. nothing against brianc's implementation, the libpq wrapper is going to be loads faster :p [20:13] wink_: i've been using it in production for 6 months or so, around 3 queries per second without a hiccup :> [20:14] wink_: nothing super quick, but its run nonstop [20:14] brianc: wink_: probably is faster, I get about .4 miliseconds per query with node-postgres [20:14] bartt has joined the channel [20:14] EyePulp: is 3 queries per second a lot? [20:14] EyePulp: that sounds... low [20:14] wink_: i could be talking out of my ass, i've not benchmarked it, but all the js implemented protocols i have benchmarked against their library wrappers have performed horribly [20:14] mikedeboer has joined the channel [20:15] wink_: no, its definitely low [20:15] brianc: I get about 4,000 queries per second [20:15] wink_: i just dont need it faster for that use [20:15] EyePulp: gotcha [20:15] wink_: i was speaking towards its stability, not performance [20:15] wink_: i would bet any sum of money it out performs a js implementation though [20:16] EyePulp: stability and speed are nice. so is an understandable implementation if you're in an environment that's prone to so much change as things are in node-land [20:16] svenlito has joined the channel [20:16] piscisaureus: anyone here uses fsync/fdatasync from node? [20:17] brianc: I have never had a segfault reported in the node-postgres issue list [20:17] wink_: sure, luckily libpq is well documented and ryah just has a light wrapper around it [20:17] wink_: brianc: i'd hope not :p [20:17] EyePulp: ACTION starts to get the same feeling he does when people start evangelizing vim or emacs [20:17] shaver: piscisaureus: on Linux, at least, it will be very painful and block-making [20:17] brianc: haha [20:17] aklt has joined the channel [20:17] atmos has joined the channel [20:17] void_ has joined the channel [20:17] stride: EyePulp: what?! ;> [20:18] wink_: lol there is only a slight bit of evangelizing here [20:18] brianc: yeah, I don't mean to argue, I've just heard peeps say they had problems w/ ry's [20:18] wink_: i have to pimp the wrapper bindings over js implmentations [20:18] wink_: :P [20:19] piscisaureus: shaver: I know it should be useful for implementing journaling and transacted operations and the such [20:19] atmos has joined the channel [20:19] piscisaureus: But I wonder whether it makes sense at all when fsync is run in a thread pool that guarantees no ordering [20:19] EyePulp: I'm not looking to move to PG - so the argument is moot for now. But I'd be more tempted to look @ brian's anyhow. =P [20:19] wink_: meh, whatever floats your boat <3 [20:20] EyePulp: mu ha ha [20:20] wink_: ryah probably has no idea what hes doing anyhow ;D [20:20] piscisaureus: shaver: but apparently ryah one day thought it would be useful [20:21] prettyrobots has joined the channel [20:21] shaver: it will be useful when Linux gets its shit together [20:22] piscisaureus: shaver: I think performance on windows of that is actually much worse on windows [20:22] torvalamo has joined the channel [20:22] shaver: we found not [20:23] shaver: because it'll just flush one file [20:23] jonaslund: piscisaureus: hmm.. can operations on the same filehandle be on different threads ? [20:23] piscisaureus: shaver: oh on linux it flushes the entire device? [20:23] piscisaureus: jonaslund: sure [20:23] shaver: yes sir [20:23] jonaslund: hmm.. that's a bit bad [20:24] piscisaureus: shaver uhh that's bad. Tho i was just reading pgsql.havkers mailing list and they came up with very different numbers. [20:24] piscisaureus: could be due to postgres internals though [20:24] piscisaureus: jonaslund: why? [20:25] jonaslund: piscisaureus: like you mentioned, write ordering and sync [20:25] jonaslund: granted.. stuff like NCQ,etc can become a problem as well [20:26] wink_: the flip side would be loads worse though [20:26] piscisaureus: jonaslund: you actually use fsync? [20:26] jonaslund: piscisaureus: not yet. is it async/sync ? [20:26] rjrodger: anyone here familiar with the new Agent stuff in http.js? I think I've found an issue when there's a request error, e.g. DNS - sockets seem to be left in a bad state and the Agent cannot process any more requests for that host:port sombination [20:27] jonaslund: piscisaureus: personally i'd want to be able to do a asynchronous synced write [20:27] rjrodger: I have a sort of hacky fix but no idea if it is the right way to do it [20:27] jonaslund: piscisaureus: since i can allow a fair bit of batching as long as the writes themselves are more or less stable [20:27] jonaslund: piscisaureus: it's a log-based datastore [20:27] robotarmy has joined the channel [20:28] disq has joined the channel [20:28] disq has joined the channel [20:28] piscisaureus: jonaslund: I think either [20:28] piscisaureus: sync/async [20:28] jonaslund: erm i mean [20:28] jonaslund: i have a log [20:28] jonaslund: that i can write in batches [20:29] dnyy has joined the channel [20:29] piscisaureus: jonaslund: probably you could hack fs.WriteStream to queue up a sync operation that is run as soon as writes before it are done [20:29] jonaslund: the most important thing would be to know that what is in the log has actually been written [20:29] emacsen has joined the channel [20:29] jonaslund: should stuff like that require hacks ? [20:30] jonaslund: granted... the whole reason for me to start hacking node is because i'm strongly considering putting a fair bit of my code as a native module [20:30] stride: hm. guys, what are you using to sort larger arrays of objects (by a common numeric key of those objects)? [20:30] piscisaureus: jonaslund: well, erm. I don't think it is supported now. But if you can come up with a well-conceived patch I bet it'll land [20:30] jonaslund: especially anything related to the logging and persistence [20:30] Me1000 has joined the channel [20:31] jonaslund: piscisaureus: the problem is that both operating systems and disks can lie to you [20:31] piscisaureus: jonaslund: I don't think we can prevent the disk from lying to us [20:31] piscisaureus: and we need to trust the os that after we called sync() and it has returned, buffers are written back to the disk [20:32] jonaslund: exactly.. thus the importance of properly executed functionality diminishes [20:32] jonaslund: anyhow [20:32] jonaslund: IF stuff sent to a write function can be delayed behind your fsync call then fsync is useless [20:33] piscisaureus: jonaslund: I think writestream is not affected by this [20:33] piscisaureus: actually, what do you think happens when you queue two writes to eof and there is no guaranteed ordering [20:33] piscisaureus: (try it) [20:34] dominic_ has joined the channel [20:34] piscisaureus: so use fs.WriteStream anyhow [20:34] dmcquay2 has joined the channel [20:34] pieterv has joined the channel [20:34] pifantastic has joined the channel [20:35] jonaslund: ok [20:35] jonaslund: hmm [20:35] Aikar: jonaslund: in node the only way youd end up with a handle on 2 threads is if the process forked itself, or you explicitly passed the FD to another process. so under NORMAL conditions it would never happen [20:35] jonaslund: does writestream give me info on my current location [20:35] jonaslund: Aikar: ok, sounds good [20:36] Aikar: if 2 processes open a connection to a server, its 2 seperate handles [20:36] Aikar: they will only be 'shared' if you intentionally do it as part of your apps design (or accidently if using fork) [20:36] broofa has joined the channel [20:37] w0rse has joined the channel [20:37] piscisaureus: jonaslund: no, no offset info [20:37] beta_ has joined the channel [20:38] Aikar: for example, if you want to setup a TCP Server that splits over multiple ports, you could pass the server handle on multiple childs, and a random child can get a new client. but thats a slippery scope to work with [20:38] pifantastic has joined the channel [20:38] Aikar: err splits over multiple processes* [20:38] mayfield_ has joined the channel [20:41] jonaslund: piscisaureus: then it's useless for me since i need to know the position of every write [20:41] piscisaureus: jonaslund: then you need to implement your own stream :-) [20:42] piscisaureus: not terribly difficult I'd guess [20:42] floby has joined the channel [20:42] jonaslund: already done [20:42] floby has left the channel [20:43] cloudhead has joined the channel [20:46] mjr_ has joined the channel [20:46] ph^ has joined the channel [20:49] matyr_ has joined the channel [20:49] Coal has joined the channel [20:50] creationix has joined the channel [20:50] creationix has left the channel [20:51] slaz_ has joined the channel [20:51] slaz_ has left the channel [20:53] admc has joined the channel [20:53] pandeiro__ has joined the channel [20:53] rwhitby has joined the channel [20:54] TobiasFar has joined the channel [21:00] Gruni has joined the channel [21:03] matyr has joined the channel [21:03] sholmes has joined the channel [21:04] sholmes: hi [21:04] kristsk: hello [21:04] sholmes: so why do does the app.configure method except a callback and not a array in express? [21:04] sholmes: kristsk: :D [21:04] softdrink has joined the channel [21:05] kristsk: no idea, sorry [21:05] jimt has joined the channel [21:05] sholmes: kristsk, have you ever used express.js? [21:05] kristsk: nope [21:05] tjholowaychuk: sholmes: array? [21:05] fly-away has joined the channel [21:05] tjholowaychuk: why would it take an array [21:06] Aikar: scoates: so you can do other things like conditionals etc in it [21:06] davida_ has joined the channel [21:06] tjholowaychuk: oh [21:06] sholmes: tjholowaychuk, because it seems like all the callback does is call app.use multiple times. [21:06] Aikar: its more flexible [21:06] tjholowaychuk: sholmes: yeah, it is far more flexible.. [21:06] sholmes: oh, I see. [21:06] tjholowaychuk: JUST passing some middleware is.. not so useful [21:07] sholmes: so what is the scope of the .use method? [21:07] sholmes: I mean.. [21:07] sholmes: .configure [21:07] davidascher has joined the channel [21:07] Aikar: sholmes: you can do like app.configure('production', function() { } and that code only runs when the environment variable is production [21:07] Aikar: so you can run other code in there too [21:07] sholmes: hmm [21:07] tjholowaychuk: sholmes: i think you are missing the point [21:07] tjholowaychuk: if you have a very basic app you dont need it at all [21:07] tjholowaychuk: however if you have a staging env, you want things different than production [21:08] tjholowaychuk: likewise with test and development [21:08] tjholowaychuk: based on NODE_ENV [21:08] sholmes: hmm. In other words it's a way to separate code into different environments? [21:08] scoates: Aikar: ? was that meant for sholmes? [21:08] Aikar: yeah sorry [21:09] Aikar: s hits you first lol [21:09] tjholowaychuk: sholmes: yeah [21:09] tjholowaychuk: even additional routes if you really wanted [21:09] tjholowaychuk: anything [21:09] sholmes: If I didn't have multiple environments I could just skip the .configure and just put the app.use function calls somewhere at the top of my script [21:09] dominic_ has joined the channel [21:09] Aikar: yes [21:09] tjholowaychuk: yup [21:09] d3x7r0 has joined the channel [21:10] Aikar: but what does it really hurt to wrap it with app.configure for consistency state [21:10] sholmes: what do you mean by additional routes? [21:10] Aikar: its 2 extra lines :P [21:10] sholmes: Aikar, ture. [21:10] tjholowaychuk: ACTION headdesk [21:10] sholmes: s/ture/true [21:10] tjholowaychuk: jk :) lol [21:10] sholmes: haha. [21:10] tjholowaychuk: i dont have a desk [21:10] d3x7r0: Hey guys quick question: what should I use to send mails with node? NPM gives me 4 different options... [21:10] sholmes: yeah, I'm on my couch atm. [21:10] sholmes: :P: [21:11] Aikar: sholmes: you know how you do app.get(); you can do app.get inside of app.configure('development' that only exists when in dev [21:12] sholmes: so how do you use app.configure for different routes? [21:12] devinus: wtf [21:12] Aikar: ^ [21:12] devinus: why does strict mode disable octal numbers? [21:12] sholmes: oh [21:12] mrtrosen has joined the channel [21:12] Aikar: devinus: i dunno, sounds like a stupid idea to me [21:12] sholmes: so I just put the .get, .post, etc. inside the configure callback [21:12] nilcolor: anybody, does Connect responce to OPTIONS requests? Say cross-domain AJAX/POST? [21:12] jimt_ has joined the channel [21:13] devinus: Aikar: seriously.... [21:13] Aikar: sholmes: yep, im pretty sure its ran synchronously, so its a simple way of doing (if environment == production then func(); [21:13] bradleymeck: nilcolor, you would need to implement a CORS middleware, i think i have one lying about [21:13] Aikar: devinus: i meant the idea of removing octals is stupid [21:13] bradleymeck: tj, pirates vs ninjas? [21:13] devinus: Aikar: that's what i mean too [21:13] tjholowaychuk: ninjaaa [21:13] randy-_ has joined the channel [21:13] Aikar: devinus: imo im just never going to use strict, when strict makes your life harder for no real gain, screw it ;) [21:14] nilcolor: bradleymeck: umm... ok. i have one too ;) Something like this: https://gist.github.com/816580 but in form of middleware. [21:14] tjholowaychuk: yeah what is the logic behind removing octal support [21:14] tjholowaychuk: so lame [21:14] bradleymeck: it removes the blocks on TCO except stack traces [21:14] Aikar: write good working code, and ensure it works, then who cares if it follows strict guidelines [21:15] tjholowaychuk: bradleymeck: what does? [21:15] devinus: plus i think i heard crawford say that strict mode disables arguments.callee [21:15] devinus: lame >.> [21:15] bradleymeck: strict mode, removing caller/callee [21:15] bradleymeck: devinus, arguments.callee is fail, pls name your functions [21:16] devinus: bradleymeck: i only use it when it's an anon fn [21:16] stephen_mcd has joined the channel [21:16] devinus: which is rarely, since i don't trust any other engine but v8 and nitro and be okay with that [21:16] bradleymeck: exactly, dont use anon fns, onData in a stacktrace > anonymous in a stack trace [21:17] sholmes: now what is the environmental variable? Excuss me if this is a very novice question, but I'm new to this kind of thing. [21:18] nook has joined the channel [21:18] tjholowaychuk: sholmes: http://en.wikipedia.org/wiki/Environment_variable [21:18] bradleymeck: its a state sholmes, not a real variable, could be from a config / process.env / etc [21:19] jamesarosen has joined the channel [21:19] sholmes: ah, so it's an OS thing [21:20] ryah: node is calling getcwd() too much. [21:20] svens has joined the channel [21:20] bosky101 has joined the channel [21:20] ryah: we should cache it [21:20] ryah: isaacs: [21:20] ryah: getcwd("/home/ryan/src/Socket.IO-node/example", 4096) = 38 [21:20] ryah: lstat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 [21:20] ryah: lstat("/home/ryan", {st_mode=S_IFDIR|0700, st_size=20480, ...}) = 0 [21:20] ryah: lstat("/home/ryan/src", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0 [21:21] ryah: lstat("/home/ryan/src/Socket.IO-node", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 [21:21] ryah: lstat("/home/ryan/src/Socket.IO-node/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 [21:21] ryah: lstat("/home/ryan/src/Socket.IO-node/lib/socket.io", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 [21:21] ryah: lstat("/home/ryan/src/Socket.IO-node/lib/socket.io/transports", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 [21:21] ryah: lstat("/home/ryan/src/Socket.IO-node/lib/socket.io/transports/xhr-polling.js", {st_mode=S_IFREG|0644, st_size=2377, [21:21] ryah: ^-- why is it doing this? [21:21] bosky101: hi, whats the best way of getting querystring while the url is also posted [21:21] cjm has joined the channel [21:21] sholmes: O.o is it just me or is that flooding? [21:21] jimt has joined the channel [21:22] tjholowaychuk: sholmes: he wrote node he can do whatever he wants haha [21:22] ryah: flooding is allowed. [21:22] isaacs: ryah: not sure, but that does seem like a bug. [21:22] isaacs: ryah: oh, realpath, most likely [21:23] ryah: man. [21:23] zzak: RYAH: Y U FLOOD OWN CHANNEL [21:24] Ond has joined the channel [21:24] creationix has joined the channel [21:24] torvalamo: because flooding is allowed [21:24] mscdex: node.js rules! [21:24] eee_c1 has joined the channel [21:24] isaacs: i don't suppose there's any way to do realpath without doing tons of lstats? [21:24] zzak: mscdex++ [21:24] v8bot: zzak has given a beer to mscdex. mscdex now has 3 beers. [21:24] rjrodger: posting this again - the new Agent stuff in http.js seems to have an issue when the socket goes into an error state. For e.g. DNS failure. The bad socket seems to prevent the Agent from performing anymore requests [21:24] creationix: anyone in here want to discuss the http header patch I'm working on? [21:25] sholmes: what if the $NODE_ENV clashes with another program? [21:25] edw has joined the channel [21:25] bradleymeck: the pre writeHead patch? [21:25] blaines has joined the channel [21:25] swistak has joined the channel [21:25] tjholowaychuk: creationix: did no one else patch that when it was on the mailing list? [21:26] isaacs: sholmes: you can also sent environs for just one command. FOO=bar node -e 'process.env.FOO' [21:26] rjrodger: fix seems to be to clean up everything in the error event handler, but I have no idea if this is the right approach :) [21:26] Anti-X has joined the channel [21:26] tjholowaychuk: creationix: the only question really is what to do with the multiples [21:27] creationix: bradleymeck: right [21:27] creationix: tjholowaychuk: yeah, I want to support multiple headers [21:27] tjholowaychuk: of course [21:27] sholmes: isaacs: a sort of environment variable scope? [21:27] rjrodger: I don't really want to generate a spurious pull request so seeing what you guys think... [21:27] creationix: tjholowaychuk: I think just add a third parameter to setHeader like PHP does [21:27] creationix: seems like a sane approach [21:27] sh1mmer has joined the channel [21:28] brianc: wink_: which version of node you using node_postgres with? I starting to play with it and is no worky for me on v0.3.8 [21:28] creationix: and I have a fairly efficient implementation in mind for it [21:28] isaacs: sholmes: yeah [21:28] sholmes: cool [21:28] creationix: I really want to put first-class cookie setting in too, but I'm not sure it will be accepted [21:28] tjholowaychuk: creationix: they do it weird though, false to PREVENT multiples [21:28] tjholowaychuk: i think it should be the other way [21:28] isaacs: sholmes: also, environs are only within a single shell's scope. so, if you *source* a file, it'll get dumped in your current scope, but if you just *run* a file, it'll be in a subshell [21:28] creationix: tjholowaychuk: default to overwriting is best I think [21:28] Evet has joined the channel [21:29] isaacs: sholmes: ie, you might have do-environy-stuff.sh that does: "export FOO=bar" [21:29] tjholowaychuk: creationix: yup [21:29] creationix: multiple headers is the exception, not the norm [21:29] wink_: brianc: im still on the 0.2 branch [21:29] tjholowaychuk: not sure why they default the other way around [21:29] rwhitby has joined the channel [21:29] isaacs: sholmes: if you do `source do-environy-stuff.sh` then it'll set FOO=bar in your curren env. [21:29] tjholowaychuk: but i guess it is php [21:29] wink_: i cant move my production stuff to 0.3 yet, still too much shit changing :P [21:29] isaacs: sholmes: if you do `sh do-environy-stuff.sh` or `./do-environy-stuff.sh` then it'll just be restricted in that subshell [21:29] chris6F has joined the channel [21:29] ryah: the infinite numbers of stat() calls is annoyin [21:29] sholmes: isaacs, what is *sourceing* a file? [21:29] creationix: wink_: wait a day or two [21:29] wink_: ACTION taps foot [21:29] brianc: wink_: I get "terminated by signal 11" when I try to connect. :( *tears* [21:29] creationix: wink_: also my header changes are 100% backwards compatable [21:30] isaacs: sholmes: the "source" shell command, aka "." [21:30] altamic has joined the channel [21:30] wink_: creationix: ?? [21:30] isaacs: . ~/.bashrc to re-load your bashrc file, for instance [21:30] wink_: what header changes :p [21:30] creationix: oh, then nevermind [21:30] tjholowaychuk: wink_: progressive api for headers [21:30] wink_: ahh [21:30] hornairs has joined the channel [21:30] tjholowaychuk: wink_: setHeader n crap instead of only writeHead() [21:30] isaacs: ACTION <3 bash [21:30] creationix: tjholowaychuk: maybe I'll do cookies as a separate patch [21:30] rjrodger: the code: https://gist.github.com/817293 [21:30] creationix: so it doesn't block the first patch in case ryah doesn't like it [21:30] tjholowaychuk: creationix: yeah might as well [21:31] wink_: yeah, i've still got to go and fix up all my sys.xxx stuff [21:31] jimt_ has joined the channel [21:31] isaacs: ryah: yeah, that kinda sucks [21:31] isaacs: ryah: there should be a flag to fs.realpath to tell it to use cached "is this thing real" info [21:31] ryah: isaacs: https://gist.github.com/817298 [21:31] wink_: im gonna wait a bit, none of the 0.2 deficiencies effect me (ssl, etc) so im staying where im at for now :p [21:32] ryah: isaacs: this is what loading socket.io's example looks like [21:32] creationix: wink_: seriously, 0.4 will be out soon, then you can decide what to use [21:32] wink_: fair enough [21:32] isaacs: ryah: i see this. [21:32] wink_: im patient :p [21:32] isaacs: ryah: or we could just toss out the realpathing stuff. [21:32] dmcquay has joined the channel [21:32] creationix: ryah: if I put a minimal cookie api in my patch would you take it? [21:32] isaacs: ryah: npm isnt' going to use symlinks in Future. [21:32] creationix: just for setting cookies [21:33] sholmes: what's a subshell? [21:33] ryah: creationix: no [21:33] ryah: it's a slipper slope [21:33] isaacs: sholmes: http://www.gnu.org/software/bash/manual/bashref.html#What-is-a-shell_003f [21:33] creationix: yeah, it's a tough call [21:33] zzak: cookies are so bleh [21:34] isaacs: sholmes: i'm not trying ot be rude. seriously, you should read that whole document if you use bash. it's really informative and interesting. [21:34] creationix: it is kosher for third party modules to monkey patch [21:34] yozgrahame has joined the channel [21:34] colinclark has joined the channel [21:34] isaacs: sholmes: bash is a wonderful and fascinating language. it's rare that languages are so ruthlessly optimized for a specific use-case. [21:34] creationix: I'm fine with cookies being a third-party module, I'm just worried it's not possible to have the right api with an external module [21:34] sholmes: isaacs: No worries. I definitely feel I like I shoudl too, especially when half the stuff you are saying is going over my head. haha [21:35] nonnikcam has joined the channel [21:35] creationix: ryah: what about mutiple headers with the same key. I think that's really important [21:36] jimt has joined the channel [21:36] creationix: I'll propose my API as soon as I'm sure it's easy to implement [21:36] creationix: but I'm pretty sure it will work fine with the existing stuff [21:37] mscdex: delicious cookies! [21:37] eric_ie has joined the channel [21:38] isaacs: cookies are delicious delicacies [21:38] ryah: isaacs: yes, it's realpath [21:38] eee_c has joined the channel [21:38] ryah: still getcwd'ing twice [21:39] jdrannbauer has joined the channel [21:39] ryah: check this out [21:39] ryah: getcwd("/home/ryan/src/Socket.IO-node/example", 4096) = 38 [21:39] ryah: getcwd("/home/ryan/src/Socket.IO-node/example", 4096) = 38 [21:39] ryah: getcwd("/home/ryan/src/Socket.IO-node/example", 4096) = 38 [21:39] ryah: getcwd("/home/ryan/src/Socket.IO-node/example", 4096) = 38 [21:39] ryah: getcwd("/home/ryan/src/Socket.IO-node/example", 4096) = 38 [21:39] ryah: getcwd("/home/ryan/src/Socket.IO-node/example", 4096) = 38 [21:39] ryah: stat("/home/ryan/src/Socket.IO-node/support/socket.io-client/lib/io", 0x7fff1e6cc820) = -1 ENOENT (No such file or d [21:39] ryah: stat("/home/ryan/src/Socket.IO-node/support/socket.io-client/lib/io.js", {st_mode=S_IFREG|0644, st_size=923, ...}) = [21:39] ryah: open("/home/ryan/src/Socket.IO-node/support/socket.io-client/lib/io.js", O_RDONLY) = 5 [21:39] ryah: professional [21:40] Anti-X: that's [21:40] Anti-X: er [21:40] Anti-X: something [21:40] Anti-X: amirite?!? [21:42] Nevtus_ has joined the channel [21:42] ryah: can realpath() work on relative paths? [21:43] ryah: e.g. if i do require("deps/blah"); it only stats deps/ and deps/blah [21:43] ryah: ./deps/blah [21:43] ryah: that would be much better [21:45] dominic_ has joined the channel [21:45] torvalamo: who are you and what did you do to ryan? [21:45] isaacs: ryah: well, fs.realpath doesn't work that way atm. but i don't see why it couldn't be made to. [21:46] isaacs: ryah: fs.realpath is 100% js. it's not like there's much need to comply with some builtin posix thing or anything. [21:46] piscisaureus: ryah: is getcwd so bad? [21:46] isaacs: we could easily say "don't go above X" [21:46] ryah: piscisaureus: did you do this? [21:46] ryah: var paths = [process.cwd()].concat( [21:46] piscisaureus: likely [21:47] isaacs: yeah, path.resolve [21:47] torvalamo: lol [21:47] jchris has joined the channel [21:47] ryah: *wrath* [21:47] torvalamo: that's a sexy piece of code [21:47] isaacs: process.cwd() should cache the result and only invalidate the cache when you call process.chdir() [21:47] isaacs: it's not like there's any other vector to change the cwd within the node program, is there? [21:47] ryah: what if a binding chdirs ? [21:47] piscisaureus: no not at all [21:47] piscisaureus: ah :-( [21:47] isaacs: ryah: well, then the binding is bad :) [21:48] tim_smart has joined the channel [21:48] isaacs: ryah: i mean, what if a binding does blocking io? if you're writing c++ you should be smart. [21:49] ryah: alright, i'm going to cache the cwd. [21:49] piscisaureus: what if the binding fries innocent kids in hot oil [21:49] wink_: delicious [21:50] isaacs: npm install node-frybaby [21:50] brianc: lol [21:50] piscisaureus: supported only on fryBSD [21:50] ryah: we could ptrace for chdir() calls [21:50] ryah: (not reall) [21:50] isaacs: piscisaureus: LOL! [21:51] piscisaureus: ryah: we could also make that piece of code a little smarter so it only calls cwd if it really needs to [21:51] ryah: piscisaureus: that would be better [21:51] ryah: how ? [21:51] piscisaureus: e.g. don't if the path is already absolute [21:51] ryah: okay [21:51] ryah: i don't think that's going to fix it though [21:52] piscisaureus: otherwise cache cwd [21:52] piscisaureus: just like process.env [21:52] Ond: i.e. don't if the path is already absolute* [21:52] ryah: i say we do cache the chdir and wait let that horrible bug lay for some unsuspecting module author [21:52] pifantastic has joined the channel [21:52] isaacs: piscisaureus: if cwd is cached, it should be cached by process.cwd(), imo [21:52] isaacs: piscisaureus: otherwise, calling process.chdir() won't change the path.resolve() default [21:52] wink_: ryah: you know that's what is in store :p [21:52] ossareh has joined the channel [21:52] jonaslund: hmmm [21:52] wink_: some poor bastard is gonna pull their hair out over that one [21:53] jonaslund: with a high probability it won't be the unsuspecting module author who gets hits by a potential chdir bug [21:53] piscisaureus: isaacs: no I meant just drop cwd as a function call, make it a magic property like process.ENV [21:53] wink_: but thats what documentation is for [21:53] ryah: addon author, i should say [21:53] pifantastic has joined the channel [21:53] jonaslund: piscisaureus: i did that change compiler preference change test (didn't have much time) and it blew up since it seems that there's files missing for msvc now or something alike [21:54] ryah: bound librarys should not be chdir-ing [21:54] isaacs: ryah: i've been stimulating a crisis of faith on the realpath() moduel thing. [21:54] isaacs: ryah: also, +1 on not chdir'ing except via process.chdir() [21:54] jonaslund: ryah: there's a huge chance the addon author won't notice such a bug himself but someone using that addon :( [21:54] isaacs: or at least, if an addon does that, then it invalidates process.cwd(), and oh well. bug. [21:54] isaacs: easy to documnet. [21:55] isaacs: and when you do run into that bug (if it ever happens, *ever*, which is debatable) it's easy to find and fix. [21:55] felixge has joined the channel [21:55] felixge has joined the channel [21:55] wink_: any binding would have a hard case to make for chdir'ing down in the guts [21:55] isaacs: the *first* thing i'd do if i found that chdir doesn't work is process.chdir.toString(), and i'd see the caching [21:55] dominic_ has joined the channel [21:55] jonaslund: why does this getcwd stuff get called so often ? [21:55] isaacs: jonaslund: because path.resolve calls process.cwd() [21:56] jonaslund: isaacs: I'm still a bit fresh on node internals.. path.resolve is used by ? [21:56] necromancer has joined the channel [21:56] wink_: it seems like it'd be pretty bad form to change cwd out from under a user without being pretty explicit about it [21:56] isaacs: jonaslund: require() [21:56] wink_: can you guys provide a mechanism to invalidate/recache? [21:56] piscisaureus: ryah: isaacs: something like this - https://github.com/piscisaureus/node/commit/ce245d8bc195c1f3d57f736fafda47da6975ae7f [21:57] c4milo has joined the channel [21:57] wink_: seems that'd solve the issue along with some documentation [21:57] jonaslund: isaacs: err.. wouldn't it be better if a module, once loaded would keep it's realpath and do manual resolving inside the module cache instead of going to the outside for stuff like that ? [21:57] jonaslund: or.. if people just re-used their module references [21:57] ryah: piscisaureus: let me tyr that and see if it fixes [21:57] piscisaureus: ryah: ok [21:58] piscisaureus: ryah: don't land tho, must fix the windows part of it [21:58] isaacs: jonaslund: it does, but then you do require("something-else") [21:58] isaacs: etc. [21:58] jonaslund: still.. shouldn't that be mostlt when initializing ? [21:58] Sebmaster has joined the channel [21:58] ryah: piscisaureus: that definitely help [21:58] isaacs: jonaslund: startup time matters, sadly [21:58] isaacs: ryah: let's rip out realpath() from require, what do you say? [21:58] piscisaureus: naais [21:59] ryah: piscisaureus: here it is with your patch [21:59] isaacs: caveat symlinker [21:59] ryah: https://gist.github.com/817355 [21:59] ryah: (also with realpath ripped out) [21:59] ryah: (search for 'getcwd') [22:00] jonaslund: isaacs: hmh... would getcwd hurt that much during initialization [22:00] isaacs: jonaslund: extra crap is extra. [22:00] isaacs: :) [22:01] piscisaureus: ryah: better, though I don't really know what the targets are... getcwd slowth never has hurt me actually [22:01] jimt has joined the channel [22:01] ryah: i'm not worried about the speed [22:01] ryah: i just don't want it to be stupid [22:01] piscisaureus: ok well [22:01] isaacs: it's about esthetics. [22:01] piscisaureus: I'll polish the patch for you [22:01] isaacs: node should be beautiful and sparse. [22:01] isaacs: like a haiku, or an xkcd cartoon. [22:01] saschagehlich has joined the channel [22:02] Twelve-60 has joined the channel [22:02] ryah: piscisaureus: thanks [22:02] ryah: let me run that without the realpath ripout [22:02] jonaslund: a certain amount of crap is kinda unavoidable when you map one model to another one though [22:02] ryah: okay, it's the same [22:03] ryah: yeah, let's just do the piscisaureus patch instead of caching cwd [22:04] Jaye has joined the channel [22:06] jonaslund: If i'm not entirely incorrect java just did away with cwd, let you handle paths manually and let the filesystem stuff work on absolutes [22:09] TobiasFar has joined the channel [22:10] jonaslund: (Yes java isn't the ideal model for everything but the notion of cwd kinda breaks down in the face of multiple contexts.. being threads or whatever in a web environment) [22:10] hasenj has joined the channel [22:11] ossareh has joined the channel [22:11] jonaslund: piscisaureus: btw did i mention that i tried selecting msvc ? [22:12] bradleymeck: jonaslund, idk, the ability to move child processes around with cwd is useful for spawning workers that need their own space [22:12] piscisaureus: jonaslund: did it work? [22:12] jonaslund: piscisaureus: nope.. it started looking for some windows specific python file in there. maybe that file has been removed from the checked in waf version or something ? [22:13] piscisaureus: :-S [22:13] piscisaureus: bleh [22:13] piscisaureus: I don't no, it wasn't mee, should check the commitlog to find out [22:13] jonaslund: bradleymeck: then you should be able to set the new cwd of the spawned process, not modify the current one. [22:13] piscisaureus: what file was it btw? [22:13] jonaslund: w8 a sec [22:13] matyr_ has joined the channel [22:14] piscisaureus: ryah: https://github.com/piscisaureus/node/commit/a067311a823c57b1fc4d37ea8deb5a41b76bd079 [22:15] dominic_ has joined the channel [22:15] piscisaureus: ryah: something different: https://github.com/piscisaureus/node/commit/8f5e9f14064594e2746afa52282a5117c773733e [22:15] edfuh has joined the channel [22:15] danielzilla has joined the channel [22:15] bradleymeck: jonaslund, it seems odd to me to be able to set cwd of a child and not yourself, it presents a bias to a coding style, that means the parent must find the proper resources rather than allow the child to resolve them itself [22:16] jonaslund: bradleymeck: if we care about atheistics then i guess the choices is to do away with being able to change the cwd or keep it and make sure that sensitive stuff gets it properly at a small speed penalty [22:16] techwraith has joined the channel [22:17] jonaslund: bradleymeck: I'm not saying that either choice is perfect, the java choice was probably made out of a writeonce-runeverywhere necessity [22:17] pauls has joined the channel [22:18] jonaslund: and it makes a lot of sense in a threaded environment [22:18] bradleymeck: true, hard choice, im just pointing out its use and the problems choosing to limit it :-/ descisions are tough [22:18] brianc: let's go shopping [22:19] jonaslund: bradleymeck: if developer productivity is proportional to the number of developers.. then java usage becomes sane since the productivy decrease is smaller when you add more people. (partly because they aren't productive to begin with and partly because java shields you from others) [22:19] kristsk: huh. i have to come with a simple test task for a new employee to test his aptitude with node.js in general. [22:19] kristsk: any wild ideas ? [22:20] jonaslund: we're not doing java and i belive most here don't belive in adding people being the solution to everything [22:20] pauls: kristsk: have him come up with the test [22:20] pauls: lol [22:20] kristsk: mhh [22:20] shapeshed has joined the channel [22:20] bradleymeck: kristsk, a recursive iteration of some tree structure given asyncronously! [22:20] brianc: kristsk: write a web server which responds with "hello world" write a web client to fetch the response, use expresso, vows, or the assert module to verify the server's response from the client. script should execute and exit back to the process (i.e. close request and server correctly) [22:21] kristsk: he will have about 90 minutes for it [22:21] bradleymeck: skill level expected? [22:22] kristsk: general understanding of asynchronity, redis, npm tidbits [22:23] shapeshed has left the channel [22:23] jonaslund: if someone passes bradleys example they should be able to do most things [22:23] yozgrahame has joined the channel [22:23] jonaslund: and you could make it very specific and defined [22:23] kristsk: problem with expresso and vows is that i have not used those [22:23] jonaslund: and yet show most aptitude [22:24] trotter_ has joined the channel [22:24] jonaslund: kristsk: a question, how do you find your potentials ? [22:27] kristsk: as in "mine" ? [22:27] kristsk: or as in "potetnial employee" ? [22:27] jonaslund: the employee [22:27] kiddphunk has joined the channel [22:28] kristsk: we placed an advert in local social network [22:28] jonaslund: maybe start with something alike fizbuzz? :) [22:28] kristsk: asking for ssjs knowledge [22:29] kristsk: uff. [22:29] kristsk: i think i will go with somthing like this: [22:29] kristsk: make a simple tasklist web server using redis as a storage (add task, remove task, list tasks, update task) + write client for this as a module [22:30] bradleymeck: as long as he uses redis shouldnt be bad [22:30] zomgbie has joined the channel [22:30] kristsk: well even if he hasn't used it before, general idea is quite simple imho [22:31] kristsk: memcache experience will suffice in any case [22:31] kristsk: (i think he mentioned memcache in resume) [22:31] kristsk: well, not in ANY case, but in for starters. [22:32] sriley has joined the channel [22:32] EyePulp: is this something they have web access during, or must they write entirely from memory? [22:33] edw has joined the channel [22:33] kristsk: ther will be web access [22:33] EyePulp: that's decent of you [22:33] kristsk: but i will grill him after coding [22:34] zzak has joined the channel [22:35] techwraith: In my opinion, not allowing web access during this kind of thing will only make the candidate feel more pressure than is needed. It doesn't reflect real world conditions at all. [22:35] bart2 has joined the channel [22:35] mikeal has joined the channel [22:35] hosh_work has joined the channel [22:35] kristsk: there is no reason to disallow web [22:35] jonaslund: yes, disallowing web access for anything non-trivial is just silly [22:36] dominic_ has joined the channel [22:36] jonaslund: (if you get a bunch of recruits from a recruiter you might want to start with fizzbuzz) [22:36] kristsk: no, just one [22:36] Sebmaster: i think you should rebuild a real world example for a job review [22:36] kristsk: will look into fizzbuzz though [22:36] Sebmaster: or a real world situation [22:36] jonaslund: kristsk: just stating a case where web-access might be cut off [22:36] jonaslund: kristsk: It's a really simple test to make sure that your recruit can atleast program [22:36] sriley: everyone must know fizzbuzz and its variations by now :) [22:37] kristsk: well, he can programm, resume is quite solid [22:37] jonaslund: sriley: well if they're competent enough to write it without web access there is atleast hope [22:37] dmcquay has joined the channel [22:38] jonaslund: i've had some really bad idiots pass by through the years [22:38] kristsk: and "at least programm" wil not cut it this time [22:38] jonaslund: it all depends on the place you're at, and most of the time it's almost impossible to get good people around here [22:39] aguynamedben has joined the channel [22:39] kristsk: well, this is a niche here too. [22:39] cjm has joined the channel [22:39] softdrink has joined the channel [22:39] langworthy has joined the channel [22:39] jonaslund: yes and you might have less noise and some people actually interested in trying stuff [22:40] jonaslund: my brother has been a erlang programmer (and consultant at times) for the last 10 or so years [22:41] Ratty_: I've never met a real life erlang programmer [22:41] kristsk: erlang is somthing i am looking forward to try [22:41] JojoBoss has joined the channel [22:41] aguynamedben_ has joined the channel [22:41] wink_: thats because the telco's hide them in dungeons [22:41] kristsk: hh [22:41] jonaslund: one of swedens biggest web-payment providers is written in erlang [22:42] jonaslund: my brother works in telecomms though, started at ericsson with erlang very early but now works at some company doing auto-configuration for cellphones [22:43] jonaslund: (detecting phone models and sending out a proper settings file for the particular model) [22:43] jonaslund: apperantly it's so unstandardized that you can run a big business on it :D [22:43] kristsk: erlang is exotic enough to have much less noise than even node.js [22:43] jonaslund: yes, lots of people who "knows JS" [22:43] floby has joined the channel [22:44] creationix: wow, supporting multiple headers with the same name causes a lot of complication [22:44] creationix: what were they thinking when they made HTTP? [22:44] jonaslund: i've really tried to dislike erlang but nothing about he runtime model is really "bad" (if you consider the reasons for them) [22:44] wink_: "gopher blows...." [22:44] brianc: wink_: ha! [22:44] bradleymeck: creationix, that people would use the comma syntax [22:44] techwraith: creationix: I think @mde wrote a patch that handles them... [22:44] bradleymeck: its in the spec lol [22:44] techwraith: not sure though [22:45] jonaslund: creationix: why not just wrap in an array if you get multiple headers and write out multi-headers if you set an array instead of a string ? [22:45] creationix: right, but some use cases require mutiple headers in a specified order [22:45] floby has left the channel [22:45] creationix: like certain kinds of authentication [22:45] bradleymeck: in the time before time you only had basic auth and ssl [22:46] creationix: jonaslund: the API isn't hard, the hard part is implementing it as efficiently as possible. It's important that node is blazing in retarded synthetic benchmarks [22:46] mAritz has joined the channel [22:47] creationix: if (variable === undefined) is really fast right? [22:47] jonaslund: creationix: 1: when parsing, do a specific case if the specific header has already been encountered (shouldn't add much overhead) and when writing out headers just to a type-check [22:47] bosky101 has left the channel [22:48] creationix: jonaslund: yeah, that's what I'm doing, but it's 3-times the code of my initial implementation that didn't support mutiple headers [22:48] jonaslund: creationix: how much of that extra code is never executed if only singular headers are used ? [22:49] felixge_ has joined the channel [22:49] felixge_ has joined the channel [22:49] creationix: jonaslund: maybe 1/2 to 1/3 [22:49] creationix: the if statements get executed regardless [22:49] Epeli has joined the channel [22:49] creationix: a lot of the extra code is if statements and braces [22:50] creationix: so it's not really that expensive [22:50] creationix: yay for JIT [22:50] jonaslund: creationix: and testing once per header line isn't that much really [22:51] jarfhy has left the channel [22:51] creationix: no, it's not bad, I'm just being careful because these functions can be called 10,000 times per second in some servers [22:51] creationix: every small cost adds up at that scale [22:51] ryanfitz has joined the channel [22:52] jpld has joined the channel [22:52] Sebmaster: creationix: micro-optimizations can make up for that^^ [22:54] kristsk: dear lord how i hate openoffice [22:55] dnyy has joined the channel [22:57] sholmes: So bash is a full on programming language? And this language is the same language used in the command-line? [22:57] syntheze: yep [22:57] syntheze: at least at the bash cmd [22:58] BillyBreen: unix don't play, holmes [22:58] sholmes: syntheze, you mean at least in a terminal that supports bash? [22:59] sholmes: that is to say, MS-DOS isn't bash compatible. [22:59] syntheze: no i mean the bash programming language is the same language used at the bash shell ;-) [23:00] syntheze: dont mix up these terms [23:00] sholmes: so bash is a programming language, and bash shell is a program? [23:00] shaver: the bash shell is like node-repl [23:00] syntheze: msdos is an os, whereas bash is "just" a program [23:01] shaver: msdos : unix :: cmd : bash (roughly) [23:01] sholmes: shaver, I don't know what node-repl is :\ [23:01] CIA-99: node: Bert Belder master * r38d8cd6 / lib/path.js : Don't make unnecessary getcwd calls from path.resolve - http://bit.ly/gnzzaI [23:01] syntheze: command.com at msdos :D [23:01] ryah: piscisaureus: rebase your second patch. [23:02] ossareh has joined the channel [23:02] EyePulp: perhaps a dumb question, but are there any nice utility libs for node (or already adapted) that add features like checking to see if a value is in an array? [23:02] sholmes: syntheze: haha. They make toilets too. Makes sense. [23:02] creationix: EyePulp: Array.prototype.indexOf [23:02] syntheze: EyePulp, indexof? [23:02] syntheze: like in common JS [23:03] creationix: indexOf is implemented in V8 as part of ES5 [23:03] EyePulp: indexOf is built in already? [23:03] EyePulp: doh [23:03] syntheze: check it out [23:03] EyePulp: as I said - a dumb question [23:03] creationix: s/dumb/easy/ [23:03] EyePulp: thanks for the head's up... [23:03] piscisaureus: ryah: https://github.com/piscisaureus/node/commit/5eda7921b7402a1bec3450d6587ed47fb4115a88 [23:03] mikeal has joined the channel [23:03] EyePulp: ACTION goes to brush up on ecma [23:04] creationix: EyePulp: if you haven't seen it yet, I made this page a while back https://github.com/ry/node/wiki/ECMA-5-Mozilla-Features-Implemented-in-V8 [23:04] [[zz]] has joined the channel [23:04] mjr_: creationix: that page is really handy. It's become one of the best references on the new good stuff in ES5. [23:05] creationix: I wish I could rename it, but then all links to it would break [23:05] creationix: it's mostly ES5 and very little mozilla extensions [23:05] opengeard has joined the channel [23:05] EyePulp: that is a handy read - nice [23:06] jonaslund: hmm isn't indexof older ? [23:06] sholmes: why do bash scripts (or are they called shell scripts?) require a #!/bin/bash line? [23:07] creationix: jonaslund: it might have been in ES3, not sure [23:07] sholmes: is it alright if I ask these questions here? [23:07] kristsk: so exec can know which binary to load [23:07] creationix: sholmes: that's a unix trick to make executables that tell the shell how to execute them [23:07] jonaslund: creationix: seems like it wasn't [23:07] creationix: sholmes: node supports it too even though it's technically a js syntax error [23:08] creationix: it just ignores the first line if it starts with #! [23:08] syntheze: sholmes, its called the shebang line [23:08] sholmes: who did shebang? [23:08] syntheze: unix always shebangs [23:08] syntheze: http://en.wikipedia.org/wiki/Shebang_(Unix) [23:09] saikat has joined the channel [23:10] kristsk: ok, a task has been written. [23:10] syntheze: it is actually a shell feature [23:10] syntheze: supportet by all common shells [23:10] sholmes: ah, so I can use #!/bin/nano to execute the nano command with the contents of the file as the parameter(s)? [23:10] syntheze: right [23:11] syntheze: eh no [23:11] syntheze: not sure [23:11] syntheze: it works [23:12] kristsk: prolly receiving end must know what to do with input from stdin [23:12] creationix: sholmes: right, it's not command-line parameters, but rather the program's input [23:12] syntheze: ah okay, so the file is simply passed through the stdin? [23:13] syntheze: i thought as parameter [23:13] sholmes: hmm, I tried creating a test.txt file with the #!/bin/nano shebang and then following it on the next line is `hello`. When I go to run the file `./test.txt` I got a permission denied error. [23:13] syntheze: sholmes: chmod +x hello [23:13] sholmes: oh right. [23:13] syntheze: you must make it executable [23:14] syntheze: eeh [23:14] syntheze: chmod +x test.txt of course [23:14] creationix: so for header types that support multiple headers, is there ever a need to read back or delete such headers? [23:14] pengwynn has joined the channel [23:15] sholmes: i did that, but now when I'm executing it, it brings up the file in nano. :\ [23:15] creationix: sholmes: I would expect as much [23:15] sholmes: I using this command to execute: `./text.txt` [23:15] syntheze: isn't it what you wanted? [23:15] creationix: it's like nano < test.txt [23:16] creationix: or "echo test.txt | nano" [23:16] sholmes: syntheze, well i wanted nano to open with another file [23:16] creationix: sholmes: then use sh or bash [23:16] syntheze: then [23:16] creationix: #!/bin/sh [23:16] syntheze: #!/bin/bash [23:16] creationix: nano otherfile.txt [23:16] syntheze: grml, too slow :D [23:17] sholmes: hmm, so if I use the #!/bin/nano there no way to pass arguments to that /bin/nano.exe? [23:17] creationix: there is I think [23:17] creationix: #!/bin/nano test.txt [23:17] creationix: all on one line [23:17] creationix: not sure [23:17] sholmes: lemme try [23:17] syntheze: i don't think it will work [23:17] syntheze: this short way [23:18] creationix: if shebang supports argv then it will work, but I've never tried [23:18] sholmes: that seems to work. [23:18] syntheze: ok it wotks [23:18] creationix: and would save you from creating the extra process in the middle [23:18] sholmes: yeah it works, but what I'm wondering now is: what does the rest of the contents of the file mean to the command /bin/bash or /bin/sh? [23:18] rpflo has joined the channel [23:18] syntheze: i think you just playing around, right? otherwise this script is pretty worthless ^^ [23:19] sholmes: if arguments are on the same line as the shebang, then what are the other to the command in the shebang? [23:19] creationix: alias is another way to do this [23:19] syntheze: sholmes, if you puh bash in the shebang, the rest of the file is passed through as script [23:19] creationix: alias openMyStuff="nano /path/to/my/stuff.txt" [23:19] sholmes: for the record I am just playing around to get used to bash stuff. :P [23:19] syntheze: hehe [23:20] creationix: alias is like a macro [23:20] sholmes: but how does the bash program know about the rest of the content; how does it access it? [23:20] syntheze: you could also execute $> bash yourscript.sh [23:20] syntheze: then you wouldn't need a shebang-line [23:20] sholmes: nano must be using the first argument as a means to know which filename to use when saving. [23:20] creationix: sholmes: the shebang line is the same as using that program to open the file [23:21] sholmes: the bash command somehow knows about the rest of the script. [23:21] creationix: so "bash myscript.sh" is the same as "./myscript.sh" if the script has a bash shebang line [23:21] creationix: and "node server.js" is the same as "./server.js" if it starts with "#!/usr/local/bin/node" [23:21] sholmes: oh, and if you called `bash` (without the file argument) the command will open which file? [23:22] syntheze: the file you provide as parameter [23:22] creationix: if you call bash without any arguments, it spawns a new interactive shell [23:22] saikat has joined the channel [23:22] creationix: node does the same thing [23:22] creationix: they are both language interpreters [23:22] creationix: one is javascript, the other is bash script [23:22] sholmes: I think I understand. [23:22] syntheze: you could also use node as your shell :D [23:23] kristsk: heh [23:23] syntheze: but it would be pain in the arse, though :D [23:23] creationix: you could, but it's not as good at being a shell as bash [23:23] torvalamo: nerf'd [23:23] sholmes: in each interpretter there is a way for them to except arguments? [23:23] creationix: sholmes: usually [23:23] creationix: it's up to the interpreter [23:23] kristsk: nighty. [23:23] sholmes: how do I do that in bash? [23:23] creationix: $0 or something arcane like that [23:23] creationix: I don't remember atm [23:23] sholmes: let me give it a shot [23:24] liar has joined the channel [23:25] syntheze: sholmes: http://www.linuxconfig.org/Bash_scripting_Tutorial [23:25] syntheze: no, take this one: http://tldp.org/LDP/abs/html/ [23:25] sholmes: creationix, yeah $0 is actually the command name, but $1 is the first argument. ;) [23:25] dominic_ has joined the channel [23:26] sholmes: ugh, if I read that I'm sure I'll have even more questions. [23:26] syntheze: then one could assume this is a bad manual ;-) [23:26] sholmes: I suppose I will read it though. Just not right now, because I don't have the time to get to deep into bash scripts. I just want a rough understanding of them. [23:26] sholmes: I think I got that rough understanding now. :P [23:27] syntheze: :-) [23:27] syntheze: for a basic usage they all work the same way [23:27] sholmes: except for when creationix mentioned spawning a new shell. I thought the program running on my computer was the shell? [23:27] tim_smart: Google has. [23:27] tim_smart: wrong chat :/ [23:27] syntheze: right, but as i sad, the shell is actually a programm [23:27] syntheze: k [23:28] sh1mmer has joined the channel [23:28] sholmes: the shell is a program; I got that. But when I run the bash command with no arguments, I don't see any new program/processes. :S [23:29] sholmes: wait, I do. :\ [23:29] sholmes: that's weird. [23:29] sholmes: so what do you call the command-line prompty area thingy? [23:29] syntheze: yep [23:29] syntheze: eh [23:29] cilantro has joined the channel [23:30] EyePulp: is the Object.keys() new? [23:30] sholmes: what's the official term just so I know [23:30] EyePulp: (like within the last week?) [23:30] jamesarosen has joined the channel [23:30] syntheze: a shell is your prompty area thingy. when you start a new instance of a shell, you directly enters this shell and a new prompt appears [23:31] syntheze: but tim_smart was right, this is actually the wrong chan for bash ;-) [23:31] sholmes: yeah, this is getting a little to deep than I superficially intended [23:31] wadey: EyePulp: it's there in 0.2.x [23:31] sholmes: I think I'm going to go eat. :D [23:31] syntheze: me too [23:32] sholmes: haha. alright later [23:32] syntheze: i suppose you think too complicated [23:33] sholmes: yeah, I'm very analytical... [23:33] sholmes: which channel is appropriete for these question btw? [23:33] EyePulp: #bash [23:33] syntheze: :D [23:33] syntheze: obviously ^^ [23:33] sholmes: and a sort of node relatied question is: why does node.exe install in /usr/local/bin ? [23:34] sholmes: yes, dur [23:34] syntheze: why not? :D [23:34] syntheze: because this is the location for local applications [23:34] syntheze: (it does not have the extension .exe) [23:34] syntheze: only windows applications do [23:34] torvalamo: deep [23:34] torvalamo: superficial [23:34] torvalamo: make up your mind, man! [23:34] sholmes: syntheze, yeah I'm running windows. :P [23:34] sholmes: torvalamo: :o [23:34] torvalamo: you're conflicted! [23:35] syntheze: cygwin or something? [23:35] sholmes: torvalamo: no, you must be confuzled. [23:35] sholmes: syntheze, exactly cygwin. [23:35] syntheze: sholmes, http://www.comptechdoc.org/os/linux/usersguide/linux_ugfilestruct.html [23:35] syntheze: now i stop googling for other people :-P [23:36] sholmes: haha, alright. I really should take a late lunch. [23:36] sholmes: syntheze, thanks for not flaming my noob ass. :P [23:36] syntheze: haha :D [23:36] prettyrobots has joined the channel [23:37] dominic_ has joined the channel [23:37] sholmes: peace [23:37] mikekelly has joined the channel [23:38] xandrews has joined the channel [23:40] edw has joined the channel [23:42] unomi has joined the channel [23:43] BillyBreen has left the channel [23:44] creationix: ryah: for multiple headers with the same name, do you prefer a user-configurable white-list of header names or a third-parameter to setHeader? [23:46] skm has joined the channel [23:46] cjm has joined the channel [23:47] mjr_: oh man, the classic multiple header debate [23:48] opengeard has joined the channel [23:48] shaver: third-param [23:48] torvalamo: multiple headers are for schizos and trolls [23:49] torvalamo: one cookie ought to be enough for everyone [23:49] tlrobinson has joined the channel [23:49] sonnym has joined the channel [23:50] hornairs has joined the channel [23:51] NuckingFuts has joined the channel [23:52] ryah: creationix: i don't know. don't wnat to think about it right now. give me something minimal :) [23:52] Ratty_: When I publish my npm package, can I get stats on how many downloads its had?? [23:52] robotarmy has joined the channel [23:52] mjr_: ryah has too many https and Windows things to worry about right now. [23:52] jonaslund: ACTION doesn't understand what's wrong with setHeader("blah","honga") vs setHeader("blah",["val1","val2"]) [23:52] isaacs: Ratty_: not at this time, no [23:52] frisk has joined the channel [23:52] Ratty_: Aww shame [23:52] torvalamo: wtf is honga [23:52] Ratty_: Would be nice to see how popular npm is. [23:53] jonaslund: torvalamo: just some swedish for nonsense [23:53] torvalamo: never heard it [23:53] frisk: im having issues w https module in 0.3.8 [23:53] jonaslund: think foo bar [23:53] frisk: end event does not fire [23:53] frisk: is this a known issue? [23:53] ryah: isaacs: btw, bert's patch fixes the multiple getcwds [23:53] ryah: isaacs: so im not going to cache that right now [23:54] ryah: although perhaps we should in the future [23:54] piscisaureus: ryah: you will annoy me once you do because of windows multiple-cwd handling :-p [23:54] dominic_ has joined the channel [23:54] NuckingFuts: Okay, so I'm trying to build 0.3.8 on Cygwin (somebody said it was supposed to work :/). It's getting pretty far, but it's dying at 51/74, and the suggested solution isn't working :V [23:54] isaacs: ryah: kewl [23:54] rauchg_ has joined the channel [23:55] ryah: piscisaureus: more reason not to then. [23:55] mnot has joined the channel [23:55] ryah: ACTION goes back to tls :( [23:55] mnot: was someone talking about multiple HTTP headers? [23:55] rauchg_: i want to be part of a multiple headers debate [23:55] saikat has joined the channel [23:55] piscisaureus: ryah: that's stuff that can be worked around if necessary, but still .. [23:56] piscisaureus: ryah: you landed jonaslund's --static patch? [23:56] ryah: mnot, rauchg_: heh [23:56] ryah: mnot, rauchg_: creationix wants to discuss multiple headers [23:56] kris_ has joined the channel [23:57] jimt has joined the channel [23:57] mnot: ryah, rauchg_, creationix: see http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-12#section-3.2 [23:57] zzak: creationix: did you get into reddirt? [23:58] Me1000 has joined the channel [23:58] MikhX has joined the channel [23:59] isaacs: ryah: our masters' HEADs are almost the same now :) [23:59] isaacs: ryah: my only floating patches now are repl tweaks. we should really figure out a way to eaily configure it external to node-core code, i think.