[00:00] tjholowaychuk: bingomanatee: it wouldnt be so bad "normally" but the way node modules are set up [00:00] tjholowaychuk: it becomes extremely useless [00:00] tjholowaychuk: as in basically never use it [00:00] bingomanatee: modules stymie instanceof? can you use prototype equivalency? [00:01] galaxywatcher has joined the channel [00:01] mike_miller has joined the channel [00:02] feedtheaimbot has joined the channel [00:03] CIA-72: node: 03Ryan Dahl 07v0.4 * rd2298d2 10/ (doc/api/globals.markdown doc/api/modules.markdown): [00:03] CIA-72: node: Add documentation around module.exports and scope of global objects [00:03] CIA-72: node: Closes GH-852. - http://bit.ly/eTn9B1 [00:03] tjholowaychuk: bingomanatee: I want a language with nothing but ducktyping, no instanceof crap at all, just regular methods/props [00:03] ibrahimal-rajhi has joined the channel [00:03] jonpacker has left the channel [00:03] tjholowaychuk: it's super brittle in node though specifically [00:04] bingomanatee: well, nobody gets everything they want in a general purpose language. [00:04] jonpacker has joined the channel [00:04] tjholowaychuk: for sure. I just gotta go through and rip those all out [00:05] tjholowaychuk: it used to kinda work but the way npm works now kinda clobbers those a bit [00:05] llkazu: sed! [00:05] llkazu: sed i say! [00:05] tjholowaychuk: which is all good [00:06] bingomanatee: Well if you create a factory system that metadatas objects upon creation/extension, you could DIY ductype. [00:06] pquerna: ryah: hey, anything else you wanted changed for https://github.com/joyent/node/pull/873 (maybe not for 0.4, but to go into master?) [00:07] tjholowaychuk: bingomanatee: yeah I already have .nodeName for stylus nodes so I'll just switch to using those everywhere [00:07] tjholowaychuk: all the utils break for third-party modules [00:09] piscisaureus: #*&^@&*@$ why doesn't microsoft just use normal regular expressions like everybody else does. [00:09] piscisaureus: It just *had* to be different or they didnt get paid [00:09] Nexxy: >like everybody else [00:09] bingomanatee: it took you a while to figure out that microsoft lives on its own planet [00:10] pquerna: its called washington [00:10] pquerna: its almost like oregon [00:10] pquerna: but not much like california [00:10] Nexxy: hey. [00:10] Nexxy: ;\ [00:10] timmywil has joined the channel [00:10] Nexxy: I'm from PDX [00:10] Nexxy: y u hatin ;< [00:10] pquerna: i'm from spokompton at one point [00:10] pquerna: i'll prolly end up in pdx someday [00:11] piscisaureus: Although I do not get american in-jokes, I assume funny-ness :p [00:11] bingomanatee: Its no coincidence that Microsoft headquarters is way the fuckall from everything else. Even Seattle. [00:11] pquerna: just be another californian driving up housing prices [00:11] saschagehlich has joined the channel [00:11] bingomanatee: ACTION is from PDX. [00:11] Nexxy: pdx is amazink. [00:11] tim_smart: piscisaureus: Regular expressions are different in quit a lot of languages :) [00:11] bingomanatee: We hate you California types. [00:11] tim_smart: quite* [00:11] pquerna: wrong [00:11] pquerna: there are PCRE [00:11] Nexxy: WOAH WOAH speak for yourself ;o [00:11] pquerna: and thats the way it should be [00:11] Nexxy: ACTION is a lover not a fighter [00:11] pquerna: lua pisses me off cus they have their own thing too [00:12] pquerna: (then again, all of Lua is smaller than libpcre) [00:12] piscisaureus: tim_smart: not quite as different as -> http://msdn.microsoft.com/en-us/library/2k3te2cs.aspx?appId=Dev10IDEF1&l=EN-US&k=k%28VS.FINDREPLACE.QUICKREPLACE%29&rd=true [00:13] Me1000 has joined the channel [00:13] saikat has joined the channel [00:13] tim_smart: lolwut, :b instead of \s? [00:13] c4milo1 has joined the channel [00:14] piscisaureus: yes. now tell me how to do lookahead or lookbehind :/ [00:14] tim_smart: Still, vim's syntax is pretty annoying at times as well [00:15] tim_smart: piscisaureus: I'll take a guess that you don't? [00:15] gtramont1na: hey folks, please... I've put some test libs in my devDependencies in my package.json. But "npm bundle install --dev" won't install it. Any tips on this? [00:15] rchavik has joined the channel [00:15] Allen_ has left the channel [00:15] piscisaureus: tim_smart: yes vim pisses me off when I have to use it. [00:16] piscisaureus: sometimes I have to create a file on a linux box without gedit, then I usally stick with `cat >file.txt` [00:17] tim_smart: I <3 vim (my everyday editor), but the regex [00:18] bcelenza has joined the channel [00:18] Charuru: where are npm packages installed on osx? [00:18] Charuru: i can't remember :S [00:18] tim_smart: Charuru: Depends on your npm settings [00:19] tim_smart: Using v1 or <1 [00:19] Charuru: umm [00:19] methym has joined the channel [00:19] Charuru: npm info using npm@0.3.18 [00:19] tim_smart: Charuru: npm config get root [00:20] Charuru: thanks tim_smart [00:24] Jantire has joined the channel [00:27] varioust has joined the channel [00:28] gazumps has joined the channel [00:28] CIA-72: node: 03Scott McWhirter 07v0.4 * r752bbd6 10/ (src/platform.h src/platform_sunos.cc wscript): Add os.cpus() support for sunos - http://bit.ly/hVJQmB [00:28] CIA-72: node: 03Scott McWhirter 07v0.4 * rd953856 10/ src/platform_sunos.cc : Remove extra kstat_open - http://bit.ly/dJKF07 [00:28] CIA-72: node: 03koichik 07v0.4 * rca028f4 10/ doc/api/http.markdown : Fix docs: There were 2 descriptions of 'request' event. - http://bit.ly/gVWnk3 [00:28] jonpacker has left the channel [00:28] jonpacker has joined the channel [00:28] allenm541 has joined the channel [00:28] Jantire: This is kind of unrelated to NodeJS but I feel like Desktop OS's should get a "long press" as well [00:29] Jantire: but for right clicking [00:29] CIA-72: node: 03koichik 07v0.4 * r682b66c 10/ lib/_debugger.js : Auto completion of built-in debugger suggests prefix match rather than partial match. - http://bit.ly/fFH6NZ [00:29] Jantire: like for example in Firefox/Chrome, most of the time when you right it's to open a link in a new tab [00:29] allenm541: Does anyone know much about installing node on Windows using Cygwin who could help me out? [00:29] Jantire: so why not only make the context menu appear when you "long press" the right click [00:30] tim_smart: Jantire: Does your mouse have a middle button? [00:31] Jantire: tim_smart, It's broken atm [00:31] pyrotechnick has joined the channel [00:31] Jantire: tim_smart, but very few people actually use their middle click button [00:31] tim_smart: OK. That is usually open in new tab on most browsers [00:31] CIA-72: node: 03Ryan Dahl 07v0.4 * r0f47f63 10/ doc/api/http.markdown : [00:31] CIA-72: node: Fix doc - no setBodyEnocoding anymore [00:31] CIA-72: node: Thanks Frederic. Closes GH-859. - http://bit.ly/ffII2G [00:31] Jantire: tim_smart, well it's just an example [00:31] [[zz]] has joined the channel [00:32] Jantire: it'd just be to make better use of the right click [00:33] tim_smart: ryah: It seems 'Closes GH-xxx' doesn't actually close the ticket :/ [00:33] mcantelon has left the channel [00:35] not_zpao has joined the channel [00:35] JimBastard has joined the channel [00:35] JimBastard: wow, got my first remix pull request, http://soundcloud.com/marak/the-node-js-rap-txustice-remix [00:35] JimBastard: https://github.com/Marak/node-raps/pull/2 [00:35] JimBastard: epic [00:36] shiawuen has joined the channel [00:36] ChrisPartridge: lol, that rap is great [00:37] JimBastard: the dance remix is kinda better imo ahaha [00:37] ChrisPartridge: "javascript mother fucker" [00:41] binarypie has joined the channel [00:42] jonpacker has joined the channel [00:42] ryah: tim_smart: it does [00:43] ryah: hm [00:43] ryah: well it used to [00:43] ryah: *anger* [00:44] james_gary has joined the channel [00:47] c4milo1: ahah [00:48] tilgovi has joined the channel [00:48] arpegius has joined the channel [00:50] abraxas has joined the channel [00:51] ardcore has left the channel [00:51] eee_c has joined the channel [00:51] k1ttty has joined the channel [00:52] wasabista has joined the channel [00:53] perezd: ryah: I'm here btw [00:53] Eber has joined the channel [00:54] mscdex: does anyone know of a module out there that lets you push Buffers onto an array and then perfom operations on them (like indexOf, copy, etc) as if it were one giant Buffer? [00:55] dyer has joined the channel [00:55] blueadept: is this channel getting bigger or is it just me? [00:55] halfhalo: just you [00:56] Jantire: You probably just hit the "maximize" button on the top corner window. [00:56] ryah: perezd: okay, im still not home [00:56] blueadept: could be at 600 soon [00:56] ryah: ACTION leaves now [00:56] perezd: ryah: no prob, will be here a while [00:57] stonecobra: mscdex, it almost looks like v8 string does that looking at xk's http-simple.js test [00:57] mscdex: stonecobra: huh? [00:58] piscisaureus: 3am. Lets call it a [00:58] piscisaureus: something [00:59] stonecobra: mscdex: https://gist.github.com/911928 - takes 42ms the first time through the loop, about 7+ secs the second time. the prepend/append thing seems to create one giant linked list of a string in the vm [01:00] mscdex: stonecobra: ok? i'm dealing with binary data though :S [01:00] postwait has joined the channel [01:00] mscdex: so it needs to stay a Buffer [01:01] stonecobra: mscdex: nm then [01:01] mscdex: looks like i'll have to write my own [01:01] mscdex: d'oh [01:02] varioust has joined the channel [01:02] tylergillies has joined the channel [01:02] tylergillies has joined the channel [01:04] perezd: anyone in here using nodejs with haproxy in here? [01:04] jonpacker has joined the channel [01:06] mscdex: perezd: it won't work with draft 76 websockets [01:06] mscdex: ;) [01:06] perezd: mscdex: really...? [01:06] perezd: I appear to have it working... [01:07] perezd: I am just using tcp forwarding [01:07] mscdex: oh, yeah if you use tcp forwarding [01:07] mscdex: but not http [01:07] perezd: mscdex: i really just wanted someone to double check my config [01:07] perezd: i am new to using it [01:07] perezd: not sure if its "setup right" [01:08] davidascher has joined the channel [01:08] perezd: mscdex: are you familiar with configs? [01:09] mscdex: perezd: sorry, i'm not. i dropped haproxy as soon as i found out http mode didn't support draft 76 websockets heh :) [01:09] perezd: mscdex: what do u use instead? [01:10] mscdex: nothing at the moment, i'm waiting for nodejitsu's proxy module to gain https support [01:10] perezd: I am doing https+websockets through haproxy just fine [01:10] perezd: as far as I can tell [01:10] perezd: it works [01:10] tyler-iphone has joined the channel [01:10] perezd: just not sure if its configured adequately [01:10] davidascher has joined the channel [01:11] zentoooo has joined the channel [01:12] techwraith has joined the channel [01:13] techwraith: So what's the best way to determine if a file is being run in a require or just by "node file.js"? [01:13] perezd: techwraith: process.env ? [01:13] perezd: erm [01:13] perezd: process.argv [01:14] techwraith: How would that work? [01:14] perezd: yeah, that probably doesn't help [01:14] perezd: lol [01:15] mhiku has joined the channel [01:16] mscdex: techwraith: check `module.parent`, if it is defined, then it's being required, otherwise it's the main module (being run from the command line) [01:16] perezd: thats pretty rad [01:16] techwraith: mscdex: Awesome! [01:19] dguttman_ has joined the channel [01:22] seivan has joined the channel [01:22] pyrony has joined the channel [01:23] mbrevoort has joined the channel [01:24] shaunau has joined the channel [01:25] Phyllio has joined the channel [01:27] johans_ has joined the channel [01:29] rfay has joined the channel [01:30] ibrahimal-rajhi has joined the channel [01:31] ryah: perezd: can we ichat now? [01:31] perezd: yeah! [01:31] ryah: okay, i've never done it- so forgive me [01:32] perezd has joined the channel [01:33] tmpvar has joined the channel [01:35] saikat has joined the channel [01:38] zylo has joined the channel [01:39] charlenopires has joined the channel [01:42] dguttman has joined the channel [01:43] b0t has joined the channel [01:45] Yuffster_work has joined the channel [01:45] piscisaureus: ryah: “If you’re a Windows programmer, I have two questions for you. First, why do you eat poop all day? And secondly, can you help me? Because I really don’t want to come over to your room and eat poop too.” [01:45] piscisaureus: big insults coming my way? Wrath! (git push -f liboio :master) [01:46] pyrony has joined the channel [01:47] modular has joined the channel [01:49] tfe_ has joined the channel [01:49] tfe_ has joined the channel [01:49] indiefan2a has joined the channel [01:50] hassox has joined the channel [01:54] alessio_alexAFK has joined the channel [01:55] mcantelon_ has joined the channel [01:56] Aikar: mscdex: i dont think there is but it def should be. maybe ry would be nice enough to make a "MultiBuffer" into core that uses IndexedPropertyHandler and makes each index reference the correct buffer, and have a MultiBuffer.copyTo C++ api to do the memcpy to another buffer. [01:57] Aikar: I would rather ry implement something like that, cause im sure hed do it better than me >_> otherwise id do it lol [02:00] hornairs has joined the channel [02:02] indexzero has joined the channel [02:02] mike5w3c has joined the channel [02:05] themiddleman has joined the channel [02:06] Druide_ has joined the channel [02:06] jtsnow has joined the channel [02:06] ibrahimal-rajhi has joined the channel [02:08] ljounce has joined the channel [02:09] alessio_alexAFK has joined the channel [02:09] srour has joined the channel [02:09] srour: hello! [02:09] zorzar has joined the channel [02:09] matschaffer has joined the channel [02:10] jetheredge has joined the channel [02:11] eventi has joined the channel [02:14] mscdex: Aikar: i'm starting on a pure js one right now, i need it for my nntp module [02:15] gaYak has joined the channel [02:15] rafacv has joined the channel [02:15] droog has joined the channel [02:19] Emmanuel_ has joined the channel [02:20] JimBastard has joined the channel [02:21] ichilton has joined the channel [02:26] tim_smart: Aikar: You can memcpy to another buffer now [02:27] harth has joined the channel [02:30] pyrotechnick has joined the channel [02:32] dylang has joined the channel [02:32] soulofpeace has joined the channel [02:33] jtsnow has joined the channel [02:33] [[zz]] has joined the channel [02:34] jonpacker has joined the channel [02:35] jesusabdullah: Javascript muthafuckaaa :D [02:36] xandrews has joined the channel [02:36] Booths has joined the channel [02:36] colinclark has joined the channel [02:37] dylang: i know, right? [02:37] Crshman: hey all, i'm getting this error when running this code: https://gist.github.com/914816 [02:37] Crshman: I believe it stems from the fact that I'm sudo-ing the command i'm running [02:37] Crshman: is there any way to get around this? [02:39] dylang: Crshman: i'm not sure what you're trying to do - /home/'"+data+"'/" - are those single quotes needed? [02:39] Crshman: the single quotes prevent "xss"-ish behavior [02:40] Crshman: so you can't pipe in something like username; ifconfig; [02:40] dylang: Crshman: ah, cool [02:40] Crshman: without the single quotes, the du runs, then the ifconfig runs [02:40] Crshman: single quotes executes it literally [02:41] Crshman: there's probably a better way to do that, but that's what I figured out on my own =P [02:43] mbrevoort has joined the channel [02:44] astoon has joined the channel [02:44] pyrony has joined the channel [02:44] MrWarGames has joined the channel [02:45] MrWarGames has joined the channel [02:47] astoon has joined the channel [02:48] ilowhy has joined the channel [02:50] seivan has joined the channel [02:51] mikegerwitz: Crshman: I'm not sure about the error, but the var could still contain single quotes, which would break out of the string. The only way to secure that is to filter out all but the chars you want (e.g. data.replace( /[^a-zA-Z_-]/g, '' )) [02:51] mike_miller has joined the channel [02:51] Crshman: ah good catch mikegerwitz [02:51] Crshman: I was too lazy to make a full blown regex to filter it all out, but I guess I should [02:52] Crshman: i don't think i'll be able to implement this the way I have [02:52] Crshman: i'm going through the source right now and the kill call goes pretty far up the stack [02:53] Crshman: so I can't really extend the kill prototype of child process =/ [02:53] copongcopong has joined the channel [02:55] zkirill has joined the channel [02:58] SvenDowi- has joined the channel [03:00] Aria has joined the channel [03:00] ibrahimal-rajhi has joined the channel [03:02] Jantire: hi all [03:02] Jantire: so I have a sort of unusual question [03:04] Jantire: I'm creating something in Silverlight (no I don't care if you have a vendetta against Microsoft), and I hate the way WCF works (normal method of data-driven applications in Silverlight), so I was thinking about using Node.js and NowJS for all database connectivity, using the HTML bridge in Silverlight to run functions on the web page it's hosted in that gets data from a node.js server [03:06] pyrotechnick: Jantire: what is your question exactly? [03:06] Jantire: pyrotechnick, Is that for any major reason a bad idea? [03:08] pyrotechnick: there are no bad ideaz [03:09] Insanity5902 has joined the channel [03:09] niftylettuce has joined the channel [03:09] pyrotechnick: only bad solutions [03:09] Jantire: pyrotechnick, I mean from a security or speed standpoint [03:09] pyrotechnick: in this case i wouldnt say it's bad, just...complex [03:09] niftylettuce: what is best approach to pass a file path to a node js function for user download? [03:09] niftylettuce: is there a stack overflow example someone knows of? [03:09] niftylettuce: simply user clicks a file and nodejs download [03:10] pyrotechnick: niftylettuce: you just want to host a page with file downloads on node.js? [03:10] niftylettuce: pyrotechnick: yeah b/c files aren't accessible in the public folder [03:10] pyrotechnick: what framework are you using, if any? [03:10] Jantire: pyrotechnick, How is it complex? It's instead of using Ajax or being forced to use something like SQL Server [03:10] niftylettuce: just node js and html5 [03:10] pyrotechnick: i can show you how to do it in express [03:11] pyrotechnick: yes but in node? are you using a library for your app or have you written it all yourself? [03:11] niftylettuce: used a couple modules [03:12] pyrotechnick: connect( [03:12] pyrotechnick: connect.static(__dirname + '/public') [03:12] pyrotechnick: ).listen(3000); [03:12] niftylettuce: nodejs to upload files [03:12] pyrotechnick: ohhh upload [03:12] niftylettuce: no no [03:12] niftylettuce: i mean i already have a nodejs upload script [03:12] pyrotechnick: ok [03:12] pyrotechnick: well [03:12] niftylettuce: i just need it so when user clicks on a file then the download button they dl file [03:12] niftylettuce: using nodejs stream or whatever? [03:12] niftylettuce: idk [03:12] pyrotechnick: im not sure what you're using to do your http [03:13] pyrotechnick: but if you use connect or express which sits on connect [03:13] pyrotechnick: then you can just attach the "static" middleware (module) like i pasted above [03:13] hij1nx has joined the channel [03:13] ilowhy has joined the channel [03:13] pyrotechnick: then anything in /public will be publically accessible at like http://domain.tld/PATH [03:13] pyrotechnick: so if u put my_picture.png in /public [03:14] pyrotechnick: and put a link to it in /public/index.html [03:14] pyrotechnick: then it should work [03:14] niftylettuce: pyrotechnick: like this? http://stackoverflow.com/questions/3828888/download-tar-file-via-nodejs/3829263#3829263 [03:14] pyrotechnick: that is how you do it yourself [03:14] gkatsev: I created a new module, let me know what you think: https://github.com/gkatsev/set.js It's a Set implementation in JavaScript. [03:14] pyrotechnick: i.e. without a library [03:14] pyrotechnick: if you're trying to learn it's good [03:14] Crshman: so if I have a node user account on the server, and run $sudo node from within that account, does it defeat the purpose of not running node as root? [03:14] pyrotechnick: if you're trying to make an efficient and robust app i suggest you use connect+static middleware [03:15] niftylettuce: hmm [03:15] pyrotechnick: yes Crshman, usually [03:15] pyrotechnick: there are ways to run node on 80 without root [03:15] Crshman: that's what I thought [03:15] Crshman: well that's not the issue [03:15] Crshman: i posted my code above, and i'm having issues with killing sudo'd processes [03:16] Crshman: node runs unprivileged, and when it tries to kill a sudo'd process it craps out [03:16] techwraith: Crshman: that's expected behaviour, no? [03:16] Crshman: sure, it makes sense [03:16] Crshman: check out my code: https://gist.github.com/914816 [03:17] Crshman: how do I fix that privilege error [03:17] techwraith: Does it crap out when you run the master process as root? [03:17] Crshman: no, it does not [03:17] Crshman: I tried that [03:17] Crshman: and it sends the "kill" command sudo'd and it works great [03:17] techwraith: That's your answer then [03:17] Crshman: but from a security perspective, is it wise to do so....that's the next question [03:18] techwraith: I would say that code looks pretty unsafe to run as root [03:18] Crshman: yeah... [03:18] techwraith: but it depends on how mission critical this box is for you [03:19] Crshman: i think i'm going to have to go back to the drawing board in terms of permissions [03:19] Crshman: because right now the node user can't access other users' directories for the du command [03:20] techwraith: You could set up groups and handle it with group permissions, but that's pretty complex [03:20] indutny has joined the channel [03:20] Crshman: right [03:20] Crshman: horribly complex [03:20] Crshman: haha [03:21] Crshman: since user accounts on the machine are constantly added/removed [03:21] techwraith: Sounds like a bitch [03:21] Nexxy: ACTION covers ears [03:21] techwraith: lol, really? [03:21] Nexxy: language! ;< [03:21] Crshman: lol [03:21] techwraith: What do you do when jimBastard is around? [03:22] Nexxy: hide [03:22] mikegerwitz: Crshman: Alternatively you could create a shell script that is executed by node, and that can run your command. Node should have permission to kill the script. Then you also have the benefit of doing the processing in that script ;) Which may be cleaner [03:22] b0t has joined the channel [03:22] Crshman: hmm that's an interesting way around it [03:22] NuckingFuts has joined the channel [03:22] Jantire: Are there any secure protocols specifically for database connectivity [03:23] NuckingFuts: Anyone here used SproutCore with NodeJS? [03:23] EyePulp has joined the channel [03:23] techwraith: Nope, but I know the Strobe guys are up to something that uses both [03:24] b0t has joined the channel [03:26] beawesomeinstead has joined the channel [03:26] beawesomeinstead has joined the channel [03:27] Crshman: what if I do something like this in the servers sudo file, node ALL=NOPASSWD:/usr/local/bin/node,/usr/bin/du,/sbin/iptables,/bin/cat [03:27] Crshman: where node is the node, username [03:27] Crshman: that seems to work for the node.js script [03:27] Crshman: no errors are presented [03:27] Crshman: that seems reasonably safe [03:28] techwraith: Crshman: Gonna have to talk to an ops guy about that one. Seems pretty safe to me, but still a little scary [03:29] Crshman: yeah haha [03:29] unomi has joined the channel [03:29] Crshman: this is promising though [03:29] Crshman: node@hy:~$ sudo -n rm [03:29] Crshman: sudo: sorry, a password is required to run sudo [03:29] Crshman: node@hy:~$ sudo -n kill [03:29] Crshman: sudo: sorry, a password is required to run sudo [03:30] saikat has joined the channel [03:31] techwraith: does it ask for a pass? [03:31] Crshman: yes [03:31] Crshman: but the users pass is scrambled [03:31] Crshman: and no ssh access to that account directly [03:31] Crshman: you have to su to it from another account [03:32] techwraith: yep, makes sense [03:32] Crshman: i'm going through all this trouble, but I figure the account I su to the node account with will do all the server screwing up [03:32] Crshman: haha [03:35] tk has joined the channel [03:35] Eber has left the channel [03:35] Crshman: my fancy sudoers line =D [03:35] Crshman: node ALL=NOPASSWD:/usr/local/bin/node,/usr/bin/du,/sbin/iptables,/bin/cat,/root/scripts/add,/root/scripts/delete [03:36] Crshman: i'll consult some ops on that though [03:36] Crshman: jsut to be extra safe [03:36] Crshman: thanks for all your help/suggestions guys [03:36] FireFoxIXI has joined the channel [03:37] ibrahimal-rajhi has joined the channel [03:39] dnolen has joined the channel [03:39] techwraith: :) [03:39] johnnywengluu: could someone help me with vows.js issue [03:39] johnnywengluu: https://gist.github.com/914038 [03:39] johnnywengluu: i dont get why arg2 is undefined [03:41] indutny: ryah: Why you has disabled setCipher in tls? [03:41] davidascher has joined the channel [03:42] tk has joined the channel [03:42] ilowhy has joined the channel [03:43] indutny: anyone knows why setCipher is commented in lib/tls.js? [03:44] norviller has joined the channel [03:44] matschaffer has joined the channel [03:44] xavi has joined the channel [03:44] james_gary has joined the channel [03:44] xavi: hello [03:44] xavi: quick question [03:45] xavi: currently node --version returns 0.1.98 [03:45] xavi: even though i'm currently on 0.4.5 [03:45] xavi: any idea on how to fix that? [03:45] kriszyp has joined the channel [03:45] jonpacker has joined the channel [03:46] ibrahimal-rajhi has joined the channel [03:50] ceej_ has joined the channel [03:50] Me1000 has joined the channel [03:51] ceej__ has joined the channel [03:52] xavi: Ahh, using `make clean install` fixes the issue [03:52] xavi: http://blog.miscellanean.com/?p=79 for more info [03:52] xavi: thanks [03:52] AddZero: http://en.wikipedia.org/wiki/Nodejs "It is proposed that this article be deleted because of the following concern:Does not meet the general notability guideline" !!! [03:53] dguttman has joined the channel [03:53] jonpacker: HAH [03:54] jacter has joined the channel [03:54] jjmalina has joined the channel [03:54] Draggor: that's quite lulzy [03:55] AddZero: Yeah... [03:57] Draggor: yet this is ok: http://en.wikipedia.org/wiki/LOLCODE [03:59] AddZero: exactly. yeah, so, the article may need some help/defense. any wikipedians? [03:59] perezd has joined the channel [04:00] drunknbass has joined the channel [04:00] darshanshankar has joined the channel [04:00] unomi has joined the channel [04:00] unomi has joined the channel [04:02] Draggor: unomi: get to check out the bot at all? [04:02] derferman has joined the channel [04:04] meso has joined the channel [04:06] kriszyp has joined the channel [04:09] tilgovi has joined the channel [04:11] ceej_ has joined the channel [04:11] ibrahimal-rajhi has joined the channel [04:11] dguttman has joined the channel [04:12] astropirate has joined the channel [04:16] jakehow has joined the channel [04:16] xtianw has joined the channel [04:18] ezmobius_ has joined the channel [04:19] saschagehlich has joined the channel [04:19] gtramont1na has joined the channel [04:20] sub_pop has joined the channel [04:20] timcosgrove has joined the channel [04:20] timcosgrove has left the channel [04:20] coreydrake has joined the channel [04:21] coreydrake: can anyone help me with setting up my kinect to work with node.js [04:21] monokrome has left the channel [04:22] ezmobius has joined the channel [04:22] jesusabdullah: What do you have in mind exactly, coreydrake? [04:23] bartt has joined the channel [04:23] jesusabdullah: I mean, I can't *hand* you a solution, but if you tell me how you NORMALLY communicate with a kinect, I may be able to help you brainstorm a solution. [04:23] jesusabdullah: In fact, that sounds like a cool project! [04:23] jesusabdullah: Tell me more. I demand it. [04:23] jesusabdullah: coreydrake. [04:26] james_gary has joined the channel [04:27] ezmobius_ has joined the channel [04:28] JimBastard has joined the channel [04:29] JimBastard: someone should update the node wikipedia page [04:31] ezmobius has joined the channel [04:33] coreydrake: jesusabdullah: sorry, a coworker needed help with something and i forgot i was in irc [04:34] coreydrake: jesusabdullah: so i've followed all the steps in these instructions from blitz studios by a guy named yosef. are you familiar with the method they use? [04:34] jacter has joined the channel [04:37] techwraith: coreydrake: http://labs.blitzagency.com/?p=2634 [04:38] mscdex: JimBastard: get on it! [04:38] techwraith: Oh, you were there already [04:38] techwraith: haven't done it myself [04:38] JimBastard: mscdex: i refuse to contribute to wikipedia, too many pedophiles [04:39] ezmobius has joined the channel [04:40] warreng has joined the channel [04:40] techwraith: coreydrake: Node has changed a bit since that was written, not 100% sure if that code will work still [04:40] jjmalina has joined the channel [04:41] jesusabdullah: copongcopong: I am not! [04:41] jesusabdullah: er [04:42] jesusabdullah: copongcopong: Make your name different from coreydrake's. THAT IS ALL. [04:42] jesusabdullah: Where did coreydrake go? [04:42] jesusabdullah: Y U NO TABL COMPLETE [04:42] jesusabdullah: Must've quitted before I could say words [04:42] jesusabdullah: OH WELLOLOL [04:43] eventi has joined the channel [04:43] bojicas has joined the channel [04:47] zkirill has joined the channel [04:48] davidc_ has joined the channel [04:53] m64253 has joined the channel [04:55] harlanji has joined the channel [04:56] max_dev has joined the channel [04:56] dgathright has joined the channel [04:56] james_gary has left the channel [04:57] themiddleman has joined the channel [05:00] jimt has joined the channel [05:01] davidascher has joined the channel [05:03] davemo has joined the channel [05:04] skm_ has joined the channel [05:05] jimt has joined the channel [05:06] skm_ has joined the channel [05:08] mike_miller has joined the channel [05:08] devrim has joined the channel [05:08] jakehow has joined the channel [05:10] seivan: Hmm we need to extract some parts of our rails app to Node, especially regarding fast ajax queries any ideas on how to get it to work with the databases our Heroku app uses (SQL and Redis) [05:12] kuhkatz has joined the channel [05:13] ilowhy has joined the channel [05:14] ngs has joined the channel [05:14] ziro`_ has joined the channel [05:15] saikat has joined the channel [05:15] dnolen has joined the channel [05:16] matjas has joined the channel [05:17] sivy has joined the channel [05:18] sreeix has joined the channel [05:19] JimBastard has joined the channel [05:19] jeffmoss has joined the channel [05:19] tylerstalder has joined the channel [05:20] jeffmoss: is there a project out there for distributed nodejs ? I have a big dynamic function that I am caching per-process, but I'd like to cache it across a cluster with minimal resources [05:20] jeffmoss: the dynamic function is a template [05:20] jeffmoss: on steroids [05:22] Charuru: http://news.ycombinator.net/item?id=2435845 [05:22] Charuru: lol [05:24] iFire has joined the channel [05:26] devrim has joined the channel [05:26] davidwalsh has joined the channel [05:28] dnolen has joined the channel [05:31] AAA_awright: jeffmoss: Let me know if you find one [05:31] AAA_awright: jeffmoss: Something like map-reduce? [05:31] AAA_awright: There's a number of those projects [05:31] jeffmoss: not really no, that would be interesting though [05:32] wilmoore has joined the channel [05:32] AAA_awright: Or at least libraries [05:32] jeffmoss: like memcache but better, I dunno [05:32] AAA_awright: jeffmoss: What's the comparible distributed project for another language? [05:32] jeffmoss: I feel like memcache is actually going to create a worse situation in my app, I'm thinking it'd be better to build the app in a distributed fashion [05:32] jeffmoss: i.e. this request goes to server 1.2.3.4 [05:33] jeffmoss: I was just curious if someone has had some great ideas in this area [05:34] jeffmoss: seems like redis is probably a good thing for node [05:36] perezd: jeffmoss: i don't really understand [05:36] perezd: you are saying your data is spread across 4 servers? [05:36] perezd: and 1 request fans out to 4 procs? [05:36] jeffmoss: no, my app is large and caches a lot of data [05:36] jeffmoss: which is redundant processing, per core [05:36] jeffmoss: per server, per core [05:37] perezd: and you need them to share stae? [05:37] perezd: state? [05:37] jeffmoss: but marshalling everything into a string and eval() on the other end seems like it'd be somewhat wasteful [05:37] perezd: redis + pub/sub would probably be a good solution [05:37] perezd: it'd allow you to create a state machine [05:38] perezd: http://redis.io/topics/pubsub [05:39] AAA_awright: eval() is rather expensive [05:39] perezd: redis is a good system for sort of queuing data around quickly [05:39] AAA_awright: jeffmoss: I just run four instances of Node.js for four processors and put them behind a load balancer [05:39] jeffmoss: perezd: yeah this looks pretty interesting, might come in handy for some things.. I had another thought [05:39] perezd: pub/sub allows you to maintain the async nature of processing [05:40] perezd: AAA_awright: yeah, but each proc memory is isolated [05:40] perezd: which is good/bad [05:40] perezd: depending on your needs [05:40] jeffmoss: I'm thinking it'd be best if the user is routed to the node instance with the right data... layered clusters of node.js server [05:40] perezd: if you want 1 of 4 processes to be able to work on a similar state mutation, you need a shared state [05:40] AAA_awright: Yeah it would be nice if you could share memory or something [05:40] perezd: AAA_awright: redis++ [05:40] darshanshankar has joined the channel [05:40] perezd: its really lightweight and good at this [05:40] jeffmoss: persistent user processes on the server, that'd be cool [05:40] perezd: because you can let it hold data structures, and publish events for mutations [05:40] AAA_awright: perezd: May as well just use some sort of IPC [05:41] perezd: AAA_awright: but thats going to need to then handle sync [05:41] perezd: via some sort of gossip [05:41] pquerna: oh, you mean like, cassandra [05:41] ljackson has joined the channel [05:41] perezd: that can work too, but redis is really good at just being a data structure server/wrapper around memory with some async events [05:41] perezd: its pretty lightweight conceptually [05:42] AAA_awright: Yeah if I'm gonna use a database I'm gonna use a real one like Cassandra, MySQL, maybe MongoDB? [05:42] perezd: its not about data storage [05:42] perezd: its just about centralization [05:42] perezd: its totally transient, I'd assume [05:42] jeffmoss: redis fits the whole async architecture the best yeah, memcache is cool too but won't help with atomic operations much [05:42] harlanji has joined the channel [05:42] perezd: well, just my $0.02 [05:43] perezd: headin home for the night [05:43] perezd: later noders [05:44] wilmoore_ has joined the channel [05:45] wilmoore_ has joined the channel [05:46] jeffmoss: the built-in streaming proxy capability really makes distributed web-app architecture interesting... [05:47] luke` has joined the channel [05:47] zakabird has joined the channel [05:47] mikl has joined the channel [05:51] dgathright has joined the channel [05:52] stonebranch has joined the channel [05:52] Shrink has joined the channel [05:52] Shrink has joined the channel [05:53] bingomanatee has joined the channel [05:54] jjmalina has joined the channel [05:55] k1ttty has joined the channel [05:56] skm has joined the channel [05:57] copongcopong has joined the channel [05:57] idefine has joined the channel [06:01] kaichenxyz has joined the channel [06:02] kaichenxyz has joined the channel [06:02] aba_sababa has joined the channel [06:04] iFire has joined the channel [06:04] iFire has joined the channel [06:04] ohtogo has joined the channel [06:08] SamuraiJack has joined the channel [06:08] AAA_awright has joined the channel [06:12] MikhX has joined the channel [06:13] Gotham has joined the channel [06:13] Gotham: What's goin down brothas? [06:14] cloudhead2 has joined the channel [06:15] pcardune has joined the channel [06:16] seivan has joined the channel [06:18] jimt has joined the channel [06:22] aho has joined the channel [06:26] Sami_ZzZ___ has joined the channel [06:26] ph^ has joined the channel [06:28] shaunau: mscdex: re Buffy You missed a golden opportunity to : throw new Error('BOOB'); [06:28] hasenj has joined the channel [06:29] bojicas has joined the channel [06:31] jacter has joined the channel [06:32] mraleph has joined the channel [06:33] robotarmy has joined the channel [06:34] gmanika has joined the channel [06:35] soulofpeace has joined the channel [06:37] ako has joined the channel [06:37] Emmanuel_ has joined the channel [06:37] ebaxt has joined the channel [06:38] ebaxt has left the channel [06:39] xandy: hm the mysql module seems to drop some of my inserts hay anyone else this problem? [06:42] groom has joined the channel [06:42] fangel has joined the channel [06:42] jimt_ has joined the channel [06:47] V1 has joined the channel [06:47] ljackson has joined the channel [06:49] emattias has joined the channel [06:49] ajnasz has joined the channel [06:49] patcito has joined the channel [06:50] dachary has joined the channel [06:51] xsyn has joined the channel [06:51] ChrisPartridge: xandy: with node-mysql ? [06:51] xandy: yes chapel [06:52] xandy: chrischris_away [06:52] xandy: ChrisPartridge [06:52] xandy: sry ^^ [06:52] ChrisPartridge: hah [06:52] xandy: it's very strange [06:52] ChrisPartridge: xandy: I haven't noticed it myself, using it fairly extensively [06:52] xandy: hm [06:52] xandy: strange [06:52] ChrisPartridge: xandy: have a particular use-case? [06:53] xandy: yes. wait a moment i try to get some working example code [06:53] michael_bailly1 has joined the channel [06:54] MikhX has joined the channel [06:54] xandy: ChrisPartridge i have this function: https://gist.github.com/915068 [06:55] xandy: and i get thsi output https://gist.github.com/915072 [06:56] xandy: that i starts with 46 is ok but the gap between c:6i:51 and c:18i:52 is my problem [06:58] ChrisPartridge: xandy: not getting any errors? [06:58] xandy: nope [06:59] Shrink has joined the channel [06:59] Shrink has joined the channel [06:59] xandy: thats the exact output [07:00] indutny has joined the channel [07:00] philhawksworth has joined the channel [07:01] xandy: i have some other functions in the background with setInterval but that shouldn't affect the mysql inserts should it? [07:01] philhawksworth has left the channel [07:03] ChrisPartridge: I wouldn't have thought so [07:03] pomodoro has joined the channel [07:03] TomY_ has joined the channel [07:05] tbassetto has joined the channel [07:08] jetienne has joined the channel [07:09] jimt_ has joined the channel [07:10] ako has joined the channel [07:16] mytrile has joined the channel [07:16] mAritz has joined the channel [07:16] ngs has joined the channel [07:16] mytrile: Morning, guys. Any recommendation on oauth module for node ? [07:17] raphdg has joined the channel [07:18] jetienne: mytrile: easy-oauth [07:18] jetienne: https://github.com/robrighter/easy-oauth [07:18] mytrile: cool, thans jetienne [07:18] deebo: anyone know of a opensource express website? (possibly with mysql/redis) [07:18] deebo: would like to see one for examples sake [07:19] coreb has joined the channel [07:20] bergie has joined the channel [07:21] xandy: very strange. i've split up the inserts on 2 different mysql clients and the error still occurs [07:21] ljackson has joined the channel [07:21] Phyllio has joined the channel [07:23] jonpacker has joined the channel [07:24] javaanse_jongens has joined the channel [07:24] jeffmoss: I have server.js and test.js in my project root directory, I can't figure out why the working directory different inside my libraries [07:25] jeffmoss: anybody know? [07:25] ivanfi has joined the channel [07:27] jeffmoss: for some reason __dirname ends up being lib/ [07:27] jeffmoss: I can't figure out why [07:27] jimt has joined the channel [07:27] ehedenst has joined the channel [07:27] xandy: hm ChrisPartridge found the bug. it was a blocking gearman call that shouldn't be blocking [07:28] jonaslund has joined the channel [07:29] xandy: j just wonder why the counter is increased but the query not send [07:29] jeffmoss: __dirname changes in the middle of my app, is that normal? [07:32] jimt_ has joined the channel [07:33] CiRlE has joined the channel [07:36] [AD]Turbo has joined the channel [07:37] [AD]Turbo: hi there [07:37] mraleph has joined the channel [07:38] RaceCondition has joined the channel [07:40] jetienne: jeffmoss: yes http://networkimprov.github.com/node-doc-api/all.html#__dirname it is the dir of the .js which is run [07:41] jeffmoss: so require is relative to the file right [07:41] jeffmoss: i think that was confusing me [07:41] jetienne: jeffmoss: yes [07:44] jimt has joined the channel [07:44] admc has joined the channel [07:48] RaceCondition has left the channel [07:48] bentruyman has joined the channel [07:49] idefine has joined the channel [07:49] niftylettuce has joined the channel [07:50] ElDios has joined the channel [07:50] ph^ has joined the channel [07:51] msucan has joined the channel [07:53] Rodtusker has joined the channel [07:53] teemow has joined the channel [07:54] adam-_-_ has joined the channel [07:54] mike5w3c_ has joined the channel [07:55] no-gooder has joined the channel [07:55] Rodtusker has joined the channel [07:56] jimt has joined the channel [07:56] copongcopong has joined the channel [07:56] pt_tr has joined the channel [07:57] eschnou has joined the channel [07:57] robhawkes has joined the channel [07:57] no-gooder: how can i prevent xss with javascript? [07:57] Druide_ has joined the channel [07:58] no-gooder: i'm using now.js an i'm making remoote call. i need to prevent without any node module.. [07:59] herbySk has joined the channel [08:01] SubStack: no-gooder: that is an issue for whatever templating system you're using [08:02] no-gooder: SubStack, i'm using ejs.it does. but i'm using remoote call.it's kind of chat application [08:03] varioust has joined the channel [08:03] SubStack: how are you updating the dom? [08:03] ElDios: no-gooder can't you simply validate the input? [08:04] no-gooder: SubStack, via jquery [08:04] meso has joined the channel [08:04] SubStack: no-gooder: then just .text(msg) [08:04] no-gooder: ElDios, you mean liek replace() [08:04] Phyllio has left the channel [08:04] SubStack: takes care of all of that shit for you [08:05] ElDios: no-gooder if you feel like you know *what* to replace, do so [08:05] ElDios: you could also HTML-escape it and do as SubStack suggested [08:05] SubStack: you don't need to do anything more, just .text() [08:06] no-gooder: SubStack, .text(msg) is a really good point. [08:06] no-gooder: SubStack, but i'm using append() i ned to add it [08:06] no-gooder: need* [08:06] SubStack: .append($('').text(msg)) [08:08] ElDios: guys while you're still here :P could you suggest me a good nodejs learning source? (screencast, pdf, whatever) [08:08] jimt_ has joined the channel [08:09] hackband has joined the channel [08:09] jeremyselier has joined the channel [08:09] xsyn has joined the channel [08:10] SubStack: ElDios: do you already know javascript pretty well? [08:10] cammm has joined the channel [08:10] cammm: o/ [08:10] dwiash has joined the channel [08:11] SubStack: I learned by just consulting the docs and building stuff [08:11] ElDios: mm.. I can probably ready it quite well, but not write it.. anyway fair enough [08:11] ElDios: SubStack let's suppose I don't know JS *very* well :) [08:11] SubStack: I have http://nodejs.org/docs/v0.4.4/api/all.html open all the time [08:11] SubStack: howtonode.org/ [08:12] figital has joined the channel [08:12] ElDios: mm.. thanks [08:12] cammm: so, whats the general consus re frameworks similar to django from here: https://github.com/joyent/node/wiki/modules [08:12] cammm: ? [08:13] cammm: are there any that get a little more attention than the rest? [08:13] jimt has joined the channel [08:13] jeffmoss: https://gist.github.com/d2fec07d094ca6fbc6ea [08:13] jeffmoss: can someone look at this, what happens is it finds 2 filse [08:14] jeffmoss: in widgets/ [08:14] jeffmoss: var widgetModule = require(__dirname + '/../widgets/' + files[i]); [08:14] jeffmoss: that object should go into the closure there [08:15] jeffmoss: one widget is named foo, other is named bar, so it should set Parser.prototype.foo and Parser.prototype.bar, each will call new Foo and new Bar respectively [08:15] jeffmoss: but what happens is whichever file is loaded last is the module that is initialized for each method [08:15] jeffmoss: foo and bar both call new Bar [08:15] ElDios: jeffmoss I suppose you should change the var name too [08:15] ElDios: like [08:16] __tosh has joined the channel [08:16] ElDios: var widgetModule[i] = require(__dirname + '/../widgets/' + files[i]) [08:16] FireFly has joined the channel [08:16] ElDios: or something like that [08:16] jeffmoss: well i will change [08:16] jeffmoss: can't put i in the closure [08:16] ElDios: just a fast guess anyway [08:16] pt_tr has joined the channel [08:16] ElDios: and still I suppose that code would be cleaner if you use the foreach loop :P [08:17] jeffmoss: I actually can't figure out any way to do this, from what I know, var widgetModule = should alwasy create the new object that gets put in the closure [08:17] jeffmoss: I don't understand how it could end up with a reference to the same module from both function [08:18] shaunau: jeffmoss use the debugger. [08:18] jeffmoss: what debugger? [08:18] shaunau: the node one [08:18] jeffmoss: the interactive environment? [08:18] shaunau: node debug app.js [08:19] shaunau: and put debugger; where you want to break [08:19] sridatta has joined the channel [08:19] shaunau: step, print etc. to inspect your objects.. [08:20] meandi has joined the channel [08:20] JimBastard has joined the channel [08:21] shaunau: jeffmoss: is it possible that widgetModule.widgetName is the same for two widgets by accident? [08:21] JimBastard: ACTION in the house [08:21] jeffmoss: no [08:21] shaunau: k [08:21] bentruyman has joined the channel [08:21] jeffmoss: 12 Apr 03:20:01 - Loaded widget foo [08:21] jeffmoss: 12 Apr 03:20:01 - Loaded widget bar [08:22] jeffmoss: and when I call obj.foo() it calls new Bar [08:22] jeffmoss: if I reverse the order that they load then bar will call new Foo [08:23] shaunau: :) [08:23] shaunau: "its a feature" [08:23] jeffmoss: it's doing something funky with require I think [08:24] jimt has joined the channel [08:24] shaunau: give the debugger a shot, at least you'll be able to step into the code and have a gander [08:25] saikat_ has joined the channel [08:25] bojicas has joined the channel [08:25] shaunau: what is this.initWidget(widget); doign? [08:26] shaunau: ah crap. i gotta leave. [08:26] shaunau: good luck jeffmoss [08:27] saikat has joined the channel [08:28] tokumine has joined the channel [08:29] skm has joined the channel [08:29] coreb has joined the channel [08:29] fly-away has joined the channel [08:30] dixel has joined the channel [08:31] moondust has joined the channel [08:32] cammm: mm [08:32] cammm: so Express looks good [08:33] Remoun has joined the channel [08:35] mikey_p has joined the channel [08:35] pdelgallego has joined the channel [08:36] ilowhy has joined the channel [08:36] jacter has joined the channel [08:36] Emmanuel_ has joined the channel [08:38] saschagehlich has joined the channel [08:42] xsyn has joined the channel [08:43] javaanse_jongens has joined the channel [08:47] javaanse_jongens has joined the channel [08:50] pietern has joined the channel [08:51] roidrage has joined the channel [08:56] bzinger has joined the channel [08:58] xla has joined the channel [09:03] McMAGIC--Copy has joined the channel [09:04] meso has joined the channel [09:07] mikl has joined the channel [09:07] mikl has joined the channel [09:08] liar has joined the channel [09:08] no-gooder has left the channel [09:08] xsyn has joined the channel [09:10] dixel: hello everybody [09:11] ElDios: yo [09:11] ElDios: =) [09:11] Poetro has joined the channel [09:11] sreeix_ has joined the channel [09:12] mmmic_ has joined the channel [09:13] JimBastard: sup [09:13] JimBastard: javascript party [09:14] ElDios: \o/ yeeee [09:15] dixel has left the channel [09:15] dixel has joined the channel [09:16] kaichenxyz_ has joined the channel [09:17] ilowhy has joined the channel [09:19] sreeix_ has joined the channel [09:19] dgathright_ has joined the channel [09:19] xsyn has joined the channel [09:20] xla_ has joined the channel [09:22] littke has joined the channel [09:22] AAA_awright has joined the channel [09:23] kaichenxyz has joined the channel [09:24] jonpacker has joined the channel [09:24] ilowhy has joined the channel [09:25] xla has joined the channel [09:26] M3l7D0wN has joined the channel [09:30] xsyn has joined the channel [09:31] aurynn has joined the channel [09:32] Emmanuel_: for module development, npm automatically change the repo for updates, no ? [09:32] Emmanuel_: or do I have to do something to tell it something changed ? [09:34] JimBastard: My Nodejitsu powers are getting stronger every day. [09:34] JimBastard: I cast a powerful jutsu on the Github: https://github.com/Marak [09:34] aurynn has left the channel [09:38] dwiash has joined the channel [09:43] suckerpunch has joined the channel [09:44] unomi has joined the channel [09:45] ilowhy has joined the channel [09:45] ebaxt has joined the channel [09:45] mc_greeny has joined the channel [09:48] enriclluelles has joined the channel [09:55] jonathantaylor has joined the channel [09:56] fermion has joined the channel [09:56] jonathantaylor: How do I set a timeout on client http requests? [09:56] mhiku has joined the channel [09:57] jonathantaylor: my node app is connecting to a webservice but I want it to timeout if it takes longer than 10 seconds total [09:57] ElDios: JimBastard LOL [09:57] jonathantaylor: so thats connection time + data transfer time can't exceed 10 seconds [09:57] CiRlE has joined the channel [09:59] eventi has joined the channel [09:59] xandy: can i restart a node.js process from node.js? [09:59] xandy: with the same parameters evn variables etc [10:00] ElDios: JimBastard holy shit how much stuff you wrote on github! [10:00] xandy: i want my script to reload itself after a filechange [10:01] dwiash has joined the channel [10:01] hellp has joined the channel [10:02] jschoolcraft has joined the channel [10:03] JimBastard: ElDios: it happens [10:03] saikat has joined the channel [10:04] ElDios: xandy just use nodemon [10:04] ElDios: JimBastard do you mean it happened without you noticing? :) [10:04] JimBastard: lol [10:05] zemanel has joined the channel [10:05] JimBastard: xandy: use https://github.com/indexzero/forever [10:06] Tyrkul has joined the channel [10:06] ElDios: xandy also cluster [10:06] Tyrkul has left the channel [10:07] JimBastard: xandy: you think you want code restarts, but you really dont [10:08] ElDios: JimBastard --> http://www.maraksquires.com/articles/2010/02/03/you-love-mustache-js-and-just-dont-know-it-yet/ ---> ARGH!!! neon light green var names are AWFUL on whitish background! [10:08] xandy: JimBastard why not? [10:09] emattias_ has joined the channel [10:09] hackband has joined the channel [10:10] dcelix has joined the channel [10:14] JimBastard has joined the channel [10:14] ilowhy has joined the channel [10:16] suckerpunch has joined the channel [10:16] kaichenxyz has joined the channel [10:16] jonpacker has joined the channel [10:17] Vertice: i fucking hate mustache and handlebars [10:17] Vertice: fwiw [10:18] JimBastard: that article is years old [10:18] Vertice: it's inability to iterate over hashes, and the lack of index in it's recursion (which is why it cant iterate over hashes), and the frustrating nature of how it's helpers 'work' [10:18] Vertice: yeah. it's just brining up fresh bile =) [10:19] JimBastard: http://blog.nodejitsu.com/micro-templates-are-dead [10:19] JimBastard: there you go [10:19] JimBastard: suck on that Vertice [10:19] Vertice: i tried weld recently, but it wasnt working correctly. (this was when it still needed jquery, just as it was announced) [10:19] Vertice: btw. am I the only person who is uneasy with jsdom ? [10:20] Vertice: i mean. i respect it, and it works more often than not [10:20] dwiash has joined the channel [10:20] Vertice: http://www.ohloh.net/p/jsdom/analyses/latest [10:20] Vertice: but 161k loc ? [10:22] enriclluelles has left the channel [10:22] JimBastard: Vertice: you make tests that pass all lvl 1 and 2 dom [10:22] Vertice: so that includes tests ? [10:23] Vertice: that's better =) [10:25] fermion has joined the channel [10:25] slaskis: how do you guys test a writable stream? [10:26] egor has joined the channel [10:26] slaskis: i just want to test if something is written to it [10:27] ElDios: define $something [10:27] slaskis: i've tried this: https://gist.github.com/d54e25e546f825fccb71 [10:27] ElDios: if it's printable just ... print it (to console maybe) [10:28] slaskis: ElDios: yeah, but i just want it automated [10:28] ElDios: brb [10:29] jonaslund: mustache looks nice [10:30] JimBastard: N̩̟̗͙͕̖͙̬̯͙̩̻̭̆͋̏̃̅̋͂O͚͙͕̝̜͓̱̯͖͚͓͖̱̱̠̫̝̲͉̼ͭͯͥ͋̆D̪̘̼̭͈̠͚̭̹̲̘̥͌ͣ̓ͧ̊̈̃̚E̤͓̲̻̱̘̠͎̤͚͔̮̞̞͓̭̞̹̬̫̣̯̪̫̘̬̯̙̠͇̯̟͈͍͙͛͌̋ͧͬ͒̆J̪̱̹͔͎̹̬͕̘͚̲̖̥̲̬̙͙͓ͭ̏͊ͧ́̆͑̂͑̿̍̚̚I̩̜̗̼̦̫̪̘̙̱̻̩̬̯͙̘͎͆̆ͯͣͅT̜̬̝͉̞ͨ̏͌̽ͪ͆̓ͅS̤͇̥̳͔̬͖͔̩̗͍͆̈͑͐ͧ͋̄̆̇ͤ̑ͧͮͬ͋̋Ȗ̦͕͕͎͓͓̣̖͎͕̥̩̻ [10:30] pyrotechnick: wtf [10:31] JimBastard: anything? [10:31] __tosh has joined the channel [10:31] tmedema has joined the channel [10:32] pyrotechnick: yeah it almost crashed adium [10:32] JimBastard: pyrotechnick: do you see anything strange here: https://github.com/marak [10:32] pyrotechnick has left the channel [10:32] JimBastard: lol [10:32] pyrotechnick has joined the channel [10:32] JimBastard: ACTION the Nodejitsu is strong today [10:32] pyrotechnick: pretty much crashed my adium [10:32] JimBastard: sorry [10:32] JimBastard: try: https://github.com/marak [10:32] JimBastard: ^_^ [10:32] tmedema: is felixge (author of Formidable) ever on IRC, or does he use a different name around here? [10:32] pyrotechnick: HAHA [10:32] JimBastard: tmedema: hes on and off [10:32] pyrotechnick: thats fucking sweet [10:33] tmedema: JimBastard: alright thanks, maybe I should just go ask on the node.js group. I'm trying to pipe a form upload and formidable seems to be very close [10:33] JimBastard: tmedema: mailing list is the way to go [10:34] andi5 has joined the channel [10:34] ilowhy has joined the channel [10:34] no-gooder has joined the channel [10:34] no-gooder: anybody use this : https://github.com/chriso/node-validator [10:34] no-gooder: ?? [10:34] no-gooder: it has a problem on ie. [10:35] no-gooder: it converts ' to ' [10:35] andi5: no-gooder: I use https://github.com/akidee/schema.js [10:35] no-gooder: on firefox or chrome it works as expected but not in ie [10:35] andi5: no-gooder: But it's mainly for server-side validation [10:36] JimBastard: resourcer is good [10:39] emattias has joined the channel [10:40] makuchaku has joined the channel [10:41] no-gooder: JimBastard , which one's? [10:41] JimBastard: https://github.com/cloudhead/resourcer [10:41] JimBastard: no-gooder: https://github.com/cloudhead/resourcer [10:41] FireFly|n900 has joined the channel [10:42] no-gooder: i didn't like it :] [10:42] andi5: JimBastard: It does too much. [10:43] JimBastard: it has the validator class andi5 [10:43] rvaj has joined the channel [10:43] JimBastard: which performs validation against json-schema props + lots of goodies [10:43] kaichenxyz has joined the channel [10:43] JimBastard: its not well documented [10:43] saikat has joined the channel [10:43] JimBastard: but the tests are comprehensive and readable [10:45] xla_ has joined the channel [10:48] kurokikaze has joined the channel [10:48] JimBastard: lol [10:48] pt_tr has joined the channel [10:48] no-gooder: another example : http://www.bennadel.com/blog/2168-Writing-My-First-Node-js-Module-And-Event-Emitter.htm [10:48] kurokikaze: hi2all [10:49] dachary has joined the channel [10:50] herbySk has joined the channel [10:50] kurokikaze: anyone knows where I can get module usage statistics from NPM? [10:51] no-gooder: what are you going to do wtih statistics ? [10:53] adam-_-_ has joined the channel [10:53] xsyn has joined the channel [10:53] ilowhy has joined the channel [10:54] V1: My guess is read them no-gooder :D [10:55] JimBastard: kurokikaze: http://search.npmjs.org/ [10:56] JimBastard: kurokikaze: there is also npmtop [10:56] no-gooder: V1, vow you are so clever. you don't live much with this acuity [10:56] no-gooder: :) [10:57] JimBastard: there is also npm install npmtop [10:57] asabil has joined the channel [11:02] jimt_ has joined the channel [11:06] jimt has joined the channel [11:09] emattias has joined the channel [11:10] pt_tr has joined the channel [11:10] kurokikaze: no-gooder: I need it for a talk on node [11:10] pdelgallego has joined the channel [11:11] davy has joined the channel [11:11] no-gooder: kurokikaze, :) [11:11] davy has left the channel [11:11] jimt has joined the channel [11:12] n2liquid has joined the channel [11:12] kurokikaze: Hm, it's a rating of dependencies [11:12] kurokikaze: Is there a usage statistics? Which modules are installed more frequently? [11:12] ntelford has joined the channel [11:14] ElDios: kurokikaze do you mean a statistic repositories for the entire "nodeJs Project"? [11:14] eee_c has joined the channel [11:14] kurokikaze: I mean, statistics on what people install with `npm install` [11:16] gmci has joined the channel [11:16] ntelford has joined the channel [11:17] jimt has joined the channel [11:17] JimBastard: kurokikaze: dont think so [11:18] n2liquid: kurokikaze: what would you want to do with such information? care to share? [11:18] kurokikaze: n2liquid: I'm doing talk about node.js .I wanted to show what modules are the most popular [11:18] anoop has joined the channel [11:18] n2liquid: kurokikaze: ah, great [11:19] tiagoa has joined the channel [11:19] tmedema: Does anyone have experience with handling multi-file multipart uploads? I am only receiving the first file with Formidable whenever I upload multiple files. [11:19] tmedema: Using www.plupload.com to handle the uploading. [11:20] no-gooder has left the channel [11:20] eventi has joined the channel [11:21] xla has joined the channel [11:22] luke` has joined the channel [11:22] dylang has joined the channel [11:23] luke` has joined the channel [11:23] pdelgallego has joined the channel [11:25] mape: kurokikaze: there aren't any stats like that [11:25] mape: kurokikaze: I asked for it earlier and people weren't fond of the idea [11:26] kurokikaze: mape: too bad. I thought it would be interesting [11:26] mape: Indeed [11:26] kurokikaze: Maybe I should contact isaacs about that [11:27] mape: He was the one I asked [11:27] V1: mape: No stats are stored in the couchdb? [11:27] saschagehlich has joined the channel [11:28] mape: V1: Don't think so, I asked for it thinking it would be fun/handy to see if it was worth supporting old modules I don't use myself [11:28] mape: But from what I recall I was told to use issues on github [11:28] mape: And that it wasen't a contest, people would game it anyway etc etc [11:29] anoop has left the channel [11:33] Mulleteer has left the channel [11:35] V1: mape: By looking at the registry couchdb app, its not even stored anyays [11:35] fly-away has joined the channel [11:35] mape: yeah [11:35] mape: could though [11:36] dnolen has joined the channel [11:37] jimt has joined the channel [11:37] V1: yup, probably even directly build in to couchdb [11:38] ilowhy has joined the channel [11:39] hwinkel has joined the channel [11:40] astoon has joined the channel [11:40] ph^ has joined the channel [11:41] Epeli: Mailing module suggestions? [11:42] pt_tr has joined the channel [11:43] varioust has joined the channel [11:44] JimBastard: Epeli: not my node_mailer lol [11:44] JimBastard: check the wiki page [11:47] tiemonster has joined the channel [11:47] indutny: hey guys [11:48] indutny: I'm experiencing strange tls problems. At some moment connection stops emiting 'data' event [11:49] indutny: anyone encountered that? [11:53] jtsnow has joined the channel [11:53] muz1 has joined the channel [11:53] jonpacker has joined the channel [11:54] muz1: hey all [11:55] unomi has joined the channel [11:55] tjholowaychuk has joined the channel [11:55] beawesomeinstead has joined the channel [11:57] muz1: I have a easy question about session objects in expressjs, would this be a good place or is there expressjs channel I couldn't find? [11:58] okuryu has joined the channel [11:58] ajoslin103 has joined the channel [11:59] tjholowaychuk: muz1: feel free to ask me [11:59] tjholowaychuk: im usually on [11:59] muz1: awesome [11:59] dwiash has joined the channel [11:59] muz1: I actually just figured it out though :) [11:59] muz1: I'll be sticking around though [11:59] tjholowaychuk: haha k awesome [12:00] muz1: just starting to play with node, etc. [12:00] muz1: pretty interesting [12:00] bwinton has joined the channel [12:03] mike5w3c has joined the channel [12:03] ElDios: tjholowaychuk what an honor to read from you.. and as I said to Marak.. how much stuff you wrote :) thanks for all your "work" [12:03] ajoslin103: Help!! I've spun up the [CloudMarket] NodeJS image (ami-691f4c2c) and run the example OK -- now I'm trying to install canvas [sudo npm install canvas] and the install fails. It looks like I don't have privs [via sudo] to create the install directory /usr/lib/node/.npm/canvas. [12:04] tjholowaychuk: ElDios: thanks man, appreciate it, and no problem :) [12:04] ElDios: ;) [12:05] tjholowaychuk: got some cool stylus coming today [12:05] tjholowaychuk: node-canvas gradient generation [12:05] tjholowaychuk: but completely transparent vendor support as well as these generated images [12:05] tjholowaychuk: single prop vs 3+ props / photoshop [12:06] sirkitree has joined the channel [12:07] torgeir has joined the channel [12:07] shaunau has joined the channel [12:09] meandi has joined the channel [12:09] tiagoa_ has joined the channel [12:09] jonaslund has joined the channel [12:09] muz1: node-canvas hey? canvas out of the browser? or something else completely [12:10] tjholowaychuk: yup canvas on the server side [12:10] tjholowaychuk: it uses cairo [12:11] jonaslund: could be good for pre-rendering or when you're using reduced functionality on the client [12:11] mmmic_ has joined the channel [12:11] tjholowaychuk: yeah we use it as a fallback for charting [12:11] tjholowaychuk: and image manip [12:12] kuebk has joined the channel [12:12] kuebk: hi [12:12] jonaslund: it's on github ? [12:12] tjholowaychuk: jonaslund: yup, learnboost/node-canvas [12:12] dcelix has joined the channel [12:13] ilowhy has joined the channel [12:13] muz1: ahh nice [12:13] muz1: that would be cool [12:13] jonaslund: (y) [12:13] jonaslund: personally i'll prolly go for svg for most stuff though [12:14] tjholowaychuk: cant manipulate images with svg [12:14] muz1: also is everybody using jade? or is there others I should be looking at? [12:14] jonaslund: at least for the time being [12:14] tjholowaychuk: muz1: wouldn't say everyone, but if you are used to something like haml, or like that sort of thing [12:14] jonaslund: tjholowaychuk: well that's not my main purpose for the time, most of what i need to do can be done with layering [12:14] tjholowaychuk: if not there are ejs / mustache and other options [12:15] tjholowaychuk: jonaslund: for sure [12:15] xiackok has joined the channel [12:15] jonaslund: mustache looks nice [12:15] muz1: mustache seems interesting [12:15] McMAGIC--Copy has joined the channel [12:15] dyer has joined the channel [12:15] dyer has joined the channel [12:15] Shinuza has joined the channel [12:15] ElDios: naa.. as a n00b I prefer jade by far [12:15] ElDios: muz1 may I query you to ask something about your "starting experience"? :) [12:16] ajoslin103 has joined the channel [12:16] criswell has joined the channel [12:17] muz1: ElDios: sure [12:20] ph^ has joined the channel [12:22] ElDios: is anyone willing to partecipate to the nodeJS_KO 11? [12:23] devrim has joined the channel [12:24] xtianw has joined the channel [12:25] varioust has joined the channel [12:25] muz1: maybe, depends how far I get with this stuff :) [12:26] kaichenxyz_ has joined the channel [12:26] ElDios: ^_^ [12:26] ElDios: it would be nicxe to be part of a partecipating team [12:26] ElDios: to learn and maybe help too :P [12:27] matschaffer has joined the channel [12:28] kuebk: how can i check on which tag I am using git? [12:29] tjholowaychuk: kuebk: $ git describe --tags [12:29] tjholowaychuk: is one way [12:29] onre has joined the channel [12:29] xla_ has joined the channel [12:30] mheadd has joined the channel [12:30] piscisaureus has joined the channel [12:30] pashky has joined the channel [12:30] arpegius has joined the channel [12:30] postwait has joined the channel [12:30] zubairov has joined the channel [12:32] Shinuza has joined the channel [12:32] Guest42781 has joined the channel [12:33] jscheel has joined the channel [12:33] jscheel has joined the channel [12:33] tjholowaychuk: c++ is soo ugly omg [12:34] Squeese has joined the channel [12:34] ElDios: tjholowaychuk you're not the only one saying so.. :) [12:35] pt_tr has joined the channel [12:35] tjholowaychuk: I wish c had a few of the features [12:35] tjholowaychuk: but thats it [12:35] tjholowaychuk: "reactor::IOWatcher::IOWatcher(callback_t callback, int fd, int flags): _fd(fd), _flags(flags), _callback(callback)" [12:35] tjholowaychuk: haha [12:36] tjholowaychuk: awesome, looks great, good job c++ [12:36] V1: ElDios: ofc I'm gonna enter nodejs ko 2011 and try to beat mape again ;D [12:36] fogus` has joined the channel [12:36] muz1: yeh c++ can get very long and ugly [12:36] mape: V1: I'm organizing this year :) [12:37] V1: mape: O M G, my chances of winning improved with 50% :D [12:37] kriszyp has joined the channel [12:37] mape: Hehe [12:37] ElDios: XD [12:37] V1: ;D [12:37] jano has joined the channel [12:37] bergie has joined the channel [12:37] V1: mape: solo's are allowed again right :P [12:38] christophsturm has joined the channel [12:38] muz1: probably a stupid question, with jade how do I output a

with a inside of it (e.g.

Blah, there and this, that things

? I think I am missing something simple [12:38] Squeese: Being a mysql/sqlite user for.. well, everything i've done - started toying with nodejs for my personal projects, would like to try some "nosql" db's, any tips on a good start? mac btw :) [12:38] muz1: when is nodejs ko this year? [12:38] ElDios: august [12:38] ElDios: muz1 for the jade quetsion [12:39] Lorentz has joined the channel [12:39] ElDios: p\n\s\sa (href='there')\n [12:39] ElDios: sorry [12:39] ElDios: p\n\s\sa\s(href='there')\n [12:39] xla has joined the channel [12:39] ElDios: where \n is newline and \s is space [12:39] tjholowaychuk: you dont need a space before the parens [12:39] ElDios: oh.. then [12:39] ElDios: p\n\s\sa(href='there')\sthere\n [12:40] robhawkes has joined the channel [12:40] tjholowaychuk: p\n | some text\n a(href='#') wharever\n | more text [12:40] ElDios: yay [12:40] ElDios: I did it right faster then tj :) [12:41] charlenopires has joined the channel [12:41] tjholowaychuk: haha :D [12:41] ElDios: things like this are satisfying :P [12:42] muz1: haha thanks [12:42] muz1: simple like I thought [12:42] varioust has joined the channel [12:42] ElDios: jade is awesome to me [12:43] ElDios: still having a decent doc/wiki/tuts would help ppl in adopting it [12:43] ElDios: -_- [12:43] V1: but it can use some more / better documentation [12:43] ElDios: rather than gussing its features [12:43] ElDios: there it goes :) [12:43] tjholowaychuk: heh yeah sorry lol i'll try and get a proper site or extend the readme sometime [12:44] ElDios: well that could be a good part to improve without being a coder.. :P [12:45] charlenopires_ has joined the channel [12:46] Gelegrodan: is there some way to run a command when the server shutdown? any event? [12:46] ElDios: Gelegrodan why is the server shutting down? Ctrl+C? exit? no more istructions? [12:47] mikegerwitz: Gelegrodan: process.on( 'exit' ) [12:47] mikegerwitz: http://nodejs.org/docs/v0.4.5/api/process.html#event_exit_ [12:47] Gelegrodan: ElDios: in this case ctrl+c yes [12:47] ElDios: mikegerwitz I suppose that would not be executed on Ctrl+C [12:47] jscheel: Gelegrodan: if it shuts down from an exception that isn't caught, your server monitoring will need to catch it, I believe [12:47] jscheel: oh [12:47] tjholowaychuk: multiple inheritance ftw [12:47] mikegerwitz: ElDios: It will [12:47] jscheel: nm, you're looking for a forced shutdown [12:47] tjholowaychuk: ACTION still hates classes though [12:48] Gelegrodan: im spawning a child process i want to kill when the server shutdowns [12:48] tjholowaychuk: you can trap SIGINT [12:48] tjholowaychuk: CTRL+C [12:48] Gelegrodan: ive noticed they stay (not so strange) when i ctrl+c the server [12:48] ElDios: yep.. probably trapping SIGINT is the way [12:48] ElDios: anyway take a look at the api mikegerwitz linked [12:48] jlecker has joined the channel [12:49] Gelegrodan: lets try.. [12:50] tjholowaychuk: me wants c++0x [12:50] nyholt has joined the channel [12:50] sledge: tjholowaychuk: you go ##C++ [12:50] ElDios: Gelegrodan there's a SIGINT part in that page [12:51] nephics has joined the channel [12:51] gtramont1na has joined the channel [12:53] skm has joined the channel [12:54] tmedema: Is there a special requirement to post a file to a node.js express server listening for post using cUrl? I've tried curl --upload-file filename localhost:3000/upload but keep getting "cannot put" [12:54] n2liquid: isn't there a MongooseJS channel? [12:54] mike5w3c_ has joined the channel [12:54] Gelegrodan: ElDios: hm.. it seems now like my child process died when i ctrl+c, without adding any code [12:54] Gelegrodan: how is it suppose to do? die with main program, or stay? [12:54] tjholowaychuk: tmedema: and you have -X PUT ? [12:54] hij1nx has joined the channel [12:54] JimBastard has joined the channel [12:54] tjholowaychuk: tmedema: and app.put(whatever) ? [12:54] voodootikigod has left the channel [12:55] ElDios: Gelegrodan --> process.on('SIGINT', function () {}); [12:55] JimBastard: tjholowaychuk: you wrecking with connect as your middleware today? [12:55] tjholowaychuk: JimBastard: what? [12:55] Gelegrodan: ElDios: yes but it died when i ctrl+c node, without adding any code [12:55] JimBastard: tjholowaychuk: wreck with connect as our middleware? [12:55] ElDios: mm.. let me try [12:55] JimBastard: i gave you a shoutout in the node.js rap [12:55] stalled has joined the channel [12:55] JimBastard: lol [12:55] tjholowaychuk: oh haha didn't hear that [12:55] tjholowaychuk: awesome [12:55] JimBastard: :-) [12:56] Gelegrodan: ElDios: yes now it dies.. strange, it didnt do that before... [12:57] ElDios: oh [12:57] ElDios: ok nice :) [12:57] Gelegrodan: ElDios: https://gist.github.com/915453 [12:58] MarkMenard has joined the channel [12:59] andi5 has joined the channel [12:59] kal-EL_ has joined the channel [13:00] ElDios: ahah [13:00] ElDios: lol I'm stuck in the nodejs process [13:00] arpegius has joined the channel [13:00] Gelegrodan: ElDios: kill it with fire [13:00] Gelegrodan: brb [13:00] kaichenxyz has joined the channel [13:01] bcelenza has joined the channel [13:02] ElDios: Gelegrodan commented [13:02] ElDios: on that gist [13:03] secoif_ has joined the channel [13:03] c4milo has joined the channel [13:03] eventi has joined the channel [13:04] astropirate has joined the channel [13:06] shaunau has joined the channel [13:06] ajnasz has joined the channel [13:06] ajnasz has left the channel [13:08] no-gooder has joined the channel [13:08] no-gooder has left the channel [13:08] jarek has joined the channel [13:08] jarek has joined the channel [13:09] lukegalea has joined the channel [13:09] ElDios: how the hell do I hilight code in gist comments? [13:09] rfay has joined the channel [13:09] tjholowaychuk: not sure if you can highlight it [13:10] jschoolcraft: click on line numbers or say L#13 or whatever [13:10] c4milo: ElDios: try ```javascript your code ``` [13:10] ElDios: ok [13:10] jschoolcraft: can't comment on private gists though [13:10] ElDios: found [13:10] ElDios: :) [13:10] ElDios: simply REAL_CODE [13:10] c4milo: nice [13:10] tjholowaychuk: oh you can just indent for that [13:10] tjholowaychuk: it's markdown [13:11] ElDios: tjholowaychuk did not work indenting [13:11] pt_tr has joined the channel [13:11] tjholowaychuk: ElDios: I think it requires 4 space indents [13:11] tjholowaychuk: 4+ is a code block [13:11] ElDios: I refuse to use less or more than 2 space indentation :) [13:11] tjholowaychuk: pff :p [13:12] c4milo: heheh [13:12] c4milo: oh boy [13:13] killfill: hi [13:14] tjholowaychuk: ACTION regrets writing this in c++ [13:14] killfill: i was thinking doing something like this with express: app.namespace('/api/:module', function() { app.resource('/'+req.params.module, require('./server/+'req.params.module)); } [13:14] bergie has joined the channel [13:14] secoif_: I want to test web app stack performance [13:15] secoif_: Any suggestions? [13:15] killfill: am im doing something wrong? or its just cannot use it like that? [13:15] tjholowaychuk: killfill: app.namespace callbacks are not request-level callbacks [13:15] secoif_: Its a rails app, and it's real slow in places [13:15] tjholowaychuk: the other app.namespace() calls within that callback are used for nesting [13:16] tjholowaychuk: think of it more as a "block" than a callback [13:16] tjholowaychuk: so req.param.module is not there because there is no request at that point [13:16] shiawuen has joined the channel [13:16] killfill: hmm.. [13:16] shiawuen has joined the channel [13:17] secoif_: Want to replace sections with node, but need to prove improvements objectively [13:18] baudehlo1: secoif: how many users? [13:18] secoif_: Perhaps something BDD like? [13:18] pyrotechnick has left the channel [13:18] killfill: i think i dont understand.. :P anyway, ill just use app.resource for every 'module' by hand.. would be cool to have it nested tho [13:18] adam-_-_ has joined the channel [13:19] secoif_: baudehlo: 100kish a week [13:19] tjholowaychuk: killfill: namespace/resource don't collaborate (ATM at least) [13:19] tjholowaychuk: they are completely separate [13:19] liquidproof has joined the channel [13:19] tjholowaychuk: secoif_: oh god, that woudl be easy for node [13:19] tjholowaychuk: no problem [13:19] baudehlo: secoif_: then it's unlikely to be rails. [13:19] killfill: yup thanks. [13:19] baudehlo: more likely your DB [13:20] mheadd has joined the channel [13:20] secoif_: It's a bit of both, CPU on app server up to 100% on my teat [13:20] secoif_: Test [13:20] secoif_: Test box. [13:21] secoif_: For very few simultaneous connections [13:21] baudehlo: but that could be because you're returning too many rows from your DB and trying to process them in a funny way. [13:21] muz1: hey I get a express render error when I try mustache with app.set('view engine', 'mustache'); [13:21] postwait has joined the channel [13:21] dachary1 has joined the channel [13:22] tjholowaychuk: secoif_: shouldn't be an issue for node, our app is massive and we could handle 100k in less than ~2.5 minutes easy [13:22] tjholowaychuk: and our app is not even remotely optimized [13:22] sreeix has joined the channel [13:22] baudehlo: right, but you can do stupid stuff in any language :) [13:23] secoif_: baudehlo: Thats likely. Basically, a rewrite would be ideal but would be hard to sell to managemwnt after theyve been throwing money at it for 3 years [13:23] muz1: tjholowaychuk: out of interest what app is that? [13:23] tjholowaychuk: muz1: learnboost [13:23] dachary has joined the channel [13:23] muz1: cool [13:23] secoif_: tjholowaychuk: How big is your db [13:24] tjholowaychuk: secoif_: hmm not sure, one sec [13:24] muz1: and that uses jade? [13:24] drudge: good morning fellas [13:25] tjholowaychuk: muz1: yeah [13:25] tjholowaychuk: we have about 100 or so jade templates [13:25] tjholowaychuk: and 16k lines of stylus [13:25] tjholowaychuk: probably similar amount of jade [13:25] muz1: stylus? [13:26] xandrews has joined the channel [13:26] tjholowaychuk: muz1: http://learnboost.github.com/stylus/ [13:26] tjholowaychuk: it's like sass/less on crack [13:26] secoif_: Ours sits at around 5G, doesnt sound too big to me but the server really slows down for certain operations. We are talking 30second+ transactions. [13:27] ElDios: tjholowaychuk :O [13:27] ElDios: for stylus [13:27] saschagehlich has joined the channel [13:27] baudehlo: secoif_: yeah see there's no way that's rail's fault. That's a design/db issue. [13:27] ElDios: is it CSS3 ready-compliant-proactive? :) [13:27] tjholowaychuk: secoif_: ours is 40g [13:27] tjholowaychuk: apparently [13:27] secoif_: baudehlo: I think too many joins, too much 3NF [13:28] baudehlo: what db are you using? [13:28] tjholowaychuk: ElDios: I have a lib kinda like compass I'm releasing right away [13:28] tjholowaychuk: havent had much time to work won it [13:28] tjholowaychuk: but its a start [13:28] ElDios: jade : HTML = stylus : CSS [13:28] ElDios: jade : HTML = stylus : CSS(2.1) [13:28] secoif_: tjholowaychuk: Big. Multiple db servers? Sharding? [13:28] aheckmann has joined the channel [13:29] secoif_: baudehlo: mysql/innodb [13:29] tjholowaychuk: secoif_: I don't handle much of our production stuff, but we do have a few replicas [13:29] tjholowaychuk: (mongodb) [13:29] tjholowaychuk: ah sorry the db is 20gb [13:29] secoif_: still big [13:29] tjholowaychuk: i was including backups [13:29] n2liquid: does anyone here know if there's a one-to-one correlation between Mongoose's models and MongoDB's collections? [13:30] tjholowaychuk: i dont think we have that much data [13:30] tjholowaychuk: mongo just likes to be fat [13:30] tjholowaychuk: from what ive seen [13:30] secoif_: Interesting. [13:30] arpegius_ has joined the channel [13:30] n2liquid: anyone? [13:30] lukegalea: n2liquid: ya.. [13:30] lukegalea: n2liquid: Except if you have embedded schemas [13:30] n2liquid: ah, yeah [13:30] lukegalea: it will create a mongo collection, even though it will never get used. [13:31] n2liquid: lukegalea: I've inserted a document in a collection with the same name as my schema [13:31] muz1: damn I have just realised I haven't done much html is a long time [13:31] muz1: hah [13:31] n2liquid: but I can't find it from the code [13:31] secoif_: n2liquid: You can pretty easily checkout your mongo structure using mongo cmdline [13:31] Insanity5902 has joined the channel [13:31] gattuso has joined the channel [13:31] n2liquid: findOne() keeps returning null [13:31] fmarceau has joined the channel [13:31] n2liquid: secoif_: mongo's shell shows my data [13:31] n2liquid: but Mongoose doesn't seem to [13:31] lukegalea: I think you might need findOne({}) [13:32] lukegalea: not sure if just calling findOne will work [13:32] secoif_: What he said. [13:32] galaxywatcher has joined the channel [13:32] n2liquid: lukegalea: oh yeah, indeed I called findOne with a small query by username and password [13:32] lukegalea: n2liquid: and no luck eh? [13:32] n2liquid: the same query that works on the shell, btw [13:32] n2liquid: lukegalea: no luck [13:32] lukegalea: well, I've had no problems there.. but I can suggest one crazy trick [13:32] killfill: whats the most fun db to work with node? couch, redis, mongo or riak? (just need to store list of things, add and remove) [13:32] lukegalea: launch mongo with very verbose settings [13:32] n2liquid: ah, ok [13:32] lukegalea: so it logs every query [13:32] n2liquid: four v's? [13:33] lukegalea: ya [13:33] n2liquid: ok [13:33] lukegalea: then watch to see what mongoose is running [13:34] n2liquid: lukegalea: oh, that's great, nice tip! [13:34] ElDios: killfill if you need to store simple lists just go with redis [13:34] secoif_: tjholowaychuk: Know if your production guys use any performance profilimg tools [13:34] ElDios: big things and blobs are more comfortable when in mongo or couch [13:35] tjholowaychuk: secoif_: we are not really there yet, we've profiled here and there but nothing serious [13:35] killfill: ok [13:35] tjholowaychuk: have't really had a need to yet, things are going smooth [13:36] secoif_: Yeah, trying to sell node to management you see [13:36] secoif_: Got some room to play but will need hard stats [13:36] secoif_: I guess ab/seige will do for [13:37] tjholowaychuk: well the bottlenecks are relatively the same as any other platform [13:37] secoif_: now [13:37] n2liquid: lukegalea: great, I found it out [13:37] tjholowaychuk: ours is certainly the db [13:37] n2liquid: just so you know [13:37] n2liquid: Mongoose appends an "s" to the end of the schema name [13:37] lukegalea: n2liquid: sweet. Glad to hear. [13:37] n2liquid: and makes it lowercase [13:37] n2liquid: lukegalea: a bit stupid, don't you think? I mean, some plurals don't even end with and "s"... [13:37] graysky has joined the channel [13:38] tjholowaychuk: lukegalea / n2liquid: maybe I can talk them into using lingo's inflection [13:38] tjholowaychuk: s/them/guillermo/ [13:38] augustl: I have a https server with requireCert set to true. When I connect - with a cert - req.connection.getPeerCertificate() is null. Anyone know why? [13:38] lukegalea: tjholowaychuk: hehe. Ya, that would be cool. Lingo eh? I haven't tried it out. Similar to AR inflector I guess. [13:39] n2liquid: tjholowaychuk: I'm new to this; gonna check Lingo out [13:39] tjholowaychuk: lukegalea: pretty much [13:39] drudge: man i swear mongoose 1.x is buggier than before :D [13:39] matschaffer1 has joined the channel [13:40] lukegalea: drudge: it's way better than pre v1 for me. [13:40] colinclark has joined the channel [13:40] lukegalea: but it's still... quirky. [13:40] V1: V1?? [13:40] V1: :D [13:41] ElDios: XD [13:41] n2liquid: lukegalea: is it a good bet for production use? for a project in the likes of Foursquare [13:41] blowery has joined the channel [13:41] killfill: ElDios: i think i like couch better, it saves json nativly.. is https://github.com/felixge/node-couchdb the official node-lib? [13:41] n2liquid: ElDios: where are you from? you use "XD", that's funny [13:41] augustl: anyone on getting the peer certificate? [13:41] ElDios: italian [13:42] n2liquid: ElDios: I see; they use that a lot here in Brazil [13:42] ElDios: I suppose XD is pretty intern(et|at)ional :) [13:42] n2liquid: ElDios: into anime? [13:42] ElDios: yes just a bit :) [13:42] thomblake has joined the channel [13:42] n2liquid: cool, haha [13:42] stagas: augustl: can you gist some code? [13:43] augustl: stagas: allright [13:43] dguttman has joined the channel [13:43] graysky has left the channel [13:43] feedtheaimbot has joined the channel [13:43] prettyrobots has joined the channel [13:44] augustl: http://pastie.org/1786870 [13:45] augustl: stagas: ^^ [13:45] augustl: it logs null [13:45] augustl: I suppose my question is: is getPeerCertificate() the correct way of doing it? [13:45] augustl: as in, am I or node.js at fault here ;) [13:47] jscheel: are there any events for process.stdout? Looking through to documentation, but I'm not seeing anything. [13:47] augustl: I suppose few people do peer certificate stuff around here? [13:47] ryah: jscheel: 'data', 'end', 'close' [13:47] akahn has joined the channel [13:47] tylerstalder has joined the channel [13:47] jscheel: ryah: ah, thanks! [13:48] ryah: augustl: yes [13:48] mbrevoort has joined the channel [13:49] n2liquid: good grief! [13:49] mbrevoor_ has joined the channel [13:49] n2liquid: for some reason my shell queries appear like this in the logs: [13:49] n2liquid: Tue Apr 12 10:47:58 [conn1] query: voicein.accounts{ usr: "n2liquid", pwd: "1234" } [13:50] n2liquid: that's good; it works [13:50] n2liquid: but Mongoose queries appear like this: [13:50] n2liquid: Tue Apr 12 10:48:11 [conn2] query: voicein.accounts{ query: { usr: "n2liquid", pwd: "1234" } } [13:50] n2liquid: and they don't work [13:50] n2liquid: what the hell? [13:50] Gelegrodan: they are wrapped in query [13:50] ElDios: augustl put a var fs = require('fs'); below the https require [13:50] Gelegrodan: so yiou have to use query.usr [13:51] Gelegrodan: instead of jus usr [13:51] ElDios: Gelegrodan did it work like I wrote on gist? [13:51] augustl: ElDios: ah, the paste is out of context [13:51] augustl: ElDios: I'm not getting fs errors [13:51] ElDios: okok :) [13:51] n2liquid: Gelegrodan: you mean all of my documents should have a "query" root? [13:51] n2liquid: that's even sillier than before [13:51] Gelegrodan: n2liquid: hm.. then remove it :) [13:51] marshall has joined the channel [13:51] Gelegrodan: ElDios: didnt try, let me try :) [13:52] n2liquid: Gelegrodan: Mongoose is putting there itself [13:52] Gelegrodan: n2liquid: ah ok, havent tried it [13:52] no-gooder has joined the channel [13:52] n2liquid: Gelegrodan: my query is just Account.findOne({ usr: username, pwd: password }, callback); [13:52] n2liquid: any ideas? [13:52] Gelegrodan: ElDios: ^CSIGINT trapped [13:52] Gelegrodan: guess it works :) [13:53] ElDios: Gelegrodan \o/ [13:53] Gelegrodan: n2liquid: nopp, seems like it adds the query root [13:53] stagas: augustl: console.dir(req) [13:53] Lorentz has joined the channel [13:53] n2liquid: Gelegrodan: who can I ask Mongoose help for? [13:53] augustl: stagas: what's console.dir? [13:53] ElDios: augustl I suppose(just guessing) you should put a request.connection.verifyPeer() before the getpeer [13:53] bradleymeck has joined the channel [13:53] ryanfitz has joined the channel [13:54] augustl: ElDios: hmm, no [13:54] n2liquid: I know they have a mailing list, but I'd rather join an IRC channel [13:54] Gelegrodan: n2liquid: i have no idea, but why not just use query.usr? its no so hard [13:54] ElDios: I suppose I should try to do one then :P [13:54] NuckingFuts has joined the channel [13:54] n2liquid: Gelegrodan: that's not the problem; the query returns null because of this added query root [13:54] eee_c has joined the channel [13:54] n2liquid: Gelegrodan: that thing is the query, not the result [13:55] n2liquid: and since my document doesn't have a query root it fails [13:55] Gelegrodan: i see [13:55] Gelegrodan: well i havent tried it [13:55] cbibler_ has joined the channel [13:55] n2liquid: Gelegrodan: cool, thanks anyway [13:56] Gelegrodan: ElDios: haha crap, i outcomment the exi(); im trapped forever :( [13:56] n2liquid: tjholowaychuk: do the Mongoose guys dislike IRC? [13:56] ElDios: Gelegrodan ahahah that's what I was saying! [13:56] tjholowaychuk: n2liquid: it's 7:00am here man [13:56] ElDios: anyway it's simply a matter of Ctrl+Z [13:56] ElDios: and then kill the process [13:56] tjholowaychuk: im only up because I couldnt sleep [13:56] Gelegrodan: yes, not really a problem, just bit funny :) [13:57] n2liquid: tjholowaychuk: that's not what I meant, lol [13:57] ElDios: indeed \o/ [13:57] n2liquid: I mean I couldn't find a Mongoose channel [13:57] tjholowaychuk: oh haha [13:57] n2liquid: they only seem to have a mailing list [13:57] tjholowaychuk: yeah i dont think there is one [13:57] n2liquid: (: [13:57] tjholowaychuk: none of our projects have their own channel [13:57] tjholowaychuk: (yet) [13:57] n2liquid: tjholowaychuk: hm, okay.. would be nice, though [13:57] Blackguard has joined the channel [13:58] n2liquid: I would definitely join [13:58] eee_c1 has joined the channel [13:58] devtime has joined the channel [13:58] ElDios: well having a channel for EVERY and each npm module I installed would maybe a little too much :) [13:58] norviller has joined the channel [13:58] n2liquid: ElDios: .. well, yeah [13:58] ElDios: anyway could be helpful to know some specific-inside-tech without boring the main nodejs chan [13:59] augustl: well this worked http://pastie.org/1786916 [13:59] augustl: so it's me, not node [13:59] n2liquid: ElDios: Mongoose is a pretty big thing, so I maybe it deserved its own channel [14:00] jetienne has joined the channel [14:00] ElDios: as express and jade and stylus (as I can see) and connect and sockets.io and... ok I'll stop here :) [14:01] ElDios: augustl I cannot see any difference except the fs require and some browser error :) [14:01] eee_c has joined the channel [14:01] davidwalsh has joined the channel [14:01] n2liquid: ElDios: express? sure. jade and stylus? could be one channel. and I don't know sockets.io yet, but I think it's a very "core" thingie, so this channel should be good enough [14:01] charlenopires has joined the channel [14:01] javaanse_jongens has joined the channel [14:01] ElDios: I suppose so [14:01] jasong_at_apache has joined the channel [14:01] n2liquid: maybe there could be channels separated by subject forming a NodeJS ecosystem? (: [14:01] augustl: ElDios: what do you mean? [14:02] dmcquay has joined the channel [14:02] augustl: a difference between the two pastes? [14:02] ElDios: augustl yes.. no difference except that you're making a request via browser (not nodejs GET code) and the fs require [14:02] augustl: ElDios: there's no browser code in http://pastie.org/1786916 [14:03] augustl: I'm making the request in the listen callback of the server, with the https module ;) [14:03] ElDios: augustl yes after ---> }).listen(12345, function () { <--- is a HTTPS get call [14:03] augustl: indeed [14:03] arpegius has joined the channel [14:03] trotter has joined the channel [14:03] ElDios: in your pastie you're not so I was supposing you were making the call via browser [14:04] augustl: and I also included instructions for generating the certs [14:04] augustl: oh like that [14:04] augustl: but anyways, the paste works as expected, so in my actual code where it doesn't work I'm probably just doing something wrong [14:04] ElDios: probably yes [14:05] vipaca has joined the channel [14:05] vipaca has joined the channel [14:06] stagas: augustl: maybe do '/path/to/server.key' etc in the fs calls ? [14:06] augustl: again, the code I pasted works just fine :) [14:06] augustl: it's just showing that node works correctly and my code is at fault [14:06] ollieparsley has left the channel [14:06] tylerstalder has joined the channel [14:06] augustl: where my code != the paste [14:06] stagas: if you're running it in the same folder as those files [14:06] tylerstalder has left the channel [14:06] willwhite has joined the channel [14:07] tylerstalder has joined the channel [14:07] augustl: I am, since it's just a proof of concept [14:07] fumanchu182 has joined the channel [14:07] tylerstalder has left the channel [14:07] yhahn has joined the channel [14:08] tylerstalder has joined the channel [14:08] tylerstalder has left the channel [14:08] Know1edge has joined the channel [14:09] tylerstalder has joined the channel [14:09] augustl: oh that's interesting, I found the error [14:09] ceej has joined the channel [14:09] timmywil has joined the channel [14:09] tylerstalder has left the channel [14:10] ElDios: which was.... [14:10] augustl: ..investigating a little further =P [14:10] ElDios: waiting :) [14:11] indiefan2a has joined the channel [14:11] teemow has joined the channel [14:11] tylerstalder has joined the channel [14:11] augustl: http://pastie.org/1786916 [14:12] augustl: (updated the old paste) [14:12] augustl: the peer cert gets nuked when you close the connection apparently [14:12] augustl: ryah: is that intended? [14:12] augustl: I suppose it's memory management [14:13] ElDios: were you loggin to console *after* ending the res? [14:13] augustl: in the paste I am, yes [14:13] augustl: and that's what I did in my actual code too [14:13] ElDios: http://pastie.org/1786870 [14:13] ElDios: no you're not [14:14] ElDios: so that pastie is not a rewrite of your actual code [14:14] augustl: ElDios: you're looking at the wrong paste, http://pastie.org/1786916 [14:14] nibblebot has joined the channel [14:15] piscisaureus: ryah: void oio_update_time(); [14:15] piscisaureus: and void int64_t oio_now(); <- gets the current time according to the event loop [14:16] aphelion has joined the channel [14:16] davidvanleeuwen has joined the channel [14:17] timmywil has joined the channel [14:17] tylerstalder has left the channel [14:18] piscisaureus: make those types uint64_t [14:19] piscisaureus: or maybe not [14:19] xla has joined the channel [14:19] copongcopong has joined the channel [14:19] aabt has joined the channel [14:20] softdrink has joined the channel [14:20] kenbolton has joined the channel [14:21] javaanse_jongens has joined the channel [14:22] ncb000gt has joined the channel [14:22] unomi has joined the channel [14:22] nefD has joined the channel [14:25] nibblebot has joined the channel [14:25] bradleymeck: anyone know the documentation on mksnapshot / if it even work on windows/cygwin [14:25] piscisaureus: bradleymeck: it should work on cygwin [14:26] bradleymeck: ACTION goes back to digging about v8 source [14:26] davidsklar has joined the channel [14:26] piscisaureus: bradleymeck: what do you want to do with it? [14:27] hvgotcodes has joined the channel [14:27] bradleymeck: just wanted to learn it, the snapshot docs are very sparse, wanted to see if there was a way to hook into it some stuff (not sure how it will deal w/ js extensions though) [14:27] davidsklar has joined the channel [14:29] akahn has left the channel [14:29] piscisaureus: bradleymeck: afaict it makes a snapshot of the v8 heap so v8 doesn't need to compile its internal javascript functions every time you start it [14:30] ntelford has joined the channel [14:30] ncb000gt: ryah: ping [14:30] piscisaureus: bradleymeck: afaict it only serves to decrease startup time [14:30] losing has joined the channel [14:30] bradleymeck: piscisaureus, yes but there are hints of it loading extra files ... thats what im interested in (the shell stuff in -h on it) [14:31] mhausenblas has joined the channel [14:32] Me1000 has joined the channel [14:32] ntelford has joined the channel [14:33] ljounce has joined the channel [14:33] nibblebot has joined the channel [14:34] piscisaureus: bradleymeck: hmm.. can't find it. I wonder whether it is even possible. You'd need to ask mraleph about it. [14:34] bojicas has joined the channel [14:34] olegp has joined the channel [14:34] bradleymeck: i bother him too much [14:36] ollieparsley has joined the channel [14:36] ntelford has joined the channel [14:36] ollieparsley: Hello! Can anyone help with node and zeromq? [14:36] jscheel has joined the channel [14:36] augustl: ollieparsley: perhaps, I've used node with ActiveMQ at least ;) [14:37] crodas has joined the channel [14:37] sethetter has joined the channel [14:37] davidascher has joined the channel [14:37] ollieparsley: augustl: cool. I'm just trying to get the zmq bindings to work and I'm falling at the first hurdle. Basically I'm getting "undefined symbol: zmq_init" with the package I installed using npm [14:38] sethetter has left the channel [14:39] augustl: I ended up opening a socket to ActiveMQ and do stuff myself.. The existing ActiveMQ libs assumed too much [14:39] augustl: I realize I'm not being very helpful now ;) [14:39] sethetter has joined the channel [14:39] ollieparsley: no problem. I've contacted the developer but just wanted to see if anyone else had come across it [14:39] EyePulp has joined the channel [14:40] kmiyashiro has joined the channel [14:40] V1: BOOOM and cluster just spawned 24 workers for your new Node.js project [14:40] ElDios: lol [14:40] V1: <3 cluster [14:40] ElDios: quad core? [14:40] indutny: rayh: "TLS: encrypted emit "data" with 37454 bytes" but I've no [14:41] indutny: ryah: data event [14:41] ohtogo has joined the channel [14:41] V1: ElDios: I think so, it's a good server. [14:42] MarkMenard has joined the channel [14:42] DennisRasmussen has joined the channel [14:42] AddZero has joined the channel [14:43] DennisRasmussen: I love node.js but having trouble installing it with Cygwin. (Getting the 'unable to remap python' error) Any help would be awesome ! [14:43] ElDios: no.. probably is six-cores with hyper-threading [14:43] ElDios: 6 x 2 (cores) x 2 (hyper-threading) [14:43] k1ttty has joined the channel [14:44] ElDios: 6 (cpus) x 2 (cores) x 2 (hyper-threading) [14:44] ntelford has joined the channel [14:45] tfe__ has joined the channel [14:45] jakehow has joined the channel [14:46] ElDios: guys any irish in here? [14:46] ElDios: I need to register an irish site [14:46] rjbs has joined the channel [14:47] DennisRasmussen: Google translate? :) [14:47] tfe_ has joined the channel [14:47] ElDios: no.. I need it because you have to live in ireland [14:47] ilowhy has joined the channel [14:47] ElDios: I will register it 50-50 [14:48] Buttons840 has joined the channel [14:48] Draggor: DennisRasmussen: https://github.com/joyent/node/wiki/Building-node.js-on-Cygwin-(Windows) Common problems (such as yours) listed towards the bottom with solutions [14:48] Croms has joined the channel [14:49] DennisRasmussen: Draggor, holy crap I actaully forgot to add that I AM following that tutorial however I still get the error [14:49] ebaxt has joined the channel [14:49] Draggor: DennisRasmussen: what was the result of the rebaseall -v? [14:50] tiemonster: tjholowaychuk: ping [14:50] roger_raymond has joined the channel [14:50] DennisRasmussen: Draggor, it was a long process and unfortunately I rebooted when it was done figuring everything was okay [14:51] DennisRasmussen: I suppose I can just rebaseall -v again? [14:51] sethetter: Guys, I'm wanting to start digging further into node as it seems awesome, but I'm still an amateur developer overall and I'm not quite sure where I should start. Any suggestions? I'm hoping working with node can help me up my dev skills along the way. [14:51] Buttons840: considering node has adopted many features of twisted python, i assume you can make non-blocking calls to c libs with callbacks? it looks like i would use the child module for this? [14:51] roger_raymond has joined the channel [14:51] Draggor: DennisRasmussen: Go for it, I have yet to see a cygwin system that breaks after following that part of the tutorial [14:52] DennisRasmussen: Draggor, I get an error actually [14:52] jmar777 has joined the channel [14:52] Draggor: What's it say? [14:52] DennisRasmussen: http://imgur.com/svc8B.png [14:52] max_dev has joined the channel [14:52] Draggor: Huh, that's new [14:53] Buttons840: sethetter: i'm a bit of an amature myself, but i'd follow a tutorial if you'd like, or just choose an interesting project to attempt; my first "gig" was way over my head but I studied a lot and learned a lot and got it done (it was ugly, but i've since rewritten it) [14:54] ElDios: Buttons840 I want to join if possible [14:54] Draggor: DennisRasmussen: http://blog.brev.name/2010/09/nodejs-on-windows-7-under-cygwin.html [14:54] Buttons840: i guess i don't really have much to say besides don't be afraid of things that seem very hard at first glance [14:54] sethetter: Buttons840: yeah learning from experience is definitely the approach i want to take. i guess i really just need an idea for something to build [14:54] sethetter: that won't be too far over my head [14:55] sethetter: good advice. :) I think I spend too much time taking in information and not enough time doing anything with it. [14:55] jtsnow has joined the channel [14:55] DennisRasmussen: Draggor, I'll let you know of the result. By the way what exactly does rebaseall do? Move files around or what? (new to CLI/linux) [14:55] ElDios: same problem here sethetter [14:56] heavysixer has joined the channel [14:56] flippyhead has joined the channel [14:56] sethetter: ElDios: what experience do you have so far? I've written very basic scripts here and there but that's about it. [14:57] ElDios: maybe a bit more [14:57] ElDios: but not that much [14:57] ElDios: long time junior developer I'd say [14:57] jb55 has joined the channel [14:57] sethetter: same here, haha [14:58] sethetter: maybe we should build something together, that way we can motivate eachother to keep working on it, :P I know that would benefit me at least. [14:58] ElDios: I suppose so [14:58] ElDios: let's query :) [14:58] jscheel: ryah: power went out earlier, so I'm just now back to listening to events on process.stdout(). I'm not sure how to capture the event. What is the event name? The only events that I see are signal events, uncaught exceptions, and exit. I'm sure I'm missing something :P [14:59] jscheel: tried process.stdout.data, but that didn't fire [14:59] jano: who owns ircretary? :) [15:00] jscheel: sorry, process.stdout.on('data' [15:00] sivy has joined the channel [15:00] Buttons840: you guys seen wordsquared.com ? supposedly created with node; i've love to see an infinite version of settlers of catan, build that for me :) [15:00] Buttons840: it would be great fun until the cease and disist notice game [15:00] Buttons840: came* [15:01] Draggor: DennisRasmussen: I'm a bad person in that rebaseall is actually voodoo magic to me [15:01] Buttons840: ACTION fails at typing in more ways than one [15:01] DennisRasmussen: That's alright :) [15:01] kmiyashiro: foo = bar = 2 just assigns foo and bar the value 2, right? [15:02] Venom_X has joined the channel [15:02] jscheel: ah, n/m [15:05] montylounge has joined the channel [15:05] ibrahimal-rajhi has joined the channel [15:05] steph021 has joined the channel [15:06] augustl: kmiyashiro: yes [15:07] kmiyashiro: thanks [15:07] ilowhy has joined the channel [15:08] mattly_ has joined the channel [15:08] sugardave has joined the channel [15:08] niftylettuce has joined the channel [15:08] jjmalina has joined the channel [15:09] hvgotcodes has left the channel [15:09] mattly__ has joined the channel [15:10] jscheel: hmm, well, process.stdout is never firing a data event [15:10] javaanse_jongens has joined the channel [15:12] pietern_ has joined the channel [15:13] augustl: jscheel: stdout never receives data [15:14] augustl: jscheel: stdout never receives data [15:14] augustl: oops [15:14] jscheel: augustl: hmm, is there a way for me to capture what's written to stdout? [15:14] flobblebobble has joined the channel [15:15] augustl: jscheel: in other languages, overriding it is common-ish [15:15] Vertice has joined the channel [15:15] augustl: i.e. in Ruby you woould say $stdout = StringIO.new("") or whatever [15:15] augustl: not sure if this is kosher in node though [15:15] kenbolton has joined the channel [15:15] jjmalina: augustl what are you using to get the data? [15:15] jscheel: augustl: yeah, I can override it, I was hoping for an event [15:15] jscheel: though [15:16] jscheel: cleaner [15:16] jjmalina: err that was meant for jscheel [15:16] pyrony has joined the channel [15:16] jscheel: jjmalina: get the data? [15:17] apoc has joined the channel [15:17] jjmalina: like, what is stdout writing? [15:17] jscheel: jjmalina: oh, everything [15:17] jscheel: jjmalina: I want want to push all of stdout to a socket connection [15:17] skm has joined the channel [15:17] jjmalina: ah [15:18] jjmalina has left the channel [15:18] jjmalina has joined the channel [15:19] heythisisdave has joined the channel [15:19] jscheel: there might be a better way to do this [15:19] jscheel: I just dunno what it is :{ [15:19] jscheel: :P [15:19] Gelegrodan: jscheel: yourthing.stdout.on('data',function(data) { socket.broadcast({msg: data.toString()}) }); [15:20] Emmanuel__ has joined the channel [15:20] bergie has joined the channel [15:20] tanepiper: so who's going to make a node lib for this? http://google-opensource.blogspot.com/2011/04/introducing-cityhash.html :D [15:20] jscheel: Gelegrodan: what is "yourthing" though? How does it get the stdout? [15:20] Gelegrodan: its not a child process you capture stdout from? [15:21] sub_pop has joined the channel [15:21] Gelegrodan: its fomr your keyboard? [15:21] Gelegrodan: from [15:21] MikeW: Howdy. Do any of you do anything where you use something like backbone.js/knockout.js/etc on the client and fetch json to re-render content into the page template, but also render the page server side using the same templates for downlevel webbrowser clients? [15:22] jetienne: MikeW: underscore templates works on node and in browser [15:22] jscheel: Gelegrodan: it's just everything that's written to stdout [15:22] jscheel: Gelegrodan: in my main process [15:22] Gelegrodan: euhm [15:22] Gelegrodan: try process.stdout [15:23] jscheel: Gelegrodan: yeah, that's where I'm having trouble. Can't get it to fire [15:23] Gelegrodan: hm [15:23] Gelegrodan: to capure what you write on your keyboard [15:23] Gelegrodan: i do: [15:23] jscheel: lemme try on a clean file [15:23] Gelegrodan: process.stdin.resume(); [15:23] Gelegrodan: process.stdin.setEncoding('utf8'); [15:23] augustl: I wonder if it's possible to start a mysql server and know when it's up and going from node.js.. [15:23] Gelegrodan: and then like i said [15:24] ukev has joined the channel [15:25] aconbere has joined the channel [15:25] MikeW: jetienne: Investigating. [15:25] jscheel: Gelegrodan: yeah, but for capturing out, instead of in, I'm not getting the event [15:26] ryanfitz has joined the channel [15:26] jscheel: Gelegrodan: for example: http://pastie.org/1787265 [15:26] briznad has joined the channel [15:26] seivan has joined the channel [15:29] amacleod has joined the channel [15:29] pyrony has joined the channel [15:29] hij1nx has joined the channel [15:30] ilowhy has joined the channel [15:31] softdrink: note: -webkit-transform on an element leads to bad things [15:31] javaanse_jongens has joined the channel [15:31] Gelegrodan: hmm i see jscheel , well isnt it easier to do a function to call instead of trying to listen to stdou? [15:31] jscheel: Gelegrodan: no, because I want to capture everything, including output from other libraries. That way I am not creating a new dependency [15:32] FireFly|n900 has joined the channel [15:32] dmcquay_ has joined the channel [15:32] BillyBreen has joined the channel [15:32] pagameba has joined the channel [15:33] jscheel: hmm, I think I need to add the event to the pipe itself maybe [15:33] jscheel: well, no, stdout is the pipe [15:33] jetienne: any recommended way to do unit testing ? something which works on browser too, would be great [15:35] piscisaureus: ryah: [15:35] piscisaureus: void interval_cb(oio_req *req, int64_t skew) { [15:35] piscisaureus: /* do something */ [15:35] piscisaureus: // Rearm the timer [15:35] piscisaureus: oio_timeout(req, (1000 - skew > 0) ? 1000 - skew: 0); [15:35] piscisaureus: } [15:37] jscheel: Gelegrodan: do you know anything about write queue callbacks? [15:37] Gelegrodan: nah [15:37] ElDios: you'd need that :) [15:38] matjas_ has joined the channel [15:38] jscheel: ElDios: me? [15:38] ElDios: Gelegrodan [15:39] montylounge has joined the channel [15:39] Gelegrodan: ElDios: what do i need ? :) [15:39] ElDios: how to write callbacks :) [15:39] Gelegrodan: haha im just a beginner, started looking today.. kinda [15:40] jscheel: ElDios: oh, I was referring specifically to the callbacks queue in streams [15:41] ElDios: Gelegrodan obviously I'm joking.. in italy we say "no-one bore already omniscent" [15:41] onre_ has joined the channel [15:41] jscheel: huh, it actually looks like the drain event should be what I'm looking for [15:41] jscheel: still not firing though [15:41] onre_ has joined the channel [15:42] FireFly has joined the channel [15:42] Gelegrodan: ElDios: hmm you know anything about socket.io? when i make it secure, chrome tries to connec with websockets, but fails and fallbacks to xhr [15:42] ElDios: mmm.. sorry.. not yet :/ [15:43] norviller has joined the channel [15:44] timcosgrove has joined the channel [15:44] ilowhy has joined the channel [15:44] baudehlo1 has joined the channel [15:45] bits58 has joined the channel [15:46] bergie has joined the channel [15:46] timcosgrove has left the channel [15:46] jscheel: aha! [15:46] jscheel: http://markmail.org/message/hfmw2wyrfrhoqnrp [15:46] jscheel: better solutions [15:46] jscheel: solution [15:47] jscheel: overriding like augustl suggested :) [15:47] jakehow has joined the channel [15:50] Gelegrodan: ElDios: found a solution.. connect with https too the site.. should work with http tho, strange :) [15:50] pHcF has joined the channel [15:51] ElDios: Gelegrodan which is the solution? [15:51] Gelegrodan: i use nginx for the htm files [15:51] Gelegrodan: instead of serving them with node [15:51] Gelegrodan: but i connected with http [15:51] Gelegrodan: so when i used https, i worked [15:51] Gelegrodan: but wss wih http should work ^^ [15:52] xla has joined the channel [15:53] matjas_ has joined the channel [15:53] ElDios: aaah [15:53] ElDios: I see [15:53] davidascher has joined the channel [15:53] tjholowaychuk: ACTION doesn't think require.paths should go [15:53] tladuke has joined the channel [15:54] tjholowaychuk: actually nvm, not a huge deal [15:54] d0k has joined the channel [15:55] mikl_ has joined the channel [15:55] themiddleman_itv has joined the channel [15:56] tladuke: does anyone know of some udp based projects i can look at? [15:56] hasenj has joined the channel [15:56] Clooth has joined the channel [15:56] m64253 has joined the channel [15:57] saschagehlich has joined the channel [15:58] harth has joined the channel [15:58] ibrahimal-rajhi has joined the channel [15:58] ljounce has joined the channel [15:59] dmcquay has joined the channel [16:00] sako has joined the channel [16:01] pyrony has joined the channel [16:02] ohtogo has joined the channel [16:02] ilowhy has joined the channel [16:02] ph^ has joined the channel [16:03] themiddleman_itv: From connect middleware, is it possible to get the original route specified in express '/foo/:var' ? [16:03] jtsnow has joined the channel [16:03] tylerstalder has joined the channel [16:04] tjholowaychuk: themiddleman_itv: not easily right now no, what are you doing? [16:04] tjholowaychuk: themiddleman_itv: you can do app.get('/foo/:bar') => [Function, Function] [16:04] tjholowaychuk: returns the matches for that http verb [16:05] Clooth has joined the channel [16:05] themiddleman_itv: tjholowaychuk: ah ok, we want to log response times for each route [16:05] tjholowaychuk: matching the exact route string, or app.match.get('/foo/bar') to see what matches that url [16:05] pandeiro has joined the channel [16:06] skm has joined the channel [16:06] mraleph has joined the channel [16:09] FireFly has joined the channel [16:09] FireFly has joined the channel [16:10] tjholowaychuk: themiddleman_itv: not really ATM [16:10] tjholowaychuk: the data is stored on the function, so this for example is valid [16:10] tjholowaychuk: app.get('/:user', function route(req, res){ [16:10] tjholowaychuk: console.log(route.user); [16:10] saschagehlich has joined the channel [16:11] themiddleman_itv: ahh [16:11] tk has joined the channel [16:11] Leonidas has joined the channel [16:11] nail_ has joined the channel [16:11] ElDios: if you I'd ask a recent book to learn JS from an average level to real PRO.. what will you say? [16:11] mscdex: tladuke: i started work on an rtp module a long while back, there isn't much there but it uses udp [16:12] tjholowaychuk: themiddleman_itv: but I dont currently store the original route string/regexp [16:12] themiddleman_itv: ok [16:13] mikegerwitz: ElDios: For the language itself, Javascript: The Good Parts by Douglas Crockford. I don't know about "Pro", but it goes pretty deep into the intricacies of the language [16:13] M3l7D0wN has joined the channel [16:14] aguynamedben has joined the channel [16:14] tjholowaychuk: I didnt like his book [16:14] jacobolus has joined the channel [16:14] tjholowaychuk: javascript is easy though, just take a little while to sit down and try things [16:14] mikegerwitz: If you weed our his personal opinions, which I often disagree with, it's a very good book [16:14] tjholowaychuk: i think he needs to spend less time talking about js, and write js [16:15] ElDios: tjholowaychuk lol.. thanks [16:15] ElDios: :) [16:15] philipharrison has joined the channel [16:15] ElDios: ah "his" refers to Douglas.. lol I thouth you was referring to me XD [16:15] ElDios: tought* [16:15] tbranyen: as much as i disagree with crockford i find my code often passes jslint [16:15] tbranyen: heh [16:16] mikegerwitz: tbranyen: Mine doesn't because I absolutely refuse the strict JSON syntax in my code ._. He's crazy! lol [16:16] mikegerwitz: { "foo": "bar" } [16:16] tbranyen: mikegerwitz: i don't know what that means [16:16] tbranyen: strict JSON syntax? [16:16] tbranyen: JSON is a defined standard, object literals arne't [16:17] tbranyen: well the way i worded that is confusing [16:17] mikegerwitz: tbranyen: Yes, but jslint parses object literals as if they were JSON : / [16:17] tbranyen: no it doesn't? [16:17] tjholowaychuk: jslint sucks [16:17] Schmallon has joined the channel [16:17] tjholowaychuk: the end [16:17] tjholowaychuk: nothing else to be said about that [16:17] tbranyen: var test = { lol: "hi" }; [16:17] tbranyen: passes jslint [16:17] tbranyen: thats not valid json [16:17] pandeiro: you only need to quote an object key if it has non-alphanumeric chars i think [16:17] JianMeng has joined the channel [16:17] jetienne: tjholowaychuk: why do you think that [16:17] tjholowaychuk: if your language needs some kind of "lint" thing, it's a fail [16:17] tbranyen: pandeiro: yeah you need to quote anything that can't work as a normal variable name [16:17] tjholowaychuk: but IMO people just need to stop the suck [16:18] tbranyen: tjholowaychuk: so C is a fail? [16:18] ruggedcoder has joined the channel [16:18] blowery: dude, all languages have a lint [16:18] mikegerwitz: tbranyen: Huh, I'm not sure why it didn't pass for me, then. I had to literally remove the code from jslint. [16:18] tbranyen: linting exists for most languages [16:18] timcosgrove has joined the channel [16:18] blowery: ACTION makes a new language called lint [16:19] tbranyen: tjholowaychuk: its handy to have all code passing some sort of checker to ensure you don't forget semicolons (if you care about them) sort of thing [16:19] tbranyen: i prefer jshint since i can modify it easier [16:19] tjholowaychuk: I think it's valid for statically typed languages [16:19] tjholowaychuk: but for stuff like js, just... learn the language [16:19] tjholowaychuk: and maintain a style that you accept [16:19] jetienne: (btw there is a jshint. http://jshint.com/) [16:19] tjholowaychuk: simple as that [16:19] tbranyen: tjholowaychuk: but how do you enforce that without a checker? [16:20] tjholowaychuk: eyes? [16:20] tbranyen: if you have multiple people on a large project [16:20] mikegerwitz: tjholowaychuk: If you have a group of 10 people working on a project, commmitting 1000s of lines of code a day, a lint too is necessary ;) [16:20] mikegerwitz: tool* [16:20] tbranyen: i dunno i'm partially involved with the jquery project and they get a shit ton of pull requests that don't pass jslint [16:20] PhilK has joined the channel [16:20] tbranyen: and would end up failing minification because nobody bothered to test [16:21] tjholowaychuk: jquery's source IMO is probably one of the worst [16:21] tjholowaychuk: lol so I dunno [16:21] gJ|Alex has joined the channel [16:21] tbranyen: well look at what it tries to do [16:21] tjholowaychuk: foo ( bar ) [16:21] tbranyen: patching the worst of JS to make it usable [16:21] tbranyen: single space between parens is the standard [16:21] tbranyen: foo( bar ) [16:21] tbranyen: which is very readable [16:21] ilowhy has joined the channel [16:21] tbranyen: although they use tabs for some reason i dunno why [16:22] tjholowaychuk: some of the jquery.ui stuff we have in our app is horrid [16:22] tjholowaychuk: i looked at one the other day [16:22] tjholowaychuk: cant remember which portion it was [16:22] tbranyen: jquery.ui != jquery [16:22] tjholowaychuk: but omg [16:22] tbranyen: heh [16:22] tjholowaychuk: well still [16:22] Kiba has joined the channel [16:22] tjholowaychuk: jquery is brutal too [16:22] Kiba: hello [16:22] Kiba: I am using websocket [16:22] tjholowaychuk: ACTION stops ranting [16:22] Kiba: but firefox 4 doesn't work with websocket [16:22] Kiba: I wanna work around this [16:22] tbranyen: tjholowaychuk: i'll just say most of the time the jquery code is there for a reason [16:23] tbranyen: that project is scrutinized more than any [16:23] Kiba: but do it as simple and as painless as possible [16:23] aconbere has joined the channel [16:23] tbranyen: but to mitigate additional crap they use linting and a strict style guide [16:23] mikegerwitz: Kiba: https://developer.mozilla.org/en/WebSockets, but many use Socket.io to automatically fall back if websockets are unavailable [16:23] tbranyen: that they are adhering to more now [16:23] ElDios: yes [16:23] ElDios: wops.. worry wrong window [16:24] Kiba: mikegerwitz: I don't want to force my user to enable webscoket [16:24] jschoolcraft has left the channel [16:24] zylo has joined the channel [16:24] tbranyen: Kiba: then use socket.io? [16:24] Kiba: is Socket.io the simplest way to work around this? [16:24] tbranyen: yea i've had some issues with it occasionally its def not perfect [16:24] tbranyen: but it does the job better than any other solution i've come across [16:25] tbranyen: but then again i also use opera full time :-/ so i'm used to quirks [16:26] feedtheaimbot_ has joined the channel [16:26] pandeiro: anyone seen the recent posts on HN about SPDY? is this something node.js will likely address down the line? Is HTTP "dead"? (last ? is a joke) [16:26] tbranyen: heh [16:26] tbranyen: dead to google maybe [16:27] pandeiro: pretty insidious the way http:// disappeared from chrome/chromium, indeed [16:27] montylounge has joined the channel [16:27] ebaxt has joined the channel [16:27] eee_c has joined the channel [16:28] hij1nx has joined the channel [16:28] Levi has joined the channel [16:31] perezd has joined the channel [16:31] lukus has joined the channel [16:32] Treffynnon has joined the channel [16:32] javaanse_jongens has joined the channel [16:32] fairwinds has joined the channel [16:33] A_Nub has joined the channel [16:33] A_Nub: Hey guys! [16:34] rafacv has joined the channel [16:37] tjholowaychuk: A_Nub: hey hey [16:37] steph021 has joined the channel [16:37] steph021 has joined the channel [16:37] A_Nub: So, anyone doing anything neat with node yet? [16:38] steveklabnik: no. [16:38] steveklabnik: not at all. [16:38] steveklabnik: :-p [16:38] A_Nub: I wrote a simple telnet shell last night [16:38] A_Nub: and a chat [16:38] A_Nub: and webserver [16:38] perezd: I'm making tps reports [16:38] A_Nub: Oh cewl [16:38] perezd: yeah, except I'm gonna have to come in on saturday [16:38] A_Nub: I have a client <—> server model I want to code [16:39] A_Nub: What do you guys think of a dynamic server? [16:39] A_Nub: Where the client controls how the server pushes data. [16:39] perezd: with like, a lot of pizazz ? [16:39] perezd: oh [16:39] perezd: that kind [16:39] robhawkes has joined the channel [16:39] A_Nub: Well my idea is where you have a server and it just acts as a pipeline. [16:40] A_Nub: I know its been done [16:40] perezd: A_Nub: I am building that [16:40] A_Nub: but with node I see doing this right, makes horizontal scaling a breeze [16:40] A_Nub: you do a master server, clouds servers, then clients [16:40] A_Nub: the master and clouds are identical [16:40] timcosgrove has joined the channel [16:40] A_Nub: except the clouds call the master [16:40] timcosgrove has left the channel [16:41] A_Nub: and the clients call the clouds [16:41] A_Nub: my idea is you seperate connections based on clients, then based on rooms [16:41] steveklabnik: pubsubhubbub? [16:41] steveklabnik: ish? [16:41] isaacs has joined the channel [16:41] A_Nub: then everyone in a room gets forwarded all incoming packets [16:41] Bj_o_rn has joined the channel [16:42] A_Nub: Basically, the idea is eliminating server coding [16:42] A_Nub: and the client api would have listeners and senders that run hidden [16:42] ilowhy has joined the channel [16:42] A_Nub: ie you register a global variable [16:42] A_Nub: and the api automatically fetches and posts the data [16:44] A_Nub has joined the channel [16:45] llkazu has joined the channel [16:46] tylerstalder has joined the channel [16:47] blueadept has joined the channel [16:47] brianc has joined the channel [16:48] TooTallNate has joined the channel [16:48] MikhX has joined the channel [16:49] zwadia has joined the channel [16:50] zomgbie has joined the channel [16:51] zwadia: hi all have a question about node 0.4.5 and SSL [16:52] roidrage has joined the channel [16:52] zwadia: has the issue in regards to re-parsing of root CAs cited here been fixed in 0.4.5? http://journal.paul.querna.org/articles/2011/04/05/openssl-memory-use/ [16:53] timcosgrove has joined the channel [16:53] timcosgrove has left the channel [16:54] methym has joined the channel [16:54] ollieparsley has left the channel [16:55] sivy has joined the channel [16:55] methym: Anyone know where I can find a binary node distribution for windows? [16:56] tiemonster: methym: cygwin? [16:57] methym: yes, that's fine, but is there one where all the node / v8 stuff is already compiled [16:57] meandi2 has joined the channel [16:57] tiemonster: if you just want it to play with: http://node-js.prcn.co.cc/ [16:57] tiemonster: if you're going to use it in production, I'd compile from source [16:58] jonaslund has joined the channel [16:58] methym: tiemonster: great thanks [16:58] tiemonster: I am in no way associated with that site [16:58] tiemonster: if it breaks your OS or kills your dog, it's not my fault [16:59] tiemonster: it should save you some time if you just want to play with it, though [16:59] tiemonster: ;-) [16:59] dgathright has joined the channel [17:00] methym: tiemonster: yes, it's perfect. thanks for the disclaimer :) [17:00] tiemonster: you're welcome! :-D [17:00] tiemonster: zwadia: don't know for sure, but think so [17:00] tiemonster: at least a workaround [17:01] snearch has joined the channel [17:01] pr2012 has joined the channel [17:02] zwadia: I'd rather not deal with the klugey workaround, would be nice to know if this was corrected... the article uses 0.4.3 [17:02] XaKBooT has joined the channel [17:02] tmedema has joined the channel [17:02] tiemonster: "Ryan changed the Node crypto code to use a single global CA store for the default root certificates in 5c35dff41. The current fix is a hack, the correct long term fix is to better use SSL_new with a shared SSL_CTX*, but that will require a larger refactoring of node_crypto.cc." [17:03] tiemonster: https://github.com/joyent/node/commit/5c35dff4192b0e204ab4145b7f9dcdba6e76a93e [17:03] mbrevoort has joined the channel [17:04] zwadia: @tiemonster you the man - thanks! [17:04] tiemonster: awe shucks [17:05] heythisisdave has joined the channel [17:05] mike_miller has joined the channel [17:05] zwadia: lol [17:07] dguttman has joined the channel [17:08] robotarmy has joined the channel [17:10] javaanse_jongens has joined the channel [17:10] creationix has joined the channel [17:10] mikeal has joined the channel [17:10] creationix: "The Java Age"? [17:11] ryanj has joined the channel [17:11] halfhalo: ... [17:13] vikstrous has joined the channel [17:13] synkro has joined the channel [17:14] pandeiro: can anyone explain to me why forEach is implemented for Arrays but not Objects? Wouldn't it be useful to have a built-in iterator method? Am I missing something? [17:14] eee_c has joined the channel [17:15] ziro` has joined the channel [17:15] koo6 has joined the channel [17:15] hornairs has joined the channel [17:15] tjholowaychuk: pandeiro: because js is cool like that [17:15] gkatsev: pandeiro: doesn't quite make sense, especially since objects already ave for..in [17:15] suckerpunch has joined the channel [17:15] tjholowaychuk: its also cool enough to name it "forEach" to be extra ugly [17:15] gkatsev: isn't there map as well? [17:15] creationix: I too wish Object.prototype has a forEach, but for some reason it was never part of the spec [17:16] patcito has joined the channel [17:16] gkatsev: v8: [0,1,2].map(function(el){print(el);}) [17:16] creationix: it only makes sense for things like parsed json data where the object is pure data [17:16] pandeiro: creationix: my use case exactly [17:16] pandeiro: for in it is i guess [17:16] creationix: pandeiro: fwiw, I have a high quality implementing [17:16] creationix: for..in is *really* slow [17:16] gkatsev: you can also do Object.keys(obj).forEach [17:17] jonaslund: creationix: it is? [17:17] V1 has joined the channel [17:17] creationix: Object.keys(obj).forEach isn't bad, it's a pretty good compromise between speed and usability [17:17] tjholowaychuk: jonaslund: yeah, we benched it the one time it was at least like 300% slower [17:17] pandeiro: gkatsev, nice thinking.. [17:17] tjholowaychuk: something like that [17:17] jonaslund: 300% slower than ? [17:17] ilowhy has joined the channel [17:17] creationix: if you don't mind adding non-enumarable properties to Object.prototype [17:17] tjholowaychuk: jonaslund: than for/in [17:18] drudge: man mongoose is killing me lately [17:18] creationix: I thought it was worse than 300% [17:18] tjholowaychuk: might have been [17:18] tjholowaychuk: something massive [17:18] jonaslund: for..in slower than for/in ? :) [17:18] tjholowaychuk: though I think with some cases it was similar, with objects only containing a few keys [17:18] tjholowaychuk: cant remember [17:18] creationix: jonaslund: for .forEach and .map for Object.prototype https://github.com/creationix/proto/blob/master/lib/proto.js [17:18] lukus has joined the channel [17:18] tjholowaychuk: jonaslund: no lol Object.keys() vs for/in [17:18] creationix: jonaslund: for..in is the same as for/in [17:18] tjholowaychuk: jonaslund: keys.forEach/map/whatever you want [17:19] charlenopires_ has joined the channel [17:19] jonaslund: erm. so object.keys was much faster then ? [17:19] tjholowaychuk: for/in [17:19] creationix: back when we benchmarked things... [17:19] Aria has joined the channel [17:19] creationix: the fastest way was to do Object.keys and then for(;;) over the resulting array [17:19] halfhalo: heh.. last benchmark I did was for finding if an object was an array or not [17:20] eee_c has joined the channel [17:20] tjholowaychuk: same with Array.prototype.slice.call() stuff, even just iterating (when I benched) and populating your own array was about 16x faster [17:20] creationix: but second and quite close was using a forEach function like the one in proto.js [17:20] gkatsev: yeah, for is much faster than forEach/map [17:20] akashiraffee has joined the channel [17:21] jonaslund: does Object.keys return the objects keys only or does it include the prototypes like for in does ? [17:21] tbranyen: only hasOwnProperty keys [17:21] gkatsev: apparently, a while(item = arr[i++]) doStuffWith(item) is one of the fastest ways to iterate over an array [17:21] creationix: jonaslund: that's why it's faster [17:21] tbranyen: and only enumerbale ones i believe as well [17:21] creationix: it ignores prototypes [17:21] gkatsev: yeah, only the enumerable items [17:21] jonaslund: well [17:21] creationix: if you want non-enumerables there is Object.getOwnPropertynames [17:21] jonaslund: that does equalize the amount of code aswell then [17:22] halfhalo: compared Object.prototype.toString.call(model) == "[object Array]" to typeof model && model.length!=undefined and found that the tostring way was something like 20 times slower [17:22] creationix: the easiest to code is to monkey patch Object.prototype and then just .forEach like on arrays [17:22] akashiraffee: Is there a quick way of accessing system environment variables in node/connect/express? [17:22] tjholowaychuk: akashiraffee: process.env.WHATEVER [17:22] meandi has joined the channel [17:23] pdelgallego has joined the channel [17:23] tbranyen: creationix: how is taht better than coercing an array out of an array-like structure with slice? [17:23] ph^ has joined the channel [17:23] creationix: tbranyen: which? [17:24] tbranyen: prototyping on the Object object [17:24] creationix: you don't have to change the object prototype [17:24] tbranyen: oh i thought you said monkey patch it [17:24] creationix: unless you want objects to work exactely like arrays with .forEach [17:24] creationix: sometimes I monkeypatch it [17:24] jjmalina has joined the channel [17:24] creationix: sometimes I just make an external forEach function that takes an object and callback [17:24] tjholowaychuk: I think its fine to monkey patch your own stuff in app land [17:25] tjholowaychuk: at least its your fault if you fuck stuff up then [17:25] tjholowaychuk: haha [17:25] creationix: yeah, just don't do it in a library [17:25] creationix: or framework [17:25] pandeiro: ending up yoinking your proto code creationix, thanks [17:25] tjholowaychuk: just like its fine to use coffeescript for your app [17:25] liquidproof has joined the channel [17:25] tjholowaychuk: just dont use it for a lib [17:25] indutny has joined the channel [17:25] creationix: pandeiro: cool, don't worry about the copyright if you just grabbed that one [17:25] creationix: it's practically public domain [17:26] pandeiro: i'm just taking that part, yeah [17:26] tbranyen: I guess i'm still stuck with the client-side thinking of JS [17:26] indutny: CryptoStream.prototype.pause is causing problems w/ large files on tls server /cc ryah izs anyonefromjoyent [17:26] methym: I'm just getting started with express, and see there are a few options for templating engines. I know a lot has to do with preferred style, etc., but which one is the core/suggested one? [17:26] tbranyen: which doesn't necessarily translate to Node [17:27] creationix: tbranyen: what do you mean? [17:27] pandeiro: tbranyen: i have the same problem [17:27] creationix: tjholowaychuk: is Jade still your favorite? [17:27] pandeiro: creationix: think he means compatibility [17:27] tjholowaychuk: what? [17:27] pandeiro: and extending prototypes [17:27] tjholowaychuk: sorry [17:27] tjholowaychuk: was gone [17:27] wink_: indutny: what sorts of problems? [17:27] tjholowaychuk: methym: yo [17:27] indutny: wink_: it stops emitting 'data' event [17:27] creationix: pandeiro: tbranyen: it's the same as in the browser [17:27] methym: tjholowaychuk: hey [17:28] indutny: wink_: and as consequence - packet loss [17:28] creationix: modules don't have their own context by default [17:28] drudge: tjholowaychuk: have you updated rubbernet to 0.94? [17:28] tjholowaychuk: methym: there really are none specific to express, however I think on average more people use jade [17:28] tbranyen: creationix: no its not, anything that extends an Object.prototype is subject to breaking any other code in an app [17:28] tjholowaychuk: methym: they all have different goals / benefits so check a few out [17:28] tbranyen: unless you mean the same is true in node [17:28] tjholowaychuk: drudge: nope not yet [17:28] creationix: tbranyen: right, the same is true in node [17:28] tbranyen: Although its easier to isolate natives in Node [17:28] tbranyen: with vm [17:28] tbranyen: iframe hack has issues [17:28] drudge: tjholowaychuk: it allows for monitoring kernel processes now, much more accurate readings [17:28] creationix: one exception is that we have Object.defineProperty, so it's not as dangerous [17:28] creationix: it can be added as non-enumerable [17:29] tjholowaychuk: drudge: ah nice man [17:29] methym: tjholowaychuk: ok, great. I'd like to use the one that is the most popular just for the scenario where other devs work on the codebase. thx! [17:29] isaacs_ has joined the channel [17:29] tjholowaychuk: methym: I'd still recommend trying a few, for larger teams it may be better to use something with regular html / tag soup [17:29] tbranyen: creationix: also don't need to deal with browser quirks by extending natives in node [17:29] tbranyen: which you have to watch for in client side code [17:30] methym: tjholowaychuk: would that be ejs? [17:30] tjholowaychuk: methym: anything like that, ejs, mustache, hbs, liquid, etc [17:30] tjholowaychuk: methym: but we have 100s of jade templates so its not going anywhere [17:30] indutny: wink_: and that's appears from time to time, not usually [17:30] pandeiro: tbranyen, exactly, that's what i am still adjusting to... find myself wanting to write client-side stuff with all the ECMA5 syntax [17:30] pedrobelo has joined the channel [17:31] tbranyen: pandeiro: also why i lol when people try loading jquery in node [17:31] tbranyen: idgi [17:31] creationix: of course, lately all my browser code has been for webkit only and usually v8 only [17:31] tbranyen: fun experiment i guess [17:31] pandeiro: it would be awesome if there were a modernizr-type script that enabled all the new ECMA5 methods in older browsers [17:31] ph^ has joined the channel [17:31] gkatsev: tbranyen: pandeiro es5-shim ftw [17:31] creationix: so browser is a lot like node to me [17:31] pandeiro: gkatsev, you are making my day today [17:31] tjholowaychuk: yeah im with creationix, i never have to deal with other browsers anymore [17:31] tjholowaychuk: its the best thing [17:32] gkatsev: pandeiro: glad I could help. :) [17:32] halfhalo: do they still make browsers? jeesh [17:32] creationix: halfhalo: I want to see fennec as a pdk app just for fun [17:32] gkatsev: halfhalo: yeah, I just curl everything and view it in vim. [17:32] tbranyen: gkatsev: only 6kb thats pretty nice [17:32] mikl has joined the channel [17:32] mikl has joined the channel [17:32] halfhalo: creationix: I could have sworn that has been done already [17:33] tbranyen: fennec fails at webgl so hard :( [17:33] tbranyen: looks to not even be hardware accelerated [17:33] gkatsev: halfhalo: someone has ported firefox/fennec over to webos forever and a half ago. [17:33] creationix: shows what I know about webOS [17:33] tjholowaychuk: " You ranked 22nd in our automated system based, so I thought it was worth reaching out to you." - Google [17:33] tjholowaychuk: wtf [17:34] tjholowaychuk: harvesting devs? [17:34] tjholowaychuk: or something [17:34] creationix: 22nd, not bad [17:34] tbranyen: Google likes popular devs [17:34] scoates has joined the channel [17:34] tjholowaychuk: most random shit [17:34] gkatsev: creationix: lol. But not sure if they kept up to do date with the fennec/firefox mobile development. So, it's possibly completely out-of-date [17:34] creationix: that's what you get for having popular projects [17:34] creationix: (that was for tjholowaychuk) [17:34] tbranyen: gkatsev: yeah especially since they basically rewrote fennec [17:35] c4milo: does anybody know how can I convert from markdown to html? [17:35] c4milo: I recall there was a module in nodejs to do that [17:35] c4milo: I can be wrong [17:36] gkatsev: there is. Try search.npmjs.org [17:36] tjholowaychuk: c4milo: use isaac's github-flavored-markdown [17:36] tjholowaychuk: or w/e it was called [17:36] gkatsev: tbranyen: yep. [17:36] tmzt has joined the channel [17:36] tjholowaychuk: markdown-js has some flaws [17:36] gkatsev: http://www.precentral.net/prefox-firefox-your-pre [17:36] creationix: is showdown still a good one [17:36] creationix: or is one of the new ones better [17:36] tjholowaychuk: namely you cannot use inline html, and it double escapes shit [17:36] isaacs: tjholowaychuk: yeah, that's the one [17:36] isaacs: creationix: github-flavored-markdown is showdown + all the stuff you're used to because of github readmes [17:37] isaacs: and you can pass in an object to make it autolink sha's and stuf [17:37] tjholowaychuk: all wrapped up in one really long name [17:37] tjholowaychuk: haha [17:37] tjholowaychuk: :D [17:37] isaacs: hehe, yep [17:37] c4milo: so finally what's that haha [17:37] creationix: I don't even know what github added [17:37] c4milo: github-flavored-markdown? [17:37] tjholowaychuk: yeah me neither [17:37] tjholowaychuk: they fixed some of the paragraph related stuff i think [17:38] tjholowaychuk: and some shorthand syntax for linking to issues n shit i dunno [17:38] creationix: I think I use showdown and prettify for howtonode.org [17:38] qbert has joined the channel [17:38] isaacs: creationix: they auto-link sha's to commit links, creationix/node to your github page, etc. [17:38] isaacs: creationix: but to do that, you have to pass in an object with an owner and repo to make things relative to [17:38] creationix: isaacs: anything useful outside github integration? [17:39] bartt has joined the channel [17:39] isaacs: creationix: well.. no, not really. http://github.github.com/github-flavored-markdown/ [17:39] tjholowaychuk: creationix: I think with regular markdown the paragraphs are a bit different [17:39] tjholowaychuk: newlines are not treated as line breaks [17:39] tjholowaychuk: or something [17:39] isaacs: creationix: oh, yeah, different line-breaking stuf. [17:39] drudge: http://github.github.com/github-flavored-markdown/ [17:39] isaacs: tjholowaychuk: honestly, i find that a bit annoying. [17:39] drudge: er [17:39] creationix: ok, I guess that's significant [17:39] tjholowaychuk: yeah I never noticed an issue with regular markdown [17:39] tjholowaychuk: but it does change things [17:39] isaacs: tjholowaychuk: i like wrapping my paragraphs in my editor, and when i do that, gfm puts a bunch of
s in there [17:40] isaacs: tjholowaychuk: i'm probably going to fork an npm-flavored-markdown for parsing npm package docs [17:40] c4milo: so, what's the tool? [17:40] isaacs: maybe auto-link between doc pages and packages. [17:40] tjholowaychuk: isaacs: cool man [17:41] c4milo: I have a bunch of pages in github wiki that I would like to conver to html [17:41] c4milo: convert [17:41] c4milo: what should I use? [17:41] lukus has joined the channel [17:41] isaacs: c4milo: wget? [17:41] isaacs: ;) [17:41] c4milo: hehe, the project is private and so the wiki [17:41] stephank has joined the channel [17:41] gkatsev: tbranyen: you should check out my module I finished last night. http://github.com/gkatsev/set.js [17:41] isaacs: if they're in github-markdown, then you could use the github-flavored-markdown package [17:41] dgathright_ has joined the channel [17:42] pagameba has left the channel [17:42] isaacs: c4milo: that's very likely to be a faithful translation to what you see on teh page. [17:42] saschagehlich_ has joined the channel [17:42] isaacs: c4milo: if they're in wiki format, i dunno. [17:42] c4milo: isaacs: that sounds good, thanks isaacs [17:42] isaacs: or textile, etc. [17:42] isaacs: np [17:42] xla has joined the channel [17:44] ashb has joined the channel [17:45] saikat has joined the channel [17:46] mjr_ has joined the channel [17:46] sdecastelberg has joined the channel [17:46] zomgbie has joined the channel [17:47] qbert: how do I enable full logging for node, and where do the log files get created ? [17:48] joshthecoder has joined the channel [17:48] tjholowaychuk: qbert: node knows not of logs :p [17:48] tjholowaychuk: nor log files [17:48] tjholowaychuk: you have to do that stuff, use a third-party module [17:49] wilmoore_ has joined the channel [17:50] jtrally has joined the channel [17:50] alexandere has joined the channel [17:50] jjmalina has joined the channel [17:51] reid has joined the channel [17:52] lorhko has joined the channel [17:52] b0t has joined the channel [17:53] jpick has joined the channel [17:54] KRTac has joined the channel [17:55] lessthanzero has joined the channel [17:55] javaanse_jongens has joined the channel [17:55] timcosgrove has joined the channel [17:55] koo6 has joined the channel [17:55] KRTac: mornin' [17:56] kmiyashiro: Hi! [17:56] zomgbie has joined the channel [17:56] KRTac: what's the best way to store short-term json data? [17:56] KRTac: i would like to keep it in memory [17:56] mike_miller has joined the channel [17:57] tbranyen: KRTac: make an object and cache it there? [17:57] methym: does express have a feature similar to sinatra where the code is automatically reloaded when the are code changes? getting tired of ^C ^ enter [17:57] drudge: aheckmann: this line looks off https://github.com/LearnBoost/mongoose/blob/master/lib/mongoose/index.js#L187 [17:57] KRTac: but i'm now sure if storing it in a js array or something directely in node would be a smart idea [17:57] drudge: methym: check out cluster or node-dev [17:57] tjholowaychuk: methym: not built in but there are many node modules that do that. I just use cluster's reload() plugin [17:57] tbranyen: var cache = {}; cache['myid'] = myjson; it'll persist in memory as long as that node process is running [17:57] tjholowaychuk: it's fast enough even with our massive app so it should be fine [17:57] drudge: cluster works great [17:57] tbranyen: methym: node supervisor apparently does this [17:58] chrisdickinson: anyone have a pure-JS inflate/deflate laying around? [17:58] drudge: node supervisor is old! cluster is the new hotness [17:58] tbranyen: are they comparable? [17:58] KRTac: tbranyen: i'm talking about thousands of stored records simultaniousley on one location [17:58] methym: tjholowaychuk: ok, great. I'll grab cluster [17:58] drudge: tbranyen: cluster does what supervisor did and more [17:58] tbranyen: seems to me cluster tries to solve a different problem [17:58] aheckmann: drudge - how so [17:58] timcosgrove has left the channel [17:58] tjholowaychuk: cluster is not for reloading, but it does have a reload plugin [17:59] tjholowaychuk: which basically just does a force restart [17:59] tjholowaychuk: but it's plenty fast enough [17:59] tjholowaychuk: no need to try stupid hot swapping of modules etc [17:59] drudge: aheckmann: it only returns in the else, it should always return the model if it can, no? [17:59] dragunov11 has joined the channel [17:59] wilmoore has joined the channel [18:00] pedrobelo has joined the channel [18:00] aheckmann: oh sure. yeah we should change that sometime [18:00] aheckmann: drudge ^ [18:01] drudge: would certainly be cleaner [18:01] aheckmann: drudge if you send a pull request with passing tests i'll merge it for ya. kinda busy atm [18:01] drudge: sounds good [18:01] drudge: thanks aaron [18:02] aheckmann: drudge: :) [18:03] ardcore has joined the channel [18:04] methym: tjholowaychuk: cluster works great. Thanks! Boy is there any node project you haven't touched ;) [18:04] qbert: tjholowaychuk, ok I'm new to node ( and also this massive project I'm working on ), I see this http://pastebin.com/acp5tMrp in the log files that they have written a custom module for , is this not coming from node ? [18:06] Schmallon has joined the channel [18:07] zzen has joined the channel [18:08] Remoun has joined the channel [18:08] ctime has joined the channel [18:08] ctime has joined the channel [18:08] ben_alman: anyone here successfully running smoosh? [18:08] ben_alman: it keeps erroring for me, Error: Cannot find module 'smoosh' [18:08] drudge: what is smoosh! [18:09] ben_alman: https://github.com/fat/smoosh [18:11] F1LT3R has joined the channel [18:12] ben_alman: i have node 0.4.1 installed via brew, i installed npm according to the github readme [18:12] ben_alman: and then installed smoosh via npm install smoosh [18:12] isaacs: ben_alman: what version of npm? [18:12] ben_alman: and the smoosh binary is there but it fails to work [18:12] isaacs: npm -v [18:12] ben_alman: 1.0.1rc7 [18:12] isaacs: great. [18:12] isaacs: if oyu install smoosh with -g, then it'll install the binary. [18:13] isaacs: touse it locally in your project: cd my-project ; npm install smoosh [18:13] isaacs: (it'll actually install the binary either way, but it'll put it in the PATH if you install it globally) [18:13] ben_alman: smoosh is in /usr/local/bin/smoosh [18:13] isaacs: yep [18:13] ben_alman: running that binary throws an error. [18:13] isaacs: oh, ok [18:13] ben_alman: running node manually than require('smoosh') works tho [18:13] isaacs: is that where you see the require() error? [18:14] aconran has joined the channel [18:14] jeffmoss has joined the channel [18:14] ben_alman: i see the error when i run the smoosh binary [18:14] __tosh has joined the channel [18:14] zzen: isaacs: re: the npm #802 issue… here's the output: https://gist.github.com/b985883370c712c4ba33 [18:14] ben_alman: isaacs, http://gyazo.com/95af12d8e3fd419b340d082c1a2a27c6.png [18:15] Tidwell has joined the channel [18:15] maushu has joined the channel [18:15] zzen: isaacs: perhaps good to mention that i'm running under nvm [18:16] isaacs: zzen: what's in that ___package.npm folder? [18:16] Ultali has joined the channel [18:16] norviller has joined the channel [18:17] zzen: isaacs: empty [18:17] isaacs: zzen: ok, that's weird, then [18:17] isaacs: zzen: try this: rm -rf ${TMPDIR:-/tmp}/npm* ~/.npm [18:17] koo6 has joined the channel [18:17] path[l] has joined the channel [18:17] isaacs: zzen: and the ntry again [18:18] path[l]: hi, has anyone here used nstore? I did an npm install. It suceeded. But require('nstore') is throwing an error. "cannot find module nstore" [18:18] isaacs: ben_alman: what's require.resolve("smoosh") return? [18:18] tiemonster: what's with the channel topic? [18:19] ben_alman: isaacs, oops it's installed in the current path [18:19] ben_alman: wtf [18:19] ben_alman: i wanted it installed like, globally [18:19] bergie has joined the channel [18:19] isaacs: ben_alman: npm install smoosh -g [18:20] isaacs: ben_alman: also, it looks like you DID install it globally, which is why the bin is there. [18:20] ben_alman: then i uninstalled [18:20] ben_alman: and re-installed [18:20] ben_alman: :/ [18:20] tylerstalder has joined the channel [18:20] ben_alman: $ smoosh [18:20] ben_alman: zsh: permission denied: smoosh [18:20] isaacs: ben_alman: yep, i'm seeing that too. [18:21] llkazu has joined the channel [18:21] ben_alman: $ which smoosh [18:21] ben_alman: smoosh not found [18:21] isaacs: ben_alman: need to make npm chmod 0755 any bins. [18:21] zzen: isaacs: same results: https://gist.github.com/b985883370c712c4ba33 (new gist rev) [18:21] isaacs: ben_alman: npm explore smoosh -g chmod 0755 bin/smoosh [18:22] ben_alman: hmmn [18:22] ben_alman: which smoosh works now [18:22] isaacs: zzen: tar --version ; tar -ztf /home/jakub/.npm/npm/1.0.1rc7/package.tgz [18:22] ben_alman: require.resolve("smoosh") - can't find module [18:22] pcardune has joined the channel [18:22] isaacs: ben_alman: because it's installed globally, not locally [18:22] isaacs: ben_alman: global for bins, local for modules. [18:22] isaacs: if it's used IN your project, install it IN your project. [18:23] ben_alman: i'm using it in general [18:23] ben_alman: i don't install node as part of my project [18:24] zzen: isaacs: tar (GNU tar) 1.15.1, -ztf prints the file list just fine [18:24] JianMeng has joined the channel [18:24] isaacs: that IS a super old version of tar. [18:24] path[l]: is there a recommended simple store :/? Alfred has wierd bugs and nstore doesnt even require [18:24] isaacs: the reason i ask is that it's not properly unpacking into that __package.npm folder, and then exiting with 0 [18:25] bradleymeck has joined the channel [18:25] mbrevoort has joined the channel [18:25] Gruni has joined the channel [18:25] zzen: I'm on some kind of not so old CentOS distro… [18:25] isaacs: ACTION makes yet another note to finish up node-tar... [18:25] zzen: :) [18:25] ben_alman: bbiam [18:25] jeffmoss has left the channel [18:26] zzen: isaacs: yum install tar >> Package 2:tar-1.15.1-30.el5.i386 already installed and latest version :/ [18:27] bradleymeck: isaacs do you have a list of what you are missing in node-tar? [18:28] isaacs: zzen: hmm... seeing as how 1.24 was released last year, i think that's not accurate. [18:28] b0t has joined the channel [18:28] mattly has joined the channel [18:28] isaacs: zzen: 1.15.1 was released 2004-12-21 [18:28] isaacs: http://www.gnu.org/software/tar/#TOCdownloading [18:29] isaacs: bradleymeck: well, mostly it's lacking some smarts with pax headers when generating files, and it needs test coverage. [18:29] ben_alman: so, any ideas with smoosh? i'm kinda confused here [18:30] isaacs: bradleymeck: https://github.com/isaacs/node-tar if you wanna check it out [18:30] b0t has joined the channel [18:30] isaacs: ben_alman: what are you trying to do, exactly? require() the module, or run the bin? [18:30] isaacs: or both? [18:30] adam-_-_ has joined the channel [18:30] path[l]: does anyone have any ideas of how I can query npm to find out why require('nstore') might fail? [18:30] harth has joined the channel [18:30] ben_alman: run the bin [18:30] isaacs: path[l]: npm view nstore main [18:30] V1: HA! I just killed my friend's webserver using the cluster repl plugin.. That's what you get when you deploy with default settinsgs! [18:30] ben_alman: cli [18:30] ben_alman: not sure what to do [18:31] isaacs: path[l]: it seems to not have one. bug the author. `npm owner ls nstore` (pretty sure it's creationix) [18:31] bradleymeck: isaacs, so if i just write tests, that would be something? [18:31] mheadd has left the channel [18:31] path[l]: thanks. -> it just says "npm ok" [18:31] isaacs: bradleymeck: yes, BUT! those tests *must must must* output tap format. [18:31] path[l]: ah ok [18:31] charlenopires has joined the channel [18:31] bradleymeck: isaacs, sure, can i use the tap thing out there? [18:31] isaacs: bradleymeck: that's why i switched over to working on https://github.com/isaacs/node-tap on the weekends instead :) [18:31] felixge has joined the channel [18:31] felixge has joined the channel [18:31] felixge: ryah: ping [18:31] path[l]: isaacs: is there a particular simple key/value store for node you recommend, that doesnt require a second component to be deployed? [18:31] mikeal has joined the channel [18:32] tjholowaychuk: woah, npm jsut disappeared [18:32] felixge: tjholowaychuk: disappeared ? [18:32] felixge: ryah: when you find some time, let me know if you [18:32] isaacs: path[l]: you could probably patch nstore easily enough [18:32] felixge: * you're interested in merging https://github.com/joyent/node/pull/889 and https://github.com/joyent/node/pull/881 [18:32] tjholowaychuk: I was just using it and the executable is magically gone haha [18:32] isaacs: tjholowaychuk: that's... odd? [18:32] tjholowaychuk: ill say [18:32] tjholowaychuk: i switched branches [18:32] tjholowaychuk: and bam [18:33] isaacs: switched branches of what? [18:33] b0t has joined the channel [18:33] felixge: tjholowaychuk: did you do a git init on / ? : p [18:33] path[l]: isaacs: I dont know if the problem is nstore or npm though. [18:33] tjholowaychuk: learnboost [18:33] isaacs: path[l]: npm install nstore ; npm explore nstore ; vim package.json (add a "main" field) [18:34] path[l]: ah I see [18:34] path[l]: isaacs: is this because of a change in npm? [18:35] liquidproof_ has joined the channel [18:35] isaacs: path[l]: yeah, "main" is required to be able to require() the module now. [18:35] seegeekrun has joined the channel [18:36] path[l]: hmm, that suggests that nstore has not been used in a while. Actually my question is, since I havent really been active in the community, is there a preferred simple key value store? [18:37] Gelegrodan: path[l]: make a array? :) [18:37] path[l]: I need persistence =p. [18:37] path[l]: I was wondering if I should be looking at node-dirty instead or something else [18:38] path[l]: there seem to be so many [18:38] mytrile has joined the channel [18:39] sonnym has joined the channel [18:40] tbassetto has joined the channel [18:40] isaacs: path[l]: it's one of those things that's a pretty constrained problem that's fun to solve and has infinite potential for tweaking. [18:40] zylo has joined the channel [18:40] isaacs: path[l]: those usually have lots of solutions, because they're fun :) [18:40] insin has joined the channel [18:41] path[l]: true. I meant, does anyone have a recommendation though =p [18:41] zzen: isaacs: sorry to keep coming back, but compiled new tar into /usr/local, prepended $PATH, rm -rf ${TMPDIR:-/tmp%7D/npm* ~/.npm, another make install -- same problem [18:41] zzen: tar --version: tar (GNU tar) 1.26 [18:41] isaacs: ok, so, that's a recent tar, certainlly [18:41] pHcF has joined the channel [18:42] isaacs: zzen: (no apologies necessary) [18:42] isaacs: can you gist the whole npm-debug.log file? [18:42] zzen: sure [18:42] herbySk74 has joined the channel [18:43] Shinuza has joined the channel [18:43] Charuru has joined the channel [18:43] path[l]: anyway thanks guys. can someone tell me what should be the value of main for nstore? is it 'nstore' ? [18:43] isaacs: path[l]: not sure. poke around inside it. maybe there's a "lib" folder in there? [18:44] isaacs: something called "nstore.js" somewhere maybe? [18:44] path[l]: yes there is [18:44] herbySk has joined the channel [18:45] zzen: isaacs: https://gist.github.com/9e44bd74880edab18b69 [18:45] mmmic_ has joined the channel [18:46] zzen: isaacs: ___package.npm still empty [18:46] path[l]: isaacs: I see you've forked node-dirty. Did you like that as a store? [18:46] ilowhy has joined the channel [18:47] isaacs: path[l]: i did that to write a package.json for it. [18:47] path[l]: oh ok [18:47] isaacs: path[l]: i think i also added some feature way back when [18:48] V1: isaacs: Is it possible to have a NPM package to be renamed? Is there npm command for that? [18:50] isaacs: V1: just edit the package.json file [18:50] isaacs: V1: a package is defined by its json [18:50] drudge: the package.json for xml2js seems messed up [18:50] drudge: require('xml2js') doesn't work right [18:50] V1: isaacs: Yes Iknow, but wouldn't that produce duplicate packages? [18:50] isaacs: V1: not if you then unpublished the old one :) [18:50] isaacs: V1: if it's a differnet name, it's a different package. [18:51] V1: isaacs: Makes sense, thanks [18:51] isaacs: np [18:51] pietras has joined the channel [18:51] pietras has left the channel [18:51] isaacs: drudge: yes. no "main" [18:51] pietras has joined the channel [18:51] Gelegrodan: whats the best way for php to make node send out a message via socket.io ? [18:51] bartt has joined the channel [18:51] pietras has left the channel [18:52] isaacs: drudge: email $(npm owner ls xml2js) [18:52] mhausenblas has joined the channel [18:52] drudge: thanks isaacs [18:52] pietras has joined the channel [18:52] davidascher has joined the channel [18:52] isaacs: zzen: i'm super stumped. it looks like it creates the tarball with all the right files in it, and then they're there in the tarball, then it unpacks to the __package.npm folder without any issues [18:53] drudge: ha - there are lots of issues about it not working with npm https://github.com/maqr/node-xml2js/issues [18:53] isaacs: drudge: looks disturbingly abandoned... [18:54] xla_ has joined the channel [18:54] drudge: indeed it does [18:54] drudge: fork time [18:54] feedtheaimbot has joined the channel [18:54] Gelegrodan: there is alot of forks ^^ [18:54] pr2012: any opinions on which of the facebook graph clients is the best? [18:55] isaacs: yeah, probably that's why [18:55] zzen: isaacs: but then in moves out npm/.../__package.npm/package into npm/.../package [18:55] tbranyen: tjholowaychuk: you'd probably hate jshint it fails on comma-first style [18:55] drudge: isaacs: ha https://github.com/feisty/node-xml2js/commit/40de953014e98c505a1b9a7b5dff4f51584416a0 [18:55] tbranyen: :-/ [18:55] tjholowaychuk: tbranyen haha yeah [18:56] tbranyen: http://sharefilewith.me/u/775123.png [18:56] tbranyen: COME ON [18:56] tjholowaychuk: can't configure it? [18:56] isaacs: hahaha [18:56] isaacs: drudge: ^ [18:56] tbranyen: actually yeah i could probably easy up on the checks [18:57] mbrevoort has joined the channel [18:57] tbranyen: "You can already use comma-first constructions with `laxbreak` option." [18:57] tbranyen: sweet [18:57] minus has joined the channel [18:57] isaacs: zzen: right, so, after it does that, why is npm/.../package empty? [18:57] isaacs: zzen: that's what's confusing me [18:58] isaacs: zzen: there's nothing in /home/jakub/.npm/npm/1.0.1rc7/package [18:58] isaacs: right? [18:58] zzen: isaacs: right [18:58] mbrevoort has joined the channel [18:58] minus has left the channel [18:59] Gelegrodan: whats best; php connecting via websockets to send a notification, or php connecting to node tthat sends a notification? [18:59] isaacs: zzen: let's try this step by step manually [18:59] isaacs: zzen: gzip "--decompress" "--stdout" "/home/jakub/.npm/npm/1.0.1rc7/package.tgz" | tar "-mvxpf" "-" "--no-same-owner" "-C" "/home/jakub/.npm/npm/1.0.1rc7/___package.npm" [18:59] dylang has joined the channel [19:00] isaacs: then there should be a bunch of stuf in that __package.npm folder, right? [19:00] zzen: isaacs: done… __package.npm contains one folder: package [19:00] isaacs: great [19:01] isaacs: and that folder is not empty, correct? [19:01] isaacs: it should have all of npm in it [19:01] zzen: correct [19:01] kmiyashiro has joined the channel [19:02] dgathright has joined the channel [19:04] Gelegrodan: whats best; php connecting via websockets to send a notification to all websocket clients, or php connecting to node.js that sends the notification? [19:06] ilowhy has joined the channel [19:06] isaacs: zzen: ok. mv '/home/jakub/.npm/npm/1.0.1rc7/___package.npm/package' '/home/jakub/.npm/npm/1.0.1rc7/package' [19:06] isaacs: er, first: /home/jakub/.npm/npm/1.0.1rc7/package [19:06] isaacs: first: rm -rf /home/jakub/.npm/npm/1.0.1rc7/package [19:06] isaacs: then the mv [19:06] dve has joined the channel [19:07] malkomalko has joined the channel [19:07] matjas_ has joined the channel [19:07] real_ate has joined the channel [19:07] sh1mmer has joined the channel [19:08] stonebranch has joined the channel [19:08] zzen: aaaaargh… [19:08] zzen: [root@jn:~/.npm/npm/1.0.1rc7] rm -rf /home/jakub/.npm/npm/1.0.1rc7/package [19:08] zzen: rm: cannot chdir from `/home/jakub/.npm/npm/1.0.1rc7/package/package/test/packages' to `npm-test-env-reader': Stale NFS file handle [19:09] suckerpunch has joined the channel [19:09] suckerpunch has joined the channel [19:10] creationix has left the channel [19:10] zzen: well, never mind… rm'ed on a second try, moved… [19:11] Buttons840 has joined the channel [19:11] allister has joined the channel [19:11] zzen: now /package is full of npm, ___package.npm is empty… which is quite unlike it was before… I'm really not an nfs expert, but i'm thinking that might have been the problem [19:11] baudehlo1: anyone know of any IP address manipulation libraries for JS/node? [19:12] baudehlo1: something that does what perl's NetAddr::IP does would be perfect. [19:12] isaacs: zzen: nfs? [19:12] isaacs: zzen: ohhhhh.... [19:12] isaacs: zzen: maybe the mv was slower than the rm or something? [19:12] isaacs: zzen: or vice versa. some kind of race [19:13] isaacs: zzen: because what npm does is this: 1. rm .../package; 2. mv __package.npm/package .../package; 3. rm __package.npm [19:13] isaacs: zzen: so, if the first rm is too slow, or the second too fast, you could have overlap or something, maybe? [19:13] isaacs: i dunno [19:13] zzen: isaacs: that's what I was thinking… it's a ec2 ebs disk [19:13] isaacs: hm.... still, though, the cb shouldn't fire until it's at least mostly done-ish [19:13] isaacs: maybe what i ought to do is just not rm the __package.npm foldert. [19:14] isaacs: i mean, it's empty, it's like, 2 bytes or whatever. [19:14] zzen: let me try to pace this manually to the end and see it through [19:14] isaacs: well, we've figured out the mystery, i think [19:14] zzen: then clean up and retry the instal script [19:14] bartt1 has joined the channel [19:14] zzen: any line where I could add a sleep to test this? [19:14] zzen: (or a timeout) :) [19:14] no-gooder has joined the channel [19:14] allister has joined the channel [19:15] no-gooder has left the channel [19:15] isaacs: zzen: it'd be in the bowels of lib/utils/tar.js or lib/cache.js [19:15] Shinuza has left the channel [19:15] isaacs: both of which are pretty beefy [19:15] amacleod has joined the channel [19:15] koo6 has joined the channel [19:15] isaacs: i think justremoving the rm(__package.npm) would probably solve the problem, at the cost of only a little bit of extra clutter. [19:15] techwraith has joined the channel [19:16] ryah: felixge: pong [19:16] pietras: hey guys, I'd appreciate if you could you take a look at http://stackoverflow.com/questions/5413848/req-pause-on-a-finished-request-pauses-the-next-request and share your thoughts [19:16] ben_alman: how can i uninstall npm [19:16] zzen: isaacs: tar.js l140 ? [19:17] lola has joined the channel [19:17] ryah: ncb000gt: pong [19:17] lola: good day to all, I am new to node.js :) [19:18] isaacs: ben_alman: npm rm npm -g [19:18] Gelegrodan: lola: welcome [19:18] Sidnicious has joined the channel [19:18] isaacs: ben_alman: or `make uninstall` in the code folder to also remove the cahces and such [19:18] Lorentz has joined the channel [19:18] tjholowaychuk: anyone know if using background gradient image and then a vendor specific gradietn function slows down browser rendering? [19:19] tjholowaychuk: or does the last property simply take precedence [19:19] Bj_o_rn: Does anyone know of node-postgres has support for the listen/notify features in postgres? Or maybe there's another node module that does? Google is failing me :( [19:19] tjholowaychuk: not sure if the browser will attempt to render as it's parsing or what [19:19] lola: is there a place where I can see benchmarking comparisons for node.js vs apache/php, etc? [19:19] ben_alman: isaacs, if i install npm per the github readme, it installs 1.0.1rc7 [19:19] ben_alman: is that correct? should it be installing an RC ? [19:19] isaacs: ben_alman: sure. it's better :) [19:19] Gelegrodan: lola: what you wanna do? build a site? [19:19] isaacs: it's very heavy on the R and less and less on the C [19:19] lola: Gelegrodan: yes :) [19:20] tbranyen: isaacs: i just installed it in linux and did not get an RC is that correct? [19:20] isaacs: ben_alman: at the end of this month, i'tll be the default [19:20] saikat has joined the channel [19:20] bartt has joined the channel [19:20] lola: Gelegrodan: also with chat server :) [19:20] techwraith has joined the channel [19:20] Gelegrodan: lola: for a normal site, go for nginx + php-fpm [19:20] Gelegrodan: and for the chat part..use node.js and socket.io, there is a example chatserver at socket.io's git [19:20] ben_alman: isaacs, the default what? [19:21] ben_alman: i'm just trying to figure out why i can't get things to work [19:21] ben_alman: this is pretty confusing to me [19:21] drudge: aheckmann: got a strange one, mongoose save() was successful but now finds cause a dump with what(): BSONElement: bad type 48 [19:21] mbrevoort: tjholowaychuk: good question. I assume it depends on the browser. Assuming it's specified on the same CSS block? [19:21] lola: Gelegrodan: how does node.js handle concurrency? [19:21] tjholowaychuk: mbrevoort: yup [19:22] Gelegrodan: lola: multiple users you mean? [19:22] tjholowaychuk: I'm assuming the browser wont start rendering until its parsed and figures out which to apply [19:22] AddZero has joined the channel [19:22] V1: Question, If i send a "string" to net.Stream is it automagically converted to Buffer? or is that something that my library should take care of? ( for performance reasons) [19:22] dwiash has joined the channel [19:22] tjholowaychuk: oh well ill read up on that a bit later [19:23] lola: Gelegrodan: i mean how many concurrency can run in Node.js server ? (am russian sorry if not clear :) ) [19:23] mbrevoort: tjholowaychuk: I would think the same, trying to think of any chromium flags that would help deduce. Alex Russell would be a good person to ask. [19:23] colinclark has joined the channel [19:24] lola: Gelegrodan: also why you not recommend node for regular website? performance is not as good as apache with php/mysql? [19:24] Gelegrodan: lola: because its not a pure webserver [19:24] Gelegrodan: use nginx for that, its way faster than apache [19:25] davidc_ has joined the channel [19:25] Gelegrodan: besides, its russian ;) [19:25] suckerpunch has joined the channel [19:25] lola: Gelegrodan: aha! must support our product! :D [19:25] V1: All good comes from russla, like vodka [19:25] perezd: anyone recommend a tool for monitoring server stats like munin? other alternatives that are better? [19:26] ben_alman: isaacs, can you tell me what i'm doing wrong here? https://gist.github.com/fa048e131e65c473c8f3 [19:27] tbassetto has joined the channel [19:27] lola: Gelegrodan: mmm.. can we write a web server with node.js? [19:27] jjmalina has joined the channel [19:27] Gelegrodan: perezd: nagios , cacti, mrtg? ^^ [19:27] KRTac: how could I get console.log functionality that would return the output, not send it to stdout? [19:27] ben_alman: actually, it looks like the CLI smoosh is running now.. but how do i require it in node? [19:27] Gelegrodan: lola: yes [19:27] Gelegrodan: with the http module [19:27] akashiraffee: hmmm...it seems if I install node into a non-standard dir like /usr/local, npm installed modules are not found -- I have to then install them into project directories? Anyone know anything about this? [19:27] lola: Gelegrodan: does it perform well? any benchmarking done? [19:28] perezd: Gelegrodan: whats your fav for graphing? [19:28] techwraith: lola, Gelegrodan: Using node as a webserver works just fine, handle concurrency almost as well (sometimes just as well) as nginx. [19:28] Gelegrodan: perezd: depends on what to graph :P [19:29] lola: techwraith: wow! :D [19:29] Gelegrodan: techwraith: yes maybe its fine, but its not really built specificly for it [19:29] perezd: Gelegrodan: os process CPU usages [19:29] lola: Gelegrodan: techwraith said it is almost like ngnix..! :D [19:29] Gelegrodan: if you dont have a reason (other than "its cool") i dont see the point of not using nginx :) [19:30] heythisisdave has joined the channel [19:30] akashiraffee: As in, node is in /usr/local/bin, modules are in /usr/local/lib/node_modules, but when I run node in a project directory, it cannot find them. If I then run npm again (in that cwd), npm installs them there, then the project will run. But at home, where it's installed the default /usr, this does not happen... [19:30] KRTac: how to pretty print objects? [19:31] pietras: has anyone had any luck with req.pause() on a http request? [19:31] Gelegrodan: console.log KRTac ? [19:31] pietras: KRTac: console.dir [19:31] KRTac: Gelegrodan: jeah..but that sends the output to stdout [19:31] dmcquay_ has joined the channel [19:31] Gelegrodan: where u want it? :) [19:31] mbrevoort: KRTac: util.log(util.inspect(an_obj)) [19:31] akashiraffee: pietras: haven't tried but 'data' and 'end' work [19:32] wink_: KRTac: util.inspect will give you the string [19:32] techwraith: Gelegrodan: For me it's one less moving part to work with. If you can do it without yet another server running, why not? [19:32] KRTac: wink_: trying it out [19:32] malkomalko: ahh, my node.js cucumber implementation is almost ready for the world [19:33] KRTac: wink_: ReferenceError: util is not defined [19:33] KRTac: do I need to require() it? [19:33] mbrevoort: KRTac: var util = require('util') [19:33] koo6 has joined the channel [19:33] pietras: akashiraffee: I'm trying to throttle a file upoad, but it has weird side effects [19:33] KRTac: mbrevoort: thanks [19:33] wink_: what mbrev said <3 [19:34] Gelegrodan: techwraith: hm sure, any good php-parser tho? [19:34] akashiraffee: pietras: ah so you are throwing pause() into a 'data' handler? [19:34] techwraith: Why use PHP? :P [19:35] eschnou has joined the channel [19:35] coreb has joined the channel [19:35] Gelegrodan: techwraith: if you want to use it as your webserver, like lola said [19:35] KRTac has left the channel [19:35] tbranyen: Gelegrodan: someone wrote fcgi support in node [19:35] pietras: akashiraffee: sth like http.createServer(function(req, res){ req.pause }) [19:35] tbranyen: which could reach out to php [19:36] Gelegrodan: nice.. [19:36] qbert: anyone have ideas on the best logging module, log4js ? [19:36] techwraith: Gelegrodan: Not sure why PHP is a requirement of a webserver... Write the whole thing in JS :) [19:36] tbranyen: webservers typically don't come with language parsers built in afaik [19:37] techwraith: qbert: visionmedia/logs [19:37] techwraith: https://github.com/visionmedia/log.js [19:37] techwraith: Get's the job done, isn't too invasive [19:38] V1: Anyone! With little knowledge of node's innerworkings:, If i send a "string" to net.Stream is it automagically converted to a Buffer? Or does node sends a it as regular V8 based string? [19:38] akashiraffee: pietras: what happens? [19:38] halfhalo: thats what she said [19:38] Gelegrodan: techwraith: or why not in brainfuck? https://github.com/masylum/node-brainfuck [19:38] pietras: akashiraffee: it works fine with large files [19:38] A_Nub: Because then my brain would be fucked. [19:38] techwraith: Gelegrodan: Wrong channel to be bashing js in ;) [19:38] pietras: akashiraffee: but when something is too small to be split up to multiple parts [19:38] johnnywengluu: i have an issue on vows.js .. why is arg2 undefined? [19:39] johnnywengluu: https://gist.github.com/914038 [19:39] pietras: akashiraffee: instead the next request to the server is paused [19:40] qbert: techwraith, thx [19:40] pietras: akashiraffee: I wrote an example here: http://bit.ly/hWVSk0 [19:40] zubairov has joined the channel [19:40] norviller has joined the channel [19:40] akashiraffee: [uh-oh, think my desktop is about to crash] pietras: why not use the pause in the request handler? mebbe I misunderstand... [19:41] tmedema has joined the channel [19:41] pietras: akashiraffee: like inside req.on('data', {..})? what difference does it make? [19:42] tmedema: I'm trying to use https://github.com/felixge/node-formidable/blob/master/lib/formidable/multipart_parser.js (a multipart parser) in the browser, for which I'd need to use the node.js buffer in the browser, would that be a difficult task? [19:42] akashiraffee: okay, sorry, it is in there -- I'm new to this too, lol -- but you are right, that req.pause() should not apply to some other req [19:43] johnnywengluu: anyone? [19:43] vnguyen has joined the channel [19:43] pietras: akashiraffee: yeah, to me it seems like a bug [19:43] pietras: akashiraffee: anyway, I haven't found any logical explanation to why it'd work like that [19:43] suckerpunch has joined the channel [19:44] heythisisdave has joined the channel [19:44] akashiraffee: pietras: hmm, now how can you tell if the next req is also a POST? [19:44] pietras: akashiraffee: no [19:45] pietras: akashiraffee: it pauses any request [19:45] pietras: akashiraffee: I mean it doesn't matter [19:45] tylerstalder has joined the channel [19:46] cloudhead2 has joined the channel [19:46] tiagoa_ has joined the channel [19:47] akashiraffee: still sounds fishy to me too tho. [19:47] xla has joined the channel [19:47] akashiraffee: pietras: maybe report https://github.com/joyent/node/issues [19:48] pietras: I think I'll do that [19:50] johnnywengluu: if anyone is familiar with vows.js i would be glad to get some help [19:50] jimt has joined the channel [19:50] dwiash has joined the channel [19:52] dahankzter has joined the channel [19:52] danyork has joined the channel [19:52] gkatsev: shoot [19:53] charlenopires has joined the channel [19:53] tylerstalder_ has joined the channel [19:54] hij1nx has joined the channel [19:54] n2liquid has joined the channel [19:54] n2liquid: any Mongoose gurus there? [19:55] mike5w3c has joined the channel [19:55] n2liquid: I'm trying to understand some Mongoose "quirks" [19:55] n2liquid: for some readon Mongoose is wrapping my queries in a "query" object [19:56] johnnywengluu: gkatsev: that was to me? [19:56] gkatsev: johnnywengluu: yes [19:56] johnnywengluu: gkatsev: https://gist.github.com/914038 [19:56] johnnywengluu: arg2 is undefined .. but shouldn't it be "world"? [19:56] gkatsev: I mean, I'm no master but I spent some time with it yesterday and the day before [19:56] n2liquid: e.g. my query is { usr: 'n2liquid', pwd: '1234' } but MongoDB is being hit a { query: { usr: 'n2liquid', pwd: '1234' } } [19:56] johnnywengluu: since i passed 2 arguments to the callback [19:56] n2liquid: why's that? [19:56] johnnywengluu: same here=) [19:56] n2liquid: (the query obviously fails, btw) [19:57] gkatsev: johnnywengluu: can you even do that? [19:57] n2liquid: tjholowaychuk: sorry to bother again, but are the Mongoose folks here yet? [19:57] johnnywengluu: http://vowsjs.org/ [19:58] gkatsev: johnnywengluu: what is arg1 in that scenario? [19:58] johnnywengluu: im following the examples on how to use this.callback [19:58] ncb000gt: ryah: you still around? [19:59] johnnywengluu: hello [19:59] johnnywengluu: its correct [19:59] johnnywengluu: the second assertion fails [19:59] qbert: Hey guys, could you vote for http://youtrack.jetbrains.net/issue/WI-3451 [19:59] qbert: for the betterment of the node community! :) [19:59] sivy has joined the channel [20:00] ilowhy has joined the channel [20:00] qbert: actually who is an admin here ? It would be so awesome if they could it put it in the title [20:00] pedrobelo has joined the channel [20:00] tanepiper: qbert: isn't it already in webstorm previews? [20:00] qbert: is it ?! [20:00] xandrews has joined the channel [20:00] ilya_ has joined the channel [20:01] tanepiper: pretty sure [20:01] ilya_: cloudhead: hi, i just added an issue to node-static about headers [20:01] johnnywengluu: gkatsev: has to be a bug! cant get it! [20:01] tanepiper: http://confluence.jetbrains.net/display/WI/Web+IDE+EAP [20:01] zzen has joined the channel [20:01] raidfive has joined the channel [20:01] tschundeee has joined the channel [20:01] johnnywengluu: posted it in issues ... maybe someone will reply [20:01] n2liquid: qbert: I guess you should know, but ryah is the project founder [20:02] dgathright has joined the channel [20:02] gkatsev: johnnywengluu: yeah, it must be a bug. [20:02] dmcquay has joined the channel [20:02] johnnywengluu: but kinda a stupid bug to miss =) [20:03] johnnywengluu: since this.callback is very fundamental [20:03] qbert: n2liquid, project founder for ? [20:03] n2liquid: qbert: NodeJS, of course; he's Ryan Dahl [20:03] qbert: ahh gotcha :) [20:03] gkatsev: n2liquid: just Node. the .js is there for disambiguation with other nodes. [20:03] qbert: no I'm new still, thank you [20:04] n2liquid: gkatsev: I know, it's just that sometimes NodeJS sounds better to me, dunno why [20:04] gkatsev: qbert: other person of interest: isaacs who created npm [20:04] n2liquid: gkatsev: I just totally hate Node.JS or Node.js [20:04] n2liquid: node.js is fine, though [20:04] gkatsev: lol [20:04] n2liquid: dunno, who's to understand the mind of a teenager? [20:04] gkatsev: how old are you? [20:05] n2liquid: 18 [20:05] gkatsev: ok [20:05] gkatsev: I'm 22 [20:05] n2liquid: gkatsev: gonna grok an emerging techonology (Node) and become rich, h0h0h0! [20:05] ilya_: cloudhead2: which one of you cloudheads is the node-static's dev? [20:05] eventi: n2liquid + gkatsev = eventi [20:05] gkatsev: I'm surprised how many people <18 I found on IRC [20:05] n2liquid: (no, truly, I just think you guys do things right :D) [20:05] gkatsev: eventi: haha [20:06] technoweenie has joined the channel [20:06] qbert: tanepiper, hmm how do I get the preview ? [20:06] n2liquid: gkatsev: I didn't use IRC for a long time, but now I'm working for a startup using node and boss told me I should get into contact with people, lol [20:06] gkatsev: cool [20:07] n2liquid: had a bad time with IRC before [20:07] n2liquid: IRC channels tend to have a stupid culture of hating newcomers... [20:07] qbert: shutup n2liquid [20:07] gkatsev: nah, only the terrible channels [20:07] eventi: n2liquid: this is the nicest channel on IRC [20:07] qbert: j/k [20:07] tanepiper: OT, but Portland node crew, get yourself down to this: http://www.timminchin.com/2011/04/12/portland-oregon-show-and-bonnaroo-festivaltennessee/ [20:07] stride: stfu [20:07] steveklabnik: it's just eternel september [20:07] eventi: don't get used to it [20:07] stride: :)) [20:07] n2liquid: lololol [20:07] n2liquid: I'm not talking about *this* channel, for sure [20:08] gkatsev: yeah, this isn't ##c [20:08] n2liquid: I wasn't bashed here yet... [20:08] stride: freenode in general is pretty civilized imho [20:08] mikegerwitz: Or questions in general ;) *cough*##C/##C++*cough* ..this channel is very friendly, though [20:08] gkatsev: ACTION bashes n2liquid with a pipe. [20:08] n2liquid: lol [20:08] gkatsev: n2liquid: consider yourself bashed. [20:08] n2liquid: gkatsev: lol [20:09] pcardune has joined the channel [20:09] exiums has joined the channel [20:09] eventi: tjholowaychuk once told me to RTFM by saying "eventi, i believe if you'd peruse the release logs for the current version, you'd see the information you're looking for, oh kind and handsome man" [20:09] gkatsev: haha [20:09] tjholowaychuk: hahah what? [20:09] tanepiper: qbert: dunno, i don't use it [20:09] tjholowaychuk: haha [20:09] eventi: seriously - best community ever [20:09] gkatsev: yes [20:09] n2liquid: tjholowaychuk, so you're here! \o/ [20:09] mikeal has joined the channel [20:10] tjholowaychuk: kinda [20:10] tjholowaychuk: busy with some magical stuff [20:10] gkatsev: n2liquid: always except when he sin't [20:10] n2liquid: great, please keep up [20:10] eventi: i18 :) [20:10] ilya_: cloudhead: emerge! plz [20:10] gkatsev: I'm always here. Literally. [20:10] n2liquid: tjholowaychuk: just tell me when the Mongoose guys generally appear here [20:10] jimt has joined the channel [20:10] tjholowaychuk: n2liquid: will do, we are all pretty busy [20:10] halfhalo: LITERFUCKINGLY [20:10] eventi: n2liquid: try the mailing list [20:10] gkatsev: goddamit. wrong command. [20:11] JojoBoss has joined the channel [20:11] n2liquid: eventi: oh, bloody mailing lists.. [20:11] n2liquid: I think I'll just try to check the source code =| [20:11] eventi: well - I know that the mongoose guy is on top of the list more than IRC [20:11] n2liquid: eventi: yeah, I thought so, they have that Google Groups thing [20:11] drudge: what is the issue [20:12] n2liquid: drudge: who? me? [20:12] drudge: ya [20:12] eventi: list and IRC have diff use cases... not everyone can sit on IRC all day [20:12] __tosh has joined the channel [20:12] eventi: but you'll see bursts of sage advice on the list [20:12] n2liquid: drudge: queries coming from Mongoose are wrapped like { query: } [20:13] n2liquid: like, if I do the query through MongoDB's shell, it appears on the logs like [20:13] n2liquid: { x: 1 } [20:13] n2liquid: but when it comes from Mongoose, it's { query: { x: 1 } } [20:13] n2liquid: and the query fails [20:13] n2liquid: drudge: ideas? [20:15] flippyhead has joined the channel [20:15] hackband has joined the channel [20:19] ilowhy has joined the channel [20:20] cha0s has joined the channel [20:20] cha0s has joined the channel [20:21] zzen has left the channel [20:23] techwraith: Is there a memory limit somewhere for how much memory node can allocate? I'm getting: "FATAL ERROR: JS Allocation failed - process out of memory" [20:23] jimt_ has joined the channel [20:25] huxley_spark has joined the channel [20:25] huxley_spark: Hi, can help me updating my node.js from 0.2.4 to 0.3.6? [20:26] huxley_spark: I already did a git pull but I still get 0.2.4 [20:26] langworthy has joined the channel [20:26] Bonuspunkt has joined the channel [20:26] cloudhead2: ilya_: all of em [20:27] mike_miller has joined the channel [20:27] mikegerwitz: huxley_spark: $ git checkout v0.3.6 # but why 0.3.6? Node's up to 0.4.5 atm [20:27] ilya_: cloudhead2: well, then. I think I found a logic error in my code and now it doesn't throw errors anymore. [20:27] ilya_: cloudhead2: basically, I was acting on the same request _after_ I serveFile first time. [20:27] huxley_spark: mkiegerwitz: didn't know until now that it went up to 0.4.5 [20:28] javaanse_jongens has joined the channel [20:28] mikegerwitz: huxley_spark: Ah :) yes, `git tag -l` will show all available versions. [20:29] A_Nub: How come I can't find gzip after running 'npm install gzip' [20:29] cha0s: A_Nub, well where are you looking? [20:29] A_Nub: Hmm [20:29] clee: can anybody tell me what causes node to malloc 800 bytes exactly? [20:29] clee: because it's doing that ... 5 million times in my script [20:29] A_Nub: cha0s: just require('gzip') [20:29] clee: and I'm not sure why. [20:30] A_Nub: clee: allocating buffers? [20:30] clee: A_Nub: I'm doing lots of data.slice, but... does eaytes? [20:30] clee: er. wow, way to lose a bunch of chars. [20:30] clee: does each Buffer require 800 bytes? [20:31] cha0s: A_Nub, well where is npm installing modules? have you set NODE_PATH? [20:31] A_Nub: cha0s: nvm was a versioning problem. [20:31] techwraith: A_Nub: is your NODE_PATH set correctly? Issacs might be able to help [20:31] A_Nub: I was working on my local server [20:31] cha0s: cool [20:31] A_Nub: and installed on my remote server. [20:31] A_Nub: silly windows [20:31] A_Nub: right next to eachother [20:31] cha0s: if i had a dime for every time i did that [20:32] cloudhead2: ilya_: that's what I suspected [20:32] mytrile has joined the channel [20:32] cloudhead2: headers being sent twice etc [20:32] javaanse_jongens has joined the channel [20:33] huxley_spark: mikegerwitz: I already checkout the version, built it from source (configure and make) [20:33] huxley_spark: but I'm still getting version 0.2.4 [20:33] mikegerwitz: huxley_spark: If it's still not working, try `make distclean` first [20:34] cha0s: huxley_spark, Also make sure that you're not installing in /usr/local while having a version in /usr [20:34] cha0s: ./configure --prefix=/usr could be the answer [20:34] ilya_: cloudhead2: yeah, I felt ashamed upon finding that. Anyway, works now! Awesome. [20:34] tokumine has joined the channel [20:35] cloudhead2: ilya_: the important is that it works : ) [20:35] ilya_: yeah :)) [20:35] n2liquid: vowsjs is such a cool project; is it new? [20:35] bartt has joined the channel [20:36] asabil has joined the channel [20:37] huxley_spark: cha0s: should I uninstall node.js from /usr/local ? [20:37] AddZero has joined the channel [20:37] n2liquid: huxley_spark: type "which node" [20:37] n2liquid: and see where it points to [20:38] huxley_spark: ~/local/bin/node [20:38] n2liquid: huxley_spark: if it's not where you thought it was installed, then you found the problem [20:38] dgathright has joined the channel [20:39] KieranYo has joined the channel [20:39] n2liquid: huxley_spark: I'll check out where it's installed by default for you, just a sec [20:39] fly-away has joined the channel [20:40] Levi has joined the channel [20:40] KieranYo: Hi guys, what ide would you recommend on Ubuntu? [20:40] mikegerwitz: KieranYo: vim! (not ..necessarily an ide) [20:40] pyrony: hello everybody [20:40] cha0s: huxley_spark, By default prefix is /usr/local. /usr will take precedence. I'd uninstall everything in /usr/local and use /usr, but that's just my preference. Either way you should delete all but one to reduce confusion. [20:41] pyrony: Does node have a reliable mysql driver yet? [20:41] cha0s: KieranYo, I like Eclipse but I use gedit for coffeescript (since I can't get the eclipse integration to work) [20:41] KieranYo: mikegerwitz: lol don't say that [20:41] KieranYo: cha0s: cheers, I'll check them out [20:42] cha0s: KieranYo, just a warning, Eclipse is heavy... but it can do pretty much everything [20:42] javaanse_jongens has joined the channel [20:42] pyrony: 'ello? [20:42] n2liquid: huxley_spark: what distro are you using? [20:42] cha0s: it runs fine on my 32-bit 4 gig RAM dual core though [20:42] n2liquid: which* [20:42] eventi: ACTION vim [20:42] davidc_ has joined the channel [20:42] KieranYo: cha0s: Yeah we use Eclipse for some java stuff in work, I might give gedit a go [20:43] huxley_spark: cha0s: ./configure --prefix=/usr didn't work, going to check /usr/local and ~/local/bin [20:43] pyrony: ACTION wonders if node has a reliable mysql driver yet [20:43] pyrony: *intently* [20:43] huxley_spark: n2liquid: ubuntu [20:43] baudehlo1: pyrony: see the list archives for a recent discussion on this. [20:43] cha0s: I've been using eclipse on 64-bit, switching to 32 has been like night and day; 32-bit being much smaller and faster [20:44] cha0s: huxley_spark, Are you using 'sudo make install' ? [20:44] pyrony: baudehlo1: do you have a link? [20:44] huxley_spark: cha0s: yes [20:44] cha0s: huxley_spark, How about the result of 'which node'? [20:44] tmzt has joined the channel [20:45] n2liquid: cha0s: ~/local/bin/node, he said [20:45] baudehlo1: pyrony: no. I'm sure it's searchable. [20:45] n2liquid: I think [20:45] rconover has joined the channel [20:45] zomgbie_ has joined the channel [20:45] n2liquid: cha0s: think he could safely remove node from ~/local? [20:45] rconover: Hi, where can I find the base javascript documentation for V8? [20:45] cha0s: Oh... is that a Mac? If so I'll shut up now as I use Linux [20:46] cha0s: I don't know enough about MAc to know what's safe to delete ;) [20:46] huxley_spark: cha0s: removed node from ~/local [20:46] huxley_spark: seems that i need to modify my .vimrc file [20:46] hackband_ has joined the channel [20:46] huxley_spark: which node now is found in /usr/local/bin/node [20:47] n2liquid: huxley_spark: gold version? [20:47] javaanse_jongens has joined the channel [20:47] n2liquid: try node --version [20:47] EyePulp: beta gold professional [20:47] cloudhead has joined the channel [20:47] cloudhead2 has joined the channel [20:47] n2liquid: cha0s: he said it's Ubuntu; shouldn't matter if it was installed on a Mac, right? [20:47] huxley_spark: n2liquid: gold? doubt it. PC [20:47] davidascher has joined the channel [20:48] n2liquid: huxley_spark: was it not the right version yet? [20:48] cha0s: n2liquid, yes you're right. When I read your original message I thought it was /local, not ~/local so I was just being cautious ;) [20:49] n2liquid: I'll sudo make myself a sandwich, brb [20:49] koo6 has joined the channel [20:49] huxley_spark: sratch what I said about .vimrc, I meant .bashrc [20:49] EyePulp: heh [20:49] pyrony: baudehlo1: well, that doesn't really answer my question [20:49] pyrony: i don't see anything new [20:50] zomgbie has joined the channel [20:50] baudehlo1: well I think the point being there was no general concensus on it, but that the one using libmysql is probably best. [20:50] n2liquid: huxley_spark: just before changing anything, make sure executing node --version gives you what you expected, ok? [20:50] huxley_spark: cha0s, n2liquid: thanks, I got it working [20:50] n2liquid: huxley_spark: ah, ok, good to hear [20:50] huxley_spark: I just had to reference my /usr/local/bin in my .bashrc [20:51] n2liquid: ic [20:51] dwiash has joined the channel [20:51] hackband has joined the channel [20:51] pyrony: i just need something that supports mysql transactions [20:52] maushu has joined the channel [20:53] Gelegrodan: whats best; php connecting via websockets to send a notification to all websocket clients, or php connecting to node.js that sends the notification? [20:54] tg has joined the channel [20:54] arpegius has joined the channel [20:55] techwraith: nodejs + socket.io will handle your real time messages better than most systems will [20:55] broofa has joined the channel [20:57] siculars has joined the channel [20:58] chewbranca has joined the channel [20:58] chewbranca has joined the channel [20:59] dnunes has joined the channel [20:59] graysky has joined the channel [20:59] jjmalina has joined the channel [21:01] MikhX has joined the channel [21:03] qbert: For anyone who wants to try the preview releases of the JetBrains products, http://confluence.jetbrains.net/display/WI/Web+IDE+EAP [21:03] qbert: node support not complete yet though [21:03] Nexxy: ಠ_ಠ [21:04] bingomanatee: How do you force a node process to quit? [21:04] Zelest_ has joined the channel [21:05] jimt has joined the channel [21:05] mbrevoort has joined the channel [21:05] n2liquid: bingomanatee: what do you mean? exit right now, uncleanly? [21:05] ph^ has joined the channel [21:05] bingomanatee: yes [21:05] Nexxy: pkill ;o [21:05] baudehlo1: process.exit() [21:06] bingomanatee: thk [21:06] n2liquid: bingomanatee: what baudehlo1 said [21:06] n2liquid: bingomanatee: http://nodejs.org/docs/v0.4.5/api/process.html#process.exit [21:06] Sami_ZzZ___ has joined the channel [21:07] Epeli has joined the channel [21:10] n2liquid: bingomanatee: btw, if you want to exit cleanly, I think all you need to do is call httpServer.close(), and the process will only be kept alive until the last pending callback is processes [21:10] n2liquid: processed* [21:10] Tobsn has joined the channel [21:11] xla has joined the channel [21:12] RusAlex has joined the channel [21:15] cloudhea1 has joined the channel [21:15] pquerna: isaacs: i'm concerned I explained NPM in terms of Maven and Nexus :x [21:15] eee_c1 has joined the channel [21:15] isaacs: pquerna: ew. [21:16] isaacs: pquerna: that's like saying that your girlfriend looks a lot like her grandmother, but younger. [21:16] isaacs: i mean, yeah, probably true, but... stil... [21:16] pquerna: heh [21:16] bartt has joined the channel [21:16] n2liquid: isaacs: lololol [21:17] eventi: isaacs: still <3 npm >1.0 [21:17] isaacs: eventi: great!! [21:17] SubStack: <3 npm [21:18] ardcore has left the channel [21:19] V1: <3 npm < 1.0 [21:19] eventi: nevermind the grumblers [21:19] baudehlo1: anyone know of a module for taking network strings (32bit unsigned long followed by the bytes of the string) out of a Buffer? [21:19] V1: =p [21:20] baudehlo1: or better yet out of a Stream. [21:20] eventi: haters gonna hate [21:20] ryah: V1: don't like npm 1.0 ? [21:20] bingomanatee: just becoause you think something needs to die doesn't mean you're a hater. [21:21] pquerna: isaacs: hmm, so search/publish seem to work over https only, but downloading is getting back an http url [21:21] eventi: bingomanatee: yeah - it sorta does [21:21] eventi: like i've ocassionally hated my wife, but never wanted her to die [21:22] bingomanatee: but if she gets old and sick enough, the converse might be true [21:22] eventi: lol [21:22] V1: ryah: I dislike the fact that it installs all modules to your current path by default. Global installation makes it easier to upgrade our projects dependencies [21:22] V1: Only one spot to check, and update [21:22] eventi: -g FTW [21:22] pquerna: isaacs: sent a pm with a gist of the debug log [21:22] eventi: suck it up [21:23] pquerna: isaacs: seems like a chnage to the npmjs couch app right to make it return https urls too? [21:23] tjholowaychuk: V1: I think the option should be there, but local FTW [21:23] tjholowaychuk: global can be useful at times [21:23] tjholowaychuk: but generally -1 [21:23] isaacs: V1: npm config set global true [21:23] eee_c has joined the channel [21:24] isaacs: V1: export NODE_PATH=$(npm root -g) [21:24] eventi: I'm a sysadmin [21:24] isaacs: V1: that's how you make it work like you are saying you wnat it to^ [21:24] eventi: I don't upgrade unless it's warranted [21:24] baudehlo1: maybe npm should prompt if node-modules/ doesn't exist. I've run npm install in the wrong dir a couple of times. [21:24] V1: isaacs: Thanks now i just got to do it on all my machines ^_^ [21:24] isaacs: pquerna: so you want it to do https for downloading the tarball, to? [21:25] pquerna: yes [21:25] isaacs: pquerna: should be a pretty easy change to the couchapp. i just do that because node's https client seems to fail a lot when up/downloading big files. [21:25] Gruni has joined the channel [21:25] pquerna: node's https client just can't suck, its unacceptable :) [21:25] Levi has joined the channel [21:26] isaacs: pquerna: you should expose yourself to its suckitude, and then continue to not accept it. [21:26] davidc_ has joined the channel [21:26] isaacs: pquerna: you can do it! you can make it not suck! [21:26] jimt has joined the channel [21:26] davidascher has joined the channel [21:26] A_Nub: why does a websocket connection to a net instance close right away? [21:27] killfill: hi, im trying to use nstore from npm, and get this: http://pastebin.com/mwRaLqhL [21:27] killfill: am i doing somethign wrong? [21:27] davidascher has joined the channel [21:27] sdecastelberg has joined the channel [21:30] hoax__ has joined the channel [21:30] dve has joined the channel [21:30] M3l7D0wN has joined the channel [21:31] forzan has joined the channel [21:32] ryah: yes, node's https client cannot suck [21:32] aconran has joined the channel [21:32] n2liquid: killfill: new is a keyword, dunno if you can call a function "new" [21:33] n2liquid: I know JavaScript has some quirks with keyword usage, but did you call it new yourself or is it from nstore itself? [21:34] pquerna: isaacs: i think we might just use mod_sed to 'fix' the glitch. [21:34] n2liquid: killfill: never mind me [21:34] hellp has joined the channel [21:34] killfill: n2liquid: hm.. actuall i added it myself.. :S [21:35] n2liquid: killfill: it looks like nstore exports the "new" function; are you sure you added it? [21:36] mc_greeny has joined the channel [21:36] killfill: n2liquid: no, i mean, i added in my test file, based on the docs. [21:36] piscisaureus: To add a positive note, I *do* like that NPM 1 installs modules locally! [21:37] sunblush has joined the channel [21:37] piscisaureus: yay! hurray! champagne! cigar! [21:37] piscisaureus: isaacs++ [21:37] v8bot: piscisaureus has given a beer to isaacs. isaacs now has 16 beers. [21:37] n2liquid: is v8bot written in NodeJS? [21:37] isaacs: yay [21:38] isaacs: pquerna: lemme know how uploading/downloading tarballs over https works out for you [21:38] isaacs: pquerna: i'd love to hear good things about it, and remove that snag from the registry code. [21:38] mikeal has joined the channel [21:38] isaacs: (also, default to having the registry go over https) [21:39] esundahl has joined the channel [21:39] ryah: isaacs: you should switch to using the https client too - it'll put pressure to fix the bug [21:39] dnunes has left the channel [21:40] esundahl has joined the channel [21:41] ryah: we can push out releases quickly if needed [21:42] esundahl has left the channel [21:43] esundahl has joined the channel [21:43] zakabird has joined the channel [21:45] Tidwell has joined the channel [21:45] trotter_ has joined the channel [21:46] mbrevoort has joined the channel [21:48] CIA-72: node: 03Felix Geisendörfer 07master * rbc84895 10/ (3 files in 3 dirs): [21:48] CIA-72: node: Allow to remove all EventEmitter listeners at once [21:48] CIA-72: node: This patch adds support for calling EventEmitter#removeAllListeners [21:48] CIA-72: node: with no parameters in order to remove all listeners as once. [21:48] CIA-72: node: See discussion: https://groups.google.com/forum/#!topic/nodejs-dev/Mcyal1ThTHY [21:48] CIA-72: node: Closes GH-889. - https://github.com/joyent/node/commit/bc8489580cbc36eca511988ca134326b6ec2e2cc [21:48] CIA-72: node: 03Abe Fettig 07v0.4 * r49c7fff 10/ (lib/http.js test/simple/test-http-client-pipe.js): Fix bug where http response.readable was never set to false - https://github.com/joyent/node/commit/49c7fff061c4094fec9203474634dce382a4f378 [21:49] dmcquay has joined the channel [21:49] huxley_spark has joined the channel [21:50] zomgbie has joined the channel [21:52] varioust has joined the channel [21:53] sh1mmer has joined the channel [21:54] jakehow has joined the channel [21:54] suckerpunch has joined the channel [21:54] javaanse_jongens has joined the channel [21:54] qbert: anyone using mongolian ? I'm trying to get access to DBRef, which has it listed as exports.DBRef = bson.DBRef, and I'm using it like http://pastebin.com/XsjYmda6 but getting undefined is not a function :S, probably a simple mistake [21:54] V1: I wonder how hard it would be to add SPDY support to ryah's http parser.. As SPDY is only an abstraction ontop of http.. [21:55] techwraith: V1: https://github.com/3rd-Eden/node-SPDY [21:55] V1: techwraith: Iknow, that's my account github ;D [21:55] techwraith: lol [21:56] aconran has joined the channel [21:57] ryah: V1: i think it shouldn't be too bad [21:57] V1: I know the chromium source is also written in c++ to minimize the overhead of SPDY requests, so having it done in JavaScript seems to defeat the point of having a high performance connection [21:57] ryah: i'm sure it's very fast in js [21:58] sh1mmer has joined the channel [21:58] CIA-72: node: 03Abe Fettig 07v0.4 * r83727a4 10/ (lib/http.js test/simple/test-http-response-readable.js): [21:58] CIA-72: node: Fix bug where http response.readable was never set to false [21:58] CIA-72: node: Closes GH-867. - https://github.com/joyent/node/commit/83727a4c86e7e7fe1b698bb22b8ab2a7f119d67d [21:59] V1: ryah: Yes its already fast in javascript, but if we could use the SPDY framer from the chromium source code it would be easier to upgrade to new drafts of the SPDY specification. [22:01] no-gooder has joined the channel [22:01] no-gooder: hey guys [22:02] no-gooder: i'm planning to get last requested id from mysql like in php [22:02] no-gooder: not requested* inserted [22:02] no-gooder: i'm planning to return last inserted id from mysql like in php [22:02] javaanse_jongens has joined the channel [22:02] no-gooder: but i wanted to be sure [22:03] ryah: V1: do you have a link? [22:03] ryah: V1: to the code... [22:03] no-gooder: would it be a problem doing this with node.js? [22:04] isaacs: ryah: let's do that *after* the 1.0-for-all release [22:04] ryah: isaacs: let's do it before :) [22:05] isaacs: ryah: maybe i'll make it the default in 0.3.19. [22:05] isaacs: it'll be incentive to make everyone start using 1.0 [22:05] V1: ryah: http://src.chromium.org/viewvc/chrome/trunk/src/net/spdy/ <-- client code http://src.chromium.org/viewvc/chrome/trunk/src/net/tools/flip_server/ <-- server code http://www.chromium.org/spdy <-- project overview [22:06] dwiash has joined the channel [22:06] Shrink has joined the channel [22:06] Shrink has joined the channel [22:07] tilgovi has joined the channel [22:08] hackband has joined the channel [22:10] AAA_awright_ has joined the channel [22:10] apotheon has joined the channel [22:10] varioust has joined the channel [22:10] rsms has joined the channel [22:11] qbert: Just got an email from a project that uses NPM "You can either check out the latest git source and npm link that" , how do I do that :) ? [22:11] isaacs: qbert: download their source code. cd into it. run `npm link` [22:11] isaacs: qbert: i guess, step 0 is "install npm" [22:11] sh1mmer has joined the channel [22:12] Determinist has joined the channel [22:12] qbert: oh didnt know it was an npm function, neat! [22:12] isaacs: yep :) [22:12] apotheon: With node.js installed on a Debian system, I can start a repl with the command "nodejs", but I can't find any documentation that clarifies what the hell I can do with it. For instance, I haven't figure out the non-browser equivalent of document.write. [22:12] javaanse_jongens has joined the channel [22:13] apotheon: Is there some documentation for this sort of thing that I have just failed to find? [22:13] jimt_ has joined the channel [22:13] isaacs: qbert: in npm 1.0, that'll create a symlink to the global space from that local folder. you then wanna go into your project and do `npm link that-thing` to be able to require() it properly [22:13] Tidwell: apotheon: console.log - and the latest docs: http://nodejs.org/docs/v0.4.5/api/ [22:13] Determinist has joined the channel [22:14] qbert: isaacs, uninstalling the original I'm guessing ? [22:14] sh1mmer has joined the channel [22:14] apotheon: Tidwell: Thanks. [22:14] boaz_ has joined the channel [22:14] isaacs: qbert: uninstall whatnow? [22:14] isaacs: qbert: it'll remove any existing globally-installed "that-thing" when you link it, yes [22:14] qbert: awesome [22:15] DTrejo has joined the channel [22:18] techwraith: tjholowaychuk: you around? [22:19] techwraith: tjholowaychuk: When you get a chance: https://github.com/LearnBoost/knox/pull/17 [22:19] jimt has joined the channel [22:20] mdwright_laptop has joined the channel [22:21] CIA-72: node: 03Ryan Dahl 07v0.4 * r9b3b37e 10/ doc/api/buffers.markdown : [22:21] CIA-72: node: Add docs about Buffer._charsWritten [22:21] CIA-72: node: Fixes GH-907. - http://bit.ly/gOi3nu [22:23] Leonidas: I looked a bit into PURE, minimal.js and Weld, but I don't understand how to do nontrivial stuff with it [22:23] ryah: someone should replace me with a bot that responds to every email with "can you please provide a test and documentation?" [22:24] Leonidas: For example, if I have a number of templates and all should have the same style with header, footer etc. how do I do that? [22:24] davidc___ has joined the channel [22:24] techwraith: ryah: I wonder if we could write a bot that would only respond with that when it's relevant to do so. Sounds tough. [22:24] Leonidas: it does not seem to fit into the "format stuff from json" idea [22:25] piscisaureus: ryah: that's called an out-of-office autoreply [22:25] tjholowaychuk: techwraith: jesus, big patch, I'll have to make time to review [22:25] tjholowaychuk: oh it inlines another lib [22:26] tjholowaychuk: not nice [22:26] Stan____ has joined the channel [22:26] tjholowaychuk: ACTION does not like [22:27] techwraith: tjholowaychuk: It's really more of an add on than anything else: we could re-write it to include it in the client lib, but it does thing so much differently that it didn't really make sense to do that [22:28] techwraith: Or what did you mean by inlines another lib? [22:28] micheil has joined the channel [22:28] isaacs: i <3 this thing. http://yes.thatcan.be/my/next/tweet/ "Each process dieing. It's so nice working in Node on windows. favorite song: hilarious." [22:28] tjholowaychuk: techwraith: does knox even work on 0.4.x yet? [22:28] isaacs: (entered "ryah" and clicked button^) [22:28] tjholowaychuk: havent tried it yet [22:28] techwraith: tjholowaychuk: It works for us :) [22:28] techwraith: Mikeal fixed it I think [22:28] tjholowaychuk: k cool [22:28] isaacs: "Favorite song: favorite song: favorite song: favorite song: Granted: length first of the order of 609." [22:28] tjholowaychuk: not sure if i merged that yet [22:28] DTrejo: techwraith: hilary mason did that with her email I think [22:29] piscisaureus: isaacs: yes I've written fs.symlink and fs.readlink a long time ago. Just couldn't enable it without much hacking in libeio. [22:29] micheil: isaacs: yeah, that thing is pretty damn cool [22:29] isaacs: piscisaureus: i eagerly await liboio [22:29] Stan____ has left the channel [22:29] clee: so... can anybody tell me why v8 allocates 800 bytes for an unsigned long? [22:30] mikeal: tjholowaychuk: we have a fork with a ton of customizations [22:30] stonebranch has joined the channel [22:30] mikeal: but the patch i sent you is all that we put in relevant to http.request chagnes [22:30] tjholowaychuk: mikeal: cool cool. We only needed a few of the features, I'm not even sure what else amazon supports really. ya I will merge that [22:30] tjholowaychuk: before I forget [22:30] tjholowaychuk: if I still have it [22:31] tjholowaychuk: ah yeah i do [22:31] mikeal: we have a multipart and streaming client as well [22:31] Me1000 has joined the channel [22:31] piscisaureus: clee: So how are you telling v8 to allocate an unsigned long? [22:31] mikeal: that we'll get to in a nice patch at some point in the future [22:32] kkaefer: so... [22:32] piscisaureus: Lol. "I'm getting page did something is. Gokje: zie :- I am *not* a good as that ..." [22:32] techwraith: mikeal, tjholowaychuk: Yeah, mihbe probably sent the pull request prematurely :) [22:32] DTrejo: techwraith: http://www.hilarymason.com/blog/e-mail-automation-questions-and-answers/ [22:32] kkaefer: sending files > 1 gb is probably not something that connect's send() function should handle, correct? [22:33] tjholowaychuk: techwraith I will just merge his other patch for now [22:33] kkaefer: is there an implementation that uses fs.sendfile() instead of fs.readFileStream() ? [22:33] kkaefer: err [22:33] kkaefer: createReadStream [22:33] mike5w3c has joined the channel [22:34] mikeal: sendfile doesn't work [22:34] kkaefer: ok [22:34] kkaefer: so x-sendfile is the only option? [22:34] kkaefer: (with nginx) [22:36] indexzero has joined the channel [22:36] techwraith: DTrejo: Awesome [22:36] indexzero: awesome to the max http://bit.ly/4zDJRf [22:36] jimt has joined the channel [22:37] indexzero: ACTION can't resist a good Futurama gag when the opportunity presents itself [22:37] techwraith: Issacs: "Japan just a beer. Obviously you get to switch. I was rather inebriated, 'twas my point, you twitter, fb." [22:40] devinus has joined the channel [22:40] devinus: anybody know why node hasn't updated to the latest v8? is it going for more stability now, or...? [22:40] harth has joined the channel [22:41] mikeal: devinus: the most likely answer is that ryah has been really busy :) [22:41] devinus: ah [22:41] techwraith: damn you issacs for showing me that site: "Japan just as a node modules- seems like if it's a few more nuclear plants." [22:42] jimt_ has joined the channel [22:44] suckerpunch has joined the channel [22:46] ryah: devinus: v0.4 is sticking with the v8 3.1 branch [22:46] piscisaureus has joined the channel [22:46] devinus: ryah: is there work going on 0.5 at this point, or is all work going into stabalizing 0.4 [22:46] devinus: ? [22:47] dmcquay has joined the channel [22:48] rohitnsit08 has joined the channel [22:48] rohitnsit08: hello #node.js [22:48] pyrony: hhiii [22:49] pquerna: isaacs: https://github.com/isaacs/npm/blob/master/lib/cache.js#L315 [22:49] stillmotion has joined the channel [22:49] isaacs: pquerna: oh, yeah [22:49] pquerna: isaacs: so.. we changed the registry to return https tarball urls, but npm client is hard coded to ignore that too [22:49] rohitnsit08: pyrony: hi, i am facing a problem while compiling a js script on nodejs, the script contains a print statement [22:49] isaacs: hm, that's lame [22:49] pquerna: oops [22:49] rohitnsit08: and since print is not defined in nodejs it's giving error [22:49] stillmotion: Can I stream a file into jsdom? [22:49] rohitnsit08: what is the alternative to print for nodejs [22:49] muk_mb has joined the channel [22:49] mikeal: stillmotion: no [22:50] rohitnsit08: my script is working perfectly fine in rhino [22:50] isaacs: pquerna: i think it's probably a relic, since there were a lot of https urls in there, and it was failing. really, it should change the http/https to match what the registry itself is. [22:50] mikeal: jsdom parser needs the whole string, it's not streaming [22:50] pquerna: +1 [22:50] isaacs: pquerna: ie, tb = url.parse(dist.tarball); tb.protocol = url.parse(registry).protocol; fetch(url.format(tb)) or somethign [22:51] stillmotion: I have a huge file to parse into jsdom, it takes forever. [22:51] isaacs: pquerna: issue and/or patch welcome [22:51] pquerna: PhilK: ^^ [22:51] PhilK: pquerna: roger that [22:51] shiawuen has joined the channel [22:51] bnoguchi has joined the channel [22:52] FireFly|n900 has joined the channel [22:52] rohitnsit08: pyrony: there? [22:53] shiawuen has joined the channel [22:53] Booths has joined the channel [22:53] isaacs: pquerna, PhilK: another option would be to remove any url-mangling from the client, but make the registry couchapp deliver http/https urls based on how it is being accessed, if possible. [22:54] isaacs: but i dunno if you can know that from within the couchapp, since it may not be the thing doing the https-ing [22:54] pquerna: right, in our case we are reverse proxying to couch to get https [22:54] CIA-72: node: 03Jakub Lekstan 07v0.4 * r81cbd42 10/ (2 files in 2 dirs): [22:54] CIA-72: node: Fixes the circular reference in vm modules. [22:54] CIA-72: node: Fixes the circular reference problem. Closes GH-822. - http://bit.ly/gf5teI [22:55] bingomanatee has joined the channel [22:55] Me1000 has joined the channel [22:55] tmzt has joined the channel [22:55] copongcopong has joined the channel [22:55] graysky has joined the channel [22:55] stillmotion: so there's no way to incrementally include a html file into jsdom? [22:56] stillmotion: Right now I have to wait about 4 minutes for jsdom to finish parsing it before the callback is invoked. [22:56] tjholowaychuk: 4 minutes? [22:56] stillmotion: yes [22:56] tjholowaychuk: yikes [22:56] tjholowaychuk: how much markup [22:56] stillmotion: 35k lines [22:57] clee: piscisaureus: I honestly have no idea what's going on with my code. I thought it was okay, but apparently I'm allocating 800 bytes 5 almost 6 million times [22:58] piscisaureus: clee: what code? [22:58] piscisaureus: (I was offline for a few minus so I might have missed something) [22:58] clee: piscisaureus: https://gist.github.com/712cbb04668e74600d32 [22:58] stillmotion: fs.readFile is quick to load it into memory, however, jsdom is a slow one on parsing into the window. [22:58] clee: it's a recursive-descent parser for Apple's binary plist files [23:00] feedtheaimbot has joined the channel [23:00] piscisaureus: clee: so how do you know that you are allocating 800 bytes. You know where it happens in that code? [23:00] clee: I'm using Instruments [23:01] clee: it says I have 5,958,717 calls to v8::internal::Malloced::New(unsigned long) [23:01] clee: resulting in a total of 4,521.39MB allocated [23:01] clee: (this is for parsing a 4MB file.) [23:01] clee: seems a little excessive. [23:02] piscisaureus: clee: ah; but I do not think ...::New(unsigned long) allocates space for an unsigned long [23:03] kmwallio has joined the channel [23:04] clee: right. under the Statistics view, it says I've got exactly that many allocations of size 800 bytes [23:04] JojoBoss has joined the channel [23:05] cognominal_ has joined the channel [23:06] varioust has joined the channel [23:06] gazumps has joined the channel [23:06] piscisaureus: clee: so your node ends up actually using that much memory? [23:06] tylerstalder has joined the channel [23:07] clee: not all at once. [23:07] clee: it doesn't appear that I ever have more than *one* of these 800-byte allocations active [23:07] MikhX has joined the channel [23:07] clee: but the fact that I'm mallocing it 6 million times is concerning [23:07] piscisaureus: Well in that case there is not really a problem or is it? [23:07] rohitnsit08 has left the channel [23:07] clee: well, it's slowing my code down [23:08] koo6 has joined the channel [23:08] clee: if I could just malloc it ONCE, whatever the hell this thing is, and then use it? [23:08] javaanse_jongens has joined the channel [23:08] piscisaureus: clee: hmmm. [23:08] clee: it would go much faster. [23:08] piscisaureus: clee: likely it is not that simple [23:08] piscisaureus: you have a stack trace for that? [23:08] piscisaureus: does Instrument give you one? [23:09] clee: it doesn't give me the contents of the memory that are being allocated [23:09] clee: but I think I can get the stack trace... [23:10] clee: looks like it's being freed by v8::internal::StubCache::ComputeLoadField(v8::internal::String*, v8::internal::JSObject*, v8::internal::JSObject*, int) [23:10] clee: ACTION looks at StubCache [23:12] dnolen has joined the channel [23:12] ChrisPartridge has joined the channel [23:13] javaanse_jongens has joined the channel [23:14] koo6 has joined the channel [23:17] zakabird has joined the channel [23:18] no-gooder has joined the channel [23:18] no-gooder has left the channel [23:20] piscisaureus: clee: it is more helpful to look at the stack trace for the allocation and not the free I think [23:20] clee: I don't know how to get the stack trace for the allocation :( [23:20] marcello3d has joined the channel [23:20] mike_miller has joined the channel [23:20] isaacs: PhilK: hey, weren't you looking into setting up npm at your shop using apache as a proxy, rather than a registry url? [23:21] piscisaureus: clee: er, so how did you get the other stack trace then. Also, what is require('binary')? [23:21] isaacs: PhilK: or is apache getting its basicauth stuff from couch? /cc pquerna [23:21] javaanse_jongens has joined the channel [23:21] clee: piscisaureus: 'node install binary' [23:21] unomi has joined the channel [23:21] PhilK: isaacs: yeah, Apache is Basic auth in front of couch was able to get it to work once I'd realized not to use adduser through Apache [23:21] clee: it's a module that provides unpacking from buffers into integers [23:22] dwiash has joined the channel [23:22] mikeal: is there an easy way to check how much memory node is using inside and outside the heap? [23:22] PhilK: isaacs: search and publish work fine through apache, but install is failing at the download [23:22] isaacs: PhilK: what i mean is, is the apache host the --registry or the --proxy [23:22] PhilK: registry [23:22] isaacs: PhilK: frmo an npm config pov [23:22] isaacs: ohhh, ok. neat. [23:23] chrislorenz has joined the channel [23:23] AddZero has joined the channel [23:23] PhilK: I have to create the user with a random password directly on couch via npm, then add a user to htpasswd using the same password and it works fine [23:24] marcello3d: any recommendations on how to make this less hideous? https://github.com/marcello3d/node-mongolian/blob/master/test/simple-test.js [23:24] isaacs: kewl, so, it seems like the solution to GH-804 is for fetch() to send auth when it's fetching to the registry and --always-auth is on. [23:24] isaacs: that seems relatively straightforward. [23:24] isaacs: if a bit inelegant [23:24] kkaefer has joined the channel [23:24] PhilK: isaacs: especially if you know javascript...like I don't ;) [23:25] isaacs: PhilK: you will! [23:25] pquerna: i concur with isaacs :D [23:25] PhilK: yeah, I've been poking around with node for awhile just never really dug in [23:25] pquerna: you said you liked ruby, its all the same right [23:25] isaacs: the thing about JavaScript is that it's really not worth not liking it. [23:25] Nexxy: ACTION chortles... [23:25] isaacs: you can't escape it. [23:25] isaacs: just submit. [23:25] marcello3d: isaacs: lolz [23:25] PhilK: well...in the way they both let you shoot yourself in the foot very easily [23:26] isaacs: it's got some good features [23:26] mscdex: ACTION shakes a fist at non-comformant imap servers [23:26] Nexxy: I'm okay with comparing js to ruby until it comes to the community... please don't be like the ruby community. [23:26] isaacs: JS is a significantly smaller language than Ruby. that's kinda nice. [23:26] mscdex: s/comformant/conformant [23:26] mscdex: silly gmail [23:26] marcello3d: isaacs: which is ironic considering the number of people who code in javascript [23:26] jonpacker has joined the channel [23:26] isaacs: *everyone* codes in javascript. [23:27] marcello3d: D: [23:27] Nexxy: in soviet russia, javascript codes in you! [23:27] isaacs: if you write code, you must touch JS at some point, or live in the MS or Java caves. [23:27] marcello3d: even obama? [23:27] steveklabnik: heh. [23:27] isaacs: ESPECIALLY OBAMA. [23:27] marcello3d: wow [23:27] isaacs: INORITE!!? [23:27] PhilK: oh yeah, I'm a master at horrific jQuery that barely works [23:27] marcello3d: don't like query [23:27] marcello3d: jquery. [23:27] clee: piscisaureus: are you on a Mac? [23:27] piscisaureus: clee: no [23:28] SubStack: whitehouse.gov, view->source [23:28] Nexxy: ACTION writes marcello3d off [23:28] clee: oh well. [23:28] clee: I was going to send you the instruments dump :) [23:28] SubStack: uses jquery! [23:28] marcello3d: I use it, too, doesn't mean I like it :) [23:28] jonaslund: isaacs: lots of embedded people are quite fine without ms, java or js :) [23:28] clee: oh hey [23:28] isaacs: jonaslund: and their stuff *never* touches the web? srsly? [23:28] clee: SubStack: didn't you write the node-binary module? [23:28] marcello3d: isaacs: does a microwave touch the web? D: [23:28] SubStack: clee: yes [23:29] AddZero has left the channel [23:29] marcello3d: http://pow.cx/ <- anyone know how hard it'd be to make a node.js version of this? [23:29] isaacs: not knowing js is like not knowing C or English. sure, you don't have to be an expert, but you gotta at least know the basics. [23:29] M3l7D0wN has joined the channel [23:29] javaanse_jongens has joined the channel [23:29] clee: SubStack: so it's probably all your fault ;) [23:29] jonaslund: isaacs: well.. maybe in the last 5 years.. but i think many of those doing stuff like that maybe talk tcp/ip at most [23:30] jonaslund: isaacs: i'm talking stuff like industrial controllers, car systems, etc [23:30] SubStack: clee: wait what did I do? [23:30] monokrome has joined the channel [23:30] monokrome: Hmm... NodeJS doesn't have concurrency? [23:30] marcello3d: define concurrency [23:30] monokrome: s/concurrency/coroutines/ [23:30] isaacs: jonaslund: sure, but i mean, even if you were hiring someone to write device drivers for embedded systems that live way underneath the kernel, how does someone live today, and be a nerd, and not *ever* touch js? [23:30] clee: SubStack: actually I have no idea if it's your fault or not but I built something using your code and the performance is kind of awful [23:31] isaacs: monokrome: no, node does not have coroutines. [23:31] monokrome: hmm [23:31] isaacs: monokrome: it has very sophisticated subprocess management utilites. [23:31] clee: SubStack: https://gist.github.com/712cbb04668e74600d32 [23:31] monokrome: yeah [23:31] SubStack: quite possible [23:31] marcello3d: oh boy, binary plists [23:31] marcello3d: good luck with that [23:31] clee: marcello3d: it works, it's just slow [23:32] clee: oh, and doubles don't work yet. [23:32] marcello3d: can you write it in c? [23:32] isaacs: clee: don't use const [23:32] Levi has joined the channel [23:32] jonaslund: isaacs: well if someone has plenty of experience with embedded stuff they'll prolly keep working in the field until they die of old age [23:32] clee: isaacs: why? [23:32] SubStack: clee: just use binary's stream processing [23:32] isaacs: clee: because you care about performance :) [23:32] jonaslund: that's people [23:32] SubStack: then you don't need to keep everything in memory [23:32] marcello3d: jonaslund: isaacs is just trolling, don't mind him ;) [23:32] SubStack: and you don't need to write icky switch/case statements [23:32] sstephenson: marcello3d: pow is a node app [23:32] n2liquid: in connect's session middleware, what's the purpose of the "secret" configuration entry? [23:32] clee: SubStack: I can't parse it as a stream. [23:32] SubStack: cripes everybody uses binary wrong and it makes me sad :( [23:32] clee: it's a recursive format. [23:32] isaacs: jonaslund: so... not everyone uses JavaScript. But, given a few more decades, everyone still alive WILL know JavaScript? [23:32] n2liquid: I know it's used to compute some hash, but what hash is this? [23:32] marcello3d: sstephenson: you're shitting me D: [23:33] n2liquid: just curious [23:33] marcello3d: is it coffeescript? [23:33] sstephenson: marcello3d: i'd like to add support for serving node stuff, but right now it only does rack [23:33] clee: marcello3d: yeah, it's coffeescript + node.js [23:33] marcello3d: haha [23:33] marcello3d: that's awesome [23:33] jonaslund: isaacs: possibly.. possibly not, i'm not an oracle [23:33] mikeal has joined the channel [23:33] sstephenson: marcello3d: http://pow.cx/docs/ [23:34] marcello3d: sstephenson: yea I was looking at that, but I don't know enough ruby/coffeescript to recognize that [23:34] piscisaureus: jonaslund, this is the java age, you should be on oracle [23:34] clee: SubStack: specifically, you can't start reading objects until you've read the trailer in the last 32 bytes of the file, and then you have to parse the offset table [23:34] SubStack: clee: you can absolutely write recursive streaming parsers using binary, you just have to start out writing it the right way [23:34] SubStack: oh trails bah [23:34] isaacs: sstephenson: powcx is your thing? [23:34] jonaslund: piscisaureus: *drumroll* [23:34] sstephenson: isaacs: yeah [23:34] isaacs: sstephenson: seems pretty nifty :) [23:34] sstephenson: trying to infect the rubyists [23:34] jonaslund: piscisaureus: did you get anything out of my patches ? [23:34] tjholowaychuk: please dont lol [23:34] tjholowaychuk: we dont need more CS [23:34] piscisaureus: jonaslund: well I applied them [23:34] piscisaureus: :-) [23:34] isaacs: sstephenson: lmk if you ever wanna build something like that for node. there's probably some ways that npm and nave/nvm could be quite handy there. [23:34] piscisaureus: Did not finish yet [23:35] marcello3d: sstephenson: so it's basically an automatic proxy? [23:35] clee: SubStack: if you can make it faster/better/more correct, by all means! please do. [23:35] steveklabnik: ow looks really cool [23:35] piscisaureus: I guess it saved me some headaches :-p [23:35] steveklabnik: pow [23:35] clee: this is my first node.js experiment, as well. [23:35] clee: so I'm open to suggestions. [23:35] jonaslund: piscisaureus: manually i presume? that diff was taken from a january era source-set [23:35] ngs has joined the channel [23:35] isaacs: clee: I've heard that const will cause v8 to run significantly slower. it also has a lot of really oddball effects. (like, you can't shadow consts with a "var" in a nested scope) [23:36] piscisaureus: jonaslund: my node is pretty old as well. No so much has happened actually [23:36] marcello3d: sstephenson: I like the art on the site [23:36] piscisaureus: tortoisediff didn't complain [23:36] marcello3d: isaacs: what's the point of const, then? [23:36] SubStack: clee: perhaps a 2-pass procedure where you first seek to the end and read off the trailing data and the table and then you open the rest of the file as a stream and parse it incrementally? [23:36] isaacs: marcello3d: i dunno. const is a dick. [23:36] marcello3d: when was const added to js? [23:37] isaacs: es5-ish, i believe [23:37] isaacs: it's pretty recent [23:37] marcello3d: oh ok [23:37] clee: SubStack: I don't think that'll work... I need random access. [23:37] marcello3d: so basically you can't use it client-side [23:37] isaacs: but, like, this fails: const FOO="bar"; (function () { var FOO = 1 })() [23:37] isaacs: which is dumb [23:37] marcello3d: that is pretty dumb [23:37] isaacs: marcello3d: right, except in ffx, chrome, or webkit [23:38] isaacs: the idea is that a const should be this powerful immutable way to define a symbol that can never ever be anything other than what it is. [23:38] piscisaureus: clee: what you need random access for, apart from reading the trailer [23:38] piscisaureus: ? [23:38] clee: to read a dictionary, you read 1 marker byte that says "a dictionary follows"; then a set of ints which are indexes into the offset table for keys, and another set of indexes into the offset table for values [23:38] isaacs: but in practice, it's hard to optimize and has awkward effects. [23:38] marcello3d: sstephenson: does pow.cx deal with automatic code reloading? [23:38] clee: so to look up a key, you need to read the int for the key's offset, then look in the offset table to find the offset at that index [23:39] sstephenson: marcello3d: no, it defers to the app, but you can touch tmp/restart.txt to have it reload on the next request [23:39] tjholowaychuk: pos makes it so easy, all you have to do is install compile node first for your ruby apps :p [23:39] tjholowaychuk: pow* [23:39] sstephenson: tjholowaychuk: i ship a binary actually [23:39] tjholowaychuk: ah :) [23:39] tjholowaychuk: haha [23:39] tjholowaychuk: I was wondering :p seemed to be leaving something out there [23:39] sstephenson: <3 npm install [23:39] isaacs: thanks :) [23:39] LukeGalea_ has joined the channel [23:40] iFire` has joined the channel [23:40] a|i has joined the channel [23:40] jonaslund: isaacs: far far from any js code.. http://www.youtube.com/watch?v=YJosZfm560Q [23:40] a|i: is there a node.js hosting with decent free quota comparable to google app engine? [23:41] marcello3d: shit. a double sided drive [23:41] Nexxy: ACTION covers ears [23:41] davidsklar has joined the channel [23:41] hij1nx has joined the channel [23:41] eee_c1 has joined the channel [23:42] perezd: cloudhea1: yt? [23:43] Remoun has joined the channel [23:44] devrim has joined the channel [23:44] piscisaureus: clee: do these plist files contain any bogus data [23:45] piscisaureus: ? [23:45] clee: what do you mean by "bogus"? [23:45] piscisaureus: clee: like meaningless bytes [23:46] clee: it's possible [23:46] clee: all of the tools I'm aware of generate files without padding bytes, but the spec allows for them [23:48] stillmotion has joined the channel [23:48] clee: isaacs: for the record, replacing 'const' with 'val' had zero effect on performance [23:48] stillmotion: is there a verbose debug option for jsdom to see what it's parsing? [23:48] isaacs: clee: that's a shame :) [23:49] clee: I was hoping it would be something that simple :/ [23:49] piscisaureus: clee: looking at the spec it is very well possible to parse it serially. You just cannot construct the tree bottom-up. [23:49] isaacs: clee: sure, it's good to grab at the low-hanging fruit first, but i guess that wasn't the culprit :) [23:49] marcello3d: the demoscene is like the nerd version of tagging [23:49] isaacs: or the v8 team made it not slow when i wasn't looking :) [23:49] isaacs: clee: you should run it through the profiler with node --prof [23:49] clee: piscisaureus: are you sure? because you have to look up the offsets for keys and values from the offset table. [23:50] jonaslund: marcello3d: of tagging? [23:50] marcello3d: yea [23:50] clee: (it would have been too easy to encode the offsets for keys and values directly. [23:50] clee: ) [23:50] isaacs: clee: oh, you're doing random file access? [23:50] clee: isaacs: yes. [23:50] isaacs: that'll potentially spin the disk back and forth then? [23:50] jonaslund: marcello3d: not really sure i follow you here :) [23:50] clee: we're talking a 4MB file. [23:51] clee: it's entirely cached in RAM. [23:51] marcello3d: jonaslund: ya know, like graffiti [23:51] isaacs: oh, ok [23:51] jonaslund: oh grafitti [23:51] jonaslund: interesting analogy [23:51] marcello3d: graffiti :) [23:52] marcello3d: I have mixed feelings about demoscene [23:52] jonaslund: how come ? [23:52] marcello3d: I think it's cool as art, but I kinda wish they made interactive stuff/games with their skills [23:52] piscisaureus: clee: well. Do it however you want. But if Substack says you are using the binary parser wrong, it is probably true (and Buffer allocations could very well explain those 800-byte mallocs). So you need to either try parsing serially or find another soluton for decoding binary values. [23:52] jonaslund: err [23:53] jonaslund: marcello3d: take a wild guess what many of the active people do for a day job :D [23:53] marcello3d: fair 'nuff :) [23:53] clee: piscisaureus: this has nothing to do with how I *want* to do it. [23:53] mike5w3c_ has joined the channel [23:53] SubStack: multi-pass will probably do the trick [23:53] clee: the only way to construct these objects is bottom-up [23:53] clee: unless there's something I'm missing. [23:54] SubStack: clee: just do a pass to collect the offsets then another pass to map the offsets to values [23:54] SubStack: you can do those both serially [23:54] marcello3d: clee: I'm pretty sure you can do it in one pass [23:54] marcello3d: without loading the whole thing [23:54] marcello3d: apple wouldn't have made it not support that [23:54] SubStack: or that [23:54] guillermo has joined the channel [23:55] perezd: ryah: I am here for whenever u want to meetup again [23:55] jonaslund: marcello3d: there was a list going around with what people from the demoscene was in what companies.. it had some 300 names or so when i got it and i saw immediately that it lacked a lot of people [23:55] clee: ACTION shrugs [23:55] clee: Apple's implementation does it recursively bottom-up. [23:56] clee: it's in ObjC, though. [23:56] clee: well, actually, no. it's in C. [23:56] SubStack: write a c++ node binding for it then? [23:57] clee: I don't know that I care THAT much. [23:57] clee: I wanted to figure out if it was possible to do it quickly in native JS [23:57] clee: I got it (mostly) working, but it's slower than I'd like. [23:57] jeffmoss has joined the channel [23:58] dguttman_ has joined the channel [23:58] clee: not sure if it's worth spending more time on it. [23:58] jonaslund: ohwell [23:58] jonaslund: bedtime [23:59] jeffmoss: anybody use protobuf for node? [23:59] jeffmoss: I am wondering if I should use something like protobuf instead of json [23:59] jeffmoss: for serializing