[00:01] dmkbot: joyent/node: 03ry: SSL hanging due undrained error queue? - https://github.com/joyent/node/issues/1719 [00:02] devrim has joined the channel [00:03] devrim1 has joined the channel [00:03] devrim has joined the channel [00:04] mfncooper has joined the channel [00:04] joshkehn has joined the channel [00:08] stagas has joined the channel [00:08] Frippe has joined the channel [00:09] ryah: dannycoates: yo [00:09] dannycoates: https://gist.github.com/1220229 [00:10] mjr_: Basically if you send HTTP to an HTTPS listener, it'll wedge it for all future connections. [00:12] piscisaureus_ has joined the channel [00:12] smtlaissezfaire has joined the channel [00:13] boltR has joined the channel [00:13] shipit_ has joined the channel [00:14] ryah: not good [00:14] ryah: but good to have a test! [00:14] piscisaureus_: PANNEKOEK13 [00:14] ryah: piscisaureus_: is that your password? [00:14] dannycoates: 0.4.12 fixes it [00:14] blup has joined the channel [00:15] piscisaureus_ has joined the channel [00:15] dannycoates: but might want to make that fprintf a DEBUG_PRINT [00:16] ryah: dannycoates: any chance you can mold this into a test/simple test? [00:16] dannycoates: sure [00:17] ryah: dannycoates: if you can get it to run under 100ms test/simple otherwise test/pummel [00:17] dannycoates: ok [00:24] guidocalvano has joined the channel [00:25] CIA-54: node: 03Ryan Dahl 07master * rcde81a6 10/ test/simple/test-regress-GH-1697.js : [00:25] CIA-54: node: Revert "Add regression test for issue 1697" [00:25] CIA-54: node: Causing many test failures due to lingering process [00:25] CIA-54: node: This reverts commit 8b754a9e02cb2404bd780322d440b73aacec7517. - http://git.io/z0Itmw [00:26] freeformz has joined the channel [00:27] Nuck|mobile has joined the channel [00:28] azeroth_ has joined the channel [00:30] dgathright has joined the channel [00:31] piscisaureus_ has left the channel [00:31] dmkbot: joyent/node: 03kingkaeru: net_uv.js throws assertion error - https://github.com/joyent/node/issues/1697 [00:34] JakeyChan has joined the channel [00:34] ericmuyser has joined the channel [00:35] junkee[] has left the channel [00:36] Lemon|mbp has joined the channel [00:36] ryah: http://nodejs.org/dist/v0.5.7/node-v0.5.7-rc2.tar.gz [00:36] ryah: pelase test [00:36] piscisaureus_ has joined the channel [00:38] dshaw_ has joined the channel [00:39] jonrohan has joined the channel [00:39] piscisaureus_ has joined the channel [00:40] EvRide has joined the channel [00:41] davidbanham has joined the channel [00:41] piscisaureus_ has joined the channel [00:42] kmiyashiro has joined the channel [00:45] wbf has joined the channel [00:45] metellus has joined the channel [00:46] skm has joined the channel [00:48] ank has joined the channel [00:49] junkee[] has joined the channel [00:51] normanrichards has joined the channel [00:51] TooTallNate: ryah: how come node build fine, but the last line of the build is: [00:51] TooTallNate: make: [all] Error 1 (ignored) [00:51] TooTallNate: but ./node DOES exist and work properly [00:51] dmkbot: joyent/node: 03indutny: [debugger] fix spawn call, customFds ain't supported yet - https://github.com/joyent/node/issues/1722 [00:51] dmkbot: joyent/node: 03indutny: Debugger: round 2 - https://github.com/joyent/node/issues/1723 [00:51] necrodearia has joined the channel [00:52] ryah: TooTallNate: because it does "ls -l node_g" [00:53] TooTallNate: ryah: oh ok, so that woudn't be there if I build with --debug? [00:53] TooTallNate: kinda annoying. any way it can be fixed? [00:53] CIA-54: node: 03Fedor Indutny 07master * rd6088b2 10/ lib/_debugger.js : fix spawn call, customFds ain't supported yet - http://git.io/9F-D3A [00:53] CIA-54: node: 03Fedor Indutny 07master * r4a537c1 10/ lib/_debugger.js : restore breakpoints after restart, fix message handling - http://git.io/4C9qGA [00:53] CIA-54: node: 03Fedor Indutny 07master * r145fac7 10/ lib/_debugger.js : setBreakpoint w/o arguments should set one on a current line - http://git.io/RWG5cg [00:55] Marak: help say fuck you to hacker news, upvote this article http://news.ycombinator.com/item?id=3006793 [00:55] Marak: two moderators already flagged me, fuck them [00:55] Marak: :-D [00:55] brianseeders has joined the channel [00:56] Marak: ahaha, thanks! [00:56] Marak: you guys rock [00:57] cconstantine: is it possible to call setsockopts on a nodejs socket? [00:57] Cromulent has joined the channel [00:58] airhorns has joined the channel [00:58] davidwalsh has joined the channel [00:59] cconstantine: specifically I want to set TCP_NODELAY to true [00:59] isaacs: pquerna: were you the one that was saying you needed XML namespaces in sax? [00:59] andyshep has joined the channel [00:59] isaacs: pquerna: and i was all "wtf, dude? those totally already are there!" and they totally weren't? [00:59] bnoordhuis: cconstantine: you can set sock.setNoDelay(true) [00:59] cconstantine: w00t [00:59] bnoordhuis: cconstantine: but only in 0.4.x right now [00:59] cconstantine: I'm cool with that [01:00] isaacs: pquerna: https://github.com/isaacs/sax-js/commit/9f24f3418ca71febaa8a01901223c3a19daae396 npm install sax@0.2.4 [01:00] andyshep has left the channel [01:00] ryanfitz has joined the channel [01:00] bisquix has joined the channel [01:00] d0k has joined the channel [01:01] Cromulent has joined the channel [01:01] jtsnow has joined the channel [01:03] Cromulent has joined the channel [01:04] ryah: please test http://nodejs.org/dist/v0.5.7/node-v0.5.7-rc3.tar.gz [01:05] fairwinds has joined the channel [01:06] rmcgrath|shoes has joined the channel [01:07] astropirate has joined the channel [01:09] chjj has joined the channel [01:09] mike5w3c has joined the channel [01:12] enhydra has joined the channel [01:13] Me1000 has joined the channel [01:15] blup has joined the channel [01:19] [[zz]] has joined the channel [01:20] davidbanham has joined the channel [01:21] chrislorenz has joined the channel [01:21] febits has joined the channel [01:23] coreb has left the channel [01:25] gtramont1na has joined the channel [01:27] ryanfitz has joined the channel [01:28] _jhs has joined the channel [01:29] enhydra has joined the channel [01:29] micheil has joined the channel [01:30] hij1nx has joined the channel [01:32] matyr has joined the channel [01:34] skm has joined the channel [01:34] willwh has joined the channel [01:34] willwh has joined the channel [01:36] Tobsn has joined the channel [01:36] Nuck|mobile has joined the channel [01:36] vaheh has joined the channel [01:36] astropirate: parallel JS by Intel http://blogs.intel.com/research/2011/09/pjs.php [01:37] rfay has joined the channel [01:37] CIA-54: node: 03Ryan Dahl 07master * r5582411 10/ (5 files in 3 dirs): Bump version to v0.5.7 - http://git.io/SzZshQ [01:38] irclogger_com has joined the channel [01:38] Wizek_ has joined the channel [01:39] CIA-54: node: 03Ryan Dahl 07master * rdcd911e 10/ src/node_version.h : Now working on v0.5.8 - http://git.io/YWH0Fw [01:39] TooTallNate has joined the channel [01:42] dmkbot has joined the channel [01:47] piscisaureus has joined the channel [01:47] wlkh has left the channel [01:48] freeformz has joined the channel [01:49] skm has joined the channel [01:50] mandric has joined the channel [01:52] tk has joined the channel [01:53] boltR has joined the channel [01:54] Cromulent has joined the channel [01:54] piscisaureus has joined the channel [01:54] jetienne has joined the channel [01:54] zemanel_ has joined the channel [01:55] vvvb has joined the channel [01:55] hij1nx__ has joined the channel [01:55] toxico has joined the channel [01:56] dominictarr has joined the channel [01:56] nforgerit has joined the channel [01:56] stelcheck1 has joined the channel [01:57] mikey_p_ has joined the channel [01:57] azend_ has joined the channel [01:58] __sri has joined the channel [01:58] patcito_ has joined the channel [01:58] spike_ has joined the channel [01:59] vinc_ has joined the channel [01:59] chrischr1s has joined the channel [01:59] Nuck|mobile has joined the channel [01:59] andref__ has joined the channel [01:59] sugyan_ has joined the channel [01:59] eddict_ has joined the channel [01:59] davve_ has joined the channel [01:59] FiveLemon_ has joined the channel [01:59] Leonidas_ has joined the channel [01:59] balaa_ has joined the channel [01:59] kloeri_ has joined the channel [01:59] robashto1 has joined the channel [01:59] pandark__ has joined the channel [01:59] [tm]_ has joined the channel [01:59] MikeW_ has joined the channel [01:59] kei_ has joined the channel [02:00] robinduckett has joined the channel [02:00] kersny has joined the channel [02:00] daed has joined the channel [02:00] Naked has joined the channel [02:00] qbert65536 has joined the channel [02:00] blup has joined the channel [02:00] a11235 has joined the channel [02:00] freeformz has joined the channel [02:00] bisquix has left the channel [02:01] sonnym has joined the channel [02:01] sirdancealot has joined the channel [02:01] redphive has joined the channel [02:02] langworthy has joined the channel [02:02] irclogger_com has joined the channel [02:04] nforgerit has joined the channel [02:04] JumpMast3r has joined the channel [02:05] meso has joined the channel [02:07] mquin_ has joined the channel [02:09] wenbert_ has joined the channel [02:10] febits has joined the channel [02:11] MrNibbles has joined the channel [02:12] k1ttty has joined the channel [02:14] Nuck|mobile_ has joined the channel [02:19] apang42 has joined the channel [02:22] towski has joined the channel [02:22] piscisaureus_ has joined the channel [02:23] chrislorenz has joined the channel [02:25] piscisaureus_ has joined the channel [02:27] piscisaureus_ has joined the channel [02:29] deedubs has joined the channel [02:29] meso has joined the channel [02:32] dmkbot: joyent/node: 03seebees: Tests for Sockets - https://github.com/joyent/node/issues/1699 [02:34] d_low_: Anyone have experience with connect-assetmanager [02:34] micheil: hmm, I know someone who does. [02:34] d_low: i can't figure it out [02:35] d_low: the documentation is pretty sparse [02:35] d_low has joined the channel [02:35] jmoyers has joined the channel [02:35] skm has joined the channel [02:37] d_low: micheil: wouldn't happen to know where i can go see some working code would ya? The only example they have in the readme.md is one that was taken from a different middleware that extends assetmanager [02:37] micheil: no, sorry [02:37] arlolra has joined the channel [02:37] micheil: the person I know who knows about it works for geeklist [02:37] d_low: no worries. If your friend shows up. Point him my way if you don't mind [02:37] heavysixer has joined the channel [02:37] arlolra: i'm here [02:38] d_low: arlolra: you're the one familiar with it? [02:38] boltR has joined the channel [02:38] DennisRasmussen has joined the channel [02:38] arlolra: i have some familiarity [02:39] _jhs has left the channel [02:39] talltyler has joined the channel [02:39] d_low: arlolra: cool. How is it supposed to work? Does it store minified files somewhere or do they just exist in memory? [02:40] neilk_ has joined the channel [02:40] d_low: arlolra: also, can route be anything or does it have to match the directory structure on the fs? [02:41] arlolra: the route can be anything [02:41] arlolra: as far as i know [02:41] CarterL has joined the channel [02:41] arlolra: and i think it's served from memory [02:42] d_low: arlolra: so i could say 'route': /\/static\/css\/[0-9]+\/.*\.css/ and 'files': ['style.css', 'style2.css'] and then request http://ip/static/css/randomfilenamethatdoesn'texist.css and it would serve the merged and minified css? [02:43] arlolra: well the ' in that won't match [02:43] arlolra: but yeah [02:43] d_low: yeah, typo [02:43] chrislorenz has joined the channel [02:43] arlolra: but yeas [02:43] d_low: arlolra: is the minification and merging automagic? So no need for pre or post manipulate? [02:44] rvb has joined the channel [02:44] arlolra: no, i don't think it is [02:44] arlolra: there's a handler that you probably need for that [02:44] arlolra: https://github.com/mape/connect-assetmanager [02:44] apang42 has joined the channel [02:45] arlolra: https://github.com/mape/connect-assetmanager-handlers [02:45] d_low: ok, that's what was confusing me. His docs don't really explain that [02:46] d_low: so do i have to create my own handler for merging css? [02:46] d_low: i dont see one for that. There's just the YUI css optimization [02:48] arlolra: oh, the merging is automatic [02:48] arlolra: sorry [02:48] arlolra: just minification isn't [02:48] Isaiah has joined the channel [02:48] arlolra: or wasn't by default [02:48] arlolra: sorry, i'm all over the place here [02:49] d_low: hah, no worries man. I'd be no where without some help, so you're fine [02:49] d_low: if i get this figured out, i might submit him a better README.ms [02:49] d_low: s/ms/md [02:49] githogori has joined the channel [02:50] d_low: ok, let me hack on this some more. [02:52] euforic has joined the channel [02:54] JakeyChan has joined the channel [02:54] jonrohan has joined the channel [02:54] d_low: arlolra: thanks man. I figured it out (i think). Ohh and minification is included by default [02:54] d_low: at least for css [02:54] arlolra: yeah [02:54] arlolra: true [02:55] arlolra: just noticed that [02:55] d_low: thanks for you help. The regex was what was getting me and I was chasing wild geese b/c the docs didn't make sense to me [02:55] arlolra: d_low: today was the first time i used it [02:55] arlolra: np [02:56] d_low: I think it might be a good tool to use. round trip time for things like images, css, and js is one of the #1 reasons why websites are slow. [02:57] d_low: well that and data stores of course [02:57] arlolra: i shaved over 500ms off my site in one push [02:57] d_low: wow [02:57] arlolra: and that was without much fussing [02:57] arlolra: the basics of what it gives you [02:57] arlolra: http://geekli.st/ [02:58] arlolra: gotta go [02:58] d_low: take care [02:58] arlolra: ping me on #geekli.st if you have more questions [02:59] arlolra has left the channel [03:02] artnez has joined the channel [03:04] Sami_ZzZ has joined the channel [03:07] dmkbot: joyent/node: 03networkimprov: Surface DNS errors in constants module - https://github.com/joyent/node/issues/1725 [03:10] criswell has joined the channel [03:11] jnpetersen has joined the channel [03:13] blaenk has joined the channel [03:13] blaenk has joined the channel [03:15] luke` has joined the channel [03:15] apang42 has joined the channel [03:16] langworthy has joined the channel [03:18] khrome_ has joined the channel [03:20] agnat has joined the channel [03:20] boehm has joined the channel [03:22] diamonds: so my child process doesn't care to start on my win7 machine [03:23] towski has joined the channel [03:24] trotter has joined the channel [03:25] diamonds: http://pastie.org/2546190 [03:25] diamonds: I did console.log(child_processes) just to confirm that it was getting included alright, which it was [03:26] diamonds: anyway it's child processes on windows [03:26] diamonds: trying to open a ff tab [03:26] diamonds: it's friiiidaaay yeeeaaahh! [03:27] diamonds: friday [03:28] piscisaureus_: diamonds: try `cp.stderr.pipe(process.stderr)` right after cp = spawn(...etc line [03:29] diamonds: where will that pipe it to? [03:29] davidbanham has joined the channel [03:29] piscisaureus_: diamonds: to your console window [03:29] piscisaureus_: you'll see that the filename doesn't exist [03:29] diamonds: it says cp.stderr doesn't exist (is undefined) [03:30] diamonds: I can log cp... [03:30] freeformz has joined the channel [03:30] diamonds: what filename? [03:30] diamonds: my path to ff? [03:30] zeade has joined the channel [03:31] piscisaureus_: diamonds: oh excuse me. use: [03:31] piscisaureus_: var child = cp.spawn(... etc); [03:31] piscisaureus_: 01child.stderr.pipe(process.stderr01 [03:31] piscisaureus_: ); [03:31] diamonds: ahh... child.stderr [03:31] AphelionZ has joined the channel [03:31] criswell has joined the channel [03:32] piscisaureus_: diamonds: you'll get a file not found error, because you forgot to double the backslashes (backslash is escape character, remember) [03:32] diamonds: you're right! [03:32] diamonds: hahaha... :) right again [03:32] TooTallNate has joined the channel [03:33] diamonds: hot diggity damn I'm so close :) [03:33] TooTallNate has joined the channel [03:34] broofa has joined the channel [03:35] ryanfitz has joined the channel [03:35] Cromulent has joined the channel [03:37] criswell has joined the channel [03:39] skm has joined the channel [03:42] jnpetersen has left the channel [03:43] nuck: haha I'm setting up ldapjs now so I can make an LDAP server which will enable me to sync contacts between iPhone and Thunderbird [03:44] nuck: Also a fun (hopefully quick, the example is pretty simple) project [03:46] diamonds: ok, I'm very close! [03:46] joshkehn has joined the channel [03:47] joshkehn has left the channel [03:48] diamonds: but child_process.spawn('path\\to\\firefox.exe', ['-new-tab', _post.url] /* where console.log(_post.url) returns 'http://t.co/zflZYfHJ' */ is sending the following string to the browser: [03:48] diamonds: file:///C:/Program%20Files%20(x86)/%27http://t.co/zflZYfHJ%27 [03:49] diamonds: which is like: pathToProgramFiles[*nix directory separator][urlencoded single quote]myString[urlencoded single quote] [03:50] diamonds: i'm logging the contents of _post.url one line prior so it seems that .spawn is "doing something" to the string before passing it on [03:50] zanes has joined the channel [03:51] diamonds: http://nodejs.org/docs/latest/api/child_processes.html#child_process.spawn doesn't seem to have an option that speaks to this issue [03:51] diamonds: perhaps cwd... [03:51] wbf_ has joined the channel [03:51] mlu has joined the channel [03:53] EvRide1 has joined the channel [03:54] WRAz has joined the channel [03:54] apang42 has joined the channel [03:55] kriszyp has joined the channel [03:56] joshkehn has joined the channel [03:57] ben__ has joined the channel [03:57] OmidRaha has joined the channel [03:58] Aphelion has joined the channel [04:00] wookiehangover has joined the channel [04:00] piscisaureus_: diamonds: require('child_process').spawn('c:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe', ['-new-tab', 'http://www.google.com/']); <-- wfm [04:01] diamonds: yes... when I set a string manually it works [04:01] diamonds: I'll try extracting that string from the parsed querystring and doublechecking it [04:02] diamonds: it seems to be adding extra quotation marks [04:03] diamonds: so I'll take those off :) [04:04] piscisaureus_: hmmm... questionable [04:04] jchris has joined the channel [04:05] ypcx has joined the channel [04:06] Corren has joined the channel [04:06] ryah: pis: go to sleep [04:07] ypcx: hello, any1 here? i'd like to inquire about the production stability/reliability of the latest stable node releases.. is node considered safe to be in the first line on a prod server? does it crash sometimes (without native modules being used)? [04:07] ypcx: i mean, without 3rd party native modules being used [04:10] nuck: ACTION is setting up a Mongoose-backed ldapjs server :D [04:10] diamonds: :') [04:10] sam350 has joined the channel [04:11] deadman87: ypcx, nodejs has been running first line on nodejitsu.com for quite a while now [04:11] diamonds: work windows7 machine, put a linux VM on it, putty in & run tmux to do all my stuffs on the linux machinem, including the twitter client (ttytter) [04:11] luke` has joined the channel [04:11] diamonds: but I couldn't get ttytter running on linux in a VM to open a link in a tweet in a FF tab on my host machine... [04:12] diamonds: ...until today [04:12] ypcx: deadman87: is a reloading support suggested to use? to restart node in case it crashes? [04:12] diamonds: thank you, piscisaureus_! [04:12] nuck: ypcx: *always* [04:12] nuck: I don't care how stable you *think* something is, it isn't. [04:12] deadman87: ^^ [04:13] rchavik has joined the channel [04:13] rchavik has joined the channel [04:13] deadman87: and I've seen tutorials on how to achieve that with upstart and monit on linux [04:13] nuck: There's also forever? [04:14] ypcx: nuck, dadman87: fair point.. i've seen solutions where another node was checking the http serving node - is that a good approach, or something like monit is better? [04:14] nuck: ypcx: I'd say Monit + UpStart is the most well-documented pattern [04:14] ypcx: thanks, i'd love to avoid placing node behind nginx or apache [04:15] thalll has joined the channel [04:18] reid has joined the channel [04:18] ypcx: one more q: will there be many code changes needed to port apps from node 4 to node 5? is backwards compatibility something that has a high priority in node development? i'm thinking, if i base my code mainly on express or similar, these could workaround any/most underlying node api changes for me.. (could) [04:23] skm has joined the channel [04:23] meso has joined the channel [04:24] meso has joined the channel [04:26] nuck: ypcx: Simply put, don't bother [04:26] nuck: 0.5.x is unstable development [04:26] nuck: Stick to the evens [04:27] nuck: ;) [04:30] jesusabdullah: ypcx: The APIs should remain more or less the same [04:30] ypcx: nuck: do you mean that 0.5 is not mean to be stable once? evens = 0.4, 0.6 etc. ? [04:30] ypcx: jesusabdullah: thanks [04:31] ypcx: s/mean/meant/ [04:31] nuck: ypcx: Odd-numbered versions are considered unstable, they may break at any time [04:31] nuck: And likely *are* broken [04:32] nuck: Even-numbered releases are stable, the API will not change within that time, so upgrading is generally painless within those [04:32] ypcx: nuck: thanks, was not apparent to me from node's website or wikipedia entry [04:32] nuck: If you are using any custom native modules, assume they will be broken by 0.6.x though [04:32] nuck: They moved to libuv on all OSes, and as I understand, everything has temporarily gone to shit. [04:33] jesusabdullah: Basically, for the 0.5 branch the work went towards porting to windows [04:33] jesusabdullah: for the 0.3 branch it was adding ssl support [04:34] jesusabdullah: I hear for 0.7 the focus will be on better debugging tools [04:34] ypcx: nuck, if you say even-numbered releases, do you mean 0.4, 0.6 or 0.4.2, 0.4.4 etc. - i assume 0.[major][minor] [04:34] jesusabdullah: and 0.2, 0.4 and 0.6 are versions meant to install and use irl [04:34] jesusabdullah: Yeah, odd majors ypcx [04:35] jesusabdullah: and even majors [04:35] nuck: Yeah, odd for 0.x.0 [04:35] ypcx: thx [04:35] ypcx: what's "irl" ? [04:36] bwinton: "in real life". [04:36] jesusabdullah: I mean, for developers to build reliable things on [04:36] ypcx: ah [04:36] jesusabdullah: like, you'd be crazy to try to build anything on 0.5 [04:38] torsd has joined the channel [04:39] fangel has joined the channel [04:40] skoom has joined the channel [04:44] lovesh has joined the channel [04:44] lovesh: hi [04:45] deadman87: hey localhost [04:45] deadman87: lovesh* [04:45] random123 has joined the channel [04:45] deadman87: (tab-fail) [04:45] lovesh: i tried installing npm from source and i am stuck can someone help me [04:45] lovesh: i have googled it a lot [04:45] lovesh: but still in dark [04:45] joshkehn has joined the channel [04:45] OmidRaha has joined the channel [04:46] lovesh: i dowlnloaded the npm package from git and all the submodules too [04:46] lovesh: i m on root of my linux box [04:46] isaacs: lovesh: k, can you gist the output from the command? [04:46] isaacs: lovesh: also, how anyone could possibly love sh is beyond me. [04:46] isaacs: ;) [04:46] deadman87: haha [04:47] lovesh: @issacs lol ; lovesh is my name; [04:47] deadman87: lovesh.. is that an indian name? [04:47] lovesh: i ran ./configure and it was ok [04:48] lovesh: but when i ran make install it gave an error as [04:48] rurufufuss has joined the channel [04:48] ypcx: oh, speaking of npm - when i downloaded it for the first time, i thought i will have my node_modules one directory up from where i had my node app. so in the app directory, i tried to do "npm link .." (if i remember correctly) - guess what happened (don't try it) - it deleted the whole ".." dir, lol. perhaps i should fill a bug. [04:48] lovesh: ! [ -d .git ] || git submodule update --init --recursive node cli.js install -g -f node: src/unix/fs.c:89: uv_fs_req_cleanup: Assertion `(req->result == -1 && req->ptr == ((void *)0)) || (req->result >= 0 && req->ptr != ((void *)0))' failed. Aborted (core dumped) [04:49] isaacs: lovesh: that's an error coming from deep in the bowels of node. [04:49] isaacs: lovesh: what's `node -v`? [04:49] lovesh: 5.6 [04:49] isaacs: lovesh: update to 0.5.7 [04:49] isaacs: lovesh: known issue. [04:49] isaacs: lovesh: also, make friends with http://gist.github.com/ it's a wonderful tool. [04:50] isaacs: lovesh: there's a command line util that even puts the url in your pb buffer on os x by default [04:50] lovesh: actually my linux box does not have access to internet thats why i was asking for source install [04:50] isaacs: oh, ok [04:50] lovesh: so 5.7 woud do it? [04:51] isaacs: anyway, yeah, 0.5.7 should work better [04:51] isaacs: or 0.5.5 [04:51] lovesh: ok [04:51] lovesh: thanks a lot [04:51] isaacs: np [04:51] joshkehn has left the channel [04:52] stisti has joined the channel [04:52] dominictarr: hey, does anyone know a command I can use to pipe tcp? [04:53] dominictarr: input | tcp localhost post | grep | etc? [04:54] lovesh: @issacs node 0.5.7 is unstable [04:54] lovesh: i checked on nodejs.org [04:55] dominictarr: I tried netcat, but it doesn't output what it received if I'm piping in... [04:55] jacobolus has joined the channel [04:55] freeformz has joined the channel [04:58] Frippe has joined the channel [05:01] isaacs: lovesh: The whole 0.5.x family is unstable ;) [05:02] isaacs: er, missed [05:02] isaacs: ircretary: tell lovesh Yeah, the whole 0.5.x family is unstable ;) [05:02] ircretary: isaacs: I'll be sure to tell lovesh [05:02] isaacs: ircretary: thanks [05:02] ircretary: isaacs: You're welcome :) [05:02] langworthy has joined the channel [05:04] jmoyers has joined the channel [05:05] perezd: expresso users, am I supposed to use beforeExit? [05:05] andoriyu has joined the channel [05:05] c4milo has joined the channel [05:06] c4milo has joined the channel [05:06] pizthewiz_ has joined the channel [05:06] Peniar has joined the channel [05:06] dominictarr: perezd: yes, if you are testing something async [05:06] jmoyers: perezd what do you mean am i supposed to? [05:07] liveink has joined the channel [05:07] jmoyers: its for async [05:07] jmoyers: indeed [05:07] perezd: the docs showed me just defining the exports in the callback as the way to deal with it [05:07] dominictarr: pass it a function that checks that things that should have happened did infact happen [05:07] perezd: oh I see [05:08] mcantelon has joined the channel [05:09] jakehow has joined the channel [05:09] andoriyu: so, here is the questuion, i have express.js app, and it has reapiting line all over the code: response.json( { status:'Error' }, 500) [05:09] goatlord has joined the channel [05:10] dexter_e has joined the channel [05:10] andoriyu: how can i reduce it [05:11] digitaltoad has joined the channel [05:11] temp01 has joined the channel [05:12] Emmanuel has joined the channel [05:12] jmoyers: reduce it? [05:12] JakeyChan has joined the channel [05:12] jmoyers: reduce the characters you have to type? name a function error which takes the response object. [05:12] Frippe has joined the channel [05:19] Spion_ has joined the channel [05:19] rurufufuss: has anyone used any kind of payment module for node.js? [05:20] andoriyu: jmoyers, yea, reduce charaters that i have to type + 1 place to edit error message and http code [05:21] andoriyu: like that: error = function (res) { res.json( { status:'Error' }, 500) } [05:21] andoriyu: and in route: return error(response) [05:23] jmoyers: indeed [05:23] jmoyers: rurufufuss i've used braintree as a payment gateway, and i like them. i hear they have a nodejs client library [05:24] jmoyers: US only, i believe [05:24] jmoyers: http://www.braintreepayments.com/docs/node [05:24] rurufufuss: jmoyers: ah, I see, that's too bad though, US only :/ [05:24] andoriyu: oh, I forgot that i can pass response, he [05:24] rurufufuss: then again paypal's IPN is pretty simple [05:25] andoriyu: jmoyers, thnx! [05:25] jmoyers: i hate paypal [05:25] jmoyers: perhaps its a personal problem [05:25] matyr_ has joined the channel [05:25] jmoyers: but their sandbox is always broken, their management interface sucks, they freeze accounts [05:26] rurufufuss: they do seem a bit evil [05:26] andoriyu: a bit? [05:27] rurufufuss: http://www.googlism.com/who_is/p/paypal/ [05:27] rurufufuss: evil is right there, heh [05:27] jmoyers: i have to hand it to them, though. its fast to get an account [05:27] andoriyu: i know it's a little bit TMI, but i stated to really love coffecsript and node,js [05:28] jmoyers: braintree is terrible with that -- any merchant account is acting as a creditor, so they scrutinize the hell out of you [05:28] a_meteorite: dwolla is a great paypal substitute [05:28] rurufufuss: andoriyu: we're in the same boat, I just started using coffeescript yesterday [05:28] a_meteorite: they're paypal, without the evil [05:28] a_meteorite: cheaper too [05:28] rurufufuss: are they reliable though [05:28] a_meteorite: yes, very [05:29] cjm has joined the channel [05:29] rurufufuss: ACTION attempts to judge dwolla from how 2.0 their website looks [05:29] amiller has joined the channel [05:30] andoriyu: what I don't know is — how to deploy it. [05:30] andoriyu: in ruby it's easy — pack of unicorns + nginx [05:30] jmoyers: uh [05:31] jmoyers: starts with the requirements [05:31] rurufufuss: and one more thing about coffeescript, I can't believe it left out inline comments [05:31] jmoyers: single express core -> cluster -> split out static into a cdn + cluster [05:31] rurufufuss: I guess they really like their regexes [05:31] jmoyers: -> load balanced [05:31] jmoyers: i'd imagine [05:32] andoriyu: so cluster? not fugue? [05:32] joshthecoder has joined the channel [05:32] k1ttty has joined the channel [05:32] jmoyers: never used it [05:32] jslatts has joined the channel [05:32] jmoyers: cluster is built by tj [05:32] jmoyers: https://github.com/LearnBoost/cluster [05:33] andoriyu: can it use unix socket? [05:33] jmoyers: i have no idea what type of ipc it uses [05:34] anoop has joined the channel [05:35] andoriyu: sweet, it can use unix socket also [05:37] EvRide has joined the channel [05:41] tommg: quick question: what do you see node becoming used for when it really matures? there's realtime web but i only see so many examples of what this can do. Maybe Im not thinking hard enough but what do you guys think? [05:41] jmoyers: not quite sure what you mean [05:42] jmoyers: its strong in realtime web [05:42] jmoyers: but you can build you average web application with this stack quite nicely [05:42] nuck: It's also quite nice for those services that do magic behind the scenes [05:42] nuck: Like Github's tarballs and zips [05:42] nuck: Or an image resizing daemon [05:42] tommg: so backend services mainly [05:42] nuck: tommg: It's also quite nice for APIs [05:43] jmoyers: its not backend mainly [05:43] tommg: cool, I must be thinking too hard, just imagining something after the web almost :-/ [05:43] jmoyers: express + stylus + jade is a great front-end stack [05:44] nuck: Only thing I'd say it's not so great for is quick and dirty websites, but that's mostly because it's easier to do that kinda stuff using Apache + PHP and whatnot [05:44] matyr has joined the channel [05:44] AvianFlu: nuck-- [05:44] v8bot_: AvianFlu has taken a beer from nuck. nuck now has -1 beers. [05:44] nuck: But if you're willing to put in time to make a website in it, it's certainly great [05:45] lovesh has joined the channel [05:45] nuck: AvianFlu: Note the key words were "quick and dirty" [05:45] nuck: And those are not Node's strongsuits [05:45] jmoyers: i cant see how its faster [05:45] nuck: Not at all [05:45] jmoyers: sure it is man [05:45] tommg: sure, its interesting me more mainly for use to drive a heavily used web service/api [05:45] sneakyness has joined the channel [05:45] jmoyers: i dont understand that at all, i guess. i use express and connect.static for quick and dirty websites [05:45] jmoyers: all the time [05:46] jmoyers: its like, an 8 line file [05:46] lovesh: i read about uninstalling node and it says do make uninstall but in which directory should i do make uninstall [05:46] nuck: jmoyers: Not really. It's not the simple "drop a file in the folder, suddenly, dynamic page" [05:46] nuck: lovesh: The git repo [05:46] nuck: The place you built node from originally [05:46] jmoyers: i programmed php for years, i literally don't see any difference [05:46] lovesh: i installed from the repo and then deleted it [05:46] jmoyers: quick and dirty dynamic = ejs [05:47] jmoyers: its identical to drop in php type templating (embedded language) [05:47] nuck: lovesh: Eh, I assume repulling would work for that? [05:47] nuck: jmoyers: When there's a templating engine other than EJS that allows me to work in HTML, please tell me [05:47] nuck: Until then, fuck Jade. [05:47] nuck: :I [05:47] jmoyers: haha come on! [05:47] lovesh: is there some other way of upgading without unistalling and then reinstalling? [05:47] jmoyers: there are literally like 50 templating languages [05:47] tommg: whats wrong with jade? [05:47] torsd has joined the channel [05:48] nuck: lovesh: Might as well grab the repo with the new version's code now to uninstall [05:48] nuck: You're gonna hafta do that [05:48] nuck: tommg: Ugly as fuck? [05:48] stagas has joined the channel [05:48] tommg: one mans meat is another mans poison [05:49] nuck: Why people feel the need to try and replace HTML with something they deem "prettier" I'll never understand. [05:49] lovesh: u mean download the new versions tarball and extract it and then in that directory do make uninstall [05:49] jmoyers: wait so are you serious? [05:49] tommg: jade is only really based on haml [05:49] jmoyers: mustache, haml, jade, dust, ejs, handlebars, jquery tmpl [05:49] jmoyers: the field is pretty rich [05:49] jmoyers: what are you craving.. like… twig? [05:50] jmoyers: ACTION sets twig on fire [05:50] nuck: jmoyers: I want Jade, essentially, but without the ugly-ass syntax [05:50] nuck: I want HTML [05:50] nuck: But with Jade's featureset [05:50] jmoyers: so whats wrong with ejs then? [05:50] digiwano: handlebars pls [05:50] jmoyers: name the equivalent in php, i'll show you that it already exists in node [05:50] nuck: Well, EJS isn't the nicest idea IMO [05:51] digiwano: simple as shit but powerful enough when you need it [05:51] nuck: jmoyers: PHP === EJS, really. But you can't just drop an EJS file into a folder and magically have its paths appear, etc. [05:51] nuck: And node takes a bit of setup, etc. [05:51] nuck: Honestly, overall, PHP + Apache is easier [05:51] nuck: It's just 1000x shittier too [05:51] jmoyers: you be crazy [05:51] nuck: ACTION shrugs [05:52] digiwano: thats always been phps tradeoff [05:52] nuck: Anyways, lovesh, I guess so? [05:52] digiwano: easy but shitty [05:52] nuck: digiwano: Exactly [05:52] nuck: Node is a bit harder than PHP, but the result is far better [05:52] jmoyers: i dont know man [05:52] nuck: It's got a better pain-to-gain ratio than PHP [05:52] jmoyers: i've installed apache from scratch more than a dozen times [05:52] jmoyers: its gotten better over the years with nice package maintainers [05:52] nuck: jmoyers: haha it's still shit [05:53] nuck: And PHP is pretty nasty too [05:53] digiwano: yeah node's a bit harder to get into, even pros reach for the ibuprofin for the really heavy async stuff [05:53] digiwano: so worth it though [05:53] nuck: digiwano: haha I actually don't mind async that much anymore. When it gets to async recursion, that's painful. [05:53] digiwano: i dont mind async anymore [05:53] nuck: I had to do a recursive async function before [05:53] digiwano: until it comes time to debug it [05:53] nuck: That was just... well, mindfuckery. [05:54] nuck: digiwano: Nowadays, I've found tricks which reduce the painfulness [05:54] tommg: esp with anonymous functions [05:54] digiwano: but when you slip up and something goes wrong [05:54] nuck: Like, abstracting common things out [05:54] nuck: tommg: I actually find anonymous functions to be better [05:54] digiwano: it's more of a pain in the ass than c memory leaks to track down [05:55] digiwano: but still totally worth it [05:55] nuck: digiwano: haha well, I don't slip up too often these days. And when I do, I have code which supresses the error and prevents my shit from dying. [05:55] digiwano: yeah [05:56] jmoyers: memory [05:56] jmoyers: is one thing [05:56] nuck: I've got a bunch of boilerplate and techniques in Express which basically ensure that my server will never crash after startup, unless the error code itself has an error (and even then I can supress it) [05:56] jmoyers: debugging is still painful [05:56] jmoyers: but if you've ever tried to track down a memory leak in php, which i have [05:56] jmoyers: its no better [05:56] digiwano: i've learned to still break it up into small chunks of 2-3 recursed functions at max, which really helps [05:56] digiwano: jmoyers: oh yeah, and perl's even worse [05:56] digiwano: the answer to perl's memory leaking is "deal with it" [05:57] jmoyers: yeah... [05:57] jmoyers: well most advice with php is [05:57] jmoyers: dump get_mem_usage() [05:57] jmoyers: all over your code [05:57] jmoyers: find it [05:57] digiwano: spent like a year at my last place knowing full well our shit had a mem leak somewhere [05:57] jmoyers: i broke down and used traces and kcachegrind at one point [05:58] digiwano: but its so impossible to track down that we never could find it [05:58] jmoyers: but just lining up the dominos to get that to work is like breaking your own fingers [05:58] andoriyu: question about front-end [05:58] digiwano: cronjon to restart the server every night [05:58] digiwano: sucked ass [05:58] andoriyu: so I have rest api for webapp, and i need to create admin inteface. [05:59] andoriyu: what would be perfect for that? something like backbone.js + some UI lib, Cappucino (I'm obj-c developer) [05:59] jmoyers: hmm [05:59] digiwano: cappucino's cute [05:59] jmoyers: well, what skillset do you want to develop andoriyu? [06:00] digiwano: dunno if i could use it for somethin serious [06:00] jmoyers: cappucino is a very niche thing [06:00] romanb has joined the channel [06:00] digiwano: but would super enjoy trying [06:00] digiwano: ya [06:00] digiwano: still would love to play with it though [06:00] jmoyers: i had a guy come in for an interview only having worked with GWT, super abstracted google ui framework [06:00] jmoyers: it didn't go well [06:01] jmoyers: but if you want to stay an objc ios/macos guy, then screw it, use the most abstracted thing ever :-) [06:01] jmoyers: capp, sproutcore, whatever [06:01] andoriyu: jmoyers, single-page js apps [06:01] JSManiacs has joined the channel [06:02] andoriyu: no more sproutcore for me — terrible documentation [06:02] jmoyers: i'd get down to the nuts and bolts myself. backbone + html + css [06:02] brianseeders has joined the channel [06:02] jmoyers: if its an admin interface that has a technical audience, focus on css3 [06:02] andoriyu: digitaltoad, do you know Coude IDE for node,js looks pretty sick. [06:03] andoriyu: then what kind of UI lib? [06:03] jslatts has joined the channel [06:03] digitaltoad: andoriyu: I haven't had a chance to check it out yet. [06:03] andoriyu: digitaltoad, http://www.akshell.com/ [06:03] nuck: SproutCore is sexy, I'll give it that [06:04] nuck: But it's just way too heavy [06:04] nuck: And so big that not all of it is charted :P [06:04] brainproxy: any coffeescript peoples in here atm? [06:04] nuck: Nope [06:04] andoriyu: nuck, I had very bad experience with sproutcore [06:04] digitaltoad: SC 2.0 looks to change that a bit [06:05] nuck: digitaltoad: Does it? [06:05] brainproxy: ACTION flings a razor sharp radioactive hexagon into nuck's skull [06:05] nuck: brainproxy: Is that where CS users come from? [06:05] digitaltoad: Yeah, its very light weight [06:05] skm has joined the channel [06:05] nuck: I knew they were mutated or braindamaged :P [06:05] brainproxy: :) [06:05] nuck: digitaltoad: Interesting... [06:05] nuck: andoriyu: I tried to set it up, couldn't even figure that much out lol [06:05] digitaltoad: however, it does not ship with a ui layer. That is now optional in sproutcore-ui [06:06] andoriyu: its documentation completly out-of-sync wiht actual code. [06:06] sneakyness has joined the channel [06:07] nuck: digitaltoad: Eh [06:07] andoriyu: and only devil knows why they decided to make templating, while they using dsl [06:07] nuck: The only good part was that UI [06:07] nuck: IMHO [06:07] jmoyers: ACTION shakes his head at sproutcore website [06:07] nuck: The UI was wonderful, the rest? Fuck no. [06:07] andoriyu: kv mapping is awesome too [06:07] digitaltoad: yeah the kv mapping is what I like [06:08] andoriyu: creating UI is nightmare. [06:08] digitaltoad: which stays with sc 2.0 [06:08] digitaltoad: that is gone in 2.0, now you can just use templates [06:08] stagas has joined the channel [06:08] nuck: Most of my frontend stuff is gonna be hand-made probably, using jQuery for DOM operations (it makes my life so much easier) [06:08] nuck: My mobile site I haven't decided on a framework for [06:08] digitaltoad: thats how 2.0 now works basically [06:09] digitaltoad: while giving the kv binding [06:09] andoriyu: digitaltoad, so no more dsl? [06:09] nuck: But there was a great one mentioned on YayQuery a while back >_> [06:09] andoriyu: wtf? I liked that part [06:09] digitaltoad: I was kind of turned off at first when I saw that the UI would not ship with 2.0, but the new style of application design is quite nice. [06:10] hacksparrow has joined the channel [06:10] nuck: Anyways, back to making this LDAP server in Node :D [06:10] digitaltoad: Yeah, no more nest json-esque UI design. [06:10] hacksparrow: Is there a package that takes cares of file requests? favicon.ico etc. [06:10] nuck: Which, BTW, will be fully-open-sourced [06:10] nuck: hacksparrow: You using Express? [06:11] hacksparrow: Yep [06:11] jmoyers: node-static or connect static if you're using express hacksparrow [06:11] nuck: If so, there's express's static file stuff [06:11] nuck: But if it's jsut favicon, there's express.favicon() [06:11] hacksparrow: Ok [06:11] hacksparrow: Thanks guys, will look up [06:11] nuck: ACTION looks down [06:12] superjudge has joined the channel [06:12] andoriyu: question about express and connect [06:13] nuck: Aye? [06:13] andoriyu: how can i add http basic/digest auth to my expess app? [06:13] nuck: andoriyu: There is a middleware for basic Auth IIRC? [06:13] nuck: Should be built into Connect [06:13] andoriyu: know connect can handle it, but dunno how to use it [06:14] nuck: andoriyu: Did you read the examples on the middleware? [06:14] nuck: IIRC, you pass a username and password to the middleware [06:14] nuck: Might be wrong tho [06:14] andoriyu: digitaltoad, I still can see dsl for views — http://guides.sproutcore.com/views.html [06:14] andoriyu: nuck, no, i didn't [06:14] khrome_ has joined the channel [06:15] nuck: If that's not powerful enough for your use case, you can always tear that middleware apart and build your own setup [06:15] phluffy has joined the channel [06:15] phluffy has joined the channel [06:15] digitaltoad: andoriyu: that is still 1.7, 2.0 is still in beta so the guides haven't been updated. [06:15] andoriyu: ohh [06:16] andoriyu: so, I cross out SC. [06:16] andoriyu: nuck, i have bunch of users in databases, and all connection to app must require proper login [06:17] nuck: andoriyu: Well, there's always POST over HTTPS? [06:18] nuck: That's what I do. [06:18] nuck: And use express.bodyParser() middleware [06:18] nuck: And then req.body.username and such [06:19] andoriyu: nuck, https for all connections [06:19] wolftankk has joined the channel [06:20] andoriyu: is there way to put that infront of every route? (in sinatra i use 'before' for that kinda things) [06:21] jmoyers: andoriyu the body parser? [06:21] hacksparrow has joined the channel [06:21] jmoyers: app.use(express.bodyParser()) [06:21] andoriyu: I'm using it. Mb example? [06:22] jmoyers: andoriyu https://github.com/senchalabs/connect/blob/master/examples/basicAuth.js [06:23] jmoyers: express is built on connect middleware [06:23] jmoyers: so you can use the same stuff [06:24] z6Dabrata has joined the channel [06:24] andoriyu: I see [06:25] khrome_ has joined the channel [06:25] andoriyu: Didn't get how to enable for all routes, but I got the idea [06:25] _jhs_ has joined the channel [06:26] nuck: andoriyu: .use() is on all routes [06:27] andoriyu: ok [06:28] jetienne has joined the channel [06:28] boltR has joined the channel [06:28] random123 has joined the channel [06:30] Guest85009 has joined the channel [06:30] zomgbie has joined the channel [06:32] dmkbot: joyent/node: 03isaacs: Nested child_processes piping to stdout cause freeze - https://github.com/joyent/node/issues/1726 [06:35] matyr has joined the channel [06:35] andoriyu: TypeError: boolean is not a function [06:35] andoriyu: he he [06:37] Cromulent has joined the channel [06:39] langworthy has joined the channel [06:39] anno^da has joined the channel [06:39] theCole has joined the channel [06:39] andoriyu: now it's working. thx [06:41] altamic has joined the channel [06:41] febits has joined the channel [06:42] matyr_ has joined the channel [06:42] dshaw_ has joined the channel [06:43] cjm has joined the channel [06:43] pquerna: isaacs: yay, thanks! [06:44] euforic has joined the channel [06:44] binarychef has joined the channel [06:46] knifed has joined the channel [06:48] dinarcon has joined the channel [06:48] andoriyu: so, still what kind of UI library everybody likes? [06:49] caffine has joined the channel [06:49] jetienne: andoriyu: html [06:50] mynameisbender has joined the channel [06:51] jmoyers: jetienne++ [06:51] v8bot_: jmoyers has given a beer to jetienne. jetienne now has 1 beers. [06:51] jetienne: jmoyers: thanks :) [06:59] AphelionZ1 has joined the channel [07:01] guidocalvano has joined the channel [07:01] andoriyu: jetienne but it is not UI library... [07:02] jetienne: andoriyu: i disagree but lets not argue on words. what are you looking for [07:03] jmoyers: the lord of all things single-page-apps needs to decree that ye shall not break my browsers scroll position history [07:04] andoriyu: I'm writing single-page app, which is use rest api as back end. I need charts, tables. [07:05] andoriyu: thinking about Cappuccino, backbone + , Dojo Toolkit [07:05] jmoyers: andoriyu why not pick up exactly what you need when you need it? [07:05] jmoyers: http://www.1stwebdesigner.com/css/top-jquery-chart-libraries-interactive-charts/ [07:05] jmoyers: for instance [07:06] jmoyers: get best in class component for the task at hand [07:06] jmoyers: i've used flot for graphing, not terrible. I've used tablesorter for tables, not bad either. [07:06] hakaselab has joined the channel [07:08] andoriyu: I have 0 experience with working anything, but SproutCore on client-side. [07:14] matyr has joined the channel [07:14] netlemur has joined the channel [07:17] khrome_ has joined the channel [07:20] dexter_e has joined the channel [07:22] k1ttty has joined the channel [07:23] skm has joined the channel [07:23] torsd has joined the channel [07:23] mike5w3c has joined the channel [07:24] goshakkk has joined the channel [07:24] balaa has joined the channel [07:28] metellus has joined the channel [07:28] whitman has joined the channel [07:30] crescendo|laptop has joined the channel [07:30] crescendo|laptop has joined the channel [07:32] tomtomaso has joined the channel [07:34] matyr_ has joined the channel [07:35] balaa has joined the channel [07:36] simenbrekken has joined the channel [07:36] devongovett has joined the channel [07:40] neilk_ has joined the channel [07:40] __doc__ has joined the channel [07:42] liar has joined the channel [07:42] TomY has joined the channel [07:45] locksfree has joined the channel [07:45] freeformz has joined the channel [07:46] kbni has joined the channel [07:46] kbni: greetings [07:46] Druid has joined the channel [07:46] kbni: has anyone here made a portable nodejs installation? [07:47] kbni: uh, for windows, and not an installation, heh. [07:47] openpercept has joined the channel [07:47] balaa has joined the channel [07:48] kbni: I'm not on windows at the moment, I am just curious... is that node.exe on the downloads page standalone? [07:48] NewCoder has joined the channel [07:48] tomtomaso has joined the channel [07:49] tom-tomaso has joined the channel [07:50] hij1nx has joined the channel [07:54] openpercept has joined the channel [07:55] wbednarski has joined the channel [07:58] stonebranch has joined the channel [07:59] JaKWaC has joined the channel [08:01] pt_tr has joined the channel [08:01] socketio\test\90 has joined the channel [08:04] knifed has joined the channel [08:04] JaKWaC has joined the channel [08:05] JaKWaC_ has joined the channel [08:05] madsleejensen has joined the channel [08:07] skm has joined the channel [08:11] netlemur has joined the channel [08:12] schmolzer has joined the channel [08:13] Xano has joined the channel [08:15] balaa_ has joined the channel [08:22] Xano has joined the channel [08:27] Xano_ has joined the channel [08:28] Lemon|mbp has joined the channel [08:29] trevorgreen_ has joined the channel [08:31] Nss has joined the channel [08:38] replore has joined the channel [08:39] replore_ has joined the channel [08:40] adam_ has joined the channel [08:44] jvolkman has joined the channel [08:45] onre has joined the channel [08:45] thermal has joined the channel [08:46] Tennel has joined the channel [08:47] Tennel: hello, is it possible, to change the user of a child-process? [08:49] adambeynon has joined the channel [08:50] indutny: Tennel: yes [08:50] indutny: AFAIK [08:50] Tennel: indutny: how? [08:50] indutny: one second [08:50] Tennel: ok [08:51] zomgbie has joined the channel [08:52] netlemur: if you're on a unix machine perhaps running the command with "sudo -u" could be a workaround? [08:52] hornairs has joined the channel [08:52] indutny: yep [08:52] indutny: anyway [08:53] indutny: Tennel: take a look at http://github.com/indexzero/forever [08:53] indutny: you can configure `uid` here [08:53] ttpva has joined the channel [08:54] TheJH has joined the channel [08:54] Tennel: yes, but i don't want to start an extern application, i want to fork, with an explicit function [08:54] stutter has joined the channel [08:55] DennisRas has joined the channel [08:55] TheJH: Tennel, without having much context here, but nodes "fork" just starts a new nodejs instance spins up a whole new v8 JS VM [08:55] TheJH: *and spins [08:56] freeformz has joined the channel [08:57] pfried has joined the channel [08:57] Tennel: i need, a process, which runs under an other users, so that filesystem changes are possible [08:57] Tennel: for example, create a file, with this owner [08:58] jacobolus has joined the channel [09:00] mikl has joined the channel [09:03] k1ttty has joined the channel [09:06] joel has joined the channel [09:08] Skomski has joined the channel [09:08] robotmay has joined the channel [09:09] aloha_ has joined the channel [09:10] aloha_: Hello every. [09:10] kulor-uk has joined the channel [09:12] `3rdEden has joined the channel [09:12] DrMcKay has joined the channel [09:16] fangel has joined the channel [09:16] ph^ has joined the channel [09:17] dmkbot: joyent/node: 03networkimprov: Surface DNS errors in constants module - https://github.com/joyent/node/issues/1725 [09:17] jetienne has joined the channel [09:20] Cromulent has joined the channel [09:21] cjm has joined the channel [09:21] Skola has joined the channel [09:23] locksfree has joined the channel [09:24] mike5w3c has joined the channel [09:26] tomtomaso has joined the channel [09:27] skm has joined the channel [09:28] Cromulent has joined the channel [09:30] Fabryz has joined the channel [09:35] matyr has joined the channel [09:37] bergie has joined the channel [09:38] rendar has joined the channel [09:43] justinTNT: how do I handle a level 2 xhr file upload in node? [09:43] TheJH: justicefries, "level 2 xhr"? [09:44] adambeynon_ has joined the channel [09:44] przemoc has joined the channel [09:44] justinTNT: um, you know, the file api in xmlhttprequest (level 2) [09:44] nforgerit has joined the channel [09:44] neilk_ has joined the channel [09:50] avih has joined the channel [09:51] FireFly has joined the channel [09:52] stagas has joined the channel [09:52] jchris has joined the channel [09:57] avih has joined the channel [09:59] mikl1 has joined the channel [10:01] guidocalvano has joined the channel [10:03] thalll has joined the channel [10:05] tommg has left the channel [10:08] shipit has joined the channel [10:12] TheJH: any other people from germany/austria/switzerland here? I think http://de.wikipedia.org/wiki/Node.js needs some improvements - already corrected some things myself [10:14] hakaselab has joined the channel [10:15] stagas has joined the channel [10:15] netlemur: TheJH: Berlin :-) [10:17] skm has joined the channel [10:19] junkee[] has joined the channel [10:20] netlemur: wow. I hate the wikipedia trolls. [10:21] socketio\test\35 has joined the channel [10:21] TheJH: netlemur, yes, but having a good nodejs article in the german wikipedia is worth it, I think [10:22] netlemur: TheJH: tbh.. I stopped caring about the german wikipedia a long time ago [10:23] mikl has joined the channel [10:27] N0va` has joined the channel [10:31] dexter_e has joined the channel [10:36] yorick has joined the channel [10:36] DrMcKay: um... I'm having problems configuring current npm [10:36] DrMcKay: I think I know the reason, but I have no idea how could it happen [10:37] DrMcKay: it fails when checking out request submodule [10:37] DrMcKay: request submodule points to: https://github.com/mikeal/request/tree/cd22fbdb00b90c5c75187ecf41373cfbb4af5bcd [10:38] DrMcKay: but git somehow can't check it out [10:38] Tobbe__: What's the recommended way to html encode the text I send to the user's browser? (using express+jade) [10:39] mraleph has joined the channel [10:40] micheil has joined the channel [10:41] thinkjson has left the channel [10:46] errordeveloper has joined the channel [10:47] fly-away has joined the channel [10:48] cjheath has joined the channel [10:51] aruns has joined the channel [10:52] madsleejensen has joined the channel [10:56] pickels has joined the channel [10:56] blup has joined the channel [11:00] thalll has joined the channel [11:03] thalll has joined the channel [11:04] Kai`: Hi, I'm receiving a malloc error while attempting to install npm (http://pastebin.com/Nyxj6N3m) Any ideas? I didn't see anything related in the issues list [11:04] Kai`: osx lion, btw [11:04] jetienne has joined the channel [11:06] replore has joined the channel [11:06] replore_ has joined the channel [11:07] robi42 has joined the channel [11:07] Kai`: bleh, I just realized I installed the latest unstable version of node; wondering if that's the cause [11:08] hij1nx_ has joined the channel [11:10] weezle has joined the channel [11:10] weezle has left the channel [11:10] weezle has joined the channel [11:10] gkmngrgn has joined the channel [11:11] vivi_ has joined the channel [11:11] Kai`: Yep, removed node and put on v0.4.12 stable -- no more malloc error [11:13] ErikCorryV8 has joined the channel [11:15] garrensmith: anyone have issues with iphone not parsing a date string like this 2011-09-21T08:30:00.000Z [11:19] hacksparrow: Any idea whay Jade is not interpolating the fbif value in meta(property="fb:admins", content=#{fbid}) ? [11:19] hacksparrow: fbid* [11:20] garrensmith: hacksparrow: content="#{fbid}" [11:21] skm has joined the channel [11:22] temp01 has joined the channel [11:22] hacksparrow: Gaaah! [11:22] hacksparrow: Thanks bro [11:23] wbednarski has joined the channel [11:23] garrensmith: lol I've had that problem before [11:23] freeformz has joined the channel [11:25] maushu has joined the channel [11:26] caaakeeey has joined the channel [11:29] unomi has joined the channel [11:32] stisti has joined the channel [11:32] thomaschaaf_ has joined the channel [11:33] vguerra has joined the channel [11:33] chjj has joined the channel [11:33] mendel_ has joined the channel [11:33] thomaschaaf_: Hey guys I am looking into node.js and this code: http://pastie.org/2547500 goes from 0, 2, 4, 6, etc.. [11:33] thomaschaaf_: why is that? [11:34] thomaschaaf_: maybe the favicon [11:34] chjj: thomaschaaf_: yes, its the favicon request your browser is making [11:35] thomaschaaf_: okay :) [11:35] zastaph has joined the channel [11:35] thomaschaaf_: chjj: what are the best ways to learn how to code nodejs for a bit bigger projects? I usually do lots of Zend Framework stuff [11:36] stisti has joined the channel [11:36] kuebk^ has joined the channel [11:36] alnewkirk has joined the channel [11:36] chjj: thomaschaaf_: im not sure there is a definitive guide to follow [11:37] thomaschaaf_: is there mvc in nodejs? [11:37] chjj: thomaschaaf_: you can look around, theres always great examples of how to do things with node, howtonode, nodebeginner is another one, dailyjs, etc [11:37] DrMcKay: docs.nodejitsu.com! [11:37] chjj: thomaschaaf_: yes there are mvc frameworks, however, the most popular framework for node is not strictly an mvc framework [11:37] chjj: that too ^ [11:38] thomaschaaf_: chjj: what is the most popular one? [11:38] chjj: thomaschaaf_: express [11:38] chjj: thomaschaaf_: its more "freestyle" though, sinatra-like [11:38] chjj: https://github.com/visionmedia/express [11:38] chjj: http://expressjs.com/ [11:38] sirdancealot has joined the channel [11:39] chjj: its much much better than an mvc framework imo ;) [11:39] mikl has joined the channel [11:39] mikl has joined the channel [11:41] thomaschaaf_: chjj: I'll go read the guide to express :) thank you! [11:42] chjj: thomaschaaf_: sure [11:42] nubish has joined the channel [11:43] rfay has joined the channel [11:43] adrianmg has joined the channel [11:52] hacksparrow has joined the channel [11:52] [AD]Turbo has joined the channel [11:53] Wizek has joined the channel [11:58] davidwalsh has joined the channel [11:59] jomoho has joined the channel [12:00] jbpros has joined the channel [12:00] wbednarski has joined the channel [12:02] DrMcKay: is there anyway I could reload modules in node? [12:05] superjudge has joined the channel [12:05] DrMcKay: require.cache seems empty [12:05] wbednarski has joined the channel [12:06] blup has joined the channel [12:07] Lemon|mbp has joined the channel [12:09] ryanmcgrath has joined the channel [12:10] NewCoder has joined the channel [12:10] kr0mmy has joined the channel [12:10] skm has joined the channel [12:10] weezle has joined the channel [12:12] topaxi has joined the channel [12:15] kriszyp has joined the channel [12:17] davidwalsh has joined the channel [12:17] fly-away has joined the channel [12:25] CarterL has joined the channel [12:27] jro has joined the channel [12:31] weezle has joined the channel [12:31] jbpros has joined the channel [12:31] mroman has joined the channel [12:35] mroman has joined the channel [12:35] broofa: Is console.log output synchronous (like util.debug())? [12:36] piscisaureus has joined the channel [12:40] swair has joined the channel [12:44] overclk has joined the channel [12:47] CStumph_ has joined the channel [12:48] TomY has joined the channel [12:50] pen_ has joined the channel [12:50] davidbanham has joined the channel [12:50] AvianFlu: broofa: no [12:50] AvianFlu: but console.error is synchronous [12:51] AvianFlu: as an overall rule, stdout is async, stderr is sync in node [12:53] boehm has joined the channel [12:54] whitman has joined the channel [12:54] Renegade001 has joined the channel [12:58] freeformz has joined the channel [12:59] Skomski has joined the channel [13:03] rurufufuss has joined the channel [13:03] jbpros has joined the channel [13:05] ttpva_ has joined the channel [13:05] scott_gonzalez has joined the channel [13:09] pascalopitz has joined the channel [13:09] pascalopitz: hello [13:09] mike5w3c has joined the channel [13:10] pascalopitz: does anybody use node.js on a NAS drive with debian? [13:15] bicranial_ has joined the channel [13:16] Cromulent has joined the channel [13:16] littler has joined the channel [13:16] TheFuzzball has joined the channel [13:17] littler has left the channel [13:19] CarterL has joined the channel [13:20] littler has joined the channel [13:21] jro has joined the channel [13:22] littler: nodejs doesn't need any http server like nginx or apache? [13:23] netlemur: littler: nodejs has it's own http server. http://nodejs.org/ [13:23] DrMcKay has joined the channel [13:24] littler: so its http server is as good as nginx? [13:25] Cromulent has joined the channel [13:26] TheJH: littler, for what purpose? [13:27] MUILTFN has joined the channel [13:27] littler: no purpose, just wanna to know if nodejs needs additional http server or it is fast enough to handle requests by itself [13:28] DrMcKay: littler: node-http-proxy [13:28] DrMcKay: littler: https://github.com/nodejitsu/node-http-proxy [13:28] EvRide: littler: programmers are expensive, hardware is cheap [13:29] NeedHelp has joined the channel [13:29] NeedHelp: readFileSync('./client.html', function (err, data) { if (err) throw err; console.log(data); }); [13:29] NeedHelp: can somebody tell me why it crashes? [13:29] kriszyp has joined the channel [13:29] jbpros_ has joined the channel [13:30] ph^ has joined the channel [13:30] littler: thanks, but I don't want a http proxy. I have just started to write web with nodejs. [13:30] aruns: can someone have a look at this - http://pastebin.com/9dsmvjaQ . Its a simple log parser using lazy. it doesn't seem to do the parsing, yet when i debug it with node-inspector i can see it going through the parsing code [13:31] mikl has joined the channel [13:31] DrMcKay: NeedHelp: readFile instead of readFileSync [13:32] littler: Usually, like php and apache, scripts need a professional http server. So nodejs doesn't need one? [13:32] meso has joined the channel [13:32] NeedHelp: DrMCKay dont work [13:32] NeedHelp: self error [13:33] stisti has joined the channel [13:33] skm has joined the channel [13:33] NeedHelp: DrMcKay can you tell me if readFile seeks the file in root directory or in server.js directory? [13:34] junkee[] has joined the channel [13:34] stagas: NeedHelp: need __dirname + '/client.html' for server.js dir [13:34] NeedHelp: okey i gonna test it [13:35] NeedHelp: thanks [13:35] NeedHelp: problem solved ^.^ [13:35] NeedHelp: bye bye and ty =)# [13:37] hacksparrow has joined the channel [13:37] robotmay has joined the channel [13:37] aruns: anyone? even a pointer to what i'm doing wrong or how to use the lazy module correctly [13:37] DrMcKay: littler: node.js has a http server [13:38] DrMcKay: littler: like, built-in. batteries included. [13:38] tyrion-mx has joined the channel [13:38] navaru has joined the channel [13:39] geojeff has joined the channel [13:39] Raynos: When people "complain" js is slow. Can I tell them that they can just expose C++ modules by writing v8 extensions and hand optimise the hell out of those? [13:40] DrMcKay: Raynos: tell them to gtfo [13:40] Raynos: js is slow [13:40] Raynos: it's a whole factor of 3 slower then C++ [13:40] DrMcKay: Raynos: and, to answer your question, yes [13:40] Raynos: If I need to heavy data computation then it should be in C++ or a different process [13:41] DrMcKay: Raynos: definitely, but why would you do it using node anyway? [13:41] AvianFlu: if you need heavy data computation why are you using node? [13:41] Raynos: because I should use node for everything >_> [13:41] Raynos: One hammer, everything is a nail [13:41] Raynos: It's a poor example really [13:41] AvianFlu: I remember that day, when I was about 7 and someone handed me a hammer for the first time [13:41] AvianFlu: (seriously, I did that when I was 7) [13:41] DennisRasmussen has joined the channel [13:41] CarterL: your poor cat, all it wanted was it's hair to be brushed [13:42] AvianFlu: Raynos: 'x is slower than y'. Whose math? whose computer? whose problem? [13:42] Raynos: I was mainly asking how practical is it to write c++ extensions for increased performance [13:42] Raynos: is that abusing c++ extensions [13:42] Raynos: when should I be bolting c++ code onto my node application? [13:43] AvianFlu: c++ extensions are hard to write, and crossing back and forth from js to c++ is expensive [13:43] AvianFlu: so unless you really see a NEED, don't [13:43] AvianFlu: v8 javascript is fast, when you're not doing something that doesn't belong in v8 javascript [13:44] DrMcKay: Raynos: while V8 does pretty good job with compiling your code (together with doing SSE optimizations and shit), it *shouldn't* be used to perform computations [13:44] AvianFlu: javascript only has 52 bit integers [13:44] AvianFlu: because every number in js is really a float [13:44] AvianFlu: for example [13:44] DrMcKay: Raynos: you can control them from node, have rabbitmq queue them [13:44] DrMcKay: .. typeof 12 [13:45] DrMcKay: v8: typeof 12 [13:45] v8bot_: DrMcKay: "number" [13:45] DrMcKay: v8: typeof 12.12 [13:45] v8bot_: DrMcKay: "number" [13:45] DrMcKay: this: http://bespin.cz/~ondras/html/classv8_1_1Number.html [13:46] Peniar has joined the channel [13:46] skm has joined the channel [13:46] unomi has joined the channel [13:48] pascalopitz: grrr ... looks like I cannot get noe.js working on my linkstation [13:48] pascalopitz: scons: *** [obj/release/snapshot.cc] Error -4 [13:48] pascalopitz: :( [13:48] DrMcKay: pascalopitz: NAS? [13:48] pascalopitz: yeah [13:48] DrMcKay: pascalopitz: it's ARM or what? [13:48] pascalopitz: ARM with debian squeeze [13:48] navaru has joined the channel [13:48] pascalopitz: yep [13:49] navaru has left the channel [13:49] pascalopitz: I had a different error before ... and added a compiler flag already [13:49] junkee[] has joined the channel [13:49] DrMcKay: pascalopitz: your libc version? [13:49] pascalopitz: '-march=armv5t' [13:49] wbednarski has joined the channel [13:49] pascalopitz: libc version ... hang on [13:50] pascalopitz: do you mean linux-libc-dev? [13:50] jakehow has joined the channel [13:50] talltyler has joined the channel [13:50] pascalopitz: 2.6.32-35 [13:51] talltyler has joined the channel [13:51] DrMcKay: pascalopitz: no, it's a kernel version, I think [13:51] DrMcKay: pascalopitz: ls /lib/libc* [13:52] pascalopitz: pascal@FLAT32STATION:~/install/node-v0.5.7$ ls /lib/libc* [13:52] pascalopitz: /lib/libc-2.11.2.so /lib/libc.so.6 /lib/libcap.so.2 /lib/libcap.so.2.19 /lib/libcidn-2.11.2.so /lib/libcidn.so.1 /lib/libcom_err.so.2 /lib/libcom_err.so.2.1 /lib/libcrypt-2.11.2.so /lib/libcrypt.so.1 [13:55] pascalopitz: DrMcKay: 2.11.2 I guess [13:55] DrMcKay: pascalopitz: libc is fine (mine is libc-2.14) [13:55] DrMcKay: pascalopitz: post full compilation log somewhere [13:58] Lemon|mbp has joined the channel [13:59] pascalopitz: DrMcKay: https://gist.github.com/34100135dd6c85758224 [14:00] flexd has joined the channel [14:00] flexd: Hi there, not sure if this is the right place to ask but I'm having some trouble with node/npm.. Figured you guys probably use npm anyway :) [14:01] flexd: I've just installed coffee-script via npm but I still can't run the 'coffee' command.. I'm thinking I am missing something in my PATH or similar. [14:01] DrMcKay: flexd: npm install -g coffee-script [14:01] flexd: it has to be global? [14:01] flexd: I installed it without -g to keep it to my specific user. [14:01] DrMcKay: flexd: yes, it has to install coffee to /usr/bin [14:01] flexd: I'm on OSX by the way, node installed via homebrew [14:01] DrMcKay: flexd: ah, wait a sec, you could do one thing [14:02] zastaph: flexd: http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/ [14:02] flexd: oh [14:02] flexd: locally is in the local folder [14:02] flexd: okay! [14:03] flexd: That explains it, thanks :) [14:03] talltyler has joined the channel [14:03] flexd: Works now. [14:05] flexd: I didn't want to use -g thinking it needed to install things as root, but that says it just installs it "globally" to wherever the prefix is.. and that is in the right place :) [14:05] nerdy_ has joined the channel [14:06] ppcano has joined the channel [14:06] DrMcKay: pascalopitz: weird, it seems to "just" error out [14:07] DrMcKay: pascalopitz: does "out/Release/obj/release/snapshot.log" contain any useful content? [14:07] jro has joined the channel [14:07] skm has joined the channel [14:09] jbpros has joined the channel [14:11] vivi_: yo all [14:11] vivi_: Anyone knows what can I do to avoid modules modifying my global objects objects? [14:11] vivi_: I mean what if a module does this: process.nextTick = 10; [14:12] vivi_: then i would be fuck*d, aint i? [14:12] mikl has joined the channel [14:15] pascalopitz: DrMcKay: file doesn't exist [14:16] c4milo has joined the channel [14:19] DrMcKay: pascalopitz: shit. well, after all, this is an issue, as node should be compilable under ARM [14:19] jakehow has joined the channel [14:20] DrMcKay: pascalopitz: you could try reporting it [14:20] pascalopitz: hmm, maybe ... [14:20] pascalopitz: not sure if the compiler flag I set is actually doing the right thing anyway ... no idea what processor LS-VL has ... couldn't find out exactly [14:21] pascalopitz: but yeah, v8 and ARM seems to be the issue [14:22] freeformz has joined the channel [14:23] metaverse has joined the channel [14:23] boehm has joined the channel [14:24] pascalopitz has left the channel [14:24] kenperkins has joined the channel [14:24] jbpros has joined the channel [14:25] talltyler has joined the channel [14:33] jesster7 has joined the channel [14:34] Skomski has joined the channel [14:34] jesster7 has left the channel [14:35] krill has joined the channel [14:36] mikl has joined the channel [14:37] Skola has joined the channel [14:38] AphelionZ has joined the channel [14:40] issackelly_ has joined the channel [14:40] socketio\test\39 has joined the channel [14:42] ryanfitz has joined the channel [14:44] alnewkirk has joined the channel [14:44] kriszyp has joined the channel [14:45] jtsnow has joined the channel [14:47] joeytwiddle has joined the channel [14:47] Cromulent has joined the channel [14:47] Sorella has joined the channel [14:48] metellus has joined the channel [14:48] z6Dabrata has joined the channel [14:50] SamuraiJack has joined the channel [14:50] bshumate has joined the channel [14:50] bshumate has joined the channel [14:52] garrensmith: do I have to do anything special to get socket.io working on an iphone? [14:53] jamesd_: send steve jobs your first born? [14:53] CarterL: just your liver [14:53] nforgerit has joined the channel [14:54] shipit_ has joined the channel [14:56] swair has joined the channel [14:56] madsleejensen has joined the channel [14:58] swair_ has joined the channel [14:59] swair_ has joined the channel [14:59] torsd has joined the channel [14:59] jakehow has joined the channel [15:00] piscisaureus_ has joined the channel [15:02] Vennril has joined the channel [15:03] docl has joined the channel [15:05] devongovett has joined the channel [15:06] pgherveou has joined the channel [15:10] goldilocks has joined the channel [15:11] goldilocks: Was the js shell that comes with node renamed from "js" to "node" at some point? [15:15] garrensmith: goldilocks: what do you mean? [15:15] ErikCorryV8 has joined the channel [15:16] goldilocks: garrensmith: [15:16] damjan: goldilocks: js is the javascript exported from firefox [15:16] felixhummel has joined the channel [15:16] goldilocks: garrensmith: sorry, the command line interface, "js" [15:17] garrensmith: as far as I know it was always node [15:17] goldilocks: garrensmith: You know, you get a little > prompt. An interactive shell. [15:17] AaronMT has joined the channel [15:17] goldilocks: garrensmith: okay, just curious. [15:17] shipit has joined the channel [15:20] killfill_: hm.. how do i specify an option is required, with commander?.. [15:22] digitaltoad has joined the channel [15:23] grant_ has joined the channel [15:23] ryanmcgrath has joined the channel [15:29] coreb has joined the channel [15:29] stagas has joined the channel [15:30] vinyl_ has joined the channel [15:30] kriszyp has joined the channel [15:32] vinyl_: hi,anyone can help with installing node on windows? [15:32] slifty_corsair has joined the channel [15:33] issackelly_: is anybody interested in helping test a node.js implementation of django's new signing? I'm making a prototype of an app that will have both django and node, and I want to use django's signing to pass data between the two securely [15:33] arnee has joined the channel [15:34] issackelly_: https://gist.github.com/1223987 [15:34] k1ttty has joined the channel [15:35] jonrohan has joined the channel [15:37] freeformz has joined the channel [15:38] necrodearia has joined the channel [15:39] Spion has joined the channel [15:39] arnee has joined the channel [15:40] weezle has joined the channel [15:40] JSManiacs has joined the channel [15:41] JSManiacs has left the channel [15:43] skm has joined the channel [15:43] z6Dabrata has joined the channel [15:43] scott_gonzalez has joined the channel [15:44] skiz has joined the channel [15:44] patcito has joined the channel [15:44] astropirate has joined the channel [15:46] jmoyers has joined the channel [15:47] gkmngrgn has joined the channel [15:48] weezle has joined the channel [15:48] jslatts has joined the channel [15:50] jarek has joined the channel [15:51] dexter_e has joined the channel [15:51] tmedema has joined the channel [15:51] tmedema: What's an efficient method to get constant CPU usage information? [15:52] dimroc has joined the channel [15:53] OmidRaha has left the channel [15:55] amigojapan has joined the channel [15:56] slifty_corsair has joined the channel [15:58] meso has joined the channel [15:58] digitaltoad has joined the channel [15:58] isaacs has joined the channel [16:00] davidwalsh has joined the channel [16:01] TheJH: tmedema, maybe http://nodejs.org/docs/latest/api/os.html#os.loadavg is what you're looking for? [16:01] DrMcKay: isaacs: just a note, npm master and v1.0.30 are broken [16:01] isaacs: DrMcKay: broken how? [16:01] netlemur: tmedema: on unix systems you could poll /proc/stats [16:01] DrMcKay: isaacs: https://github.com/isaacs/npm/issues/1414 [16:02] DrMcKay: isaacs: request submodule checkout fails [16:02] TheJH: DrMcKay, I think it's because he fixed another bug I told him about :D [16:02] netlemur: tmedema: oh sorry. scrap that. os.cpus has the same infos [16:02] DrMcKay: TheJH: :D [16:02] isaacs: DrMcKay: hm, that shouldn't matter for the normal install, since it's bundled. [16:02] isaacs: but i'll take a look [16:03] isaacs: ahhh... yes. still pointing at mikeal's not mine. [16:03] kuebk^: anyone familiar with gdb? [16:04] kuebk^: i'm compiling the module with the -g [16:04] tmedema: netlemur: what is os.cpus? [16:04] isaacs: DrMcKay: fixed 6b13b081c70e5d444d072b16b119c93f949d8ae5 [16:05] kuebk^: but that;s what i get [16:05] kuebk^: http://pastebin.com/WeLfv5nT [16:05] netlemur: tmedema: http://nodejs.org/docs/latest/api/os.html#os.cpus [16:05] smathy has joined the channel [16:05] DrMcKay: isaacs: great, thanks [16:06] tmedema: Oh, great. Do you happen to know how to get a percentage of total power for all cores combined? [16:06] replore_ has joined the channel [16:06] replore has joined the channel [16:06] netlemur: tmedema: what exactly do you mean by "total power"? [16:07] jesster71 has joined the channel [16:07] netlemur: tmedema: you can iterate over the cpus and calculate the percentage from times.user+times.sys [16:08] yorick: SubStack: is it ok if I use/steal some of your node-buffers (the indexOf method) code? it wasn't licensed :) [16:09] stisti has joined the channel [16:10] madsleejensen has joined the channel [16:10] netlemur: tmedema: (times.user+times.sys)/times.idle*100 should give you the percentage of each core [16:11] tmedema: netlemur: excellent. What about times.nice and times.irq? [16:12] AvianFlu has joined the channel [16:12] netlemur: tmedema: irq stands for interrup requests. I guess you don't need them for cpu usage calculation [16:13] tmedema: hmm, I'm not sure really [16:13] tmedema: and what about nice? [16:13] netlemur: (times.user+times.sys) should probably be (times.user+times.sys+times.nice) [16:13] tmedema: ah alright [16:14] AvianFlu: 'nice' is a value to determine the priority of a process relative to others, if that's what youre asking [16:14] AvianFlu: ACTION just showed up [16:14] stagas has joined the channel [16:14] jchris has joined the channel [16:14] tmedema: I know what niceness is, but what does it do in the cpu.times object? [16:14] jchris has joined the channel [16:15] d0k has joined the channel [16:15] AvianFlu: maybe it's the nice value for your current process? [16:16] netlemur: nice should be for low priority processes. I don't know how often they show up. on my servers it looks like it's always 0 [16:16] kuebk^: is node debug version build with symbols? [16:16] piscisaureus_ has joined the channel [16:16] tmedema: netlemur: I am actually using those low prio processes so I guess I should include it [16:17] tmedema: thanks [16:17] netlemur: tmedema: may ask what you are building with the cpu usage stats? [16:18] netlemur: I'm currently building a little monitoring app (only reading stuff from log files). have to include system stats in the future though [16:18] damjan: tmedema: nice is subset of user [16:19] tmedema: netlemur: I am building a resource based task queue, https://github.com/tommedema/node-tasker [16:19] mandric has joined the channel [16:21] AaronMT has joined the channel [16:23] netlemur: tmedema: sounds interesting. I might actually have some usecases for that :D [16:23] mikl has joined the channel [16:24] tmedema: netlemur: good, me too. I will use it to spawn child processes [16:24] tmedema: netlemur: do you have any issues with the suggested API? [16:25] heavysixer has joined the channel [16:26] netlemur: tmedema: looks good to me. but I'm really new to all this node stuff :-) [16:26] tmedema: alright [16:27] stagas has joined the channel [16:28] luckysmack__ has joined the channel [16:28] Me1000 has joined the channel [16:29] goldilocks: tmedema: nice is not relevant to total usage, it's about scheduling. [16:30] goldilocks: tmedema: sorry, missed a scroll down there. [16:31] Tiller has joined the channel [16:31] Tiller: Hi! [16:32] blup has joined the channel [16:32] Skola has joined the channel [16:33] stagas_ has joined the channel [16:34] Tiller: Hey guys, I've a problem with EventEmitter [16:35] Tiller: Or to be more precise, when I put require('events').EventEmitter into a variable, I can't use it after [16:35] gregmoreno has joined the channel [16:35] Tiller: I've 3 files : http://pastebin.com/VzZA1B0u The main.js is the one executed by node. [16:35] tmedema: goldilocks: aye, thanks [16:36] Tiller: And like it's wrote on the bottom of player.js, I can't use common.eventEmitter [16:36] Tiller: I got the lovely "undefined is not a function" [16:37] Tiller: Any idea? :] [16:37] AvianFlu: what you're requiring is a constructor... are you making a new one anywhere? [16:37] kuebk^: node 0.4.11 crashes on building when i configured with --gdb, how to fix this? [16:37] AvianFlu: oh, yeah, you are [16:38] matjaz has joined the channel [16:39] AvianFlu: Tiller, are you able to access anything else from the com module? [16:39] Tiller: I'll check, 1s [16:39] pekim has joined the channel [16:40] zivester has joined the channel [16:40] joshkehn has joined the channel [16:40] joshkehn has left the channel [16:40] Tiller: Oh sh*t.. I've access to my common object, but everything is undefiend °.° [16:41] theCole has joined the channel [16:41] Tiller: But if I try a console.log(common.route) in my main.js, it works =/ [16:41] Tiller: And undefined in Player [16:42] MUILTFN has joined the channel [16:43] Tiller: Oh, I think I get it, isn't it because the Player.js file is called when requiring the common.js. So, when I try to access common.js file on Player.js one, it fails because it's not ready yet [16:44] Tiller: What do you think about that? [16:44] TomY has joined the channel [16:46] dimroc has joined the channel [16:46] mandric has joined the channel [16:48] chrislorenz has joined the channel [16:49] joshthecoder has joined the channel [16:50] tyrion-mx: it seems that "node-waf" is not included in the debian package [16:50] tyrion-mx: http://packages.debian.org/sid/amd64/nodejs/filelist [16:50] Tiller: Great, it works. http://pastebin.com/3Jnt6Sns I changed my way to do that. By using exports., I can create common.eventEmitter before the Player one. [16:51] tyrion-mx: someone knows where I can find it? [16:51] tmedema: netlemur: about those times, the docs say "an object containing the number of CPU ticks spent in: user, ...", are these not the times since process startup? I need to get the most recent usage, not usage averaged over the entire process' lifetime [16:51] mandric has joined the channel [16:52] netlemur: tmedema: I don't know. [16:52] netlemur: you could compare them to the stats from /proc/stats [16:52] meandi2 has joined the channel [16:52] matjaz has joined the channel [16:52] sorin has joined the channel [16:53] netlemur: or just display them every second and run some processes (not started by node). if it goes up it should be the normal system value [16:55] tmedema: hmm, not so sure [16:55] tmedema: if the process is new it would still reflect those changes [16:55] tmedema: guess I need to let it run for a while [16:55] _jhs_ has left the channel [16:57] anveo has joined the channel [16:57] alvaro_o has joined the channel [16:58] yorick: tyrion-mx: on ubuntu it's in nodejs-dev I think [16:58] yorick: no idea about debian [16:58] ph^ has joined the channel [17:01] tyrion-mx: yorick, thank you, I tought nodejs-dev was the unstable version of nodejs [17:02] swhit has joined the channel [17:03] mikeal has joined the channel [17:05] tmedema: netlemur: meh, unfortunately your calculations gives an average over the process' entire lifetime (or maybe even system lifetime, not sure) [17:06] netlemur: tmedema: yeah, just got a test running. looks not like what I expected [17:06] rfay has joined the channel [17:06] tmedema: maybe I should poll it and save previous times and cpu data? [17:07] tmedema: not sure how that'd work [17:07] anveo has joined the channel [17:07] meandi has joined the channel [17:08] errordeveloper has joined the channel [17:09] djcoin has joined the channel [17:09] stash1 has joined the channel [17:10] jtrudeau has joined the channel [17:10] jefftrudeau has joined the channel [17:13] cjm has joined the channel [17:14] netlemur: tmedema: sorry. mixed a few things up [17:15] piscisaureus_ has joined the channel [17:16] netlemur: tmedema: If you're on a unix system you could use something like dstat: https://github.com/Amatewasu/cpu-usage.js/blob/master/server.js [17:16] netlemur: then you don't have to calculate all the right values yourself [17:17] normanrichards has joined the channel [17:19] JorgeRuiz has joined the channel [17:19] goldilocks: tmedema: /proc enabled systems have an entry by pid for each process that includes a file "stat", eg, /proc/123/stat, qv. http://linux.die.net/man/5/proc [17:20] goldilocks: tmedema: That contains the info you need to sample over time. [17:21] jchris has joined the channel [17:21] goldilocks: tmedema: this is where stuff like "top" get their data, you would be putting it to slightly different use. [17:22] CStumph__ has joined the channel [17:22] broofa has joined the channel [17:23] alexandere has joined the channel [17:23] jonrohan has joined the channel [17:25] hornairs has joined the channel [17:27] tojochacko has joined the channel [17:29] stash1 has joined the channel [17:29] wookiehangover has joined the channel [17:30] mikeal1 has joined the channel [17:30] neilk_ has joined the channel [17:30] netlemur: tmedema: if you use vmstat you get all the data you need. [17:32] kriszyp has joined the channel [17:34] lepht has joined the channel [17:35] tojochacko has joined the channel [17:35] anoop has joined the channel [17:36] jroes has left the channel [17:37] ryanfitz has joined the channel [17:37] stagas has joined the channel [17:37] JaKWaC has joined the channel [17:37] Aphelion has joined the channel [17:38] tojochacko has joined the channel [17:38] tojochacko has left the channel [17:39] cjm has joined the channel [17:39] JaKWaC has joined the channel [17:39] Tiller: Is it a "good idea" to use EventEmitter most of the time, instead of callbacks ? [17:39] JSManiacs has joined the channel [17:39] tbranyen: Tiller: not really [17:39] tbranyen: Tiller: events can be triggered more than once [17:40] tbranyen: callbacks should really ideally only be triggered once [17:40] Xano has joined the channel [17:40] scott_gonzalez has joined the channel [17:41] Tiller: If my function return "done" or "fail" once, what would you do? [17:41] Tiller: one callback with first arg which is 'done' or 'fail', or an eventemitter? [17:41] Tiller: or two callbacks? [17:42] Tiller: (It's not returning done or fail btw, it's triggering*) [17:42] pgherveou has joined the channel [17:43] joshkehn has joined the channel [17:43] Tiller: tbranyen: http://pastebin.com/PgNgdmkd [17:43] joshkehn has left the channel [17:43] schwab has joined the channel [17:45] Vertice has joined the channel [17:45] decaf has joined the channel [17:46] madsleejensen has joined the channel [17:46] tfcoding has joined the channel [17:47] tbranyen: Tiller: ummm, login('username', 'password', function(err, results) { }); [17:47] dreamdust has joined the channel [17:47] tbranyen: then you trigger that callback instead of emitting [17:47] anoop has joined the channel [17:47] ecin has joined the channel [17:47] Tiller: Huum [17:48] Tiller: I'll look about it, and find the most usefull for my case :] [17:48] Tiller: Thanks, I've to go [17:48] jetienne has joined the channel [17:50] nibblebot has joined the channel [17:51] rickardl has joined the channel [17:51] tmedema: goldilocks: I am aware of /proc/stat, however this doesn't seem efficient [17:51] cha0s has joined the channel [17:51] cha0s has joined the channel [17:51] tmedema: netlemur: I would prefer to not use some third party utility like dstat (is also not installed by default on eg. ubuntu [17:52] goldilocks: tmedema: if you have another source of such information, then we could consider their relative efficiencies. Since there is, not we can't. Any app you find which provides this uses the kernel output in proc. [17:53] kadiks has joined the channel [17:53] rickardl: Anyone know of a good article / book describing guidelines and rules for RESTful implementations, kind of like Twitters API, although I understand they break alot of rules themselves too [17:54] goldilocks: tmedema: you could probably write your own kernel module to provide it, but I doubt that is going to be more efficient that what the kernel already does, and it is a lot of work to re-invent a wheel. [17:55] locksfree has joined the channel [17:55] mikeal has joined the channel [17:55] dnjaramba has joined the channel [17:56] deadman87 has joined the channel [17:58] robotmay has joined the channel [17:59] Cromulent has joined the channel [18:00] mwhooker has joined the channel [18:00] dreamdust: @rickardl: You could start here http://microformats.org/wiki/rest/urls [18:01] dreamdust: Or more involving: http://tomayko.com/writings/rest-to-my-wife [18:02] rickardl: dreamdust: Super awesome, really nice articles! :) [18:03] `3rdEden has joined the channel [18:04] tmedema: goldilocks: netlemur : I think I've figured it out actually, using just node.js: https://gist.github.com/1224187 comments? [18:04] diamonddog has joined the channel [18:06] goldilocks: tmedema: I haven't use the node os API but isn't that going to just give you a system load average? I thot you wanted specs for a single process. [18:07] tmedema: goldilocks: no not for a single process, I need it for the entire system [18:07] mynyml has joined the channel [18:07] tmedema: goldilocks: I'm working on a system resource based task schulder: https://github.com/tommedema/node-tasker [18:08] netlemur: tmedema: don't you have to set prevTimes to the current times again after you run getCpuTimes() from the interval? [18:08] tmedema: netlemur: yes, sorry about that, I updated that 5 secs after I posted the link [18:08] goldilocks: tmedema: ah. Well that's the most portable and internal to node way I guess. Nice of them to provide that. [18:08] tmedema: try to hit F5 [18:08] netlemur: tmedema: ah ok. looking good then :-) [18:09] esmevane has joined the channel [18:09] ryanmcgrath has joined the channel [18:09] _jhs has joined the channel [18:09] netlemur: tmedema: should be pretty much the same (considering that os.cpus gets the /proc/stat values) as the unix tools [18:09] chrislorenz has joined the channel [18:10] tmedema: netlemur: ah well at least this should work on windows to [18:10] tmedema: too* [18:11] sylvinus has joined the channel [18:11] losing has joined the channel [18:11] netlemur: if os.cpus works for windows the same way. yes. I don't have a windows machine here :-) [18:12] tmedema: Maybe it doesn't yet, but it should in the future [18:12] tmedema: consider it only uses the node API [18:12] tmedema: I cannot run windows either :p [18:12] tmedema: considering* [18:13] hermanjunge has joined the channel [18:16] tmedema: netlemur: I just got a result of 253.44827586206895 [18:17] tmedema: looks like there is some kind of flaw in my logic [18:17] netlemur: tmedema: how many cores do you have? [18:17] tmedema: netlemur: two [18:17] netlemur: tmedema: ok, than it's weird :-) [18:17] tmedema: well it should never go above 100 [18:17] nerdy_ has joined the channel [18:17] tmedema: even with 8 cores [18:18] pizthewiz_ has joined the channel [18:20] Aphelion has joined the channel [18:20] stagas has joined the channel [18:21] netlemur: tmedema: i think it's 100% for each core [18:21] netlemur: do you have two cores with hyperthreading? [18:21] tmedema: netlemur: might be yes, but I am dividing by the amount of cores [18:22] netlemur: tmedema: you're deviding all values, so the percentage stays the same [18:22] eddict_: hm i have trouble finding a irc library that supports ssl .. maybe i should just use stunnel [18:22] netlemur: s/deviding/divding ... it's getting late [18:23] tmedema: netlemur: why? I am only dividing in the getCpuTimes [18:24] AvianFlu: eddict_ node-irc supports TLS, you just have to set secure: true [18:24] AvianFlu: and use a proper destination port [18:25] AvianFlu: http://github.com/martynsmith/node-irc [18:25] eddict_: AvianFlu: ah thank you [18:25] eddict_: guess i just suck at github ;) [18:25] AvianFlu: that lib is the best node irc lib, pretty much [18:26] AvianFlu: it's boss [18:26] AvianFlu: `npm install irc` etc. [18:26] eddict_: done :) [18:26] nerdy_ has joined the channel [18:27] Fabryz has joined the channel [18:27] netlemur: tmedema: https://gist.github.com/1224203 [18:29] Aphelion has joined the channel [18:30] ecin_ has joined the channel [18:31] decaf has left the channel [18:31] tmedema: netlemur: hmm, I'm not sure why that'd result in different statistics :) let me try it out though, thanks [18:31] brianseeders has joined the channel [18:32] cjm has joined the channel [18:33] hermanjunge has joined the channel [18:33] netlemur: tmedema: oh wait. i think it's still wrong [18:34] hij1nx_ has joined the channel [18:35] netlemur: tmedema: I think it should be "(user + sys + nice) / (idle + user + sys + nice) * 100 / times.cores" [18:35] tmedema: netlemur: actually, since every core also adds more idletime, do we have to divide by the amount of cores at all? [18:35] jmoyers has joined the channel [18:35] Xano has joined the channel [18:35] tmedema: huh? that seems illogical [18:35] HoLyVieR has joined the channel [18:36] HoLyVieR: hi, anyone can help me install npm ? [18:36] tmedema: oh, actually you may be right.. though I am still not sure about the divide by the amount of cores [18:36] tmedema: I believe there is no need to divide by the amount of cores [18:37] HoLyVieR: I got it installed without error, but I can't require any module I have installed. [18:38] tojochacko has joined the channel [18:38] else has joined the channel [18:39] kriszyp has joined the channel [18:39] netlemur: tmedema: yeah I think you're right [18:39] hermanju_ has joined the channel [18:39] tmedema: netlemur: so this should do the trick, https://gist.github.com/1224215 [18:39] bnoordhuis has joined the channel [18:40] DrMcKay has joined the channel [18:40] cody--1 has joined the channel [18:40] netlemur: tmedema: yes, figured out the same. so far it's working as expected [18:41] tmedema: aye, so far :) [18:41] netlemur: tmedema: it differs a bit from my top output. but that might be the different update intervals [18:42] tmedema: netlemur: does your top output give the average of the cores? [18:42] tmedema: but yeah, might be the intervals [18:43] tmedema: mine is very variable, not sure if that is normal [18:43] tmedema: eg. it can hop from 6 to 40 and back to 10 [18:43] cody--1: can anyone explain why I cant add to "initClientList" in this code: http://pastebin.com/KBvya2mP [18:44] netlemur: if you look at tops "idle" and calculate 100-"idle%" you should get the same values as in node [18:44] sneakyness has joined the channel [18:44] tmedema: aye [18:44] neilk_ has joined the channel [18:44] tmedema: shame node doesn't give an idle% [18:45] neilk_ has joined the channel [18:45] nforgerit has joined the channel [18:45] mendel_ has joined the channel [18:45] schwab has joined the channel [18:45] mikeal has joined the channel [18:47] netlemur: tmedema: I got pretty big jumps (>20%) as well. but I think that's just my machine. maybe you can try it on a server without load? [18:47] nerdfiles has joined the channel [18:47] piscisaureus_ has joined the channel [18:48] dimroc has joined the channel [18:48] tmedema: netlemur: yes, but my system monitor is showing those jumps as well - I'm pretty sure we finally got it right now [18:50] tmedema: although I'm not sure whether I should include the "irq" times field [18:51] netlemur: tmedema: I'm not sure how i would set a meaningfull threshold for irqs [18:51] nerdfiles has left the channel [18:51] patcito has joined the channel [18:51] nerdfiles has joined the channel [18:52] tmedema: netlemur: well isn't that simply part of the usage as well? [18:52] tmedema: just like nice and user [18:52] nerdfiles has left the channel [18:52] pandeiro has joined the channel [18:52] joshkehn has joined the channel [18:55] jacobolus has joined the channel [18:56] jacobolus has joined the channel [18:56] netlemur: tmedema: i don't think irqs are relevant for the real %cpu [18:59] tmedema: alright [19:00] tmedema: netlemur: I have a feeling that the nice level is not actually a time, but simply the niceness of the process [19:00] tmedema: thus it has nothing to do with cpu usage [19:01] ecin has joined the channel [19:01] artnez has joined the channel [19:01] netlemur: tmedema: of what process? aren't we measuring all processes? [19:01] artnez has left the channel [19:01] tmedema: netlemur: yes, hmm, weird. [19:01] tmedema: I don't see how niceness makes sense here [19:02] ph^ has joined the channel [19:03] levi has joined the channel [19:05] xules has joined the channel [19:06] mikeal has joined the channel [19:06] stagas has joined the channel [19:06] hij1nx has joined the channel [19:06] andrewfff has joined the channel [19:06] netlemur: tmedema: "nice: niced processes executing in user mode" -> http://www.linuxhowtos.org/System/procstat.htm (not sure how reliable this is) [19:07] tmedema: netlemur: ah great, in that case it is related.. thanks again [19:07] goldilocks: netlemur: tmedema: I believe nice is included in user. [19:07] malkomalko has joined the channel [19:07] jtsnow has joined the channel [19:08] tmedema: goldilocks: it is? so by adding nice I'd duplicate it.. hmm, are you sure? [19:08] xules has joined the channel [19:10] robotmay has joined the channel [19:10] mike5w3c has joined the channel [19:11] coreb has joined the channel [19:11] goldilocks: tmedema: well, in my man proc it says WRT stat "[time spent] in user mode, user mode with low priority (nice), system mode, and the idle task, respectively", which implies that to me. [19:11] xerox: anybody knows if it is possible to search inside a "kue" programmatically? [19:11] joshkehn: “kue” ? [19:12] joshkehn: Do you mean queue? [19:12] xerox: https://github.com/learnboost/kue [19:12] xerox: it is a priority queue yes [19:13] netlemur: /proc/stat : kernel/system statistics. Varies with architecture. [19:13] xerox: the examples there show how to search for a job by id: Job.get(id, function(err, job){ ... [19:13] xerox: but I need to search for a job by its data [19:14] netlemur: goldilocks, tmedema: I'll have look at the source code. I can't find any documentation that pleases me :) [19:15] tmedema: excellent ;) [19:15] skiz has joined the channel [19:16] Peniar has joined the channel [19:16] goldilocks: netlemur: tmedema: I'm pretty sure about this. The man vmstat also says "user time, including nice time", and I notice a few other things via google use that stat. It makes more sense for the kernel to report user including nice since that saves a calculation -- no one is going to need "user not nice" time, ie, subtracting. [19:16] orospakr: could path.join ever hang or wait somehow? I know this question seems crazy, but something completely insane is happening to my code right now. [19:16] goldilocks: netlemur: the source you'll have to browse is the kernel source :O [19:17] orospakr: actually, it seems like it might be blocking, but a timer callback is still firing, so the event loop isn't entirely blocked...? yeah, I don't understand it either. [19:17] ryanfitz has joined the channel [19:18] Tiller: Just a quick question, does EventEmitter has a method that looks like : "Ok guy, I want you to listen on the event "thing", and if you get it OR IF YOU ALREADY GOT IT, then you call this function" ? [19:19] Tiller: anot priori [19:19] mendel_ has joined the channel [19:19] Tiller: not a priori* [19:19] matjaz has joined the channel [19:20] stagas has joined the channel [19:21] chrisbuchholz has joined the channel [19:21] sylvinus has left the channel [19:21] sylvinus has joined the channel [19:22] luke`_ has joined the channel [19:24] darshanshankar has joined the channel [19:24] netlemur: tmedema, goldilocks do you guys know C? https://github.com/torvalds/linux/blob/master/fs/proc/stat.c [19:26] langworthy has joined the channel [19:27] jorenl_ has joined the channel [19:28] DrMcKay: I'm having a slight mindfuck now. how did he implement `for_each_possible_cpu`? it's some macro? [19:29] jorenl_: Hi folks! Are there restrictions for what objects I can emit() with socket.io? [19:29] tmedema: netlemur: afraid not, looks like he uses "kstat" though [19:29] goldilocks: netlemur: yeah, but that will lead you on an #include chase. Notice most of that is more stuff defined elsewhere. The easiest way to do this is to create a process that just hogs as much processor as it can ("while(1);"), nice it a positive value, then check proc. If user does not reflect the crazy process, then nice is not part of it. But I'd bet money that it does, because so many things use that stat and they are jus [19:29] goldilocks: t pulling it from proc. Eg, "time" does not make up its own "user" value, and "user+sys" is considered 100% of everything. [19:30] DrMcKay: ah, sneaky Linus. [19:30] `3rdEden: jorenl_ it needs to be parsible JSON [19:30] netlemur: goldilocks: makes sense [19:30] torsd has joined the channel [19:30] sampotasz has joined the channel [19:30] netlemur: I just leave it at that. Damn I need sleep [19:31] tmedema: netlemur: thanks for looking into it, and enjoy your sleep [19:31] netlemur: ... give me mate one more time.. *sing* [19:32] jorenl_: `3rdEden: hmm. It should be perfectly parsable. What would happen if, for some reason, I try to emit something that can't be json parsed? [19:32] `3rdEden: jorenl_ JSON.stringify will probably strip it out [19:33] jorenl_: Mine just seems to ignore any .emit() later on. Ok I'll try JSON.stringify [19:33] patcito_ has joined the channel [19:36] mynameisbender has joined the channel [19:37] stagas has joined the channel [19:37] towski has joined the channel [19:38] jorenl_: `3rdEden: JSON.stringify(objectToBeEmitted) works perfectly fine. Should it trow an error if that would be the problem for the emit()? [19:38] pquerna: mikeal: well, dealing with it from python today [19:38] `3rdEden: I don't think so [19:39] Aphelion has joined the channel [19:39] mikeal: ahhhh [19:39] pquerna: mikeal: but wouldn't matter, its just a shit api by $dayjob [19:39] mikeal: yeah, i fixed some bugs in httplib2 that never got merged because they are fuckin lazy [19:39] pquerna: thing like they don't give you all the data you need to build urls for _some_ things, so for a certain class of data, you end up... string replacing the URLs from other types... [19:39] mikeal: their pooling isn't actually thread safe [19:40] pquerna: heh [19:40] ghost has joined the channel [19:40] pquerna: we just have a bunch of utils built on top of httplib itself [19:40] mikeal: i also have a rediculous amount sitting around to stream with it [19:40] pquerna: (libcloud) [19:41] simenbrekken: Hmms, in my production environment my server running SSL doesn't come up after I restart it, can ports linger after I quit the process? [19:41] mikeal: https://github.com/mikeal/windmill/blob/master/windmill/server/proxy.py#L41 [19:41] mikeal: and [19:41] errordeveloper has joined the channel [19:42] simenbrekken: The port in question is 3001 and I'm prerouting it with iptables (that might have something to do with it?=) [19:43] mikeal: https://github.com/mikeal/windmill/blob/master/windmill/server/proxy.py#L58 [19:43] mikeal: that's how retarded streaming is in Python :) [19:44] jorenl_: hmm :/ when trying to emit an object {"songs":{},"playing":0}, the console lists it's 'writing' that but afterwards none of the .emit()'s appear to be doing anything [19:46] tmedema: netlemur: goldilocks : I did that test and it is evident that user does _not_ include processing time of niced processes. So I do need to include nice. [19:47] netlemur: tmedema: goldilocks: now I'm confused :-) [19:48] tilgovi has joined the channel [19:48] tilgovi has joined the channel [19:48] tmedema: netlemur: well why are you confused? it appears that the docs aren't correct, and user is in fact all user processes minus the processes that have a niceness different than 0 [19:48] pquerna: mikeal: https://github.com/apache/libcloud/blob/trunk/libcloud/utils.py#L25 [19:48] tmedema: so to get the actual ticks by all user processes one has to do user + nice [19:48] simenbrekken: any suitable alternatives to forever? [19:49] mikeal: pquerna: looking at shit like this makes me really angry at the idea of putting generators in javascript :) [19:49] jetienne has joined the channel [19:49] pquerna: this one is Kami_'s fault :) [19:49] TheJH has joined the channel [19:49] TheJH has joined the channel [19:50] tmedema: simenbrekken: upstart? [19:50] mikeal: people talk about them being so awesome in Python [19:50] mikeal: they arent'! [19:50] chapel: mikeal: what would a generator offer? [19:50] mikeal: that's a great question :) [19:50] mikeal: basically, sugar [19:50] mikeal: and obfuscation [19:51] chapel: idk, there was a time I might like more sugar in my javascript [19:51] chapel: but having used it purely for so long, I like it the way it is [19:51] tbranyen: i take my javascript black like my coffee [19:51] tbranyen: and my heart [19:52] chapel: though I don't do anything too advanced, so I am not a great judge of its faults [19:52] cha0s has joined the channel [19:52] cha0s has joined the channel [19:54] socketio\test\59 has joined the channel [19:54] bronson: ACTION likes his coffe the way he likes his javascript: full of spaghetti [19:54] chapel: lol [19:54] smathy has joined the channel [19:55] else has joined the channel [19:56] navaru has joined the channel [19:56] navaru has left the channel [19:57] Tiller: Could someone confirm me an important thing : If I create an http Server, with a session system, and if for each request, I put a global (I know that's bad) variable with session's variables of the current request. I can't be an another request occuring while the first one is working ? [19:57] dimroc: anyone use jasmine-node and know how to run it with the debugger running [19:57] bronson: Tiller, right [19:58] Tiller: ok thanks. [19:58] bronson: but that sounds like a bad idea... if anyone else has to maintain that code, they might come looking for you. [19:58] Tiller: Yes but, I can't see how else I can do that =/ [19:58] bronson: Tiller, and, obviously, once you make an async callback, the global may or may not change. So it doesn't sound real useful anyway. [19:59] Tiller: How can I use the sessions variables "everywhere" in my code, without always passing the request variable =/ [20:00] netlemur: is there a pretty way to handle forms with express&jade? [20:00] bronson: Tiller, no clean alternative to passing it afaik. What are you trying to do. [20:01] simenbrekken has joined the channel [20:01] bronson: s/.$/?/ [20:01] joshkehn has joined the channel [20:01] bronson: er s/\.$/?/ :) [20:01] hij1nx has joined the channel [20:01] joshkehn has left the channel [20:01] else has joined the channel [20:01] rootslab has joined the channel [20:01] sampotasz has left the channel [20:01] zcopley has joined the channel [20:01] Tiller: (Oh, that remind me my linux courses..) [20:02] Tiller: Well, explain it quickly, I'm making a game [20:02] Tiller: A "MMO"RPG [20:02] Tiller: Then, my nodejs script is divided in two : A part server, and a client interface [20:02] djbell has joined the channel [20:03] jetienne: node rocks and webgl too [20:03] austinbv has joined the channel [20:03] Tiller: But in the client interface, I use many "classes", function, files, etc. And then, I often need to use the player's variable. So I need the player's id [20:03] TheJH: Tiller, you can also use closures in some cases [20:04] Tiller: And I need a way to get this damn id every where during the transaction [20:05] Lemon|mbp has joined the channel [20:05] Tiller: Something like "$_SESSION['id']" in PHP. But I know the architecture is completly different in NodeJS [20:05] rootslab has joined the channel [20:06] localhost has joined the channel [20:06] jtsnow has joined the channel [20:06] Tiller: Well, I'll try somes things and see if I can do without it [20:07] TheJH: Tiller, as long as you only do sync stuff, you could probably do it with the caller chain [20:08] Tiller: That's the funny part, I think i've some async stuff [20:08] Tiller: But I'll check again all my code :] [20:08] kriszyp has joined the channel [20:11] isaacs has joined the channel [20:11] TheJH: Tiller, for sync stuff, this should work: https://gist.github.com/1224314 [20:11] tfcoding has joined the channel [20:11] SamWhited has joined the channel [20:11] TheJH: Tiller, but it'll break if you use recursion [20:13] Tiller: Didn't you forget a ";" at the end of the while? :] [20:14] Remoun has joined the channel [20:14] cha0s has joined the channel [20:14] cha0s has joined the channel [20:14] TheJH: Tiller, meh, right [20:17] schwab has joined the channel [20:17] AaronMT has joined the channel [20:17] TheJH: Tiller, idea: set a global when your handler function gets called, clear it when it's over. Wrap all callbacks with a function that re-activates that global when the callback gets called and clears it again when the callback is over [20:17] Frippe has joined the channel [20:17] TheJH: that should be easy to put into a nice library... [20:18] TheJH: and it'd be cool [20:18] skm has joined the channel [20:18] Tiller: Yes, not a bad idea. A good one in fact [20:18] prf_q has joined the channel [20:19] else has joined the channel [20:19] prf_q: hi guys I'm trying to install node.js. Apparently make was successfull but in "make tests" I get 12 errors out of 250. [20:19] TheJH: ACTION puts it on the todo list [20:19] Tiller: But by looking at my code, an another problem came to me :( [20:19] prf_q: and because of an error I couldn't install npm [20:20] prf_q: node(36893,0x7fff78d48960) malloc: *** error for object 0x7fcf8b80b600: pointer being freed was not allocated [20:20] prf_q: *** set a breakpoint in malloc_error_break to debug [20:20] prf_q: this is the error. [20:20] Tiller: I'm also using socket.io. How to make the relation between the socket.io connection, and the session =/ [20:20] isaacs: prf_q: that's a node bug. do you get this with the 0.5.7 release? [20:20] cjm has joined the channel [20:20] netlemur: Tiller: wait a sec. got a link for you (if I can find it) :-) [20:20] prf_q: I just git cloned master [20:21] thalll has joined the channel [20:21] prf_q: isaacs: ^ [20:21] isaacs: prf_q: what's `node -v`? [20:21] tauren has joined the channel [20:21] prf_q: prf_q: where did you see -v ? [20:21] prf_q: isaacs: ^ oh sorry. [20:21] isaacs: prf_q: run that, what's it output? [20:21] prf_q: v0.5.8-pre [20:21] TheJH: prf_q, you shouldn't use master, use some git tag [20:22] prf_q: oh okay [20:22] coreb1 has joined the channel [20:22] isaacs: prf_q: yeah, i mean, report this as a bug, but then use 0.5.7 [20:22] isaacs: prf_q: unstable 0.5 family is unstable [20:22] TheJH: prf_q, 0.4.x for stable, 0.5.x for unstable (which is relatively stable, too) [20:22] prf_q: TheJH: okay I'm getting 4.12 now thanks [20:22] isaacs: yeah, but 0.4.x is getting increasingly outdated [20:22] zivester_ has joined the channel [20:22] TheJH: isaacs, true [20:22] netlemur: Tiller: are you using express? [20:23] isaacs: when you keep the api stable, there's a lot of bugs you can't fix [20:23] Tiller: No I don't =o [20:23] netlemur: damn :-) [20:23] netlemur: regardless here's the link. perhaps it helps anyways: http://www.danielbaulig.de/socket-ioexpress/ [20:24] Tiller: I'll look, thanks :) [20:24] netlemur: i guess express is just using the standard connect stuff. It should roughly be the same [20:24] Tiller: This website is laggy =o [20:25] netlemur: works fine for me [20:28] yept has joined the channel [20:28] raidfive has joined the channel [20:30] NimbyDagda has joined the channel [20:31] alnewkirk has joined the channel [20:31] Tiller: netlemur: Great! That's excatly what I need I think <3 [20:32] netlemur: Tiller: yay :) [20:35] Aphelion has joined the channel [20:37] blueadept` has joined the channel [20:38] piscisaureus_ has joined the channel [20:40] socketio\test\97 has joined the channel [20:43] prf_q: I downloaded stable and tests were successful but npm installation still fails due to memory allocation error. [20:45] dguttman has joined the channel [20:45] hermanju_: This is weird. I'm getting a trailing #_=_ in my url after a res.redirect [20:46] hermanju_: and google can't help in this one [20:47] garrensmith has joined the channel [20:49] apoc has joined the channel [20:50] r04r has joined the channel [20:51] criswell has joined the channel [20:51] TheJH: Tiller, just wrote this, how does it look? https://github.com/thejh/node-context/blob/master/test.js [20:51] TheJH: context without passing stuff down the caller chain, you just have to put a wraper around callbacks [20:52] teknopaul: Any one else got problems compiling node /usr/bin/ld: cannot find -luv [20:52] aho has joined the channel [20:52] TheJH: user.wrap(callback) [20:52] TheJH: and getting the value: user.value [20:52] Tiller: yes I've understand [20:52] DrMcKay: TheJH: similar to what we need for Relief1 [20:52] Tiller: It looks nice :] [20:53] enosis has joined the channel [20:53] TheJH: DrMcKay, mmh, yes, could be useful for that, too [20:53] sampotasz has joined the channel [20:54] Tiller: netlemur: Perfect, I've succesfully adapted it for sesh (the session system that I use) [20:54] bergie has joined the channel [20:55] netlemur: Tiller: great. glad I could help [20:56] Ned_ has joined the channel [20:56] fson has joined the channel [20:57] deadman87 has joined the channel [20:58] yept has joined the channel [20:59] knifed has joined the channel [21:01] quackquack has joined the channel [21:01] admc has joined the channel [21:02] Tiller: TheJH: Why don't you put any ";" on your code ? [21:02] Tiller: It's uggly without it :( [21:02] TheJH: Tiller, semicolons make it look ugly, just like superfluous curlies :D [21:02] Tiller: Arf, I think that we don't share the same point of view =D [21:03] tbranyen: define: opinion [21:03] TheJH: Tiller, have a look at the npm source: https://github.com/isaacs/npm/tree/master/lib [21:03] Tiller: Pretty ugly again :] [21:03] TheJH: tbranyen, nooo, not opinion! semicolons are evil! :D [21:03] tbranyen: TheJH: and required sometimes, so might as well always use them [21:04] tbranyen: i prefer consistency imo [21:04] TheJH: tbranyen, nearly never [21:04] tbranyen: correct, but still sometimes ASI needs you to be specific [21:04] tbranyen: :) [21:04] tbranyen: i like iniminos post on it [21:05] TheJH: I like isaacs post on it :D [21:05] tbranyen: mortal kombat! [21:06] quackquack: Can superagent be used for cross-domain requests? i keep getting `res` back as `null` [21:06] quackquack has left the channel [21:06] quackquack has joined the channel [21:07] ttpva has joined the channel [21:08] quackquack: Is superagent for use on the server or client? [21:08] teknopaul: Any one any good with make? I cant run make -f Makefile.cmake doc I get cannot find -luv I think its trying to link to a shared object for uv but the build creates ./deps/uv/uv.a [21:13] cjm has joined the channel [21:16] navaru has joined the channel [21:16] navaru has left the channel [21:19] joe-f2 has joined the channel [21:20] Marak: is anyone using https://github.com/mscdex/node-ncurses ? [21:20] Marak: im really tired of my console being lame, but ncurses seems clunky [21:20] DrMcKay: Marak: use SubStack's colors [21:21] DrMcKay: or whatever it was called... [21:21] TheJH: DrMcKay, I think marak built his own thing like that, colors.js or so [21:21] TheJH: !npm owner colors.js [21:21] jhbot: error [21:21] TheJH: !npm owner colors [21:21] jhbot: owners: marak [21:21] Ned_ has joined the channel [21:21] TheJH: DrMcKay, ^ [21:21] Marak: https://github.com/substack/node-charm [21:22] Marak: you mean that one? [21:22] Tiller: !,pm owner sesh [21:23] Tiller: !npm owner sesh [21:23] jhbot: owners: marak , dtrejo [21:23] chapel: yeah, that was what I was referring to Marak [21:23] chapel: !npm search sesh [21:23] jhbot: package sesh: super simple session middleware for node.js, even has optional 'magic' sessions which monkey patch the httpServer with one line! [21:23] Tiller: Marak: About sesh, a cool things what you could implement in core.js, is to load a session from an id [21:24] Marak: i forgot i had that package [21:24] Tiller: Because using socket.io, we can get the SID cookie, and then it would be great to get the sessions with doing require('sesh/session').sessionRoot[sid] [21:25] Marak: Tiller: im pretty sure we are going to combine all of our packages together into something soon... [21:25] Marak: :-D [21:25] Tiller: k k [21:27] ryan0x2 has joined the channel [21:27] jslatts has joined the channel [21:29] davidwalsh has joined the channel [21:29] DrMcKay: gah, all those packages [21:29] Cromulent has joined the channel [21:29] DrMcKay: Marak: yes, it was charm. iirc, it doesn't do colors only [21:30] TheFuzzball has joined the channel [21:31] talltyler has joined the channel [21:32] DrMcKay has joined the channel [21:34] talltyler has joined the channel [21:35] Ned_ has joined the channel [21:37] talltyler: Quick question, can I request the headers of a remote file but not load the data, if not maybe start the loading and kill the request? [21:37] talltyler: I have tried to use responce.pause() but this isn't really what I am looking for [21:38] talltyler: what is the best way to really only get the headers [21:38] freewil: talltyler, there is the http method HEAD for this [21:38] cha0s has joined the channel [21:38] cha0s has joined the channel [21:40] joshkehn has joined the channel [21:41] mrchess has joined the channel [21:41] metaverse has joined the channel [21:41] openpercept has joined the channel [21:42] talltyler: I'm not seeing this method, I see getHeader() on ServerResponse and a headers property on ClientResponse but no HEAD method? [21:42] joshkehn has left the channel [21:45] freewil: http://nodejs.org/docs/v0.4.12/api/http.html#http.request [21:45] freewil: i dont know why HEAD isnt listed there [21:45] freewil: i suspect you can still make the request though [21:46] talltyler: ok, thanks, I'll look into it [21:50] talltyler: I'm not seeing this listed in the source of http.js or the other related files javascript files. [21:50] talltyler: Do you have an example of how this method should work? [21:51] Clex: Do you know a smart way to hash json data? [21:52] Clex: I would want to get the same hash from { "foo": "bar", "baz": [0,1,2] } and { "baz": [0,1,2], "foo": "bar" } for example. [21:53] freewil: talltyler, https://github.com/freewil/btc-ex-api/blob/master/lib/Exchange.js#L182 [21:54] jmoyers has joined the channel [21:54] rednul has joined the channel [21:55] TheFuzzball has joined the channel [21:57] pgherveo_ has joined the channel [21:58] jorenl_ has left the channel [21:59] hakaselab has joined the channel [22:01] ryanj has joined the channel [22:02] JaKWaC has joined the channel [22:02] ossareh: Clex: I've seen a couple of auth implementations that have k:v data that has to be hashed - normally you read the properties in alphabetical order and hash then hash(k + v), where in the case of v not being a primitive you flatten it. [22:02] parshap has joined the channel [22:02] ossareh: s/and hash then/and/ [22:03] ossareh: like this http://oauth.net/core/1.0/#signing_process [22:04] kuebk has joined the channel [22:04] Clex: I saw stuff like that already. [22:04] Clex: But json is a little bit more complicated than simple keys/vals. [22:04] TheJH: Clex, something like `objstr = Object.keys(obj).sort().map(function(key){return JSON.stringify(key)+':'+serialize(obj[key])}).join(',')` [22:05] sneakyness has joined the channel [22:05] TheJH: Clex, that `serialize` function should have this in its branch for objects, similar stuff for arrays and very simple stuff for primitives [22:06] Dulak has joined the channel [22:07] Clex: Thanks. [22:07] TheJH: `global` is shared between all modules by default, right? Dulak has a weird issue with it... [22:07] Clex: But yes, the main part of the job is thie serialize() function. :p [22:07] Clex: *this [22:07] TheJH: Clex, not hard :D [22:07] Dulak: global is local to the module, not truly global [22:07] TheJH: Clex, I think I already gave you the most complicated part :D [22:08] Dulak: And even doing the anon wrap trick to get the 'real' global, it's not global, because assigning to it in a module is local to the module [22:09] madsleejensen has joined the channel [22:09] Dulak: I'm just gonna have to put up with the ridiculous long require line, or monkey patch. [22:09] TheJH: Dulak, could you gist both files? [22:10] devongovett has joined the channel [22:10] Dulak: TheJH: I will abstract something in a few, I can't give out my code but I can output a trivial example to show my problem [22:10] AAA_awright has joined the channel [22:11] TheJH: Dulak, https://gist.github.com/e32f4b1b2657392ceb93 [22:13] Dulak: Yes bare javascript is fine, but coffee wraps everything in anon functions, and it's doing something goofy to the global object. That's why monkey-patching would even work. [22:14] chapel: Dulak: coffeescript doesn't let you do 'globals' [22:14] chapel: it also probably doesn't know about global, and does var global at the top [22:14] chapel: effectively rewriting the node global [22:14] chrisdickinson: i don't think it does that. [22:14] prf_q: hi. I downloaded node.js stable and tests were successful but npm installation still fails due to memory allocation error: node(40922,0x7fff78d48960) malloc: *** error for object 0x7feadd024000: pointer being freed was not allocated : *** set a breakpoint in malloc_error_break to debug [22:14] prf_q: do you have an idea? [22:15] chrisdickinson: i seem to remember running into a problem where the require hook for coffeescript was doing a vm.runInNewContext instead of vm.runInThisContext. [22:15] TheJH: chapel, no [22:15] Dulak: Yes, but if you return this from a anon wrapper it gives you the 'real' node global, but assigning to it stays local to the module still. [22:15] TheJH: !@chapel coffee compile global.foo = 1 [22:15] jhbot: chapel, global.foo = 1; [22:15] chrisdickinson: which means the global is different from the requiring script's global. [22:15] chrisdickinson: also, all of the globals (like String, etc) are different objects than the requiring script's String, etc. [22:16] chapel: TheJH: probably, I wasn't sure [22:16] chapel: by default all variables are declared at the top of the compiled file [22:17] TheJH: chapel, only if you assign to them directly [22:17] TheJH: chapel, I think a=1 will declare a var, but a.b=1 won't [22:17] chapel: try it [22:17] chapel: just curious [22:17] TheJH: !coffee compile a=1 [22:17] jhbot: var a; a = 1; [22:17] TheJH: !coffee compile a.b=1 [22:17] jhbot: a.b = 1; [22:17] sylvinus has joined the channel [22:17] TheJH: !coffee compile a() [22:17] jhbot: a(); [22:17] chapel: interesting [22:18] chapel: honestly I didn't know, its been a while since Ive used cs [22:19] Dulak: Yeah I think that is to avoid recursive problems. [22:20] Dulak: it's just frustrating that I only need the equiv to python's 'from module import *' [22:20] Raynos: What do people think of lacewing? - https://github.com/udp/lacewing [22:21] Tiller: Hey, in Nodecamp 2010, when Guillermo's talking about expresso, he types in console : express . [22:21] Tiller: And it creates the basic architecture of the application [22:21] Tiller: How can we get the express binary? [22:21] Raynos: npm install express -g [22:21] Raynos: should get you the binary in place [22:21] Tiller: Thanks, I'll try [22:22] Tiller: Great! Thanks Raynos [22:23] noolness has joined the channel [22:24] ryanfitz has joined the channel [22:24] sridatta has joined the channel [22:26] igl has joined the channel [22:26] none has joined the channel [22:27] denom has joined the channel [22:27] thalll has joined the channel [22:29] sridatta: is there a good blogging engine that works with express.js? [22:29] Nathan_ has joined the channel [22:29] TooTallNate has joined the channel [22:29] robotmay has joined the channel [22:30] mwhooker has joined the channel [22:31] randylien has joined the channel [22:32] langworthy has joined the channel [22:35] robotmay has joined the channel [22:36] towski has joined the channel [22:38] noolness: is there any project underway to create a separate version of node.js for creating scripted desktop applications? [22:39] noolness: it seems like node.js would be the perfect thing to extend for that kind of use [22:40] aho: well, if you keep the server/client roles, you could do the front-end with appcelerator's titanium or something like that [22:40] noolness: i wouldn't actually require even change the core of node.js in anyway, everything could be implemented as add ons [22:41] jakehow has joined the channel [22:41] noolness: well i am thinking more so like if you want to make a video game with it, that has full access to gamepads, full screen support, openal and so on [22:42] noolness: so for example if you did want to make a standalone game with node.js, you could do it now by writing binary modules for node that implement things like playing back audio, doing hardware accelerated rendering and so on [22:43] sridatta: is there a good blogging engine that works with express.js? [22:43] Country has joined the channel [22:47] tmzt: noolness: or build your game and embed v8 [22:49] binaryjohn has joined the channel [22:52] noolness: yes you could do that, and i have experimented with that a bit [22:52] noolness: but i am just saying that there isn't anything in node.js that is server specific, that's all [22:52] noolness: other than that node.js has networking [22:53] noolness: unless i am missing something [22:53] noolness: that was just one example though. it would be interesting to use node.js for more than that [22:54] pt_tr has joined the channel [22:54] noolness: for example you could use it as a replacement for perl or python for desktop and server scripting (naturally you already can, but you see what i am getting at) [22:55] noolness: or use it to create desktop application that use native gui's in javascript [22:57] TooTallNate: ryah: who do I talk to about joyent hosting support? [22:59] jrbasso has joined the channel [23:00] chapel: konobi [23:00] chapel: I believe [23:00] jrbasso: someone know how to share variables using fugue? [23:00] TooTallNate: konobi: is it true? [23:01] Tiller: Jade with express generate me the html on one line, any idea to break line & indent ? [23:01] TooTallNate: Tiller: why? [23:02] Tobbe__: Tiller: pretty: true [23:02] Tiller: I like having a clear html code [23:02] Tiller: thanks Tobbe__ [23:02] felixhummel has joined the channel [23:02] Tobbe__: res.render('view' {pretty: true}); something like that [23:02] Tiller: Yes, that is ^^ [23:02] jonrohan has joined the channel [23:03] jbpros has joined the channel [23:03] ryanfitz has joined the channel [23:05] tylerstalder has joined the channel [23:10] davidbanham has joined the channel [23:16] pfried has joined the channel [23:17] avih has joined the channel [23:17] mynyml has joined the channel [23:17] dmwuw has joined the channel [23:20] pfried: hi all, i want to connect via TCP to a client and receive the data it sends back. By default it sends "parse error" back if it gets something unknown. I Create the connection by var netio = net.createConnection(2701,"192.168.178.90"); and send some stuff by netio.write("ip") [23:20] pfried: how do i get the results? [23:20] abjorn has joined the channel [23:20] pfried: netio.on('data', function (data) { [23:20] pfried: doesnt work [23:21] pfried: btw netio.on('connect', function() { console.log("bla"); }); works quite well [23:22] _64k has joined the channel [23:24] TooTallNate: bnoordhuis: ping [23:24] bnoordhuis: TooTallNate: pong [23:24] r04r: pfiled try doing ""+data. I had some weirdness with that myself that it was an object and not showing up in console.log [23:24] TooTallNate: hey, i'm trying to cast a Persistent to a void* and back [23:24] TooTallNate: actually, an unsigned char * [23:24] TooTallNate: suggestions? [23:25] bnoordhuis: TooTallNate: new Persistent()? [23:25] pfried: dont think that will work i checked an additional console.log("data received"); wasnt triggered [23:26] TooTallNate: bnoordhuis: what would that do? [23:26] bnoordhuis: TooTallNate: allocate a Persistent on the heap and return the pointer [23:26] bnoordhuis: you can then cast that pointer forth and back [23:26] TooTallNate: is that different than Persistent::New()? [23:26] k1ttty has joined the channel [23:26] bnoordhuis: yes [23:27] TooTallNate: oh ok [23:27] Xano has joined the channel [23:27] TooTallNate: lemme give it a show [23:27] TooTallNate: *shot [23:27] maushu_ has joined the channel [23:27] bnoordhuis: TooTallNate: one more thing, you need to assign a value to the Persistent after new'ing it [23:28] bnoordhuis: otherwise it'll be an empty handle [23:28] sneakyness has joined the channel [23:28] jhurliman has joined the channel [23:29] bnoordhuis: TooTallNate: in a nutshell: void* p = reinterpret_cast(new Persistent(value)); [23:30] visnup: I'm getting some weird instanceof difference in repl and out of repl [23:30] visnup: https://gist.github.com/1224489 [23:30] JerrySpringer has joined the channel [23:30] visnup: inside of repl, it seems to think my date isn't a Date [23:30] JumpMast3r has joined the channel [23:30] visnup: outside of the repl, everything is ok [23:31] TooTallNate: bnoordhuis: and then to cast back: reinterpret_cast>(p)? [23:31] bnoordhuis: TooTallNate: reinterpret_cast*>(p) [23:31] JerrySpringer: When I run "$ cd \cygwin\bin" in cygwin it gives me bash error "no such destination" even though it is clearly there. Any help please? [23:32] bnoordhuis: JerrySpringer: use forward slashes [23:32] JerrySpringer: Same thing :/ [23:32] dmkbot has joined the channel [23:33] bnoordhuis: visnup: look up vm contexts in the docs, your objects run in different ones [23:33] bnoordhuis: JerrySpringer: sorry, no idea [23:34] JerrySpringer: Oh okay thanks anyways :) [23:34] TooTallNate: bnoordhuis: I'm getting: [23:34] TooTallNate: error: no matching function for call to ‘v8::Handle::Handle(v8::Persistent*&)’ [23:34] rmzg: JerrySpringer: can you cd / [23:34] JerrySpringer: rmzg: yes [23:34] rmzg: My cygwin doesn't have a /cygwin.. [23:34] bnoordhuis: TooTallNate: can you gist your code? [23:35] TooTallNate: bnoordhuis: actually, it was cause I was declaring the variable without * [23:35] rmzg: JerrySpringer: What are you trying to access? [23:35] rmzg: And why are you asking here [23:35] JerrySpringer: cygwin/bin folder. [23:35] TooTallNate: bnoordhuis: i think i got it now, thanks! [23:35] bnoordhuis: TooTallNate: my pleasure [23:36] PhilK has joined the channel [23:36] rmzg: JerrySpringer: cd /bin [23:36] lepht has joined the channel [23:36] JerrySpringer: rmzg: wow i feel like the biggest idiot. [23:36] visnup: bnoordhuis: as in Date !== Date? [23:36] rmzg: JerrySpringer: Or actually, cd /usr/bin [23:37] JerrySpringer: rmzg: it's windows, i did that last time too -__- [23:37] JerrySpringer: rmzg: thanks :D [23:37] rmzg: o.O [23:37] bnoordhuis: visnup: yes, core objects (Date, Array, etc.) are distinct from their counterparts in a different context [23:38] TooTallNate: bnoordhuis: actually maybe you could look over this real quick: https://gist.github.com/1224497 [23:38] visnup: bnoordhuis: ...creepy [23:38] TooTallNate: isn't quite working as expected... [23:38] bnoordhuis: visnup: look at lib/util.js for how node deals with this [23:38] walkah has joined the channel [23:38] bnoordhuis: TooTallNate: what is it that isn't working? [23:39] JerrySpringer has joined the channel [23:39] TooTallNate: getObject() returned some garbage [23:39] visnup: bnoordhuis: ah, isDate.. hacky [23:40] tomtomaso has joined the channel [23:40] TooTallNate: visnup: i fixed that recently [23:40] visnup: bnoordhuis: thanks! [23:40] visnup: TooTallNate: fixed = ? [23:40] Wa has joined the channel [23:40] bnoordhuis: TooTallNate: nothing obviously wrong but this looks tricky: *((unsigned char **)ptr) = ... [23:41] TooTallNate: how would you do it? [23:41] bnoordhuis: visnup: he wrote the patch for it :) [23:41] lepht has joined the channel [23:41] TooTallNate: in node 0.5.7 the Date check is fixed visnup [23:41] bnoordhuis: TooTallNate: depends on what GetPointer() returns [23:42] TooTallNate: bnoordhuis: unsigned char * [23:42] nforgerit has joined the channel [23:42] bnoordhuis: i'd probably make that a pointer to a struct with a Persistent field [23:42] TooTallNate: bnoordhuis: here's for full file, for context: https://github.com/rbranson/node-ffi/blob/master/src/pointer.cc [23:43] bnoordhuis: TooTallNate: there's at least one thing obviously wrong there [23:43] bnoordhuis: Pointer::~Pointer() calls free on the pointer, don't do that for objects created with new [23:43] bnoordhuis: free doesn't run the destructor [23:44] madsleejensen1 has joined the channel [23:44] TooTallNate: good point, this module wasn't originally written for C++ objectrs [23:44] TooTallNate: *objects [23:44] bnoordhuis: another thing: self->GetPointer() returns what m_ptr points to [23:45] bnoordhuis: unless you've initialized it, it's either NULL or a stray pointer [23:45] binaryjohn has joined the channel [23:45] TooTallNate: it's always initalized afaik [23:45] bnoordhuis: yes, but pointing to what? [23:45] TooTallNate: some malloced data, or a pointer returned from a function call [23:46] TooTallNate: this Pointer object is kind of like a Buffer [23:46] pfried has left the channel [23:46] TooTallNate: I almost want to make them one [23:46] TooTallNate: somehow... [23:46] bnoordhuis: so why don't you? if that's the intent [23:47] bnoordhuis: maybe i should ask what you're trying to do :) [23:47] TooTallNate: well I just inherited this module from rbranson [23:47] TooTallNate: so i'm just making it better ;) [23:47] mandric has joined the channel [23:47] bnoordhuis: in what respect? [23:48] TooTallNate: i rewrote the crappy struct implementation a couple weeks ago [23:48] TooTallNate: but the guy takes forever to respond to pull requests [23:48] TooTallNate: so he just gave me commit access [23:48] TooTallNate: that said, there's quite a few things I want to change/fix [23:48] TooTallNate: and the distinction between Buffers and Pointer objects was one of them [23:48] TooTallNate: cause really they could be the same concept [23:48] TooTallNate: almost [23:48] cadorn has joined the channel [23:48] openpercept has joined the channel [23:49] TooTallNate: the only difference, is that the Pointer objects sometimes do not know the size of the data they point to [23:49] blup has joined the channel [23:49] bnoordhuis: important distinction [23:49] TooTallNate: so that might be a deal breaker for swapping them with Buffers (they always have a length) [23:49] jonrohan has joined the channel [23:49] bnoordhuis: so where does the Persistent enter the mix? [23:50] TooTallNate: so "new Pointer(8)" mallocs 8 bytes somewhere [23:50] TooTallNate: so with that alloced space, I want to be able to put a Persistent handle to an arbitrary JS object [23:51] nerdy_ has joined the channel [23:51] TooTallNate: and be able to retrieve it later [23:51] bnoordhuis: why don't you make the Persistent a member of Pointer? [23:51] TooTallNate: well it could just as well be "new Pointer(16)" and write 2 objects in a row [23:51] bnoordhuis: two objects referencing the same pointer? [23:52] TooTallNate: it's not a pointer, it's the "beginning" pointer to some buffer of data [23:52] bnoordhuis: okay, two JS objects pointing to the same buffer of data? [23:53] ryanfitz has joined the channel [23:53] TooTallNate: so the Pointer object can do "getUInt32()" twice, to read two 4-byte ints in a row [23:53] TooTallNate: from the space where the Pointer object is pointing to [23:53] TooTallNate: I [23:53] TooTallNate: I'm trying to be able to do the same, just with arbitrary JS objects [23:53] nuck has joined the channel [23:54] TooTallNate: var ptr = new FFI.Pointer(1024); [23:54] TooTallNate: ptr.putCString("Hello World!"); [23:54] TooTallNate: ptr.getCString(); // "Hello World!" [23:54] TooTallNate: bnoordhuis: like you can currently do that ^ [23:55] bnoordhuis: okay [23:55] bnoordhuis: and here ptr should reference a persistent object? [23:55] TooTallNate: no, it's the same malloced space, I'm just trying to store Persistent handles in that space [23:56] bnoordhuis: let me rephrase that: is Pointer an instance of ObjectWrap? [23:56] TooTallNate: yes [23:56] bnoordhuis: then it's already persistent [23:56] bnoordhuis: see the handle_ field [23:56] TooTallNate: damnit, i'm not explaining this well enough :p [23:57] TooTallNate: let me try to write a little script that I would *like to work* [23:57] bnoordhuis: you really want to store Persistent handles in the memory Pointer.m_ptr *points* to? [23:57] TooTallNate: bnoordhuis: yes [23:57] bnoordhuis: okay, i think the problem is that i'm not understanding why [23:57] bnoordhuis: what objects would those Persistent handles wrap? [23:58] lepht has joined the channel [23:58] normanrichards has joined the channel [23:58] scott_gonzalez has joined the channel [23:59] TooTallNate: bnoordhuis: well, i could use that feature to solve my object wrap caching issue in NodObjC, for instance: https://github.com/TooTallNate/NodObjC/issues/4 [23:59] dgathright has joined the channel [23:59] TooTallNate: since the objc runtime allows all instances to store arbitrary pointers along with it, I'm trying to make a Persistent handle be one of them [23:59] qbert65536 has joined the channel