[00:00] AkhiAbdullah has joined the channel [00:00] diverdude has joined the channel [00:00] _unary has joined the channel [00:00] looopy has joined the channel [00:01] diverdude: konobi_: hey, are you there? [00:01] killing-joke: zomg, thanks. i'm creating some metrics. i was hoping to skip past the "yeah, we just totally make that shit up" part, to "some smart people thought about this, and i included their wisdom" :) [00:01] Joeysomo has joined the channel [00:02] jacobolus has joined the channel [00:02] navinpy has joined the channel [00:03] kei has joined the channel [00:03] rauchg has joined the channel [00:03] average_drifter has joined the channel [00:05] maru_cc has joined the channel [00:06] riskish has joined the channel [00:06] CIA-102: node: 03isaacs 07master * r0cdf85e 10/ (61 files in 6 dirs): Lint all the JavaScripts. - http://git.io/KBMk5Q [00:06] CIA-102: node: 03isaacs 07master * r9633843 10/ Makefile : jslint src/ and lib/ on 'make test' - http://git.io/GJ-diA [00:07] marcello3d has joined the channel [00:07] lfppv has joined the channel [00:07] jakehow has joined the channel [00:08] lfppv: hi [00:08] lfppv: why i cant use Iterator pattern of javascript 1.7 in node [00:08] lfppv: ? [00:09] isaacs: lfppv: because that's not something v8 implements [00:09] LowValueTarget has joined the channel [00:10] lfppv: isaacs: im using google closure tools, the goog.structs.Set object [00:10] lfppv: and i need to iterate it [00:10] isaacs: lfppv: ok. node doesn't modify the language. it just runs whatever v8 gives it [00:11] sreeix has joined the channel [00:11] sauerbraten: I'm using javascript for 2 days now, how can I add a key and value pair to an array? [00:11] sauerbraten: *object [00:11] torvalamo: obj.key = value [00:12] isaacs: sauerbraten: obj[key] = val? [00:12] torvalamo: or that, if it's a literal [00:12] isaacs: obj.foo = bar is the same as obj['foo'] = bar [00:12] sauerbraten: ah ok [00:12] sauerbraten: I thought it woul be harder than that o.O [00:13] isaacs: :) [00:13] isaacs: sauerbraten: javascript's a pretty easy language. [00:13] sauerbraten: somtimes it is confusingly easy, though :D [00:13] arkh_ has left the channel [00:14] lfppv: isaacs: ok, i just found it, google closure tools implement iterator pattern of javascript 1.7 but not nativelly [00:14] torvalamo: or you can do Object.defineProperty(obj, key, {value: value}) and be totally ECMA 5! [00:14] lfppv: i need to use goog.iter.toIterator [00:14] torvalamo: who the fuck told them to make JS into Java [00:15] torvalamo: i saw a presentation video yesterday where someone was extremely excited about this leap backwards in time [00:16] sandfox has joined the channel [00:17] isaacs: torvalamo: Object.defineProperty is silly to use in that case. obj.key = value is 100% the same as Object.defineProperty(obj, 'key', {value:value, enumerable: true, writable: true, configurable: true }) [00:17] torvalamo: that's what i said [00:17] jtsnow has joined the channel [00:17] torvalamo: except i used cursewords [00:18] isaacs: torvalamo: but obj.key=value is just as "ecmascript 5" [00:18] torvalamo: it was a sarcastic remark by me [00:19] torvalamo: just the fact that it has to be introduced [00:19] ajackbot has joined the channel [00:19] qsobad has joined the channel [00:19] torvalamo: why don't they just make a new browser script langua... oh wait they are [00:20] isaacs: well, it's kind of nice if you DO want to set something as read-only [00:20] wink_ has joined the channel [00:20] torvalamo: read-only is bollox. the only use i see for this is the enumerable thing, and even that probably is NEVER used. [00:21] agnat_ has joined the channel [00:22] torvalamo: and having a flag for deciding whether or not the other flags can be edited... that's so meta and a waste of time i have never seen. [00:22] diverdude has joined the channel [00:23] ohtogo has joined the channel [00:24] tkahn6_ has joined the channel [00:25] sandfox: read only is good if you want to stop other developers completely abusing your objects too easily [00:25] torvalamo: but isn't that their choice? [00:25] torvalamo: locking up your code isn't very nice at all [00:25] jacobolus has joined the channel [00:27] sandfox: it is there choice, but you can dissuade them, and it seems to work ok in the classical inheritance world [00:27] markwubben has joined the channel [00:27] hij1nx_ has joined the channel [00:27] torvalamo: if setting some of these flags somehow optimizes the access time and/or sizes of the objects then sure that's a good idea... but somehow i doubt it does... at all [00:28] samBiotic has joined the channel [00:29] isaacs: torvalamo: enumerable:false is important. and getter/setter properties are extremely useful in some situations. (do you think we attach global.console in node if you never use it?) [00:30] shanebo has joined the channel [00:30] jtsnow has joined the channel [00:30] ashishg has joined the channel [00:30] eb4890 has joined the channel [00:31] diverdude: anybody tried setting node.js up with haproxy? [00:32] davidwalsh has joined the channel [00:33] sandfox: yeah [00:33] sandfox: diverdude: having problems? [00:34] rauchg has joined the channel [00:37] imsky_ has joined the channel [00:41] criswell has joined the channel [00:42] gr4yscale has joined the channel [00:43] norviller has joined the channel [00:45] wink___ has joined the channel [00:46] rauchg has joined the channel [00:46] bingomanatee: are there any decimal formatting hints for until.format? [00:47] bingomanatee: util.format [00:49] diverdude: sandfox: not anymore :D [00:50] diverdude: i finally freakin fixed it hehe [00:50] diverdude: sandfox: took me a helluva time i tell ya [00:51] joshsmith has joined the channel [00:51] jgaui has joined the channel [00:52] sandfox: diverdude: first time can be a bit of pain [00:52] diverdude: sandfox: oh yes...i found a config that helped me [00:52] diverdude: sandfox: this guy: https://github.com/mixu/sioconfig [00:52] aristidesfl has joined the channel [00:53] diverdude: sandfox: im gonna test now if my auth routine also works in this setup [00:53] sreeix has joined the channel [00:54] gr4yscale has joined the channel [00:55] diverdude: sandfox: you using php+socket.io in same app? [00:56] sandfox: divderdude: sort of… I've never had php directly handle socket-io though as it i personally think it's completely the wrong tool for job [00:56] chjj has joined the channel [00:57] diverdude: sandfox: oh thats not what i meant [00:57] sandfox: diverdude: I've had nodejs front ends that handle socket.io and then if needed make restful calls to a php server [00:57] diverdude: sandfox: i have socket.io running on node.js sharing session with php app running on apache [00:58] jiboumans_ has joined the channel [00:58] diverdude: sandfox: sharing session via mysql and authing using sessionID in cookie [00:58] bnoordhuis: bingomanatee: no [00:58] diverdude: sandfox: or at least hope i am...i didnt test the auth with my haproxy setup yet [00:58] diverdude: sandfox: thats my next task [01:00] sandfox: diverdude: gotcha, i've only done session sharing using redis as the session store for both node and php (but should work the same way as your mysql setup) [01:01] diverdude: sandfox: yeah ok...redis is some shared memory right? [01:01] ritch- has left the channel [01:01] sandfox: diverdude: make sure your domains on the cookies are set correctly (this caused me much pain in testing when using random domains). yeah, redis is an in memory key->value store [01:03] diverdude: sandfox: yeah...domains are really important....i already experienced some of that pain [01:03] diverdude: sandfox: it hurts [01:04] ryanfitz has joined the channel [01:06] mAritz has joined the channel [01:09] wink_ has joined the channel [01:11] stef_ has joined the channel [01:14] stagas has joined the channel [01:14] johnhamelink has joined the channel [01:15] rauchg has joined the channel [01:16] Vespakoen has joined the channel [01:16] k1ttty has joined the channel [01:17] wink_ has joined the channel [01:18] konobi_: diverdude: mmm? [01:20] _th_n has joined the channel [01:22] isaacs has joined the channel [01:22] wink_ has joined the channel [01:23] simenbrekken has joined the channel [01:23] joshkehn has joined the channel [01:23] diverdude: konobi_: nevermind...i think i got things figured out for now :) sry for disturbing you [01:25] neoesque has joined the channel [01:25] blueadept has joined the channel [01:26] ryanfitz has joined the channel [01:28] wink___ has joined the channel [01:30] rauchg has joined the channel [01:33] shinuza has joined the channel [01:34] saikat has joined the channel [01:36] trupppOFF has joined the channel [01:36] RyanD has joined the channel [01:41] jldbasa has joined the channel [01:42] nerdfiles1 has joined the channel [01:42] wink_ has joined the channel [01:42] nerdfiles1 has left the channel [01:42] thalll has joined the channel [01:47] CIA-102: node: 03Mikeal Rogers 07master * rd530ee6 10/ (4 files in 3 dirs): Issue #2762. Add callback to close function. - http://git.io/mB5DSQ [01:47] wink___ has joined the channel [01:50] diverdude: is there a node.js debugger which may be recommended? [01:54] wink_ has joined the channel [01:57] subbyyy has joined the channel [01:59] wink___ has joined the channel [02:00] shinuza_ has joined the channel [02:01] mikeal has joined the channel [02:03] joshfinnie has joined the channel [02:06] cagdas has joined the channel [02:06] wink_ has joined the channel [02:06] trupppOFF has joined the channel [02:10] jblanche has joined the channel [02:11] Danielss89 has joined the channel [02:11] Danielss89: HI [02:11] Danielss89: I have a module which have exports.foo and export.bar... [02:11] Danielss89: how do i call foo from bar? [02:13] _jzl has joined the channel [02:14] isufy has joined the channel [02:14] innociv has joined the channel [02:16] SubStack: Danielss89: exports.foo() [02:17] SubStack: or var foo = exports.foo = ...; foo() [02:17] SubStack: or exports.foo = foo; function foo () { ... } then elsewhere foo() [02:17] wink_ has joined the channel [02:17] SubStack: (this is another thing about harmony modules that I hate) [02:19] mandric has joined the channel [02:19] mappum has joined the channel [02:19] mappum: isnt there a way to make node scripts restart if they fail int he command line? [02:19] SubStack: while true; do node beep.js; done [02:20] SubStack: or forever or monit or whatever other tool [02:20] mappum: isnt there something built in, thoough? [02:20] SubStack: why should there be? [02:20] mappum: i'm just wondering, i feel like i remember seeing that somewhere [02:23] joshthecoder has joined the channel [02:24] ningu: woohoo, I have implemented the most horrendous function in the world [02:25] wizonesolutions has joined the channel [02:25] ningu: http://pastebin.com/M1FsPWXx [02:26] r04r has joined the channel [02:27] ningu: I guess a 100 line function is actually not so bad. [02:27] ningu: but the nesting.... [02:27] brianleroux has joined the channel [02:29] joshkehn has joined the channel [02:29] joshkehn has left the channel [02:31] wink_ has joined the channel [02:31] mAritz: ACTION slaps ningu with a large trout [02:31] r04r has joined the channel [02:31] r04r has joined the channel [02:31] mAritz: you disgust me, sir! [02:33] trupppOFF has joined the channel [02:34] ningu: mAritz: there aren't many ways to make that function less ugly. believe me, I tried. [02:34] ningu: I'll try again once I get some sleep ;) [02:35] mAritz: every callback you define could easily be defined outside [02:35] mAritz: making it simpler to maintain and possibly even simpler to test [02:36] ningu: mAritz: actually, a lot of them need to access things in the context. [02:36] mAritz: so? [02:36] mAritz: wrap them [02:36] ningu: so if they're defined outside, they don't have access to things I've declared in the calling function. [02:36] mAritz: wrap them [02:37] ningu: maybe I don't know what wrapping is. [02:37] ningu: if you mean bind "this", it won't be enough... [02:37] r04r has joined the channel [02:38] mAritz: lambda [02:38] ramitos has joined the channel [02:39] ningu: I don't see how it solves the problem. var foo = bar; asyncThingy(function() { callback(stuff} }) [02:39] ningu: the callback still won't have access to foo. [02:39] mAritz: you need x, so do someAsyncFunction(something, getSomeCallbackHandler(x)); where getSomeCallbackHandler returns your callback handler ;) [02:39] tkahn6_ has joined the channel [02:40] ningu: whoops, mixed up a brace with a paren there. anyway, yes, I've used that technique sometimes. [02:40] mAritz: makes it much more readable imo [02:41] ningu: I'll have to think about whether it makes sense to do it for this function. most of the stuff it does hangs together. [02:41] mAritz: to be honest, i try to write functions that do as little as possible [02:41] diogogmt has joined the channel [02:42] sharkbird has joined the channel [02:42] boccato has joined the channel [02:42] mAritz: (though i fail miserably every time) [02:42] ningu: well, this function is necessary due to what the site is supposed to do -- so the feature is not an option. maybe the implementation could be better. I hope so. [02:43] joshsmith has joined the channel [02:43] gr4yscale has joined the channel [02:43] r04r has joined the channel [02:43] mAritz: no, what i mean is that i rather have a couple of small functions with one small purpose than one big function with one big purpose and lots of steps. [02:44] mAritz: (of course splitting it up too much is bad as well) [02:44] mAritz: all about finding balance :) [02:45] ningu: yes, but not everything is easy to break down into small purposes. you can break everything down into steps, but it's trickier if the steps depend on each other in a complex way. [02:46] jtsnow has joined the channel [02:47] skyler_brungardt has joined the channel [02:47] mAritz: yes, but in most cases you'll then be able to simplify your logic :) [02:48] SubStack: sometimes you can reframe the problem slightly to make it easier [02:48] lee2012 has joined the channel [02:48] SubStack: it can take a lot of time to refactor pieces into something more elegant [02:49] r04r has joined the channel [02:50] mAritz: which is why i almost never get anything done in my own projects :D [02:51] devaholic: SubStack, https://gist.github.com/1861683 [02:51] mAritz: maybe i need a refactor counter for parts of my code and if it hits 10 i'll have 2 hours left until i'm completely blocked from changing these files for 2 months. :D [02:55] SubStack: devaholic: people keep asking me for more tshirts too [02:55] SubStack: what have you unleased‽ [02:55] devaholic: i saw that. [02:55] devaholic: i still need to send the ones i have for you [02:56] devaholic: eep [02:56] SubStack: that campaign was crazy successful [02:58] SubStack: devaholic: sweet gist, I've been doing something similar with seaport [02:58] SubStack: still in the mad science phase though [02:58] devaholic: ive got node-network-deploy and node-haproxy on deck to follow up with that [02:59] devaholic: this might be a little bit, but ive been testing it all day [02:59] devaholic: we'll see how it goes! [02:59] SubStack: yep [02:59] ph^ has joined the channel [02:59] SubStack: I've been working on the experiment harness for my deploy stack today [03:00] SubStack: although I haven't gotten much done [03:00] r04r has joined the channel [03:00] kurtzhong has joined the channel [03:01] infynyxx has joined the channel [03:02] devaholic: sometime i may work on that other idea you had when this is done [03:02] jimmy has joined the channel [03:02] devaholic: deploying just certain commits to certain machines and keeping track of it all [03:06] wink___ has joined the channel [03:07] SubStack: devaholic: I nearly have that working with propagit [03:07] devaholic: i want it :D [03:07] kurtzhong_ has joined the channel [03:08] SubStack: I mean, propagit works now but the pieces to make it friendly and easy aren't finished yet [03:08] devaholic: oh i didnt know about this [03:08] intripoon has joined the channel [03:08] r04r has joined the channel [03:08] devaholic: you should make a module to search all of your modules [03:08] ph^ has joined the channel [03:08] ritch- has joined the channel [03:09] joshsmith has joined the channel [03:09] SubStack: stagecoach is all about tying together propagit to seaport [03:10] SubStack: and managing the running instances from one place [03:10] SubStack: I can't remember what I was hung up on finishing it [03:10] SubStack: it's pretty close [03:10] warz has joined the channel [03:10] warz has joined the channel [03:11] devaholic: sweet [03:11] ningu: is something better than toolbox.no.de in the works? [03:11] devaholic: i remember looking at stage coach, but didnt see a use case for me [03:11] devaholic: i'll have a looksie [03:11] devaholic: coffee first! [03:12] ningu: at least toolbox.no.de has heard of express, unlike search.npmjs.org [03:12] r04r has joined the channel [03:13] ningu: actually, it's there under "most depended on". but the search box is seriously broken. [03:13] jtsnow has joined the channel [03:14] Aria: I use npm search myself. [03:15] ningu: if you search for express it turns up a lot of express modules but not express itself [03:15] SubStack: coffee indeed! [03:15] devaholic: duckduckgo.com [03:15] devaholic: type !npm express [03:16] devaholic: victory [03:16] SubStack: devaholic: did you see https://gist.github.com/1734155 ? [03:17] SubStack: the dependency part is very similar to your gist [03:17] ningu: btw what are the use cases for redis over, say, mongodb? [03:17] SubStack: even uses the same unicode chars ripped from npm ls :p [03:17] ningu: devaholic: hehe, cool, thanks [03:17] sdwrage has joined the channel [03:18] devaholic: i want to make network.json as standard as i can [03:18] devaholic: taking a look now. [03:19] SubStack: I need something like a network.json for stagecoach too [03:19] r04r has joined the channel [03:19] wink_ has joined the channel [03:19] SubStack: but just to map services in the current build to versions [03:20] devaholic: if you npm install network-deploy and open readme you can see a full version [03:20] Aria: ningu: npm search express returns express for me. [03:20] SubStack: so I can feed those versions into seaport to go back through the git history to find an acceptable version [03:20] devaholic: gotta get it on github [03:20] SubStack: or rather, just the deployed versions [03:21] SubStack: since I don't want intermediate commits to accidentally get deployed [03:21] devaholic: hmm [03:21] devaholic: yeah i was thinking about using tags [03:21] webguynow has joined the channel [03:25] SubStack: devaholic: the problem with tags is that it's only a single version [03:25] SubStack: and perhaps you have multiple services in the same repo [03:26] r04r has joined the channel [03:26] r04r has joined the channel [03:26] mansoor has joined the channel [03:26] SubStack: putting that info into a json file makes the most sense I think [03:27] ningu has joined the channel [03:27] mansoor has joined the channel [03:27] benvie has joined the channel [03:28] rwaldron has joined the channel [03:30] cburyta has joined the channel [03:32] r04r has joined the channel [03:33] mAritz has joined the channel [03:34] redir has joined the channel [03:36] jtsnow has joined the channel [03:39] r04r has joined the channel [03:39] jtsnow has joined the channel [03:40] pyrotechnick has joined the channel [03:41] joshkehn has joined the channel [03:45] joshgillies has joined the channel [03:45] r04r has joined the channel [03:47] wink___ has joined the channel [03:48] Vennril2 has joined the channel [03:49] crutex has joined the channel [03:49] crutex has joined the channel [03:49] pendlepants has joined the channel [03:50] blueadept has joined the channel [03:51] arduix has joined the channel [03:52] r04r has joined the channel [03:52] r04r has joined the channel [03:53] meso has joined the channel [03:54] meso has joined the channel [03:59] bbbb has joined the channel [03:59] r04r has joined the channel [04:01] wink_ has joined the channel [04:04] tekky has joined the channel [04:05] r04r has joined the channel [04:06] wink___ has joined the channel [04:07] sdwrage has joined the channel [04:08] isaacs_mobile has joined the channel [04:10] kurtzhong has joined the channel [04:10] r04r has joined the channel [04:10] isufy has joined the channel [04:10] mAritz1 has joined the channel [04:12] eukreign has joined the channel [04:12] sdwrage has joined the channel [04:14] qsobad has joined the channel [04:14] qsobad has joined the channel [04:15] r04r has joined the channel [04:15] rurufufuss has joined the channel [04:18] ryanfitz has joined the channel [04:21] r04r has joined the channel [04:26] munichlinux has joined the channel [04:26] r04r has joined the channel [04:27] richardr has joined the channel [04:27] sreeix has joined the channel [04:28] jaime_ has joined the channel [04:31] wingie: what i have learned today: do not use CTRL+Z to kill a program [04:31] Genius_ has joined the channel [04:31] westg has joined the channel [04:31] pyrotechnick has joined the channel [04:32] eukreign: sometimes you have to [04:32] eukreign: if CTRL-C doesn't do it [04:32] r04r has joined the channel [04:32] r04r has joined the channel [04:32] Skaag has joined the channel [04:32] eukreign: wingie: what's wrong with CTRL+Z? [04:33] SomeoneWeird: is there a way to parse a string into an array? [04:33] wingie: it suspends the program [04:33] wingie: doesn't kill it [04:33] wingie: eukreign: which gave me some issues with running vows since there were 50 vows processes still in the memory [04:33] wingie: and it somehow collided with my current running vows script [04:34] SomeoneWeird: killall node [04:34] wingie: now when i killed them all with "kill -9" it works great [04:34] wingie: oh [04:34] wingie: stypid me [04:34] wingie: i did kill -9 pid1 pid2 pid3 pid4 :/ [04:34] ningu: yeah, if Ctrl-C doesn't work you use Ctrl-\, not Ctrl-Z :) [04:35] devaholic: you probably dont want to do killall node [04:35] wink_ has joined the channel [04:36] ningu: btw why is node-inspector apparently somewhat flaky? [04:36] wingie: devaholic: why? [04:36] ningu: sometimes I set breakpoints one place and they don't work but another they do, for the same call chain [04:37] tristanz has joined the channel [04:37] Genius_: anyone in here have some extra time to take on a project for a startup that is about to be funded in the 7 figures? [04:38] devaholic: killall -i [04:38] st_luke has joined the channel [04:39] r04r has joined the channel [04:39] devaholic: Genius_, so you have no money? [04:40] Genius_: its not about th emoneyh, its about the opportunity [04:40] Genius_: the money* [04:40] wingie: Genius_: what's the status of the startup .. you have devs? [04:40] wingie: the app will be created from scratch? [04:41] nuba has joined the channel [04:42] orospakr has joined the channel [04:42] jerkelens has joined the channel [04:44] spolu has joined the channel [04:44] r04r has joined the channel [04:46] harthur has joined the channel [04:46] pyrotechnick has left the channel [04:47] pquerna has joined the channel [04:47] wink___ has joined the channel [04:50] r04r has joined the channel [04:55] sreeix has joined the channel [04:55] wink_ has joined the channel [04:56] lperrin1 has joined the channel [04:56] OmidRaha has joined the channel [04:57] r04r has joined the channel [05:00] jergason has joined the channel [05:00] wink___ has joined the channel [05:03] r04r has joined the channel [05:05] wink_ has joined the channel [05:05] diogogmt has joined the channel [05:06] ckknight has joined the channel [05:07] ckknight has joined the channel [05:08] kvey has joined the channel [05:08] skyler_brungardt has joined the channel [05:08] merlin83 has joined the channel [05:08] merlin83_ has joined the channel [05:09] papertigers has joined the channel [05:09] Emmanuel has joined the channel [05:10] r04r has joined the channel [05:10] papertigers: anyone using jade? whats the proper way to include an iframe such as a youtube video? I dont see iframs in the docs [05:12] wink___ has joined the channel [05:13] chjj has joined the channel [05:14] brainproxy: I've got an binary executable (on linux) which prints lots of stuff when I invoke it manually in my shell; but for some reason the usual trick of ( spawn... ).stdout.pipe(process.stdout) results in nothing showing up [05:14] ningu: I thought iframes were strongly discouraged nowadays, but I dunno [05:14] brainproxy: tried stderr too, but not difference [05:15] r04r has joined the channel [05:15] ningu: did you try nonstderr? :P [05:16] brainproxy: :p [05:17] brainproxy: well, i've tinkered with the options hash -- cwd, env -- just to see if that has an effect [05:17] josh-k has joined the channel [05:18] brainproxy: .. it didn't; so i guess my question is if anyone has any suggestions for figuring out just how it might be outputting text into my console if it's not coming over stdout or stderr [05:18] catb0t: Exception: SyntaxError: Unexpected identifier [05:18] bartt1 has joined the channel [05:20] ningu: brainproxy: hrm, could be a buffering issue, not sure [05:20] r04r has joined the channel [05:21] boltR has joined the channel [05:21] norviller has joined the channel [05:23] sreeix has joined the channel [05:23] wdbl: is there a good way to tell if a given function is a class constructor? [05:25] brainproxy: wdbl: generally speaking any function can be used as a contructor [05:25] a_suenami has joined the channel [05:26] r04r has joined the channel [05:26] wdbl: yeah [05:27] wdbl: what if I inspect the functions prototype and find stuff that wouldn't be there for a non-class function? [05:28] wdbl: a normal function probably wouldn't have any prototype additions, but a class function most likely would. but...not always [05:28] sdwrage has joined the channel [05:28] leif has joined the channel [05:28] SubStack: wdbl: why do you want to do that? [05:28] ningu: wdbl: not sure that distinction really exists in js... [05:28] ningu: in practice it sort of does. [05:29] wdbl: I'm just exploring ways of modeling Js code and writing meta-data about it [05:29] SubStack: wdbl: fun fact, if you use new on a function and it has a return value, the prototype gets discarded in favor of the return value [05:29] russfrank has joined the channel [05:30] wdbl: SubStack: hmmmm [05:30] SubStack: BUT, it only works if the return value is a typeof 'object' [05:30] SubStack: strange [05:30] SubStack: .. function F () { return { a : 3 } } new F instanceof F [05:30] catb0t: false [05:30] SubStack: .. function F () { } new F instanceof F [05:30] catb0t: true [05:30] SubStack: dnode abuses this property for its constructor syntax [05:31] SubStack: so you can assign into `this` or just return an object [05:31] wdbl: well, I always use a capital letter for my constructor function names to indicate it's a class so I guess I could just require that or some sort of other comment-notation for my project to work. [05:32] wdbl: conventions are good [05:32] SubStack: what api are you trying to achieve? [05:33] r04r has joined the channel [05:33] wdbl: at the moment, I'm building a generator to spit out Intellisense meta-data for Visual Studio - https://github.com/waynebloss/vsNodeRef [05:33] spion has joined the channel [05:34] wdbl: I wrote all the m-data that's there so far by hand just to make sure the system works [05:34] gavin_huang has joined the channel [05:34] benvie: the ultra repl knows all about exploring prototype strees [05:35] wdbl: ahh, yes ben thank you - I should have taken a closer look at that [05:35] benvie: by default it shows [[prototos]] [05:35] benvie: and has a toggle for hidden prototypes which prototypes usually are [05:37] devaholic: benvie, do you know of any projects to inject a repl into deployed code? [05:37] devaholic: modules rather [05:37] SubStack: I've heard of that being done on applications [05:37] SubStack: can't remember who did this though [05:38] SubStack: wdbl: neat, inspecting the prototype will probably work well enough for that I would suppose [05:38] r04r has joined the channel [05:38] SubStack: at least for code written that way [05:38] ryan1 has joined the channel [05:39] benvie: I don't know of any no but the stuff I've done for my thing has all the tools for doing it [05:39] benvie: I just need to set up the debugger protocol [05:39] devaholic: link? [05:39] benvie: https://github.com/Benvie/Node.js-Ultra-REPL [05:40] Genius_: so is benvie the authority on all things node.js? [05:40] benvie: with debugger protocol it'll just be normal usage basically [05:40] benvie: I'm planning on hooknig up esprima to more stuff [05:40] benvie: and using that to do the whole function rewriting for entrance logging and whatnot, or maybe just Proxies [05:41] SubStack: wdbl: you might also find this useful http://github.com/substack/node-burrito [05:41] SubStack: makes it really easy to walk the AST [05:41] devaholic: benvie i think i saw when you first released this actually [05:42] SubStack: so you could for instance grab all the vars in a particular block [05:42] SubStack: or what-have-you [05:42] markdaws has joined the channel [05:43] brianseeders has joined the channel [05:43] wdbl: SubStack: beautiful, thank you very much [05:43] benvie: yeah brendan eich tweeted about it the first day I put it up when it was like all broken and the result of being awake for 4 days straight [05:44] devaholic: it would be nice if there was one place where you could connect a bunch of servers and somehow switch between them [05:44] devaholic: not sure about the second part of that [05:45] benvie: yeah as it currently is it's built around being able to switch between multiple contexts easily [05:45] cjm has joined the channel [05:45] benvie: and have them all going [05:45] r04r has joined the channel [05:45] benvie: so it's a matter of just having the debugger protocol hooked up to do that with external stuff [05:46] devaholic: i think this would be the repl to use. watched [05:47] devaholic: im about to give it a try :) [05:47] benvie: I keep getting distracted trying to make gui stuff work on windows [05:47] devaholic: make remote-repl [05:47] devaholic: you would win the game [05:47] benvie: but I have a lot of thigns I want to do with the repl. It's a great platform to build debug/development stuff on [05:48] benvie: yeah [05:48] benvie: also it'd be awesome because it'd work with chromium too [05:48] benvie: which would be quite awesome [05:48] benvie: also ipad/iphone I think? [05:49] devaholic: awh, sad [05:49] pixel13 has joined the channel [05:49] devaholic: colors are borked in konsole [05:49] benvie: hmmm [05:50] benvie: I've used it on windows and ubuntu [05:50] Broolucks: fyi I'm making a browser-based terminal emulator with inline html [05:50] Broolucks: if that can be useful [05:50] r04r has joined the channel [05:50] devaholic: http://konsole.kde.org/ [05:51] benvie: I had it half hooked up to tty.js [05:51] Broolucks: too bad setWindowSize got broken [05:51] benvie: but tty.js was missing a number of the escape sequences that I use and I didn't get it fixed up yet [05:51] benvie: but the ability to hook up remotely to the repl is almost good to go [05:51] benvie: just buggy [05:52] benvie: yeah for that stuff it's going to involve implementing more of the protocol [05:52] Broolucks: https://github.com/breuleux/terminus [05:52] benvie: for negotating screen sizes and whatnot [05:52] Broolucks: maybe I should make screenshots at some point [05:53] benvie: but ultrarepl reimplements node's repl and readline entirely do it's not limited by whatever they decide to read [05:53] take_cheeze has joined the channel [05:55] redir has joined the channel [05:55] CrypticSwarm has joined the channel [05:56] yoy_xus has joined the channel [05:56] dshaw_ has joined the channel [05:56] YoY has joined the channel [05:57] r04r has joined the channel [06:00] wink_ has joined the channel [06:03] r04r has joined the channel [06:05] lhoffman has joined the channel [06:05] wink___ has joined the channel [06:06] k1ttty has joined the channel [06:08] boehm has joined the channel [06:09] r04r has joined the channel [06:10] Tim has joined the channel [06:11] looopy has joined the channel [06:11] lee2012 has left the channel [06:15] caolanm_ has joined the channel [06:15] r04r has joined the channel [06:19] wink_ has joined the channel [06:21] objectiveous has joined the channel [06:21] looopy has joined the channel [06:21] copongcopong1 has joined the channel [06:21] r04r has joined the channel [06:22] deeprogram has joined the channel [06:22] looopy has joined the channel [06:26] r04r has joined the channel [06:29] torvalamo has joined the channel [06:30] TimTimTim has joined the channel [06:33] r04r has joined the channel [06:33] r04r has joined the channel [06:35] odie5533 has joined the channel [06:36] wink___ has joined the channel [06:37] looopy has joined the channel [06:38] EvRide has joined the channel [06:39] r04r has joined the channel [06:40] devaholic: benvie, how did i miss this http://nodejs.org/docs/latest/api/all.html#repl.start [06:40] benvie: oh hah [06:41] devaholic: like 2 scrolls down even [06:41] Broolucks: anyone knows of a good js plotting library that's interactive and svg-based? [06:42] devaholic: d3.js [06:42] boltR has joined the channel [06:43] dnjaramba has joined the channel [06:44] r04r has joined the channel [06:44] devaholic: hmm this is interesting [06:46] chjj has joined the channel [06:47] Broolucks: d3 seems nice, though I'd basically have to implement the plotting library myself [06:49] r04r has joined the channel [06:51] sreeix has joined the channel [06:51] Nivka has joined the channel [06:52] gavin_hu_ has joined the channel [06:52] cjm has left the channel [06:53] jiboumans_ has joined the channel [06:53] cjm has joined the channel [06:54] r04r has joined the channel [06:55] dnjaramba has joined the channel [06:56] disappearedng: So I have a rails webserver rendering html pages that connects to my nodejs server. I somehow need nodejs to communicate with my rails server that a particular action whether a particular action has started or not [06:57] objectiveous has joined the channel [06:59] r04r has joined the channel [07:01] LarsSmit has joined the channel [07:01] jergason has joined the channel [07:02] zomgbie has joined the channel [07:04] r04r has joined the channel [07:04] r04r has joined the channel [07:05] dnjaramba has joined the channel [07:08] ohtogo has joined the channel [07:08] r04r has joined the channel [07:08] stagas has joined the channel [07:09] `3rdEden has joined the channel [07:11] disappearedng: is there a good way to get my nodejs to be able to talk to the db [07:11] disappearedng: I mean the rails server, 1 obvious way is to share the db [07:12] Lingus: RPC or MQ are common [07:12] wink_ has joined the channel [07:13] Lingus: Alternatively, don't. [07:13] r04r has joined the channel [07:14] Joeysomo has joined the channel [07:14] dnjaramba has joined the channel [07:15] Joeysomo has joined the channel [07:16] EhevuTov has joined the channel [07:17] r04r has joined the channel [07:18] objectiveous has joined the channel [07:19] tonist has joined the channel [07:20] dnjaramba has joined the channel [07:22] r04r has joined the channel [07:23] sdwrage has left the channel [07:24] dnjaramba_ has joined the channel [07:26] wink_ has joined the channel [07:27] r04r has joined the channel [07:31] dnjaramba has joined the channel [07:31] wink___ has joined the channel [07:31] r04r has joined the channel [07:34] Skola has joined the channel [07:35] dnjaramba_ has joined the channel [07:36] r04r has joined the channel [07:36] SubStack: aha, (req, res, rec) [07:36] moreno has joined the channel [07:36] SubStack: the rec is for record! [07:37] simenbrekken has joined the channel [07:39] wink_ has joined the channel [07:39] dnjaramba has joined the channel [07:40] harthur has joined the channel [07:41] r04r has joined the channel [07:42] take_cheeze has joined the channel [07:42] qsobad has joined the channel [07:43] vdemedes has joined the channel [07:44] vdemedes: Hello! [07:44] zomg has joined the channel [07:45] doffm has joined the channel [07:45] r04r has joined the channel [07:47] patcito has joined the channel [07:48] SQLServerIO: is there a way to over ride a function in the connect/express framework? like res.sendfile? [07:48] SQLServerIO: proxy it maybe... hrum. [07:49] maxogden: SQLServerIO: why would you want to monkeypatch like that [07:50] r04r has joined the channel [07:50] SQLServerIO: maxogden: what else would I do? I need to override some of the functionality or add to it in some way. [07:51] maxogden: a) fork the library and send a pull request b) use another module such as filed to read files and pipe() them to the response object [07:52] wink_ has joined the channel [07:52] mappum: how can I make a node vm script have a timeout? [07:52] SQLServerIO: Or build a module. I have to do some fun stuff and piping to res isn't working due to a couple of things that res.send is doing. It wouldn't be useful for most folks so I doubt it would be merged in. [07:54] maxogden: its important to not break streaming [07:54] maxogden: imo [07:55] r04r has joined the channel [07:56] SQLServerIO: I agree, I'm trying not to, but I'm at the point where I ether monkeypatch express or fork it and handle merges and the like. I don't have the time to write a framework from scratch. [07:56] margle has joined the channel [07:56] Morkel has joined the channel [07:57] wink___ has joined the channel [07:57] westg has joined the channel [07:57] erikzaadi has joined the channel [07:59] r04r has joined the channel [08:00] dnjaramba has joined the channel [08:01] aliem has joined the channel [08:04] r04r has joined the channel [08:08] asimo has joined the channel [08:08] wink_ has joined the channel [08:08] dreamdust has joined the channel [08:09] `3rdEden has joined the channel [08:09] Skola has joined the channel [08:09] k1ttty has joined the channel [08:09] isaacs has joined the channel [08:11] dnjaramba has joined the channel [08:12] r04r has joined the channel [08:12] r04r has joined the channel [08:12] Wizek has joined the channel [08:13] kirbysayshi has joined the channel [08:15] wink_ has joined the channel [08:16] dnjaramba has joined the channel [08:16] lzskiss has joined the channel [08:17] r04r has joined the channel [08:18] lzskiss has joined the channel [08:20] illourr: gnight node [08:20] markq has joined the channel [08:20] wink___ has joined the channel [08:21] r04r has joined the channel [08:21] dnjaramba has joined the channel [08:23] westg has joined the channel [08:23] lzskiss has joined the channel [08:25] k1ttty has joined the channel [08:25] wink_ has joined the channel [08:26] diverdude: Is it possible to share variables between connected sockets in node.js? [08:26] r04r has joined the channel [08:27] tonist has joined the channel [08:27] SubStack: diverdude: I wrote https://github.com/substack/node-replicant to do that [08:27] SubStack: or a lot of people use redis [08:28] benvie: you sure can' [08:28] benvie: can't do it with v8 handles though, not without wrapping them or something [08:29] mappum: What does an "oob" error mean when reading from Buffers? [08:29] dreamdust has joined the channel [08:29] benvie: almost boob [08:29] mappum: :P [08:29] benvie: out of bounds [08:29] diverdude: i am making a chat and i need to somehow keep an array of connected sockets so that when one client sends a message i can forward it to another [08:29] benvie: read beyond buffer size [08:29] mappum: but it usually gives me a more specific message [08:29] benvie: buffers are allocated with a specific size and can't increase it [08:30] mappum: i know [08:30] mappum: oh, it must be on my slice [08:30] benvie: ah yeah [08:30] LordTrev has joined the channel [08:30] r04r has joined the channel [08:30] LordTrev: VERSION [08:32] Druid_ has joined the channel [08:33] k1ttty has joined the channel [08:33] diverdude: SubStack: is your node-repliant for forwarding messages between sockets? [08:34] SubStack: devaholic: it's for doing synchronization of objects [08:34] SubStack: diverdude: what are you trying to build? [08:35] diverdude: SubStack: its a chat system where 2 users can chat privately [08:35] r04r has joined the channel [08:35] wink___ has joined the channel [08:36] SubStack: diverdude: there are tons of libraries to make that easy [08:36] SubStack: socket.io is pretty much built around that exact use case [08:36] bradhe has joined the channel [08:36] diverdude: SubStack: i tried creating a global array where each users socket is saved on connect...but this variable does not seem to be shared [08:36] diverdude: SubStack: i am using socket.io already [08:37] SubStack: don't use globals [08:37] SubStack: ever [08:37] SubStack: unless you mean a module-level variable which is fine [08:37] diverdude: SubStack: how can i then convey a message from one socket to another? [08:37] skyler_brungardt has joined the channel [08:38] diverdude: SubStack: broadcast is no good because it sends to all connected sockets [08:38] SubStack: diverdude: with programming? [08:38] SubStack: don't use broadcast [08:38] diverdude: thats what im saying [08:39] SubStack: just write to the socket that matters [08:39] diverdude: SubStack: sure, but how can i access that socket? [08:39] SubStack: and listen from the socket that matters [08:39] phidah has joined the channel [08:40] r04r has joined the channel [08:40] r04r has joined the channel [08:40] diverdude: SubStack: this seems to now work: http://bin.cakephp.org/view/61110497 [08:40] diverdude: now=not [08:40] dshaw_ has joined the channel [08:41] k1ttty has joined the channel [08:44] SubStack: diverdude: why all the handshake userdata noise? [08:44] r04r has joined the channel [08:45] SubStack: var id = Math.random().toString(16).slice(2); // or whatever [08:45] SubStack: then clients[id] = socket [08:45] michaelhartau has joined the channel [08:46] mac^ has joined the channel [08:46] SubStack: then emit('chatmessage', { from : id, to : msg.to, message : msg.message }) [08:46] stef has joined the channel [08:47] Dotan has joined the channel [08:47] SubStack: diverdude: where did you get that handshake stuff from, I don't see that documented [08:48] ph^ has joined the channel [08:49] r04r has joined the channel [08:49] marlun has joined the channel [08:49] darkixion has joined the channel [08:49] elnn has joined the channel [08:50] diverdude: SubStack: i have a routine which takes care of that: http://bin.cakephp.org/view/493728144 [08:50] JakeSays has joined the channel [08:51] wink_ has joined the channel [08:51] arduix has joined the channel [08:51] dreamdust has joined the channel [08:52] mappum: how can i make node deallocate buffers? [08:53] SubStack: diverdude: so why didn't you post that originally >_< [08:53] Illourr| has joined the channel [08:53] Qzen: do you guys know a simple chat that i can use for my website? [08:53] SubStack: going to bet that the error is in that ugly thing somewhere [08:53] r04r has joined the channel [08:53] r04r has joined the channel [08:53] Qzen: i am trying to implement only open-source scripts [08:54] Qzen: and therefor i dont feel like doing it myself :P [08:54] diverdude: SubStack: because the relevant part is how i connect 2 clients [08:54] padd173 has joined the channel [08:55] Qzen: well the clients connect to the server and the server just seperates those connections with some nodejs magic [08:55] Qzen: its simple [08:57] SubStack: diverdude: why not generate a unique id and then attach data onto that? [08:57] diverdude: Qzen: https://github.com/Fabryz/support-chat [08:57] padd173: Is there a db driver that does connection pooling? [08:57] SubStack: var users = {}; then users[id] = { socket : sock, name : ... } [08:57] diverdude: SubStack: thats actually what im doing [08:57] Dotan__ has joined the channel [08:58] SubStack: except you're doing it really confusingly by putting everything on the sock.handshake [08:58] Illourr| has joined the channel [08:58] stagas: diverdude: no need for channels if you only pair 2, do it like this: socket_a.partner = socket_b; socket_b.partner = socket_a; [08:58] diverdude: SubStack: im putting validation on the handshake [08:58] r04r has joined the channel [08:59] stagas: the on message, socket.partner.send('blah') [08:59] stagas: then [08:59] SubStack: diverdude: well it doesn't work so one or more of your assumptions must be wrong [09:00] diverdude: SubStack: hehe that i cannot argue ;) [09:00] SubStack: anyways, don't put data on the handshake that's ugly [09:00] SubStack: just var users = {} [09:00] SubStack: then it's easier to inspect [09:00] SubStack: and less ridiculous [09:00] jomoho has joined the channel [09:01] raja: In a for loop in node, what is the equiv of continue [09:01] raja: continue seems to break [09:01] rendar has joined the channel [09:02] konobi: raja: let me google that for you... [09:02] SubStack: raja: node is javascript [09:02] wink_ has joined the channel [09:02] SubStack: full stop [09:02] SubStack: nothing magic going on [09:03] raja: yep i know.. [09:03] adambeynon has joined the channel [09:03] raja: i was originally iterating with forEach but that is functional and doesn't allow you to break or continue [09:03] raja: so i changed to a for loop [09:03] Illourr| has joined the channel [09:03] SubStack: forEach doesn't break or continue [09:03] raja: and now break works but continue works like a break [09:03] SubStack: use a different combinator [09:03] raja: SubStack: thats what i wrote [09:03] r04r has joined the channel [09:03] r04r has joined the channel [09:04] SubStack: raja: paste your code [09:04] SubStack: I hate speculating [09:05] raja: https://gist.github.com/45c7086a6e0fd315754f [09:06] raja: i'll simplify the example too [09:06] raja: so the context doesn't matter [09:06] huggies has joined the channel [09:07] SubStack: don't do that [09:07] SubStack: I hate it when people take out code [09:07] SubStack: because the part that they took out is overwhelmingly where the bug is [09:07] raja: true [09:08] Edy has joined the channel [09:08] Edy has joined the channel [09:08] raja: standard for loop works fun and continues fine.. just iterating over numbers [09:08] r04r has joined the channel [09:08] Illourr| has joined the channel [09:08] raja: so not sure why this doesn't work [09:09] SubStack: raja: are you sure that tweet.match(...) returns a real array? [09:09] SubStack: match objects are strange [09:09] konobi: your match will always be 0 [09:09] konobi: (you're not capturing) [09:09] SubStack: .. 'beep boop'.match(new RegExp('(\\S+)', 'g')) [09:09] catb0t: [ "beep", "boop" ] [09:10] Dotan has joined the channel [09:10] raja: SubStack: yeah it returns a real array [09:10] markq has joined the channel [09:10] kwy__ has joined the channel [09:11] raja: konobi: capturing where? [09:11] SubStack: just console.dir(negMatch) [09:11] Lorentz has joined the channel [09:11] SubStack: I would do that before I conclude that continue is broken [09:11] raja: negMatch.length is not always zero.. [09:12] vincentcr has joined the channel [09:12] r04r has joined the channel [09:13] Skola has joined the channel [09:13] chilts: raja: as an aside, all of your 'var' definitions in the loop are hoisted to the top of the function ... not that it matters in this case, but something to be aware of [09:13] chilts: I never like it catching me out :) [09:13] westg has joined the channel [09:13] Illourr| has joined the channel [09:14] niallo has joined the channel [09:14] raja: console.dir inspects array and stdio's it fine [09:15] raja: chilts: thanks, will fix [09:15] qsobad has joined the channel [09:16] Dotan__ has joined the channel [09:16] megalomix has joined the channel [09:16] megalomix: hello [09:17] megalomix: i added PATH=/home/node/0.6.11/bin:$PATH in .bashrc of my home (home/vhosts/user1/.bashrc) [09:17] dlg: thats a great story [09:17] megalomix: but if i write node it does not start [09:17] r04r has joined the channel [09:17] dlg: whats it look like if you go echo $PATH? [09:17] megalomix: i need to go to /home/node/0.6.11/bin [09:18] konobi: `hash -r` [09:18] megalomix: and write ./node [09:18] dlg: maybe you need export PATH after you set it in .bashrc [09:18] avih has joined the channel [09:18] dlg: also, you might have to have something like this in .bash_profile: [09:18] megalomix: $ echo $PATH [09:18] megalomix: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games [09:18] dlg: if [ -f ~/.bashrc ]; then [09:18] dlg: source ~/.bashrc [09:18] dlg: fi [09:19] raincole has joined the channel [09:19] methodt: i second: source ~/.bashrc [09:19] megalomix: yes i have .profile [09:19] Dotan_ has joined the channel [09:19] dlg: does it source the rc? [09:20] megalomix: uh? i have PATH=/home/node/0.6.11/bin:$PATH in .bashrc [09:20] megalomix: at the end [09:20] herbySk has joined the channel [09:20] dlg: thats not what i asked [09:21] megalomix: what did you ask? [09:21] markq has joined the channel [09:22] r04r has joined the channel [09:22] r04r has joined the channel [09:22] dnjaramba has joined the channel [09:23] megalomix: dlg, this is my .profile https://gist.github.com/1862722 [09:23] stayarrr has joined the channel [09:23] Illourr| has joined the channel [09:24] sigurding has joined the channel [09:25] megalomix: dlg, still there ? :) [09:26] insin has joined the channel [09:27] r04r has joined the channel [09:28] Illourr| has joined the channel [09:29] RLa has joined the channel [09:29] aranw has joined the channel [09:30] aranw has joined the channel [09:30] megalomix: methodt, you? [09:31] methodt: megalomix, yeah I was just asking if you sourced it after you added that line [09:31] methodt: or close the terminal [09:31] methodt: and reopen it [09:31] megalomix: wait methodt, excuse me what to you mean with "sourced" ? [09:31] megalomix: yes [09:31] megalomix: i done it [09:31] TheFuzzball has joined the channel [09:31] andrew12 has joined the channel [09:31] r04r has joined the channel [09:31] methodt: sourced meaning source .bashrc [09:31] megalomix: ok [09:32] methodt: well hmm [09:32] megalomix: yes i add the line there....saved [09:32] megalomix: close and reopen the shell [09:32] megalomix: (i connect to this VPS) with ssh [09:32] megalomix: closed and reopened [09:32] megalomix: but, why if i do echo $PATH [09:32] megalomix: i don't see it ? [09:33] megalomix: $ echo $PATH [09:33] megalomix: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games [09:33] methodt: try 'export PATH=$PATH:/home/node/0.6.11/bin' [09:34] Illourr| has joined the channel [09:34] megalomix: i try [09:34] chakrit has joined the channel [09:34] megalomix: $ echo $PATH [09:34] megalomix: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/node/0.6.11/bin [09:35] megalomix: hmmmmm now i have it :-/ why ? [09:35] megalomix: why .bashrc is not enough to do it ? [09:35] methodt: bc you need to add 'export' to your .bashrc line [09:36] megalomix: methodt, i use: PATH=/home/node/0.6.11/bin:$PATH also in /root/.bashrc [09:36] dnjaramba has joined the channel [09:36] megalomix: and it works [09:36] r04r has joined the channel [09:37] Industrial has joined the channel [09:37] megalomix: methodt, so, is this wrong? [09:38] megalomix: or better do i have to use it in /root/.bashrc but for the users i need to export it ? [09:39] Illourr| has joined the channel [09:39] methodt: export takes a local variable and makes it global [09:39] methodt: so yes [09:39] methodt: you dont need it in root [09:39] methodt: but you need 'export' for users [09:41] r04r has joined the channel [09:41] dnjaramba has joined the channel [09:42] megalomix: methodt, do i have to add the same line in .bashrc ? [09:42] megalomix: i mean: export PATH=$PATH:/home/node/0.6.11/bin [09:43] megalomix: exactly this line ? [09:43] methodt: megalomix, if you have it in root [09:43] methodt: then no [09:43] megalomix: aaah ok [09:43] megalomix: do you mean that i have to add it ONE TIME In root [09:43] megalomix: and stop ? [09:44] megalomix: so i have to change that line in my /root/.bashrc [09:44] methodt: .bashrc is run everytime you open a terminal, so you leave it there [09:44] methodt: you can have it in root or user, it's your choice [09:45] megalomix: methodt, yes but what i mean is that NOW i have PATH=/home/node/0.6.11/bin:$PATH in /root/.bashrc [09:46] megalomix: to leave the user use node everywhere [09:46] megalomix: i need to change it [09:46] r04r has joined the channel [09:46] r04r has joined the channel [09:46] megalomix: and add export to it [09:46] megalomix: so ONE TIME In /root/.bashrc [09:46] megalomix: i login with users in the VPS [09:47] Vennril has joined the channel [09:47] methodt: You root will apply to all users, if you have it in user.. it will only apply to that user. You don't need it in both .bashrc files. [09:47] methodt: Your root .bashrc file will apply to all users* [09:47] konobi: o.O [09:49] megalomix: yes i have understand :D ahaha i mean I DON'T use it in user/.bashrc but ONLY In /root/.bashrc [09:49] Illourr| has joined the channel [09:49] megalomix: the thing i don't understand is [09:49] megalomix: what line do i have to add to /root/.bashrc [09:49] megalomix: because only PATH=/home/node/0.6.11/bin:$PATH does't works for users [09:49] megalomix: so do i need to add export there [09:49] megalomix: right? [09:49] methodt: correct [09:50] megalomix: ook [09:50] konobi: methodt: "root" is just another user... it doesn't get sourced for everyone [09:50] megalomix: hmm [09:50] megalomix: konobi, so what can i do? [09:51] r04r has joined the channel [09:51] konobi: megalomix: try reading up on bash and profile scripts in general [09:52] jblanche has joined the channel [09:52] dreamdust has joined the channel [09:52] megalomix: konobi, something more specific? :) [09:53] EhevuTov: cat /etc/profile; cat /etc/bashrc [09:53] megalomix: EhevuTov, ? [09:53] megalomix: i have PATH=/home/node/0.6.11/bin:$PATH in .bashrc [09:53] EhevuTov: were you looking for system wide sh settings? [09:54] megalomix: i have the same in /root/.bashrc [09:54] EhevuTov: megalomix, are you trying to add paths globally? [09:55] megalomix: EhevuTov, exactly [09:55] daglees has joined the channel [09:55] daglees has joined the channel [09:55] megalomix: i would like to add it ONE time and all the users can launch node everywhere [09:55] EhevuTov: I find that odd, but if you do, you'd modify /etc most likely. Check out the /etc/paths file [09:55] dnjaramba has joined the channel [09:55] xSmurf has joined the channel [09:55] megalomix: why odd ? [09:55] r04r has joined the channel [09:55] EhevuTov: megalomix, it's not managed [09:56] EhevuTov: you should be adding node via package or something [09:56] raja: SubStack, konobi: Found my problem.. the match length was always >= 1 because the regex was often matching on whitespace [09:56] EhevuTov: this allows for better maintainability, particularly since Node is in such heavy development [09:56] raja: thanks for the help [09:56] EhevuTov: megalomix, you don't want to share files from your /root [09:57] megalomix: EhevuTov, hmmm i don't getting you, if i change the node version i will modify to the new path, what is odd? i mean....if i donwload the last stable i would like to use it everywhere [09:57] joshontheweb has joined the channel [09:58] megalomix: EhevuTov, i don't have /etc/paths [09:58] EhevuTov: megalomix, node is a binary similar to other scripting languages. WHere is your perl, python, ruby bins? [09:58] megalomix: i'm using ubuntu 11.10 [09:58] EhevuTov: you should be putting it in something like /usr/local/bin [09:58] megalomix: /usr/local/bin [09:58] lmorchard has joined the channel [09:58] megalomix: aaah [09:58] megalomix: understand [09:58] megalomix: ok [09:58] megalomix: so wait i can add a sym link to node [09:58] megalomix: right ? [09:59] EhevuTov: and with ubuntu, there is probably a package for node. Just install it that way. You're wanting to use Node in a normal way, right? [10:00] EhevuTov: megalomix, you shouldn't need a symlink. Your system should already check the /usr/local/bin as it's most likely already in the systemwide PATHS environment var [10:00] megalomix: with "package" do you mean install it using apt-get ? i'm installing it from source but i use --prefix= during the configuration [10:00] r04r has joined the channel [10:00] EhevuTov: yes, but why are you modifying the default with the --prefix= ? What is your reasoning? [10:01] dnjaramba has joined the channel [10:01] megalomix: because i have a directory with all the node versions inside [10:01] megalomix: so i switch to versions quickly [10:01] EhevuTov: megalomix, so you're trying to create a multiversioned environment [10:01] megalomix: *i change version if i want to go back and not using the last [10:01] megalomix: exactly [10:02] megalomix: now i have: /home/node/0.6.* [10:02] megalomix: inside node i have all the versions [10:02] methodt has joined the channel [10:02] megalomix: *inside /home/node [10:03] trupppOFF has joined the channel [10:03] plutoniiix has joined the channel [10:03] [[zzz]] has joined the channel [10:04] megalomix: EhevuTov, what do you think creating a sym link is odd ? i think is very easy to do and i can switch the version (change the dir) easyly [10:05] r04r has joined the channel [10:05] r04r has joined the channel [10:05] EhevuTov: megalomix, I don't know of the symlink will resolve. you could try it [10:05] megalomix: EhevuTov, i can add a link from /usr/bin/node to /home7node/0.6.11/bin/node [10:06] megalomix: no? [10:06] EhevuTov: right [10:06] EhevuTov: megalomix, you can do that [10:06] megalomix: and when i will change it to 0.6.12 i will change that sym link [10:06] megalomix: without doing nothing else [10:06] dreamdust has joined the channel [10:07] megalomix: but i would like to undetsand why this is not a good solution for you [10:07] EhevuTov: right, but you'll have to change your global paths for every /home/node//bin [10:07] megalomix: global paths? [10:07] megalomix: why? [10:07] megalomix: i add the link inside /usr/bin [10:07] EhevuTov: so that your users can access the previous versions [10:07] megalomix: it will be accessible everywhere as the other application on the system no? [10:07] megalomix: aah [10:08] megalomix: yes i need to switch it if i nmeed to change [10:08] EhevuTov: you said earlier you wanted your users to have access to previous version [10:08] megalomix: right [10:08] megalomix: yes [10:08] megalomix: but if i want to switch to a previous version i iwll change the sym [10:08] megalomix: if i want to use 0.6.10 i will use that version for ALL [10:08] megalomix: the user [10:08] megalomix: *users [10:09] EhevuTov: Are you running some type of testing system for a lot of users? [10:09] megalomix: i have 10 users [10:09] EhevuTov: ok [10:09] megalomix: yes i would like to test it separately [10:10] megalomix: EhevuTov, maybe i need to add --> n [10:10] megalomix: i have seen that is a tool to manage node versions [10:10] megalomix: *i need to install [10:10] EhevuTov: megalomix, I'm not familiar with that [10:10] bradleyg has joined the channel [10:10] r04r has joined the channel [10:11] EhevuTov: megalomix, have you looked into something like this: https://github.com/creationix/nvm [10:11] megalomix: yes exactly n is something line nvm and nave [10:11] megalomix: created by TJ Holowaychuk [10:11] EhevuTov: yeah, check that out. That's beyond me though. i wish you the best. I have to sleep :-) [10:12] tjmehta has left the channel [10:12] megalomix: :) [10:12] megalomix: gnight [10:12] megalomix: bye [10:12] megalomix: thank you! [10:12] EhevuTov: you're welcome [10:14] Illourr| has joined the channel [10:14] spolu has joined the channel [10:15] r04r has joined the channel [10:15] r04r has joined the channel [10:15] lmorchard has joined the channel [10:17] johnhamelink has joined the channel [10:17] SvenDowideit has joined the channel [10:18] zomgbie has joined the channel [10:19] Danielss89 has joined the channel [10:19] r04r has joined the channel [10:20] johnnychimpo has joined the channel [10:20] thalll has joined the channel [10:21] wink___ has joined the channel [10:24] r04r has joined the channel [10:24] Illourr| has joined the channel [10:24] d0k has joined the channel [10:27] wink_ has joined the channel [10:29] r04r has joined the channel [10:29] Illourr| has joined the channel [10:30] `3rdEden has joined the channel [10:30] spolu: AvianFlu jesusabdullah mmalecki[zzz]: hmmm you know it's winter right? http://nodejitsu.com/ [10:31] wink_ has joined the channel [10:32] __doc__ has joined the channel [10:33] megalomix: guys i'm using nginx as proxy of node [10:33] joshgillies has joined the channel [10:33] megalomix: i have seen on the log of express.js that the ip is ALWAYS 127.0.0.1 [10:33] megalomix: why? [10:33] simenbrekken has joined the channel [10:33] r04r has joined the channel [10:33] r04r has joined the channel [10:34] Illourr| has joined the channel [10:36] JakeSays has joined the channel [10:37] wink___ has joined the channel [10:37] shaysm has joined the channel [10:37] dnjaramba has joined the channel [10:38] r04r has joined the channel [10:39] kwmiebach has joined the channel [10:39] Illourr| has joined the channel [10:40] xSmurf has joined the channel [10:41] robotmay has joined the channel [10:41] dnjaramba has joined the channel [10:42] hkjels has joined the channel [10:42] mansoor has joined the channel [10:42] r04r has joined the channel [10:45] Illourr| has joined the channel [10:45] wink_ has joined the channel [10:46] wereHamster: megalomix: how are you accessing the server? [10:46] wereHamster: megalomix: ah, nginx. that explains it [10:46] eddyb has joined the channel [10:47] dnjaramba has joined the channel [10:47] r04r has joined the channel [10:48] eddyb: I need some JS trickery and I'm not sure how to do it, or if there's a complete solution out there [10:49] eddyb: (I like the topic, btw) [10:49] eddyb: so, I have a JSON file with some data in it [10:49] eddyb: I want to read that JSON file into a JS object [10:49] AndreasMadsen has joined the channel [10:50] Illourr| has joined the channel [10:50] eddyb: and every time something changes in that object, I want to convert it to JSON and save it into the file [10:50] RLa has joined the channel [10:50] eddyb: I know that proxies might help me, but I think this trick is used in some other places and there could be an easier way of doing it [10:51] eddyb: *question mark* [10:52] boltR: ls [10:52] boltR: oops [10:52] r04r has joined the channel [10:52] mAritz has joined the channel [10:52] chjj has joined the channel [10:55] dnjaramba has joined the channel [10:55] Illourr| has joined the channel [10:55] wereHamster: read the file contents, use JSON.parse() to convert it to a JS object, and JSON.stringify() to convert it to a string so you can write it into the file [10:55] zomgbie has joined the channel [10:55] eddyb: wereHamster: except [10:56] eddyb: json.someProperty = 5; won't do anything [10:56] eddyb: I want save-on-change [10:56] r04r has joined the channel [10:57] wereHamster: make a api around it. smth.set('someProperty', 1) [10:57] eddyb: I know what I'm saying is possible [10:58] eddyb: lol "I'll create a GUI in Visual Basic to track his IP address" - I've read about that line in CSI:NY, now I get to watch it [10:59] SubStack: are there any non-ridiculous cookie modules on npm? [10:59] wink___ has joined the channel [10:59] SubStack: because all the ones I can find either have no documentation or monkey punch ServerRequest or have terrible needlessly indirect APIs [11:00] Illourr| has joined the channel [11:00] snuggl: eddyb: __defineGetter/Setter__ can do that if you encapsulate it [11:00] eddyb: what about creating new properties? [11:00] danielss89_ has joined the channel [11:01] stonebranch has joined the channel [11:01] SubStack: I just want a thing that parses and generates cookie values as a pure function with parse :: string -> object and deparse :: object -> string [11:01] snuggl: eddyb: but tbh, do the re-save to JSON when the JSON is used instead [11:01] wereHamster: SubStack: the one from connect [11:02] SubStack: wereHamster: is that seperable from connect? [11:02] eddyb: SubStack: Haskell much? [11:02] r04r has joined the channel [11:02] wereHamster: SubStack: no, but you can easily extract it [11:03] QaDeS has joined the channel [11:03] eddyb: snuggl: not sure if I follow [11:04] wink_ has joined the channel [11:04] eddyb: I want every change in that object to cause a save [11:04] ph^ has joined the channel [11:05] arduix has joined the channel [11:06] konobi: eddyb: you could have a setter that marks an object internally as "dirty" and then have a .save() method that takes a callback [11:07] ppcano has joined the channel [11:07] r04r has joined the channel [11:07] r04r has joined the channel [11:07] ajackbot has joined the channel [11:08] mAritz has joined the channel [11:09] Sahua has joined the channel [11:10] dnjaramba has joined the channel [11:10] Illourr| has joined the channel [11:12] r04r has joined the channel [11:12] r04r has joined the channel [11:13] dnjaramba has joined the channel [11:13] snearch has joined the channel [11:15] Illourr| has joined the channel [11:16] arduix has joined the channel [11:16] r04r has joined the channel [11:16] wink___ has joined the channel [11:20] kalms has joined the channel [11:20] Illourr| has joined the channel [11:21] r04r has joined the channel [11:21] r04r has joined the channel [11:21] wink_ has joined the channel [11:22] mAritz has joined the channel [11:23] benvie: don't use defineGetter/Setter [11:23] benvie: use Object.defineProperty or use literal getters and setters [11:23] jetienne has joined the channel [11:23] eddyb: I think I'll just make a contraption with the Harmony proxies [11:23] koxa has joined the channel [11:24] benvie: .. { get prop(){ return 'p' }, set prop(v){} } [11:24] catb0t: Exception: SyntaxError: Unexpected identifier [11:24] benvie: .. ({ get prop(){ return 'p' }, set prop(v){} }) [11:24] catb0t: { prop: "p" } [11:24] benvie: catb0t you resolved the getter [11:24] catb0t: resolved deltas faster than my server clock out getter [11:25] johnnus_ has joined the channel [11:25] eddyb: lol, catb0t can speak [11:25] catb0t: speak English [11:25] benvie: lol [11:25] Illourr| has joined the channel [11:25] eddyb: catb0t: I do [11:25] ullmark has joined the channel [11:25] catb0t: do deploys to our administration site, but it's still not scriptkidproof because not all obj's in I [11:26] r04r has joined the channel [11:27] ullmark: hi guys, i upgraded node to 0.6.11.. isn't forever compatible with that version? [11:28] k1ttty has joined the channel [11:29] eddyb: .. Proxy.create [11:29] catb0t: Exception: ReferenceError: Proxy is not defined [11:29] eddyb: it works with --harmony [11:30] benvie: I has some fun with ecmabot and with(Proxy.create(...)) [11:30] Illourr| has joined the channel [11:31] r04r has joined the channel [11:31] r04r has joined the channel [11:32] artusrocha has joined the channel [11:32] jetienne: q. with requirejs, when i do define(['./relative/path/file.js'], function(){}), the relative path is relative to what ? [11:34] eddyb: catb0t: true [11:34] catb0t: true too [11:34] eddyb: damn [11:34] eddyb: catb0t -e true [11:34] catb0t: true , I hope it can use the data structure simple [11:34] eddyb: .. --harmony Proxy [11:34] catb0t: Exception: SyntaxError: Unexpected identifier [11:34] vdemedes has joined the channel [11:34] tdegrunt has joined the channel [11:35] benvie: .. function catb0t(){}; catb0t.prototype = catb0t; new catb0t [11:35] Illourr| has joined the channel [11:35] catb0t: Timeout Error [11:36] Skola has joined the channel [11:36] jldbasa has joined the channel [11:36] r04r has joined the channel [11:38] pthm has joined the channel [11:38] wink___ has joined the channel [11:38] benvie: .. (function(a,b){for(b=a='';a++<36;b+=a*51&52?(a^15?8^Math.random()*(a^20?16:4):4).toString(16):'-');return b})() [11:38] catb0t: "ee98c4ee-deb0-45ee-a617-9cd815642464" [11:38] DrPheltRight has joined the channel [11:38] sandfox has joined the channel [11:39] whaley has joined the channel [11:40] pthm has joined the channel [11:40] i42n has joined the channel [11:40] Skola_ has joined the channel [11:40] Illourr| has joined the channel [11:41] r04r has joined the channel [11:41] r04r has joined the channel [11:41] mAritz has joined the channel [11:42] eddyb: benvie: 140byt.es UUID? [11:42] megalomix: guys, i'm using nginx as proxy of node.js i don't undersatnd why the logger of Express.js save that all the request are coming from 127.0.0.1 the real user ip is not forwarded [11:42] benvie: yeah [11:43] benvie: a newish one [11:43] megalomix: oh hello benvie! [11:43] megalomix: :) [11:44] benvie: hello =D [11:45] megalomix: how are you? [11:45] benvie: braindead [11:45] megalomix: :) [11:45] r04r has joined the channel [11:45] r04r has joined the channel [11:46] Illourr| has joined the channel [11:46] sandfox: megalomix: is nginx set to added in the 'x-forwaded-for' header? [11:46] arduix has joined the channel [11:46] hipsterslapfight has joined the channel [11:47] diverdude: sandfox: hey, what was it again you use socket.io for? [11:47] bas_ has joined the channel [11:47] dnjaramba has joined the channel [11:48] pickels has joined the channel [11:49] megalomix: sandfox, yes [11:49] megalomix: sandfox, https://gist.github.com/1863407 [11:50] wink_ has joined the channel [11:50] sandfox: bunch of stuff, (some of it completely pointless) like sharing lots of mouse cursors on single page, sending iPhone accelerometer data back so it updates a 3d renderer on clients web pages, also for logging data, etc etc [11:50] r04r has joined the channel [11:50] r04r has joined the channel [11:51] megalomix: sandfox, are you talling it to me ? :) [11:51] megalomix: is this wrong ? [11:51] satyr has joined the channel [11:51] sandfox: megalomix: are $remote_addr and $proxy_add_x_forwarded_for both empty? [11:52] sandfox: megalomix: (sorry first message was diverdude:) [11:53] megalomix: sandfox, how can i control it? becase as i told the request are passed to NODE.js node send back the responses [11:53] diverdude: sandfox: ohh that sounds nice [11:53] megalomix: but i always see 127.0.0.1 so it is using nginx "ip" [11:53] diverdude: sandfox: you use it with nginx right? [11:53] boccato has joined the channel [11:54] sandfox: megalomix: let me dig out one of configs somewhere... [11:54] megalomix: ok [11:54] megalomix: sandfox, thanks [11:54] adrianF has joined the channel [11:54] sandfox: diverdude: using nginx to proxy any http requests but it doesn't handle the web sockets stuff [11:54] r04r has joined the channel [11:56] diverdude: sandfox: right ok...so you just connect directly to nodejs when communicating websockets? [11:56] Illourr| has joined the channel [11:56] konobi: http://blog.mixu.net/2011/08/13/nginx-websockets-ssl-and-socket-io-deployment/ [11:56] dingomanatee has joined the channel [11:57] mehlah has joined the channel [11:58] jinmo123 has joined the channel [11:58] jinmo123: does anyone know why tcp socket closes after connect event? [11:58] jinmo123: https://gist.github.com/850c6f257a91a1c39f4f [11:58] sandfox: megalomix: that seems like it should be ok to me, had you tried putting "$remote_addr and $proxy_add_x_forwarded_for" in your nginx logs so you can see what nginx thinks it doing? and can you console.log() the request headers? [11:58] sandfox: diverdude: correct, nginx has no ability to support web sockets (yet) (patches are in the works) [11:59] alFReD-NSH has joined the channel [11:59] alFReD-NSH has left the channel [11:59] diverdude: sandfox: yeah ok. I actually managed to route my websockets through HAProxy [11:59] r04r has joined the channel [11:59] r04r has joined the channel [11:59] eddyb: I got something: https://gist.github.com/1863435 [12:00] quijote has joined the channel [12:00] megalomix: sandfox, i should try it [12:00] konobi: jinmo123: try an .on('data'... in there too [12:00] megalomix: do you think those vars are empty ? [12:00] jinmo123: yep [12:01] Illourr| has joined the channel [12:01] wink_ has joined the channel [12:01] jinmo123: hmm [12:01] jinmo123: nothing happens [12:02] jinmo123: no data event [12:02] megalomix: sandfox, hmm i don't undersatnd how can they be empty [12:02] megalomix: it is strange [12:03] blup has joined the channel [12:04] rickibalboa has joined the channel [12:04] Emmanuel__ has joined the channel [12:04] dnjaramba has joined the channel [12:04] sandfox: are they empty on both nginx logs and node? [12:04] r04r has joined the channel [12:04] konobi: jinmo123: time to get wireshark out [12:05] sandfox: megalomix: it could be express isn't picking them up? (not sure if express is meant to by default or needs logging) [12:05] arduix has joined the channel [12:06] jinmo123: no difference, konobi sir! [12:06] Illourr| has joined the channel [12:06] jinmo123: i tested this in C [12:06] jinmo123: works [12:06] jinmo123: and wireshark didn't show any difference [12:06] megalomix: i need to do some tests [12:07] megalomix: ok [12:07] booo has joined the channel [12:07] megalomix: sandfox, btw the nginx configuration is good ? [12:08] sandfox: megalomix: I can't see any reason why it wouldn't work, unless there is something else whacky going on in your main config [12:08] jinmo123: ㅗㅕㅗ [12:08] jinmo123: huh [12:09] sandfox: megalomix: the only think i can think of is the "$proxy_add_x_forwarded_for" is not being set properly and therefore is neither correct, nor defaulting to being "$remote_addr" either [12:09] jinmo123: konobi: thanks i found a problem [12:09] r04r has joined the channel [12:09] konobi: jinmo123: mmm? [12:10] jinmo123: that code doesn't have any problem. my mistake [12:10] jinmo123: setEncoding problem. [12:11] dnjaramba has joined the channel [12:11] jinmo123: hmm [12:11] Illourr| has joined the channel [12:12] elnn has joined the channel [12:13] bingomanatee_ has joined the channel [12:13] r04r has joined the channel [12:15] dnjaramba has joined the channel [12:16] Illourr| has joined the channel [12:17] xaq_ has joined the channel [12:17] megalomix: ok [12:17] megalomix: i try [12:17] megalomix: thank you so much [12:17] megalomix: goodbye [12:17] xaq has joined the channel [12:18] Ezku has joined the channel [12:18] Skaag has joined the channel [12:18] r04r has joined the channel [12:18] r04r has joined the channel [12:20] wink___ has joined the channel [12:20] xaq has joined the channel [12:20] robhawkes has joined the channel [12:20] xaq has joined the channel [12:20] Joeysomo_ has joined the channel [12:22] Country has joined the channel [12:22] Dreamer3 has joined the channel [12:23] mAritz: hm, if i restart my socket.io server and don't refresh the client page, the client will receive all socket.io emits twice (or more if i restart again). is this normal and what's the easiest way to prevent this? [12:23] r04r has joined the channel [12:26] Joeysomo has joined the channel [12:27] wink_ has joined the channel [12:28] r04r has joined the channel [12:28] bradleyg has joined the channel [12:29] Danielss89 has joined the channel [12:29] diverdude: sandfox: do you know what this debug output means which comes periodically quite often? http://bin.cakephp.org/view/1779071068 Is that the heartbeat or is the connection reestablished or what is it? [12:29] dnjaramba has joined the channel [12:30] sandfox: diverdude: thats happening because the client doesn't support web-sockets so socket.io is falling back to using xhr-long poliing. and the stuff your seeing there is the heartbeat of sorts. [12:31] Illourr| has joined the channel [12:33] wink___ has joined the channel [12:33] r04r has joined the channel [12:34] krnl has joined the channel [12:36] Illourr| has joined the channel [12:37] bingomanatee__ has joined the channel [12:38] timoxley has joined the channel [12:39] BAK_ has joined the channel [12:40] erikzaadi has joined the channel [12:40] Ezku has joined the channel [12:42] samBiotic has joined the channel [12:46] Illourr| has joined the channel [12:47] josh-k has joined the channel [12:48] xaq_ has joined the channel [12:49] diverdude: sandfox: i see...do you know what could be the reason why i can only emit messages from client to server...but not from server to client? [12:49] dnjaramba has joined the channel [12:49] sandfox: divderdude: when you say you can't, what exactly goes wrong? [12:49] erichynds has joined the channel [12:51] xaq has joined the channel [12:51] diverdude: sandfox: well nothing happens when i do socket.emit('chatmessage',"pooooong"); on the server [12:52] Illourr| has joined the channel [12:53] vdemedes has joined the channel [12:53] larsschenk has joined the channel [12:53] vdemedes: Hello [12:53] sandfox: are you seeing anything at all in the server logs? [12:53] vdemedes: I'm wondering, how much does it cost to maintain npm? [12:54] Skyjoker has joined the channel [12:54] diverdude: sandfox: this is my server and my client: http://bin.cakephp.org/view/426942132 [12:54] diverdude: sandfox: no..nothing in the serverlogs either....at least not in the debug output which is printed in the terminal [12:57] Illourr| has joined the channel [12:57] diverdude: sandfox: sorry that was not true.,...i do see something iin the log actually [12:58] diverdude: sandfox: this is debug output: http://bin.cakephp.org/view/1510798279 [12:58] ramitos has joined the channel [12:58] mAritz: vdemedes: what? [12:58] diverdude: sandfox: it actually writes; debug - xhr-polling writing 5:::{"name":"chatmessage","args":["pooooong"]} [12:58] vdemedes: mAritz: what? [12:58] diverdude: sandfox: ahh nevermind i solved it :) [12:59] mAritz: vdemedes: ok [12:59] sandfox: diverdude: hehe [12:59] larsschenk has left the channel [12:59] diverdude: sandfox: i did chatsock.socket.on <--- wrong :) should be ofc. chatsock.on [13:00] sandfox: diverdude: yeah i was just tracing it back to see if was actually an object you were setting the listener on [13:01] diverdude: sandfox: but i find it strange that my ff an chrome which are both quite new versions do not support websockets [13:02] sandfox: chrome should…. (it does on my mac anyway), what version and OS are you running? [13:02] Illourr| has joined the channel [13:03] diverdude: sandfox: 16.0.912.77 (Developer Build 118311 Linux) Built on Ubuntu 11.10, running on LinuxMint 12 [13:04] sandfox: hmm, I think web sockets were in 16, I'm on 17.0.963.56 [13:06] diverdude: sandfox: yeah ok....ohh well at least in 1 year or so they will be much more common [13:06] sandfox: diverdude: that is strange, web sockets were supported from 14 upwards, [13:06] diverdude: sandfox: and i will be prepared hehehe :D [13:06] diverdude: sandfox: hmmm yes that is trange [13:06] fairwinds has joined the channel [13:07] diverdude: sandfox: does it have anything to do with the fact that im doing this: io.set('transports', ['xhr-polling','htmlfile','jsonp-polling']); on the server? [13:07] Illourr| has joined the channel [13:07] sandfox: diverdude: hehe, yes, [13:07] diverdude: sandfox: im not setting websockets as an option i think no? [13:08] diverdude: sandfox: hehe sry im a bit ignorant sometimes :) [13:08] sandfox: diverdude: if no transport is specified then all are available, otherwise as soon as you specify one, then only the explicitly stated protocols will be used [13:09] diverdude: sandfox: ahh yes i commented out...much better :D [13:09] mAritz1 has joined the channel [13:09] megalomix has joined the channel [13:09] diverdude: sandfox: now its doing: emitting heartbeat for client 1615203448304870986 instead [13:09] megalomix: sandfox, [13:09] megalomix: hello everybody [13:10] megalomix: sandfox, i saw log and there is remode addr :( [13:10] mansoor: ohhh wow [13:10] mansoor: 3d rigid body physics engine in JS? :S its a brave new world indeed [13:11] diverdude: sandfox: thx for your help and insight :) I gotta go for family dinner now hehe. [13:11] megalomix: mansoor, 3D engine for JS ? [13:11] mansoor: megalomix, yes [13:11] megalomix: name? [13:11] mansoor: Webgl? :p [13:11] megalomix: aah webgl [13:11] megalomix: ok [13:12] mansoor: Here is a sweet engine for it https://github.com/mrdoob/three.js [13:12] SubStack: hey what, request seems to be ignoring my { end : false } options in .pipe() [13:12] rickibalboa has joined the channel [13:12] Illourr| has joined the channel [13:13] SubStack: suspicions confirmed https://github.com/mikeal/request/blob/master/main.js#L620 [13:14] mmalecki: SubStack: no worries, I'll fix that soon :) [13:14] SubStack: it's really trivial to fix [13:14] mmalecki: (fixing problems by releasing new modules ftw) [13:15] SubStack: mmalecki: you're building something? [13:15] mmalecki: SubStack: yeah! something like request, but closer to the metal [13:16] dnjaramba has joined the channel [13:17] Illourr| has joined the channel [13:18] mmalecki: SubStack: any API tips, btw? [13:18] megalomix: guys i proxy the requests from nginx to node.js [13:18] megalomix: remote_addr what not set [13:18] megalomix: or better [13:18] megalomix: express.js does not store it as the real IP [13:18] megalomix: but it always use 127.0.0.1 :( [13:19] megalomix: https://gist.github.com/1863407 [13:21] sandfox: megalomix: http://stackoverflow.com/questions/7139369/remote-ip-address-with-node-js-behind-amazon-elb [13:21] Edy: megalomix: what ist you set the remote_addr in yout nginx config? [13:21] SubStack: mmalecki: what will your lib do that request doesn't do very well presently? [13:21] sandfox: megalomix: might help (I don't know much about express) [13:22] megalomix: Edy, https://gist.github.com/1863407 [13:22] megalomix: sandfox, i see [13:22] SubStack: mmalecki: yourlib() should return a res object that I can call .setHeader() on for one [13:22] SubStack: I don't like stuffing everything into an options hash [13:22] Edy: megalomix: proxy_set_header REMOTE_ADDR $remote_addr; [13:22] Illourr| has joined the channel [13:22] Edy: could work :) [13:23] SubStack: both ways should work [13:23] megalomix: wait [13:23] megalomix: do i have to add it [13:23] megalomix: and remove real-ip ? [13:23] dnjaramba has joined the channel [13:23] megalomix: X-Real-IP [13:23] megalomix: ? [13:24] Edy: leave x-real-ip and add remote_addr [13:24] megalomix: what is the difference ? [13:24] SubStack: mmalecki: it's frustrating to do var res = request.put({ uri : uri, headers : { 'content-type' : 'application/json' } }); res.end(JSON.stringify(obj)) [13:25] Edy: megalomix: just see what happens [13:25] SubStack: mmalecki: request.put(uri).setHeader('content-type', 'application/json').end(obj) would be boss [13:25] conntrack has joined the channel [13:25] megalomix: ok [13:25] megalomix: Edy, case sensitive ? [13:25] SubStack: or saving to an intermediate res would be fine [13:25] megalomix: REMOTE_ADDR ? Remote_Addr ? [13:25] Edy: REMOTE_ADDR [13:26] megalomix: ok [13:26] megalomix: i try now [13:27] wink_ has joined the channel [13:27] dnjaramba has joined the channel [13:27] Illourr| has joined the channel [13:30] megalomix: Edy, restarted nginx restarted node [13:30] megalomix: i do some requests [13:31] megalomix: Edy, nothing �_� [13:31] megalomix: 127.0.0.1 [Sun, 19 Feb 2012 13:33:00 GMT] <---------- [13:31] megalomix: :/ [13:32] Edy: well then http://stackoverflow.com/questions/7139369/remote-ip-address-with-node-js-behind-amazon-elb [13:33] Illourr| has joined the channel [13:33] garrensmith has joined the channel [13:34] wink___ has joined the channel [13:35] zomgbie has joined the channel [13:36] vguerra has joined the channel [13:36] mmalecki: SubStack: I see. so how'd request().pipe(stream) work? [13:37] mmalecki: SubStack: the way it does with request? [13:37] dnjaramba has joined the channel [13:37] SubStack: it works fine, it's just that the optional second arg opts is missing from the api [13:38] Illourr| has joined the channel [13:38] spolu has joined the channel [13:39] megalomix: Edy, unfortunately i use express logger [13:39] mmalecki: SubStack: ah ok. yeah, I kinda like .setHeader API [13:39] megalomix: so i can do a change inside it [13:39] wink_ has joined the channel [13:39] mAritz1: any suggestions on ACLs or other role management in node.js? the packages i've found through search.npm.js all seam either unmaintained or sub-optimal for me. [13:40] sandfox: member:identifier:maritz1 roll your own? [13:40] shanem_ has joined the channel [13:41] mAritz1: sandfox: yeah, i guess i'll have to :( [13:41] SubStack: mmalecki: yep and if .end() could detect for typeof obj and write the JSON.stringify that would also be super convenient [13:42] SubStack: not sure how well that fits into your "close to the metal" vision though [13:42] mmalecki: SubStack: yeah, that's kinda the thing I'm missing in node [13:42] sandfox: mAritz1: you know it's the node way, on the plus side you could make a decent one and open source it? (i have the same problem frequently) [13:42] mmalecki: SubStack: I even pull requested that, but it got rejected [13:43] Illourr| has joined the channel [13:43] mAritz1: sandfox: i don't really have the patience right now to create a module that is of sufficient quality to open source it i'll likely take some existing module and force it into my app :P [13:45] SubStack: mmalecki: it would be super handy for interacting with couch and rest apis [13:45] SubStack: oh bonus! [13:46] SubStack: if end() gets called with an object, set the content-type to application/json if it hasn't been set already [13:46] ullmark has joined the channel [13:46] SubStack: request.put(uri).end(obj) [13:46] SubStack: MAGIC [13:46] mmalecki: HELL YEAH [13:48] wink___ has joined the channel [13:48] SubStack: it should be a readable/writable stream too of course [13:48] Illourr| has joined the channel [13:48] sandfox: mAritz1: I sympathise… There is a world of half finished projects and dozens of 'good enough for my needs' git repos's on littered around the war zone that is my disk drive [13:48] stagas has joined the channel [13:48] mAritz1: :D [13:51] hellp has joined the channel [13:53] stonebranch has joined the channel [13:53] SubStack: mmalecki: maybe instead of how request has a callback body parameter you could listen for a 'body' event instead [13:53] warz has joined the channel [13:53] warz has joined the channel [13:53] johnhamelink has joined the channel [13:53] SubStack: and if there is no 'body' listener on the first tick then the request doesn't get buffered [13:54] WeeJeWel has joined the channel [13:54] munichlinux has joined the channel [13:54] conntrack has joined the channel [13:55] dnjaramba has joined the channel [13:56] mmalecki: SubStack: so, mylib(url).on('body') <= request doesn't get buffered? [13:56] philipd has joined the channel [13:57] SubStack: if you listen for a 'body' then it does get buffered [13:57] mmalecki: ah ok [13:57] wink_ has joined the channel [13:57] SubStack: you can just check self.listeners('body').length on the first tick [13:57] mmalecki: so you get whole body in this event? [13:58] SubStack: I think that would be handy yes [13:58] SubStack: but if you don't listen for it then the request doesn't get buffered at all [13:58] rickibalboa: So I have a tls server listening for connections/data. I have this code in it: s.on('close', function() { console.log(s.remoteAddress); }); it prints undefined, any reason for this? It doesn't in the data event. [13:58] Illourr| has joined the channel [13:59] dnjaramba has joined the channel [13:59] mmalecki: SubStack: hm, so I'd have to perform the actual request in the next tick? [14:00] Cromulent has joined the channel [14:00] mlangenberg: Argh, on the client a Message.create triggers and AJAX post. On the server this does a push to all Faye clients, they all do Message.create and again also execute the AJAX post. Catch22! [14:00] mlangenberg: this is do much fun :P [14:00] SubStack: mmalecki: but that is already the case to make piping work [14:01] SubStack: and to make the .end(obj) api support setting the application/json content type [14:02] ningu has joined the channel [14:02] mmalecki: SubStack: yeah [14:03] SubStack: oh request supposedly already has a chainable .setHeader() [14:03] SubStack: looking at the source [14:03] Ezku has joined the channel [14:03] Illourr| has joined the channel [14:04] ideado has joined the channel [14:05] Topcat has joined the channel [14:05] tpalohei has joined the channel [14:06] wink___ has joined the channel [14:06] kurtzhong has joined the channel [14:07] AndreasMadsen has joined the channel [14:07] dannyamey has joined the channel [14:08] Illourr| has joined the channel [14:09] mmalecki: SubStack: I actually dislike the idea of using nextTick. wondering about releasing close to metal library and some sweet API wrapper around it [14:10] aristidesfl has joined the channel [14:10] sreeix has joined the channel [14:11] mAritz has joined the channel [14:12] erikzaadi has joined the channel [14:12] SubStack: mmalecki: what would the metal library do that http.Client doesn't do? [14:13] mmalecki: SubStack: piping in and out, parsing the uri [14:13] Illourr| has joined the channel [14:14] adambeynon has joined the channel [14:15] bradleyg_ has joined the channel [14:15] wink_ has joined the channel [14:15] hgg has joined the channel [14:15] dnjaramba_ has joined the channel [14:15] igl1 has joined the channel [14:15] indistylo has joined the channel [14:16] __class__ has joined the channel [14:16] bradleymeck has joined the channel [14:17] take_cheeze has joined the channel [14:18] ph^ has joined the channel [14:18] owenb has joined the channel [14:18] Cromulen_ has joined the channel [14:18] crutex has joined the channel [14:18] Joeysomo has joined the channel [14:19] Internet13 has joined the channel [14:21] innoying has joined the channel [14:21] nuba_ has joined the channel [14:21] wink_ has joined the channel [14:21] garrensm_ has joined the channel [14:22] eukreign has joined the channel [14:23] ramitos has joined the channel [14:23] jldbasa has joined the channel [14:23] SubStack: whoa bug alert [14:24] SubStack: mmalecki: found another bug in request [14:24] hipsterslapfight has joined the channel [14:24] zed0 has joined the channel [14:24] EvRide has joined the channel [14:24] munichlinux: SubStack, what is it? [14:24] SubStack: gisting [14:25] Vennril has joined the channel [14:25] roger_raymond has joined the channel [14:26] GooMoo has joined the channel [14:27] tkahn6_ has joined the channel [14:27] ramitos has joined the channel [14:28] SubStack: what the craps, the latest version of request on npm can't even req.setHeader() [14:28] SubStack: but the one in git can [14:28] kurtzhong has joined the channel [14:28] SubStack: mmalecki: https://gist.github.com/1864060 [14:29] mmalecki: SubStack: wat [14:29] SubStack: it does it for .put also [14:29] looopy has joined the channel [14:29] SubStack: mmalecki: the json message is repeated twice [14:30] mmalecki: SubStack: yeah, I mean, wat. [14:30] SubStack: couch was complaining at me about invalid json [14:31] SubStack: and when I put req.end() in a nextTick it adds content-length: 0 [14:31] SubStack: and then puts the message down! [14:32] SubStack: why isn't it still multipart? [14:33] SubStack: mmalecki: can you try running that code? I'm on 0.4 still and it could be a 0.4 issue [14:33] SubStack: I need to set up nave [14:33] mmalecki: SubStack: sure [14:33] mmalecki: SubStack: and use give :) [14:34] mmalecki: SubStack: https://github.com/mmalecki/give [14:34] deeprogram has joined the channel [14:35] joeytwiddle has joined the channel [14:37] SubStack: aha! [14:37] wink___ has joined the channel [14:37] SubStack: the problem goes away when I use the latest version from npm [14:38] satyr has joined the channel [14:38] SubStack: that is more forgivable [14:38] mmalecki: SubStack: seeing the same thing with git [14:38] cha0s has joined the channel [14:38] cha0s has joined the channel [14:40] SubStack: mmalecki: probably mikeal already knows about the issue and that's why he hasn't published a new version to npm yet [14:40] insin has joined the channel [14:40] silky has joined the channel [14:40] mmalecki: SubStack: yeah, possible [14:40] dscape: SubStack: there where some issues with http and couchdb prior to 0.6 [14:41] dscape: i filed some [14:41] dscape: and at least one was related to content-length [14:41] dscape: in nano i was actually removing the header cause it was screwing my pipes [14:41] SubStack: dscape: https://gist.github.com/1864060 [14:41] SubStack: this is just a request bug, couch was doing the right thing [14:42] zivester has joined the channel [14:42] mmalecki: dscape: oh, btw, that request issue you hacked around in secret-sauce [14:42] wink_ has joined the channel [14:42] eukreign has left the channel [14:42] mmalecki: dscape: how'd you like to do that in my lib? [14:43] jxie has joined the channel [14:44] ohtogo has joined the channel [14:44] dscape: mmalecki: https://github.com/mikeal/request/issues/171 [14:44] dscape: i love it that its like the only thing that is not tagged easyfix [14:44] dscape: lol [14:44] mmalecki: dscape: no, that signature thing [14:45] dscape: SubStack: the error i found was https://github.com/joyent/node/issues/1569 [14:45] VladGh has joined the channel [14:45] dscape: it seems unrelated [14:45] artusrocha has joined the channel [14:46] dscape: all the http code got changed in 0.6 and plenty of fixes went in [14:46] dscape: i wish there was a new 0.4.13 release with patches but no api changes [14:46] dscape: but i guess that would be an immense amount of work [14:48] mmalecki: no, that's just retarded [14:48] wink___ has joined the channel [14:49] dscape: SubStack: what's ur node/request combo? [14:50] infynyxx has joined the channel [14:52] infynyxx has joined the channel [14:53] Industrial: What's the best Node.JS ORM/ODM out there now? Not Mongoose (or JugglingDB, which uses Mongoose for MongoDB). [14:54] mmalecki: Industrial: I like resourceful [14:54] magnetik has joined the channel [14:55] Industrial: https://github.com/pmlopes/p-odm looks promising. I know it is very fast and does submodels/subdocuments and references correctly [14:56] SubStack: dscape: that bug is just for the request on git, the one on npm is fine [14:56] daglees has joined the channel [14:56] adrianF has joined the channel [14:56] copongcopong has joined the channel [14:58] dscape: Industrial: quite frankly if you are thinking of using an odm you probably should be using a relational database [14:58] dscape: SubStack: lots of pull requests from a bunch of people does that :\ [14:58] dscape: plus request doesnt really have a good test suite [15:00] dscape: SubStack: what is it that you are trying to do? [15:00] looopy has joined the channel [15:00] robhawkes has joined the channel [15:00] dscape: oh, nvm its just a bug in request anyway [15:01] jetienne has joined the channel [15:02] ramitos has joined the channel [15:03] Morkel has joined the channel [15:03] Danielss89 has joined the channel [15:03] SubStack: dscape: I'm just building a program that talks to couch and I wanted to req.pipe(process.stdout, { end : false }) [15:03] dscape: SubStack: but it works on request@npm right? [15:04] dscape: SubStack: request.post({url: url, body: body).pipe(process.stdout) doesnt work? [15:05] SubStack: .pipe(process.stdout) closes the stream [15:05] SubStack: so I can't ever print anything else ever [15:06] Industrial: dscape: I disagree. MongoDB lends itself fine for denormalized structures [15:06] dscape: Industrial: exactly [15:06] Industrial: with an odm you can capture part of your denormalized structure in the document as a model, use model methods on the subdocument just for that part [15:06] Industrial: instead of e.g. a table [15:06] Industrial: make references where needed, but that's true for using a nosql without an odm aswell [15:07] kbhit has joined the channel [15:07] Industrial: you just need to work with that those subdocument models may not have identifiers [15:08] draginx has joined the channel [15:08] SubStack: I don't like models [15:08] objectiveous has joined the channel [15:08] Industrial: but they do have indexes :) [15:08] pandeiro has joined the channel [15:09] dscape: Industrial: so do relational databases [15:09] dscape: postgres even supports json [15:09] bnoordhuis has joined the channel [15:09] dscape: fact is that the advantage of document store is denormalization [15:11] piscisaureus_ has joined the channel [15:12] diva has joined the channel [15:12] kbhit: i'm trying to figure out why webgl_terrain_dynamic makes uses of two scenes { scene, and sceneRenderTarget} . seems like sceneRenderTarget is for the landscape mesh.. any idea why the benefits of having 2 scenes for this are? [15:13] kbhit: sorry, wrong channel [15:14] jetienne has joined the channel [15:14] ajjajaja has joined the channel [15:14] conntrack has joined the channel [15:16] mfunkie has joined the channel [15:16] Lingus: dscape: I'm not able to find any information on pgsql's JSON support. [15:16] Lingus: Do you have a link? [15:18] Masds has joined the channel [15:18] Masds: hi [15:19] Masds: i have a question, can you scrape web pages with javascript generated content using node.io? [15:19] dscape: Lingus: http://people.planetpostgresql.org/andrew/index.php?/archives/255-JSON-for-PG-9.2-...-and-now-for-9.1!.html [15:19] dscape: Masds: node.io ? [15:19] dscape: what's that? [15:19] ryanfitz has joined the channel [15:20] dscape: oh that is something [15:20] dscape: lol [15:20] dscape: im not familiar [15:20] level09 has joined the channel [15:20] ajjajaja: anyone know a good node.js host? [15:20] Masds: it's a framework for scraping [15:21] Masds: so do you think it is possible just with node.js and jquery? [15:21] dscape: Masds: well node.io is node right? [15:21] dscape: everything is possible doesnt mean you should use tools that already exist and help you achieve the result [15:21] Masds: yes [15:21] dthompso99 has joined the channel [15:21] Lingus: Thanks [15:21] dscape: but im not familiar with node.io, we use banzai instead but dont use it for scrapping [15:22] Masds: oh [15:22] dscape: ajjajaja: if you are interested in trying nodejitsu register and then gimmesomebeta.jit.su [15:22] Masds: well, for scraping regular php pages it's great [15:22] ajjajaja: is it instant or do u have to wait 1 week for invite? [15:22] arcanis has joined the channel [15:24] wink_ has joined the channel [15:27] aranw has joined the channel [15:27] ningu has joined the channel [15:28] aranw has joined the channel [15:31] wink___ has joined the channel [15:31] dscape: ajjajaja: go to gimmesomebeta.jit.su to get an invite [15:32] enmand has joined the channel [15:33] whitman has joined the channel [15:33] slaskis has joined the channel [15:36] saikat has joined the channel [15:37] mAritz has joined the channel [15:37] kwmiebach_ has joined the channel [15:37] dob_ has joined the channel [15:39] johnhamelink has joined the channel [15:41] criswell has joined the channel [15:43] ohtogo has joined the channel [15:43] wink_ has joined the channel [15:46] SubStack: mmalecki: I'm giving give a spin right now [15:46] AndreasMadsen has joined the channel [15:46] mmalecki: SubStack: awesome! tell me how do you like it :) [15:46] SubStack: I like how simple the directions are so far [15:47] subbyyy has joined the channel [15:47] SubStack: mmalecki: does this handle npm versions too? [15:47] SubStack: since 0.6 bundles npm but 0.4 doesn't [15:48] mmalecki: SubStack: no, it doesn't handle that - it was pissing me off in nvm [15:48] mmalecki: SubStack: I can make it a switch tho [15:49] SubStack: I'm thinking it would be really useful to integrate give with stagecoach now [15:49] SubStack: so you can bump the platform version completely in isolation [15:49] SubStack: so you can test against a few version separately and quickly roll back if it's broken in some way [15:50] mmalecki: SubStack: sounds neat [15:50] SubStack: I want to make it awesome to manage a whole cluster spanning multiple machines without distributing vms [15:51] SubStack: since vm-based rollouts take too long to spin up and push out [15:51] SubStack: and I pretty much want to deploy new code and see it live immediately [15:51] mmalecki: SubStack: agreed. it's pretty easy in haibu, actually [15:52] mmalecki: SubStack: unless you have your own thing to do that :D [15:52] SubStack: yeah I was looking at haibu some [15:52] geojeff has joined the channel [15:52] SubStack: I still might switch if propagit doesn't work out for what I'm trying to accomplish [15:54] mmalecki: SubStack: what do you need in haibu to use it? we can totally work something out. [15:56] esundahl has joined the channel [15:56] wink___ has joined the channel [15:56] DarkGlass has joined the channel [15:57] mandric has joined the channel [15:57] hij1nx_ has joined the channel [15:58] SubStack: mmalecki: one big thing is that there isn't a 1:1 correspondence between apps and repos [15:58] SubStack: one repo might span several processes [15:59] SubStack: I might be able to just overload the name attribute with that however [15:59] Vespakoen has joined the channel [16:00] aristidesfl has joined the channel [16:01] vereteran has joined the channel [16:02] mmalecki: SubStack: ah, I see what you mean. that's never been a problem tho - you can spawn subprocesses from your app [16:02] AndreasMadsen: ACTION watching a very interesting discussion here [16:03] Qzen: ACTION agrees with AndreasMadsen [16:03] xbayrockx has joined the channel [16:03] mmalecki: SubStack: controlling processes gets harder tho. I think what you'd like is an array as start script? [16:04] SubStack: it's complicated [16:05] SubStack: because I want to spin up just those services necessary that aren't already running to satisfy the service dependency graph [16:06] satyr has joined the channel [16:06] DarkGlass has left the channel [16:06] SubStack: then seaport takes care of the port allocation and routing [16:07] mmalecki: SubStack: so, the way I'd do it: have some hub you can deploy specific services to. this hub should talk to haibus deploy services which aren't running/need deployment [16:07] mmalecki: SubStack: that way haibu becomes a dumb slave, pretty much what it was meant to be :) [16:08] lennyx has joined the channel [16:10] skylamer` has joined the channel [16:10] sandfox has joined the channel [16:11] lennyx: so I'm building a website that needs to do some fairly intense parsing of a website. Basically POST a login form, visit a few pages, scrape data with server-side jquery and JSDOM. Problem is that's pretty heavily bounded by the CPU, which a one-thread async-only environment such as node wouldn't really jive in. Should I use some sort of async RPC system to export the parsing jobs, or should I somehow make node do it? [16:12] SubStack: jsdom is crazy slow [16:12] SubStack: lennyx: you could use phantom [16:12] SubStack: or a real browser [16:13] lennyx: SubStack, phantom? And how would I use a real browser? [16:13] mmalecki: SubStack: actually, that way you could even run automated test suite after deploying [16:13] stagas has joined the channel [16:13] SubStack: mmalecki: yes, once the services are up [16:14] SubStack: bound to a custom subdomain based on the commit hash automatically [16:14] ajjajaja: dscape what the hell [16:14] ajjajaja: that jitsu site [16:15] ajjajaja: dscape i wanted a node.js host. [16:15] lennyx: oh I found PhantomJS. But I still don't see how I would use a real browser, unless you mean using a real browser's engine [16:15] mmalecki: SubStack: yeah. also, if you add some balancer to it, you can easily scale it up (spawning new drones in haibus) [16:16] SubStack: mmalecki: yes and writing those is easy [16:17] SubStack: basically stagecoach hub 7000 on the deploy server then stagecoach drone --hub hubhost:7000 on each of the workers [16:17] SubStack: and stagecoach router somewhere [16:18] kylebt has joined the channel [16:18] sirwan has joined the channel [16:18] danielss89 has joined the channel [16:18] SubStack: then you git push to the hub to deploy into a directory and stagecoach deploy to serve up that commit [16:19] SubStack: with some convenience command to do both of those at once for the usual case [16:19] Illourr| has joined the channel [16:19] SubStack: but the deploy is intelligent about satisfying the service dependencies across the whole cluster [16:20] mmalecki: SubStack: not sure how stagecoach drone looks like, but you could replace it with haibu, I think [16:20] psudo has joined the channel [16:20] arduix has joined the channel [16:20] psudo: _mdp [16:20] psudo: hello [16:20] geojeff: for stylus, i am getting an, expected "indent", got "outdent" error, on line 37 in https://gist.github.com/1864482 [16:20] kitt has joined the channel [16:21] lenage has joined the channel [16:22] wink_ has joined the channel [16:23] Illourr|: Try resetting spacing around there? [16:23] Illourr|: I have that problem with coffeescript [16:25] geojeff: must be something like that, but i don't see it [16:25] psudo: :wink: [16:25] lenage has left the channel [16:26] psudo has left the channel [16:27] st_luke has joined the channel [16:27] Octayn: geojeff: even though it's optional in stylus I find using braces is still helpful [16:29] geojeff: Octayn: i removed them to try to solve another glitch :) but am doing this in a build program, so easy to leave them in for another try [16:30] sreeix has joined the channel [16:30] geojeff: same error if i leave the braces though [16:31] Octayn: odd [16:34] wink___ has joined the channel [16:36] mAritz has joined the channel [16:36] isao has joined the channel [16:37] CarterL has joined the channel [16:38] draginx has joined the channel [16:38] kbhit has joined the channel [16:43] wink_ has joined the channel [16:43] mmalecki: is there a way to capture heap snapshot on node v0.6 without using node-inspector? [16:48] wink___ has joined the channel [16:53] wink_ has joined the channel [16:53] stagas has joined the channel [16:54] ckknight has joined the channel [16:56] adrianFa has joined the channel [16:56] ningu: if I've been developing with express on node 0.6, will I still be able to deploy to sites that run 0.4.x? [16:56] ningu: I have the current version of everything. just wondering. [16:57] josh-k has joined the channel [16:58] wink___ has joined the channel [16:58] margle has joined the channel [16:58] tonist has joined the channel [16:59] pandeiro has joined the channel [17:00] blup has joined the channel [17:00] Wizek has joined the channel [17:01] mAritz: ningu: try it? nvm is awesome ;) [17:02] ningu: what is nvm? [17:03] mAritz: don't know [17:03] mAritz: maybe i should ask google? hmm... [17:03] ningu: I just tried. [17:03] ningu: nodejs + nvm didn't produce obvious results. [17:03] ningu: oh, wait. now it did. [17:04] ningu: before it corrected it to npm. [17:04] insin: https://github.com/creationix/nvm [17:04] __mdp has joined the channel [17:04] ningu: yeah, found it now. [17:05] piscisaureus_ has joined the channel [17:05] trcarden has joined the channel [17:05] cha0s has joined the channel [17:05] cha0s has joined the channel [17:06] pizthewiz has joined the channel [17:06] ningu: I'm thinking of using heroku as a way to test deployent [17:06] ningu: deployment* [17:06] ningu: but not sure what other options there are -- I want something that won't be too expensive, and I don't need a lot of resources or bandwidth [17:07] igl: ....cheap testing [17:07] _eddyb_ has joined the channel [17:07] ningu: ? [17:07] bankq has joined the channel [17:07] mmalecki: ningu: nodejitsu maybe? [17:07] igl: heroku starts at $36 i think? [17:07] ningu: no, if you have just one web dyno it appears to be free [17:08] ningu: and mongodb is free for 16mb, $5 for 256mb [17:08] bankq has left the channel [17:08] tommyvyo has joined the channel [17:09] dscape: ningu: are you doing nodejs? [17:09] hij1nx has joined the channel [17:09] ningu: most of the node hosting sites I saw liseted were in beta and seemed to be kind of uncertain (uncertain whether they'll be around etc) [17:09] ningu: dscape: yes, why else would I be in here? :P [17:09] dscape: you were saying heroku i thought about ruby [17:09] dscape: :) [17:09] WeeJeWel has joined the channel [17:09] dscape: ningu: i work for nodejitsu and you can deploy with us for free if you like [17:10] draginx: why not just get ur own vps? O_o [17:10] draginx: and learn how ot sysadmin :D [17:10] Broolucks has joined the channel [17:11] ningu: draginx: time, plus, minimum cost is too much afaik [17:11] draginx: 15/mo? O_o [17:11] ningu: draginx: for what? [17:11] draginx: and less than 5 hours of ur time? :P for a full haproxy + nginx + node + redis + mysql setup O_o [17:11] ningu: I don't mind that much setting it up [17:11] draginx: 256mb of ram me believes [17:11] draginx: which is plenty if u know what ur doing O_o [17:12] ningu: but EC2 for example scares me because it's hard to know how much it will cost [17:12] kirbysayshi has joined the channel [17:12] markwubben has joined the channel [17:12] draginx: http://6sync.com/ here u go :) If u do decide to go with them i can always send a referral code if ya want :P (their support i scurrently online and mario is awesome) [17:12] looopy has joined the channel [17:12] Illourr| has joined the channel [17:13] danielss89_ has joined the channel [17:13] insin: could check if there are any no.de smartmachines going, too [17:13] ningu: draginx: ok, I will check it out [17:14] st_luke has joined the channel [17:14] draginx: ningu: or #6sync :) [17:14] mehlah has joined the channel [17:14] igl: after comparing prices i went with rackspace over amazon [17:14] ningu: I do prefer having the control of my own machine, but it seemed like EC2 for example wasn't realistic [17:14] draginx: does anyone know if session-web-sockets works with socket.io 0.8.x? [17:14] igl: 256mb *nix is 0,01€ per hour there [17:14] draginx: igl: *looks at his stocks* thanks fo rmaking that deciision :D [17:14] igl: lol :P [17:15] cjm has joined the channel [17:15] igl: invest in facebook and loose it all \o/ [17:15] insin: haven't tried mongo, but it was trivial to install redis on one [17:15] draginx: also in socket.io would I need to do socket.leave('room') if I wanted to leave a room? [17:15] igl: if you can setup redis, you can setup mongo and mysql too [17:16] ningu: draginx: can you use mongo on 6sync? their site is a bit... unclear [17:16] draginx: ya O_o [17:16] draginx: its ur own box mate :P [17:16] ningu: I figured [17:16] ningu: just checking [17:16] draginx: u can put anything u want on it a slong as its not illegal in ur country [17:16] igl: what if the datacenter is in another country? [17:16] igl: ^^ [17:17] ningu: and what would I need nginx for? serving static files I guess? [17:17] hz has joined the channel [17:17] igl: rackspace and london, texas and hong kong [17:17] igl: you can let nginx do the static files [17:17] igl: and you can let nginx also do the clustering [17:17] draginx: igl: I meant the datacenter's country buuuut i do believe america has setup laws to prevent US citizens of doing crap like that [17:18] draginx: so u cant make ur own priatebay by setting up a server in sweden for example [17:18] draginx: u can let nginx server static files, upstream to node, etc. [17:18] draginx: BUT if u r using websockets nginx currently does not support that [17:18] draginx: so ull need haproxy [17:18] draginx: to upgrade :) basically if u need sockets use apache :P [17:18] draginx: unless u go ttime to learn and expand ur skillset (which is always a good idea, specialization is for insects) [17:18] enmand has joined the channel [17:18] igl: isnt nginx-dev http1.1 now too? [17:19] igl: saw that a few weeks ago actually [17:19] ningu: draginx: I'm happy to learn new things, but I am also in the process of writing a dissertation [17:19] bsdguru has joined the channel [17:19] draginx: ningu: two full time jobs, MMA training everyday, and client work suck it up ;x [17:19] pthm_ has joined the channel [17:19] igl: ningu do you have any linux terminal experience? [17:20] jakehow has joined the channel [17:20] draginx: igl: not sure i think so but websockets may not even be released in 1.1 which is sad :( [17:20] indistylo has joined the channel [17:20] brianseeders has joined the channel [17:21] `3rdEden has joined the channel [17:21] ningu: igl: sure, I'm not afraid of linux, and I've also set up apache before for fastcgi, mod_perl, that sort of thing. I know it's not that hard, it's just another thing to worry about [17:21] igl: aye [17:22] ningu: and I know you can do some stupid things if you have no idea how to configure apache, etc. [17:22] sriley: cant see anything on the changes list about http 1.1 backend support in nginx dev [17:23] draginx: Anyone know how I can get a list of rooms a certain client is in with socketio? [17:24] ningu: draginx: anyway, you're right that 6sync's lowest option is a good deal [17:25] draginx: :) its great for starting out [17:25] draginx: the prices are comparable ot linode [17:25] igl: "HTTP/1.1 proxying is currently available in the development version" [17:25] draginx: igl: shibby [17:25] ningu: I prefer the resources to be limited by the provider so I can't go over by accident [17:25] draginx: hmm bandwidht might be soft capped [17:25] draginx: but u can request hard cap [17:25] ningu: draginx: so why go with them over linode? [17:25] draginx: ningu: I like to try out new things :) I have had absolutely zero problems with linode in the past [17:25] draginx: but $15 < $20 :p [17:26] ningu: hehe [17:26] draginx: And Im hoping 6sync will be a much better future bet [17:26] draginx: Kind of like how Apple used ot suck compared to Mcsft, etc. [17:26] ningu: let's just hope it isn't a 10 year period of darkness like apple [17:27] felixge has joined the channel [17:27] felixge has joined the channel [17:27] draginx: haha i dont think so :P if u got ays to improve their cpanel pygi on #6sync wil listen [17:28] ningu: rackspace's lowest option is cheaper [17:28] ningu: redhat? ugh [17:28] ningu: maybe not :P [17:29] jmaya has joined the channel [17:29] phidah has joined the channel [17:29] draginx: Anyone here good with socket.io? Basically, I'm trying to make a system where i dont reconnect when opening a new pop up window (basically I want someone to be able to join 5 poker tables) [17:29] draginx: actually nvm thats impossible meh x-x [17:29] draginx: ningu: who offers redhat? [17:29] ningu: draginx: rackspace... but I'm confused, they have a box "number of red hat servers" which seems to be different from "linux server" [17:29] draginx: O-o lol [17:29] draginx: prob hae a deal with RH [17:30] ph^ has joined the channel [17:30] bradleymeck has joined the channel [17:30] ningu: anyway, $15/mo for something easy to set up is better than $11/mo for something crappy [17:30] ajjajaja has joined the channel [17:30] ningu: but I have no idea what any of these services are really like [17:31] ningu: or how important their control panel thingy really is [17:31] draginx: O_o dont know rackspace's control panel [17:31] ningu: I mean, if it takes care of dns routing that's good [17:31] draginx: but 6sync's is very easy t use [17:31] draginx: yup theres a dns manager [17:31] ningu: but otherwise I don't need it for all that much [17:31] ningu: or maybe I do and don't realize :P [17:32] quijote has joined the channel [17:32] mandric has joined the channel [17:32] blueadept has joined the channel [17:32] spion1 has joined the channel [17:33] eukreign has joined the channel [17:34] eukreign: i would like to use node.js to test some javascript that will run in the browser [17:35] eukreign: i'm trying to figure out how require(); works and can't figure out how to make it work more like an include instead of a module system [17:35] wink_ has joined the channel [17:35] SubStack: mmalecki: https://gist.github.com/1864760 [17:35] draginx: u coming from a php background? O_o [17:36] eukreign: no, python [17:36] djcoin has joined the channel [17:36] zemanel has joined the channel [17:36] eukreign: not sure how that's relevant though [17:36] ajjajaja has joined the channel [17:36] mmalecki: SubStack: hrm... what shell is that? [17:36] mmalecki: SubStack: also, is '~/prefix/bin' yours? [17:36] SubStack: GNU bash, version 4.2.8(1)-release (x86_64-pc-linux-gnu) [17:37] SubStack: yes I install most things with --prefix=$PREFIX [17:37] tonist_ has joined the channel [17:37] Ajdare has joined the channel [17:37] Illourr| has joined the channel [17:38] Ajdare: Bet and Win with us : http://bet-tips.cogia.net/?ref=285 [17:39] mmalecki: SubStack: looking, this totally should spawn a new subshell with a different path :/ [17:39] eukreign: when you do