[00:00] jspiros has joined the channel [00:00] devdazed has joined the channel [00:01] PureRumble has joined the channel [00:02] ryan_stevens has joined the channel [00:02] Rojtjo has joined the channel [00:05] tomgallacher has joined the channel [00:05] PureRumble: how to count number of keys in an object? [00:06] tbranyen: Object.keys(obj).length [00:06] cmr: Why is it not obj.keys()? Is this an intentional design decision? [00:07] tbranyen: yes [00:07] PureRumble: thx [00:07] tbranyen: because extending Object.prototype affects all objects [00:07] tbranyen: including functions in which it probably doesn't make sense [00:07] tbranyen: to have a keys function [00:07] willwhite has joined the channel [00:09] cmr: Ah, that makes sense [00:09] ben_alman: ok, bug filed about OS X .pkg installers needing root https://github.com/joyent/node/issues/2427 [00:10] benvie: delete global.Object [00:10] EhevuTov__ has joined the channel [00:11] mehlah has joined the channel [00:12] futini has joined the channel [00:13] jbpros has joined the channel [00:13] hakunin has joined the channel [00:13] greekmale has joined the channel [00:15] davehamptonusa has left the channel [00:15] jacobolus has joined the channel [00:15] socialhack has joined the channel [00:16] benvie: fortunately [00:16] benvie: you can do whatever naughty things you want if you should decide to [00:16] cmr: benvie: we're all consenting adults, why shouldn't we [00:19] tommyvyo has joined the channel [00:19] dreamdust has joined the channel [00:19] cjm has joined the channel [00:19] dreamdust has left the channel [00:20] EhevuTov has joined the channel [00:21] socialhack has joined the channel [00:22] JesusRosso has joined the channel [00:23] hotchkiss has joined the channel [00:23] wilmoore has joined the channel [00:24] neilk_: Sorry for the question repost. Is there a way to determine a path relative to the current library? e.g. can a function in path/to/lib.js determine that it came from "path/to" ? [00:25] socialhack has joined the channel [00:25] benvie: all the paths loaded using node's module system are cached for you to inspect directly [00:26] benvie: require.cache and require.paths [00:26] TheJH: neilk_, __dirname [00:26] MUILTR has joined the channel [00:26] benvie: oh if uoi're asking about relation to exact source file [00:26] TheJH: neilk_, inside of your module, __dirname is the directory inside of which your module file is. There's also one for the file. [00:26] benvie: __dirname is the location of that specific dir and __filename i the same [00:27] benvie: and also module.filename [00:27] neilk_: isn't __dirname the location of the file being *executed*? [00:27] neilk_: hm [00:27] benvie: no [00:27] TheJH: neilk_, no [00:27] TheJH: neilk_, http://nodejs.org/docs/latest/api/globals.html#__filename [00:27] neilk_: TheJH: k I'll try that [00:28] xemium99 has joined the channel [00:29] neilk_: TheJH, benvie: sweet, that worked. Thanks. [00:30] benvie: ;) [00:30] benvie: it won't work for the repl by the way [00:30] benvie: that's the onet hing it doesn't [00:30] benvie: work for [00:31] xemium99 has left the channel [00:32] piscisaureus_ has joined the channel [00:35] samBiotic has joined the channel [00:37] EriksLV has joined the channel [00:39] idle-boy has joined the channel [00:44] pizthewiz has joined the channel [00:45] samBiotic has joined the channel [00:46] teadict: http://pastie.org/3082231 ^.- [00:46] context: libz [00:46] context: or libzip [00:46] context: need dev package [00:46] context: libz [00:46] teadict: oh, the z [00:47] teadict: nope [00:47] teadict: oh [00:47] drudge has joined the channel [00:47] piscisaureus_ has joined the channel [00:48] teadict: and it's making again [00:48] teadict: finished, great, thank [00:49] tim_smart has joined the channel [00:49] teadict: you need sudo to install.. [00:52] teadict: I don't remmber sudoing up in the VPS .. mmm [00:52] k1ttty has joined the channel [00:52] piscisaureus__ has joined the channel [00:52] ericmuyser has joined the channel [00:53] samBiotic: I'm getting a "tar: Child returned status 2" error when install node v0.4.12 with nvm. any pointers? [00:53] Me1000 has joined the channel [00:54] teadict: 0.4.12? [00:54] samBiotic: teadict, yes locker project requires 4.x [00:55] teadict: what's locker? [00:55] samBiotic: teadict, lockerproject.org [00:55] piscisaureus__ has joined the channel [00:56] gigafied has joined the channel [00:56] teadict: I don't understand, does it host? [00:56] samBiotic: no self hosted [00:56] teadict: it collects data in fancy way [00:56] teadict: gotcha [00:56] storrgie has joined the channel [00:57] samBiotic: basically i have node 0.6.6 installed through arch pacman. though nvm would be a neat way of installing an old node version side by side [00:57] samBiotic: i bet it's just a dependancy thing [00:58] tbranyen: samBiotic: i <3 using pacman for that [00:59] piscisaureus__ has joined the channel [01:00] teadict: installing forever installed a bunch of crap! [01:00] samBiotic: tbranyen, until you find a project that requires an old version that isn't in a.r.m. like now [01:00] tbranyen: samBiotic: oh for sure [01:00] teadict: oh well, I guess it needs the crap [01:00] tbranyen: but why are you using arch then [01:00] tbranyen: thats not hte arch way [01:00] tbranyen: :-p [01:00] samBiotic: meh [01:01] teadict: where does npm actually store globally installed packages? [01:01] teadict: node's make path? [01:02] neoesque has joined the channel [01:02] samBiotic: cd .. [01:02] samBiotic: oops wrong window [01:03] hemanth has joined the channel [01:06] draginx: .clear [01:06] MUILTR has joined the channel [01:06] JaKWaC has joined the channel [01:07] talman has joined the channel [01:07] tuhoojabotti: terminal nature o.o [01:07] wedtm has joined the channel [01:08] pandeiro_ has joined the channel [01:08] towski has joined the channel [01:08] neurodrone has joined the channel [01:09] brianseeders has joined the channel [01:09] towski_ has joined the channel [01:13] AvianFlu has joined the channel [01:13] marcosvm has joined the channel [01:16] talman has left the channel [01:18] hostsamurai has joined the channel [01:19] Witnes5 has joined the channel [01:19] josephmoniz has left the channel [01:22] zeunix has joined the channel [01:26] postwait has joined the channel [01:29] Ep1kMalware has joined the channel [01:29] tomlion has joined the channel [01:30] bnoordhuis has joined the channel [01:30] jlank has joined the channel [01:31] shinuza: e [01:33] shinuza: teadict: I got this /usr/local/lib/node_modules [01:33] tomgallacher has joined the channel [01:35] ritch has joined the channel [01:35] Ep1kMalware: window close [01:35] Ep1kMalware has left the channel [01:36] idle-boy has joined the channel [01:41] silky has joined the channel [01:42] icewhite has joined the channel [01:46] tommyvyo has joined the channel [01:47] towski has joined the channel [01:48] benvie has joined the channel [01:50] piscisaureus__ has joined the channel [01:52] c4milo has joined the channel [01:53] piscisaureus__ has joined the channel [01:55] Aria has joined the channel [01:55] socialhack has joined the channel [01:57] jstonne has joined the channel [01:57] cclarke has joined the channel [02:00] cclarke has joined the channel [02:00] ben_alman: after installing node-v0.6.6.pkg i can't do npm update npm -g, i get Error: EACCES, permission denied '/usr/local/lib/node_modules/npm/.gitmodules' [02:00] ben_alman: any ideas? [02:01] piscisaureus__ has joined the channel [02:01] ben_alman: and now npm is gone :/ [02:01] a_meteorite has joined the channel [02:02] bnoordhuis: ben_alman: you opened an issue about non-root installs, right? [02:02] Aria: What user are you running it as? [02:03] ben_alman: bnoordhuis: i did, but i've been trying like 5 different ways to install on both os x and ubuntu [02:03] ben_alman: Aria: i'm running the .pkg installer as my normal user, it prompts for my password, i enter it, it installs [02:03] ben_alman: i've tried nave and nvm, and now i'm just running the .pkg [02:04] ben_alman: (and building on ubuntu) [02:04] ben_alman: i've been trying to get this to its simplest possible procedure [02:04] ben_alman: i'm working out the os x kinks right now [02:05] ben_alman: i've been having errors with both ubuntu and os x using both nvm and straight-up building into /usr/local [02:05] phluffy has joined the channel [02:05] ben_alman: i've also tried completely fresh ubuntu 11.0.4 server installs [02:05] bnoordhuis: ben_alman: sounds like you have an unconventional setup, /usr/local is usually only writable by root [02:05] ben_alman: bnoordhuis: on os x, i can write into it. homebrew does that [02:06] ben_alman: i don't need sudo for homebrew [02:06] bnoordhuis: re `npm -g`, you probably need to prepend sudo [02:06] ben_alman: on ubuntu, it requires root. [02:06] bnoordhuis: i've homebrew installed too but /usr/local is still owned by root:admin [02:06] ben_alman: bnoordhuis: not on my system [02:06] ben_alman: wait sec [02:07] ben_alman: so my /usr/local is root:admin but everything under it is cowboy:admin [02:07] ben_alman: and for whatever reason, all the files installed by the .pkg are 24561:admin [02:08] mikeal has joined the channel [02:08] ben_alman: the npm link is root:admin [02:08] ben_alman: but everything homebrew installs is cowboy:admin [02:08] Aria: ben_alman: That package would be as root (hence the password) -- you'd want to chown after the fact. [02:08] Aria: Or use brew ;-) [02:08] CIA-109: node: 03Ryan Dahl 07isolates2 * r036e593 10/ src/node.cc : Add process.features.isolates (+25 more commits...) - http://git.io/5Jl3Mg [02:08] teadict: express won't install globally because of permission undenied... [02:09] ben_alman: if i use brew, i need to install npm manually [02:09] ben_alman: the .pkg thing seems to be a total mess [02:09] ben_alman: shouldn't it just work? [02:09] ben_alman: fwiw, i initally used brew but someone recommended i use the .pkg file [02:10] eventualbuddha has joined the channel [02:11] Aria: it should work -- sudo npm ;-) [02:11] Aria: But if you're all brew, you might as well stick that way. [02:11] Aria: Brew's good. [02:11] ben_alman: yeah [02:11] ben_alman: i'll go back to that :/ [02:11] tjfontaine: meh, you should always use the platform preferred installatin mechanism [02:12] ben_alman: except everyone who uses the platform prefers something different [02:12] ben_alman: not to mention that apt-get install nodejs installs like 0.2.3 [02:12] bnoordhuis: there are more recent ppas out there [02:12] tjfontaine: if you have to install from source and it must be system wide then at least use check install [02:12] ben_alman: don't know what that means [02:13] tjfontaine: if you're on a non-linux unix, everything should be installed into paths you have write access to [02:13] ben_alman: there's an osx ".pkg" file on the website [02:13] ben_alman: presumably that's the "preferred" install [02:13] zzak: is there anyway to use a local package in package.json dependencies? [02:13] ben_alman: but it's not working for me. [02:14] tjfontaine: right, and the "sudo npm -g" issue is common with python, perl, and ruby each in their own quirks and people who want to install packages system wide [02:14] ben_alman: but at no point does npm say to use sudo [02:14] tjfontaine: this is one of those bring your own lunch situations, you should probably have an understanding of filesystem permissions [02:15] ben_alman: good. put that in the faq [02:15] ben_alman: because it's not at all obvious [02:15] JakeyChan has joined the channel [02:16] cclarke has joined the channel [02:18] CIA-109: node: 03Ryan Dahl 07isolates2 * rb319699 10/ (3 files in 2 dirs): Add isolate version of test-child-process-fork - http://git.io/1OagHA [02:19] JaKWaC has joined the channel [02:19] devaholic has joined the channel [02:20] cclarke has joined the channel [02:21] ritch has joined the channel [02:22] cclarke has joined the channel [02:22] Bloodman-csx has joined the channel [02:22] Bloodman-csx has left the channel [02:22] TheFuzzball: Is there anything like array_diff as a node module? [02:23] ben_alman: bnoordhuis have you seen any 0.6.6 ppas? the newest i can find is 0.6.2 https://launchpad.net/~chris-lea/+archive/node.js [02:23] MatthewS has joined the channel [02:23] bnoordhuis: ben_alman: that's probably the latest, chris lea is the guy who maintains the ubuntu ppas [02:24] ben_alman: ok, thx [02:24] ben_alman: i'll just keep building the linux ver [02:25] Sami_ZzZ_ has joined the channel [02:25] Witnes5 has joined the channel [02:26] silent__thought has joined the channel [02:26] wbednarski has joined the channel [02:27] willwhite has joined the channel [02:27] jstonne has joined the channel [02:27] a_suenami has joined the channel [02:28] eventualbuddha has joined the channel [02:29] jstonne has joined the channel [02:30] tomlion_ has joined the channel [02:30] jacobolus has joined the channel [02:31] jstonne has joined the channel [02:31] mandric has joined the channel [02:32] [[zz]] has joined the channel [02:32] jstonne has joined the channel [02:33] jstonne has joined the channel [02:33] jstonne has left the channel [02:33] wbednars_ has joined the channel [02:35] pandeiro__ has joined the channel [02:35] teadict: how did I install npm? if after "make uninstall"ing under node/, npm is still executable [02:40] silent__thought has left the channel [02:42] bnoordhuis: teadict: npm is bundled with node now. if `make uninstall` doesn't remove it, can you file a bug? [02:45] omenar has joined the channel [02:49] teadict: bnoordhuis: actually, the npm was installed with a node-0.4.x previously... I then uninstalled node (but not npm and in that version I assume was not bundled).. [02:50] teadict: I was now bugged because I reinstall node-0.7 and when I then uninstalled it, that old npm didn't dissappear [02:50] teadict: but makes sense it didn't [02:50] teadict: thign is how do I remove the old npm, to install node 0.7 correctly [02:51] jaequery has joined the channel [02:51] Aria: rm? [02:52] Aria: it's npm, npm_g and npm-g, plus the npm folder in wherever the libraries are. [02:52] teadict: oh... [02:52] context: anyone know if there is a node npm modules doc site kind of like rdoc.org for ruby [02:53] eastc has joined the channel [02:54] Qasaur has joined the channel [02:54] Qasaur: Hey [02:54] Qasaur: I've been hearing about this "node.js" thing everywhere [02:54] Qasaur: what is it? [02:55] context: nodejs.org [02:55] teadict: your new GOD [02:55] rurufufuss has joined the channel [02:55] Dmitrijus: teadict: haha :D [02:55] context: teadict: i have to say... qasaur beats you for the useless questions of all time. ;) [02:55] Dmitrijus: the python of the future ;]]] [02:56] teadict: context: we met a day ago, I'll show you otherwise later on! [02:56] context: anyway. off to the pub ! [02:56] context: teadict: get all your stuff going and shit ? [02:56] teadict: yes, kinda over that part [02:56] teadict: starting to play [02:56] teadict: gonna build the security system for starters [02:57] teadict: which is probably using node_acl inside express [02:57] teadict: or something [02:57] Qasaur has left the channel [02:59] westc has joined the channel [03:00] LeMike has joined the channel [03:02] luke` has joined the channel [03:02] criswell has joined the channel [03:03] devdazed has joined the channel [03:04] equark: anybody got a clue why if I move module code into the header file it compiles but fails to load? [03:04] equark: here's a simple example: https://gist.github.com/1525967 [03:06] Aria: Because your C++-fu is weak? [03:06] Aria: What sort of failure? [03:06] equark: that is very true, lol [03:06] zeunix has joined the channel [03:07] equark: however it gets the job done usually [03:07] JakeyChan has joined the channel [03:07] equark: the error I get is "Error: Unable to load shared library" on require('./modulename') [03:07] Phaaze has joined the channel [03:08] equark: that gist is exactly this example: https://github.com/kkaefer/node-cpp-modules/tree/master/06_objects [03:08] Aria: What did it compile to? [03:09] equark: but I tried to move implementation into header (because I ultimately want to have a template header library for main functionality...) [03:09] equark: Aria: to a compiled module. node-waf configure; node-waf build [03:09] Me1000 has joined the channel [03:10] Aria: What OS? What file results? [03:10] Aria: a .node file that's a darwin dylib? A linux .so? [03:10] equark: .node [03:10] equark: OSX [03:10] Aria: Does otool show anything weird about it? [03:12] equark: i'm not an tool expert… [03:12] Aria: otool is the macos "Inspect an object" tool. [03:12] Aria: See if it's actually a valid dynamic library. See what you got. [03:12] nathanpalmer has joined the channel [03:14] equark: it seems inspect able [03:14] Aria: Hm. [03:14] redir_ has joined the channel [03:14] Aria: I wonder what the error is, then. Would it not compile at all with the code in the cpp file? [03:15] equark: It works with all the code in CPP file. That's the example here: https://github.com/kkaefer/node-cpp-modules/tree/master/06_objects [03:15] ChrisMatthieu has joined the channel [03:15] Aria: Okay. . . [03:15] equark: I was trying to move code into the header because I'm building a template library. [03:16] Aria: Hm. [03:16] blueadept has joined the channel [03:16] equark: I may be doing something off, but i just moved the code over and things compile fine. Maybe I'm missing something about the way macros or modules work... [03:18] drostie has joined the channel [03:18] mike5w3c_ has joined the channel [03:19] drostie: I have developed a parser for a BSON-like language which, even with full error checking, clocks in at only ~ 100 lines of code. :o [03:19] drostie: It looks very lispy. [03:23] tbranyen: welp node was just putting my laptop into launch mode [03:25] scttnlsn has joined the channel [03:26] jamescarr has joined the channel [03:26] jamescarr: hola [03:27] teadict: cómo va? [03:27] tbranyen: oy yay [03:29] munichlinux has joined the channel [03:32] boltR has joined the channel [03:33] rurufufuss has joined the channel [03:34] zab has joined the channel [03:34] drostie: Also, in theory someday the Node buffer.toString('utf8') methods should throw errors on buffers which aren't utf8 strings. :x [03:34] drostie: Right now they don't. [03:34] no_u0 has joined the channel [03:35] no_u0: i'm curious if anyone has any experience with dust.js templating engine [03:36] drostie: oh wait, it's actually in the standards that it shouldn't. :oo [03:37] drostie: 'a device receiving UTF-8 shall interpret a "malformed sequence in the same way that it interprets a character that is outside the adopted subset" and "characters that are not within the adopted subset shall be indicated to the user" by a receiving device.' [03:37] kazupon has joined the channel [03:38] meandi5 has joined the channel [03:39] enmand has joined the channel [03:40] jamescarr: non node.js related... anyone know of a good UI scrip that mimcs delicious like tags? [03:40] piscisaureus_ has joined the channel [03:40] jamescarr: like when I type something, it ends up as a tag with an x next to it? [03:40] josephmoniz has joined the channel [03:41] jamescarr: nvm... found a good script [03:43] hij1nx has joined the channel [03:43] isufy has joined the channel [03:45] ritch has left the channel [03:46] CarterL has joined the channel [03:46] Shaunzie has joined the channel [03:47] wilmoore has joined the channel [03:51] teadict: if I compiled node at home, why isn't npm at /usr/bin/npm? [03:51] nathanpalmer_ has joined the channel [03:51] teadict: it is at /usr/local/bin/npm though [03:52] EvRide has joined the channel [03:52] teadict: I think I forgot to prefix the configure [03:54] teadict: http://paste.ubuntu.com/785314/ [03:56] stefpb: npm list -> Error: Cannot find module 'fast-list' [03:56] stefpb: what is wrong? [03:56] yogurt_truck has joined the channel [03:56] teadict: npm install -d ? [03:57] stefpb: same Error [03:57] stefpb: at Function._resolveFilename (module.js:334:11) ... at Object. (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:9:16) [03:58] Aria: npm cache clean? [03:58] stefpb: same Error ;) [03:59] MatthewS has joined the channel [03:59] Aria: teadict: hash -r -- your shell is caching the wrong path [03:59] teadict: ACTION hugs Aria and jumps around [03:59] stefpb: ok ... i go to download newest node ... (there is npm included !?) .. i rm -r /usr/local/lib/node_modues ok? [03:59] dr0id has joined the channel [03:59] teadict: Aria: you're my new best friend [03:59] Aria: And you learned something! [04:00] dr0id: ohh .. my .. friends [04:00] teadict: yes, to not compile and uninstall and recompile and install something 4 times in a row like a maniac [04:00] astropirate: So, EcmaScript Harmony is in chrome nightly, when can we see it in Node? [04:00] Aria: stefpb: npm is indeed included now. Yeah, if you rm -r the node_modules, you'll clean out ~everything. Remove npm, npm-g and npm_g, too, in addition ton ode [04:00] cmr: astropirate: Is it? [04:00] Aria: astropirate: What part of harmony? Proxies? [04:00] cmr: Yes, which part. [04:00] astropirate: cmr, Aria not sure, i saw it on someone's twitter retweet [04:00] Aria: If you want proxies, use --harmony_proxies on node's commandline [04:01] Aria: That's been in for a little while [04:01] astropirate: nahh i want the whole shabang : [04:01] astropirate: :) [04:01] Aria: --harmony_scoping, --harmony_typeof, too. [04:01] Aria: And there's --harmony for 'all harmony features', whatever that means [04:01] teadict: oh, I remember why I used 0.4... silly "now" doesn't work on master [04:01] astropirate: harmony_scoping allowes the `let` keyword? [04:01] cjm has joined the channel [04:02] JaKWaC has joined the channel [04:03] stefpb: Thx Aria, teadict: sudo rm -fr /usr/local/lib/node_modules/ /usr/local/bin/npm* ; sudo make install (node) ; npm list -> (empty) fine fine [04:05] teadict: who uses now? [04:06] stefpb: <- socket.io [04:06] teadict: yes, I know.. but now is easier [04:06] teadict: I'll end up using both though [04:07] towski_ has joined the channel [04:07] teadict: how long would it take to accomplish what now does with socket.io? [04:08] teadict: I'm actually asking to know [04:10] JakeyChan_ has joined the channel [04:11] Aria: as long as npm install hook.io takes? [04:12] teadict: oh wow [04:13] sh1mmer has joined the channel [04:13] teadict: is like now, but not abandoned [04:13] teadict: no, it's not.. [04:13] teadict: now is upper level [04:14] Shaunzie has left the channel [04:15] teadict: anyway, I'll use it socket.io... to hell with it [04:15] stefpb: hm forever cli is broken in new (forever/node/?) versions: forever -l forever.log -o out.log -e err.log app.js doesnt create out.log/err.log/forever.log - Has anybody the same problem? [04:16] no_u01 has joined the channel [04:17] amigojapan has joined the channel [04:17] teadict: what's the best ACL? [04:17] Aria: hook.io is pretty high-level too. [04:18] Aria: Now's not abandoned, either. The CEO of the company that made it just gave a talk at our local node.js meetup a couple months ago. [04:18] teadict: higher than socket? [04:18] teadict: Aria: and what did he talk about? [04:19] Aria: Yeah, hook.io builds on top of socket.io [04:19] Aria: I believe, anyway. It's similar to nowjs [04:19] Aria: And he talked about scaling out nowjs to 500,000 msg/sec, using some big clusters. [04:20] teadict: but still doesn't work on 0.7! [04:21] Aria: Well, 0.7 is the bleeding edge, you realize... [04:21] Aria: 0.6 is the current stable. [04:21] eastc has joined the channel [04:22] teadict: I think I'll stick to socket.io... [04:22] teadict: using now or hook.io would be depending on something else [04:23] teadict: I don't even quite understand what a "hook" is [04:24] teadict: looks low level [04:24] teadict: now is easy ): [04:24] Aria: hook.io can build a web of stuff, so it's fault-tolerant, and can do all sorts of fun routing. [04:24] Aria: Like now, but different. [04:25] teadict: then no [04:25] teadict: I'll use socket [04:25] teadict: if now gets better, I'll use it [04:27] heavysixer has joined the channel [04:29] eastc: I wish the modules in node.js had the date of initial release by them [04:29] ryanfitz has joined the channel [04:30] eastc: on the node.js modules page ^ [04:32] xuser has joined the channel [04:33] JakeyChan has joined the channel [04:33] ryan_stevens has joined the channel [04:34] gavin_huang has joined the channel [04:34] stefpb: (use the forever branch 0.6 !) [04:35] sridatta has joined the channel [04:36] wilmoore has joined the channel [04:36] subbyyy has joined the channel [04:37] Sorella has joined the channel [04:41] hemanth has joined the channel [04:42] jacobolus has joined the channel [04:42] hemanth: any bot in the room? [04:42] hemanth: > [04:43] Aria: Not that will admit to it. [04:43] hemanth: for( var m in os.toString()) { console.log(m);} strange getting 1..14; was expecting something else [04:43] Aria: Too easy to fail a turing test that way. [04:44] hemanth: heh heh [04:44] Aria: What were you expecting? [04:44] hemanth: method names in os module ? [04:44] hemanth: better define my own function for toString() ?? [04:46] hemanth: var all; for (var prop in os){ all += JSON.stringify(os[prop]()+"\n"); } [04:46] hemanth: dumb?? ^ [04:46] mikeal has joined the channel [04:47] mandric has joined the channel [04:48] hemanth: Aria, ? [04:49] wycats has joined the channel [04:50] davehamptonusa has joined the channel [04:50] davehamptonusa has left the channel [04:50] Aria: That would be (for m in os) [04:50] tbranyen: Object.keys(os).join("\n") [04:50] Aria: Or that. [04:50] Aria: Yeah. [04:50] wycats: I'm trying to npm adduser and getting bizarre results [04:51] Aria: For an existing user [04:51] Aria: ? [04:51] tbranyen: adduser is weird, its registration and login [04:51] hemanth: for m in os { os[m](); } ? [04:52] tbranyen: hemanth: look at what i just pasted, sorry i didn't highlight you [04:52] wycats: https://gist.github.com/991f331cef5fa163ed08 [04:52] wycats: tbranyen: I'm trying to register [04:52] wycats: it works one moment [04:52] Aria: hemanth: That would call everything in os. [04:52] wycats: then not [04:52] hemanth: Object.keys(os).join("\n") would give me the keys and using that I'm trying to invoke them all and get the return to one single JSON [04:53] hemanth: Aria, that is not invoking them all, in the console [04:53] tbranyen: wycats: wycats fwiw i'm getting errors logging in [04:53] tbranyen: crap tab complete [04:53] hemanth: for k in Object.keys(os) { os[k](); } [04:53] wycats: tbranyen: suck [04:53] Aria: Why.... invoke them all? [04:54] tbranyen: wycats: same issue, and isaacs isn't in [04:54] tbranyen: bummer [04:54] wycats: tbranyen: trying to get access to the handlebars project but that means I actually need an account :P [04:54] tbranyen: lol thats what you get for letting someone beat you to adding your own project ^_^ [04:55] hemanth: Aria, learning about it [04:55] tbranyen: wasn't there an issue with handlebars and node for a bit that went unresolved? [04:55] tbranyen: some pathing thing [04:55] Aria: hemanth: Assuming none take parameters, that might work ... hope one of those methods isn't "formatHardDrive". [04:55] hemanth: Aria, heh heh :) [04:55] caffine has joined the channel [04:55] wycats: tbranyen: hm [04:55] wycats: unsure [04:55] wycats: should be resolved now [04:56] wycats: pdecker did a lot of node support work [04:56] tbranyen: thats great [04:56] Aria: hemanth: But you can Object.keys(os).map(function(method) { return os[method]() }) [04:56] wycats: tbranyen: the node stuff does precompilation [04:57] tbranyen: wycats: yeah precompilation is the shiz, ajpiano and i are using a requirejs-handlebars thing in our backbone app [04:57] tbranyen: although its not server side precompilation :-/ [04:57] tbranyen: not sure if the build will compile them into the final file [04:57] hemanth: Aria, kool :) [04:58] tbranyen: As long as all of your paths match up, this should precompile all of your templates and include them in the build. [04:58] tbranyen: Awww yeah [05:00] wycats: tbranyen: the handlebars node package emits a JS file [05:00] wycats: it uses the precompile method in handlebars proper so it's easy to wire into anything [05:00] tbranyen: JST? [05:00] brianloveswords has joined the channel [05:00] wycats: tbranyen: just a .js file [05:00] jaequery has joined the channel [05:00] wycats: Handlebars.templates["filename"] = function() {} [05:01] Aria: Yarr. I wish node 0.6 hadn't ripped out sending a file descriptor between processes in the generic case. [05:01] tbranyen: ah okay [05:01] Aria: Total productivity bomb to writing what I wanted this weekend. [05:01] tbranyen: any reason why you didn't go with the window.JST namespace? [05:02] JakeyChan has joined the channel [05:03] jamescarr: son of a gun [05:03] jamescarr: npm doesn't install to node_modules anymore!? [05:03] tbranyen: sure it does [05:03] counterbeing has joined the channel [05:04] jamescarr: npm install . [05:04] mikeal has joined the channel [05:04] vol4ok has joined the channel [05:04] jamescarr: argh, it's going to /usr/local/lib/node_modules [05:04] jamescarr: dammit [05:05] jamescarr: must've misconfigured an environment var [05:05] mandric has joined the channel [05:05] Hamms has joined the channel [05:07] nathanpalmer has joined the channel [05:08] jgornick has joined the channel [05:08] Aria: What are you intending npm install . to do? [05:08] postmodern has joined the channel [05:09] postmodern: how does one read chunks of base64 data from a TCP connection [05:09] jamescarr: install my dependencies into node_modules in the project directory [05:09] jamescarr: at least that used to be the behavior :S [05:09] postmodern: where a full chunk terminates with a =\n [05:09] jamescarr: ACTION has a java day job and sadly has large gaps between his node.js work :( [05:09] jamescarr: seems everytime I come back something has changed [05:09] OmidRaha has joined the channel [05:10] Aria: npm install does that [05:10] Aria: Without the . [05:11] jamescarr: yeah, without it even it still puts it in /usr/local/lib/node_modules/my_app_name/node_modules [05:12] Aria: Which version of npm? [05:12] Aria: (And you have a package.json in your package?) [05:13] jamescarr: of course. Let me check the version, just did an update [05:14] Aria: Sorry, just sanity-checking. [05:14] jamescarr: 1.0.106 [05:14] jamescarr: I don't get it, I've done this thousands of times [05:15] vol4ok has joined the channel [05:15] jamescarr: sigh... anyone mind giving me an extra pair of eyeballs on my package.json? https://gist.github.com/1526437 [05:15] brianseeders has joined the channel [05:16] jamescarr: my npmrc just says "global = true" [05:16] jamescarr: ~/.npmrc I mean [05:19] bulatshakirzyano has joined the channel [05:19] wycats: tbranyen: is there a standard I missed? [05:19] hemanth: Aria, Object.keys(os).map(function(method) { res.write(JSON.stringify(method+":"+os[method]())); }) gives me few [object Object] [object Object], how to avoid that? As in print the attributes of those objects as well in the same loop [05:21] airportyh has joined the channel [05:24] tbranyen: wycats: seems like a common convention [05:24] wycats: tbranyen: I must have missed it [05:25] tbranyen: I've seen a few packages do it [05:25] wycats: I'm not really a fan of introducing more globals than I need to [05:25] wycats: Handlebars is already exposed for Handlebars [05:25] AvianFlu: hemanth, you can pass other args to JSON.stringify(), one of which is the depth [05:25] tbranyen: Yeah, I mean what you did makes sense. [05:25] tbranyen: its such a minor thing [05:25] AvianFlu: hemanth, JSON.stringify(obj, 2, true) will print it two levels deep, and the boolean is whether or not to pretty-print it [05:26] tbranyen: wycats: actually while you're here, why did you implement reopenClass in ember? [05:27] tbranyen: I was reading the docs last night and was discussing that particular method with a coworker today [05:27] piscisaureus_ has joined the channel [05:27] Aria: hemanth: You're stringifying a string -- the method + : whatever is what makes the object into [object Object] [05:27] Aria: hemanth: you should probably skim over the MDN javascript re-introduction [05:28] Aria: Just get familiar with the basic type handling of javascript [05:28] wycats: tbranyen: as opposed to? [05:28] wycats: tbranyen: reopen and reopenClass are basically ways to split apart class definition, and since Ember's classes have more features, a simple extend() doesn't necessarily work [05:29] wycats: for instance you can use computed properties [05:29] wycats: bindings [05:30] hemanth: Aria, AvianFlu roger that :) [05:31] tbranyen: wycats: oh i see. well i mean opposed to just adding to the prototype or constructor object itself [05:31] wycats: tbranyen: the biggest reason is that Ember's object model has mixins [05:32] wycats: we flatten mixins into a prototype when you create one for the first time [05:32] musiclover1024 has joined the channel [05:32] wycats: tbranyen: plus… having to do Foo.prototype.bar = zomg is annoying as fuck [05:32] purr has joined the channel [05:33] wycats: Foo.reopen({ barBinding: "baz" }) is useful [05:33] musiclover1024 has left the channel [05:33] jamescarr: dammit! wtf did I do!? [05:34] devaholic: oh dog wat done [05:35] jamescarr: I did something to make npm start refusing to install to the local project dir, opting instead to /usr/local/node_modules/ProjectName/node_modules [05:35] jamescarr: sigh [05:35] jamescarr: I'm going to just remove it and try again [05:35] jamescarr: never had this happen before :( [05:35] tbranyen: wycats: well i mean, thats how it is in javascript. [05:36] tbranyen: whats really annoying is no real super, i'm glad to see ember has this._super, but kind of odd that its underscored [05:36] wycats: tbranyen: blame IE [05:36] tbranyen: typically that means don't use [05:36] wycats: super is a reserved word [05:36] tbranyen: i forgot that was a browser >_> [05:37] tomgallacher has joined the channel [05:37] tbranyen: reserved keys as object properties has been a luxury i've enjoyed [05:38] mattgifford has joined the channel [05:40] jamescarr: dah... set globals=false in ~/.npmrc [05:40] jamescarr: sheesh [05:42] wycats: tbranyen: confirm [05:42] wycats: iWish for it [05:46] dexter_e has joined the channel [05:48] harthur has joined the channel [05:48] JaKWaC has joined the channel [05:50] sridatta has joined the channel [05:56] JakeyChan_ has joined the channel [05:57] dexter_e: Anyone tried Paypal X or Adaptive Payments with Node ? [05:58] dexter_e: Recommended Libraries or modules ? [05:59] RobWC has joined the channel [06:01] admc has joined the channel [06:03] k1ttty has joined the channel [06:04] SamuraiJack has joined the channel [06:07] jacobolu_ has joined the channel [06:08] semperdonec has joined the channel [06:09] macav has joined the channel [06:14] CIA-109: node: 03koichik 07v0.6 * ra848a3e 10/ (lib/net.js test/simple/test-net-after-close.js): [06:14] CIA-109: node: net: fix Socket.pause null reference when called on a closed Stream [06:14] CIA-109: node: Fixes #1980. - http://git.io/Kd0FLQ [06:14] cognominal has joined the channel [06:17] jsvana has joined the channel [06:19] CIA-109: node: 03koichik 07master * rb037c16 10/ test/simple/test-sys.js : [06:19] CIA-109: node: test: fix test-sys.js fails if the time zone is not CET [06:19] CIA-109: node: Fixes #2423. - http://git.io/J39z5Q [06:19] JulioBarros has joined the channel [06:19] mikeal has joined the channel [06:19] vol4ok has joined the channel [06:21] notifybot has joined the channel [06:27] otakutom_ has joined the channel [06:30] jamescarr: dexter_e, I wrote paynode eons ago to use paypal X [06:31] jamescarr: dexter_e, I apologize, I have not maintained it since the node v0.2 days [06:32] ericnakagawa has joined the channel [06:33] blueadept has left the channel [06:33] kazupon has joined the channel [06:33] otakutomo has joined the channel [06:34] fangel has joined the channel [06:36] alexM has joined the channel [06:37] alexM: Hello all ^) [06:42] alexM: Sorry tell me please good IDE for node.js :) [06:43] skm has joined the channel [06:43] alexM: Sorry tell me please IDE for node.js [06:43] cmr: vim, emacs. I've heard good things about textmate [06:44] vol4ok_ has joined the channel [06:44] Garo_: alexM: I'm using WebStorm from Jetbrains [06:45] gkatsev: you can use intellij idea to get all the same features, since webstorm isn't free [06:46] Aria: I use vi and a shell. But I prefer my IDE less integrated. [06:46] cmr: Aria++ [06:46] catb0t: Aria now has 1 beer [06:47] cmr: catb0t: die in a fire [06:47] catb0t: fire any sort of 'line mode' die [06:47] Garo_: idea isn't free if you want to do commercial programming, if I recall correctly [06:47] Garo_: but even then WebStorm costs pennies [06:48] gkatsev: Garo_: idea costs money if you need J2EE. but everything else is free [06:48] gkatsev: I mean, yeah, webstorm isn't expensive but anything is expensive compared to free. [06:48] alexM: senk's for all cool ))) 1000 beer [06:49] Garo_: gkatsev: afaik the community edition doesn't have javascript support [06:49] gkatsev: Garo_: you need to install a plugin afaik [06:50] Garo_: gkatsev: according to this, it isn't: http://www.jetbrains.com/idea/features/editions_comparison_matrix.html?IC [06:50] rgl has joined the channel [06:50] Garo_: gkatsev: the javascript plugin was opensource in the past but not anymore [06:50] gkatsev: hm... [06:51] raincole has joined the channel [06:51] churp has joined the channel [06:53] gkatsev: Garo_: looks like this will work: http://plugins.intellij.net/plugin/?idea_ce&id=6098 or something [06:53] gkatsev: but yeah, I guess it isn't supported by jetbrains in the free version anymore [06:54] Garo_: gkatsev: it still depends on hte JavaScript and JavaScriptDebugger plugins [06:54] gkatsev: ok [06:54] alexM: senk's for all ) [06:54] Garo_: anyway, the personal edition of webstorm costs just 43 euros. It's like six beers or something :) [06:56] alexM: In my country 43 euros it'is 430 grn :) [06:56] kishoreyekkanti has joined the channel [06:56] alexM: 1000 beers [06:59] alexM: Sorry who now sqlite modules work's in windows plaform i install this module bar runing with one error [07:00] alexM: Error like slite_bindings not founds [07:01] alexM: Recomiling slite in cgwin from src ? [07:02] alexM: sorry recompiling sqlite3 [07:02] jsvana: I just built node from git source, but node -v tells me 0.4.11. I need >= 0.6.1. Ideas? [07:04] alexM: Agoooo!!! any one know? [07:04] alexM: sqlite3 modules suport in windows os [07:05] alexM: ( [07:05] coderarity has joined the channel [07:05] alexM: all sleeping) [07:07] alexM: Oo )) console.log() - in colors [07:07] GrizzLyCRO has joined the channel [07:09] alexM: Who know color output in stdout node.js [07:09] dingomanatee has joined the channel [07:10] benvie: https://github.com/Benvie/Node.js-Ultra-REPL like so? [07:11] coderarity_ has joined the channel [07:12] alexM: Where i fount docs for building modules to node.js [07:12] duko has joined the channel [07:13] duko: hi i need to control log message in a node.js application i've made [07:13] duko: is it best to make one log object and pass that around to the other objects? [07:14] duko: my application is spread across multiple files and so this seems messy [07:14] eladb has joined the channel [07:18] lzhang has joined the channel [07:19] Garo_: duko: just use the standard console.log() facility [07:19] devdazed_ has joined the channel [07:19] Garo_: duko: and then you can override the default console object with your own if you for example need to forward the log messages to syslog, or limit it by levels [07:20] duko: Garo_ I need more granular control [07:20] MerlinDMC has joined the channel [07:20] Garo_: duko: how granual? [07:20] duko: i need to supress some messages in some situations [07:20] duko: i only need two levels [07:20] duko: one that always shows and another that can be disabled [07:20] duko: i could build my own [07:21] Garo_: the console has info, warn, error, critical and debug() functions beside the normal .log() function [07:21] duko: but the implementation is what I'm unsure of [07:21] duko: i didn't know that [07:21] duko: can these be disabled? [07:21] Garo_: no, but you can do it by yourself [07:21] duko: so that calls can be made to them and their output will be supp... [07:21] duko: hm [07:21] Garo_: duko: check my scribe npm package, it has a logger.js implementation which overrides the default console [07:21] Garo_: https://github.com/Applifier/node-scribe/blob/master/lib/logger.js [07:22] cmr: I've heard things about winston [07:22] cmr: No idea what it was or what it does. [07:22] cmr: But it was mentioned around this similar topic [07:23] duko: winston looks amazing [07:23] duko: but it would be overkill for what i need [07:23] Garo_: duko: that doesn't support limiting by levels, because we haven't needed such feature, but it replaces the default console object with our own, which implements all its features. You can then keep using the console.*() functions in your program and just drop-in this as a replacement [07:24] duko: i'm more likely to build my own [07:24] Garo_: duko: just take that as a template and implement your own features. You can log the messages to stdout or to stderr with process.stderr.write(msg + "\n"); [07:24] duko: i'm sorry :( [07:24] Garo_: duko: no problem [07:24] Garo_: duko: but the point is that you should implement your own as a replacement to the console class [07:24] duko: a simple logger could be made in less than 10 lines for what i'm doing [07:24] Garo_: so that all your code will still use the console.*() methods [07:24] magnetik has joined the channel [07:24] duko: yeah that is what i am doing [07:24] Garo_: :) [07:25] Garo_: feel free to take my code as a template and roll your own implementation on top of that. just strip all scribe stuff out will be a good start :) [07:25] luke` has joined the channel [07:26] Garo_: duko: remember that the default console object has also trace(), assert() and dir() functions which you should also implement, but you can just copy those from my code [07:26] cmr: Garo_: why not just monkeypatch console.log? [07:27] Garo_: cmr: that's also an option. But I felt it better to build a complete replacement and then just replace it via global.console = mynewconsole; [07:28] Garo_: but that decision is open to argumentation [07:29] cmr: Garo_: well, in your case sure, but in duko's case monkeypatching just console.log seems saner [07:30] duko: i think that optimal usage of a logger in this way would require that imported files return an object rather than a collection of functions [07:30] duko: so that the logger only needs to be passed to an entity once, at instantiaion time [07:31] duko: er, instantiation is not valid in js [07:31] duko: definition i should say [07:32] Garo_: you shouldn't try to pass your logger to every function/class/object in your code which needs to log something. Instead just stick with using the console.log(), console.debug(), console.error() etc functions, because those are the default and they work everywhere even without your custom logging. Just replace the global console function and then everything will still work with or without your console replacement [07:33] duko: ah you are a genius! [07:33] duko: that is what i was looking for! [07:33] duko: i didn't think about redefining them [07:34] duko: terrific [07:34] Garo_: if you look my logger.js again, it works just like that. you start using it by saying require('logger').replaceConsole(); [07:34] Garo_: duko: and then magically everywhere where you use the standard console.log() stuff, will now use your own logger [07:35] duko: is it available through npm? [07:35] Garo_: oh sorry, the correct form to use it is to say: var logger = new Logger(...); logger.replaceConsole(); [07:36] Garo_: duko: it is, via the 'scribe' npm package. But as you said, it doesn't suit you as it logs to scribe [07:36] Garo_: just fork your own by using my code as a template [07:36] duko: thank you Garo_ [07:38] EyePulp has joined the channel [07:38] counterbeing has joined the channel [07:39] braoru has joined the channel [07:39] counterbeing has joined the channel [07:41] cjm has joined the channel [07:44] socketio\test\13 has joined the channel [07:45] Morkel has joined the channel [07:46] davetayls has joined the channel [07:48] bergie has joined the channel [07:48] smathy has joined the channel [07:52] mikeal has joined the channel [07:53] Wizek has joined the channel [07:54] jacobrask has joined the channel [07:55] ParadoxQuine has joined the channel [07:55] avih_ has joined the channel [07:56] beejeebus has joined the channel [07:57] boehm has joined the channel [07:58] p1d has joined the channel [07:59] notifybot1 has joined the channel [07:59] notifybot2 has joined the channel [08:00] eddyb has joined the channel [08:01] mytrile has joined the channel [08:02] wmage has joined the channel [08:03] _eddyb_ has joined the channel [08:03] skm has joined the channel [08:06] matejv has joined the channel [08:06] stagas has joined the channel [08:10] djazz1 has joined the channel [08:10] postmodern has left the channel [08:18] bemson has joined the channel [08:18] michaelhartau has joined the channel [08:18] ablomen has joined the channel [08:20] paera has joined the channel [08:22] kishoreyekkanti_ has joined the channel [08:23] LeMike has joined the channel [08:23] HT has joined the channel [08:31] Druide_ has joined the channel [08:31] rgl has joined the channel [08:32] hotroot has joined the channel [08:32] hotroot has left the channel [08:33] hotroot has joined the channel [08:33] hotroot has left the channel [08:33] Morkel has joined the channel [08:36] erikzaadi has joined the channel [08:38] HektoR7 has joined the channel [08:40] kazupon has joined the channel [08:40] level09 has joined the channel [08:43] k1ttty has joined the channel [08:44] mraleph has joined the channel [08:44] pyparadigm has joined the channel [08:44] buttface has joined the channel [08:44] jbpros has joined the channel [08:45] Marak_ has joined the channel [08:45] robinhoode has joined the channel [08:45] Marak_: anyone ever get crazy npm errors like this? https://gist.github.com/1527134 [08:46] Marak_: Error: ENOENT, no such file or directory '/tmp/npm-1325060978472/1325060980796-0.6687903921119869/___package.npm/package/CHANGES' [08:47] butu5 has joined the channel [08:47] butu5: Marak_: exactly this error I faced 2 day back.. some way it gone automatically [08:48] confoocious has joined the channel [08:48] confoocious has joined the channel [08:48] butu5: u r getting this error while installing any module? [08:48] butu5: or specific one? [08:48] Marak_: npm install jitsu -g [08:49] mikl has joined the channel [08:49] butu5: can u try another module (anything) just to be sure u rnot getting same error [08:51] pyparadigm has joined the channel [08:51] MerlinDMC has joined the channel [08:52] Wizek-other has joined the channel [08:54] mara has joined the channel [08:54] [AD]Turbo has joined the channel [08:59] aliem has joined the channel [08:59] tytsim has joined the channel [09:00] lzskiss has joined the channel [09:01] bergie has joined the channel [09:02] dexter_e has joined the channel [09:05] [AD]Turbo: hi there [09:07] Nassosdim has joined the channel [09:08] `3rdEden has joined the channel [09:08] kishoreyekkanti_ has joined the channel [09:09] DamonOehlman has joined the channel [09:09] sgimeno has joined the channel [09:12] aaronmcadam has joined the channel [09:14] k1ttty has joined the channel [09:15] k1ttty has joined the channel [09:16] coderzach: With something like flatiron.js, if your router is running on the client, where should you do authorization? [09:19] kishoreyekkanti_ has joined the channel [09:20] kishoreyekkanti_ has joined the channel [09:20] Wizek has joined the channel [09:21] stagas has joined the channel [09:22] alexM: how to use socket.io like sessions if user link in browser to new tab [09:22] ivanfi has joined the channel [09:23] alexM: how to use socket.io like sessions if user link in browser to new tab [09:25] musiclover1024 has joined the channel [09:25] alexM: Who knows ? how to use socket.io like sessions if user link in browser to new tab [09:25] p1d has joined the channel [09:25] musiclover1024: hi, i'm using node.js, mongodb and mongoose and i'm trying to make a test chat app. What's a good way to have a schema for this particular use case? i know mongoose doesn't support capped collections (plus capped collections are maxed at 24k collections right?) [09:27] jakeskik: hey, i wrote a small template engine for client side routing. [09:27] erikzaadi: :w [09:27] mikeal has joined the channel [09:27] jakeskik: Would anyone be interested in taking a look? I'd love to get some feedback [09:28] jakeskik: https://github.com/pyykkis/transparency [09:28] shinuza has joined the channel [09:28] mike5w3c has joined the channel [09:30] martndemus has joined the channel [09:30] larssmit has joined the channel [09:30] whitman has joined the channel [09:31] martndemus has joined the channel [09:32] hemanth has joined the channel [09:33] idea-squirrel has joined the channel [09:35] saesh has joined the channel [09:35] cclarke has joined the channel [09:35] clu3 has joined the channel [09:36] shinuza has joined the channel [09:39] magnetik: I have "Error" at this line : throw new VerificationAgentError("test"); [09:39] magnetik: code of VerificationAgentError is : http://pastebin.com/vANTuna6 [09:39] magnetik: I really don't get it [09:42] coderzach: jakeskik: that's pretty impressive, especially since it's only 70 lines [09:43] cognominal_ has joined the channel [09:43] defied has joined the channel [09:44] mehlah has joined the channel [09:50] gigafied has joined the channel [09:50] mytrile: Marak_: I've seen this yesterday while trying to install hook.io, but now I've tried it and it worked [09:51] Marak_: mytrile: i think its npm [09:51] cclarke has joined the channel [09:51] itayneeman has joined the channel [09:52] mytrile: Marak_: I've installed hook.io with no errors on my linux machine, but on my mac it gave me that error yesterday [09:52] mytrile: Marak_: btw great work on hook.io [09:53] cognominal___ has joined the channel [09:53] tanguy_ has joined the channel [09:53] Marak_: mytrile: thanks! it's a big team effort! [09:53] Marak_: mytrile: i'm working on something for it right now... :-) [09:54] mytrile: Marak_: cool :) [09:55] OmidRaha has joined the channel [09:55] hugdubois has joined the channel [09:55] cclarke has joined the channel [09:57] cclarke has joined the channel [09:59] ppcano has joined the channel [10:00] cclarke has joined the channel [10:00] jakeskik: coderzach: thanks :] [10:01] fly-away has joined the channel [10:01] defied1 has joined the channel [10:02] adambeynon has joined the channel [10:02] hugdubois_ has joined the channel [10:03] hugdubois_ has joined the channel [10:03] hugdubois_ has joined the channel [10:04] eddyb: http://slexy.org/view/s2etYwZdmu [10:04] eddyb: question [10:04] eddyb: why the heck does node.js can't load a module built from that file? [10:04] hugdubois_ has joined the channel [10:04] eddyb: http://nodejs.org/docs/latest/api/addons.html [10:04] eddyb: void Initialize (Handle target); [10:04] eddyb: NODE_MODULE(module_name, Initialize) [10:04] eddyb: well, I got a semicolon there, but nevertheless, it should work [10:05] jimt has joined the channel [10:05] eddyb: instead, it does this "No module symbol found in module" [10:05] hipsters_ has joined the channel [10:06] eddyb: the module is there [10:06] wink has joined the channel [10:06] criswell has joined the channel [10:11] k1ttty has joined the channel [10:11] jonaslund has joined the channel [10:12] icewhite has joined the channel [10:13] larsschenk1 has joined the channel [10:13] larsschenk1 has left the channel [10:14] kulor-uk has joined the channel [10:15] icewhite has joined the channel [10:16] kishoreyekkanti_ has joined the channel [10:17] cclarke has joined the channel [10:18] kishoreyekkanti has joined the channel [10:18] madhums has joined the channel [10:19] ph^ has joined the channel [10:19] _eddyb_ has joined the channel [10:20] crodas has joined the channel [10:20] devdazed_ has joined the channel [10:20] iRoj has joined the channel [10:20] cclarke has joined the channel [10:21] nicholasf has joined the channel [10:23] herbySk has joined the channel [10:24] r04r has joined the channel [10:24] r04r has joined the channel [10:24] raincole has joined the channel [10:24] flower1 has joined the channel [10:24] Frippe has joined the channel [10:26] stinnes has joined the channel [10:27] djazz has left the channel [10:29] hemanth1 has joined the channel [10:30] defied has joined the channel [10:31] neilk_ has joined the channel [10:32] rendar has joined the channel [10:33] hemanth1 has left the channel [10:33] defied1 has joined the channel [10:37] zilch has joined the channel [10:50] _eddyb_ has joined the channel [10:50] _eddyb_ has joined the channel [10:52] hugdubois has joined the channel [10:53] defied1 has left the channel [10:53] mikl has joined the channel [10:55] __doc__ has joined the channel [10:56] Cromulent has joined the channel [10:56] zemanel_ has joined the channel [10:57] hugdubois has joined the channel [10:57] hugdubois_ has joined the channel [10:57] juria_roberts has joined the channel [11:01] juria_roberts: can some1 tell me how to set cache control and expires header specificall cache control max-age as 24 hrs and it must revalidate and expires is 1 24s after current time? [11:03] mehlah has joined the channel [11:04] optixx has joined the channel [11:05] ger^kallisti has joined the channel [11:06] svnlto: are there any resources on securing nodejs etc? [11:06] duko has left the channel [11:07] Juan77 has joined the channel [11:08] Witnes5 has joined the channel [11:09] Nasty6 has joined the channel [11:11] vol4ok_ has joined the channel [11:12] Provito has joined the channel [11:15] d0k has joined the channel [11:19] pekim_ has joined the channel [11:22] stagas has joined the channel [11:22] liar has joined the channel [11:23] juria_roberts: can some1 please tell me if the folllowing is correct [11:23] juria_roberts: var offset = 86400; [11:23] juria_roberts: res.writeHead(200, { [11:23] juria_roberts: 'Content-Type': 'text/javascript;charset=utf-8', [11:23] juria_roberts: 'Cache-Control': 'max-age='+offset+', must-revalidate', [11:23] juria_roberts: 'Expires':new Date(new Date().getTime()+offset).toUTCString()}); [11:24] juria_roberts: i couldn't find the syntax so i winged it [11:24] MerlinDMC has joined the channel [11:24] booo has joined the channel [11:28] framlin_: is there any solution for the following error: https://gist.github.com/1469394 [11:28] framlin_: ?? [11:30] framlin_: I havbe update node to 0.6 and nothing is running any more :( [11:31] framlin_: is there any documentation how to migrate from 0.4 to 0.6? [11:33] topaxi: framlin_: https://github.com/joyent/node/wiki/API-changes-between-v0.4-and-v0.6 [11:34] saesh has joined the channel [11:37] jbpros has joined the channel [11:40] pickels_ has joined the channel [11:43] davetayls has joined the channel [11:45] d0k_ has joined the channel [11:47] stagas has joined the channel [11:47] shinuza has joined the channel [11:51] drudge has joined the channel [11:51] hij1nx has joined the channel [11:51] booo has joined the channel [11:55] itayneeman has joined the channel [11:56] teadict: now everyone writes a JSON parser with events? [11:56] teadict: must be easier than hell [11:59] buttface has joined the channel [12:01] stagas has joined the channel [12:02] koo0 has joined the channel [12:02] plutoniix has joined the channel [12:08] framlin_: topaxi: thanks! [12:08] schlitzer|freihe has joined the channel [12:10] 5EXAATXKN has joined the channel [12:11] kulor-uk has joined the channel [12:12] cclarke has joined the channel [12:15] OmidRaha has left the channel [12:16] _olouv_ has joined the channel [12:16] kishoreyekkanti_ has joined the channel [12:16] _olouv_ has joined the channel [12:17] ph^_ has joined the channel [12:18] avih has joined the channel [12:19] Tombart001: hey, I have a problem with node.js on Gentoo server. it is an AMD64 machine. when try to run node.js from console I get: [12:19] Tombart001: FATAL ERROR: v8::Debug::SetDebugMessageDispatchHandler Error initializing V8 [12:19] martndem_ has joined the channel [12:19] Tombart001: is there a way how to trace this? [12:23] Cromulent has joined the channel [12:24] paulbaumgart has joined the channel [12:24] avih has joined the channel [12:26] [[zz]] has joined the channel [12:28] avih has joined the channel [12:28] cclarke has joined the channel [12:32] cclarke has joined the channel [12:32] martndemus has joined the channel [12:34] cclarke has joined the channel [12:34] Morkel has joined the channel [12:35] ablomen: Tombart001, http://comments.gmane.org/gmane.comp.lang.javascript.nodejs/25113 << have you tried this? [12:37] cclarke has joined the channel [12:38] teadict: http://paste.ubuntu.com/785637/ [12:38] Tombart001: ablomen, if you mean ulimit virtual memory (kbytes, -v) unlimited. then yes [12:38] ablomen: ok [12:39] teadict: I still don't understand npm errors.. [12:39] teadict: node-proxy is failing to install.. okay.. [12:39] PhilK has joined the channel [12:40] Tombart001: it is a virtual server, maybe the memory managemet is a bit different [12:40] koo0 has joined the channel [12:41] martndemus has joined the channel [12:41] cclarke has joined the channel [12:42] ablomen: well i have not had any problems installing it on linux vps's myself, but maybe you have to little ram in that virtual server? (just a wild guess) [12:43] teadict: what's node-waf? [12:44] hellp has joined the channel [12:44] teadict: sls [12:44] teadict: w/w [12:47] PhilK has joined the channel [12:47] buttface_ has joined the channel [12:48] pickels__ has joined the channel [12:48] mikl has joined the channel [12:49] ericmuyser has joined the channel [12:50] mytrile has joined the channel [12:51] thax has joined the channel [12:52] jomoho has joined the channel [12:53] teadict: alright, alright, now works on 0.6.6, things going better, I'm pleased [12:53] teadict: stupid github addiction making you clone everything from nightlys [12:54] teadict: http://comingupmilhouse.com/ [12:55] robinhoode has joined the channel [12:55] NothingMan65 has joined the channel [12:55] Nss has joined the channel [12:56] a_meteorite has joined the channel [12:57] Tombart001: it is probably issue on AMD64 machines, when I compile V8 by myself I get strange errors [12:57] Tombart001: mksnapshot obj/release/snapshot.cc # Fatal error in v8::Context::New() [12:58] cclarke has joined the channel [12:58] tytsim has joined the channel [12:59] ablomen: Tombart001, http://packages.gentoo.org/package/net-libs/nodejs << did you try the one in the repositories? maybe they added some patches [13:00] plutoniix has joined the channel [13:00] [[zz]] has joined the channel [13:00] xemium99 has joined the channel [13:00] mraleph: Tombart001: so is this ouput http://paste.ubuntu.com/785642/ with change code_size_? [13:01] bombay has joined the channel [13:01] mraleph: I meant with lowered code_size_ [13:01] cclarke has joined the channel [13:01] mraleph: argh. code_range_size_ [13:02] Tombart001: yes, I changed the value to 32*MB for the case of V8_TARGET_ARCH_X64 [13:02] neurodrone has joined the channel [13:02] CrisO has joined the channel [13:02] mraleph: Tombart001: it does not look like it rebuilt anything it should rebuild at least heap.cc after such change [13:02] jbpros has joined the channel [13:03] xemium99 has left the channel [13:04] mraleph: Tombart001: sometimes node's build system fails to see changes, try removing heap.o from out/Release/obj/release/ [13:04] mraleph: Tombart001: and then rebuilding [13:04] mraleph: it should recompile heap.cc [13:04] fairwinds has joined the channel [13:05] martndemus has joined the channel [13:05] Tombart001: this one is done with gmake: http://paste.ubuntu.com/785658/ [13:06] whitman has joined the channel [13:07] martndem_ has joined the channel [13:09] feeeR has joined the channel [13:09] Tombart001: the heap.cc was recompiled and it fails at this point. so, you're right... it is connected to this issue [13:09] jbpros has joined the channel [13:09] kyonsalt has joined the channel [13:10] mraleph: Tombart001: *sigh* so it's not code range size. what a pity. I guess you need to walk with debugger through initialization to see which step fails. [13:12] mraleph: Tombart001: alternatively you can go to Heap::Setup and replace all return false there with { PrintF("%s:%d\n", __FILE__, __LINE__); return false; } [13:12] towski has joined the channel [13:12] olegp has joined the channel [13:12] mraleph: then recompile and check if anything will be printed. [13:12] Tombart001: which debugger would you suggest? [13:12] mraleph: the only one: gdb [13:13] martndemus has joined the channel [13:13] mraleph: or you can try inserting debug prints as I suggested above. it might be faster then walking through V8 innards. [13:14] mraleph: I usually rely on debug prints, they help to localize failure faster than debugger. [13:14] izepstan has joined the channel [13:15] coderarity has joined the channel [13:15] Poetro has joined the channel [13:16] draginx has joined the channel [13:18] Tombart001: line 5342: if (!code_space_->Setup(NULL, 0)) { PrintF("%s:%d\n", __FILE__, __LINE__); return false; } [13:18] brianseeders has joined the channel [13:20] martndemus has joined the channel [13:21] devdazed_ has joined the channel [13:22] stagas has joined the channel [13:22] towski_ has joined the channel [13:23] fumanchu182 has joined the channel [13:24] mraleph: hmm. [13:24] erichynds has joined the channel [13:24] level09 has joined the channel [13:26] Neil__ has joined the channel [13:27] mraleph: what's your node version? [13:27] matejv has joined the channel [13:28] mraleph: ah 0.6.6 [13:28] Tombart001: yes, from github v0.6 branch [13:30] mraleph: Tombart001: now try the same replacement in spaces.cc in PagedSpace::Setup (return false to …) [13:31] bnoordhuis has joined the channel [13:31] mraleph: I am pretty sure that it's the one on line 850 failing [13:31] erikzaadi has joined the channel [13:32] tokuhirom has joined the channel [13:32] silky has joined the channel [13:33] Tombart001: yes, you're right [13:34] mraleph: Tombart001: try adding PrintF("CodeRange::AllocateRawMemory failed"); before return NULL at line 248 at spaces.cc I think it's the only place where it can fail at this point [13:34] Nopik has joined the channel [13:35] strevat_ has joined the channel [13:35] jbpros has joined the channel [13:35] Nopik: hm, it seems that this room have more members than #rubyonrails.. nice ;) [13:35] arcanis has joined the channel [13:36] Tombart001: yes, it's that line [13:36] Nopik: hi all, btw ;) [13:36] coderzach: Nopik: indeed [13:36] jmar777 has joined the channel [13:37] mraleph: Tombart001: this is very strange. [13:38] jetienne has joined the channel [13:39] mraleph: Tombart001: it might be that your VM doesn't allow to commit executable memory. [13:40] tjfontaine: selinux or the like [13:41] N0va` has joined the channel [13:42] kyonsalt has joined the channel [13:43] CIA-109: libuv: 03Ben Noordhuis 07master * r85f6b79 10/ (include/uv-private/uv-unix.h include/uv.h): Fix Windows build, uv_eio_channel is Unix only. - http://git.io/wxeBOA [13:44] mraleph: Tombart001: in platform-linux.cc in VirtualMemory::Commit before return false add PrintF("failed to commit %p %x bytes: %s\n", address, size, strerror(errno)); [13:44] mraleph: Tombart001: this should tell us a little bit more about failure. [13:44] Tombart001: that's pretty strange. how much memory it's trying to allocate? [13:44] mraleph: 64k I think [13:46] ovaillancourt has joined the channel [13:46] jxie_ has joined the channel [13:46] mraleph: 256 k actually [13:47] mraleph: but it does not matter if your linux just always forbids allocating executable memory [13:47] Tombart001: I changed it to: PrintF("failed to commit %p %x\n", current.start, current.size); [13:48] Tombart001: failed to commit 0x291ec71e000 20000000 [13:49] level09 has joined the channel [13:49] xy has joined the channel [13:50] Morkel has joined the channel [13:50] mraleph: well errno is what I was interested in :-) also address and size are different from current.address and current.size [13:51] Tombart001: it's requesting 262144 [13:53] insin has joined the channel [13:53] Tombart001: sorry. here we go: failed to commit 0x370c098a000 40000 bytes: Operation not permitted [13:54] stelcheck has joined the channel [13:55] jstonne has joined the channel [13:55] mraleph: well it says it [13:55] mraleph: apparently your kernel does not allow to map executable memory [13:55] mraleph: probably a security measure. [13:55] jstonne has left the channel [13:56] jstonne has joined the channel [13:56] hipsters_ has joined the channel [13:58] AaronMT has joined the channel [13:58] stelcheck has joined the channel [13:59] lwille has joined the channel [13:59] xemium99 has joined the channel [14:00] robinduckett has joined the channel [14:02] teadict: alright.. ACL.. let's lookie here [14:03] Tombart001: I removed the noexec flag from /etc/fstab [14:03] Tombart001: shm on /dev/shm type tmpfs (rw,nosuid,nodev) [14:03] jxie has joined the channel [14:03] arcanis has joined the channel [14:03] Neil__ has joined the channel [14:05] teadict: nice, has exress middlewere [14:05] teadict: I mean, express middleware [14:05] teadict: this is going to be easy! [14:05] jbpros has joined the channel [14:06] mraleph: Tombart001: did it help? [14:06] Tombart001: no :( [14:07] mraleph: is it still operation not permitted? [14:08] a_meteorite has joined the channel [14:08] kriszyp has joined the channel [14:09] mraleph: Tombart001: paxctl -v out/Release/node [14:09] mraleph: I think you can disable this protection level with paxctl [14:10] mraleph: paxctl -m out/Release/node should disable this security measures [14:10] mraleph: for node binary [14:10] nathanpalmer has joined the channel [14:11] blup has joined the channel [14:13] Tombart001: out/Release/obj/release/: No such device [14:14] mraleph: wtf. paxctl -m ./node? [14:15] Tombart001: it failed compiling, so the link points to non-existing file [14:16] lazyshot has joined the channel [14:16] drudge has joined the channel [14:17] p1d has joined the channel [14:17] bkaney has joined the channel [14:18] Tombart001: sysctl -a: http://paste.ubuntu.com/785726/ [14:18] piscisaureus_ has joined the channel [14:18] Tombart001: there might be some crazy security flag [14:21] tytsim has joined the channel [14:21] koo1 has joined the channel [14:22] mraleph: Tombart001: ah it failed compiling! [14:22] mraleph: Tombart001: but you still have some prebuild node that does not start somewhere, right? [14:23] mraleph: Tombart001: try paxctl -m that one. [14:23] draginx has left the channel [14:24] mraleph: alternatively you can use paxctl -m on mksnapshot and try building again. [14:24] AviMarcus has joined the channel [14:27] rwaldron has joined the channel [14:27] Tombart001: in fact I have many of them :) [14:27] Tombart001: on the gentoo portage it doesn't work [14:29] Tombart001: wow. it seems to work on the github build with --no-snapshop flag [14:29] Tombart001: thanks a lot! [14:29] mraleph: you are welcome [14:33] saschagehlich has joined the channel [14:37] level09 has joined the channel [14:38] CrisO has left the channel [14:38] cody-- has joined the channel [14:39] jyp has joined the channel [14:39] Leemp2: In Node (or JS) is there a module with a set of error objects for common failures? Such as Invalid Arguments, or expecting certain types? Something just somewhat standardized, so people can try to catch an error they might expect and be ok with, but not other errors they don't expect? [14:39] Drakonite has joined the channel [14:42] devdazed has joined the channel [14:46] saschagehlich: hey folks [14:47] saschagehlich: did anyone ever get "AttributeError: 'NoneType' object has no attribute 'copy' " when trying to do "node-waf configure build" with node-canvas? [14:47] pyparadigm has joined the channel [14:51] Shaun_ has joined the channel [14:52] jeromegn has joined the channel [14:55] p1d has joined the channel [14:56] jergason has joined the channel [14:56] tap5 has joined the channel [14:57] mattgifford has joined the channel [14:57] enmand has joined the channel [14:59] p1d_ has joined the channel [15:00] napperjabber has joined the channel [15:02] boltR has joined the channel [15:02] Venom_X has joined the channel [15:02] CAP2732 has joined the channel [15:05] `3rdEden has joined the channel [15:06] saschagehlich has joined the channel [15:06] philipd has joined the channel [15:11] devongovett has joined the channel [15:11] Nathan_ has joined the channel [15:11] nrstott has joined the channel [15:11] stagas has joined the channel [15:15] mspahn: Looking for a proper solution to change express (jade) templates live - I'd like to change the template by a remote call. [15:19] whitman_ has joined the channel [15:20] mike5w3c_ has joined the channel [15:20] `3rdEden has joined the channel [15:20] thalll has joined the channel [15:22] hotchkiss has joined the channel [15:23] teadict: why do you need to do that? ^.- [15:23] framlin_: is there any solution for the following error: https://gist.github.com/1469394 [15:25] bombay has joined the channel [15:25] mspahn: teadict, I just want to do that - I'm thinking in classic webservers and php - that is why I'm asking for a proper solution :-) [15:25] storrgie has joined the channel [15:26] teadict: I meant what are you doing with that, sounds interesting... wasn't judging how you're doing it :) [15:26] teadict: maybe "why" wasn't the best word [15:28] Venom_X: mspahn: why? [15:28] liar has joined the channel [15:29] aelien27 has joined the channel [15:29] mspahn: Delivering static content to the client on request without get / post - I.e. having log in mask and deliver the "real"-content including all templates if the login is successful [15:29] mspahn: Otherwise I could use ExtJS to change my layouts at clientside [15:29] paq has joined the channel [15:31] Nopik: mspahn: usually people redirect visitors to login/error screen upon receiving request from unauthorized user [15:31] Nopik: mspahn: can't you do the same? if user is not logged in, redirect him to /login ? [15:32] jarek has joined the channel [15:32] c4milo has joined the channel [15:32] bradleymeck has joined the channel [15:33] mspahn: Nopik, that happens at the moment and it's great just on success I want to do some magic including changing the templates around [15:33] cjm has joined the channel [15:34] Nopik: mspahn: what do you mean? [15:35] davehamptonusa has joined the channel [15:36] davehamptonusa has left the channel [15:36] thomblake has joined the channel [15:36] thomblake has left the channel [15:37] StrmShdow has joined the channel [15:39] fomatin has joined the channel [15:39] StrmShdow: how do you set the timeout for an http client request? [15:40] bnoordhuis: StrmShdow: req.setTimeout(timeout, [callback]) [15:40] jamescarr has joined the channel [15:40] StrmShdow: bnoordhuis: does request also throw a timeout event? or just the callback? [15:41] bnoordhuis: StrmShdow: just the callback [15:41] StrmShdow: bnoordhuis: awesome, thx [15:42] ryanfitz has joined the channel [15:42] bnoordhuis: StrmShdow: more specifically, it doesn't throw an exception but it does emit a 'timeout' event (that you don't have to listen for) [15:43] Cromulent has joined the channel [15:44] criswell has joined the channel [15:44] MerlinDMC has left the channel [15:46] conancat has joined the channel [15:46] magnetik: Is there any reason why a 'throw' is not intercepted in a try block ? [15:46] rwaldron has joined the channel [15:47] FIQ has joined the channel [15:49] bshumate has joined the channel [15:49] bshumate has joined the channel [15:50] AndreasMadsen has joined the channel [15:50] magnetik: I'm doing : throw new Error("foo"); in a try [15:50] magnetik: The the program shuts down [15:50] magnetik: and the console is pointing : [15:50] magnetik: C:\Documents and Settings\magnetik\git\node-webid-demo\src\server.js:96 [15:50] magnetik: throw new Error("Blah"); [15:51] eee_c has joined the channel [15:51] Morkel has joined the channel [15:52] hotchkiss has joined the channel [15:52] rick- has joined the channel [15:52] thalll has joined the channel [15:52] erikzaadi has joined the channel [15:52] bradleymeck: magnetik paste the try catch in full [15:53] magnetik: http://pastebin.com/rf6hq9dY [15:53] hipsters_ has joined the channel [15:53] superjudge has joined the channel [15:54] arcanin has joined the channel [15:54] magnetik: the line is "throw true" [15:54] magnetik: was a test [15:55] stride: throw true isn't visible to the try catch, it's inside the scope of the callback function in line 8 [15:55] syoyo_ has joined the channel [15:55] bulatshakirzyano has joined the channel [15:55] robhawkes has joined the channel [15:55] magnetik: haaaaaaa, ok [15:55] magnetik: thanks [15:55] kyonsalt has joined the channel [15:56] stefpb has joined the channel [15:57] whoops has joined the channel [15:57] djMax has joined the channel [16:00] djMax: is it possible to store binary data using mongoosejs? [16:01] conancat has left the channel [16:02] kyonsalt_XjeAJ has joined the channel [16:02] tap5 has joined the channel [16:03] kenperkins has joined the channel [16:03] RLa has joined the channel [16:04] enmand has joined the channel [16:05] kitt has joined the channel [16:05] neurodrone has joined the channel [16:06] Destos has joined the channel [16:08] LeMike has joined the channel [16:08] raincole has joined the channel [16:11] Nassosdim has joined the channel [16:12] metalball2 has joined the channel [16:13] whitman has joined the channel [16:13] kyonsalt_VuAaS has joined the channel [16:14] MatthewS has joined the channel [16:17] lzhang has joined the channel [16:18] CarterL has joined the channel [16:20] jarek_ has joined the channel [16:21] mandric has joined the channel [16:23] CIA-109: node: 03Andreas Madsen 07v0.6 * rd483acc 10/ test/simple/test-c-ares.js : test: remove internet test from test/simple/ - http://git.io/wBbvAA [16:25] cognominal has joined the channel [16:25] relix: hey guys [16:25] relix: I'm learning/experimenting with node.js [16:25] Leemp2: In Node (or JS) is there a module with a set of error objects for common failures? Such as Invalid Arguments, or expecting certain types? Something just somewhat standardized, so people can try to catch an error they might expect and be ok with, but not other errors they don't expect? [16:26] relix: I'd like to learn more about organization of files/objects/functions/modules and proper style, is there a good node.js application on github you could point me to to see what it looks like, done right? [16:26] Nopik: relix: try express module, it sets some nice guidelines from the start [16:27] gavin_huang has joined the channel [16:27] stalled has joined the channel [16:28] bradleymeck: Leemp2, if you can't see properties that tell you how to deal with an error (err.code etc.) just let it propagate. If you want to deal with an error you should add information on how to deal with it / what it means up the chain. [16:29] bradleymeck: Leemp2, in short https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error are the defaults, but you should still specify what *really* happened or what should be done [16:30] Leemp2: bradleymeck: Well i'm thinking in more of a context of Python (which may not apply here). The idea being, make custom error objects for many situations. Reuse some simple ones (such as a missing argument), and create custom ones (for some custom thing done wrong) [16:30] relix: thanks Nopik I'll check it out [16:31] mansoor has joined the channel [16:31] Leemp2: bradleymeck: I'm assuming in JS, since there doesn't seem to be a way to "catch (MyExcept e) {}", that the proper way is "catch (err) {if (err.name == 'MyExcept') { //Do Stuff } else { throw err }" ? [16:32] bradleymeck: Leemp2, well the problem with that in Node is extending Error is a little odd and complicated. That and using instanceof is still how you would want to check errors, I would still avoid making custom error types at all [16:32] jaequery has joined the channel [16:32] tbranyen: what is this Java? [16:32] tbranyen: Who extends Error >_< [16:33] bradleymeck: dealing with standardized error codes/messages and/or actions rather than custom building each action ontop of custom types that could do the same thing as eachother but may not in all situations ... (keeps going) [16:33] Leemp2: tbranyen: A Python guy :s [16:33] jeromegn has joined the channel [16:33] mmalecki: we have our own vendored Error implementation. it's enterprise-ready. [16:33] tbranyen: mmalecki: synergize [16:34] Leemp2: bradleymeck: Alright, sounds good (I'd rather do it the right node way, than trying to bring my Python concepts into Node). So, what you're suggesting is.. what exactly? If my code throws an error, i assign a custom name/code/message? So, in my code.. "var err = new Error(); err.code = 100, err.name = 'Bad Stuff'; err.message = 'Really bad stuff happened!'" ? [16:34] bradleymeck: i like the standardized codes / messages that tell me what happened and are documented in a spec much more than munging around source code for customerrors [16:34] level09 has joined the channel [16:34] mmalecki: bradleymeck++ [16:34] tbranyen: error bad success good [16:35] Leemp2: uhh, and also "throw err" heh [16:35] tbranyen: thats how i write my code at least [16:35] bradleymeck: Leemp2, "var err=new Error('Failed to Auth');err.code=403", (i rarely need anything outside of HTTP error codes to take proper action) [16:35] cclarke has joined the channel [16:35] tomlion has joined the channel [16:36] Leemp2: bradleymeck: Is there a list of existing error codes i should avoid? Point being, if two libraries are used and both might throw an exception, is there a standard to make sure i don't throw the same code as another library? [16:36] Leemp2: Seems like this is prone to muddling through all docs for error codes in fear of duplicating codes (Not arguing, just discussing) [16:37] bradleymeck: Leemp2, generally when a user calls your lib you will give it a callback, that is where you give the error code [16:37] bradleymeck: you don't just blindly throw it up the stack (unless it really is a setup error and you don't know WTF is going on) [16:38] Leemp2: Ah, see im just used to different methodologies. If my class fails to initialize due to a bad setup environment, i throw errors heh [16:39] bshumate has joined the channel [16:39] bradleymeck: Leemp2, Node is more functional programming than what most people expect when they fist dive in so its understandable [16:39] ericnakagawa has joined the channel [16:39] Leemp2: But, sounds good. I'll attempt to redesign a bit to support using callbacks more and returning error codes (Though, i swear i'm already using more callbacks than i'd like haha) [16:40] ixti has joined the channel [16:40] bradleymeck: Leemp2, just remember if you don't need the context you can always pull that callback out into a reusable function [16:40] subbyyy has joined the channel [16:40] bradleymeck: or if the context is tied to a custom object you can just extend the prototype [16:46] stagas has joined the channel [16:49] AndreasMadsen_ has joined the channel [16:50] brianloveswords has joined the channel [16:50] koo3 has joined the channel [16:50] farealz has joined the channel [16:50] davehamptonusa has joined the channel [16:51] broofa has joined the channel [16:51] cclarke has joined the channel [16:52] farealz has left the channel [16:53] davehamptonusa has left the channel [16:53] Brainlag has joined the channel [16:53] BrianE has joined the channel [16:55] pizthewiz has joined the channel [16:55] cclarke has joined the channel [16:56] hipster__ has joined the channel [17:00] patcito has joined the channel [17:01] EyePulp has joined the channel [17:02] cjm has joined the channel [17:03] MatthewS has joined the channel [17:04] r1ngzer0 has joined the channel [17:05] hotchkiss: what's the proper way to change your npm email address? i couldn't find anything in the docs [17:05] Cromulent has joined the channel [17:06] erikzaadi has joined the channel [17:07] keeto has joined the channel [17:08] mmalecki: hotchkiss: hey. one of your repos on travis tries to test using node 0.8. [17:08] hotchkiss: ohh.. [17:09] hotchkiss: oh dude my bad i'll change that, a few repos i think - (when i first started using travis i had just copied a .travis.yml from an example) [17:09] hotchkiss: i heard on your nodeup that travis might become a company? [17:10] schlitzer|freihe has joined the channel [17:10] spurge: 22 [17:10] mmalecki: hotchkiss: I think it already is a company :) [17:10] mmalecki: josh-k: ^ ? [17:10] hotchkiss: :P [17:10] hotchkiss: mmalecki++ [17:10] catb0t: mmalecki now has 1 beer [17:10] keeto has left the channel [17:10] josh-k: hey guys [17:10] josh-k: yep, Travis is now a company [17:10] j`ey has joined the channel [17:10] mmalecki: hotchkiss: HOW MUCH WIN IS THAT? [17:11] j`ey: is there a readFileSYnc for reading external files? [17:11] keeto has joined the channel [17:11] TheJH has joined the channel [17:11] hotchkiss: total win! [17:12] josh-k: :) [17:13] StrmShdow: nodejs app architectural question… i have an express app where a single page requests triggers a series of http requests that need to be combined for the response [17:13] pandeiro has joined the channel [17:13] mikl has joined the channel [17:13] jbpros has joined the channel [17:13] StrmShdow: the number of requests depends on user's location and a number of other factors [17:13] StrmShdow: what's the most "nodejs-y" way to do this? [17:14] StrmShdow: right now i have a function that gets called everytime one of the response's emit an end and start aggregating the response [17:14] StrmShdow: and that function keeps track of how many responses it's received and how many it is supposed to receive before rendering [17:15] notifybot has joined the channel [17:15] StrmShdow: something seems inelegant about that approach though [17:15] lazyshot has joined the channel [17:17] braoru has joined the channel [17:17] icebox has joined the channel [17:19] Neps has joined the channel [17:20] ryan_stevens has joined the channel [17:20] StrmShdow: i've repulsed everyone with my terrible design [17:22] t0mmyvyo has joined the channel [17:22] GrizzLyCRO has joined the channel [17:22] adrianF has joined the channel [17:24] fomatin has joined the channel [17:24] Poetro has joined the channel [17:25] willwhite has joined the channel [17:27] blup has joined the channel [17:27] nnisi has joined the channel [17:27] chrisjpowers has joined the channel [17:27] dubenstein has joined the channel [17:29] stefpb has joined the channel [17:30] bradleymeck: StrmShdow, no, that seems like a decent approach but I might use 'request' and 'async' modules to do that [17:31] MUILTR has joined the channel [17:31] tkaemming has joined the channel [17:32] ChrisMatthieu has joined the channel [17:33] Neps has joined the channel [17:33] chrisjpowers has joined the channel [17:34] chrispaterson has joined the channel [17:34] Neps has joined the channel [17:34] TheFuzzball has joined the channel [17:34] jeyb has joined the channel [17:35] chrispaterson: Anyone have experience with underscore.deferred? [17:35] chrispaterson: Yesterday I was trying to do a 'Mixin' with underscore and it didn't work [17:37] JaKWaC has joined the channel [17:37] criswell has joined the channel [17:38] saschagehlich has joined the channel [17:38] jeyb has joined the channel [17:38] dwww1 has joined the channel [17:38] tbranyen: wookiehangover: ping, ^^ [17:38] dwww1 has left the channel [17:39] flip_digits has joined the channel [17:42] djQuery has joined the channel [17:42] saesh has joined the channel [17:43] itayneeman has joined the channel [17:44] kishoreyekkanti has joined the channel [17:45] Edy has joined the channel [17:45] Edy has joined the channel [17:46] JaKWaC has joined the channel [17:46] fomatin: hello [17:47] Me1000 has joined the channel [17:47] ryan_stevens has joined the channel [17:53] marcello3d has joined the channel [17:55] StrmShdow: is there a way to pass arguments for package dependency installations in package.json? (for example, when installing mongodb from the command line, you can do 'npm install mongodb --mongodb:native' - how would you do the same thing inside package.json?) [17:55] mange has joined the channel [17:55] nnisi has left the channel [17:56] pizthewiz has joined the channel [18:01] theycallmeswift has joined the channel [18:02] theycallmeswift: Anyone know if there is a way to specify flags for dependencies in a package.json file? [18:02] counterbeing has joined the channel [18:02] jerrysv has joined the channel [18:03] mattgifford has joined the channel [18:03] TheIronWolf has joined the channel [18:04] djQuery has left the channel [18:05] StrmShdow: theycallmeswift: i just asked the same question :-) [18:07] enmand has joined the channel [18:09] theycallmeswift: StrmShdow: seems like it should be something like "package_name": { "version": "~1.0.0", "flags": "--flag1 foo --flag2 bar"} [18:10] theycallmeswift: doesn't look like it's supported yet [18:10] meandi6 has joined the channel [18:11] optixx has joined the channel [18:11] jaha has joined the channel [18:12] jaha has left the channel [18:13] jonaslund: hmmmm [18:14] jonaslund: any particular reason for not supporting mmapping files ? [18:14] jonaslund: possible stalls ? [18:14] bnoordhuis: jonaslund: node-mmap [18:14] bnoordhuis: though in hindsight that module was a bad idea [18:14] jonaslund: ok ? [18:15] jonaslund: how come ? [18:15] bnoordhuis: mmap'ed data is paged in on demand so it's potentially blocking [18:16] tkaemming_ has joined the channel [18:16] jonaslund: right [18:17] bnoordhuis: it's those potential stalls you mention [18:18] jonaslund: I'm writing a appending database, where you'd have a write master and then all "clients" follow the current logfile [18:19] jonaslund: and not having to duplicate read-only data would've been a good thing [18:19] bnoordhuis: jonaslund: you're probably better off using fs.watch() and fs.read(offset=last_offset) [18:19] jonaslund: i'd still have duplicates [18:19] bnoordhuis: you mean duplicate reads? [18:19] jonaslund: no a duplicate in memory [18:20] bnoordhuis: oh, like that - yeah [18:20] jonaslund: having one mmapped copy of the append log that you read as you go would make it fairly simple (memory is cheap so..) [18:21] captain_morgan has joined the channel [18:21] EuroNerd has joined the channel [18:23] sridatta has joined the channel [18:23] sarlalian has joined the channel [18:25] ayin has joined the channel [18:25] TheJH_phone has joined the channel [18:25] StanlySoManly has joined the channel [18:27] wumpus__ has joined the channel [18:28] liar has joined the channel [18:29] Skaag has joined the channel [18:29] wumpus__: hello guys [18:31] wumpus__: i'm using child_process.spawn(command, args=[], [options]) [18:31] wumpus__: but there is somthing wrong [18:31] wumpus__: this is my code: [18:32] wumpus__: var spawn = require('child_process').spawn; [18:32] devongovett has joined the channel [18:32] wumpus__: var ffmpeg = spawn('ffmpeg', ['-i /path/to/file', '-f mp3', '-acodec libvorbis']); [18:32] Lingerance: var ffmpeg = spawn('ffmpeg', ['-i', '/path/to/file', '-f', 'mp3', '-acodec', 'libvorbis']) [18:33] shripadk has joined the channel [18:33] wumpus__: i get this error [18:33] wumpus__: Unrecognized option 'i /path/to/file' [18:33] tbranyen: ... [18:33] AndreasMadsen: or var ffmpeg = spawn('ffmpeg', "-i /path/to/file -f mp3 -acodec libvorbis".split(" ")); [18:34] wumpus__: ok i got it [18:34] wumpus__: monster fail :) [18:34] wumpus__: ty [18:35] izepstan2 has joined the channel [18:36] Skaag has joined the channel [18:36] Leemp2: What's the best way to get a list of directories at a given path? exec ls? [18:37] tbranyen: readdir ? [18:37] tbranyen: map out the directories [18:37] Leemp2: tbranyen: What's that under? [18:37] tbranyen: fs [18:37] jerrysv has joined the channel [18:37] Leemp2: hmm [18:37] Leemp2: must have missed it, ty [18:38] Leemp2: Ah, i keep forgetting the function's aren't sorted the way i think they are :s [18:38] josephmoniz has joined the channel [18:41] tenderloaf has joined the channel [18:41] chrisjpowers has joined the channel [18:41] jmar777 has joined the channel [18:41] MrNko has joined the channel [18:41] ChrisMatthieu has joined the channel [18:43] p3rsist has joined the channel [18:44] tkaemming_ has joined the channel [18:44] p3rsist: Hi guys. I'm searching for a new server side language. How is node.js compared to python for server side? [18:45] Nopik: p3rsist: and how is python compared to javascript? [18:46] p3rsist: Well guys over the python channel they say that : dash: p3rsist: it's like twisted, just not as good. [18:46] stride: I prefer elephants [18:46] stride: that's a pretty pointless question.. just try both [18:46] p3rsist: I prefer women [18:47] sarlalian has joined the channel [18:49] jonaslund: p3rsist: why are you searching for a NEW one ? [18:49] adrianmg has joined the channel [18:49] `3rdEden has joined the channel [18:49] tenderloaf has left the channel [18:50] p3rsist: well are there any mvc frameworks for node? [18:50] pekim has joined the channel [18:51] rope has joined the channel [18:51] jonaslund: ahhh [18:51] jonaslund: windows native modules [18:51] AviMarcus: p3rsist, of course. [18:52] jonaslund: bnoordhuis: does the node-mmap module work with the current version ? [18:52] p3rsist: I heard that express is quite good [18:52] p3rsist: Any of you guys use it? [18:52] p3rsist: Thanks for the answers [18:52] shripadk: yes [18:52] jonaslund: bnoordhuis: (Last update was in may so i'm kinda wondering) [18:52] shripadk: express is awesome. [18:53] bnoordhuis: jonaslund: it should [18:54] jonaslund: bnoordhuis: ok cool, i might look at making a windows version of the code [18:54] jonaslund: or hmm [18:54] redir_ has joined the channel [18:55] justicefries: hmm. if I'm doing crypto.randomBytes(), how can I convert that SlowBuffer to a hex string? [18:55] justicefries: just trying to get secure random numbers. [18:56] justicefries: or random strings, really. [18:57] bnoordhuis: justicefries: buf.toString('hex')? [18:57] p3rsist: What about math and probabilities librairies [18:57] justicefries: that's exactly what I was looking for...couldn't figure out the encoding. thank you. [18:57] p3rsist: are they good ones for node.js or javascript? [18:58] tuhoojabotti: How to check for SlowBuffer? [18:58] adrianmg has left the channel [18:58] bnoordhuis: tuhoojabotti: you shouldn't have to [18:58] tuhoojabotti: bnoordhuis: Then why do I get slow buffers from udp? [18:59] bnoordhuis: tuhoojabotti: because those buffers don't come from the global slab [18:59] bnoordhuis: counter question, does it matter? [18:59] tuhoojabotti: Well I need to know wether it's string, number or a buffer [18:59] tuhoojabotti: atm I just do new Buffer(slowBuf) [18:59] tuhoojabotti: but I hate doing it [19:00] tuhoojabotti: https://github.com/VesQ/cbNetwork-node/blob/master/src/Server.js#L72 Like that [19:00] tcurdt has joined the channel [19:02] ericnakagawa has joined the channel [19:02] sridatta has joined the channel [19:02] mattgifford has joined the channel [19:04] bnoordhuis: tuhoojabotti: Buffer.isBuffer(buf) // works for both kinds of buffers [19:04] tuhoojabotti: Nice [19:05] jeyb has joined the channel [19:07] socialhack has joined the channel [19:08] jonaslund: hrrrm [19:08] perezd has joined the channel [19:08] jonaslund: I wonder if i should throw away half my old code [19:09] mmalecki: jonaslund: yes :) [19:10] mmalecki: jonaslund: rewriting stuff is good [19:10] flip_digits has joined the channel [19:10] AvianFlu: real men start refactors with rm -rf lib/* [19:10] jonaslund: atleast the parts i wrote before node buffers got the writeTypedBE functions and typed arrays [19:10] mmalecki: AvianFlu++ [19:10] catb0t: AvianFlu now has 1 beer [19:10] nail_: tuhoojabotti: just curious, I'm not sure to understand the reason for that new Buffer(msg) on the code you shown, isn't msg already a Buffer? [19:10] bradleymeck: gf3 opened up an issue with sandbox, let me know if it needs any explaining [19:10] tuhoojabotti: nail_: SlowBuffer [19:11] tuhoojabotti: so basically yeah [19:11] tuhoojabotti: but I didn't know how to check for slowbuffer [19:11] tuhoojabotti: bnoordhuis: Thanks<3 [19:15] gf3: bradleymeck: thanks! [19:15] piscisaureus__ has joined the channel [19:22] Shaunzie has joined the channel [19:22] agnat_ has joined the channel [19:23] chrisjpowers has joined the channel [19:23] alessioalex has joined the channel [19:24] fomatin has joined the channel [19:24] max has joined the channel [19:26] Guest61121: Hi all...I'm new to Node.JS [19:26] Guest61121: I have a question. Wondering if anyone could help with the answer [19:27] criswell has joined the channel [19:27] cmr: Guest61121: Well, until you ask a real question, no one can help [19:28] Guest61121: I noticed that I could download node.js apps via my browser...how can you protect your source from being stolen [19:28] Guest61121: sorry if this is a dumb question [19:29] cmr: Guest61121: you protect your source from being stolen by not exposing it publically on a webserver or such [19:31] thalll has joined the channel [19:31] CarterL has joined the channel [19:31] Guest61121: cmr: thank you [19:32] cmr: And honestly don't rely on technological methods to hide your source. Use legal means, much more effective [19:32] tuhoojabotti: Also Open source ftw! [19:32] cmr: tuhoojabotti++ [19:32] catb0t: tuhoojabotti now has 1 beer [19:32] larsschenk has joined the channel [19:32] cmr: I hate that bot so much [19:33] tuhoojabotti: cmr: I hate the the person who keeps resetting it. :D [19:33] tuhoojabotti: .. console.log("It can be useful, but usually you can just do this locally"); [19:33] catb0t: Exception: ReferenceError: console is not defined [19:33] tuhoojabotti: oh lol [19:33] tuhoojabotti: I thought it used to have that. [19:34] tuhoojabotti: Or it was v8bot [19:34] MooGoo: console.log is a stupidly long debug statement rly [19:34] MooGoo: .. print('hai') [19:34] catb0t: "hai" [19:34] CoverSli1e: .. print("blah") [19:34] catb0t: "blah" [19:34] tuhoojabotti: I do agree. [19:34] CoverSli1e: .. (function(){this.console = {log:print}})() [19:34] catb0t: [19:35] CoverSli1e: .. console.log('blah') [19:35] catb0t: "blah" [19:35] cmr: MooGoo: not really? [19:35] MooGoo: rly [19:35] CoverSli1e: howdya like them apples? [19:35] cmr: If you have a decent editor, it's painless. [19:36] MooGoo: that's no excuse [19:36] tuhoojabotti: MooGoo: It does seem to be quite common excuse actually. [19:36] cmr: What would you prefer? d('this is text') [19:36] MooGoo: sure [19:36] RLa: maybe you want to program in apl instead [19:36] RLa: if writing long identifiers is pain [19:37] cmr: console.log is a perfectly descriptive and good name for what it does. [19:37] MooGoo: that's Java logic [19:37] PhilK has joined the channel [19:37] cmr: Shortness of tokens is not a good goal [19:37] MooGoo: System.Console.WriteLine("asdasd") or something [19:37] stride: ACTION barfs [19:37] MooGoo: that's even more descriptive [19:38] cmr: A fine name. [19:38] tuhoojabotti: WriteLn I think [19:38] MooGoo: that makes all the difference [19:38] tuhoojabotti: :D [19:38] RLa: btw, in node there is also process.stdout.write('Hellow'); [19:38] RLa: you have to use it if you do not want extra line end [19:38] tuhoojabotti: I should definately use that [19:38] larsschenk has joined the channel [19:38] CoverSli1e: .. (function(){for(var i =0,l=255;i> http://www.youtube.com/watch?v=_EEhviEO1Vo [21:59] stride: yeah, I watched the last half I think [22:00] perezd has joined the channel [22:00] tomlion has joined the channel [22:01] Bonuspunk: statement about the attack against node was a bit weird [22:02] stride: why? all they said is that they approached some v8 guys who only have a pretty client-centric view [22:02] itayneeman has joined the channel [22:02] Bonuspunk: yes but the basic node doesnt provide the functionality to do the exploit [22:03] stride: all I've heard about their scenarios, that's stuff the web framework developers have to care about, not node / v8 devs [22:03] stride: yeah [22:03] Bonuspunk: you only get a stream of the body [22:04] Metal3d has joined the channel [22:05] salazr_ has joined the channel [22:06] mara has left the channel [22:08] vol4ok has joined the channel [22:09] tommyvyo has joined the channel [22:09] stride: https://cryptanalysis.eu/blog/2011/12/28/effective-dos-attacks-against-web-application-plattforms-hashdos/ in text form, if anybody cares [22:09] patcito has joined the channel [22:12] bkaney has joined the channel [22:12] CIA-109: node: 03Ryan Dahl 07v0.6 * r448c5e0 10/ src/node_http_parser.cc : [22:12] CIA-109: node: Revert "Add HandleScope to http-parser binding" [22:12] CIA-109: node: This commit did not actually fix the production crashes. [22:12] CIA-109: node: This reverts commit 73cf8e82e768af870964d6f3375ab758e774165c. - http://git.io/jtXrww [22:14] CIA-109: node: 03Ryan Dahl 07master * rb7c05e1 10/ (28 files in 8 dirs): Upgrade V8 to 3.8.3 - http://git.io/AhDBGg [22:16] CoverSli1e: can you give it to me in infographic form? [22:17] Hamms has joined the channel [22:17] mrdnk has joined the channel [22:17] tjfontaine: CoverSli1e: "djb's legacy is still screwing people over" [22:18] xerox: can anybody explain the comma operator? [22:18] CoverSli1e: v8 uses djb2 for hashing? [22:19] TooTallNate: xerox: like within multiple variable declarations? [22:19] xerox: no, outside [22:19] CoverSli1e: xerox: it's like || or &&, except if they were all true [22:19] stonebranch has joined the channel [22:19] jamesbathgate has joined the channel [22:19] TheFuzzball has joined the channel [22:19] xerox: I haven't seen that in any other programming language I came across [22:19] xerox: how is it different from semicolons? [22:19] CoverSli1e: (a=1,b=2,a) returns 1 [22:20] CoverSli1e: semicolons separate statements [22:20] Metal3d has joined the channel [22:20] TooTallNate: xerox: you can smoosh them together on a single 'if' line [22:20] CoverSli1e: commas separate expressions [22:20] a11235_: http://en.wikipedia.org/wiki/Comma_operator [22:20] TooTallNate: there's pretty much never a good reason to use a comma [22:20] xerox: wow [22:20] tbranyen: TooTallNate: you'll have trouble defining objects and arrays [22:20] TooTallNate: haha [22:20] TooTallNate: i meant in that context [22:20] CoverSli1e: npm install coffee-script [22:21] tbranyen: https://github.com/jshint/jshint/issues/56 [22:21] tbranyen: ^^ re comma operator [22:22] jamesbathgate: anyone use https://github.com/Applifier/node-scribe? Trying to figure out if it's stable or not [22:22] CoverSli1e: commas are nice and fun, but there's no problem that can't be solved by other means [22:22] xerox: this is interesting [22:22] mrdnk: hi all. I have a quick question, just been getting into gzipping in node, rawFile.pipe(gzip).pipe(outputFile); (filestreams) and wondered how I might encypt the file data before outputting it to a file; as far as I can see from the docs and a google search, cipher.update(data ... requires data to be data rather than a stream. And gzip requires a stream to gzip. [22:22] tjfontaine: it's for the people who love listcomps in python [22:22] tbranyen: CoverSli1e: yeah i figured out a better way to do that bit of code [22:22] CoverSli1e: most js developers can go their entire career without using them [22:22] mrdnk: - sorry bit of a node n00b [22:23] tbranyen: CoverSli1e: yeah i've seen people do if (something=val, something) not realizing thats the same as removing , something [22:23] xerox: TooTallNate: what did you mean by "smooching them together on a single 'if' line" ? [22:25] mikeal has joined the channel [22:25] CoverSli1e: if(i+=j, typeof arr[i] != 'undefined') [22:25] drudge23 has joined the channel [22:25] xerox: gotcha [22:26] josh-k has joined the channel [22:27] CoverSli1e: it's also last priority, so you can mix with other stuff [22:27] CoverSli1e: but it has a different meaning in var statements [22:27] CoverSli1e: you'd have to parenthesize if you want to use it with var [22:28] Metal3d has joined the channel [22:30] akter has joined the channel [22:33] KarmaTEST has joined the channel [22:34] eee_c has joined the channel [22:37] strevat_ has joined the channel [22:37] Metal3d has joined the channel [22:42] socialhack has joined the channel [22:43] matt7340 has joined the channel [22:43] mrdnk: All: Is it possible / feasible to use a filestream read stream encypt the data and put it out to a filesystem write stream? [22:46] mrdnk: forgot to note the gzipping element before output too. in.pipe(gzip).pipe(out); [22:46] CoverSlide: mrdnk: http://nodejs.org/docs/latest/api/zlib.html#examples [22:46] Renegade001 has joined the channel [22:47] neilk_ has joined the channel [22:49] jesusabdullah: that use of the comma operator I'd avoid outside golfing [22:49] jesusabdullah: personally [22:50] jesusabdullah: That said, jshint should definitely allow you to turn commas off [22:51] hackband has joined the channel [22:56] stagas has joined the channel [22:57] mrdnk: CoverSlide: Yep read that, so I can use... in.pipe(gzip).pipe(out). Then write use the on.data event to get the returned data. Encrypt that data - then I need to turn that buffer into a new 'in'. How do I put the buffer into a stream or alternative in order to output the new encrypted data into the output stream. If that makes any sense? [23:00] mrdnk: A filesystem writestream. Use case: Want to be able to take a file, encrypt it, and place it in another folder - dealing with sensitive files. [23:02] ger^kallisti has joined the channel [23:03] Metal3d has joined the channel [23:03] lem0nbyte has joined the channel [23:03] Cromulent has joined the channel [23:04] TheJH: #hashDoS sounds bad [23:04] enmand has joined the channel [23:05] TheJH: watching the video about it right now [23:05] Wa has joined the channel [23:06] TheJH: apparently, v8 is affected, too [23:10] iigrat has joined the channel [23:10] TheJH: and I think it's pretty hard to fix [23:10] slickplaid: anyone have a new link to the hashdos video? link I have says the video has been removed :/ [23:10] TheJH: slickplaid, http://ccc.synthomat.de/rec/28c3/28c3-4680-en-saal1-2011-12-28_14-00-effective_dos_attacks_against_web_application_platforms-2011-12-28T13: [23:11] nicholasf has joined the channel [23:11] slickplaid: ty [23:11] slickplaid: 404 :( [23:11] tbranyen: http://ccc.synthomat.de/rec/28c3/28c3-4680-en-saal1-2011-12-28_14-00-effective_dos_attacks_against_web_application_platforms-2011-12-28T13:53:26.340917.avi [23:12] slickplaid: nm found it [23:12] slickplaid: ah ty :) [23:12] Metal3d has joined the channel [23:13] TheJH: slickplaid, also for BT: magnet:?xt=urn:btih:1d5f243f0e3724a014d49117e5b97df121d8c8e1&dn=28c3-4680-en-saal1-2011-12-28%5F14-00-effective%5Fdos%5Fattacks%5Fagainst%5Fweb%5Fapplication%5Fplatforms-2011-12-28T13%3A53%3A26.340917.avi [23:13] slickplaid: nice, you rock [23:13] Metal3d has joined the channel [23:13] slickplaid: TheJH++ [23:13] catb0t: TheJH now has 1 beer [23:15] mmalecki_ has joined the channel [23:20] iigrat has left the channel [23:25] eastc has joined the channel [23:26] eastc has joined the channel [23:26] eastc: any recommendations for domain sites? [23:26] andrewfff has joined the channel [23:27] cryptix has joined the channel [23:27] CoverSlide: godaddy [23:27] CoverSlide: ACTION hides [23:27] mc has joined the channel [23:28] eastc: i heard that godaddy had some drawbacks or something but I guess I'll use it [23:28] ger^kallisti: >.< [23:28] enmand has joined the channel [23:29] TheJH: oh man, those hashtable attacks are really easy :O [23:29] TheJH: and they allow you to basically DoS every webapp [23:30] Stephen has joined the channel [23:30] CoverSlide: it's awesome isn't it [23:30] RLa: isn't it illegal [23:31] Stephen: Anyone have opinions on SocketStream? [23:31] TheJH: RLa, LOOOOOOOL [23:31] TheJH: RLa, are you serious? [23:31] ger^kallisti: anyone have a solid botnet? :] [23:32] TheJH: ger^kallisti, you don't need a botnet for that attack [23:32] TheJH: ger^kallisti, it's really easy [23:32] CoverSlide: you can use ab [23:32] ger^kallisti: well I'm still waiting for the video to begin ;) [23:32] TheJH: ger^kallisti, compute a bunch of has collisions. send them to a server a few times. server down. [23:32] TheJH: *hash [23:34] mikeal1 has joined the channel [23:34] flagg0205 has joined the channel [23:35] bnoordhuis: good thing all my servers run static gopher [23:35] Stephen: Ah, what a day what a day [23:35] Stephen: compiling 0.6.6 [23:35] Stephen: any warnings for a late adopter? [23:35] strevat_ has joined the channel [23:35] slickplaid: Don't cross the streams. [23:35] criswell has joined the channel [23:35] CoverSlide: ACTION switches from djb2 to strcmp for everything [23:36] Stephen: And you never make them touch [23:36] nrstott: avoid the temptation to get into arguments about the best way to detangle spaghetti code using an async abstraction tool [23:36] nrstott: that's my best node.js advice [23:36] slickplaid: If someone asks if you're a god, say, "Yes." [23:36] Bonuspunk: #hashDoS - final version --> http://www.youtube.com/watch?v=R2Cq3CLI6H8 / 28c3 YT Chan -> http://www.youtube.com/user/28c3 [23:36] CoverSlide: O(n^3) ftw [23:36] slickplaid: thanks Bonuspunk :D [23:36] fomatin has joined the channel [23:37] CoverSlide: i say instead of trying to make async code look sync, actually learn how to write async code [23:37] Stephen: nrstott: Everyone knows you use noil [23:37] Bonuspunk: btw has everybody seen http://dashboard.congress.ccc.de/detail ? ^^ [23:37] Stephen: Nah, but seriously, anyone used socketstream yet? [23:37] Stephen: Seems like a large stack, but nice [23:37] nrstott: seriously though, my advice is to learn and use promises :) http://howtonode.org/promises [23:38] Stephen: No worries, way past you there [23:40] Stephen: hmm [23:43] nicholasf: so Promises seem like the opposite of the tame.js, Do, take on things [23:44] nicholasf: it's confusing to know how to solve the difficulty of coding asynch, right now my main strategy is to push things into real time as much as possible [23:45] Stephen: I find it hilarious that Node and jQuery came to the opposite conclusions regarding the callback/promise debate at the same time [23:45] satyr has joined the channel [23:46] Stephen: nicholasf: My best tip for you on the async part is don't worry about it so much. [23:46] cclarke_ has joined the channel [23:46] nrstott: nicholasf, promises have a lot of research behind them. They do make for well engineered code if you stick to the tenants of promise theory. [23:46] Stephen: Make sure your I/O is non-blocking and JS pretty much plays nice the rest of the way [23:46] stagas has joined the channel [23:47] Stephen: And when you do finally start writing using Promises, keep your methods short [23:47] perezd has joined the channel [23:47] nrstott: yeh, even if you dont use promises, keep your methods short. [23:48] Stephen: Because I will hunt you down if I find a 100 line method in your github account [23:48] Stephen: So, yeah, I did something dumb [23:48] nicholasf: haha [23:48] nicholasf: sorry was afk [23:48] nicholasf: yeh, Im trying to get a handle on the entire asynch thing [23:48] nicholasf: another issue is finding good docs [23:48] blup has joined the channel [23:48] nicholasf: some old node docs even use the promise paradigm (before it was taken out of the core) [23:49] Stephen: I installed node-jquery simply for a consistent promise pattern across layers, and then realized how much crap I'm adding [23:49] nrstott: nicholasf, in order to avoid holy war we're now calling those 'Handles' [23:49] tomlion has joined the channel [23:49] nrstott: cause they weren't promises :) [23:49] nicholasf: k [23:49] Stephen: Can ya 'Handle' that? [23:49] nrstott: they may be making acomeback to core [23:49] Stephen: can ya? [23:49] nicholasf: how about testing promises? [23:49] nrstott: to facilitate 'cancelling' [23:49] nicholasf: is there a better lib for it? [23:50] nrstott: i use node-tap to test my promise-based code [23:50] nrstott: works fine [23:50] nicholasf: k [23:50] Stephen: Cancelling? Is this interrupting the callback stack? [23:50] cryptix_ has joined the channel [23:50] nrstott: cancellation of the operation [23:50] Stephen: Hmm... I've foresaken this channel too long [23:50] nicholasf: which promise lib do you prefer, q or PromisedIO? [23:51] nrstott: I prefer Q, but I personally have ended up using promised-io :) [23:52] nrstott: Mark Miller is throwing his hat into the ring with a 'makeQ' library as well. [23:52] erichynds has joined the channel [23:53] gr-eg has joined the channel [23:54] brianseeders has joined the channel [23:54] tomgallacher has joined the channel [23:56] nicholasf: nrstott Stephen thanks for letting me pick your brains. I may do so again. on a steep learning curve here [23:57] nrstott: sure np [23:57] blueadept: ok seriously, i've gotten to the point where i can't read javascript anymore [23:57] blueadept: like i have to take js and convert it to coffeescript just to read [23:58] slickplaid: tisk tisk [23:58] blueadept: screw all you js purists [23:58] nicholasf: blueadept: I'm doing everything in coffeescript [23:58] blueadept: i want to, but i'm woking with a team with a lot of legacy js [23:58] blueadept: so its really not practical to convert all the old stuff over really [23:59] nicholasf: yeh, Id be okay about working in a purely js project, but if it's mine it's in CS [23:59] blueadept: i sort of started my own side project within the group doing stuff in coffeescriopt [23:59] blueadept: i've written so much js so quickly that they dont want me to rewrite it in pure js