[00:00] polotek: yeah I get the point. I'm saying new people will not [00:00] jashkenas: Is the naming of "super_" up for debate at all? [00:00] polotek: not necessarily [00:00] jashkenas: It would be nice to have a convention for that. [00:00] jashkenas: trailing underscore seems a bit arbitrary. [00:00] micheil: polotek: how about when you first use the word `constructor` you link to.. [00:00] bnoordhuis: can we make the grandparent superduper_? [00:01] sudoer has joined the channel [00:01] micheil: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/constructor [00:01] polotek: bnoordhuis: no, it's clearly supersquared_ [00:01] italic has joined the channel [00:01] polotek: micheil: I like that [00:02] polotek: util.inherits(constructor, superConstructor) [00:02] polotek: how about that? [00:02] micheil: yeah [00:02] micheil: there's really no need for the Func in there. [00:03] polotek: micheil: is there some kind of theme running through the docs in terms of examples? [00:03] polotek: I'm not married to the Cat [00:03] polotek: haha. I'm not married to the idea of the Cat [00:03] micheil: polotek: not really, I'd just say use something that people might actually do, eg: [00:04] micheil: Server inherits from EventEmitter [00:04] micheil: (you could even pull examples from the node source code) [00:04] polotek: micheil: yeah, I thought about that [00:04] polotek: the problem is that this is documentation [00:05] drostie has joined the channel [00:05] polotek: net and http are too complex to be using in examples here in my opinion [00:05] micheil: util.inherits(MyServer, events.EventEmitter); [00:05] polotek: unless you're talking about those things specifically [00:05] micheil: or something [00:05] micheil: because that's when people will be inheriting stuff, usually. [00:05] rchavik has joined the channel [00:05] rchavik has joined the channel [00:05] micheil: it'll be on a constructor to a client, server, or stream [00:08] saschagehlich has joined the channel [00:14] ajcates_ has joined the channel [00:17] nbqx has joined the channel [00:19] polotek: micheil: okay, I've got a basic stream example instead [00:19] polotek: any more input on how to describe super_? [00:19] micheil: okay, cool [00:19] micheil: not really, just show that console.log(myStream.super_ == Stream) or something [00:21] AAA_awright_ has joined the channel [00:21] polotek: https://github.com/polotek/node/blob/miksago/doc/api/util.markdown [00:23] Fenda: SubStack: hi, did you write up an example in dnode yesterday? can't find it in my logs [00:25] polotek: micheil: added constructor link too. [00:25] polotek: if this is good I'll squash and send a pull request [00:26] micheil: well, it's certainly a start (like, looks good to me, but there's always a way to improve on what's been done previously) [00:26] micheil: and it's better then what we currently have [00:26] maushu: Hey, what happened to setSecure? [00:26] micheil: gone. [00:26] maushu: Wat. [00:26] micheil: yep [00:26] maushu: Waat. [00:26] micheil: you heard me. [00:26] maushu: Waaaaaat. [00:27] maushu: This cannot be! [00:27] maushu: ...is there a replacement? [00:27] micheil: yes [00:27] cainus_: hey all... how should I be writing json strings from node? use crockford's lib? or is there something native? [00:27] micheil: SecureStreams [00:27] maushu: Oh. [00:28] micheil: JSON.stringify is native to v8. [00:28] micheil: v8: JSON [00:28] v8bot: micheil: {} [00:28] micheil: erm [00:28] cainus_: no module to require() for JSON.stringify ? [00:28] micheil: nup [00:28] cainus_: cool thanks [00:28] maushu: Which... is not in the docs. Great. [00:28] micheil: no module needed to be required [00:28] micheil: maushu: it's one of those unstable apis [00:28] cainus_: yeah I checked the docs first, but it seemed weird that there was nothing for json there [00:28] micheil: Tim_Smart and pquerna have been working on it. [00:28] maushu: ._. [00:29] maushu: cainus_, it uses v8's json me things. [00:29] cainus_: k thanks [00:29] cainus_: cool [00:29] micheil: cainus_: it should need to be documented then: Things that v8 has builtin. [00:29] cainus_: is there documentation elsewhere for what v8 has builtin? [00:29] micheil: cainus_: could you open a bug ticket for it on http://github.com/miksago/node/issues ? [00:29] micheil: cainus_: not really, I don't think. [00:30] micheil: also, the JSON methods are really quite interesting, like: [00:30] micheil: v8: JSON.parse.length [00:30] v8bot: micheil: 2 [00:30] micheil: v8: JSON.stringify.length [00:30] v8bot: micheil: 3 [00:31] micheil: JSON.stringify({a: "B"}, null, 20) [00:31] micheil: v8: JSON.stringify({a: "B"}, null, 20) [00:31] micheil: which seems to break v8bot [00:31] cainus_: just added https://github.com/miksago/node/issues/#issue/16 [00:32] micheil: k [00:33] polotek: micheil: https://github.com/polotek/node/commit/7abc127370a0b8989795490789e8d155acfece81 [00:33] micheil: polotek: looks good. [00:33] maushu: micheil, do I use SecureStream or SecurePair for a http server? [00:33] muk_mb has joined the channel [00:33] micheil: polotek: send that as a pull request to ry/node [00:34] micheil: maushu: to be honest, I have no idea. [00:34] maushu: Neither do I. \o/ [00:34] maushu: ryah, why did you complicate things? Why?! [00:34] micheil: ACTION is off, bbl. [00:35] micheil: hmm.. [00:35] polotek: micheil: I was trying to figure out how to send individual commits as pull requests yesterday [00:35] polotek: my history full of crap and github wants to send all of it [00:36] micheil: uhh.. or just export as a git patch and email to the mailing list [00:36] polotek: micheil: word [00:36] micheil: that is nodejs-dev, not nodejs [00:37] micheil: polotek: I'm pretty sure you've signed CLA, right? [00:37] polotek: yeah [00:37] UHMA has joined the channel [00:37] micheil: cool cool. [00:37] micheil: --out. [00:38] themiddleman has joined the channel [00:39] mikeal1 has joined the channel [00:39] UHMA: My node process is silently exiting after hours of operation. Anyone else experience this? If so, what was the problem? <-- maybe your terminal times out [00:40] derferman has joined the channel [00:40] saschagehlich: does anybody know andirs9's irc nickname? [00:41] saschagehlich: or: is anyone else familiar with mailparser? [00:44] maushu: *phew* [00:44] maushu: Digging through all these tests is tiring. [00:45] stalled has joined the channel [00:45] Wizek has joined the channel [00:46] bnoordhuis: polotek: you can create a new branch off the master and cherry-pick the changes you want into it, then submit it as a pull request [00:46] polotek: bnoordhuis: P I T A [00:46] polotek: but thanks [00:48] bnoordhuis: polotek: about as much work as distilling it into a patch, i think? and emailing the list has the disadvantage that things tend to drop off [00:48] polotek: bnoordhuis: ry also doesn't take pull request super often though [00:49] bnoordhuis: that's true (and annoying) [00:49] polotek: bnoordhuis: I like pull requests, just not finding them as convenient as I thought [00:49] polotek: I've pulled them but just recently started creating them [00:50] bnoordhuis: polotek: i think i like pull requests better than mailing off patches [00:50] bnoordhuis: say you forgot something [00:51] Aria: Yeah. Amendable. [00:51] bnoordhuis: with a pull request it's commit, push, done [00:51] polotek: yeah I prefer them to mailing patches as well [00:51] Aria: But playing into what's turned out to be the best model for using git, making small branches. [00:51] polotek: just annoyed trying to put them in my workflow [00:52] polotek: I blame browsers for making patch files incovenient though [00:52] polotek: can't just view them as plain text [00:52] polotek: wtf [00:53] bnoordhuis: depends if the server serves them with the right content type [00:53] bnoordhuis: google groups is pretty awful in that regard [00:54] polotek: everywhere is pretty awful in that regard [00:54] springmeyer has joined the channel [00:54] skiz has joined the channel [00:54] aubergine_ has joined the channel [00:55] Wizek: bnoordhuis: Hah! Finished implementing my header-passing code! :D Take a look https://gist.github.com/709277 [00:56] ph^ has joined the channel [00:56] bnoordhuis: Wizek: haha, that's awful! [00:56] Druid_ has joined the channel [00:56] Wizek: bnoordhuis: Yea, made my hand dirty there :P [00:57] hoffa__ has joined the channel [00:57] bnoordhuis: i coded up an example for you, actually, but you were offline when i wanted to post it [00:57] Wizek: bnoordhuis: let me have it now then [00:58] bnoordhuis: Wizek: https://gist.github.com/709310 [00:58] maushu: *sigh* rollback to v0.3.1 [01:00] Aria has joined the channel [01:00] Wizek: bnoordhuis: No good. I only need the headers, without the Node.js wrappers. Mose of what it logs to me is the wrapper [01:00] bnoordhuis: Wizek: nodejs wrappers? [01:01] bnoordhuis: wait, save that one [01:01] bnoordhuis: i have to be off to bed [01:01] Wizek: bnoordhuis: you mean you have to go? [01:02] bnoordhuis: Wizek: yeah, it's two a.m. here [01:02] mikeal1 has joined the channel [01:02] Wizek: bnoordhuis: here too, but who notices when one writes code :D [01:02] Wizek: bnoordhuis: especially this dirty :p [01:02] bnoordhuis: Wizek: my boss notices, when i oversleep :) [01:02] Wizek: bnoordhuis: So do my teacher [01:03] Wizek: bnoordhuis: but then? :D I'm having great time [01:03] Wizek: bnoordhuis: Anyways, cu [01:03] bnoordhuis: nighty night :) [01:03] _mql has joined the channel [01:04] Aredridel has joined the channel [01:05] Wizek: Can anyone help with this? https://gist.github.com/709310 [01:05] arpegius has joined the channel [01:06] maushu: I don't see what is the problem. It works. [01:07] bmizerany has joined the channel [01:07] Wizek: maushu: This is meant to redirect every request which comes to http://localhost:7999/db/ to http://localhost:5984/ with the path, (excluding /db/) request header and request body. [01:07] Wizek: maushu: and it works if the method is PUT or DELETE, but does not when it is GET [01:07] Aredridel has joined the channel [01:08] maushu: Try returning a 302 with a new location? [01:08] Wizek: maushu: It is for proxying XmlHttpRequests [01:08] Wizek: maushu: I don't think XHR likes 302 [01:08] maushu: 302 should work for ajax requests. [01:09] Fenda has joined the channel [01:09] Wizek: maushu: And what about same origin policy? [01:09] maushu: Actually, most people want to detect and/or prevent 302. Thats the hardest part. [01:09] roberthahn_ has joined the channel [01:09] maushu: Well, it is the same origin, right? Just different ports. [01:10] Wizek: maushu: But that counts as different origin as my early experiments failed [01:10] Aredridel has joined the channel [01:10] maushu: Drat. [01:10] roberthahn_: hey guys [01:10] Aria has joined the channel [01:11] Wizek: maushu: But, this code works, except on GET, which it did also as I can remember, but somewhere along the line it became broken [01:11] Aria has joined the channel [01:12] Wizek: maushu: And if you place some console.log() in the code, you will se, that case 'db': gets fired, but request.on('end' will not. [01:13] Wizek: maushu: I'm wondering as to why. I don't know the event structure of node well enough [01:13] maushu: Try a rollback and see if it works. [01:14] maushu: Maybe some code was changed. [01:14] Aredridel has joined the channel [01:15] Aredridel has joined the channel [01:16] roberthahn_: I was looking for a library that just did data validation (typically in a web app) but couldn't find one that wasn't part of an ORM. So I wrote my own (with tests). Does anyone think that there's value in me packaging it up and publishing it? [01:16] Aria: Yes. [01:16] Aria: Especially if it works client-side too. [01:16] Aria: That's a PRIME use-case for it. [01:17] Wizek: maushu: Yes, it does, but I don't know why exactly [01:17] jakehow has joined the channel [01:17] Ls_Away has joined the channel [01:17] sh1mmer has joined the channel [01:18] Wizek: maushu: I uploaded the rollbacked version to git [01:18] roberthahn_: Aria: I wholeheartedly agree; but I'm not sure how to write one that works in both server and client-side environments. Is there an example of a project that I could look at to crib ideas from? [01:18] Aria: There's not much to it. Look for an exports and require, and switch on that. [01:18] Wizek: maushu: Can it be connect? That I changed from http.createServer() to connect.createServer()? [01:18] maushu: connect? [01:19] maushu: You mean the 3rd party module? [01:19] Wizek: maushu: + [01:19] ryah: herbySk: your suggestions sound good. want to do it? [01:19] maushu: Oh, that might be it. Connect might be adding/changing something with the get requests. [01:19] maushu: Which makes sense, since http is pretty bare (WHICH IS A GOOD THING.) [01:20] jrmiller has joined the channel [01:20] herbySk: ryah: ok [01:20] roberthahn_: alright. One thing I wanted to add into my module was some pre-canned validators that matched urls & emails. I was considering copying code from this project: https://github.com/visionmedia/rapid/blob/master/lib/rapid/validations.js -- if I did so (and credited TJ) would anyone get upset about that? [01:20] Wizek: maushu: I'm adding connect to the rollbacked one to see wheter it is the problem [01:20] googol has joined the channel [01:22] Aria: That's usually how open source works, roberthahn_. Make sure your license is compatible. [01:22] maushu: WITCHCRAFT! [01:22] Aria: (MIT license is pretty great for that.) [01:22] Wizek: maushu: Nah, it works that way as well [01:22] Aria: (It's the "Use my code, please!" license.) [01:23] mopemope has joined the channel [01:23] Wizek: maushu: Just so that you know, I use connect only to be able to easily serve files through node [01:23] skiz has joined the channel [01:24] roberthahn_: Aria: I agree. But I've noticed in other programming cultures that people can get upset if their code was found in other projects, even if the license allows for it. Since I'm new to the node.js culture, i figure it's better to get a sense of what people are like here :) [01:24] Wizek: maushu: AHA! [01:24] Wizek: maushu: staticProvider is the kwy [01:24] Wizek: maushu: staticProvider is the key [01:24] maushu: Bash it with great justice! [01:24] Aria: Well, always give credit -- and thanks if you can! [01:24] Wizek: maushu: the exact function I'm using connect for :( [01:24] mopemope has left the channel [01:25] Wizek: maushu: Then can you tell me a great way to serve files with plain vaniilla Node.js? [01:26] maushu: Hmmm. [01:26] maushu: Have you checked the modules page? [01:26] maushu: https://github.com/ry/node/wiki/modules#web-frameworks-static [01:27] maushu: Check for the last update though. [01:29] marshall_law has joined the channel [01:35] jrmiller: I'm new to Node.js, but what advantages does Node.js offer in terms of performance over writing sockets apps in C? [01:36] Wizek: jrmiller: Async so it has non-blocking IO [01:37] jrmiller: But can't you achieve non-blocking IO in C? [01:37] maushu: ssl_error_bad_mac_read in firefox? >_> [01:38] jrmiller: Don't get me wrong, as a former (about two years ago) embedded systems programmer, I love the flexibility and power of javascript, but it seems like Node.js is basically a layer on C sockets? [01:38] mbrochh has joined the channel [01:39] ryah: jrmiller: you don't have to write it in c [01:39] agnat: heh [01:40] Wizek: Where does connect install itself with npm? [01:40] mikeal1 has joined the channel [01:40] jrmiller: ryah: So that's the advantage? [01:41] ryah: jrmiller: if you've got the time and the knowledge, clearly writing a server in c is better [01:42] ryah: most people have neither [01:42] c4milo has joined the channel [01:42] zentoooo has joined the channel [01:42] james has joined the channel [01:43] jrmiller: ryah: Ah gotcha. I spent a lot of time in school and my first job out writing C code, and so far I prefer Node.js to it. A lot fewer lines :) [01:44] evanmeagher: Wizek: npm installs things by default to ~/.node_modules [01:45] Wizek: evanmeagher: And if I don't have that folder? [01:45] evanmeagher: Wizek: the actual package files are usually somewhere within ~/.node_modules/.npm/ [01:45] Wizek: evanmeagher: I haven't changed any default option [01:45] evanmeagher: Wizek: check ~/.npmrc, if you have one [01:48] jchris has joined the channel [01:48] Wizek: evanmeagher: hah! found it at usr\local\lib\node\.npm\connect\ [01:48] admc has joined the channel [01:49] evanmeagher: Wizek: ah, right. sorry for being unhelpful :P [01:50] arpegius has joined the channel [01:50] Wizek: evanmeagher: don1t be sorry, thanks for the effort :] [01:51] Wizek: hoho, just found out that JS can have constants! [01:51] Wizek: did you know that as well? [01:51] Wizek: v8: const txt = "This is set in stone!" [01:51] v8bot: Wizek: undefined [01:51] Wizek: v8: var txt = "This is set in stone!" [01:51] v8bot: Wizek: undefined [01:51] Wizek: txt [01:52] Wizek: v8: txt [01:52] v8bot: Wizek: ReferenceError: txt is not defined [01:52] Wizek: v8: const txt = "This is set in stone!";txt [01:52] v8bot: Wizek: "This is set in stone!" [01:52] Wizek: v8: const txt = "This is set in stone!";txt="asd" [01:52] v8bot: Wizek: "asd" [01:52] Wizek: v8: const txt = "This is set in stone!";txt="asd";txz [01:52] v8bot: Wizek: ReferenceError: txz is not defined [01:52] Wizek: v8: const txt = "This is set in stone!";txt="asd";txt [01:52] v8bot: Wizek: "This is set in stone!" [01:52] voodootikigod has joined the channel [01:54] kaichen has joined the channel [01:54] maushu: Weird, https is still being weird. [01:54] maushu: Sometimes I get the whole image, sometimes I do not. [01:54] mscdex: that's twice the weirdness [01:55] Wizek: what does next() do? Is it node or connect? [01:55] mscdex: connect [01:55] Wizek: mscdex: And what? [01:55] mscdex: well, at least it's not a part of core node anyway [01:55] maushu: mscdex, at least now I receive the whole image... sometimes. [01:56] maushu: Before this, not even that. [01:56] mscdex: i dunno [01:57] mscdex: i just work here [01:57] mscdex: :D [01:57] maushu: ACTION facepalms. [02:01] maushu: Well, good thing I'm going to use https only for the api. [02:01] Wizek: cu gusy, it's 3am here -.- [02:02] maushu: 2am and still kicking! [02:02] Fenda: im using socket:io and testing the sending of a msg from server to specific client (using 1 sessionId) who has multiple open tabs in their browser. each tab instance has a different sessionId but i want the message to be sent to all of the tabs that client has open. is this possible? [02:03] derferman has joined the channel [02:03] mikeal1 has joined the channel [02:04] JimBastard has joined the channel [02:05] murz has joined the channel [02:10] jamescarr: argh [02:10] JimBastard: yaarggg [02:10] mscdex: node-pirate [02:11] JimBastard: node-nude [02:12] mikew3c has joined the channel [02:12] jamescarr: node-nude indeed [02:13] mscdex: node-crockfordfiles [02:13] jamescarr: I found the official website for node-nude [02:13] muk_mb has joined the channel [02:13] jamescarr: http://www.nodenude.com/top.html [02:13] itissid: Aria, Any luck on that dude? [02:13] mscdex: JimBastard: any progress on node-zzt? [02:13] rbranson: bahahaha [02:14] rbranson: nodenude.com is rox [02:14] JimBastard: mscdex: not really no, it could use some socket.io love [02:14] JimBastard: im too busy working on nodejitsu [02:14] Aria: itissid: I get entirely different errors. It looks like the iframe code is a hack at the moment. [02:14] JimBastard: mscdex: you should jump on that shit if you want, the code is all there [02:14] itissid: Damn! any hack you can tell me that might work? [02:14] gilesgoatboy has joined the channel [02:14] JimBastard: we started to update comments and clean and stuff [02:14] guybrush: lol nodenude a farting unicorn [02:14] itissid: I have filed a bug rreport [02:15] mscdex: got too much stuff going on as it is [02:16] itissid: Does Elijah Insua(AKA tmpvar) hang out here? [02:16] herbySk: ryah: sent a pull req (https://github.com/ry/node/pull/445) [02:16] mscdex: itissid: occasionally [02:16] itissid: mscdex, By what name? [02:16] itissid: typically [02:17] mscdex: tmpvar [02:17] mscdex: ;-) [02:18] JimBastard: itissid: yeah [02:18] JimBastard: itissid: whats up [02:18] itissid: https://github.com/tmpvar/jsdom/issues#issue/82 [02:18] itissid: JimBastard, https://github.com/tmpvar/jsdom/issues#issue/82 [02:19] JimBastard: okay? [02:19] mscdex: :-D [02:19] JimBastard: you should prob send him an email to make sure he saw the issue email [02:19] strmpnk_ has joined the channel [02:19] JimBastard: i'll send him one to make sure he saw the email about the issue email [02:19] CIA-95: node: 03Herbert Vojčík 07master * r3422263 10/ src/node.js : requireNative made independent on module system - http://bit.ly/d1BPMg [02:19] JimBastard: :p [02:20] ryah: herbySk: thanks [02:20] mscdex: i'll send him an email about JimBastard's email [02:20] gilesgoatboy: sup dawg I heard you like emails [02:21] jamescarr: fuck [02:21] jamescarr: if someone has a node.js project I could work on, let me know [02:21] JimBastard: SubStack: you guys applying to techstars [02:21] JimBastard: jamescarr: sup? [02:21] jamescarr: JimBastard, looking for consulting work :) [02:21] JimBastard: jamescarr: sheeet, i dont think i can afford [02:22] mscdex: node-zzt!111one [02:22] jamescarr: lol, probably not [02:23] jamescarr: I'm gettin my act together [02:23] tprice: can someone give an idea about prototype and if im doing it right [02:23] SubStack: JimBastard: not sure what that is [02:23] tprice: here is something im doing [02:23] jamescarr: I'll probably just offer node training for starters [02:23] SubStack: reading [02:23] tprice: http://pastebin.com/ZZpuer8h [02:23] jamescarr: probably advertise my training services when I speak at Rich Web Experience next month [02:23] itissid: JimBastard, I did send him an email [02:23] itissid: Aria was looking at the case [02:24] SubStack: JimBastard: we're trying to get revenue ourselves without investors first [02:24] mscdex: tprice: what exactly were you unsure of wrt the prototype? [02:25] mscdex: it looks fine to me [02:25] mikew3c has joined the channel [02:26] _mql: I just started to extract data-manipulation means from various projects to a stand-alone "Data.js" library. It now depends on Underscore.js, while most of the implied functions (each, select, etc.) conform to the API of Underscore.js. http://github.com/michael/data. [02:26] SubStack: Fenda: nope @ dnode examples, but I did clean up the examples not long ago [02:26] tprice: is it better to have a module like this or one big anonymous function? [02:26] mscdex: although, a lot of people will prefix non-public methods with an underscore or something [02:26] itissid: tprice, Thats a torrent client? [02:26] SubStack: Fenda: check out examples/chat especially [02:26] itissid: nice [02:26] mscdex: tprice: yeah, using prototype is ideal [02:26] _mql: Just in case someone is looking for either a JavaScript SortedHash or Graph implementation… (.. more to come) [02:26] jashkenas: _mql: nice library name ;) [02:26] _mql: hehe.. probably taken :P [02:27] tprice: mscdex: and do i have the right idea about the callBacks? [02:27] mikeal1 has joined the channel [02:28] jashkenas: _mql: one thing to be careful of ... SortedHash probably won't work in Internet Explorer, if you include keys named "toString", "hasOwnProperty", and so on. [02:28] _mql: jashkenas: took a lot of inspiration from your libraries… and delegated some work to underscore.js https://github.com/michael/data/blob/master/data.js [02:28] jashkenas: (because it uses a true JS object internally) [02:28] mscdex: tprice: pretty much... callback is usually the last parameter like you have it. although, there's no need to return the value of the callback since async functions like that return right away [02:29] cataska has joined the channel [02:29] mscdex: the calling function will never see that return value [02:29] mscdex: er calling code [02:30] _mql: jashkenas: ah I see — will change that. do you have any suggestions in place of toString e.g.? [02:30] jashkenas: Why does the Node repl now print comma-first, when Node.js style is not comma-first? [02:30] tprice: yeah i was wondering where it would retrun to as its a pram [02:30] jashkenas: _mql: It's actually not a possible problem to solve, in general, for IE. You have to use an array if you want to be completely foolproof. [02:30] jashkenas: Or just say that it doesn't support "toString" as a key. [02:31] sugardave has joined the channel [02:32] hamsterspider has joined the channel [02:33] spetrea has joined the channel [02:33] Fenda: SubStack: where can i find examples/chat? [02:33] Fenda: node git? [02:34] pagameba: hey noders … can anyone tell me the correct way to pass a Buffer to a callback function at the end of an EOI request (in the after handler) … this is the function so far but it doesn't compile and I can't figure out the correct way to do it [02:34] pagameba: https://gist.github.com/709438 [02:34] _mql: jashkenas: mhh I wasn't aware of this IE speciality. So IE does doesn't support obj.toString = … but I guess it does support obj["toString"] = … ? [02:34] _mql: sure it does…? [02:34] mscdex: man, this tablet rocks [02:35] hamsterspider has left the channel [02:35] jashkenas: _mql: https://developer.mozilla.org/En/ECMAScript_DontEnum_attribute [02:35] mscdex: now i just need a nodejs apk [02:36] jashkenas: It won't enumerate over it, if you assign to it. [02:37] hamsterspider has joined the channel [02:37] nooder: how to make node program output crash log to file? [02:38] mscdex: nooder: listen for unhandledException and append to a file? [02:39] hamsterspider: help - I cannot access my node.js server from other computers on local network using haproxy - http://pastebin.com/FC8DhXWJ - anybody know haproxy enough to help? [02:39] nooder: mscdex thx [02:40] mscdex: hamsterspider: you're binding to localhost [02:40] mscdex: hamsterspider: trying 0.0.0.0 instead? [02:40] mscdex: s/trying/try [02:40] agnat has joined the channel [02:40] hamsterspider: mscdex: ok - will try - will let you know soon [02:41] _mql: jashkenas: ah well… in that case, it will simply not support "toString" as a key… It's important to have fast object-key lookups (else, it would loose it's Hash characteristics, advantages). [02:43] isaacs has joined the channel [02:44] isaacs: evanmeagher: npm doesn't install thigns by default into .node_modules [02:44] isaacs: evanmeagher: it installs them by default to /usr/local/lib/node (which is dependent on the instlal location of node) [02:46] _mql: jashkenas: will refine and include the DataGraph data-structure within the next days, which will actually be the more interesting (higher-level) part of it. you remember https://github.com/michael/unveil/blob/master/test/data_graph.coffee https://github.com/michael/unveil/blob/master/fixtures/documents.json ;) [02:46] Fenda: if a nodejs socket:io client has 10 browser tabs of the same page open and the server wants to send a message that will be mirrored on all client sessions. should i use local storage? or send the message to all of the clients connected sessions? [02:46] polotek: pagameba: what's the output when you try to compile? [02:46] SubStack: Fenda: http://github.com/substack/dnode/tree/master/examples/ [02:47] pagameba: polotek: actually, just figured it out … needed to wrap the buffer in scope.Close(buffer->handle_) [02:47] polotek: pagameba: cool [02:47] pagameba: but thanks :) [02:49] fangel has joined the channel [02:49] cal153 has joined the channel [02:49] jashkenas: _mql: yeah, and ndogen is looking real nice as well. [02:50] hamsterspider: mscdex: cool - is working - thank you so much :) [02:53] jimt_ has joined the channel [02:53] mscdex: no problem [02:56] _mql: jashkenas: thx, ndogen however is currently suspended. concentrating on substance (the doc creation thing) now, which has basically the same idea but the data-structure is generated by user input rather than by parsing a text file containing special markup. [02:56] Ls_Away has joined the channel [02:57] jimt has joined the channel [02:58] jashkenas: I think it's funny how programmers can spend years creating systems for "users" to get their text into fancy databases and data structures, and still end up strongly preferring to keep their own text on filesystems and in git ... don't you think? [02:58] Fenda: SubStack: thanks. out of interest, how could dnode deal with a client with multiple open browser tabs? for e.g. if a response should be mirrored to all open instances [02:59] sivy has joined the channel [03:01] _mql: jashkenas: halfway. it's true for code-related stuff, but for writing documents (like publications, tutorials etc.) I'd prefer a tool over a text-editor. It's not gonna be a tool for programmers in the first place ^^. (however there will be a Code-ContentNode type) [03:02] isaacs has joined the channel [03:02] evanmeagher: isaacs: should have remembered that about the install location :P [03:02] evanmeagher: isaacs: momentarily forgot that ~/.node_modules is only used if specified in .npmrc [03:02] _mql: jashkenas: but i disagree regarding filesystems. There's definitely a transition towards putting resources (including text) into the cloud. [03:02] aconbere has joined the channel [03:04] maushu: Anyone remembers posts similar to this one: http://developer.yahoo.com/blogs/ydn/posts/2010/07/multicore_http_server_with_nodejs/ [03:04] jashkenas: _mql: fair enough. I just think it's saying something that we keep code as plaintext instead of DB rows. [03:04] CIA-95: node: 03Marco Rogers 07master * r5749f91 10/ doc/api/util.markdown : Docs for util.inherits - http://bit.ly/b2A5bS [03:05] _mql: jashkenas: just a matter of time I think :P… regarding code — I particularly like the idea of mozilla Bespin/Skywriter. But not sure when such implementations are good enough. [03:05] _mql: jashkenas: mhh jeah, good point, true on many levels ;) [03:05] polotek: question for the room [03:05] polotek: there are lots of people who don't like the "new" construct in js [03:06] guybrush: ACTION does not like new [03:06] polotek: and since I've gotten involved with node the createFoo() pattern has come up a lot [03:06] polotek: what do people think of make a create a function of the constructor [03:06] polotek: Foo.create [03:06] polotek: to mirror Object.create [03:07] polotek: haven't seen this much [03:07] jashkenas: does it just call "new" ? [03:07] polotek: jashkenas: no ideally it would use Object.create [03:07] _mql: jashkenas: I'm sorry but I really have to get some sleep (4am here :P ) So cya! [03:07] _mql: gn8 y'all [03:07] jashkenas: polotek: sounds fine, as long as your JS doesn't have to be compatible. [03:08] jashkenas: (or highly-performant) [03:09] polotek: jashkenas: yeah it's not advisable if you're going to be creating a ton of objects [03:11] jashkenas: what's your beef with "new" ? [03:12] CIA-95: node: 03Ben Noordhuis 07master * ra87172f 10/ wscript : Compile with `-Wno-unused-parameter -D_FORTIFY_SOURCE=2` - http://bit.ly/bgjIzf [03:12] CIA-95: node: 03Ben Noordhuis 07master * r80b5a52 10/ (src/node_child_process.cc src/node_stdio.cc): Fix compiler warnings. - http://bit.ly/8YpA8J [03:19] polotek: jashkenas: me? I don't have one [03:19] polotek: other folks think it's confusing [03:19] polotek: and there's the real issue that it makes it hard to isolate for testing [03:20] jashkenas: hard to isolate for testing? [03:20] polotek: when you're trying to test a component [03:20] polotek: and it creates other components internally using "new" [03:20] polotek: you can't mock them [03:21] polotek: I've only started to get serious about testing recently (since coming to node) [03:21] polotek: so conceptually I agree, but haven't run into it personally [03:22] jchris has joined the channel [03:22] polotek: someone feel free to tell me if I'm making a mess of these concepts [03:22] skiz has joined the channel [03:22] jashkenas: can't you mock them by replacing the object reference? [03:22] jashkenas: WebInterface = MockWebInterface [03:23] polotek: yeah, but you have to actually modify the module that provides WebInterface [03:23] BrianTheCoder has joined the channel [03:27] tones has joined the channel [03:28] admc has joined the channel [03:29] joshpeek has joined the channel [03:30] jashkenas: joshpeek: 2010-11-21 is today, unless I'm nuts. [03:30] jashkenas: But I'll change the timestamp... and the version number to be dynamic. [03:30] googol has joined the channel [03:32] tones: Hey guys, have been reading/trying, but am still stumped - I'm trying to get view partials working using Express and EJS. [03:32] tones: I have written <% partial('comment', { collection: comments }); %> in my post.ejs file. [03:32] tones: Can anyone give me some tips? [03:32] tones: I have defined a comment.ejs in /views/partials directory [03:33] tones: (I am also passing an array of comment objects in from my route) [03:39] maushu: So, I'm doing a cross-domain request using https on the target... [03:44] cainus_: anyone using mysql? should I be using https://github.com/felixge/node-mysql for the client lib? [03:45] brianmario: cainus_: that's the one I hear everyone is using [03:45] cainus_: cool thanks [03:45] guybrush: cainus_: I am using it, works pretty good [03:45] hoffa__ has joined the channel [03:47] jimt_ has joined the channel [03:49] mbrochh has joined the channel [03:49] mbrochh has joined the channel [03:53] barce has left the channel [03:53] evanmeagher: what's a good way to debug/deal with ETIMEDOUTs? [03:54] evanmeagher: I'm running into them coming from IOWatcher.callback within net, and the stacktrace is pretty useless [04:01] cainus_: bah... anyone know what I'm doing wrong here? https://gist.github.com/709498 [04:01] cainus_: I can't get any mysql libs to connect to my db :\ [04:06] tprice: when im looking at process.memoryUsage out of the 4 (rss vsize heapTotal heapUsed) witch is the memory that my app is using? [04:07] Aria: RSS That's complicated [04:07] Aria: RSS is how much is resident in RAM [04:07] Aria: heapTotal is how big the heap allocated from the OS is. [04:07] Aria: heapUsed is how much you're using. [04:07] Aria: vsize is the total address space including mmapped files. [04:08] Aria: heapTotal is the simple answer to 'how much memory am I using', when seen from the outside. [04:08] Aria: heapUsed is the simple answer to 'how much memory am I using' when seen from the inside. [04:08] Aria: and RSS is really how much memory you're using RIGHT NOW, since the OS might have swapped less active parts out. [04:08] tprice: Aria: thanks that was great help! [04:08] Aria: Sure thing! [04:09] Aria: (And vsize is very, very abstracted from your actual doing stuff.) [04:09] tprice: is there a limit i should keep under for heapUsed? [04:10] Aria: I believe on x86, 1GB is the normal limit in V8. [04:10] Aria: But otherwise, no, use RAM as you need of course. Subject to the machine it's running on. [04:10] isaacs has joined the channel [04:11] tprice: so i could load up on larg arrays a few 10 of MB and it would be fine? [04:11] MikhX has joined the channel [04:11] Aria: Sure. Why not? [04:11] Aria: Most people's machines are that big. [04:12] Aria: Might have to be careful on, say, WebOS ;-) [04:12] tones: Anyone use view partials with express? Am still stuck, could use some advice. Cheers. [04:13] tprice: haha not really thinking of WebOS right now [04:13] Aria: I've not played with that yet. [04:13] tprice: but having the larg arrays in mind would it be better to server arrays of pages to http request or read from file every request? [04:15] skiz has joined the channel [04:20] CIA-95: node: 03Nikhil Marathe 07master * r7a3971e 10/ wscript : Use sys.executable to call python - http://bit.ly/bMX3sb [04:22] masahiroh has joined the channel [04:24] admc has joined the channel [04:24] CIA-95: node: 03Ben Noordhuis 07master * rf0b8cc6 10/ (src/node.js test/simple/test-cli-eval.js): [04:24] CIA-95: node: require() should work with `node --eval`. [04:24] CIA-95: node: with tests [04:24] CIA-95: node: Fix module path resolve bug. Normally the module path is taken from [04:24] CIA-95: node: realpath(__filename) but with eval there is (of course) no filename - http://bit.ly/bYWcX4 [04:30] harrylove has joined the channel [04:31] alek_br has joined the channel [04:32] galaxywatcher has joined the channel [04:33] CIA-95: node: 03Ryan Dahl 07master * r7b2f5ab 10/ src/node_stdio.cc : Fix mac build - http://bit.ly/bjfWnq [04:34] jimt has joined the channel [04:34] mjr_: Lots of commits tonight. [04:34] ryah: catching up [04:37] comster has joined the channel [04:42] derferman has joined the channel [04:45] CIA-95: node: 03Jorge Chamorro Bieling 07master * r6aa92d5 10/ deps/libeio/eio.c : [04:45] CIA-95: node: Apple's threaded write()s bug [04:45] CIA-95: node: fixes test/simple/test-fs-sir-writes-alot.js on mac - http://bit.ly/daLIZW [04:52] JimBastard has joined the channel [04:52] unomi: scary bug [04:52] Anti-X has joined the channel [04:52] JimBastard: last minute tech star video, lol [04:52] JimBastard: http://www.youtube.com/nodejitsu#p/a/u/0/eRISZCk4IE0 [04:52] Anti-X: Photons have mass? I didn't even know they were catholic! [04:53] isaacs has joined the channel [04:55] CIA-95: node: 03Ben Noordhuis 07master * r611dffa 10/ (lib/dns.js src/node_cares.cc test/disabled/test-dns.js): Support CNAME lookups in DNS module. - http://bit.ly/aTUk4J [04:55] CIA-95: node: 03Ben Noordhuis 07master * rb64791c 10/ deps/c-ares/ares_parse_a_reply.c : [04:55] CIA-95: node: Fix c-ares bug: reply to a CNAME query [04:55] CIA-95: node: doesn't contain addresses, causing ares_parse_a_reply() to bail out with [04:55] CIA-95: node: ARES_ENODATA. - http://bit.ly/bMBd5Y [04:55] SubStack: Fenda: you could use connect sessions to manage that [04:56] SubStack: I've done that before with a chat program [04:57] guybrush: JimBastard: nice sunglasses [04:57] JimBastard: ha ha thanks [04:57] JimBastard: i couldnt get the video looking good without the biggie beat and my sunglasses [04:58] JimBastard: i looked too nervous [04:58] guybrush: hihi [04:59] SubStack: JimBastard: good luck with that! [05:00] JimBastard: thanks, we'll see how it plays out [05:00] SubStack: hmmm I had better record the browserling video now [05:01] JimBastard: whats that? [05:01] mjr_: SubStack: when does the world get to reap the benefits of browserling? [05:01] marshall_law has joined the channel [05:01] Ls_Away has joined the channel [05:02] SubStack: mjr_: 12 hours? [05:02] mjr_: awesome [05:05] jchris has joined the channel [05:05] BHSPitMonkey has joined the channel [05:05] JimBastard_ has joined the channel [05:06] SubStack: oh pkrumins is still messing with stuff, can't record the video yet [05:06] SubStack: but I have it all scripted when stuff is ready [05:07] JimBastard_: SubStack: which rap instrumental will you be using as your background music? [05:07] SubStack: JimBastard_: hadn't thought of that! [05:07] SubStack: it would liven things up though [05:09] mu-hannibal has joined the channel [05:09] BHSPitMonkey: Any socket.io people here? I experienced a weird, crushing issue today that took down my server [05:09] jetienne has joined the channel [05:10] shirro has joined the channel [05:11] BHSPitMonkey: http://bhspitmonkey.pastebin.com/qDB3muAZ [05:13] mu-hannibal has joined the channel [05:14] EGreg_ has joined the channel [05:29] Fenda: SubStack: connect sessions use cookies right? i read that if a user disables browser cookies it breaks [05:30] shirro has joined the channel [05:31] Aria: BHSPitMonkey: That's a "you wrote to a socket that's no longer open". You'll probably want to catch that. [05:31] BHSPitMonkey: Aria: not sure how that happened... The application ran for about 8 hours with a steady stream of users before that happened [05:32] Aria: Someone send a connection reset, maybe? [05:32] arlolra has joined the channel [05:32] Aria: Their router crashed, or they turned on their PC's firewall or any number of ways sockets can get closed weirdly. [05:32] Aria: (Heck, my own router lost its mind a few hours ago and did that to my IRC connection a half dozen times) [05:33] SubStack: Fenda: well it's either session cookies or you could pass in a user token in the query string or some such [05:33] BHSPitMonkey: I'm just used to getting the on-disconnect event and having that client object die out [05:33] aurynn has joined the channel [05:33] SubStack: but less seemless [05:33] SubStack: anyways, people who disable cookies deserve non-functioning webapps :p [05:33] Fenda: SubStack: yeah, apparently PHP and JSP both do that when someone disables cookies [05:33] Aria: Yeah, I'm not positive (not a socket.io user here), but disconnect is for a FIN-type packet -- normal shutdown [05:33] arlolra has joined the channel [05:33] Aria: But when you write and their side sends back a RST packet (An "Uh, what? You were staying something?" packet), shit happens. [05:34] Aria: (and since you can have multiple writes in flight at once, it's even more fun to catch. So you catch the exception and carry on.) [05:39] JimBastard_: nice, indexzero added a proxy table to https://github.com/nodejitsu/node-http-proxy [05:40] CIA-95: node: 03Ryan Dahl 07master * rd695486 10/ (4 files): Upgrade http-parser - http://bit.ly/d9UZbF [05:40] xslashxr has joined the channel [05:42] MikhX has joined the channel [05:43] jchris has joined the channel [05:44] EyePulp has joined the channel [05:44] CIA-95: node: 03Ryan Dahl 07master * r1255438 10/ src/node_http_parser.cc : Add support for SSDP methods -_- - http://bit.ly/dxJJtN [05:45] ryah: merging patches is hard work. [05:45] nooder: who remembers script that starts nodejs if it crashes? [05:45] ryah: hands hurt [05:46] SubStack: I like it when git takes care of all of that [05:46] Aria: nooder: So many ways do that. Daemontools, forever... [05:46] itissid: elijah-mbp, Hey is that tmpvar [05:46] itissid: ? [05:47] Aria: You are so right, ryah [05:47] italic: nooder: there's monit as well [05:47] evanmeagher has joined the channel [05:49] hornairs has joined the channel [05:49] nooder: will forever effect performance? [05:50] Aria: Create the performance of what? [05:50] nooder: or its better to use external tool? [05:50] mbrochh has joined the channel [05:50] Aria: forever is an external tool. [05:50] Aria: Just one that also uses the node engine [05:51] nooder: it starts child [05:51] Aria: Right... [05:53] Fenda: SubStack: https://github.com/bmeck/session-web-sockets good idea to use this for my multiple tab sync problem? :> [05:53] nooder: ok. and does somebody have problem with memory limit? [05:53] nooder: 1gb [05:53] Aria: It's happened. [05:54] Aria: (as far as I know that's just on x86) [05:54] nooder: hm [05:56] nooder: what is potential limit of http server in req per sec? [05:56] Aria: How fast is your network interface? [05:56] Aria: How big are the requests? [05:57] nooder: very large number of small req [05:57] nooder: very small [05:57] Aria: Then divide that by your network interface speed ;-) [05:58] nooder: i hope that it will be true for my case [05:58] Aria: Node is fast. However, what processing you want to do is a factor. There's no magic number of "node does X per second". That's a number that depends on a huge number of things. [06:00] SubStack: node can do 500 megableeps per bitsector [06:01] shripadk has joined the channel [06:01] nooder: if i run node behind nginx its better use unix sock or tcp? [06:01] springmeyer has joined the channel [06:01] nooder: with sock i\m gettin better results [06:02] Aria: 'better' being what? [06:02] nooder: latency [06:02] Aria: TCP has more processing overhead -- checksums, etc. [06:04] nooder: ok, thx. i've heard somewhere that under heavy loads tcp is better than unix socket [06:04] sivy has joined the channel [06:04] Aria: Heh. Measure, test, and understand. [06:05] Aria: There's no magic. [06:05] Aria: Avoid cargo cults. [06:05] jameshome has joined the channel [06:05] shripadk: how do i increase the max open files in ubuntu? i tried setting fs.file-max to 100000 in sysctl.conf and "ulimit -n 10000" to test opening 10000 redis clients simultaneously... however it concs off at about 5000 clients... [06:06] shripadk: btw i m using redis for pubsub over socket.io... every subscriber opens a new client... [06:07] nooder: i have ulimit = unlimited, but just 2000 makes socket: Too many open files (24) [06:08] shripadk: yeah! i could increase that to 5000.. on my mac i could only reach 1024! [06:08] mjr_: shripadk: /etc/security/limits.conf [06:09] shripadk: mjr_ thanks! :D will look into that now... any idea what to change there? [06:09] guybrush: mh maybe a dumb question, but isn't there any rfc for rss20? best thing i found so far is http://validator.w3.org/feed/docs/rss2.html#hrelementsOfLtitemgt [06:10] nooder: shripadk so how you increased up to 5k? [06:10] shripadk: btw if anyone wants pubsub... https://github.com/shripadk/Socket.IO-PubSub [06:10] mjr_: shripadk: https://gist.github.com/be98403c59cc4f78cca8 [06:10] shripadk: just by changing ulimit and fs.file-max... [06:11] mjr_: shripadk: if you find yourself limited to 1024 files, even after ulimit seems to say can have more, it's often because of sudo or some other subshell changing the limits. [06:11] shripadk: mjr_ cool! will try now... [06:12] ceej has joined the channel [06:12] shripadk: mjr_ yeah realized that... :) will try again... [06:12] shripadk: mjr_ is it good to open a redis client on every client connection or is it better to have one redis client with an array loop? [06:12] shripadk: mjr_ juggernaut uses an array loop... [06:12] mjr_: I'm the primary author of node_redis, BTW. [06:13] shripadk: mjr_ Wow! :D [06:13] mjr_: I dunno, it depends on how fast your link is between client and server [06:13] bmizerany has joined the channel [06:13] mjr_: By default, it pipelines like crazy, which tends to be very efficient with fewer connections. [06:13] mjr_: But at a certain point, it'll make sense to add more connections. [06:14] mjr_: You can usually avoid even looping over anything on the callback by closing over the necessary state in your redis command callback. [06:15] shripadk: mjr_ cool... :D also what does the number of file descriptors actually depend on? the RAM or even the processor? [06:15] shripadk: mjr_ example? how do i close the state? [06:15] mjr_: depends on the OS. On Linux, changing that file is the way to go. On OSX, there's a sysctl you need to change. [06:16] shripadk: OSX: i had major problems.. whatever i did never changed the sysctl... its kern.maxfiles if i am right! threw an error: Operation not permitted! [06:16] Aria: Number of file descriptors depends on RAM. [06:17] shripadk: Aria: thanks! :) [06:17] Aria: Also, on whether your OS has any O(n) algorithms for dealing with them. [06:17] Aria: (not sure any modern ones do.) [06:17] mjr_: Here's a simple and silly example of a node webserver that can handle lots of incoming HTTP connections, but uses a single Redis connection. The Redis command callbacks close over the state of the req/res variables, so you can respond to an HTTP client based on a Redis command response. [06:18] mjr_: https://github.com/mranney/node_redis/blob/master/examples/web_server.js [06:18] shripadk: will look into it right away... [06:19] dnolen has joined the channel [06:19] confoocious has joined the channel [06:19] confoocious has joined the channel [06:20] mjr_: shripadk: on OSX you can set kern.maxfiles and kern.maxfilesperproc to a big number. Then you should be able to change your ulimit -n to that. [06:21] shripadk: mjr_ is it efficient for scale? really skeptical about loops! :) [06:21] itissid: Is elijah insua here? [06:21] mjr_: But note that once you've changed your ulimit, you cannot change it upward again in that shell. [06:21] Aria: nope, itissid [06:21] JimBastard: itissid: really ? lol [06:21] shripadk: i did do that... the problem is that on changing the number throws a Operation not permitted! [06:21] JimBastard: itissid: you should email again in case he didnt get your first email [06:21] AAA_awright_ has joined the channel [06:22] mjr_: shripadk: where's the loop? [06:22] itissid: JimBastard, I did [06:22] itissid: I need to solve the problem ASAP... So i check here every few hours.. [06:22] JimBastard: itissid: maybe you should call up and try to get your OSS fee waved for the month. i think tmpvar has violated his OSS contract by not giving you support in less then 6 hours [06:22] JimBastard: the MIT board will fine him [06:23] halfhalo: Is the fine still one cookie? [06:23] Aria: I think it's up to a beer now. [06:23] JimBastard: he could get stripped of his ranking [06:23] itissid: JimBastard, Cmmon Jim.. [06:23] faust45 has joined the channel [06:23] Aria: Or a six-pack if it's on a weekend. [06:24] hamsterspider has left the channel [06:24] itissid: I dint say he is not supporting on a clock, am just checking... [06:24] shripadk: mjr_ ok. juggernaut uses a loop to broadcast msgs to the subscribed channel.. thats fine for few clients. once the number increases to thousands i assume it slows things down. cos for every msg broadcasted it needs to loop. [06:25] JimBastard: itissid: be patient. [06:25] JimBastard: itissid: its not good manors to pester maintainers [06:25] mjr_: shripadk: I dunno what juggernaut is, but in this world of unicast, somebody needs to loop over something in order to send the same message to multiple clients. [06:26] JimBastard: im sure he will get to the issue [06:26] itissid: Hmm [06:27] shripadk: mjr_ in my code... i m creating a redis client for every client connection. Not using any loop there.. [06:27] mjr_: There is a lot of overhead that way as well. You've got a full TCP socket that your kernel and node have to maintain. [06:28] shripadk: mjr_ https://github.com/shripadk/Socket.IO-PubSub/blob/master/lib/socket.io/client.js [06:29] shripadk: mjr_ that completely avoids broadcasting msgs the regular socket.io way (for loop). [06:30] SubStack: is performance really an issue? [06:30] SubStack: computers are fast, networks have a lot of capacity [06:30] mjr_: shripadk: I'm not sure I understand the issue you are trying to avoid, but I don't think it matters. :) [06:31] BHSPitMonkey: lol, nice attitude [06:31] mjr_: Somebody, somewhere has to run through a loop if you want to send a single message to multiple listeners. [06:31] mjr_: Unless you use multicast. [06:31] mjr_: Maybe that's the redis-server process in your case. [06:31] shripadk: mjr_ ah! so redis does do that internally... :) [06:31] mjr_: yes indeed [06:32] shripadk: mjr_ alright! i get it now :D [06:32] mjr_: I love Redis pub/sub, and I use it a lot in my software, but I don't understand how the throttling works. [06:33] mjr_: If you do pub/sub in node, then you get to decide how throttling is done. [06:33] shripadk: mjr_ :) i always thought the way redis pub/sub worked.. there was no need to loop. so i wrote my code the other way round. [06:34] mjr_: Yeah well, there's no need for YOUR code to loop. :) [06:35] shripadk: mjr_ which comes back to my first question! :D file descriptors... will try limit.conf and see if i can bump up the number of clients.. [06:35] mjr_: Doing Redis pub/sub from node is neat in other ways though, because you can use Redis to cross programming language barriers. [06:35] derren13 has joined the channel [06:37] themiddleman has joined the channel [06:37] shripadk: mjr_ yep you are right there! any way to benchmark and see which performs better? using redis or loops? if loops perform well i guess i'll stick to that.. [06:37] mjr_: If you want to send a message from node to a bunch of sockets that node already has open, you can't beat the for loop method. Not a chance. [06:38] mjr_: But maybe you want to use Redis as a central hub for multiple nodes to exchange messages through. It's hard to compare. [06:38] ryah: http://neugierig.org/software/chromium/notes/2010/11/thread-restrictions.html [06:38] ryah: <3 chrome [06:39] ryah: and <3 evmar [06:39] shripadk: mjr_ then i will stick to loops if i m using node alone. for one, i would see a bridge between node and ruby working well with redis... [06:39] SubStack: bridge between node and ruby? dnode{,-ruby} [06:39] rchavik has joined the channel [06:39] rchavik has joined the channel [06:40] SubStack: why send a database to do an rpc system's job? [06:40] mjr_: SubStack: indeed. I think it mostly makes sense if you already need Redis for something else anyway. [06:41] heap has joined the channel [06:42] shripadk: where then can u use redis pub/sub? i guess i m going by the old saying: "when you have a hammer.. everything looks like a nail"!! :D [06:42] mjr_: Otherwise, I'd use dnode, webworker, or write some kind of JSON over HTTP protocol myself for talking node/node [06:42] mjr_: I use Redis pub/sub for log aggregation and filtering across a cluster of machines. [06:43] shripadk: cool :) [06:43] mjr_: I also use it to filter down a subset of the messages that the machines are exchanging with each other. [06:43] mjr_: I think it makes the most sense when you already need Redis for something else, which a lot of people do. [06:44] shripadk: mjr_ well i m writing an analytics app.. that stores all sorts of data in redis. [06:46] T-Co: mscdex, Do you know what flags does gmail support via the node-imap addFlag function? I tried SEEN, but at least that was not supported... [06:46] admc has joined the channel [06:46] nooder: is redis fail tolerant? [06:47] nooder: if it crashes, next time it just loads db from fs? no need for repair an so? [06:47] T-Co: mscdex, The best result would be to set new unseen messages into seen and archive state, after prosessing, so that I could always just read the inbox as is... [06:50] evanmeagher has joined the channel [06:51] mjr_: nooder: Redis has an "append only file" mode, called 'AOF' for short. You can set this up to sync after every write. [06:51] mjr_: Most people don't do this and use Redis as more of a "loss tolerant" storage system. [06:52] mjr_: That said, it often will remember your data after a crash. [06:52] nooder: i dont need to write every time. i just need to know which problems can came up. such as broken db file [06:53] mjr_: I don't use Redis for data that I can't afford to lose. If I care about getting the data back, I use CouchDB or a SQL database. [06:54] mjr_: I haven't had issues with corrupted db files. In snapshot mode, I'll bet issues like that are rare. In AOF mode, I'll bet it's as common as it is with other databases that employ similar techniques. [06:55] nooder: so it cant be used as only db? [06:56] Aria: Depends on how your use tolerates loss. [06:56] nooder: couchdb is kind of strange. i spent day working with it and found that it 10x slower then mysql [06:56] mjr_: nooder: lots of people use it as a primary db. I'm just not one of them. [06:56] Aria: Couch? Depends on your tuning, too. [06:57] mjr_: CouchDB is indeed a tradeoff between a number of things. If you come from a SQL world, it can take a lot of getting used to. [06:57] nooder: just simple selects. even without mapreduce [06:57] nooder: i was shocked [06:58] mjr_: Single reader/writer with CouchDB is probably slower than MySQL. Try ratcheting up the concurrency, and I've found that CouchDB does pretty well. [06:59] mjr_: I'm wearing a CouchDB shirt at the moment. [06:59] JimBastard has joined the channel [06:59] nooder: mysql is pretty well [06:59] nooder: redis is very good [06:59] nooder: so for what is couchdb [07:00] JimBastard: i'm slightly concerned the techstars application video i posted 2 hours ago already has 250 views [07:00] mjr_: CouchDB is for talking JSON over HTTP, which is a format I quite like. [07:00] JimBastard: >.< [07:00] mjr_: But if you aren't into that, MySQL is also a fine database. [07:00] shripadk: mysql: table locks for writes! ain't that going to be slower than writes to couchdb? [07:01] nooder: just row [07:01] mjr_: I'm an ORM refugee, so I really like the way that CouchDB makes me think about my data and how it is organized. [07:01] nooder: is locked [07:01] mjr_: Yeah, they fixed that table lock thing a while back. [07:02] nooder: oh yes. thats pretty cool. object model is nice [07:02] shripadk: how about updation? revision control? [07:03] nooder: i'm using mysql from bzr [07:03] nooder: they are commiting every day [07:03] mraleph has joined the channel [07:03] mscdex: T-Co: flags start with a backslash [07:03] T-Co: mscdex, Ah, thanks. [07:03] mscdex: T-Co: so: "\Seen" [07:04] mjr_: MySQL can be super fast. I've used it for years and have only one complaint: ORM layers [07:04] T-Co: mscdex, Do you know if Archive is another box? or just a flag in gmail? [07:05] shripadk: couchdb feels more natural. its all REST. :) [07:05] mraleph1 has joined the channel [07:05] T-Co: "REST assured..." [07:05] mscdex: T-Co: i'm not sure just yet [07:06] luke` has joined the channel [07:06] T-Co: mscdex, "Error: The flag "SEEN" is not allowed by the server for this mailbox" [07:06] T-Co: hmm [07:07] T-Co: mscdex, (Neither was "\Seen") [07:07] T-Co: If case would matter... [07:07] mscdex: "\\Seen" ? [07:08] T-Co: mscdex, Duh :) [07:08] mscdex: i'm thinking about removing the backslash requirement anyway, since i'll be having the keyword and flag functions separate [07:08] nooder: why one big company complains about memory leaks in node? its true? [07:09] T-Co: mscdex, Yeah. At least that was my assumption, that I could partly use the same flags you have mapped for the search function. [07:10] mscdex: T-Co: the mailbox's permFlags property has a list of modifiable flags [07:10] T-Co: mscdex, Ah, let's see that then. Thanks. [07:10] mscdex: T-Co: i think gmail allows pretty much all of the system flags allowed by imap [07:11] mscdex: T-Co: but ignore the \* flag, that's a special one ;-) [07:12] T-Co: mscdex, Ok. So that is not "Starred" flag? [07:12] mscdex: T-Co: no, hehe [07:13] matjas has joined the channel [07:13] T-Co: mscdex, Does star match to "\\Flagged" then?-) [07:13] Aria: Night, all. [07:14] mscdex: T-Co: no, it's actually an indicator that says the server allows new keywords to be defined for that mailbox [07:14] mscdex: imap keywords [07:14] mscdex: and imap kewords != gmail tags [07:14] mscdex: :\ [07:14] mscdex: *keywords [07:15] T-Co: mscdex, Ah, I see. I'm not very familiar with IMAP. Could you help me figure out a logic where I'd need a way to fetch mails from gmail that are "starred" and then flag them somehow that they wouldn't appear on the next query... [07:18] T-Co: mscdex, Ah, it seems that the "Starred" is a folder of it's own. Let's see [07:18] mscdex: yes [07:18] mscdex: gmail uses separate mailboxes for those categories instead of keywords [07:18] steph2 has joined the channel [07:18] mscdex: which is pretty silly [07:20] T-Co: mscdex, node-imap I believe does not yet offer functionality to move mails between boxes? [07:20] mscdex: not yet [07:21] T-Co: mscdex, Pray, a feature request then. ;) [07:22] cataska has joined the channel [07:23] TomY has joined the channel [07:25] mytrile has joined the channel [07:27] T-Co: mscdex, This might prove useful: ​​http://stackoverflow.com/questions/2455266/attaching-labels-to-messages-in-gmail-via-imap-using-code [07:28] T-Co: Though, gmail claims that [Gmail]/Starred is unknown mailbox :( [07:29] ryah: gdb plugin for stack traces in v8 would be great. [07:29] ryah: i wonder if that's hard... [07:29] ryah: (not going through the debugger protocol - just walking the stack in memory) [07:29] ryah: the js frames are empty when you look in gdb [07:32] ryah: http://sourceware.org/gdb/current/onlinedocs/gdb/JIT-Interface.html#JIT-Interface [07:33] mikeal1 has joined the channel [07:35] nsolsen has joined the channel [07:45] ryah: someone should really make a ncurses gmail app [07:45] fangel has joined the channel [07:45] ryah: mutt style. [07:45] ryah: there's an api, right? [07:46] Tim_Smart: That would be interesting. I'm not sure if there is... Just an IMAP api. [07:46] ryah: (non-imap api, hopefully [07:47] Tim_Smart: Kinda cool how the web gmail app has vim-ish bindings [07:48] jpld has joined the channel [07:50] mbrochh has joined the channel [07:50] kjeldahl has joined the channel [07:50] ryah: i would so love a decent command line email client.. [07:51] ryah: nope, does not appear so. [07:56] ph^ has joined the channel [07:58] ryah: why do people do oauth? why not with ssl certs? [07:58] mohiam has joined the channel [08:00] jesusabdullah: Cause twitter did it [08:03] mikedeboer has joined the channel [08:06] mjr_: ryah: because somebody want to control the identity / "own" the customer. [08:07] mjr_: And still let other people write code that uses those customers, without transferring the ownership of that customer to the people who write the other code. [08:07] evanmeagher: does `npm install markdown` work for anyone? [08:08] mjr_: They'll talk about how it protects 3rd party developers from liability and makes their lives easier, and in some cases both mightbe true. [08:08] mAritz has joined the channel [08:09] JimBastard: HOLY SHIT [08:09] MikhX has joined the channel [08:09] JimBastard: http://twitter.com/davewiner/status/6612931823271936 [08:09] JimBastard: WOOOAHHHHHH [08:09] JimBastard: shit just got real [08:10] guybrush: gz [08:11] ryah: JimBastard: awesome :) [08:11] JimBastard: :-) [08:12] wycats has joined the channel [08:12] wycats: is npm working with the latest node head? [08:15] ryah: wycats: i believe so [08:15] ryah: it was broken a few days ago - but it shouldn't be any more [08:15] wycats: ryah: I'm getting an ENOENT [08:15] ivanfi has joined the channel [08:15] ryah: ACTION installs npm again :) [08:16] ryah: (i'm always deleting my node installs) [08:16] mytrile1 has joined the channel [08:17] wycats: haha [08:18] ryah: npm ERR! failed to fetch http://registry.npmjs.org/npm/-/npm-0.2.8-1.tgz [08:18] ryah: npm ERR! Error installing npm@0.2.8-1 [08:18] ryah: npm ERR! Error: Failed to create /tmp/npm-1290413906222/1290413907096-0.3319005141966045.tgz: ENOENT, No such file or directory '/tmp/npm-1290413906222/1290413907096-0.3319005141966045.tgz' [08:18] ryah: hm [08:19] mjr_: isaacs told me today that he had just changed that bit to make it more portable. [08:19] mjr_: The temp file creation thing. [08:19] T-Co: mscdex, Found out what my problem was. Note that when localizing gmail user interface the box names also get updated accordingly. "[Gmail]/T&AOQ-hdell&AOQ- merkityt" was the Finnish translation in this case. I changed the web interface back to english and after that, "[Gmail]/Starred" [08:20] mscdex: T-Co: ah [08:21] slaskis has joined the channel [08:22] wycats: ryah: that's what I'm seeing [08:25] rauchg_ has joined the channel [08:25] ryah: hm [08:25] ryah: i guess it's broken - i'll tell isaac about in the morning [08:26] wycats: :/ [08:26] markwubben has joined the channel [08:27] ryah: 24 hour service to open next week ;) [08:28] ryah: oh, that reminds me [08:28] ryah: i need to start this os module. [08:28] ryah: need mkstempfile (or whatever it's called) [08:28] ryah: mkstemp [08:29] mikew3c_ has joined the channel [08:30] felixge has joined the channel [08:30] muk_mb has joined the channel [08:31] Nohryb has joined the channel [08:31] kjeldahl has joined the channel [08:31] rajeshsr has joined the channel [08:32] SamuraiJack has joined the channel [08:33] bahamas has joined the channel [08:35] Druid_ has joined the channel [08:35] Tim_Smart has joined the channel [08:38] wycats: ryah: the :/ wasn't a complaint [08:38] wycats: :) [08:40] liar has joined the channel [08:41] steph2 has joined the channel [08:47] Wyverald has joined the channel [08:50] derferman has joined the channel [08:51] margle has joined the channel [08:51] ntelford has joined the channel [08:52] janm has joined the channel [08:53] siculars has joined the channel [08:53] slaskis: is it possible to redirect tthe console to another fd? [08:54] ryah: slaskis: node blah.js > out ? [08:54] ryah: or you want to dup2? [08:55] pdelgallego has joined the channel [08:56] slaskis: ryah: ah of course, but if i'd like to redirect it temporarily to a file? could i somehow change it? [08:56] siculars has joined the channel [08:57] ryah: process.stdout.pipe(fs.writeStream('file')) [08:58] slaskis: ryah: oh, perfect. thanks [08:58] ryah: hopefully that works :) [08:58] ryah: it might be buggy [08:58] ryah: oh, wait - no that wont work. [08:59] slaskis: the console.log has some kind of cache, right? it delays the writes? [08:59] ryah: well - just the queue in the tty device [09:00] slaskis: ah, but sys.puts doesn't do that (or utils.puts now)? [09:00] adambeynon has joined the channel [09:02] slaskis: it might have changed, but i remember being surprised by the logs not being serial during the node knockout [09:04] mikew3c has joined the channel [09:05] ryah: stderr and stdout are not lined up [09:05] ryah: but each of them alone is ordered [09:05] slaskis: ooh, so that's why, makes sense [09:09] matjas has joined the channel [09:09] javruben has joined the channel [09:10] TomY: anyone know if it is possible in 0.2.5 to handle ECONNREFUSED in the http client? [09:10] TomY: there doesn't seem to be a suitable event [09:15] SubStack: TomY: just do .on('error', ...) [09:16] SubStack: require('net').createConnection('doom').on('error', console.dir) [09:19] romainhuet has joined the channel [09:19] delapouite has joined the channel [09:19] TomY: SubStack, thanks. Used request.connection.on('error', ...) [09:20] mikew3c_ has joined the channel [09:20] peutetre has joined the channel [09:23] sveimac has joined the channel [09:25] mikedeboer has joined the channel [09:29] danslo has joined the channel [09:31] markwubben has joined the channel [09:32] confoocious has joined the channel [09:32] confoocious has joined the channel [09:33] virtuo_ has joined the channel [09:35] omarkj has joined the channel [09:35] [AD]Turbo has joined the channel [09:39] sriley has joined the channel [09:40] Twelve-60 has joined the channel [09:47] mpoz2 has joined the channel [09:50] mbrochh has joined the channel [09:52] caolanm has joined the channel [09:57] ewdafa has joined the channel [09:58] zimbatm has joined the channel [09:59] erlnoob has joined the channel [10:04] erlnoob: how do you really handle 404 using expressjs? using app.all('*', ... ) isn't really the solution because next() in valid routes will execute that route as well [10:04] slaskis: erlnoob: isn't there an app.error() ? [10:05] slaskis: erlnoob: http://expressjs.com/guide.html#Error-Handling [10:06] stagas has joined the channel [10:07] d0k has joined the channel [10:08] erlnoob: slaskis: yes, but my understanding is app.error() handles errors thrown by our code (using throw new Error...) [10:09] saschagehlich has joined the channel [10:11] erlnoob: since this is a 404, there's no chance our code can even throw an Error [10:11] slaskis: erlnoob: hmm, you might be right, but if no next is found won't it throw an error ? [10:11] erlnoob: err forget that last line [10:12] derRichard has joined the channel [10:12] slaskis: or maybe that's only if you've set error handling middleware...not sure now [10:12] derRichard: does node have a simple and stupid include function? like #include in c? [10:13] erlnoob: derRichard: require is the only way [10:13] derRichard: damn :( [10:15] markwubben has joined the channel [10:15] mAritz: erlnoob: well, you should have some middleware before your 404 handler that doesn't call next(). or do sth like req.found = true; and then in your 404 if(!req.found) res.render('404'); [10:15] mscdex: hmm...i thought ssdp was dead? [10:16] erlnoob: the docs is just plain ridiculous: app.get('/404', function(req, res){throw new NotFound;}); [10:16] erlnoob: there would actually be a /404 route you can visit then haha [10:17] erlnoob: mAritz: your solution might just be it [10:17] derRichard has left the channel [10:18] erlnoob: but I'm a little bit wary of adding properties to the request and response objects, what do you think? [10:19] mAritz: i do it all the time [10:19] mAritz: req.rlocals for render locals for example [10:20] comster: im having trouble with express... trying to use an app.all() I get... Object # has no method 'all' [10:20] matjas has joined the channel [10:20] mAritz: oh wait, i put them in res. but i have req.tr which is a translation function. can't define it as a dynamichelper (which would basically just add to req/res itself) because i need it outside of views, so i put it there. [10:20] erlnoob: comster: update to 1.0.0 [10:21] comster: k, I kinda figured I was... I'll take another look [10:22] erlnoob: can anyone familiar with rails comment on express' req.flash ? does it behave the same? [10:24] mAritz: erlnoob: no idea about rails but the documentation of req.flash is pretty concise!? [10:25] erlnoob: mAritz: yes, I was just curious. turns out req.flash is meant for string messages only. I was using it for boolean flags too, and it eats false values [10:26] stephank has joined the channel [10:26] cefn has joined the channel [10:27] mAritz: you can use a custom flashformatter [10:27] mAritz: the default one really just does return String(val); [10:27] Evet has joined the channel [10:27] Evet has joined the channel [10:29] erlnoob: I was thinking of using req.flash to temporarily save form values and boolean flags, just for one redirect (to re-render the form with populated values after a failed validation) [10:29] mAritz: oh wait, it also runs it through 2 filters (htmlescape and minimarkdown). this explains some of the problems i had with it :x [10:29] mAritz: why do you redirect after a failed form validation? :o [10:30] erlnoob: mAritz: because, if you don't, what happens when the user refreshes the browser? [10:31] mAritz: the form gets resubmitted [10:31] erlnoob: this is after a post request remember [10:31] erlnoob: exactly, it's ugly [10:31] mAritz: in my opinion redirecting is ugly because it breaks expected behaviour [10:32] mAritz: but that's just the programmer talking. [10:32] erlnoob: so you just re-render it straight away? [10:32] mAritz: it's also easier to debug validation if i can just hit f5 with wrong fields :D [10:32] erlnoob: haha [10:32] mAritz: yep [10:33] mAritz: only time i do redirect is after a succesful login POST [10:33] cainus_: any node-mysql users in here? I get this weird error, when I know the credentials are right: https://gist.github.com/709498 [10:33] erlnoob: what i think we need is some kind of flashsession, that behaves just like a session, without any kind of garbage wrapped around it but survives for just the next request [10:34] mAritz: cainus_: is the server running? (stupid question but it's often the right one for that error message :D ) [10:34] cainus_: yeah... I can hit it from php with no problems [10:34] cainus_: same credentials, same machine [10:34] mAritz: erlnoob: yeah, that's what i expected flash to be as well when i first used express :( [10:34] mAritz: ended up implementing it myself [10:35] davidc_ has joined the channel [10:35] erlnoob: mAritz: i know, i built a php framework with this functionality too in the past [10:35] erlnoob: mAritz: can you somehow share the code? :) [10:35] mAritz: cainus_: is the correct port used? [10:35] Wizek has joined the channel [10:36] Wizek: Hi [10:36] cainus_: mAritz: quadruple checking... [10:36] mAritz: hm, seems i ditched it in my current app. have to dig it up [10:36] Wizek: Is there a way to add an exception to connect's static provider? [10:37] cainus_: mAritz: yep...that's okay too [10:38] maushu has joined the channel [10:38] Wizek: Like, to specify it doesn't have to look for /foo/ subfolder, because my custom Node code handles that othervise [10:38] mAritz: erlnoob: nah, can't find it. but really it shouldn't be hard. [10:38] erlnoob: mAritz: ok thanks for trying to dig it up :) [10:38] maushu: I had a great idea! [10:38] cainus_: mAritz: also... is there any way to catch that error? [10:39] cainus_: I figured the error would get passed to the callback [10:39] mAritz: Wizek: i don't think so. but i think you could just define multiple static handlers for the folders you do want handled. [10:39] maushu: Let's write a browser in javascript! [10:39] mAritz: maushu: how come your annoying twitter bot is gone? :DDD [10:40] Wizek: maushu: Haha! So that it can render javascript apps served from node? :P [10:40] maushu: I have no idea. [10:40] maushu: I blame twitter. [10:40] maushu: _announcer: clean the tubes [10:40] maushu: _announcer, clean the tubes [10:40] maushu: ... [10:40] mAritz: cainus_: process.on('uncaughtException', function (e) {}); [10:40] maushu: ACTION pokes _announcer. [10:41] cainus_: I have to wawit for it to bubble all the way to the top? [10:41] maushu: Wizek: Yes, and then send the rendered image to the browser using a websocket and canvas. [10:41] mAritz: maushu: don't try fixing it! [10:41] maushu: mAritz: Too late. [10:41] mAritz: cainus_: probably [10:41] mAritz: NOOOOOOOOOOO [10:41] cainus_: bah :\ [10:41] margle has joined the channel [10:42] mAritz: don't know anything about node-mysql. maybe it triggers an error event and just throws if nothing handles it? (though i think support for that isn't in 0.3.1 yet, not sure) [10:42] _announcer has joined the channel [10:43] cainus_: alright thanks... I'll go source diving [10:43] mscdex: _announcer! [10:43] maushu: Fixed, I think. [10:43] Wizek: mAritz: How do I specify connect.staticHandler to only operate on http://localhost/www/ instead of pure http://localhost/ ? [10:44] mAritz: you have to set the root option [10:44] mAritz: (i think) [10:44] maushu: Real men write the http server from scratch. [10:45] mAritz: wizek: wait, no. i think i misunderstood your question [10:45] Wizek: mAritz: That's for the place where from the files will be served. [10:45] Wizek: mAritz: + [10:46] mAritz: http://senchalabs.github.com/connect/staticProvider.html [10:47] wattz has joined the channel [10:47] mAritz: if you have a folder "connectserver" and in that folder app.js which has the call "connect.staticProvider(__dirname + '/public')", then make a folder "connectserver/public/www" and all the stuff in that folder is reachable via localhost/www [10:48] Wizek: mAritz: I already know that, but [10:48] Wizek: mAritz: the problem cames in, that connect want to handle each and every request on the entire host [10:49] Wizek: mAritz: So, it will take over localhost/ggg as well [10:49] Wizek: and won't find the folder ggg [10:49] mAritz: not if you don't have connect/public/ggg [10:50] Wizek: mAritz: it does. It won't find it, and will return no response [10:51] Wizek: mAritz: The browser is left without any clue what happens on the server [10:51] mAritz: Wizek: if you request localhost/ggg/blub.html and it doesn't find connectserver/public/ggg/blub.html it just calls next() [10:52] mAritz: well, you have to define some more middleware of course... what's supposed to happen if you go to localhost/ggg/blub.html (or whatever)? [10:54] Wizek: mAritz: Aha! I just tested it, and both of us were right some part [10:54] Wizek: mAritz: A plain staticprovider, eg: connect.createServer( connect.staticProvider(__dirname + '/static') ).listen(port, callback) [10:54] Wizek: mAritz: does return that it doesn't find the file [10:55] Wizek: mAritz: but, if I have server.use() [10:55] Wizek: mAritz: it is stuckű [10:55] caolanm: ACTION is currently having to double unit test timeouts for IE ;) [10:55] Wizek: mAritz: it still serves the files it finds, but doesn't return when it don't [10:56] mAritz: yeah, because it just calls next() [10:56] mAritz: that's what a middleware is supposed to do if it doesn't find anything [10:57] mAritz: and if next is called and no more middleware is available, it gives you an error [10:57] sveimac has joined the channel [10:58] Wizek: mAritz: it doesn't give me an error [10:58] Wizek: mAritz: it just won't respond to the browser [10:58] Dreamer3 has joined the channel [10:58] Wizek: mAritz: and also, I have a swich in server.use(), which is to handle a particuler url [10:59] Wizek: mAritz: which happens to work just fine without staticprov. [10:59] Wizek: mAritz: but is not called at all when I have staticprovider [10:59] Wizek: I mean, the switch is called, but the request.on('end' does not [11:00] mAritz: could you gist it? because according to the connect source code if you don't have any middleware after the staticprovider and the provider doesn't find a file it should send a 404 [11:03] Wizek: mAritz: I just did it :) https://gist.github.com/709818 [11:04] mAritz: uhm... you do realize that connect provides a router? :D [11:04] mAritz: and a favicon middleware [11:05] mAritz: and a bodydecoder middleware [11:05] mAritz: xD [11:06] mAritz: also, why do you wrap the server creation in a function? [11:06] Wizek: mAritz: Don't really, I wrote this with plain node, and only put connect in so that it serves some files for me [11:07] Wizek: mAritz: I used part of this code for some mass testing, for which I needed quite some servers [11:07] christophsturm has joined the channel [11:07] mAritz: okay :D [11:08] Wizek: mAritz: My first goal is to make it work, then I'll vlean up the code [11:08] erlnoob: mAritz: I'm not familiar with node.js internals wrt to memory consumption, but after adding custom properties to the request/response object, do you "delete req.custom" them at the end of the chain? [11:08] mAritz: the 404 thing in chrome is annoying, do you know how to fix that? (haven't looked at it yet) [11:09] Wizek: mAritz: - [11:09] Wizek: mAritz: So, what is that bodydecoder and router middleware you are talking about? [11:12] mAritz: erlnoob: req and res are only there as long as the request is active. as soon as you res.send or res.render or reach the end of the middleware chain it deletes them. (wel, technically response.end is called which does it. http.ServerResponse.end to be exact) [11:12] Wizek: mAritz: Also, take a look at line 28 and 30 and my problem becoems apparent [11:12] mAritz: Wizek: http://senchalabs.github.com/connect/ [11:13] erlnoob: mAritz: I'm guessing that's a no then :) thanks for the explanation [11:14] Wizek: mAritz: I don't quite want to read throught the whole doc, but thanks. As I said the problem is between line 28 and 30, and I think you can easily reproduce it. [11:14] jamescarr: does require('http', function(http){}); syntax no longer work??? [11:14] SubStack: require.async [11:16] mAritz: Wizek: hm.... weird. maybe connect somehow blocks your eventlistener. but i don't think so. [11:16] Wizek: mAritz: then overrides it, or what? [11:17] mAritz: Wizek: wait, your first log isn't in the data event. does the data event even get fired? [11:18] jamescarr: SubStack, the cb gets called using that, but the function arg of the callback is null [11:18] jamescarr: require.async('http', function(http){ console.dir(http); }); [11:18] mAritz: wizek: i'm not very familiar with the request events, but maybe you're just registering the listeners after the request has been completely handled by connect. try removing connect and do it with a plain http server. [11:18] mAritz: jamescarr: what's this in the function? [11:18] aliem has joined the channel [11:19] mAritz: (just a hunch) [11:19] SubStack: odd [11:19] jamescarr: yeah [11:20] jamescarr: oh [11:20] Wizek: mAritz: How to do static serving with vanilla node? I think SubStack was the one who told me yesterday that it is a hastle and an error prone, so I shouldn't tuch that. What is your point? Is it easy then? [11:20] jamescarr: require.async('http', function(err, http){ console.dir(http); }); [11:20] jamescarr: that worls [11:20] jamescarr: *works [11:20] tanepiper: JimBastard? http://www.youtube.com/nodejitsu#p/a/u/0/eRISZCk4IE0 [11:20] derferman: what's the best node irc bot out there? [11:21] mAritz: Wizek: no, it's not easy. i just meant that as a way to test the request event listeners [11:21] jamescarr: Wizek, using the http module for a server is like using servlets in java... [11:21] mAritz: derferman: :D [11:21] jamescarr: sure it works and it's simple, but other people have written frameworks on top that are easier and require less code [11:21] jamescarr: like express or connect [11:21] Wizek: mAritz: I don't have to test it, if I remove connect, I know it works. [11:22] demolithion has joined the channel [11:22] Wizek: mAritz: I mean, I've already tested it. but then, I cannot serve files [11:22] derferman: mAritz: I'm actually working on setting one up for another channel, and not sure to go with one in python or nore [11:22] derferman: node* [11:22] Wizek: jamescarr: I have connect, but this way I cannot do special handeling for some url, because connect trys to handle them [11:23] mAritz: derferman: http://github.com/gf3/Jerk http://github.com/gf3/IRC-js depends on what you want. jerk is more high-level [11:23] mAritz: Wizek: use the connect router [11:24] mAritz: there's no reason to write this stuff yourself. but if you absolutely want to, you have to define the event listeners for requests outside of the connect middleware because at that point the request is already parsed. [11:24] Wizek: mAritz: And one more interesting fact: Connect only messes with GET requests. It lets PUT and DELETE through to be handled by others [11:24] mAritz: Wizek: the staticprovider immediately calls next() on all non-GET requests [11:26] mAritz: Wizek: another friendly hint: use the node.js coding guidelines and use them consistently. (mainly 2 spaces as tabs) [11:28] markwubben has joined the channel [11:28] Wizek: mAritz: I consistently use tab as tab. :D But why? does it parse spaces farter? Aren't removing whitespaces the first thing V8 does when confronted with code? [11:29] christophsturm: is there a testing framework with normal assert syntax (not bdd) that offers nested contexts? [11:29] mAritz: no, it's just for universal readability. [11:29] Wizek: mAritz: You mean, that tabs are too long? [11:29] mAritz: and they are tabs [11:30] mAritz: if you ever want other people to contribute to your code, you're better off using the standard. which in node.js' case is 2 spaces. [11:31] caolanm: christophsturm: nested contexts? [11:31] zorzar_away has joined the channel [11:31] mraleph has joined the channel [11:31] ooooPssss has joined the channel [11:32] Wizek: mAritz: I just want to understand why 2spaces has been chosen over tabs. In my editor, tabs are set to 2 spaces width anyways (http://prntscr.com/17g4p), and I'm better off hitting one tab instead of 2 spaces. [11:32] caolanm: Wizek: tabs are different lengths depending on your settings [11:32] SubStack: 4 spaces, 80 cols! [11:32] caolanm: SubStack++ ;) [11:32] christophsturm: caolanm: like test groups in nodeunit, nested, and each testgroup would also call setup and teardown of the parent context [11:33] christophsturm: I think vows has nested contexts but it does seem a bit complex [11:33] caolanm: christophsturm: ah yes, I think you asked something similar recently with setUpOnce and tearDownOnce? [11:33] christophsturm: caolanm: yeah, its a bit related [11:33] SubStack: when I use 2 spaces my code gets more nested and convoluted [11:33] caolanm: christophsturm: hmmm, interesting [11:33] mAritz: uhm... 2 spaces please. https://github.com/ry/node/wiki/Contributing [11:34] SubStack: having that right margin come up faster can be nice [11:34] marshall_law has joined the channel [11:34] SubStack: but anyways, if your project has gotten so big that lots of people are contributing to it instead of writing their own modules that depend on your code, something is amiss [11:35] SubStack: exceptions granted for c++ code of course because c++ sucks for writing modular code [11:35] Wizek: mAritz: Seems like the standard is to diver from the standard :P [11:35] caolanm: mAritz: when I view a file with tabs, they show up as: ^I [11:35] mAritz: caolanm: haha... :D [11:35] caolanm: just imagine how ugly that is [11:35] mAritz: i can live with 4 spaces if i have to, but tabs are the worst [11:35] christophsturm: caolanm: so i have one parent context that creates a http server, then one child for get requests, one for post requests. the main reason is to avoid code duplication in the tests [11:36] Wizek: mAritz: But you haven't told my why [11:36] mAritz: SubStack: on a netbook for example i really don't like my code touching the 80 column mark. [11:36] Wizek: mAritz: only that tha's the "standard" [11:36] mAritz: Wizek: caolanm told you why [11:36] Wizek: mAritz: You write code on netbook? [11:36] mAritz: yes [11:36] sixtus42 has joined the channel [11:37] mAritz: i'm a freelancer and travel a lot. which means that i don't have a desktop 70% of my free time. [11:37] caolanm: christophsturm: I think in that case I would generate the tests to export, modules are quite flexible in that way [11:37] SubStack: mAritz: 80 cols is also a good rule to gently discourage flow that is too nested [11:37] Wizek: mAritz: you are my man! I'm planning on buying a netbook/notebook/subnotebook, which one do you have/recommend? [11:37] SubStack: I don't even /have/ a desktop [11:38] SubStack: nor a desk for that matter [11:38] SubStack: just this thinkpad [11:38] caolanm: christophsturm: but I don't think I want to support state/context across multiple tests becuase it is primarily a unit test framework [11:38] caolanm: not an integration testing tool [11:38] caolanm: of course, its easy to add if you need it [11:38] Wizek: SubStack: Which thinkpad? [11:38] caolanm: I *love* my thinkpad [11:38] SubStack: Wizek: r61i. I think it's too big but it was pretty cheap [11:39] mAritz: yeah, i know. i use 80 cols as well (except for comments and long regexes/strings sometimes). which means i have my ide set up to pretty much only display the 80 columns, becuase i need all the space i can get on a netbook. that means 2 more spaces at the beginning really hurt me :( [11:39] caolanm: can't believe they've stopped this model [11:39] SubStack: 15" screen, which I guess is measured at the diagonal [11:39] caolanm: christophsturm: did you see nodeunit now has (somewhat experimental) browser support now? [11:40] SubStack: :set textwidth=80 ftw [11:40] mAritz: Wizek: i have the acer 532h. but it's really only good for light stuff. can't really use things like netbeans with it. fullscreen flash laggs and gaming is a no-go (as well as 720p video) [11:40] mohiam has joined the channel [11:40] mAritz: Wizek: but it has ~8 hours of battery life. even with flash video watching it's still ~6 hours. [11:41] Wizek: It seems some of you are fond of your Lenovo :) I'm also thinking about an IdeaPad u165. What do you think of that model? The one which comes with the faster AMD, and has 3-4 gig ram [11:42] SubStack: I hate touchpads. So much. [11:42] christophsturm: caolanm: what do you think of this syntax: https://gist.github.com/a0af6868e2dcce4ee046 [11:42] SubStack: the ideapad line only has touchpads :/ [11:42] caolanm: Wizek: get a thinkpad instead! [11:42] caolanm: so so worth it [11:42] caolanm: I have x301 [11:42] fermion has joined the channel [11:42] caolanm: awesome [11:42] wattz has joined the channel [11:42] christophsturm: I had an x200s, it was great, but now I'm back to macbooks and want to get a macbook air [11:43] caolanm: ah seen a lot of x200 models recently, they look nice [11:43] caolanm: if they don't revive the x300 series I'll probably move onto those next [11:43] caolanm: christophsturm: that looks sensible [11:44] caolanm: I think that would be easy to support [11:44] Wizek: caolanm: why worth it? [11:44] pdelgallego has joined the channel [11:44] caolanm: just note that it would run both setUp functions for *each* test [11:44] SubStack: if I had a macbook I would just end up installing xmonad on it so why bother :/ [11:44] caolanm: Wizek: the build quality, the keyboard, the 'nipple' [11:44] caolanm: ...matte screen [11:44] SubStack: matte \m/ [11:44] christophsturm: caolanm: for each test in "group1" it should run both setups [11:44] caolanm: christophsturm: yes, that's what I'd expect [11:45] caolanm: ok, I think that's a good solution [11:45] christophsturm: that would be a really easy way to keep *unit syntax and have nested setup / teardows [11:45] caolanm: only nodeunit.testCase should need updating I think [11:45] caolanm: christophsturm: yeah, I like it :) [11:47] christophsturm: great. do you want me to work on a patch, or is it really easy for you? [11:49] caolanm: I don't mind doing it but I'm very busy this week so it might not make it into nodeunit for a while [11:49] caolanm: so if you need it fast you might want to add it yourself [11:49] caolanm: ;) [11:49] unomi has joined the channel [11:50] christophsturm: ok, I'll take a look at it now [11:50] caolanm: the relevant code is in lib/core.js [11:50] caolanm: exports.testCase is probably all you'll need to update [11:50] christophsturm: ok great [11:51] mbrochh has joined the channel [11:51] mbrochh has joined the channel [11:53] saschagehlich has joined the channel [11:54] erlnoob: does anyone know how to change the cookie session name in express/connect (the default is connect.sid) [11:57] tg has joined the channel [11:58] Wizek: caolanm, SubStack: what do you think about the ThinkPad SL510? [12:00] caolanm: I wouldn't normally buy a model that big, I like to be able to move my laptop around easily [12:01] caolanm: personally I think a 13" screen is the sweet-spot for a laptop [12:01] caolanm: but I suppose that depends on whether you plan to move your laptop around much [12:01] mAritz`afk: erlnoob: weird that that isn't in the docs. the options you can specify include: store, fingerprint, secret and key. only the first two are documented... key is the one you want. and secret really should be set by you as well. (there's even a comment in the code that says so, but again nothing in the docs) [12:02] SubStack: yeah too big [12:02] erlnoob: mAritz`afk: thanks again :) [12:03] mAritz`afk: erlnoob: no problem, i like digging in the connect code. i learn stuff this way as well :) [12:03] ilpoldo has joined the channel [12:03] caolanm: I should *really* get around to porting the connect cookie-sessions middleware to work with as a session-store instead [12:03] Wizek: SubStack, caolanm: Then, which Thinkpad is good at 13" size, and around this price? [12:03] erlnoob: haha yeah i'll be digging the code tonight [12:03] wattz has joined the channel [12:03] skohorn has joined the channel [12:04] caolanm: Wizek: unfortunately they seem to have stopped the 13" models :( [12:04] Wizek: caolanm: Tehn a 14" one? [12:04] skohorn has joined the channel [12:04] hoffa_ has joined the channel [12:04] mAritz`afk: caolanm: what do you mean? store the session info in the cookie? [12:04] Wizek: or 12,6" [12:04] SubStack: Wizek: I've been eyeing the x-series line for a while [12:04] caolanm: mAritz`afk: yeah, I authored some middleware for storing session info in secure cookies [12:04] caolanm: its useful and works fine [12:05] caolanm: its just odd that is not available as a session store [12:05] caolanm: and has to be used as a middleware instead [12:05] ilpoldo: Tim_Smart: hi, I'm trying to use node-asset on my development machine. I found a coffee script snippet but can't make it work. Anygood how to-s anywhere? [12:05] caolanm: Wizek: one option is to get one of the x200 series with a dock [12:05] caolanm: if you already have a desktop that is [12:06] caolanm: but you can probably still work on an x200 fine [12:06] cognominal has joined the channel [12:06] caolanm: they manage to squeeze 1440x900 onto one of the screens I think [12:06] christophsturm: yeah [12:06] christophsturm: i had that in my x200s [12:07] caolanm: Wizek: I don't know much about the 14" models, but I know a lot of people with an x200s / x201s [12:07] caolanm: they all seem to really like it [12:07] caolanm: there must be 4 of them currently in the office I'm in [12:08] mAritz`afk: anyone here using cloud9 yet? [12:08] vdrab has joined the channel [12:09] caolanm: mAritz`afk: I have vim ;) [12:09] guybrush: mAritz`afk: tried it but doesn't fit all me needs [12:09] maushu: Okay, I need a name. [12:09] caolanm: maushu: how about maushu? [12:10] mikedeboer: mAritz`afk: I do, but I'm biased :) [12:10] mAritz`afk: nah, maushu kinda sucks. how about _announcer? [12:10] maushu: Maushu doesn't sound like javascript hosting. [12:10] mAritz`afk: mikedeboer: in what way biased? are you one of the devs? :) [12:10] mAritz`afk: maushu: jshost [12:10] SubStack: lulzbot! [12:10] mAritz`afk: pronounced: j-shoust [12:10] maushu: That feels old. [12:10] guybrush: what about tpircsavaj [12:11] maushu: That doesn't make sense. [12:11] mikedeboer: mAritz`afk: yep :) but honestly, it's Node debugging bliss [12:11] maushu: Something with nodes in the middle. Since it uses nodes. [12:11] mscdex: jsnodeshosting [12:11] mscdex: jshostingnodes [12:11] mscdex: nodejshosting [12:11] mscdex: :D [12:12] MikhX has joined the channel [12:14] iszak has joined the channel [12:14] mscdex: how about graphnode? [12:14] mscdex: :> [12:16] maushu: mscdex: That is what I'm using. [12:16] mscdex: what's wrong with that one? [12:16] maushu: mscdex: Too big. [12:16] mscdex: heh [12:17] mscdex: use a url shortener :P [12:17] stagas: maushu: http://impossibility.org [12:17] maushu: http://min.us/ http://www.dropmocks.com/ [12:17] maushu: Which one of these two do you think got more success? [12:18] mscdex: probably dropmocks [12:18] mscdex: minus sounds too negative [12:18] unomi has joined the channel [12:18] maushu: Not really. [12:19] mscdex: what about "noders"? [12:19] mscdex: heh [12:19] maushu: ACTION facepalms. [12:20] mscdex: nodeho.st? lol [12:21] mscdex: that one is available [12:22] maushu: I don't like it. :| [12:22] _mql has joined the channel [12:22] mscdex: :S [12:22] guybrush: dropmocks is kinda nice [12:22] guybrush: like it [12:22] mscdex: see [12:22] maushu: nodi.us [12:23] mscdex: too bad maus.hu is taken [12:23] maushu: *sigh* I will just use graphnode and change later. [12:27] mpoz2 has joined the channel [12:32] skohorn has joined the channel [12:32] DoNaLd`: all: which CouchDB client you prefer ? .. i need some which will be supported and developed some time .. not like node-couchdb .. which is now no longer maintained .. [12:32] gbot2: DoNaLd`: spidermonkey: Error: SyntaxError: missing ; before statement: which CouchDB client you prefer ? .. i need some which will be supported and developed some time .. not like node-couchdb .. which is now no longer maintained [12:33] iszak: DoNaLd`, try them all out, then you will know. [12:33] DoNaLd`: :) [12:33] iszak: That is the preferred method from sifting through shit modules vs good ones. [12:34] SubStack: good secondary heuristics: being on npm (+5), runs on v0.3 (+10) [12:34] SubStack: code in the readme (+5) [12:34] iszak: runs on v0.3.x (-10) according to some. [12:35] iszak: Because you shouldn't be using 0.3.x according to some. [12:35] SubStack: pfft [12:35] iszak: Atleast not for production, I disagree however I am only spreading what appears to be the consensus. [12:35] bsstoner has left the channel [12:35] iszak: "too unstable" they say "api likely to change" they so, regardless. [12:36] ooooPssss_ has joined the channel [12:40] wattz has joined the channel [12:40] unomi has joined the channel [12:41] maushu: Use v0.3.1 for production. [12:42] DoNaLd`: Cloud9 is not workable on this version of node [12:47] stride: vim is [12:47] mikedeboer: DoNaLd`: we're working on that [12:47] stride: :) [12:48] mikedeboer: DoNaLd`: but we also ship cloud9 with pre-built node binaries [12:48] DoNaLd`: mikedeboer: ok .. so i can it test on my instance ? [12:49] mikedeboer: yup [12:52] DoNaLd`: ok .. give me url :) [12:57] pdelgallego has joined the channel [12:57] dberlinger has joined the channel [13:01] markwubben has joined the channel [13:03] c4milo has joined the channel [13:07] okuryu has joined the channel [13:07] hoffa_ has joined the channel [13:07] guybrush: callee is deprecated? [13:09] MattJ has joined the channel [13:09] guybrush: according to crockford http://www.crockford.com/javascript/recommend.html [13:10] wattz has joined the channel [13:10] guybrush: well I will ignore this for now.. [13:11] SubStack: you can just name functions inline [13:11] SubStack: zing(function f () { }) [13:12] guybrush: ok [13:14] ianward has joined the channel [13:15] sclaflin has joined the channel [13:16] christophsturm: why does this work in javascript? https://gist.github.com/a62cb4aa8ed9beb14273 i would have thought that those 2 lines need to be in the opposite order [13:16] markwubben has joined the channel [13:17] iszak: nah. [13:17] Evet has joined the channel [13:17] guybrush: christophsturm: i dont know how this is called, but without `var` the function is accessable regardless where it is defined [13:17] Evet has joined the channel [13:17] iszak: global? [13:18] heavysixer has joined the channel [13:18] guybrush: `module.exports = Connection; var Connection = function(){};` wont work [13:18] guybrush: mhh i guess :p [13:18] christophsturm: ok, but forget about scope. [13:19] christophsturm: x=y; y=2; doesnt work [13:19] christophsturm: so why does x=Connection; function Connection() work ? [13:19] caolanm: christophsturm: think of it as module.exports = global.Connection; global.Conection = function () {...} [13:20] caolanm: then it makes sense [13:20] christophsturm: caolanm: and that does work even when global.Connection is set afterwards? is [13:21] caolanm: same as with any other object, you can call other exported functions without defining them first [13:21] caolanm: hmmm, wish I knew the proper terms to explain this [13:23] caolanm: ok, perhaps my example is actually more confusing [13:23] caolanm: becuase in js doing that global.Connection would return undefined [13:24] caolanm: rather, think when accessing a global it actually reads 'global.name' [13:24] caolanm: so its always accessed as a property of the global object [13:24] caolanm: like writing exports.name [13:24] caolanm: and because objects are always referenced not copied [13:24] caolanm: if global has been updated [13:24] caolanm: you get the new property [13:25] caolanm: ...I may be making no sense [13:25] caolanm: ;) [13:26] pagameba: C++ help needed, argv[0] = Boolean::New(true); gives compiler error no match for operator= [13:27] sixtus42 has joined the channel [13:28] pagameba: code and error: https://gist.github.com/709968 [13:28] guybrush: christophsturm: The function statement is magic and causes its identifier to be bound before anything in its code-block* is executed. http://stackoverflow.com/questions/261599/why-can-i-use-a-function-before-its-defined-in-javascript [13:29] christophsturm: ah that makes sense [13:29] guybrush: the code-block in your example is the file [13:31] guybrush: anyway, `var foo = function() {}` is a variable declaration [13:31] guybrush: http://www.dustindiaz.com/javascript-function-declaration-ambiguity/ [13:32] guybrush: so, functions declarated with var have to be defined before you can use them [13:32] romainhuet has joined the channel [13:32] christophsturm: has nothing to do with var actually [13:32] christophsturm: https://gist.github.com/24650424e29980e42696 [13:32] christophsturm: blah=function() {} also doesn't work [13:32] guybrush: ah ok [13:33] guybrush: with var its private in the code-block [13:33] christophsturm: guybrush: thanks for that link, it makes sense [13:33] guybrush: had to look it up myself, getting confused from time to time :p [13:33] christophsturm: i think its just parsing order. the javascript engine collects all the functions first and then it executes the rest [13:34] guybrush: puuh i dont know that, it is a wild guess :p [13:37] christophsturm: guybrush: its just a different way to say what you said " The function statement is magic and causes its identifier to be bound before anything in its code-block* is executed." [13:37] guybrush: actually i just copy-pasted that [13:37] christophsturm: yeah [13:37] christophsturm: i did read that page in the meantime [13:40] DoNaLd`: some idea ? http://pastebin.com/9kamzwyy [13:40] herbySk has joined the channel [13:42] christophsturm: new(CouchDB.Connection)().database('my_db'); [13:42] DoNaLd`: same issue [13:45] zimbatm has joined the channel [13:49] trotter has joined the channel [13:50] christophsturm: caolanm: i think its possible that the testcase method needs to be refactored a bit for the nested groups. I'm having a hard time understanding how it works [13:50] mbrochh has joined the channel [13:53] sixtus421 has joined the channel [13:53] dnolen has joined the channel [13:54] pagameba: anyone around that can help with node extension C++ stuff? stephank perhaps? :D [13:55] stephank: pagameba: don't ask to ask, just ask. :) [13:55] pagameba: hah gotcha! [13:56] malkomalko has joined the channel [13:56] pagameba: I'd like to return an instance of my Error object to a callback as the first param but I can't figure the syntax to do it … https://gist.github.com/710009 is the code block [13:56] pagameba: returning Integer::New(1) works to indicate an error but I'd like to make it an instance of ErrorObj [13:57] markwubben has joined the channel [13:58] DoNaLd`: Can someone explain to me, why this Fail part code is wrong and OK part code is valid ?? http://pastebin.com/bp7j80dM [14:00] pagameba: DoNaLd`: not sure but try var db_auth = (new(CouchDB.Connection)).database('my_db'); ? [14:00] stephank: pagameba: `Local::New(_err_)`, perhaps even skip the persistent handle entirely? [14:00] caolanm: christophsturm: yes, it looks like it need some attention [14:01] splashs has joined the channel [14:02] danoyoung has joined the channel [14:02] caolanm: christophsturm: damn, thought I could blame someone else for testCase, but it appears it was me, haha [14:02] DoNaLd`: pagameba: ok .. your format is also valid .. [14:04] pagameba: stephank: it compiles but the resulting object is javascript land does not seem to be an ErrorObj [14:04] pagameba: DoNaLd`: I think it is an order of operations thing [14:04] DoNaLd`: pagameba: but i don't understand why .. because i have followed these examples .. http://cloudhead.io/cradle [14:04] christophsturm: caolanm: hehe, that's bad luch [14:04] christophsturm: luck [14:05] stephank: pagameba: Lies! Well, are you looking at the parameter to your ErrorObj constructor? Because that's an external, which I'm not sure what it looks like in JS. But you callback should definitely see an ErrorObj. [14:05] stride: DoNaLd`: have you tried (new CouchDB.Connection).database('my_db'); ? [14:06] stephank: pagameba: perhaps try console.log(err), to see what it looks like when inspected? [14:06] DoNaLd`: stride: yea .. it's valid format [14:07] pagameba: stepank: console.log(err) causes segfault :) [14:08] pagameba1 has joined the channel [14:08] stride: DoNaLd`: yeah but new(function() {}).foo and (new function() {}).foo are two completely different things (the first one would create a new undefined.foo [14:08] stride: (I think) [14:08] stride: or a non-existant .foo in that case [14:08] DoNaLd`: stride: ok .. so exmaples on site http://cloudhead.io/cradle are invalid .. [14:09] InsDel has joined the channel [14:12] femtoo has joined the channel [14:12] pagameba1: DoNaLd`: looks like it :) [14:12] sivy has joined the channel [14:13] pagameba1: stephank: just to be sure what you meant before - was it this? https://gist.github.com/710009 [14:14] stephank: pagameba1: yep [14:15] pfarrel has left the channel [14:15] pagameba1: ok - console.log(err) gives me … https://gist.github.com/710009#comments in gdb (segfault) [14:15] stephank: pagameba1: I'm not sure if it's possible for a NewInstance to return something else. I think you can actually return something else from the ErrorObj constructor [14:15] stride: DoNaLd`: at least the first one there, yep [14:15] stride: DoNaLd`: if you take var cradle = { Connection: function() { this.database = function(foo) { console.log(foo); }; } } [14:16] stride: DoNaLd`: new(cradle.Connection).database would be the same as new cradle.Connection.database, which doesn't really make sense [14:16] stephank: pagameba1: Ouch. Can you paste the entire EIO_AfterDrawMap function? One thing I find suspicious is your call to scope.Close() there. I think you only ever want to use that as a return value. [14:17] jherdman has joined the channel [14:17] DoNaLd`: stride: yes .. thank you for your explain :) [14:17] stride: np [14:17] Tobias| has joined the channel [14:18] caolanm: christophsturm: here's an interesting idea, if you split setUp and tearDown from the tests object and pass 2 arguments to testCase instead of one then no other changes would probably be required [14:18] arpegius has joined the channel [14:18] pagameba1: stephank: https://gist.github.com/710009 it is likely that scope.Close is wrong :) it was the first way I got it to compile and return the Buffer object to the callback so I never looked at it again [14:19] caolanm: because the 2nd argument, which would just be an object containing tests would already be decorated with the setUp and tearDown functions [14:19] caolanm: testCase({setUp: ..., tearDown: ...}, {test1: ..., test2: ...}) [14:20] caolanm: would then 'just work' with: [14:20] caolanm: testCase({setUp: ..., tearDown: ...}, testCase(...)) [14:20] pagameba1: stephank: I can push this code if you still have a working build of mapserver :) [14:21] stephank: pagameba1: at work, atm. I can't really build it here. [14:21] caolanm: christophsturm: ah, but that wouldn't really solve your problem ;) [14:21] caolanm: ACTION shuts up [14:21] pagameba1: stephank: sorry, I shouldn't abuse you! [14:22] SubStack: odd, require('npm').root is not the same as `npm config get root` [14:22] wattz has joined the channel [14:24] sivy has joined the channel [14:25] ajsie has joined the channel [14:28] ajsie: anyone that uses cloud9 ide? [14:28] stephank: pagameba1: Well, I don't know how to get a diff view on github gists, but: https://gist.github.com/710033 [14:28] ajsie: i have installed connect but when i run the script inside cloud9 it says connect module not found [14:28] ajsie: when i run require('connect') [14:29] MattDiPasquale has joined the channel [14:29] wattz has joined the channel [14:30] stephank: pagameba1: Just making sure both argv's are filled, and specify Call(..., 2, argv) (rather than 1). Got rid of the persistent handle. Got rid of scope.Close. Small things really, that I doubt will actually fix a segfault. [14:31] stephank: pagameba1: If it still segfaults, then it could be something in the way you're dealing with mapserver resources? Now that I think of it, extend the TryCatch up to above the if-statement, because you're calling a constructor within there. [14:32] pagameba1: stephank: thanks! works when there is no error but I get an Abort trap in the error case [14:34] pagameba1: https://gist.github.com/710033#comments [14:34] pagameba1: I'll gdb it [14:39] pagameba1: stephank: the abort was my problem, not setting data explicitly to NULL when the drawmap failed before AfterDrawMap is called so it was trying to free an invalid buffer [14:40] losing has joined the channel [14:40] Booths has joined the channel [14:41] mAritz`afk: mikedeboer: i'm trying cloud9 again. upon start i get "Error: libxml2.so.2: cannot open shared object file: No such file or directory". do you know what that means? [14:41] pagameba1: I get back an ErrorObj now but it is not initialized properly (it doesn't contain the error), that could also be a problem in how I am using the mapserver error library since I just recompiled it to use threads and it supposedly behaves differently when threading [14:42] mikedeboer: mAritz`afk: checking... [14:42] mAritz`afk: since it's apparently an error in jsdav (according to the stack) i suppose you're responsible :D [14:42] mAritz`afk: i did a fresh npm install if that helps. [14:43] EGreg_ has joined the channel [14:43] chrischris has joined the channel [14:44] christophsturm: caolanm: i was away and I'm not sure i understand what you are saying [14:44] mAritz`afk: oh and is there a way to password protect the entire thing? [14:44] caolanm: christophsturm: oh, its ok... I'm being an idiot today [14:44] caolanm: ;) [14:44] caolanm: christophsturm: although, I've just got some working code doing what you want ;) [14:44] christophsturm: caolanm: but i think the testCase method does too much in one. [14:44] caolanm: I agree [14:44] saikat has joined the channel [14:44] christophsturm: caolanm: good, I have a failing testcase [14:46] johngbrooks has joined the channel [14:46] pagameba1: stephank: yep, confirmed that your code works perfectly! Now I need to add code to detect if mapserver is built with threading support and handle the flow differently in each case :S [14:47] rikarends has joined the channel [14:47] rikarends: it means you dont have libxml2 installed :) [14:47] rikarends: which is rare, but possible [14:47] christophsturm: caolanm: https://gist.github.com/04ee2b7bf0cdc67ad518 [14:47] mikedeboer: mAritz`afk: I might indeed be my mistake [14:47] rikarends: apt-get install libxml2 [14:48] rikarends: should take care of it [14:48] mikedeboer: mAritz`afk: ah, as rikarends pointed out: do you jave libxml2 installed? [14:48] Booths: what's the npm command to vie winstalled modules [14:48] SubStack: npm ls [14:48] mAritz`afk: uh, that could be a problem :D [14:48] SubStack: npm ls installed # especially [14:48] Booths: ah, alright [14:48] mAritz`afk: and is there a "simple" way to password protect cloud9? [14:48] SubStack: where is that isaacs I have npm questions for him [14:49] SubStack: like why the hell when I do `npm config get root` it loads the root from my ~/.npmrc but require('npm').root is something else entirely [14:49] rikarends has left the channel [14:49] wink_ has joined the channel [14:49] mikedeboer: hmm... not really, because we're serving the files through connect... adding a .htaccess module to it might be a solution [14:50] benburkert has joined the channel [14:50] mAritz`afk: you mean add a middleware in the server.js ? [14:50] SubStack: mikedeboer: do it in json [14:50] SubStack: htaccess sucks [14:50] caolanm: christophsturm: http://pastie.org/private/phs25j7k6r4orl6dvdaloa [14:50] caolanm: that should do it [14:51] SubStack: actually it's unecessary too since you can just as well write a middleware [14:51] caolanm: christophsturm: I'd still like to break up the wrapTest function, its a bit big [14:51] BillyBreen has joined the channel [14:51] caolanm: not sure exactly where to do that though [14:51] mikedeboer: SubStack: I agree, a simple yet elegant solution should be easy to patch in [14:51] christophsturm: caolanm: looks good. can you add my testcase and see if it passes? [14:51] aheckmann has joined the channel [14:51] christophsturm: you can still refactor it later if it works [14:52] SubStack: mikedeboer: something to sit on top of staticProvider? [14:52] mikedeboer: mAritz`afk: do you see an opportunity to add simple auth yourself via Connect/ middleware? [14:53] tk has joined the channel [14:53] eee_c has joined the channel [14:53] mikedeboer: SubStack: yes, and only active on index.html, because that one needs to be protected [14:54] SubStack: you could just have a route that matches index.html so the request doesn't fall through to staticProvider [14:55] caolanm: christophsturm: you did test.expect(7), but I think you meant to expect 8 [14:55] caolanm: provided that is correct, then it passes [14:56] christophsturm: caolanm: i didn't change that line, that was just copy paste [14:56] christophsturm: wanted to adjust that when i have something working [14:56] christophsturm: so you're right [14:56] caolanm: ah ok [14:56] caolanm: then yes, it works [14:57] mAritz`afk: mikedeboer: i have very little experience with auth. but there already is middleware for that, right?! [14:57] christophsturm: caolanm: can you commit it and put it into npm? [14:58] Sami_ZzZ has joined the channel [14:58] mAritz`afk: connect-auth seems like the way to go [14:58] mikedeboer: mAritz`afk: yes there is (https://github.com/ciaranj/connect-auth), which I'm using now for the online version of Cloud9, but that's a bit too much [14:59] mikedeboer: mAritz`afk: ... I think [14:59] InsDel has joined the channel [14:59] caolanm: christophsturm: sure [14:59] boaz has joined the channel [15:00] christophsturm: great [15:00] gf3 has joined the channel [15:00] fly-away has joined the channel [15:01] ceej has joined the channel [15:02] mAritz`afk: mikedeboer: whell, yuo can just use the digest method, right and leave out all the other stuff. that should be fine?! [15:02] mAritz`afk: *well, you [15:03] rwaldron has joined the channel [15:03] mAritz`afk: or just basic [15:03] caolanm: ACTION runs testcase groups tests in IE6 [15:03] mikedeboer: mAritz`afk: true, in that case you'll have a standard password dialog in the browser [15:04] caolanm: cross your fingers everyone [15:04] christophsturm: ACTION crosses fingers [15:04] caolanm: success :) [15:04] caolanm: that'll do for browser testing I think [15:05] mu-hannibal has joined the channel [15:05] slaskis: is NODE_PATH something that's used? when i installed npm it told me it's the shit, but it doesn't seem to make a difference? [15:05] mikedeboer: mAritz`afk: so using connect-auth will provides you with a custom solution and doing something custom with sessions as SubStack suggested might be something that is more likely to eventually end up in the cloud9 codebase [15:06] christophsturm: caolanm: i don't see any test group related commits on https://github.com/caolan/nodeunit/commits/master [15:06] matt_c has joined the channel [15:06] caolanm: christophsturm: patience [15:06] caolanm: :) [15:06] caolanm: just about to commit now [15:06] christophsturm: oh sorry [15:06] caolanm: you're getting a name check too, what's your github username? [15:07] christophsturm: christophsturm [15:07] caolanm: cool [15:07] mAritz`afk: yeah, i'm not the guy to implement it though. i'm happy if i get to work on some of my own projects. and for some reason i had the crazy idea to run r/coderaid no the side, which left me with about 0 free time :( [15:07] mikedeboer: coderaid? [15:07] mikedeboer: I'm interested :) [15:10] caolanm: christophsturm: should be on github and in npm now [15:11] markwubben has joined the channel [15:13] mAritz`afk: mikedeboer: reddit.com/r/coderaid or #coderaid here on freenode [15:13] mAritz`afk: :) [15:13] mAritz`afk: first 2 raids are on 4th and 5th december and our targets are OpenRA and reddit [15:14] caolanm: mAritz`afk: this sounds interesting, what's a coderaid? [15:14] caolanm: just a sprint? [15:15] Mikushi has left the channel [15:15] softdrink has joined the channel [15:15] mAritz`afk: yeah, a bunch of people organize for a weekend to help out 1 or 2 open source projects in whatever way we can. [15:16] mAritz`afk: but we haven't done it before. not sure yet how it'll end up going :D [15:17] mAritz: mikedeboer: is there a way to run a .sh file as well when the "run" button is pressed? (aside from creating a js wrapper that runs the sh and my app) [15:17] mAritz: btw: i'm really impressed. cloud9 is actually usable now [15:18] mikedeboer: mAritz: #coderun looks like an awesome idea :) [15:19] mAritz: #coderaid :D [15:19] mikedeboer: at the moment, the run button is reserved for execution of javascript in NodeJS [15:19] mAritz: but coderun would've been a good name as well. :o [15:19] mikedeboer: whoops, plugging #coderaid to make up for it [15:20] mAritz: yeah, i've got to change the way my app works either way. better just put all my startup stuff in the js [15:20] mikedeboer: generally, that sounds like the better thing to do :) [15:21] sixtus42 has joined the channel [15:22] sixtus42 has left the channel [15:23] dylang has joined the channel [15:23] ben_alman has joined the channel [15:25] unomi has joined the channel [15:26] jayfresh has joined the channel [15:26] kriszyp has joined the channel [15:26] cjm has joined the channel [15:28] ivanfi has joined the channel [15:28] markwubben has joined the channel [15:29] wattz has joined the channel [15:38] jamund has joined the channel [15:38] pagameba has joined the channel [15:38] markwubben has joined the channel [15:39] mAritz: mikedeboer: everytime i run the debugger it gets 2 seconds slower :D [15:39] mAritz: or more [15:40] mAritz: now it's already taking 15 seconds what took 3 at the start [15:40] oal has joined the channel [15:41] mAritz: but it's chrome that's hanging apparently [15:41] mikedeboer: yeah, I experienced the same... also it usually improves when you 'run' the app once, stop it and after that debug again [15:41] mikedeboer: probably some GC issue [15:41] dtrasbo has joined the channel [15:41] mikedeboer: or refresh the browser altogether [15:41] mikedeboer: :P [15:41] saml has joined the channel [15:42] mikedeboer: btw, you can report any issue you're having at github/ajaxorg/cloud9 and we'll check it asap [15:42] mAritz: yep, killing the site (chrome asked me twice :D ) it works fine again [15:42] mAritz: yeah, i know. i'm just lazy ^^ [15:43] mikedeboer: tsk :P [15:43] dtrasbo has joined the channel [15:44] margle has joined the channel [15:44] mAritz: good lord, having a debugger is awesome [15:45] BHSPitMonkay has joined the channel [15:47] papandreou has joined the channel [15:48] BHSPitMonkay: rauchg_: I have a site you can add to socket's "In the Wild" section, if you so desire :) [15:51] matt_c_ has joined the channel [15:51] kjeldahl has joined the channel [15:54] mAritz: okay, opened a bunch of issues :P [15:54] jakehow has joined the channel [15:56] papandreou: Finally it seems like my gzip troubles have been resolved with v0.1.10 of egorich239's node-compress fork and node v0.2.5. However, it's still version 0.1.8 in the npm repo. Who should I bug to get the newest version pushed? [15:56] mAritz: papandreou: whoever is listed as author in package.json [15:57] papandreou: mAritz: Ah, makes sense. Thanks :) [15:58] mikedeboer: mAritz: thanks for the reports man! [15:59] mAritz: YEY, everyone loves me! /narzism [16:01] dguttman has joined the channel [16:01] ivanfi has left the channel [16:02] arpegius has joined the channel [16:02] p6 has joined the channel [16:03] aurynn has joined the channel [16:03] jmar777 has joined the channel [16:04] muk_mb has joined the channel [16:04] jchris has joined the channel [16:06] zk has joined the channel [16:06] sonnym has joined the channel [16:06] aconbere has joined the channel [16:07] jmar777: wanting to play around with a custom ReadableStream that, by default, has an encoding of 'object', rather than one of the standard Buffer encodings. [16:08] jmar777: So, for example, each 'data' event would emit a single object that is part of a larger stream of objects. Is this a good idea, or am I barking up the wrong interface? [16:09] rockstar has joined the channel [16:09] springmeyer has joined the channel [16:09] jmar777: Main reason for doing this would be to hopefully get some interoperability with the pump method [16:09] rockstar has joined the channel [16:09] bradleymeck has joined the channel [16:10] EGreg_ has joined the channel [16:10] ilpoldo_ has joined the channel [16:10] rockstar has left the channel [16:11] mAritz: oh man, cloud9 is sweeeet [16:11] mAritz: :D [16:13] bentruyman has joined the channel [16:17] jpld has joined the channel [16:18] tj has joined the channel [16:18] jchris has joined the channel [16:24] skiz has joined the channel [16:29] mw_ has joined the channel [16:30] sudoer has joined the channel [16:32] wink_ has joined the channel [16:32] mikedeboer: mAritz: hehe thanks man! that's why we built it :D [16:35] brianmario has joined the channel [16:35] mAritz: mikedeboer: next problem: i'm trying to run cloud9 with a more secure user (just created one) and now i get EPERM, Operation not permitted in server/lib/cloud9/index.js:53:23 [16:36] prettyrobots has joined the channel [16:37] Booths: Any idea why I might be seeing "FATAL ERROR: CALL_AND_RETRY_2 Allocation Failed - process out of memory" at random? I've let the script run and heaptotal:heapused right before crash was 5429760:4336908, but that's about where it is on average. [16:38] wink_: Booths: the only time i've seen it is when massive allocation occurs, how are you checking heap usage right before the crash? [16:38] wink_: is it really right before the crash, even a second is long enough for something to spin out [16:38] Booths: I've been dumping process.memoryUsage() [16:39] mikedeboer: mAritz: what does that specific line say in index.js on your version? [16:39] wink_: are you calling into a binding of any sort? [16:39] wink_: EGreg_: db query or anything like it [16:39] softdrink has joined the channel [16:39] wink_: erm [16:39] wink_: eg, silly nick completion [16:39] Booths: Nothing out of the ordinary, it's basically a script that's receiving xml and parsing and that's it. [16:40] mAritz: mikedeboer: if(group) process.setgid(group); [16:40] mikedeboer: thought so :) [16:40] mAritz: i fear i botched up the user i created [16:40] wink_: Booths: what are you using to do the parsing? [16:41] petercooper has joined the channel [16:41] jdalton has joined the channel [16:41] wink_: does the allocation happen to be failing during a parse? [16:41] eee_c has joined the channel [16:41] deepthawtz has joined the channel [16:42] Booths: I don't think so, using sax parser/xml2js [16:42] mikedeboer: mAritz: you must be passing a different user and group, and yr OS rejects it (or the combination) [16:42] mAritz: yeah [16:42] jdalton has left the channel [16:42] mAritz: < sucks ad sysadmin stuff [16:43] mikedeboer: < likewise *sigh* [16:43] confoocious has joined the channel [16:43] confoocious has joined the channel [16:43] halfhalo: < laughing at sysadmin stuff right now [16:43] halfhalo: Namely a clock running a tad to fast [16:43] zimbatm has joined the channel [16:43] wink_: Booths: if i were a betting man, i'd put my money on the parser blowing up...how big is your xml doc? [16:44] mAritz: < hires halfhalo to fix my server for 4€/hour!!!111one [16:44] Booths: not very big at all, 950 bytes on average [16:44] halfhalo: heh [16:44] wink_: yeah thats not very big :p, can you pastebin your code? [16:44] halfhalo: ACTION watches the clock on the server in question gain a minute every second [16:44] mAritz: i could just manually start the cloud9 app every time and only listen for my current ip [16:44] Booths: sec [16:45] wink_: because something is clearly spinning out allocating waaay too much [16:45] mAritz: halfhalo: that's not "a tad too fast" that's just wrong. oO [16:45] halfhalo: yeah... [16:45] Booths: running on cygwin if that makes a difference [16:45] halfhalo: it thinks its dec 19 [16:45] marshall_law_ has joined the channel [16:45] mAritz: what year? [16:45] halfhalo: this year [16:45] noahcampbell has joined the channel [16:45] halfhalo: it only started going crazy yesterday [16:45] mAritz: it can't be broken long then :D [16:46] dguttman has joined the channel [16:46] wink_: Booths: can you try it on a more...'supported' platform? im really not familiar with node on cygwin :> [16:46] wink_: i mean i know it runs, but god knows what sort of black magic had to be employed to make it run [16:46] mAritz: halfhalo: is there an easy way to find out the ip i'm connecting from via ssh? (i'm sitting at pc1 and ssh to pc2 and want to execute a command on pc2 to find the ip of pc1) [16:46] mikedeboer: halfhalo: check if it's running on duracell batteries, and if so, switch to non-branded ones [16:46] sveimac_ has joined the channel [16:47] Booths: Unfortunately no, it's internal company information so I can't run it on my linux server... [16:47] Booths: And yeah [16:47] wink_: what about a linux vm? [16:48] wink_: virtualbox is a wonderful thing [16:48] sprout has joined the channel [16:48] Booths: Yeah it might be what I push because this is getting annoying. [16:48] halfhalo: mAritz: lazy way: log in again and see what the last logged in ip is [16:48] wink_: although no guarantee that is even the problem [16:48] mAritz: halfhalo: yeah, that's not really possibly via script :D [16:48] Booths: well, i'm sure it's part of it [16:48] halfhalo: bah, script [16:48] Booths: as the listener.once('event') doesn't seem to work I had to come up with another idea [16:49] wink_: i've caused many allocation errors without the help of cygwin [16:49] Booths: It's after like 3-4 hours of running [16:49] Booths: Makes it hard to track down. [16:49] wink_: definitely [16:50] mAritz: halfhalo: if you're interested: $SSH_CLIENT and $SSH_CONNECTION :) [16:51] Booths: With the current node version that works on cygwin event.once doesn't seem to be supported, but I need the listener.on('end') to be different [16:51] mu-hannibal has joined the channel [16:51] Booths: that maybe the problem [16:52] Booths: If I could create the end listener function, and then remove it from the function at the end, so the parser stays intact rather than having to recycle the parser each time. [16:52] Booths: parser.removeListener(this); ? not sure what the syntax is within the function [16:53] SubStack: parser.on('moo', function f () { parser.removeListener('moo', f) }) [16:53] SubStack: == once [16:54] Booths: alright, let me try that, maybe that will help [16:55] MikhX has joined the channel [16:55] Booths: wouldn't this reference the function, so couldn't you call removeListern('moo', this);? [16:55] Booths: of course, spelled correctly [16:56] SubStack: Booths: this can be a lot of things [16:57] SubStack: also with normal invocation: [16:57] SubStack: v8: (function f () { return this === f })() [16:57] v8bot: SubStack: false [16:57] Booths: hmm alright [16:58] Booths: Good to know [16:59] matt_c has joined the channel [16:59] zimbatm has joined the channel [17:00] confoocious has joined the channel [17:00] confoocious has joined the channel [17:01] stephank has joined the channel [17:01] MattDiPasquale has joined the channel [17:03] d0k has joined the channel [17:04] aconran_ has joined the channel [17:04] christophsturm: how can i get a post body from http.ServerRequest ? [17:05] pagameba: question: if I do String::New(char * someString) does this copy 'someString' (meaning I need to free it later?) ... [17:06] Aria has joined the channel [17:07] pagameba: christophsturm: you need to attach to the 'data' event and read it from the request objeect [17:07] jesusabdullah has joined the channel [17:08] pagameba: see https://github.com/pagameba/node-queue/blob/master/node-queue.js#L135 for an example [17:08] christophsturm: pagameba: thanks! [17:09] pagameba: basically if(request.method == 'POST") { request.on('data', function(chunk) { // accumlate chunks until end }); request.on('end', function() { // use accumulated chunks } } [17:14] Aikar: ryah: you around? [17:15] guitt has joined the channel [17:16] markwubben has joined the channel [17:16] GriffenJBS has joined the channel [17:17] markwubben has joined the channel [17:17] GriffenJBS: has npm given anyone else problems in the last 24 hours? [17:18] muk_mb: just worked fine for me, what's wrong with it? [17:18] muk_mb: oh nvm, it keeps updating the same packages [17:18] SubStack: GriffenJBS: try updating node, some wacky writeEv stuff got reverted [17:19] GriffenJBS: newer than 0.2.8-1? [17:19] GriffenJBS: oh nvm [17:19] slaskis: anyone who knows chinese? [17:20] confoocious has joined the channel [17:20] ph^ has joined the channel [17:21] slaskis: i'm making a little summarize helper, it splits up long texts into words and cuts them at a certain length. pretty straightforward. but i'm splitting the text on spaces and it seems (it's google translated) that the chinese text does not have any spaces in it, so i'm curious, is there another separator used in chinese? or maybe it's not used at all as every character is a word? [17:22] Joxo has joined the channel [17:23] Joxo: Is there any way to use http.createClient to connect to a http server listening on a unix socket? [17:23] Aria: It definitely doesn't need separators in many cases, so it can be a real pain. Most words are one character. [17:23] Aria: (Japanese is worse) [17:24] tj has joined the channel [17:24] rbranson: time to become an IPv6 transition consultant and rake in the cash [17:24] slaskis: Aria: thanks, good to know. so now i need a way to figure out if it is chinese [17:24] ewdafa has joined the channel [17:25] Aria: You could probably hack it and just detect those characters in the CJK set. [17:25] Aria: It's a contiguous range in unicode. [17:26] tswicegood: Joxo: check out the raw Client (what createClient returns) [17:27] isaacs has joined the channel [17:28] isaacs has joined the channel [17:29] cefn1 has joined the channel [17:29] qFox has joined the channel [17:29] isaacs: SubStack: hey [17:30] cefn1 has left the channel [17:30] skiz has joined the channel [17:30] Joxo: tswicegood: Ok, I will try. =) [17:30] SubStack: isaacs: rawr [17:31] sveimac has joined the channel [17:31] isaacs: you summoned me about 3 hours ago [17:31] isaacs: what's up? [17:31] SubStack: yeah so [17:31] slaskis: Aria: thanks [17:31] SubStack: https://gist.github.com/710299 [17:31] SubStack: isaacs: ^ [17:32] SubStack: are those supposed to be different? [17:32] isaacs: SubStack: see the section in the README about using npm programmatically [17:32] isaacs: SubStack: the issue there is that you haven't loaded all the configs, so it's just showing you the default config, not what's in your .npmrc file [17:33] isaacs: SubStack: try this: n = require("npm") ; n.load({}, function () { console.log(n.config.get("root")) }) [17:33] SubStack: ah, makes sense [17:33] killfill has joined the channel [17:33] isaacs: that {} object can have other config options just for this load. [17:33] isaacs: currently, it only supports being loaded once, ever. [17:33] SubStack: sweet, works [17:33] GriffenJBS: isaacs: got a min? I'm using npm@0.2.8-1 & node@0.3.2-pre when running npm update I'm getting errors starting with "npm ERR! failed to fetch ..." [17:33] isaacs: but my goal is to eventually let you load it, and get multiple instances that don't clobber one another, but still share global/user configs [17:34] isaacs: GriffenJBS: please gist the whole log message [17:34] GriffenJBS: k [17:35] ysynopsis has joined the channel [17:35] jakehow has joined the channel [17:36] sprout has joined the channel [17:37] confoocious has joined the channel [17:37] confoocious has joined the channel [17:38] saml: so, addition is not asynchronous (1 + 1) [17:38] saml: is there a language where everything is asynchronous? [17:38] Ond has joined the channel [17:38] case__: ??? [17:39] pagameba: saml: why would you want that to be asynchronous? You'd need to provide a callback function for the result [17:41] saml: that's why i said language. probably procedural stuff can be compiled to .on(.., callback) [17:41] AAA_awright: If everything was asynchronous you would just build it into the compiler [17:41] saml: print(1+2) ==> add(1, 2).on('result', function(result) { print(result); } ) [17:42] case__: ACTION vomit [17:42] tj: yikes [17:42] saml: of course, optimizer will optimize that stuff away [17:42] herbySk has joined the channel [17:42] pagameba: saml: :) [17:42] eee_c has joined the channel [17:44] AAA_awright: isaacs: You really need to seperate out the library that handles files from the application that reads the config files [17:44] mu-hannibal has joined the channel [17:44] strmpnk has joined the channel [17:44] isaacs: AAA_awright: sure. gonna be afk for a bit. email your thoughts to nmp-@googlegroups.com [17:44] isaacs: ACTION is all about separating things out [17:47] GriffenJBS: https://gist.github.com/710327 [17:47] sprout1 has joined the channel [17:47] bnoordhuis has joined the channel [17:48] fangel has joined the channel [17:49] steffkes has joined the channel [17:49] sprout2 has joined the channel [17:55] isaacs1 has joined the channel [17:57] aconbere has joined the channel [17:57] RevoOf has joined the channel [17:58] RevoOf: hi, does someone know how to best use express and jade together (to provide a static document) [17:59] sriley: if its a static doc then you prob dont need express just connect would do [18:00] christophsturm has joined the channel [18:00] Ond: Doesn't Express come with a Jade example? [18:00] jesusabdullah: v8> for (i=0; i < 3; i++) {console.log("THE BEST")} [18:00] v8bot: jesusabdullah: CONSOLE: ["THE BEST", "THE BEST", "THE BEST"], OUTPUT: undefined [18:00] tj: RevoOf: check the express repo's ./examples directory [18:00] tj: tons and tons of examples [18:01] jesusabdullah: v8> function () { var daveGrohl = ""; for (i=0; i < 3; i++) { daveGrohl+="THE BEST ";} return daveGrohl;} [18:01] v8bot: jesusabdullah: SyntaxError: Unexpected token ( [18:01] jesusabdullah: v8> var x = function () { var daveGrohl = ""; for (i=0; i < 3; i++) { daveGrohl+="THE BEST ";} return daveGrohl;} [18:01] v8bot: jesusabdullah: undefined [18:01] RevoOf: sriley: still i like the jade markup ;) [18:01] RevoOf: ond: i'll have a look [18:01] RevoOf: tj: i did and didn't find an example [18:02] jesusabdullah: v8> var daveGrohl = ""; for (i=0; i < 3; i++) { daveGrohl+="THE BEST ";} [18:02] v8bot: jesusabdullah: "THE BEST THE BEST THE BEST " [18:02] jesusabdullah: THERE we go [18:02] jesusabdullah: Cute [18:02] pagameba: lol [18:03] itissid has joined the channel [18:03] tj: RevoOf: ./examples/jade [18:03] sriley: you like jade markup, really!? but doesnt it make it virtually impossible to maintain in that no one else in the world will understand the markup? [18:03] jesusabdullah: v8> function fooFighters(n) {var daveGrohl = ""; for (i=0; i < 3; i++) { daveGrohl+="THE BEST ";}} fooFighters(5) [18:03] v8bot: jesusabdullah: undefined [18:03] jesusabdullah: aww [18:03] RevoOf: ond, tj: yep, i found it [18:03] tj: sriley: its a template engine geared towards developers, not designers [18:03] jesusabdullah: oh well [18:03] tj: if you want a clusterfuck of ejs [18:03] tj: go nuts [18:03] tj: both are useful in different cases [18:04] RevoOf: ond, tj: funny that its in the express docs and not the jade docs, afaik [18:04] sriley: tbh designers shouldnt touch code [18:04] tj: RevoOf: well jade is not specific to express [18:04] jesusabdullah: v8> var ballmer = ""; for (i=0; i < 3; i++) { ballmer+="DEVELOPERS ";} [18:04] v8bot: jesusabdullah: "DEVELOPERS DEVELOPERS DEVELOPERS " [18:04] tj: sriley: exactly [18:04] tj: so big deal [18:04] sriley: im a frontend engineer and when i look at jade markup i just think wtf [18:04] RevoOf: tj: oh ... so its an independent project? [18:05] gkatsev: anyone thought of making a node-eval-bot? basically, the node-repl with some of the node modules loaded? [18:05] tj: RevoOf: yeah you can use it with anything [18:05] tj: sriley: then dont use it lol [18:05] tj: who cares [18:05] jesusabdullah: I saw this thread the other day that suggested that the Way to Go is to get designers to make a mock-up, then modify it using css selectors a la jquery [18:05] indexzero has joined the channel [18:05] RevoOf: tj: ok, thx [18:05] jesusabdullah: (in this case, it was clojure, but same shit right?) [18:06] jesusabdullah: Anyways: I actually kinda liked the selector idea [18:06] sriley: design and code are 2 separate sides of the brain, very rarely can someone do well well [18:06] sriley: *do both well [18:06] jesusabdullah: hah [18:06] jesusabdullah: :D [18:07] jesusabdullah: I CAN DO BOTH [18:07] jesusabdullah: but neither well :( [18:08] isaacs has joined the channel [18:08] Fullmoon has joined the channel [18:08] joeshaw_ has joined the channel [18:08] SubStack: I can draw pictures of robots pretty well [18:08] jesusabdullah: I can draw pictures of snow :( [18:08] bnoordhuis: eyes, i draw eyes very well [18:08] jesusabdullah: Also penises [18:09] bnoordhuis: very freudian, jesusabdullah [18:09] SubStack: pseuoscientific hogwash! [18:09] jesusabdullah: heh [18:09] jesusabdullah: Yeah dude, sometimes a penis is just a penis [18:09] jesusabdullah: 8==D [18:10] bnoordhuis: sometimes? [18:10] bnoordhuis: do tell me about the other times [18:10] jesusabdullah: v8> var rod = ""; for(D=1; D++; 8==D) {rod+="=";} rod = [18:10] v8bot: jesusabdullah: SyntaxError: Unexpected end of input [18:10] jesusabdullah: v8> var rod = ""; for(D=1; D++; 8==D) {rod+="=";} rod = "8"+rod+"D" [18:10] jesusabdullah: hurr [18:11] v8bot: jesusabdullah: [18:11] jesusabdullah: aww :C [18:11] jesusabdullah: I FELT SO CLEVER V8BOT [18:11] jesusabdullah: SO CLEVER [18:11] isaacs: jesusabdullah: what kinda for loop is that? [18:12] isaacs: for(D=1;D<8;D++) i think is what you mean [18:12] jesusabdullah: Yeah [18:12] jesusabdullah: I keep getting them reversed in my head [18:12] jesusabdullah: v8> var rod = ""; for(D=1; 8==D; D++) {rod+="=";} rod = "8"+rod+"D" [18:12] v8bot: jesusabdullah: "8D" [18:12] jesusabdullah: idk why! [18:12] jesusabdullah: aww [18:12] SubStack: too short! [18:12] bnoordhuis: hah! [18:12] jesusabdullah: I KNOW [18:12] jesusabdullah: MICROPENIS [18:12] isaacs: jesusabdullah: because you're testing 8==D as your validation function [18:12] Booths: Very nice. [18:12] jesusabdullah: Oh, of course [18:13] jesusabdullah: Doesn't work backwards [18:13] jesusabdullah: ITS MORNING ALRITE ;_; [18:13] isaacs: v8> var rod = ""; for(D=1; !(8===D); D++) {rod+="=";} rod = "8"+rod+"D" [18:13] v8bot: isaacs: "8=======D" [18:13] jesusabdullah: Dammit isaacs stop knowing what you're doing [18:13] jesusabdullah: ACTION applauds [18:13] jesusabdullah: Bravo! [18:13] jesusabdullah: (encore?) [18:13] Booths: I believe isaacs just beat you in the epeen measuring contest. [18:13] isaacs: v8> var rod = ""; for(D=1; !(0x80===D); D++) {rod+="=";} rod = "8"+rod+"D" [18:13] v8bot: isaacs: "8===============================================================================================================================D" [18:13] jesusabdullah: Literally [18:14] bnoordhuis: i'd draw mine but v8's heap is limited to 1 gb [18:14] jesusabdullah: Is it a curse, isaacs? ;) [18:14] AAA_awright: ... [18:14] isaacs: bnoordhuis: ha!! [18:14] AAA_awright: I look up at my chat monitor and *blink* what's going on in #node.js?!? [18:14] jesusabdullah: Time to define a lazy infinite penis function [18:15] GriffenJBS: isaacs: https://gist.github.com/710327 [18:15] jesusabdullah: lol [18:15] gkatsev: make it a module [18:15] gkatsev: npm install lazy-epnis [18:15] gkatsev: npm install lazy-penis [18:15] jesusabdullah: *BAM* average size penis [18:15] jesusabdullah: There's a cocks gem [18:15] jesusabdullah: I saw it the other day [18:15] gkatsev: haha [18:15] jesusabdullah: Zed Shaw tweeted about an online api for it the other week [18:16] mjr_: bnoordhuis: that's why buffers are allocated outside of V8's heap. [18:16] mjr_: larger cock pics [18:17] bnoordhuis: got to try that [18:17] bnoordhuis: good thing my system is 64 bits [18:17] Booths: I believe this is exactly what Google had in mind while developing V8, faster cock pics [18:17] mjr_: I think we've all learned something today. [18:17] mjr_: Next week, on a Very Special #node.js... [18:17] isaacs: GriffenJBS: yeah, i see it. i'm rebuilding node atm. [18:17] GriffenJBS: k [18:18] ryah: Aikar: not really [18:18] stepheneb has joined the channel [18:19] HAITI has joined the channel [18:21] cardona507 has joined the channel [18:21] faust45 has joined the channel [18:21] isaacs: the gem is called dicks. [18:21] isaacs: and really, someone should totally port it to npm. [18:21] markwubben has joined the channel [18:22] Aria: .oO(dicks get me some icecream) [18:22] isaacs: if it's not published under the name of Boliver T. Shagnasty, though, I'll remove it for copyright infringement. [18:22] isaacs: qv http://rubygems.org/gems/dicks [18:23] gkatsev: lol [18:23] Aria: .oO(get me some icecream #=> No!... dicks get me some icecream. #=> Mmm, dicks.) [18:24] HAITI has joined the channel [18:24] HAITI has joined the channel [18:24] hornairs has joined the channel [18:24] mjr_: Whole lotta dicks in here today. [18:25] markwubben has joined the channel [18:25] jdrannbauer has joined the channel [18:26] isaacs: anyone in here on cygwin? [18:26] markwubben has joined the channel [18:26] stagas: me [18:27] isaacs: stagas: hi, can you do me a favor? run this in teh repl: c = require("constants") ; [c.ECONNREFUSED, c.ENOENT] [18:27] stagas: [ 111, 2 ] [18:27] isaacs: hmmm.... [18:28] isaacs: ok, thank [18:28] isaacs: s [18:28] stagas: np [18:28] markwubben has joined the channel [18:30] hdon has joined the channel [18:30] evanmeagher has joined the channel [18:31] markwubben has joined the channel [18:32] markwubben has joined the channel [18:32] evanmeagher: tj: is it possible to get express to evaluate a variable within a :markdown filter? [18:34] deepthawtz has joined the channel [18:36] TooTallNate has joined the channel [18:37] sh1mmer has joined the channel [18:39] vnguyen has joined the channel [18:39] isaacs has joined the channel [18:40] airhorns has joined the channel [18:42] Duncan_ has joined the channel [18:43] stagas: wow [18:43] stagas: http://radioplz.com/#corbina [18:43] brianmario has joined the channel [18:43] arpegius has joined the channel [18:44] Dreamer3 has joined the channel [18:45] thebigbad has joined the channel [18:45] dguttman has joined the channel [18:47] chewbranca has joined the channel [18:47] davidascher has joined the channel [18:48] mohiam_ has joined the channel [18:49] stagas: it was a speedball 2 remix but it played the riff only once at the beg :) [18:50] stagas: http://www.youtube.com/watch?v=x_7pUUD1ScM&feature=related [18:51] MiiCode2 has joined the channel [18:53] hassox has joined the channel [18:56] cagdas has joined the channel [18:57] isaacs: figured out why npm was breaking on HEAD. [18:58] isaacs: apparently the O_CREAT | O_WRONLY | O_TRUNC doens't work any more. only supports "w" [18:58] galaxywatcher has joined the channel [18:59] indexzero has joined the channel [18:59] christophsturm has joined the channel [19:01] aconbere has joined the channel [19:02] twoism has joined the channel [19:03] strixv has joined the channel [19:04] GriffenJBS: isaacs: was HEAD part of my problem? [19:04] isaacs: GriffenJBS: yeah [19:04] isaacs: GriffenJBS: i just pushed a fix to npm's HEAD. [19:04] GriffenJBS: k, I'll keep an eye our for that [19:04] hunter_loftis: Anybody know of a node equivalent to Rails' "resources"? for example, I'd like to say "app.resources('users')" and have GET /users map to users.js.index(), POST /widgets/:id map to users.js.update() etc... [19:04] isaacs: GriffenJBS: if you download the latest code and then do "make dev", it'll work. but that's not stable or recommended, unless you're fine with using occasionally broken code. [19:05] isaacs: GriffenJBS: i expect a release very soon. [19:05] GriffenJBS: I'll hold off until then thanks [19:07] SvenDowideit_ has joined the channel [19:08] mytrile has joined the channel [19:08] nsolsen has joined the channel [19:10] isaacs has joined the channel [19:11] yeevgen has joined the channel [19:12] swistak has joined the channel [19:13] _mql has joined the channel [19:15] zedas: jesusabdullah: http://dicks.heroku.com/ there ya go [19:15] zedas: jesusabdullah: that was the "API" for that gem. [19:15] gkatsev: http://dicks.heroku.com/1000 [19:16] jesusabdullah: zedas: Yeah [19:16] sivy has joined the channel [19:16] zedas: i'm sure someone could do a node.js version. it'd be way faster. so much more dick possible with node. :-) [19:17] banjiewen has joined the channel [19:17] strmpnk has joined the channel [19:18] sh1mmer has joined the channel [19:19] derferman has joined the channel [19:20] siculars has joined the channel [19:21] sriley has joined the channel [19:22] aconbere has joined the channel [19:23] hassox_ has joined the channel [19:24] Astro: a cygwin user of node-stringprep is stumbling over the eio.h , issue -- any ideas? [19:25] markwubben has joined the channel [19:26] stride: ACTION would send him a virtual machine image of ubuntu via e-mail [19:26] Astro: go ahead: https://github.com/astro/node-stringprep/issues#issue/3/comment/559503 [19:26] mytrile has joined the channel [19:26] sveimac has joined the channel [19:28] mu-hannibal has left the channel [19:29] kevwil has joined the channel [19:31] tmpvar has joined the channel [19:31] tmpvar: isaacs, yo [19:31] isaacs: tmpvar: oy [19:32] [[zz]] has joined the channel [19:32] tmpvar: I've got an github issue for some dude using `npm vendor` are there docs for this feature? [19:32] isaacs: tmpvar: there is no "npm vendor" [19:33] isaacs: tmpvar: there's an "npm bundle" [19:33] tmpvar: isaacs ^^ [19:33] Jonasbn_ has joined the channel [19:33] isaacs: and he's probably doing it wrong, since the API (marked "experimental" from the beginning) is changing now [19:33] isaacs: vendors are people who sell things. it's the wrong term. one of many ways in which following ruby naming conventions is dumb. [19:33] tmpvar: isaacs, that puts deps in a ./vendor/.npm dir? [19:34] isaacs: tmpvar: no, it puts deps in a ./node_modules dir [19:34] isaacs: tmpvar: you can't specify the folder any more. [19:34] tmpvar: ah, interesting [19:34] isaacs: because otherwise, i don't know where your stuff is to know that i don't have to install it [19:34] isaacs: and shims have to be all careful and stuff [19:34] isaacs: also! as of last night, and the next version of npm, you can do *any* npm command on the bundle. [19:34] isaacs: npm bundle ls [19:35] isaacs: npm bundle install /path/to/some/tarball.tgz [19:35] tmpvar: right, im seeing a path issue (__dirname breaks, while ./path/to.js works) [19:35] isaacs: npm bundle rm connect [19:35] tmpvar: nice [19:36] tmpvar: ah, so its a local repo, nice! [19:36] isaacs: kinda, yeah [19:36] stagas: isaacs: nice! [19:36] tmpvar: s/local/project local/ [19:36] isaacs: i'm probably gonna have to add some smarts in there to prevent you from doing something dumb like `npm bundle config set foo bar` or something [19:36] isaacs: since that'd be dumb. [19:37] stagas: 402 users! [19:39] technoweenie has joined the channel [19:39] swistak has joined the channel [19:39] admc has joined the channel [19:40] stagas: 404! [19:40] cjm has joined the channel [19:40] isaacs has joined the channel [19:40] mscdex: stagas: user count found! [19:40] mscdex: er [19:41] mscdex: not found [19:41] mscdex: huhu [19:41] tmpvar: stagas, ? [19:41] stagas: lol [19:41] kevwil has joined the channel [19:41] webr3: anybody got an XML to DOM lib that works with node.js 3.1? [19:41] bradleymeck has joined the channel [19:41] tmpvar: oh hello, mscdex [19:41] mscdex: o hai2u [19:42] mscdex: webr3: well, there's at least xml to js libs [19:42] tmpvar: there is this thing called jsdom.. but you need an xml parser [19:42] mscdex: :> [19:42] nsolsen has joined the channel [19:43] jakehow has joined the channel [19:43] tmpvar: disclaimer: jsdom isnt very good with xml namespaces yet. if you want to hack on that please feel free to do so ^_^ [19:43] webr3: jsdom fails on 3.1 - node-o3-xml seg faults - libxmljs malloc breaks [19:43] tmpvar: jsdom fails on 3.1? how so? [19:44] webr3: give me too I'll roll back and let you know [19:44] ossareh has joined the channel [19:44] Marty has joined the channel [19:44] hassox has joined the channel [19:44] tmpvar: cool, you may want to look at isaacs' sax parser.. not sure how htmlparser works with xml [19:45] isaacs: my sax parser is not even a little namespace aware [19:45] isaacs: you just get attributes like {"foo:bar":"baz"} [19:45] mscdex: npm install cowbell.js [19:45] rcy has joined the channel [19:46] mscdex: ACTION is going to attempt to add another package to npm today [19:46] chandru_in has joined the channel [19:46] tmpvar: ah [19:46] gkatsev: cowbell? [19:46] isaacs: tmpvar: handling namespaces, doctypes, custom entities, etc, is what's wrong with xml [19:47] isaacs: sax-js is very simple. [19:47] chandru_in: why don't TCP net.Server instances emit 'fd'? AFAIK the socket system call would have returned an FD for it. [19:47] webr3: will try with isaacs parser quickly [19:47] isaacs: ACTION should really rewrite it one of these days.. [19:47] webr3: I'm needing XHTML+RDFa and RDF/XML parsed btw, heavy usage of namespaces [19:47] omni5cience has joined the channel [19:49] bnoordhuis: chandru_in: it's there as server.fd [19:49] jimt_ has joined the channel [19:49] webr3: refinement: I've got RDF/XML and XHTML+RDFa parsers which run voer the DOM, so need an XML to DOm for node [19:50] markwubben has joined the channel [19:50] chandru_in: bnoordhuis, oh ok thanks [19:52] aconbere has joined the channel [19:53] pedrobelo has joined the channel [19:54] tprice has joined the channel [19:54] mraleph1 has joined the channel [19:55] drudge: tj: typo in An example of this is the not getter, which negates the meaning, aka user.should.not.have.property('name'), note the ***user*** of have as we could omit it and still construct a valid assertion. [19:55] stalled has joined the channel [19:56] CIA-95: node: 03isaacs 07master * rb52b419 10/ (src/node.js test/simple/test-fs-write.js): [19:56] CIA-95: node: Fix problem with requireNative not exporting 'module' object [19:56] CIA-95: node: Broke require('constants'). Add unrelated test which breaks it. - http://bit.ly/bfrfmq [19:56] tj: drudge: woah haha [19:56] tj: will fix [19:58] frankieshakes has joined the channel [19:58] mif86 has joined the channel [19:58] frankieshakes: hey hey! how's everyone doing? [19:59] mscdex: hungry [19:59] tmpvar: hey there [19:59] frankieshakes: mscdex: hehe… snack time, maybe? :) [20:00] mscdex: need moar 0's and 1's [20:00] romainhuet has joined the channel [20:00] frankieshakes: haha… nice. ;) [20:01] frankieshakes: i'm hoping someone can help me out… i'm brand-spanking new to Node (read: started looking into it today!)… I've been following a pretty sweet tutorial on DailyJS which uses Node, Express and Expresso. I'm running into an issue when running my tests where I'm constantly receiving the following error: "TypeError: no such method 'response'" [20:02] frankieshakes: This is when calling assert.response [20:02] mscdex: there is no assert.response [20:02] frankieshakes: mscdex: that'll do it… lol. [20:03] frankieshakes: Has that changed recently? The tutorial on DailyJS was written on the 17th of this month. [20:03] mscdex: no [20:03] mscdex: must be a typo [20:03] frankieshakes: And looking at the Expresso docs (http://visionmedia.github.com/expresso/), I see an assert.response [20:03] mscdex: frankieshakes: http://nodejs.org/api.html#assert-292 [20:03] mscdex: oh [20:03] tj: expresso adds methods [20:03] jacobolus has joined the channel [20:03] frankieshakes: okay… that makes sense then. But still no luck on running the tests… they all throw the same exception [20:04] mscdex: not sure then. what's the link to the article? [20:04] frankieshakes: http://dailyjs.com/2010/11/15/node-tutorial-3/ [20:04] frankieshakes: it's close to the bottom of the page [20:04] tj: frankieshakes: the most recent version of expresso does not pass (assert) [20:05] dmcquay has joined the channel [20:05] tj: frankieshakes: so just "var assert = require('assert');" [20:05] frankieshakes: tj: oh, is that right? okay… so that's most likely the issue. I installed all the modules (nodules) today… [20:05] frankieshakes: let me try that [20:06] tj: yeah that is probably the issue [20:06] frankieshakes: tj: out of curiosity… why does it no longer pass assert? [20:06] tj: frankieshakes: it was a lame idea [20:06] tj: this way other assertion libraries can be used easier [20:06] tj: since the assert module is kinda weak [20:07] frankieshakes: tj: oh, ok… gotcha. Makes sense though. [20:07] frankieshakes: I'm not getting the error anymore, but I'm not sure if what I'm seeing is what I should be seeing… [20:07] mikedeboer has joined the channel [20:08] frankieshakes: All I see is this in the output: [20:08] frankieshakes: 127.0.0.1 - - [Mon, 22 Nov 2010 20:07:46 GMT] "POST /documents.json HTTP/1.1" 200 73 "" "" [20:08] tj: disable the logger for the "test" env [20:08] tj: and use NODE_ENV=test [20:08] tj: when running them [20:08] MetaJake has joined the channel [20:08] elijah-mbp has joined the channel [20:09] Locke23rus has joined the channel [20:09] mikedeboer has left the channel [20:09] nsolsen has joined the channel [20:10] jchris has joined the channel [20:10] isaacs has joined the channel [20:11] deepthawtz has joined the channel [20:11] frankieshakes: tj: I've got "process.env.NODE_ENV" set to "test"… and in my test env, I've got this set —> app.use( express.errorHandler( { dumpExceptions: true, showStack: true } ) ); [20:11] MetaJake: is node.js a replacement for apache? [20:12] drudge: it can be i suppose [20:12] MetaJake: ^theoretically* [20:12] drudge: depending on what you want to do :) [20:12] MetaJake: drudge, i see. [20:12] drudge: node is much more than a web server [20:12] mscdex: ACTION looks out for pquerna [20:13] dguttman has joined the channel [20:13] mscdex: oops! :-D [20:13] evanmeagher: tj: is it possible to get jade to evaluate a variable within a :markdown filter? [20:13] MetaJake: drudge would you mind sharing an example of what node.js is capable of besides web page serving? [20:14] pagameba: running into problems in my extension creating a wrapped object to return to the callback … about here https://github.com/pagameba/node-mapserver/blob/master/src/mapserver_bindings.cc#L648 - the object in js is not the same as the one I am wrapping here ... [20:14] davidvanleeuwen has joined the channel [20:14] pedrobelo has joined the channel [20:15] drudge: MetaJake: have a look at https://github.com/ry/node/wiki [20:15] jimt has joined the channel [20:15] MetaJake: drudge thank you [20:15] ryah: http://tootallnate.net:5555/ <-- :P~ [20:16] mscdex: there's a live example for you MetaJake :p [20:18] MetaJake: mscdex i see. [20:18] cjm has joined the channel [20:19] Wizek has joined the channel [20:20] steffkes: hey guys, short noob-question .. "free -m" on ubuntu tells me memory-usage .. but how to check which proccess uses how much? [20:21] MetaJake: ryah, did you construct this music player? [20:21] ryah: no [20:21] drudge: ryah isn't too good with node [20:21] ryah: TooTallNate did [20:22] MetaJake: i see. [20:23] jesusabdullah: Oh good, music! My pandora just ran out this morning [20:23] MetaJake: heh yeah glad to hear some old pink floyd [20:23] justin_ has joined the channel [20:23] drudge: jesusabdullah: http://slaylist.com/#!synack/best-of-bootie-2009 [20:24] bnoordhuis: steffkes: ps aux, look at the RSS column [20:24] jesusabdullah: Best of Bootie is great [20:24] jesusabdullah: Ghost Might Like You Better is my fave [20:24] sh1mmer has joined the channel [20:25] nsolsen: How can you co-host apache sites and node sites on same server? [20:25] drudge: nsolsen: proxy the node sites through apache [20:25] bnoordhuis: apache isn't too hot on long-living connections though [20:25] drudge: indeed [20:26] sh1mmer has joined the channel [20:27] bnoordhuis: i blame pquerna [20:27] nsolsen: Mmm -- yes, may virtualisation is the way to go [20:27] bnoordhuis: nsolsen: use nginx as a reverse proxy [20:27] nsolsen: *maybe [20:27] bnoordhuis: or have apache on ip address x and node address y [20:27] V1_ has joined the channel [20:27] bnoordhuis: *on address y [20:27] steffkes: bnoordhuis, ty! i suppose these are bytes? sum them up the get used memory, right? [20:27] nsolsen: Mmm -- good point [20:28] tapwater has joined the channel [20:28] MetaJake: what might node.js most imortant advantages be over, say, apache? I can see that speed is on of the most important advantages. [20:28] MetaJake: ^speed is one* [20:28] bnoordhuis: steffkes: kilobytes but yes [20:29] steffkes: bnoordhuis, oh yes .. of course :o [20:29] bradleymeck: concurrent connection memory use (application memory use is generally worse in node.js, but keeping connections is far far less) [20:30] jimt has joined the channel [20:30] sprout has joined the channel [20:30] nsolsen: How about using Apache for the initial handshake on port 80, and then tell the client what port the node application is running on? [20:31] davidvanleeuwen_ has joined the channel [20:31] bnoordhuis: nsolsen: that could work but keep in mind that lots of people are behind proxies that don't allow traffic on non-http ports [20:31] nsolsen: ahh yes :( [20:31] MetaJake: bradleymeck i see [20:32] bnoordhuis: nsolsen: two ip addresses is probably the way to go [20:32] bnoordhuis: nsolsen: or nginx, of course [20:33] nsolsen: bebnordhuis: yes, I like the multi IP solution. I don't know nginx [20:33] nsolsen: sorry for spelling.. :) [20:34] bnoordhuis: nsolsen: it's a web server like apache but better (sorry, pquerna) [20:34] bnoordhuis: faster, lower memory footprint [20:35] nsolsen: bnoordhuis: is it easier to configure wrt. co-hosting, say, PHP and node sites? [20:36] bnoordhuis: nsolsen: there is no mod_php for nginx but you can use fastcgi [20:36] bnoordhuis: alternatively, you can have apache running as a back-end server and let nginx proxy to both apache and node [20:37] bnoordhuis: setting up nginx as a reverse proxy is absurdly easy [20:38] pagameba: what do I need to do to my C++ object to make console.log(obj) actually print out the properties of my object? [20:39] austincheney: can node be configured to execute requests to files with specific file extensions? [20:39] nsolsen: bnoordhuis: thanks for the pointers, I'll have a study :) [20:39] austincheney: like php only responding to php files? [20:39] tj- has joined the channel [20:40] TooTallNate: Has anyone here been listening to my NodeFloyd station? [20:41] isaacs has joined the channel [20:41] noahcampbell has joined the channel [20:41] bnoordhuis: nsolsen: my pleasure [20:41] austincheney: TooTallNate: nope, i just unidled [20:41] quirkey has joined the channel [20:41] bnoordhuis: pagameba: they should be visible if you set the properties with o->Set() [20:41] TooTallNate: unidled? [20:41] bnoordhuis: or SetAccessor() and marked as enumerable [20:42] bradleymeck: austincheney yes, require.registerExt i think it was [20:42] pagameba: bnoordhuis: I am using SetNamedPropertyHandler right now [20:42] pagameba: do I just need to add Set as well? [20:43] sprout has joined the channel [20:43] austincheney: thank you bradleymeck [20:43] Aria has joined the channel [20:43] bnoordhuis: pagameba: i think not [20:43] bnoordhuis: pagameba: do you have an enumerator? [20:43] MattDiPasquale has joined the channel [20:44] pagameba: I have a getter and I just added a query handler in an attempt to do this [20:44] pagameba: so I need an enumerator instead? [20:44] bnoordhuis: pagameba: i'm 95% sure that the answer is yes [20:44] pagameba: lol thx [20:44] bnoordhuis: pagameba: you'll need the query handler too [20:44] markwubben has joined the channel [20:45] pagameba: good, that wasn't wasted effort then :) [20:45] slaskis has joined the channel [20:46] MikhX has joined the channel [20:50] bartt has joined the channel [20:52] Dreamer3 has joined the channel [20:53] pagameba: sweet, thanks bnoordhuis [20:53] bnoordhuis: pagameba: we aim to please [20:53] pagameba: for the record, the query is not needed, just the enumerator [20:53] pagameba: ACTION wonders what query actually does [20:54] bnoordhuis: pagameba: it's for deletion of properties [20:54] bnoordhuis: if you don't implement it, strange things happen [20:54] bnoordhuis: not in the least that the enumeration will probably be off [20:54] bradleymeck: pagameba deletion / the in operator [20:55] pagameba: ACTION quickly puts the query method back in [20:55] bnoordhuis: hha [20:55] Dreamer3 has joined the channel [20:55] bradleymeck: test if it "truly" has a property or it has not been set or it has been removed, thats about it [20:55] danoyoung has left the channel [20:56] pagameba: bradleymeck: thanks, that makes some sense [20:56] mr_daniel has joined the channel [20:57] cloudhead has joined the channel [20:58] Dreamer3 has joined the channel [20:59] jchris1 has joined the channel [21:02] cloudhead: what are people using to do twitter auth? [21:02] cloudhead: anything better maintained than technoweenie's? [21:04] MiiCode2 has joined the channel [21:04] technoweenie: i quit maintaining it because people wrote several clones [21:04] technoweenie: and it was before oauth was required anyway, so i dont even know if it works [21:04] cloudhead: oh I see [21:05] frankieshakes: Can anyone suggest a way to disable logging when running Expresso tests? I keep seeing this in the output: [21:05] frankieshakes: 127.0.0.1 - - [Mon, 22 Nov 2010 20:29:10 GMT] "POST /documents.json HTTP/1.1" 200 73 " [21:06] siculars_ has joined the channel [21:06] frankieshakes: And only after hitting Ctrl-C do I see the "100% Passed" message [21:06] tj-: frankieshakes: with express? use the configure() callbacks.. configure('test', function(){}) read the docs :p [21:06] webr3: has anybody managed to get any xml->dom module working with node 3.1 yet? [21:08] frankieshakes: tj-: Hey… I've got that setup actually: http://www.pastiebin.com/?page=p&id=4cea888bb9bf4 But still not getting the expected output [21:08] tj-: frankieshakes: yeah but is your logger in configure()? because when you dont supply an env it applies to all [21:10] frankieshakes: tj: not sure I follow (sorry for the ignorance… been reading up as much as I can today, but just hit this roadblock and can't find much on the Express google groups discussions about this) [21:11] fly_ has joined the channel [21:11] isaacs has joined the channel [21:12] tkahnoski has joined the channel [21:13] tj: frankieshakes: app.configure(function(){}) runs for all envs, but when you specify an env it only executes when NODE_ENV matches the env you pass [21:14] frankieshakes: tj: right… that much I've got so far. I originally had "app.use(express.logger() )" in the non-specific configure block, but have since removed it and only including it in the 'development' and 'production' configure blocks. So I don't have it in the 'test' configure block. Or, should it be used in the 'test' environment as well? [21:15] jimt_ has joined the channel [21:17] [[zz]] has joined the channel [21:18] saschagehlich: how can I convert a string like "=?ISO-8859-15?Q?=DF?=" back to utf8 via node? [21:18] tj: frankieshakes: no thats fine then, but no logs should be outputting [21:19] ezmobius has joined the channel [21:19] frankieshakes: tj: I re-ran "expresso" after making the change I mentioned above, and now see no output whatsoever. But how do I get the test results to output? [21:20] tj: you need to close connections [21:20] tj: gotta run, sorry lol good luck :p [21:20] c0nde has joined the channel [21:20] c0nde: hi [21:21] frankieshakes: tj: hehe… ok, that'll keep me occupied for a while then. Thanks for the tip though… ;) [21:21] c0nde: is anyone here using jake? I'm having trouble creating a simple jakefile [21:23] siculars_ has joined the channel [21:23] hassox has joined the channel [21:24] kriszyp_ has joined the channel [21:24] c0nde: here's the problem I'm having creating this simple jakefile: http://pastie.org/1318455 [21:26] technoweenie has joined the channel [21:28] sh1mmer has joined the channel [21:28] rkieffer has joined the channel [21:29] mh` has left the channel [21:36] tk has joined the channel [21:38] swistak has joined the channel [21:39] liar has joined the channel [21:39] markwubben has joined the channel [21:39] admc has joined the channel [21:42] isaacs1 has joined the channel [21:43] devinus: what's the most lightweight license other than public domain? [21:43] devinus: like, still a license but barely :P [21:44] Gregor: ISC? [21:44] Ond: "Enjoy" [21:44] Gregor: MIT minus attribution? [21:44] hornairs has joined the channel [21:45] devinus: so it's still ISC then [21:45] Dreamer3 has joined the channel [21:45] Gregor: Pretty much :P [21:45] jesusabdullah: Creative Commons has a "public domain" license [21:45] jesusabdullah: What's ISC? I'm not familiar with that one actually [21:45] konobi: DWTFYW licence [21:46] Gregor: Licenses without a warranty disclaimer, no matter how folksy, are an EXTREMELY bad idea. [21:46] jesusabdullah: I use the wtfpl <_< [21:46] Gregor: For instance, the DWTFYW and WTFPL licenses :P [21:46] jesusabdullah: but not for serious things [21:46] Gregor: (Which are the same but anyway) [21:46] jesusabdullah: just toys [21:46] webr3: cc-zero [21:46] jesusabdullah: Yeah, cc-zero [21:47] webr3: ACTION uses cc-zero [21:47] aliem has joined the channel [21:50] AAA_awright: devinus: Like, it enforces public domain liberalism on all derivative works? [21:50] AAA_awright: I'm writing a draft of the "Imaginary Property-Free License" [21:51] CIA-95: node: 03Tom Hughes 07master * r446beeb 10/ (21 files in 8 dirs): [21:51] CIA-95: node: Add cmake build support. [21:51] CIA-95: node: Squashed commit of ca128f7dcd28cbcfba154c8577ed54d4aa71dd02 with [21:51] CIA-95: node: contributions from Mark Constable (markc@renta.net) and Daniel Gröber [21:51] CIA-95: node: (darklord@darkboxed.org). - http://bit.ly/fJzMLS [21:51] devinus: AAA_awright: nah, i basically just wanna say you can do whatever you want but it still has to be a license for those districts that don't recognize public domain [21:51] AAA_awright: Well legally define "public domain" then [21:52] AAA_awright: "If public domain is not legally defined, it does X Y Z" [21:52] AAA_awright: Who doesn't define public domain? [21:52] markwubben has joined the channel [21:52] Gregor: The fact that a jurisdiction has a definition of public domain does not indicate that they have any laws by which you can author something in the public domain. [21:52] AAA_awright: That wouldn't stand up in any court I can think of not even the creepy Eurpoean ones [21:53] jimt has joined the channel [21:53] AAA_awright: Imaginary Property-Free License (IPFL): This work and derivative works covered by law ("the work") has no permission to be distributed except under the following conditions: [21:53] AAA_awright: 1. The work MUST be redistributed under these conditions or under this license. [21:53] AAA_awright: 2. The distributor MUST grant unrestricted free use of all additional patents, copyrights, and any other permissions necessary for lawful use and redistribution of the work. This means for all time to all persons for any use whatsoever. [21:53] AAA_awright: 3. The work MUST NOT be subject to any other restrictions on redistribution. [21:54] Gregor: What a bizarre license. [21:54] AAA_awright: Dual license it with the AGPL just to drive Stallman up a wall :D [21:54] gf3 has joined the channel [21:54] Gregor: Trying to make a min-copyleft? [21:55] AAA_awright: Yeah, or, Liberal as in liberty [21:55] chrischr_ has joined the channel [21:56] murz has joined the channel [21:56] MikhX has joined the channel [21:56] Gregor: You are intending a weak copyleft, yes? [21:56] javruben has joined the channel [21:56] AAA_awright: To address the concern that you can use public domain works to create a new copyrighted work and destroy all the benefits of public domain... Basically, make it impossible to sue another person to stop using software the way they choose (you can't sue just because they don't distribute sources, etc) [21:57] AAA_awright: Yeah. I guess. [21:57] Gregor: You can do that with various licenses too. All of them that aren't "copyleft" in fact. [21:57] devinus: i wonder what would happen if one day a court took a case that threw the GPL out and they basically said, "Nope. License invalid. Pretty much anybody can use your source now. [21:57] maushu has joined the channel [21:57] Gregor: devinus: If the license was invalid, it would revert to no license, not public domain. [21:58] Gregor: devinus: Which would be NOBODY can use your source. [21:58] AAA_awright: Whose definition of copyleft? Copyleft might still allow people to sue me if, for instance, I don't distribute the source the way the author wants me to [21:58] softdrink: argh.. i need another word for "node", as in "node of a tree structure", but not to be confused with node.js or Node in an html document [21:59] AAA_awright: softdrink: node. [21:59] softdrink: "Thing" just seems way too generic hehe [21:59] Aikar: agreed: node [21:59] konobi: apache 2.0 licence is pretty decent as an all rounder [21:59] maushu: I wonder if it is really worth using jquery. [21:59] softdrink: except "Node" clashes with the html "Node" class. [21:59] Aikar: no reason to not use the proper term just cause node.js uses the word :p [21:59] Aikar: oh for a class name [22:00] softdrink: yeah :) [22:00] Aikar: MyNode! [22:00] bradleymeck: DomNode [22:00] softdrink: except it's *not* a dom node hehe [22:00] devinus: konobi: how is apache license an all rounder? (im unfamilar with it's terms) [22:00] Aikar: NodeElem [22:00] softdrink: more like "generic tree node" [22:00] AAA_awright: Are you looking to name a variable? [22:00] softdrink: looking to name a class [22:00] bradleymeck: Node is a generic term , prefix it with your type [22:00] softdrink: to be used both client and server side [22:00] bradleymeck: BinarySearchTreeNode, whatever [22:00] softdrink: guess i could just go with TreeNode [22:01] konobi: devinus: similar to BSD/MIT licence, but also has patent protection mechanisms [22:01] devinus: ah [22:01] bruse: what about the mozilla public license? [22:02] fly_: hi [22:03] fly_: there is a bug in a 0.3.1 with unicode strings [22:03] sivy has joined the channel [22:04] mikew3c has joined the channel [22:04] konobi: fly_: got test cases in a patch? [22:04] jimt_ has joined the channel [22:05] noahcampbell has joined the channel [22:06] bmizerany has joined the channel [22:06] fly_: konobi, I just start node_chat [22:07] fly_: and write some cyrillic into the room [22:07] fly_: its returt json without last } [22:08] fly_: in answer to /recv [22:08] konobi: sure it's not the browser or some part of the node_chat app that's broken? [22:08] jakehow has joined the channel [22:08] konobi: (iirc, that's a known issue with the node_chat app) [22:08] fly_: could be [22:09] brianmario has joined the channel [22:09] jimt has joined the channel [22:10] fly_: konobi, can you say something about possible fix? [22:10] fly_: please [22:11] konobi: fly_: no idea, tbh... node_chat is just an example app... i'm sure there's better options for IRC style things these days [22:11] maushu: Anyone played with html5 state stuff? [22:11] abiraja has joined the channel [22:12] maushu: Thats it, I'm going to check announcer's log. [22:12] isaacs has joined the channel [22:13] sveimac has joined the channel [22:16] _announcer has joined the channel [22:16] altamic has joined the channel [22:17] indexzero has joined the channel [22:19] Fullmoon has joined the channel [22:20] pagameba: anyone seen a 'most frequently accessed' cache for nodejs? I want to keep some things in memory based on how frequently they are accessed [22:24] technoweenie: pagameba: memcache [22:25] pagameba: I see lots of attempts at nodejs bindings for that :) any recommendations? [22:26] thebigbad: pagameba: if you wanted to hack on something https://github.com/ptarjan/node-cache looks like a fine base. for memcache, https://github.com/elbart/node-memcache looks purty [22:26] airhorns has joined the channel [22:27] thebigbad: actually, really pretty. <3 [22:27] thebigbad: now I need a reason to use memcache [22:28] sveimac has joined the channel [22:29] pagameba: hah [22:30] mscdex: ACTION nudges _announcer [22:32] Booths has joined the channel [22:33] devinus: so why doesn't node have JS typed arrays yet? [22:34] mraleph1: devinus: typed arrays? [22:34] devinus: https://developer.mozilla.org/en/JavaScript_typed_arrays [22:34] devinus: chrome 9 has em [22:34] devinus: mraleph1: ^ [22:35] mraleph1: ah. webgl thingys. [22:35] hornairs has joined the channel [22:35] mraleph1: well... you just need to expose them... they are supported by v8 [22:38] ryah: because they don't have an API yet for encoding and decoding strings [22:38] EGreg_ has joined the channel [22:40] devinus: mraleph1: they actually make array access really fast [22:40] devinus: mraleph1: in any context [22:40] cjm has joined the channel [22:41] mraleph1: ryah: btw, I looked at gdbjit closely. Emitting ELF/DWARF promises to be a bit painful but I'll give it a try on this weekend. [22:42] isaacs has joined the channel [22:45] bnoordhuis: mraleph1: on the weekend? your 120% project? [22:46] mraleph1: mraleph1: kinda =) [22:46] fly_: konobi, no, Im sure this is node problem. here is the testcase http://dpaste.org/Yc5O/ [22:47] [[zz]] has joined the channel [22:48] msilverman2 has joined the channel [22:49] saschagehlich has joined the channel [22:49] mraleph1: bnoordhuis: there is a Russian sci-fi/fantasy book called "Monday starts on Saturday" [22:50] bnoordhuis: mraleph1: i interviewed with google earlier this year [22:50] bnoordhuis: i got the impression you guys make really long hours [22:51] thebigbad: mraleph1: it's by the Strugatsky's! great writers [22:51] mraleph1: thebigbad: no doubt ;-) [22:52] mraleph1: bnoordhuis: and we drink a lot of coffee :-) [22:53] rkieffer: any chance dannycoates is ever online here? I totally need to buy that dude a beer. node-inspector f'in rocks! [22:54] mscdex: rkieffer: i believe so [22:56] captain_morgan has joined the channel [22:57] pedrobelo has joined the channel [22:57] jherdman has joined the channel [22:58] eee_c has joined the channel [23:01] sprout has joined the channel [23:01] googol has joined the channel [23:02] isaacs: fly_: http://dpaste.org/MK53/ [23:03] shimondoodkin has joined the channel [23:04] fly_: isaacs, magic man ) [23:04] isaacs: :D [23:04] isaacs: fly_: JSON can contain UTF chars. [23:05] vdrab has joined the channel [23:05] fly_: ok, i get it [23:05] captain_morgan has left the channel [23:05] fly_: we need to send actual message size [23:05] fly_: instead of chars num [23:05] isaacs: yep [23:06] isaacs: fly_: you can also do body = new Buffer(JSON.stringify(obj)) and then body.length will be byte length [23:06] isaacs: fly_: and sending may be a little faster. [23:06] captain_morgan has joined the channel [23:07] thebigbad: tmpvar: is there a to tell jsdom not to run the page js? [23:07] thebigbad: *a way [23:07] msilverman2 has joined the channel [23:07] tmpvar: not quite yet [23:08] shimondoodkin: :D* [23:09] shimondoodkin: wil code from node 2 work on node 3 without any changes? [23:09] gf3 has joined the channel [23:10] meck has joined the channel [23:10] prettyrobots has joined the channel [23:11] thebigbad: tmpvar: no worries. I'm going to write a patch for issue #79. I think I'll patch jsdom@0.1.19 first (the version I'm using), and then see about getting the change to work in head. [23:13] isaacs has joined the channel [23:13] shimondoodkin: thebigbad: see first if there is a major change in versions from old one to the new one [23:13] shimondoodkin: thebigbad: there was one in the last month [23:14] thebigbad: shimondoodkin: good idea! [23:14] thebigbad: I'd hate to duplicate effort [23:14] atmos has joined the channel [23:16] tmpvar: thebigbad, i'd really appreciate that :) [23:16] shimondoodkin: me too [23:17] thebigbad: shimondoodkin: in HEAD, line 965 of lib/jsdom/level2/html.js has the beginnings of making the urls absolute [23:18] thebigbad: shimondoodkin: node's url module comes with a url.resolve method. can you see any problems with me using it there? [23:19] tylerstalder has joined the channel [23:21] shimondoodkin: i dont know , to know it surly it think ii need to look in node source [23:22] thebigbad: shimondoodkin: no worries. I just wanted to make sure I wasn't wandering into a known dead end :) [23:23] ph^ has joined the channel [23:23] shimondoodkin: i think you have asked to do something else, to make the script not run, you know, it's associated with an element of script [23:24] eee_c has joined the channel [23:25] shimondoodkin: https://github.com/ry/node/blob/master/lib/url.js#L138 [23:25] shimondoodkin: urlResolveObject [23:26] thebigbad: shimondoodkin: good call. for now I can strip out script tags before feeding the html to jsdom [23:27] shimondoodkin: tmpvar: where is the configuration of jsdom object? [23:28] bmizerany has joined the channel [23:28] shimondoodkin: tmpvar: how i could configure jsdom, should it run scripts or not [23:29] pagameba has joined the channel [23:30] jakehow has joined the channel [23:33] shimondoodkin: https://developer.mozilla.org/en/JavaScript_typed_arrays +1 like [23:34] sveimac has joined the channel [23:38] EyePulp has joined the channel [23:39] c4milo has joined the channel [23:40] tmpvar: shimondoodkin, good question [23:40] tmpvar: there are quite a few use cases.. i'd imaging the jsdom(html, level, options) would be an appropriate place (options) [23:41] shimondoodkin: new jsdom(html,$options_array) [23:41] tmpvar: s/imaging/imagine [23:41] tmpvar: shimondoodkin, right now jsdom is not a constructor [23:42] shimondoodkin: i just had a sim ular idea for the same you wrote [23:42] mikeal has joined the channel [23:43] shimondoodkin: https://github.com/tmpvar/jsdom i am looking oon the examples [23:43] isaacs has joined the channel [23:44] [[zz]] has joined the channel [23:44] shimondoodkin: there several ways to start a document [23:45] shimondoodkin: i am trying to figure ount how people would use it [23:45] shimondoodkin: s/ount/out [23:46] markwubben has joined the channel [23:47] sh1mmer: shimondoodkin: look at what dav glass is doing [23:47] sh1mmer: http://express.davglass.com [23:48] shimondoodkin: https://github.com/davglass/yui-express/ iam searching where is jsdom initiation [23:49] bradleymeck has joined the channel [23:52] omygawshkenas has joined the channel [23:53] Fullmoon_ has joined the channel [23:53] shimondoodkin: mpode probabaly it is at https://github.com/davglass/nodejs-yui3 [23:54] shimondoodkin: s/mpode/more [23:58] rchavik has joined the channel [23:59] springmeyer has joined the channel